oa-componentbook 0.7.0 → 0.9.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.
- package/build/components/Accordians.js +1 -9
- package/build/components/ColorVariables.js +25 -0
- package/build/components/{oa-button/OACustomButton.js → oa-component-button/CustomButton.js} +14 -14
- package/build/components/oa-component-button/styles.js +38 -0
- package/build/components/{CheckBoxes.js → oa-component-checkbox/CustomCheckBox.js} +8 -8
- package/build/components/oa-component-colorUsage/ColorUsage.js +27 -0
- package/build/components/oa-component-colorUsage/styles.js +14 -0
- package/build/components/oa-component-cornerRadius/CornerRadius.js +25 -0
- package/build/components/oa-component-cornerRadius/styles.js +35 -0
- package/build/components/oa-component-drawer/CustomDrawer.js +86 -0
- package/build/components/oa-component-drawer/styles.js +17 -0
- package/build/components/oa-component-modal/CustomModal.js +92 -0
- package/build/components/oa-component-modal/styles.js +16 -0
- package/build/components/{Notification.js → oa-component-notification/CustomNotification.js} +43 -37
- package/build/components/oa-component-notification/styles.js +13 -0
- package/build/components/{RadioButton.js → oa-component-radio/CustomRadio.js} +18 -13
- package/build/components/oa-component-spacingScales/SpacingScales.js +27 -0
- package/build/components/oa-component-spacingScales/styles.js +49 -0
- package/build/components/{TableDesign.js → oa-component-table/CustomTable.js} +4 -4
- package/build/components/{TabsDesign.js → oa-component-tabs/CustomTabs.js} +5 -5
- package/build/components/oa-component-textarea/TextArea.js +38 -0
- package/build/components/oa-component-textarea/styles.js +17 -0
- package/build/components/{DrawerDesign.js → oa-component-timeline/CustomTimeline.js} +27 -37
- package/build/components/oa-component-timeline/styles.js +17 -0
- package/build/components/oa-component-toggle/CustomToggle.js +44 -0
- package/build/components/oa-component-toggle/styles.js +16 -0
- package/build/components/oa-component-typography/Typography.js +34 -0
- package/build/components/oa-component-typography/styles.js +14 -0
- package/build/index.js +77 -57
- package/build/widgets/oa-widget-address/Address.js +61 -0
- package/build/widgets/oa-widget-address/styles.js +16 -0
- package/build/widgets/oa-widget-approval.js +134 -0
- package/build/widgets/oa-widget-keyValueDataView/KeyValueDataView.js +67 -0
- package/build/widgets/oa-widget-keyValueDataView/styles.js +16 -0
- package/build/widgets/oa-widget-send-payment-link/SendPaymentLink.js +109 -0
- package/build/widgets/oa-widget-send-payment-link/example-usage.md +34 -0
- package/build/widgets/oa-widget-send-payment-link/styles.js +18 -0
- package/build/widgets/oa-widget-stagesTimeline/StageTimeline.js +49 -0
- package/build/widgets/oa-widget-stagesTimeline/styles.js +22 -0
- package/build/widgets/oa-widget-track-shipment/TrackShipment.js +102 -0
- package/package.json +1 -1
- package/build/components/ColorUsage.js +0 -35
- package/build/components/CornerRadius.js +0 -46
- package/build/components/KeyValueDataView.js +0 -48
- package/build/components/LeftPannelTab.js +0 -34
- package/build/components/SpacingScales.js +0 -34
- package/build/components/Toggle.js +0 -60
- package/build/components/Typography.js +0 -37
- package/build/components/oa-button/styles.js +0 -37
- package/build/components/peclaim-components/CloseClaim.js +0 -97
- package/build/components/peclaim-components/ComplaintsTable.js +0 -103
- package/build/components/peclaim-components/MainComponent.js +0 -192
- package/build/components/peclaim-components/SrComplaints.js +0 -54
- package/build/components/peclaim-components/WorkflowSummaryNotesModal.js +0 -60
- package/build/components/peclaim-components/WorkflowSummaryTable.js +0 -82
- package/build/components/styles.js +0 -89
- package/build/components/wallet-service-details/ComplaintDetail.js +0 -28
- package/build/components/wallet-service-details/ServiceDetailsTabView.js +0 -170
- package/build/components/wallet-service-details/ViewMoreDetailsDrawer.js +0 -95
- package/build/components/wallet-service-details/WalletServiceDetails.js +0 -67
- package/build/components/wallet-service-details/styles/styles.css +0 -16
package/build/components/{Notification.js → oa-component-notification/CustomNotification.js}
RENAMED
|
@@ -4,67 +4,73 @@ require("core-js/modules/es.weak-map.js");
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
7
|
+
exports.notificationOptions = exports.default = void 0;
|
|
9
8
|
require("core-js/modules/es.symbol.description.js");
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _antd = require("antd");
|
|
13
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
13
|
var _icons = require("@ant-design/icons");
|
|
15
|
-
var _Typography = _interopRequireWildcard(require("
|
|
16
|
-
var
|
|
17
|
-
var _templateObject;
|
|
14
|
+
var _Typography = _interopRequireWildcard(require("../oa-component-typography/Typography"));
|
|
15
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
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); }
|
|
20
18
|
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; }
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
// Import the styles from the separate file
|
|
20
|
+
|
|
21
|
+
const notificationOptions = ['green-success', 'red-error'];
|
|
22
|
+
exports.notificationOptions = notificationOptions;
|
|
23
23
|
function Notification(_ref) {
|
|
24
24
|
let {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
description,
|
|
26
|
+
isDisplayed,
|
|
27
|
+
placement,
|
|
28
|
+
title,
|
|
29
|
+
type,
|
|
28
30
|
typographies
|
|
29
31
|
} = _ref;
|
|
30
32
|
const [api, contextHolder] = _antd.notification.useNotification();
|
|
31
33
|
const openNotification = () => {
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
typography: typographies.title
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
const titleColor = type === 'success' ? 'green-success' : 'red-error';
|
|
35
|
+
const descriptionColor = type === 'success' ? 'type-b3-400' : 'primarygrey-text';
|
|
36
|
+
const borderColor = type === 'success' ? 'var(--color-green-success)' : 'var(--color-red-error)';
|
|
37
|
+
const customNotification = /*#__PURE__*/_react.default.createElement(_styles.default, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
38
|
+
typography: typographies.title,
|
|
39
|
+
color: titleColor
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, title)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
41
|
+
color: descriptionColor,
|
|
39
42
|
typography: typographies.description
|
|
40
|
-
},
|
|
43
|
+
}, description)), /*#__PURE__*/_react.default.createElement(_icons.CloseOutlined, {
|
|
41
44
|
onClick: api.destroy('string')
|
|
42
45
|
}));
|
|
43
46
|
api.open({
|
|
44
47
|
message: customNotification,
|
|
45
48
|
closeIcon: false,
|
|
46
|
-
|
|
49
|
+
duration: isDisplayed ? 0 : 2000,
|
|
47
50
|
style: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
borderLeft: '4px solid var(--color-green-success)',
|
|
51
|
+
padding: '8px 16px 8px 16px',
|
|
52
|
+
borderRadius: '4px',
|
|
53
|
+
borderLeft: "4px solid ".concat(borderColor),
|
|
52
54
|
boxShadow: '0px 2px 8px 0px rgba(0, 0, 0, 0.12)'
|
|
53
|
-
}
|
|
55
|
+
},
|
|
56
|
+
placement
|
|
54
57
|
});
|
|
55
58
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
59
|
+
|
|
60
|
+
// This is for displaying the notification on storybook
|
|
61
|
+
(0, _react.useEffect)(() => {
|
|
62
|
+
if (isDisplayed) {
|
|
63
|
+
openNotification();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return contextHolder;
|
|
63
67
|
}
|
|
64
68
|
Notification.propTypes = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
description: _propTypes.default.string.isRequired,
|
|
70
|
+
isDisplayed: _propTypes.default.bool,
|
|
71
|
+
placement: _propTypes.default.oneOf(['topLeft', 'topRight', 'bottomLeft', 'bottomRight']),
|
|
72
|
+
title: _propTypes.default.string.isRequired,
|
|
73
|
+
type: _propTypes.default.oneOf(['success', 'failure']).isRequired,
|
|
68
74
|
typographies: _propTypes.default.shape({
|
|
69
75
|
button: _propTypes.default.oneOf(_Typography.typographyOptions),
|
|
70
76
|
description: _propTypes.default.oneOf(_Typography.typographyOptions),
|
|
@@ -72,8 +78,8 @@ Notification.propTypes = {
|
|
|
72
78
|
})
|
|
73
79
|
};
|
|
74
80
|
Notification.defaultProps = {
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
isDisplayed: false,
|
|
82
|
+
placement: 'topRight',
|
|
77
83
|
typographies: {
|
|
78
84
|
button: 'type-button-500',
|
|
79
85
|
description: 'type-b3-400',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject; // NotificationStyles.js
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const StyledNotification = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n .anticon-close {\n cursor: pointer; \n margin: 0 0 0 8px;\n }\n"])));
|
|
12
|
+
var _default = StyledNotification;
|
|
13
|
+
exports.default = _default;
|
|
@@ -5,42 +5,47 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.CustomRadioGroup = void 0;
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _antd = require("antd");
|
|
12
|
-
var _Typography = _interopRequireWildcard(require("
|
|
12
|
+
var _Typography = _interopRequireWildcard(require("../oa-component-typography/Typography"));
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function
|
|
16
|
+
function CustomRadio(_ref) {
|
|
17
17
|
let {
|
|
18
18
|
disabled,
|
|
19
19
|
onChange,
|
|
20
20
|
size,
|
|
21
|
-
|
|
22
|
-
typography
|
|
21
|
+
label,
|
|
22
|
+
typography,
|
|
23
|
+
value
|
|
23
24
|
} = _ref;
|
|
24
25
|
return /*#__PURE__*/_react.default.createElement(_antd.Radio, {
|
|
25
26
|
disabled: disabled,
|
|
26
27
|
onChange: disabled ? null : onChange,
|
|
27
28
|
size: size,
|
|
28
|
-
type: "radio1"
|
|
29
|
+
type: "radio1",
|
|
30
|
+
value: value
|
|
29
31
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
30
32
|
typography: typography
|
|
31
|
-
},
|
|
33
|
+
}, label));
|
|
32
34
|
}
|
|
33
|
-
|
|
35
|
+
CustomRadio.propTypes = {
|
|
34
36
|
disabled: _propTypes.default.bool,
|
|
35
37
|
onChange: _propTypes.default.func.isRequired,
|
|
36
38
|
size: _propTypes.default.oneOf(['small', 'middle', 'large']),
|
|
37
|
-
|
|
38
|
-
typography: _propTypes.default.oneOf(_Typography.typographyOptions)
|
|
39
|
+
label: _propTypes.default.string.isRequired,
|
|
40
|
+
typography: _propTypes.default.oneOf(_Typography.typographyOptions),
|
|
41
|
+
value: _propTypes.default.number.isRequired
|
|
39
42
|
};
|
|
40
|
-
|
|
43
|
+
CustomRadio.defaultProps = {
|
|
41
44
|
disabled: false,
|
|
42
45
|
size: 'middle',
|
|
43
46
|
typography: 'type-b1-400'
|
|
44
47
|
};
|
|
45
|
-
var _default =
|
|
46
|
-
exports.default = _default;
|
|
48
|
+
var _default = CustomRadio;
|
|
49
|
+
exports.default = _default;
|
|
50
|
+
const CustomRadioGroup = _antd.Radio.Group;
|
|
51
|
+
exports.CustomRadioGroup = CustomRadioGroup;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
// SpacingScales.js
|
|
12
|
+
|
|
13
|
+
// Import the styled component
|
|
14
|
+
|
|
15
|
+
function SpacingScales(_ref) {
|
|
16
|
+
let {
|
|
17
|
+
type
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, {
|
|
20
|
+
type: type
|
|
21
|
+
}, ' `', type, "` on all sides");
|
|
22
|
+
}
|
|
23
|
+
SpacingScales.propTypes = {
|
|
24
|
+
type: _propTypes.default.oneOf(['spacing-4', 'spacing-8', 'spacing-12', 'spacing-16', 'spacing-24', 'spacing-32', 'spacing-40', 'spacing-48', 'spacing-56', 'spacing-64', 'spacing-72', 'spacing-80', 'spacing-96', 'spacing-108']).isRequired
|
|
25
|
+
};
|
|
26
|
+
var _default = SpacingScales;
|
|
27
|
+
exports.default = _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject; // SpacingScalesStyles.js
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const SpacingScalesContainer = _styledComponents.default.h1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: red;\n ", ""])), _ref => {
|
|
12
|
+
let {
|
|
13
|
+
type
|
|
14
|
+
} = _ref;
|
|
15
|
+
switch (type) {
|
|
16
|
+
case 'spacing-4':
|
|
17
|
+
return 'padding: 4px; margin: 0;';
|
|
18
|
+
case 'spacing-8':
|
|
19
|
+
return 'padding: 8px; margin: 0;';
|
|
20
|
+
case 'spacing-12':
|
|
21
|
+
return 'padding: 12px; margin: 0;';
|
|
22
|
+
case 'spacing-16':
|
|
23
|
+
return 'padding: 16px; margin: 0;';
|
|
24
|
+
case 'spacing-24':
|
|
25
|
+
return 'padding: 24px; margin: 0;';
|
|
26
|
+
case 'spacing-32':
|
|
27
|
+
return 'padding: 32px; margin: 0;';
|
|
28
|
+
case 'spacing-40':
|
|
29
|
+
return 'padding: 40px; margin: 0;';
|
|
30
|
+
case 'spacing-48':
|
|
31
|
+
return 'padding: 48px; margin: 0;';
|
|
32
|
+
case 'spacing-56':
|
|
33
|
+
return 'padding: 56px; margin: 0;';
|
|
34
|
+
case 'spacing-64':
|
|
35
|
+
return 'padding: 64px; margin: 0;';
|
|
36
|
+
case 'spacing-72':
|
|
37
|
+
return 'padding: 72px; margin: 0;';
|
|
38
|
+
case 'spacing-80':
|
|
39
|
+
return 'padding: 80px; margin: 0;';
|
|
40
|
+
case 'spacing-96':
|
|
41
|
+
return 'padding: 96px; margin: 0;';
|
|
42
|
+
case 'spacing-108':
|
|
43
|
+
return 'padding: 108px; margin: 0;';
|
|
44
|
+
default:
|
|
45
|
+
return 'padding: 0; margin: 0;';
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var _default = SpacingScalesContainer;
|
|
49
|
+
exports.default = _default;
|
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
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); }
|
|
16
16
|
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; }
|
|
17
17
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
18
|
-
function
|
|
18
|
+
function CustomTable(_ref) {
|
|
19
19
|
let {
|
|
20
20
|
columns,
|
|
21
21
|
dataSource,
|
|
@@ -30,7 +30,7 @@ function TableDesign(_ref) {
|
|
|
30
30
|
rowKey: rowKey
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
CustomTable.propTypes = {
|
|
34
34
|
columns: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
35
35
|
dataSource: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
36
36
|
rowKey: _propTypes.default.string.isRequired,
|
|
@@ -38,10 +38,10 @@ TableDesign.propTypes = {
|
|
|
38
38
|
// Define the shape of your object if needed
|
|
39
39
|
})])
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
CustomTable.defaultProps = {
|
|
42
42
|
dataSource: [],
|
|
43
43
|
columns: [],
|
|
44
44
|
pagination: false
|
|
45
45
|
};
|
|
46
|
-
var _default =
|
|
46
|
+
var _default = CustomTable;
|
|
47
47
|
exports.default = _default;
|
|
@@ -18,10 +18,10 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
18
18
|
const {
|
|
19
19
|
TabPane
|
|
20
20
|
} = _antd.Tabs;
|
|
21
|
-
function
|
|
21
|
+
function CustomTabs(_ref) {
|
|
22
22
|
let {
|
|
23
|
-
defaultActiveKey,
|
|
24
23
|
data,
|
|
24
|
+
defaultActiveKey,
|
|
25
25
|
disabled,
|
|
26
26
|
style,
|
|
27
27
|
tabPosition,
|
|
@@ -38,7 +38,7 @@ function TabsDesign(_ref) {
|
|
|
38
38
|
tab: item.label
|
|
39
39
|
}, item.body))));
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
CustomTabs.propTypes = {
|
|
42
42
|
data: _propTypes.default.shape({
|
|
43
43
|
tabs: _propTypes.default.arrayOf({
|
|
44
44
|
key: _propTypes.default.string.isRequired,
|
|
@@ -53,7 +53,7 @@ TabsDesign.propTypes = {
|
|
|
53
53
|
type: _propTypes.default.oneOf(['line', 'card', 'editable-card']),
|
|
54
54
|
style: _propTypes.default.objectOf(_propTypes.default.string)
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
CustomTabs.defaultProps = {
|
|
57
57
|
data: {},
|
|
58
58
|
defaultActiveKey: '1',
|
|
59
59
|
tabPosition: 'top',
|
|
@@ -61,5 +61,5 @@ TabsDesign.defaultProps = {
|
|
|
61
61
|
disabled: false,
|
|
62
62
|
style: {}
|
|
63
63
|
};
|
|
64
|
-
var _default =
|
|
64
|
+
var _default = CustomTabs;
|
|
65
65
|
exports.default = _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function TextArea(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
rows,
|
|
14
|
+
placeholder,
|
|
15
|
+
maxLength,
|
|
16
|
+
className
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_styles.default, {
|
|
19
|
+
rows: rows,
|
|
20
|
+
placeholder: placeholder,
|
|
21
|
+
maxLength: maxLength,
|
|
22
|
+
className: "custom-textarea ".concat(className)
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
TextArea.propTypes = {
|
|
26
|
+
rows: _propTypes.default.number,
|
|
27
|
+
placeholder: _propTypes.default.string,
|
|
28
|
+
maxLength: _propTypes.default.number,
|
|
29
|
+
className: _propTypes.default.string
|
|
30
|
+
};
|
|
31
|
+
TextArea.defaultProps = {
|
|
32
|
+
rows: 2,
|
|
33
|
+
placeholder: null,
|
|
34
|
+
maxLength: 100,
|
|
35
|
+
className: ''
|
|
36
|
+
};
|
|
37
|
+
var _default = TextArea;
|
|
38
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _antd = require("antd");
|
|
9
|
+
var _templateObject;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
const {
|
|
13
|
+
TextArea: AntdTextArea
|
|
14
|
+
} = _antd.Input;
|
|
15
|
+
const StyledTextArea = (0, _styledComponents.default)(AntdTextArea)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.custom-textarea {\n padding: 12px;\n resize: none;\n border-radius: 4px;\n max-height: 96px;\n }\n"])));
|
|
16
|
+
var _default = StyledTextArea;
|
|
17
|
+
exports.default = _default;
|
|
@@ -6,49 +6,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var
|
|
12
|
-
|
|
11
|
+
var _Typography = _interopRequireWildcard(require("../oa-component-typography/Typography"));
|
|
12
|
+
var _styles = require("./styles");
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
|
-
function
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
function CustomTimeline(_ref) {
|
|
16
17
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onClose,
|
|
21
|
-
open,
|
|
22
|
-
placement,
|
|
23
|
-
title,
|
|
24
|
-
width
|
|
18
|
+
stepsData,
|
|
19
|
+
currentStep,
|
|
20
|
+
typography
|
|
25
21
|
} = _ref;
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_styles.CustomSteps, {
|
|
23
|
+
progressDot: true,
|
|
24
|
+
current: currentStep,
|
|
25
|
+
direction: "horizontal"
|
|
26
|
+
}, stepsData.map(step => /*#__PURE__*/_react.default.createElement(_styles.CustomStep, {
|
|
27
|
+
key: step,
|
|
28
|
+
title: /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
29
|
+
typography: typography
|
|
30
|
+
}, step.title)
|
|
31
|
+
})));
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
title: _propTypes.default.string,
|
|
43
|
-
height: _propTypes.default.number.isRequired,
|
|
44
|
-
width: _propTypes.default.number.isRequired
|
|
33
|
+
CustomTimeline.propTypes = {
|
|
34
|
+
stepsData: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
35
|
+
title: _propTypes.default.string.isRequired
|
|
36
|
+
})).isRequired,
|
|
37
|
+
currentStep: _propTypes.default.number.isRequired,
|
|
38
|
+
typography: _propTypes.default.oneOf(_Typography.typographyOptions)
|
|
45
39
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onClose: null,
|
|
49
|
-
open: true,
|
|
50
|
-
placement: 'right',
|
|
51
|
-
title: ''
|
|
40
|
+
CustomTimeline.defaultProps = {
|
|
41
|
+
typography: 'type-b3-400'
|
|
52
42
|
};
|
|
53
|
-
var _default =
|
|
43
|
+
var _default = CustomTimeline;
|
|
54
44
|
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.CustomSteps = exports.CustomStep = void 0;
|
|
7
|
+
var _antd = require("antd");
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _templateObject;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
var _default = {};
|
|
13
|
+
exports.default = _default;
|
|
14
|
+
const CustomSteps = (0, _styledComponents.default)(_antd.Steps)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n\n .ant-steps-item-icon {\n width: 16px !important;\n height: 16px !important;\n margin-inline-start: 62px !important;\n }\n .ant-steps-item-tail {\n top: 6px !important;\n }\n .ant-steps-icon-dot {\n background: #00875A !important;\n }\n .ant-steps-item-tail::after {\n height: 2px !important;\n width: 100% !important;\n margin-inline-start: -8px !important;\n }\n .ant-steps-item-finish .ant-steps-item-tail::after {\n background: #00875A !important;\n }\n .ant-steps-item-process .ant-steps-item-tail::after {\n background-color: rgba(5, 5, 5, 0.06) !important;\n }\n .ant-steps-item-wait .ant-steps-icon-dot {\n background-color: rgb(240 240 240)!important;\n }\n .ant-steps-item-content {\n margin-top: 8px !important;\n }\n"])));
|
|
15
|
+
exports.CustomSteps = CustomSteps;
|
|
16
|
+
const CustomStep = _antd.Steps.Step;
|
|
17
|
+
exports.CustomStep = CustomStep;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
// Import the styles from the separate file
|
|
12
|
+
|
|
13
|
+
function CustomToggle(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
disabled,
|
|
16
|
+
onChange,
|
|
17
|
+
checkedLabel,
|
|
18
|
+
uncheckedLabel,
|
|
19
|
+
type,
|
|
20
|
+
size
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledSwitch, {
|
|
23
|
+
checkedChildren: checkedLabel,
|
|
24
|
+
unCheckedChildren: uncheckedLabel,
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
onChange: disabled ? null : onChange,
|
|
27
|
+
defaultChecked: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
CustomToggle.propTypes = {
|
|
31
|
+
checkedLabel: _propTypes.default.string,
|
|
32
|
+
disabled: _propTypes.default.bool,
|
|
33
|
+
onChange: _propTypes.default.func.isRequired,
|
|
34
|
+
uncheckedLabel: _propTypes.default.string,
|
|
35
|
+
size: _propTypes.default.oneOf(['large', 'small']).isRequired,
|
|
36
|
+
type: _propTypes.default.oneOf(['primary', 'secondary']).isRequired
|
|
37
|
+
};
|
|
38
|
+
CustomToggle.defaultProps = {
|
|
39
|
+
checkedLabel: null,
|
|
40
|
+
uncheckedLabel: null,
|
|
41
|
+
disabled: false
|
|
42
|
+
};
|
|
43
|
+
var _default = CustomToggle;
|
|
44
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StyledSwitch = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _antd = require("antd");
|
|
9
|
+
var _templateObject; // ToggleStyles.js
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
var _default = {};
|
|
13
|
+
exports.default = _default;
|
|
14
|
+
const StyledSwitch = (0, _styledComponents.default)(_antd.Switch)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n // Customize the track color based on the type prop\n background-color: ", "; // Secondary color\n \n display: flex;\n\n // Customize the handle (knob) color based on the type prop\n .ant-switch-handle::before {\n /* height: 100%; */\n }\n\n // Customize the track size based on the size prop\n height: ", ";\n width: ", "\n // Customize other styles as needed\n // For example, padding, border-radius, etc.\n // Example:\n // padding: 2px;\n // border-radius: 4px;\n }\n"])), props => props.type === 'primary' ? '#00875A' // Primary color
|
|
15
|
+
: '#FF5733', props => props.size === 'large' ? '32px' : '20px', props => props.checkedLabel === null && props.uncheckedLabel === null && (props.size === 'large' ? '56px' : '35px'));
|
|
16
|
+
exports.StyledSwitch = StyledSwitch;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.typographyOptions = exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _ColorUsage = require("../oa-component-colorUsage/ColorUsage");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
const typographyOptions = ['type-d1-500', 'type-d2-500', 'type-h1-500', 'type-h2-500', 'type-h3-500', 'type-t1-500', 'type-t2-700', 'type-b1-400', 'type-b2-400', 'type-b3-400', 'type-button-500', 'type-sl1-700'];
|
|
13
|
+
exports.typographyOptions = typographyOptions;
|
|
14
|
+
function Typography(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
color,
|
|
18
|
+
typography
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledTypography, {
|
|
21
|
+
color: color,
|
|
22
|
+
className: "".concat(typography)
|
|
23
|
+
}, children);
|
|
24
|
+
}
|
|
25
|
+
Typography.propTypes = {
|
|
26
|
+
color: _propTypes.default.oneOf(_ColorUsage.colorOptions) || null,
|
|
27
|
+
children: _propTypes.default.node.isRequired,
|
|
28
|
+
typography: _propTypes.default.oneOf(typographyOptions).isRequired
|
|
29
|
+
};
|
|
30
|
+
Typography.defaultProps = {
|
|
31
|
+
color: null
|
|
32
|
+
};
|
|
33
|
+
var _default = Typography;
|
|
34
|
+
exports.default = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StyledTypography = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const StyledTypography = _styledComponents.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // If a color is provided then that is used, otherwise the color is inherited from parent.\n color: ", ";\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"])), props => props.color !== null ? "var(--color-".concat(props.color, ")") : 'inherit');
|
|
14
|
+
exports.StyledTypography = StyledTypography;
|