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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
```jsx
|
|
2
|
+
const onSubmit = ({ mobileNum, email }) => {
|
|
3
|
+
// Use the mobile number and email obtained from the form over here.
|
|
4
|
+
console.log(`Phone Number is '${mobileNum}'`);
|
|
5
|
+
console.log(`Email ID is '${email}'`);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const sendPaymentProps = {
|
|
9
|
+
heading: 'SEND PAYMENT LINK',
|
|
10
|
+
options:
|
|
11
|
+
[
|
|
12
|
+
{
|
|
13
|
+
label: 'Customer',
|
|
14
|
+
value: 'customer',
|
|
15
|
+
data: {
|
|
16
|
+
mobileNum: 9898989898,
|
|
17
|
+
email: 'abc@gmail.com',
|
|
18
|
+
}, // prefilled data of customer
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'Alternate Contact',
|
|
22
|
+
value: 'alternate_contact',
|
|
23
|
+
data: {
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
<SendPaymentLink
|
|
30
|
+
heading={sendPaymentProps.heading}
|
|
31
|
+
options={sendPaymentProps.options}
|
|
32
|
+
onSubmit={onSubmit}
|
|
33
|
+
/>
|
|
34
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RadioGrid = exports.RadioContainer = exports.ButtonContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
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 RadioContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 20px;\n margin-bottom: 20px;\n"])));
|
|
12
|
+
|
|
13
|
+
// This helps make the radio buttons aligned in uniform columns
|
|
14
|
+
exports.RadioContainer = RadioContainer;
|
|
15
|
+
const RadioGrid = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n"])));
|
|
16
|
+
exports.RadioGrid = RadioGrid;
|
|
17
|
+
const ButtonContainer = _styledComponents.default.section(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n gap: 20px;\n"])));
|
|
18
|
+
exports.ButtonContainer = ButtonContainer;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
// Import the styles
|
|
13
|
+
|
|
14
|
+
function StageTimeline(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
stagesArr
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StagesList, null, stagesArr.map(stage => {
|
|
19
|
+
let pickedIcon = /*#__PURE__*/_react.default.createElement(_styles.StageDefault, null);
|
|
20
|
+
let className = '';
|
|
21
|
+
if (stage.isComplete) {
|
|
22
|
+
className = 'success';
|
|
23
|
+
pickedIcon = /*#__PURE__*/_react.default.createElement(_styles.StageSuccess, null);
|
|
24
|
+
} else if (stage.isActive) {
|
|
25
|
+
className = 'inprogress';
|
|
26
|
+
pickedIcon = /*#__PURE__*/_react.default.createElement(_styles.StageInprocess, null);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Use a unique and stable key based on the stage data
|
|
30
|
+
const stageKey = "".concat(stage.stageName, "-").concat(stage.isComplete, "-").concat(stage.isActive);
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
32
|
+
key: stageKey
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.StageInfo, {
|
|
34
|
+
href: "",
|
|
35
|
+
className: className
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.StageIcon, null, pickedIcon), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
37
|
+
typography: "type-b2-400"
|
|
38
|
+
}, stage.stageName)));
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
StageTimeline.propTypes = {
|
|
42
|
+
stagesArr: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
43
|
+
stageName: _propTypes.default.string.isRequired,
|
|
44
|
+
isComplete: _propTypes.default.bool.isRequired,
|
|
45
|
+
isActive: _propTypes.default.bool.isRequired
|
|
46
|
+
})).isRequired
|
|
47
|
+
};
|
|
48
|
+
var _default = StageTimeline;
|
|
49
|
+
exports.default = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StagesList = exports.StageSuccess = exports.StageInprocess = exports.StageInfo = exports.StageIcon = exports.StageDefault = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6; // LeftPanelTabStyles.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 StagesList = _styledComponents.default.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n list-style-type: none;\n"])));
|
|
12
|
+
exports.StagesList = StagesList;
|
|
13
|
+
const StageInfo = _styledComponents.default.a(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #BFBFBF;\n display: flex;\n align-items: center;\n padding: 12px 24px 12px 24px;\n text-decoration: none;\n border: 1px solid #BFBFBF;\n border-radius: 28px;\n\n &.inprogress {\n display: flex;\n align-items: center;\n color: #014FC5;\n background: #DEF1FB;\n border-color: #DEF1FB;\n }\n\n &.success {\n background: #fff;\n }\n"])));
|
|
14
|
+
exports.StageInfo = StageInfo;
|
|
15
|
+
const StageIcon = _styledComponents.default.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n margin: 0 10px 0 0;\n display: flex;\n"])));
|
|
16
|
+
exports.StageIcon = StageIcon;
|
|
17
|
+
const StageInprocess = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: #014FC5;\n border-radius: 50px;\n"])));
|
|
18
|
+
exports.StageInprocess = StageInprocess;
|
|
19
|
+
const StageDefault = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: #BFBFBF;\n border-radius: 50px;\n"])));
|
|
20
|
+
exports.StageDefault = StageDefault;
|
|
21
|
+
const StageSuccess = _styledComponents.default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: green;\n border-radius: 50px;\n"])));
|
|
22
|
+
exports.StageSuccess = StageSuccess;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _Address = _interopRequireDefault(require("../oa-widget-address/Address"));
|
|
13
|
+
var _CustomTimeline = _interopRequireDefault(require("../../components/oa-component-timeline/CustomTimeline"));
|
|
14
|
+
var _Typography = _interopRequireWildcard(require("../../components/oa-component-typography/Typography"));
|
|
15
|
+
var _templateObject;
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
20
|
+
const AddressesContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n gap: 24px;\n \n margin: 24px 0 36px;\n"])));
|
|
21
|
+
function TrackShipment(_ref) {
|
|
22
|
+
let {
|
|
23
|
+
awbNumber,
|
|
24
|
+
currentStep,
|
|
25
|
+
stepsData,
|
|
26
|
+
fromAddressHeading,
|
|
27
|
+
fromAddressObject,
|
|
28
|
+
title,
|
|
29
|
+
toAddressHeading,
|
|
30
|
+
toAddressObject,
|
|
31
|
+
typographies
|
|
32
|
+
} = _ref;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
34
|
+
typography: typographies.title
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, title)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
36
|
+
typography: typographies.awb
|
|
37
|
+
}, "AWB Number:", ' ', awbNumber), /*#__PURE__*/_react.default.createElement(AddressesContainer, null, /*#__PURE__*/_react.default.createElement(_Address.default, {
|
|
38
|
+
addressObject: fromAddressObject,
|
|
39
|
+
heading: fromAddressHeading,
|
|
40
|
+
typography: typographies.awb
|
|
41
|
+
}), /*#__PURE__*/_react.default.createElement(_Address.default, {
|
|
42
|
+
addressObject: toAddressObject,
|
|
43
|
+
heading: toAddressHeading,
|
|
44
|
+
typography: typographies.awb
|
|
45
|
+
})), /*#__PURE__*/_react.default.createElement(_CustomTimeline.default, {
|
|
46
|
+
currentStep: currentStep,
|
|
47
|
+
stepsData: stepsData,
|
|
48
|
+
typography: typographies.steps
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
TrackShipment.propTypes = {
|
|
52
|
+
awbNumber: _propTypes.default.string.isRequired,
|
|
53
|
+
currentStep: _propTypes.default.number.isRequired,
|
|
54
|
+
stepsData: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
55
|
+
title: _propTypes.default.string.isRequired
|
|
56
|
+
})).isRequired,
|
|
57
|
+
fromAddressHeading: _propTypes.default.string.isRequired,
|
|
58
|
+
fromAddressObject: _propTypes.default.shape({
|
|
59
|
+
addressLine1: _propTypes.default.string.isRequired,
|
|
60
|
+
addressLine2: _propTypes.default.string,
|
|
61
|
+
addressLine3: _propTypes.default.string,
|
|
62
|
+
landmark: _propTypes.default.string.isRequired,
|
|
63
|
+
pincode: (_propTypes.default.string || _propTypes.default.number).isRequired,
|
|
64
|
+
city: _propTypes.default.string.isRequired,
|
|
65
|
+
state: _propTypes.default.string.isRequired,
|
|
66
|
+
type: _propTypes.default.oneOf(['permanent', 'temporary']),
|
|
67
|
+
additional_info: _propTypes.default.shape({
|
|
68
|
+
lat: _propTypes.default.string,
|
|
69
|
+
long: _propTypes.default.string
|
|
70
|
+
})
|
|
71
|
+
}).isRequired,
|
|
72
|
+
title: _propTypes.default.string.isRequired,
|
|
73
|
+
toAddressHeading: _propTypes.default.string.isRequired,
|
|
74
|
+
toAddressObject: _propTypes.default.shape({
|
|
75
|
+
addressLine1: _propTypes.default.string.isRequired,
|
|
76
|
+
addressLine2: _propTypes.default.string,
|
|
77
|
+
addressLine3: _propTypes.default.string,
|
|
78
|
+
landmark: _propTypes.default.string.isRequired,
|
|
79
|
+
pincode: (_propTypes.default.string || _propTypes.default.number).isRequired,
|
|
80
|
+
city: _propTypes.default.string.isRequired,
|
|
81
|
+
state: _propTypes.default.string.isRequired,
|
|
82
|
+
type: _propTypes.default.oneOf(['permanent', 'temporary']),
|
|
83
|
+
additional_info: _propTypes.default.shape({
|
|
84
|
+
lat: _propTypes.default.string,
|
|
85
|
+
long: _propTypes.default.string
|
|
86
|
+
})
|
|
87
|
+
}).isRequired,
|
|
88
|
+
typographies: _propTypes.default.shape({
|
|
89
|
+
awb: _propTypes.default.oneOf(_Typography.typographyOptions),
|
|
90
|
+
steps: _propTypes.default.oneOf(_Typography.typographyOptions),
|
|
91
|
+
title: _propTypes.default.oneOf(_Typography.typographyOptions)
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
TrackShipment.defaultProps = {
|
|
95
|
+
typographies: {
|
|
96
|
+
awb: 'type-b2-400',
|
|
97
|
+
steps: 'type-b3-400',
|
|
98
|
+
title: 'type-t1-500'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
var _default = TrackShipment;
|
|
102
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = exports.colorOptions = exports.ColorVariables = void 0;
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
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
|
-
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
const colorOptions = ['blue-CTA', 'darkblue-background', 'lightblue-background', 'blue-hover', 'green-success', 'lightgreen-success', 'yellow-warning', 'lightyellow-warning', 'red-error', 'red-hover', 'lightred-error', 'primarygrey-text', 'secondarygrey-text', 'grey1-placeholder', 'grey2-disabled', 'grey3-disabled_divider', 'grey4-background', 'white-background', 'grey5-overlay', 'sunyellow-tags'];
|
|
18
|
-
|
|
19
|
-
// TODO: Figure out a way to make this work with storybook.
|
|
20
|
-
// Can be used to wrap the entire application, to make these styles available to every component
|
|
21
|
-
exports.colorOptions = colorOptions;
|
|
22
|
-
const ColorVariables = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --color-blue-CTA: #014FC5;\n --color-blue-hover: #82A9E2;\n --color-darkblue-background: #003264;\n --color-lightblue-background: #DEF1FB;\n --color-green-success: #00875A;\n --color-lightgreen-success: #CCE7DE;\n --color-yellow-warning: #FF991F;\n --color-lightyellow-warning: #FFEBD2;\n --color-red-error: #DE350B;\n --color-red-hover: #E87254;\n --color-lightred-error: #F8D7CE;\n --color-primarygrey-text: #212121;\n --color-secondarygrey-text: #717171;\n --color-grey1-placeholder: #959595;\n --color-grey2-disabled: #BFBFBF;\n --color-grey3-disabled_divider: #E0E0E0;\n --color-grey4-background: #F6F6F6;\n --color-white-background: #FFFFFF;\n --color-grey5-overlay: rgba(0, 0, 0, 0.7);\n --color-sunyellow-tags: #F5C82D;\n"])));
|
|
23
|
-
exports.ColorVariables = ColorVariables;
|
|
24
|
-
function ColorUsage(_ref) {
|
|
25
|
-
let {
|
|
26
|
-
color
|
|
27
|
-
} = _ref;
|
|
28
|
-
const ColorDisplay = _styledComponents.default.h1(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: var(--color-", ");\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n width: 450px;\n "])), color);
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement(ColorDisplay, null, "--color-".concat(color));
|
|
30
|
-
}
|
|
31
|
-
ColorUsage.propTypes = {
|
|
32
|
-
color: _propTypes.default.oneOf(colorOptions).isRequired
|
|
33
|
-
};
|
|
34
|
-
var _default = ColorUsage;
|
|
35
|
-
exports.default = _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
-
require("core-js/modules/es.string.replace.js");
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
-
var _templateObject;
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
function CornerRadius(_ref) {
|
|
16
|
-
let {
|
|
17
|
-
type
|
|
18
|
-
} = _ref;
|
|
19
|
-
const getBorderSize = () => {
|
|
20
|
-
switch (type.replace('border-radius-', '')) {
|
|
21
|
-
case 'full':
|
|
22
|
-
return 9999;
|
|
23
|
-
case 'xlarge':
|
|
24
|
-
return 16;
|
|
25
|
-
case 'large':
|
|
26
|
-
return 12;
|
|
27
|
-
case 'medium':
|
|
28
|
-
return 8;
|
|
29
|
-
case 'small':
|
|
30
|
-
return 4;
|
|
31
|
-
case 'xsmall':
|
|
32
|
-
return 2;
|
|
33
|
-
case 'none':
|
|
34
|
-
return 0;
|
|
35
|
-
default:
|
|
36
|
-
return 0;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const RadiusDisplayComponent = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n width: 200px;\n background-color: blue;\n border-radius: ", "px\n "])), getBorderSize());
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(RadiusDisplayComponent, null, type);
|
|
41
|
-
}
|
|
42
|
-
CornerRadius.propTypes = {
|
|
43
|
-
type: _propTypes.default.oneOf(['border-radius-xlarge', 'border-radius-large', 'border-radius-medium', 'border-radius-small', 'border-radius-xsmall', 'border-radius-none', 'border-radius-full']).isRequired
|
|
44
|
-
};
|
|
45
|
-
var _default = CornerRadius;
|
|
46
|
-
exports.default = _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
var _templateObject, _templateObject2;
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
function KeyValueDataView(_ref) {
|
|
15
|
-
let {
|
|
16
|
-
data,
|
|
17
|
-
footerHeading,
|
|
18
|
-
heading,
|
|
19
|
-
viewMore
|
|
20
|
-
} = _ref;
|
|
21
|
-
const DetailsSection = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0 72px 0 0;\n\n h6 {\n color: #6F7C87;\n text-transform: uppercase;\n padding: 0 0 8px;\n font-size: 10px;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 10px;\n margin: 0; \n }\n\n h5 {\n color: #6F7C87;\n padding: 0 0 8px;\n font-size: 12px;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 10px;\n margin: 0;\n }\n "])));
|
|
22
|
-
const CustomerDetails = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n \n display: flex;\n\n span {\n width: 100%;\n color: #717171;\n font-weight: 400;\n }\n\n b {\n margin: 0 8px 4px 0;\n min-width: 140px;\n color: #212121;\n font-weight: 400;\n }\n "])));
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(DetailsSection, null, heading && /*#__PURE__*/_react.default.createElement("h6", null, heading), data && Object.entries(data).map(_ref2 => {
|
|
24
|
-
let [key, value] = _ref2;
|
|
25
|
-
return (
|
|
26
|
-
/*#__PURE__*/
|
|
27
|
-
// Fragment with a unique allows mapping of the object to components.
|
|
28
|
-
_react.default.createElement(_react.default.Fragment, {
|
|
29
|
-
key: key
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(CustomerDetails, null, /*#__PURE__*/_react.default.createElement("b", null, key, ":"), /*#__PURE__*/_react.default.createElement("span", null, value)))
|
|
31
|
-
);
|
|
32
|
-
}), footerHeading && /*#__PURE__*/_react.default.createElement("h5", null, footerHeading), viewMore);
|
|
33
|
-
}
|
|
34
|
-
KeyValueDataView.propTypes = {
|
|
35
|
-
data: _propTypes.default.objectOf(_propTypes.default.string),
|
|
36
|
-
heading: _propTypes.default.string,
|
|
37
|
-
footerHeading: _propTypes.default.string,
|
|
38
|
-
// This is so that we can pass a react element as a prop.
|
|
39
|
-
viewMore: _propTypes.default.node
|
|
40
|
-
};
|
|
41
|
-
KeyValueDataView.defaultProps = {
|
|
42
|
-
data: {},
|
|
43
|
-
heading: '',
|
|
44
|
-
footerHeading: '',
|
|
45
|
-
viewMore: null
|
|
46
|
-
};
|
|
47
|
-
var _default = KeyValueDataView;
|
|
48
|
-
exports.default = _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
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 _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
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 StageInfo = _styledComponents.default.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: #BFBFBF;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n width: 220px;\n align-items: center;\n padding: 12px 0 12px 34px;\n text-decoration: none;\n /* Add additional styles for the \"inprogress\" class */\n &.inprogress {\n color: #014FC5;\n font-family: Roboto;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px; \n font-weight: 500;\n background: #DEF1FB;\n border-radius: 28px;\n display: flex;\n align-items: center;\n }\n &.success {\n background: #fff;\n color: #0282F0;\n }\n"])));
|
|
13
|
-
const StageIcon = _styledComponents.default.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n margin: 0 10px 0 0;\n display: flex;\n"])));
|
|
14
|
-
const StageInprocess = _styledComponents.default.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: #014FC5;\n border-radius: 50px;\n"])));
|
|
15
|
-
const StageDefault = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: #BFBFBF;\n border-radius: 50px;\n"])));
|
|
16
|
-
const StageSuccess = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: green;\n border-radius: 50px;\n"])));
|
|
17
|
-
function LeftPannelTab() {
|
|
18
|
-
const isActive = stage => {
|
|
19
|
-
if (stage === 'first') return true;
|
|
20
|
-
return false;
|
|
21
|
-
};
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(StageInfo, {
|
|
23
|
-
href: "",
|
|
24
|
-
className: isActive('first') ? 'inprogress' : ''
|
|
25
|
-
}, /*#__PURE__*/_react.default.createElement(StageIcon, null, /*#__PURE__*/_react.default.createElement(StageInprocess, null)), "Define Plan Parameters")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(StageInfo, {
|
|
26
|
-
href: "",
|
|
27
|
-
className: isActive('second') ? 'inprogress' : ''
|
|
28
|
-
}, /*#__PURE__*/_react.default.createElement(StageIcon, null, /*#__PURE__*/_react.default.createElement(StageDefault, null)), "Select services & products")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(StageInfo, {
|
|
29
|
-
href: "",
|
|
30
|
-
className: isActive('third') ? 'inprogress' : ''
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement(StageIcon, null, /*#__PURE__*/_react.default.createElement(StageSuccess, null)), "Select services & products")));
|
|
32
|
-
}
|
|
33
|
-
var _default = LeftPannelTab;
|
|
34
|
-
exports.default = _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/es.symbol.description.js");
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _styles = require("./styles");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
function SpacingScales(_ref) {
|
|
18
|
-
let {
|
|
19
|
-
type
|
|
20
|
-
} = _ref;
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement("h1", {
|
|
22
|
-
style: _objectSpread({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
alignItems: 'center',
|
|
26
|
-
backgroundColor: 'red'
|
|
27
|
-
}, _styles.spacingScalesStyle[".".concat(type)])
|
|
28
|
-
}, ' `', type, "` on all sides");
|
|
29
|
-
}
|
|
30
|
-
SpacingScales.propTypes = {
|
|
31
|
-
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
|
|
32
|
-
};
|
|
33
|
-
var _default = SpacingScales;
|
|
34
|
-
exports.default = _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _antd = require("antd");
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
-
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 Toggle(_ref) {
|
|
16
|
-
let {
|
|
17
|
-
disabled,
|
|
18
|
-
onChange,
|
|
19
|
-
text,
|
|
20
|
-
type,
|
|
21
|
-
className
|
|
22
|
-
} = _ref;
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
24
|
-
theme: {
|
|
25
|
-
components: {
|
|
26
|
-
Switch: {
|
|
27
|
-
handleSize: 28,
|
|
28
|
-
trackHeight: 32,
|
|
29
|
-
trackMinWidth: 56,
|
|
30
|
-
colorPrimary: '#00875A',
|
|
31
|
-
colorPrimaryHover: '#717171'
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Switch, {
|
|
36
|
-
className: className,
|
|
37
|
-
disabled: disabled,
|
|
38
|
-
onChange: disabled ? null : onChange,
|
|
39
|
-
defaultChecked: true
|
|
40
|
-
})), /*#__PURE__*/_react.default.createElement(_antd.Switch, {
|
|
41
|
-
className: className,
|
|
42
|
-
disabled: disabled,
|
|
43
|
-
onChange: disabled ? null : onChange,
|
|
44
|
-
defaultChecked: true
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
Toggle.propTypes = {
|
|
48
|
-
className: _propTypes.default.string,
|
|
49
|
-
disabled: _propTypes.default.bool,
|
|
50
|
-
onChange: _propTypes.default.func.isRequired,
|
|
51
|
-
text: _propTypes.default.string.isRequired,
|
|
52
|
-
type: _propTypes.default.oneOf(['primary-toggle', 'success-toggle']).isRequired
|
|
53
|
-
};
|
|
54
|
-
Toggle.defaultProps = {
|
|
55
|
-
className: '',
|
|
56
|
-
disabled: false
|
|
57
|
-
// typography: 'type-d1-500',
|
|
58
|
-
};
|
|
59
|
-
var _default = Toggle;
|
|
60
|
-
exports.default = _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
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 _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _ColorUsage = require("./ColorUsage");
|
|
11
|
-
var _templateObject;
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
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'];
|
|
15
|
-
exports.typographyOptions = typographyOptions;
|
|
16
|
-
const TypeComponent = _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');
|
|
17
|
-
function Typography(_ref) {
|
|
18
|
-
let {
|
|
19
|
-
children,
|
|
20
|
-
color,
|
|
21
|
-
typography
|
|
22
|
-
} = _ref;
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(TypeComponent, {
|
|
24
|
-
color: color,
|
|
25
|
-
className: "".concat(typography)
|
|
26
|
-
}, children);
|
|
27
|
-
}
|
|
28
|
-
Typography.propTypes = {
|
|
29
|
-
color: _propTypes.default.oneOf(_ColorUsage.colorOptions) || null,
|
|
30
|
-
children: _propTypes.default.node.isRequired,
|
|
31
|
-
typography: _propTypes.default.oneOf(typographyOptions).isRequired
|
|
32
|
-
};
|
|
33
|
-
Typography.defaultProps = {
|
|
34
|
-
color: null
|
|
35
|
-
};
|
|
36
|
-
var _default = Typography;
|
|
37
|
-
exports.default = _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.weak-map.js");
|
|
4
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
const getSizeStyles = size => {
|
|
15
|
-
switch (size) {
|
|
16
|
-
case 'small':
|
|
17
|
-
{
|
|
18
|
-
return (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-width: 80px;\n padding: 10px 16px;\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n "])));
|
|
19
|
-
}
|
|
20
|
-
case 'medium':
|
|
21
|
-
{
|
|
22
|
-
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 100px;\n padding: 10px 16px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px; \n "])));
|
|
23
|
-
}
|
|
24
|
-
case 'large':
|
|
25
|
-
{
|
|
26
|
-
return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 136px;\n padding: 10px 24px;\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n "])));
|
|
27
|
-
}
|
|
28
|
-
default:
|
|
29
|
-
{
|
|
30
|
-
return (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-width: 100px;\n padding: 10px 16px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px; \n "])));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const StyledButton = _styledComponents.default.button(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: 4px;\n cursor: pointer;\n\n ", "\n\n .text-container {\n display: flex;\n align-items: center;\n justify-content: center;\n \n }\n\n .anticon-search {\n margin: 0 8px 0 0;\n }\n"])), props => getSizeStyles(props.size));
|
|
35
|
-
const ColoredStyledButton = (0, _styledComponents.default)(StyledButton)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n &.primary {\n background: var(--color-blue-CTA);\n border: 1px solid var(--color-blue-CTA);\n color: var(--color-white-background);\n }\n &.primary:hover {\n background: var(--color-blue-hover);\n }\n\n &.primary-disabled {\n background: var(--color-grey2-disabled);\n cursor: not-allowed;\n color: var(--color-white-background);\n }\n\n &.secondary {\n background: var(--color-white-background);\n border: 1px solid var(--color-blue-CTA);\n color: var(--color-blue-CTA);\n }\n &.secondary:hover {\n border: 1px solid var(--color-blue-hover);\n color: var(--color-blue-hover);\n }\n\n &.secondary-disabled {\n background: var(--color-white-background);\n border: 1px solid var(--color-grey2-disabled);\n color: var(--color-grey2-disabled);\n cursor: not-allowed;\n }\n\n &.text-only {\n border: none;\n background: var(--color-white-background);\n color: var(--color-blue-CTA);\n }\n &.text-only:hover {\n color: var(--color-blue-hover);\n }\n\n &.text-only-disabled {\n border: none;\n background: var(--color-white-background);\n color: var(--color-grey2-disabled);\n cursor: not-allowed;\n }\n \n &.danger-primary {\n background: var(--color-red-error);\n color: var(--color-white-background);\n border: 1px solid var(--color-red-error);\n }\n &.danger-primary:hover {\n background: var(--color-red-hover);\n color: var(--color-white-background);\n border: 1px solid var(--color-red-hover);\n }\n\n &.danger-secondary {\n color: var(--color-red-error);\n border: 1px solid var(--color-red-error);\n background: var(--color-white-background);\n }\n &.danger-secondary:hover {\n color: var(--color-red-hover);\n border: 1px solid var(--color-red-hover);\n background: var(--color-white-background);\n }\n\n &.danger-text-only {\n border: none;\n color: var(--color-red-error);\n background: var(--color-white-background);\n }\n &.danger-text-only:hover {\n border: none;\n color: var(--color-red-hover);\n background: var(--color-white-background);\n }\n"])));
|
|
36
|
-
var _default = ColoredStyledButton;
|
|
37
|
-
exports.default = _default;
|