oa-componentbook 1.0.1-stage.365 → 1.0.1-stage.366
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.
|
@@ -19,11 +19,10 @@ 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"];
|
|
26
|
-
/* eslint-disable */
|
|
27
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -122,11 +121,7 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
122
121
|
switch (answerType) {
|
|
123
122
|
case "singleSelect":
|
|
124
123
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
|
|
126
|
-
display: "flex",
|
|
127
|
-
gap: "12px",
|
|
128
|
-
flexWrap: "wrap"
|
|
129
|
-
}
|
|
124
|
+
className: "optionBtnSec"
|
|
130
125
|
}, answerOptions === null || answerOptions === void 0 ? void 0 : answerOptions.map((option, idx) => /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
131
126
|
key: idx,
|
|
132
127
|
type: currentAnswer === (option.value || option) ? "primary" : "secondary",
|
|
@@ -165,42 +160,21 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
165
160
|
}
|
|
166
161
|
return null;
|
|
167
162
|
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
|
-
}
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
164
|
+
className: "bankDetailSec"
|
|
165
|
+
}, answerOptions === null || answerOptions === void 0 ? void 0 : answerOptions.map((option, idx) => /*#__PURE__*/_react.default.createElement("li", {
|
|
166
|
+
key: idx
|
|
186
167
|
// onClick={() => handleAnswer(stepIndex, option.value || option)}
|
|
187
168
|
,
|
|
188
169
|
"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
|
-
}
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
171
|
+
typography: "type-button-500"
|
|
172
|
+
}, option.label || option), option.description && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
173
|
+
typography: "type-b2-400",
|
|
174
|
+
color: "secondary-content"
|
|
201
175
|
}, option.description)), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
202
176
|
type: "text-only",
|
|
203
|
-
size: "
|
|
177
|
+
size: "medium",
|
|
204
178
|
label: option.detailsText || "Enter details",
|
|
205
179
|
onClick: e => {
|
|
206
180
|
e.stopPropagation();
|
|
@@ -308,25 +282,20 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
308
282
|
const shouldHideAnswerInput = (dynamicContent === null || dynamicContent === void 0 ? void 0 : dynamicContent.hideAnswerInput) || false;
|
|
309
283
|
|
|
310
284
|
// Create the step content with question and answer
|
|
311
|
-
const stepContent = /*#__PURE__*/_react.default.createElement("div",
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
marginBottom: "8px"
|
|
317
|
-
}
|
|
285
|
+
const stepContent = /*#__PURE__*/_react.default.createElement("div", {
|
|
286
|
+
className: "stepQanAnsBox"
|
|
287
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
288
|
+
color: isActive ? "primary-content" : isCompleted ? "secondary-content" : isDisabled ? "secondary-content" : "secondary-content",
|
|
289
|
+
typography: isActive ? "type-button-500" : isCompleted ? "type-b2-400" : isDisabled ? "type-b2-400" : "type-b2-400"
|
|
318
290
|
}, (0, _utils.isString)(displayTitle) || (0, _utils.isNumber)(displayTitle) ? /*#__PURE__*/_react.default.createElement("span", {
|
|
319
291
|
"data-test": "".concat(dataTest, "--title-(").concat(displayTitle, ")")
|
|
320
292
|
}, displayTitle) : displayTitle), displayDescription && /*#__PURE__*/_react.default.createElement("div", {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
style: {
|
|
328
|
-
marginTop: "12px"
|
|
329
|
-
}
|
|
293
|
+
className: "margin-top-4"
|
|
294
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({}, displayDescriptionStyle, {
|
|
295
|
+
color: "secondary-content",
|
|
296
|
+
typography: "type-b2-400"
|
|
297
|
+
}), displayDescription)), (isActive || isCompleted) && !shouldHideAnswerInput && /*#__PURE__*/_react.default.createElement("div", {
|
|
298
|
+
className: "margin-top-12"
|
|
330
299
|
}, renderAnswerInput(step, stepIndex)));
|
|
331
300
|
return {
|
|
332
301
|
key: step.key || stepIndex,
|
|
@@ -334,9 +303,7 @@ function ProgressiveStepsWidget(_ref) {
|
|
|
334
303
|
disabled: isDisabled
|
|
335
304
|
};
|
|
336
305
|
}).filter(Boolean); // Remove null entries
|
|
337
|
-
return /*#__PURE__*/_react.default.createElement(_styles.StepsContainer, {
|
|
338
|
-
style: style
|
|
339
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomSteps.default, _extends({
|
|
306
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StepsContainer, null, /*#__PURE__*/_react.default.createElement(_CustomSteps.default, _extends({
|
|
340
307
|
data: {
|
|
341
308
|
steps: prepareStepsForCustomSteps()
|
|
342
309
|
},
|
|
@@ -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\n.stepQanAnsBox{line-height:normal; margin-bottom:24px;}\n.ant-steps.ant-steps-vertical >.ant-steps-item .ant-steps-item-icon{margin-inline-end: 12px;\n border: none; width: 28px; height: 28px; line-height: normal; display: flex; align-items: center; justify-content: center;}\n.ant-steps .ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-tail::after, .ant-steps .ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-tail::after{background-color:#E0E0E0;}\n.ant-steps .ant-steps-item-finish .ant-steps-item-icon {background-color:#00875A;}\n.ant-steps .ant-steps-item-finish .ant-steps-item-icon >.ant-steps-icon{color:#fff;}\n.ant-steps .ant-steps-item-process .ant-steps-item-icon{background-color: #014FC5;}\n.ant-steps.ant-steps-vertical >.ant-steps-item .ant-steps-item-title { padding-inline-end: 0; line-height: normal;\n width: 100%;}\n\nul.bankDetailSec{display: flex;\n flex-direction: column; gap: 16px;\n padding: 0;\n margin: 0;}\nul.bankDetailSec li{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 .ant-steps-item-tail {\n inset-inline-start: 15px !important;\n }\n.optionBtnSec{display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;}\n.optionBtnSec button{width:50%;}\n.optionBtnSec button {\n width: calc(50% - 6px);\n}\n\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"])));
|