oa-componentbook 1.0.1-stage.365 → 1.0.1-stage.367
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.
|
@@ -65,7 +65,7 @@ function Header(_ref) {
|
|
|
65
65
|
}, (subHeading === null || subHeading === void 0 || (_subHeading$icon = subHeading.icon) === null || _subHeading$icon === void 0 ? void 0 : _subHeading$icon.position) === "left" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, _extends({}, subHeading === null || subHeading === void 0 || (_subHeading$icon2 = subHeading.icon) === null || _subHeading$icon2 === void 0 ? void 0 : _subHeading$icon2.iconConfig, {
|
|
66
66
|
className: "margin-right-8"
|
|
67
67
|
})), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading)), subHeading1 && /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
-
className: "subHadingText
|
|
68
|
+
className: "subHadingText"
|
|
69
69
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
70
70
|
typography: subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.type,
|
|
71
71
|
color: "secondary-content"
|
|
@@ -19,7 +19,7 @@ var _CustomCheckBox = _interopRequireDefault(require("../../components/oa-compon
|
|
|
19
19
|
var _CustomSelect = _interopRequireDefault(require("../../components/oa-component-select/CustomSelect"));
|
|
20
20
|
var _CustomTextArea = _interopRequireDefault(require("../../components/oa-component-textarea/CustomTextArea"));
|
|
21
21
|
var _CustomSteps = _interopRequireDefault(require("../../components/oa-component-steps/CustomSteps"));
|
|
22
|
-
var _Typography = require("../../components/oa-component-typography/Typography");
|
|
22
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
23
23
|
var _utils = require("../../utils");
|
|
24
24
|
var _styles = require("./styles");
|
|
25
25
|
const _excluded = ["data", "data-test", "current", "initialAnswers", "onComplete", "onStepChange", "style", "showSubmitButton"];
|
|
@@ -122,11 +122,7 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
122
122
|
switch (answerType) {
|
|
123
123
|
case "singleSelect":
|
|
124
124
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
|
|
126
|
-
display: "flex",
|
|
127
|
-
gap: "12px",
|
|
128
|
-
flexWrap: "wrap"
|
|
129
|
-
}
|
|
125
|
+
className: "optionBtnSec"
|
|
130
126
|
}, answerOptions === null || answerOptions === void 0 ? void 0 : answerOptions.map((option, idx) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
131
127
|
key: idx,
|
|
132
128
|
type: currentAnswer === (option.value || option) ? "primary" : "secondary",
|
|
@@ -165,42 +161,21 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
165
161
|
}
|
|
166
162
|
return null;
|
|
167
163
|
case "paymentOptions":
|
|
168
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, answerOptions === null || answerOptions === void 0 ? void 0 : answerOptions.map((option, idx) => /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
-
key: idx,
|
|
174
|
-
style: {
|
|
175
|
-
border: "1px solid #d9d9d9",
|
|
176
|
-
borderRadius: "8px",
|
|
177
|
-
padding: "16px",
|
|
178
|
-
marginBottom: "12px",
|
|
179
|
-
display: "flex",
|
|
180
|
-
justifyContent: "space-between",
|
|
181
|
-
alignItems: "center",
|
|
182
|
-
backgroundColor: currentAnswer === (option.value || option) ? "#f0f8ff" : "white",
|
|
183
|
-
// cursor: 'pointer',
|
|
184
|
-
transition: "all 0.3s ease"
|
|
185
|
-
}
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
165
|
+
className: "bankDetailSec"
|
|
166
|
+
}, answerOptions === null || answerOptions === void 0 ? void 0 : answerOptions.map((option, idx) => /*#__PURE__*/_react.default.createElement("li", {
|
|
167
|
+
key: idx
|
|
186
168
|
// onClick={() => handleAnswer(stepIndex, option.value || option)}
|
|
187
169
|
,
|
|
188
170
|
"data-test": dataTest ? "".concat(dataTest, "--payment-option-").concat(stepIndex, "-").concat(idx) : undefined
|
|
189
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
}, option.label || option), option.description && /*#__PURE__*/_react.default.createElement("div", {
|
|
196
|
-
style: {
|
|
197
|
-
fontSize: "14px",
|
|
198
|
-
color: "#666",
|
|
199
|
-
marginTop: "4px"
|
|
200
|
-
}
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
172
|
+
typography: "type-button-500"
|
|
173
|
+
}, option.label || option), option.description && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
174
|
+
typography: "type-b2-400",
|
|
175
|
+
color: "secondary-content"
|
|
201
176
|
}, option.description)), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
202
177
|
type: "text-only",
|
|
203
|
-
size: "
|
|
178
|
+
size: "medium",
|
|
204
179
|
label: option.detailsText || "Enter details",
|
|
205
180
|
onClick: e => {
|
|
206
181
|
e.stopPropagation();
|
|
@@ -308,25 +283,20 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
308
283
|
const shouldHideAnswerInput = (dynamicContent === null || dynamicContent === void 0 ? void 0 : dynamicContent.hideAnswerInput) || false;
|
|
309
284
|
|
|
310
285
|
// Create the step content with question and answer
|
|
311
|
-
const stepContent = /*#__PURE__*/_react.default.createElement("div",
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
marginBottom: "8px"
|
|
317
|
-
}
|
|
286
|
+
const stepContent = /*#__PURE__*/_react.default.createElement("div", {
|
|
287
|
+
className: "stepQanAnsBox"
|
|
288
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
289
|
+
color: isActive ? "primary-content" : isCompleted ? "secondary-content" : isDisabled ? "secondary-content" : "secondary-content",
|
|
290
|
+
typography: isActive ? "type-button-500" : isCompleted ? "type-b2-400" : isDisabled ? "type-b2-400" : "type-b2-400"
|
|
318
291
|
}, (0, _utils.isString)(displayTitle) || (0, _utils.isNumber)(displayTitle) ? /*#__PURE__*/_react.default.createElement("span", {
|
|
319
292
|
"data-test": "".concat(dataTest, "--title-(").concat(displayTitle, ")")
|
|
320
293
|
}, displayTitle) : displayTitle), displayDescription && /*#__PURE__*/_react.default.createElement("div", {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
style: {
|
|
328
|
-
marginTop: "12px"
|
|
329
|
-
}
|
|
294
|
+
className: "margin-top-4"
|
|
295
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({}, displayDescriptionStyle, {
|
|
296
|
+
color: "secondary-content",
|
|
297
|
+
typography: "type-b2-400"
|
|
298
|
+
}), displayDescription)), (isActive || isCompleted) && !shouldHideAnswerInput && /*#__PURE__*/_react.default.createElement("div", {
|
|
299
|
+
className: "margin-top-12"
|
|
330
300
|
}, renderAnswerInput(step, stepIndex)));
|
|
331
301
|
return {
|
|
332
302
|
key: step.key || stepIndex,
|
|
@@ -334,9 +304,7 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
334
304
|
disabled: isDisabled
|
|
335
305
|
};
|
|
336
306
|
}).filter(Boolean); // Remove null entries
|
|
337
|
-
return /*#__PURE__*/_react.default.createElement(_styles.StepsContainer, {
|
|
338
|
-
style: style
|
|
339
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomSteps.default, _extends({
|
|
307
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StepsContainer, null, /*#__PURE__*/_react.default.createElement(_CustomSteps.default, _extends({
|
|
340
308
|
data: {
|
|
341
309
|
steps: prepareStepsForCustomSteps()
|
|
342
310
|
},
|
|
@@ -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 StepsContainer = exports.StepsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
11
|
+
const StepsContainer = exports.StepsContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .stepQanAnsBox {\n line-height: normal;\n margin-bottom: 24px;\n }\n .ant-steps.ant-steps-vertical > .ant-steps-item .ant-steps-item-icon {\n margin-inline-end: 12px;\n border: none;\n width: 28px;\n height: 28px;\n line-height: normal;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .ant-steps\n .ant-steps-item-process\n > .ant-steps-item-container\n > .ant-steps-item-tail::after,\n .ant-steps\n .ant-steps-item-finish\n > .ant-steps-item-container\n > .ant-steps-item-tail::after {\n background-color: #e0e0e0;\n }\n .ant-steps .ant-steps-item-finish .ant-steps-item-icon {\n background-color: #00875a;\n }\n .ant-steps .ant-steps-item-finish .ant-steps-item-icon > .ant-steps-icon {\n color: #fff;\n }\n .ant-steps .ant-steps-item-process .ant-steps-item-icon {\n background-color: #014fc5;\n }\n .ant-steps.ant-steps-vertical > .ant-steps-item .ant-steps-item-title {\n padding-inline-end: 0;\n line-height: normal;\n width: 100%;\n }\n\n ul.bankDetailSec {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 0;\n margin: 0;\n }\n ul.bankDetailSec li {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-direction: row;\n border: 1px solid rgb(217, 217, 217);\n border-radius: 6px;\n padding: 12px;\n margin: 0;\n }\n\n .ant-steps-item-tail {\n inset-inline-start: 15px !important;\n }\n .optionBtnSec {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n }\n .optionBtnSec button {\n width: 50%;\n }\n .optionBtnSec button {\n width: calc(50% - 6px);\n }\n"])));
|
|
12
12
|
const SubmitButton = exports.SubmitButton = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 32px;\n text-align: center;\n padding-top: 20px;\n border-top: 1px solid #f0f0f0;\n"])));
|