oa-componentbook 0.18.99 → 0.18.100
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.
|
@@ -72,7 +72,7 @@ function MembershipDetailCard(_ref) {
|
|
|
72
72
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
73
73
|
color: "primary-background",
|
|
74
74
|
icon: _ArrowForwardIos.default
|
|
75
|
-
}))), alert.length && alert.map((item, i) => {
|
|
75
|
+
}))), alert.length > 0 && alert.map((item, i) => {
|
|
76
76
|
var _item$description, _item$description2, _item$description3, _item$description4;
|
|
77
77
|
return ((item === null || item === void 0 ? void 0 : item.subHeading) !== '' || (item === null || item === void 0 ? void 0 : item.heading) !== '' || (item === null || item === void 0 || (_item$description = item.description) === null || _item$description === void 0 ? void 0 : _item$description.text) !== undefined) && /*#__PURE__*/_react.default.createElement("div", {
|
|
78
78
|
className: item !== null && item !== void 0 && (_item$description2 = item.description) !== null && _item$description2 !== void 0 && _item$description2.text && (item === null || item === void 0 || (_item$description3 = item.description) === null || _item$description3 === void 0 ? void 0 : _item$description3.text) !== '' ? "toolTipInfo ".concat(item.type) : 'toolTipInfo flexChangeBody'
|
|
@@ -82,17 +82,22 @@ function MembershipDetailCard(_ref) {
|
|
|
82
82
|
isDisplayed: true
|
|
83
83
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
84
84
|
color: item.type,
|
|
85
|
-
icon: _InfoOutlined.default
|
|
86
|
-
|
|
85
|
+
icon: _InfoOutlined.default,
|
|
86
|
+
size: 24
|
|
87
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
className: "flexGap"
|
|
89
|
+
}, (item === null || item === void 0 ? void 0 : item.subHeading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h3", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
87
90
|
color: "secondary-content",
|
|
88
91
|
className: "type-sl1-700"
|
|
89
|
-
}, item === null || item === void 0 ? void 0 : item.subHeading)), (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
92
|
+
}, item === null || item === void 0 ? void 0 : item.subHeading))), (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
90
93
|
color: "primary-content",
|
|
91
94
|
className: "type-t2-700"
|
|
92
|
-
}, item === null || item === void 0 ? void 0 : item.heading)), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
95
|
+
}, item === null || item === void 0 ? void 0 : item.heading))), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
93
96
|
color: "primary-content",
|
|
94
97
|
className: "type-b2-400"
|
|
95
|
-
}, item.description.text)))), item.actions && /*#__PURE__*/_react.default.createElement("div",
|
|
98
|
+
}, item.description.text))))), item.actions && /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
className: "viewStatus"
|
|
100
|
+
}, item.actions.map((action, index) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
96
101
|
key: action.label,
|
|
97
102
|
label: action.label,
|
|
98
103
|
type: action.type,
|
|
@@ -8,5 +8,5 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.primaryInfo svg{\n cursor: pointer;\n}\np,h2{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n border: 1px solid var(--color-divider);\n margin: 0 0 24px;\n @media only screen and (max-width: 600px) {\n gap: 16px;\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n }\n .primaryInfo img{\n width: 24px;\n }\n .toolTipInfo .text-container svg {\n
|
|
11
|
+
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.flexGap div{\n padding: 0 0 8px;\n}\n.viewStatus button{\n padding: 16px 0 0;\n}\n.flexGap div:last-child{\n padding: 0;\n}\n.primaryInfo svg{\n cursor: pointer;\n}\np,h2,h3{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n border: 1px solid var(--color-divider);\n margin: 0 0 24px;\n @media only screen and (max-width: 600px) {\n gap: 16px;\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n }\n .primaryInfo img{\n width: 24px;\n }\n .toolTipInfo .text-container svg {\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n background: var(--color-background-positive);\n padding: 12px;\n border-radius: 8px;\n flex-direction: column;\n justify-content: space-between;\n }\n .flexChangeBody{\n flex-direction: row;\n align-items: center;\n }\n\n .toolTipInfo .toolTip + div{\n display: flex;\n justify-content: end;\n }\n .error{\n background: var(--color-background-negative);\n }\n .error .toolTip svg{\n color: var(--color-negative);\n }\n .warning{\n background: var(--color-background-warning);\n }\n .warning .toolTip svg{\n color: var(--color-warning);\n }\n .success{\n background: var(--color-background-positive);\n }\n\n .success .toolTip svg{\n color: var(--color-positive);\n }\n .toolTip{\n display: flex;\n gap: 8px;\n }\n .cardHead{\n display: flex;\n justify-content: space-between;\n gap: 32px;\n flex-direction: column;\n }\n .imgBg{\n border-radius: 8px;\n background: #DEF1FB;\n width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .ant-modal-footer{\n display: none;\n }\n .toolTip svg{\n margin: 2px 0 0;\n }\n @media only screen and (max-width: 600px) {\n .toolTipInfo {\n flex-direction: column;\n gap: 0;\n align-items: unset;\n }\n .cardHead h2 > span{\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n }\n"])));
|
|
12
12
|
const CardBody = exports.CardBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\ndisplay: flex;\nflex-direction: column;\ngap: 32px;\n\n"])));
|
|
@@ -36,9 +36,11 @@ function MembershipCard(_ref) {
|
|
|
36
36
|
footer
|
|
37
37
|
} = card;
|
|
38
38
|
const [showModal, setShowModal] = (0, _react.useState)(false);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
|
|
40
|
+
// const toggleModal = () => {
|
|
41
|
+
// setShowModal(!showModal);
|
|
42
|
+
// };
|
|
43
|
+
|
|
42
44
|
const itemsToShow = (body === null || body === void 0 || (_body$itemsList = body.itemsList) === null || _body$itemsList === void 0 ? void 0 : _body$itemsList.slice(0, 2)) || [];
|
|
43
45
|
const remainingItems = (body === null || body === void 0 || (_body$itemsList2 = body.itemsList) === null || _body$itemsList2 === void 0 ? void 0 : _body$itemsList2.slice(2)) || [];
|
|
44
46
|
const {
|
|
@@ -76,14 +78,8 @@ function MembershipCard(_ref) {
|
|
|
76
78
|
className: "type-b1-400",
|
|
77
79
|
color: "primary-content"
|
|
78
80
|
}, itemsToShow.join(', '), remainingItems.length > 0 && /*#__PURE__*/_react.default.createElement("span", {
|
|
79
|
-
onClick: toggleModal,
|
|
80
|
-
onKeyDown: toggleModal,
|
|
81
81
|
role: "button",
|
|
82
|
-
tabIndex: 0
|
|
83
|
-
style: {
|
|
84
|
-
cursor: 'pointer',
|
|
85
|
-
color: 'var(--color-primary)'
|
|
86
|
-
}
|
|
82
|
+
tabIndex: 0
|
|
87
83
|
}, "...+".concat(remainingItems.length, " more")))), tag && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
|
|
88
84
|
label: tag.text,
|
|
89
85
|
type: tag.type
|
|
@@ -110,7 +106,7 @@ function MembershipCard(_ref) {
|
|
|
110
106
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
111
107
|
color: "primary-background",
|
|
112
108
|
icon: _ArrowForwardIos.default
|
|
113
|
-
}))), alert.length && alert.map((item, i) => {
|
|
109
|
+
}))), alert.length > 0 && alert.map((item, i) => {
|
|
114
110
|
var _item$description, _item$description2, _item$description3, _item$description4;
|
|
115
111
|
return ((item === null || item === void 0 ? void 0 : item.subHeading) !== '' || (item === null || item === void 0 ? void 0 : item.heading) !== '' || (item === null || item === void 0 || (_item$description = item.description) === null || _item$description === void 0 ? void 0 : _item$description.text) !== undefined) && /*#__PURE__*/_react.default.createElement("div", {
|
|
116
112
|
className: item !== null && item !== void 0 && (_item$description2 = item.description) !== null && _item$description2 !== void 0 && _item$description2.text && (item === null || item === void 0 || (_item$description3 = item.description) === null || _item$description3 === void 0 ? void 0 : _item$description3.text) !== '' ? "toolTipInfo ".concat(item.type) : 'toolTipInfo flexChangeBody'
|
|
@@ -120,17 +116,22 @@ function MembershipCard(_ref) {
|
|
|
120
116
|
isDisplayed: true
|
|
121
117
|
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
122
118
|
color: item.type,
|
|
123
|
-
icon: _InfoOutlined.default
|
|
124
|
-
|
|
119
|
+
icon: _InfoOutlined.default,
|
|
120
|
+
size: 24
|
|
121
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
className: "flexGap"
|
|
123
|
+
}, (item === null || item === void 0 ? void 0 : item.subHeading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h3", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
125
124
|
color: "secondary-content",
|
|
126
125
|
className: "type-sl1-700"
|
|
127
|
-
}, item === null || item === void 0 ? void 0 : item.subHeading)), (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
126
|
+
}, item === null || item === void 0 ? void 0 : item.subHeading))), (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
128
127
|
color: "primary-content",
|
|
129
128
|
className: "type-t2-700"
|
|
130
|
-
}, item === null || item === void 0 ? void 0 : item.heading)), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
129
|
+
}, item === null || item === void 0 ? void 0 : item.heading))), (item === null || item === void 0 ? void 0 : item.description) && (item === null || item === void 0 || (_item$description4 = item.description) === null || _item$description4 === void 0 ? void 0 : _item$description4.text) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
131
130
|
color: "primary-content",
|
|
132
131
|
className: "type-b2-400"
|
|
133
|
-
}, item.description.text)))), item.actions && /*#__PURE__*/_react.default.createElement("div",
|
|
132
|
+
}, item.description.text))))), item.actions && /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
className: "viewStatus"
|
|
134
|
+
}, item.actions.map((action, index) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
134
135
|
key: action.label,
|
|
135
136
|
label: action.label,
|
|
136
137
|
type: action.type,
|
|
@@ -149,16 +150,7 @@ function MembershipCard(_ref) {
|
|
|
149
150
|
type: action === null || action === void 0 ? void 0 : action.type,
|
|
150
151
|
size: "large",
|
|
151
152
|
onClick: action === null || action === void 0 ? void 0 : action.name
|
|
152
|
-
})))
|
|
153
|
-
open: showModal,
|
|
154
|
-
imgSrc: null,
|
|
155
|
-
onCancel: toggleModal,
|
|
156
|
-
title: "Your Appliances"
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
158
|
-
className: "noOfAppliances"
|
|
159
|
-
}, remainingItems.map((item, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
160
|
-
key: item
|
|
161
|
-
}, item)))));
|
|
153
|
+
}))));
|
|
162
154
|
}
|
|
163
155
|
MembershipCard.propTypes = {
|
|
164
156
|
card: _propTypes.default.shape({
|
|
@@ -8,6 +8,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.primaryInfo svg{\n cursor: pointer;\n}\np,h2{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n margin: 0 0 24px;\n border: 1px solid var(--color-divider);\n @media only screen and (max-width: 600px) {\n gap: 16px;\n padding: 24px 16px 16px;\n .cardHead p .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .primary-info label .type-t2-700{\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n }\n .primaryInfo img{\n width: 24px;\n height: 24px;\n }\n .toolTipInfo .text-container svg {\n color: var(--color-primary);\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n
|
|
11
|
+
const MembershipCardStyle = exports.MembershipCardStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.flexGap div{\n padding: 0 0 8px;\n}\n.viewStatus button{\n padding: 16px 0 0;\n}\n.flexGap div:last-child{\n padding: 0;\n}\n.primaryInfo svg{\n cursor: pointer;\n}\np,h2{\n margin: 0;\n}\n padding: 24px;\n background: var(--color-primary-background);\n border-radius: 12px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n position: relative;\n margin: 0 0 24px;\n border: 1px solid var(--color-divider);\n @media only screen and (max-width: 600px) {\n gap: 16px;\n padding: 24px 16px 16px;\n .cardHead p .type-b1-400{\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .primary-info label .type-t2-700{\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n }\n .primaryInfo{\n display: flex;\n padding: 12px 8px;\n justify-content: space-between;\n background: var(--color-primary);\n border-radius: 8px;\n align-items: center;\n }\n .primaryInfo img{\n width: 24px;\n height: 24px;\n }\n .toolTipInfo .text-container svg {\n color: var(--color-primary);\n font-size: 16px !important;\n }\n .paraWithIcon{\n display: flex;\n gap: 8px;\n align-items: center;\n }\n .toolTipInfo{\n display: flex;\n background: var(--color-background-positive);\n padding: 12px;\n border-radius: 8px;\n flex-direction: column;\n justify-content: space-between;\n }\n .flexChangeBody{\n flex-direction: row;\n align-items: center;\n }\n\n .toolTipInfo .toolTip + div{\n display: flex;\n justify-content: end;\n }\n .error{\n background: var(--color-background-negative);\n }\n .error svg{\n color: var(--color-negative);\n }\n .warning{\n background: var(--color-background-warning);\n }\n .warning svg{\n color: var(--color-warning);\n }\n .success{\n background: var(--color-background-positive);\n }\n\n .success svg{\n color: var(--color-positive);\n }\n .toolTip{\n display: flex;\n gap: 8px;\n }\n .cardHead{\n display: flex;\n justify-content: space-between;\n gap: 24px;\n }\n .imgBg{\n border-radius: 8px;\n background: #DEF1FB;\n width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .ant-modal-footer{\n display: none;\n }\n .toolTip svg{\n margin: 4px 0 0;\n }\n @media only screen and (max-width: 600px) {\n .toolTipInfo {\n flex-direction: column;\n gap: 0;\n align-items: unset;\n }\n .flexChangeBody{\n align-items: normal;\n }\n .cardHead h2 > span{\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n }\n"])));
|
|
12
12
|
const CardBody = exports.CardBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\ndisplay: flex;\nflex-direction: column;\ngap: 24px;\n@media only screen and (max-width: 600px) {\n gap: 16px;\n}\n"])));
|
|
13
13
|
const CardFooter = exports.CardFooter = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\ndisplay: flex;\npadding: 16px 24px;\ngap: 24px;\nborder-top: 1px solid var(--color-divider);\nwidth: calc(100% + 48px);\nmargin: 0 0 0 -24px;\nposition: relative;\ntop: 24px;\njustify-content: end;\n@media only screen and (max-width: 600px) {\n padding: 16px 16px;\n width: calc(100% + 32px);\n margin: 0 0 0 -16px;\n top: 16px;\n\n .text-container .type-t2-700 {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n}\n.large {\n height: 36px;\n min-width: 100px;\n padding: 10px 16px;\n}\n}\n"])));
|