@tripian/react 6.0.5 → 6.0.7

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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface IRadioButtonBox {
3
3
  domId?: string;
4
4
  text: string;
5
+ description: string;
5
6
  style?: React.CSSProperties;
6
7
  checked: boolean;
7
8
  onChange: (checked: boolean, value: string) => void;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface IOptionsIRadioButtonBoxGroup {
3
3
  id: number | string;
4
4
  text: string;
5
+ description: string;
5
6
  }
6
7
  interface IRadioButtonBoxGroup {
7
8
  options: Array<IOptionsIRadioButtonBoxGroup>;
package/index.js CHANGED
@@ -68613,7 +68613,7 @@ var ConfirmModalPopup = function (_a) {
68613
68613
  react_1.default.createElement("div", { className: "col col12" },
68614
68614
  react_1.default.createElement("span", null, text)),
68615
68615
  react_1.default.createElement("div", { className: "col col12" },
68616
- react_1.default.createElement(Button_1.default, { color: "danger", style: { marginRight: '1rem' }, text: confirmButtonText, onClick: confirm }),
68616
+ react_1.default.createElement(Button_1.default, { color: "primary", style: { marginRight: '1rem' }, text: confirmButtonText, onClick: confirm }),
68617
68617
  react_1.default.createElement(Button_1.default, { color: "primary", text: cancelButtonText, onClick: function () {
68618
68618
  cancelCallback();
68619
68619
  } })))));
@@ -70906,7 +70906,7 @@ var FormTemplateTripNext = function (_a) {
70906
70906
  setTripProfile(newTripProfile);
70907
70907
  callbackTripProfile(newTripProfile);
70908
70908
  }, callbackUserCompanionAdd: callbackUserCompanionAdd, companionLoadingList: companionLoadingList, userCompanionQuestions: userCompanionQuestions, userCompanions: userCompanions, stayAndShareTips: stayAndShareTips })),
70909
- stepId > 0 && (react_1.default.createElement(StepComponent_1.default, { defaultTip: { title: 'Hover the areas for more info', description: 'If you close a field, we will provide you with relevant explatanions.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/project-images/tripian-one/logo.png' }, header: stepHeader.header, stepQuestions: stepQuestions, stepId: stepId, tripProfile: tripProfile, callbackTripAnswers: callbackTripAnswers })),
70909
+ stepId > 0 && (react_1.default.createElement(StepComponent_1.default, { defaultTip: { title: 'Hover the areas for more info', description: 'If you close a field, we will provide you with relevant explanations.', iconUrl: 'https://poi-pics.s3.eu-west-1.amazonaws.com/General/icons/default.png' }, header: stepHeader.header, stepQuestions: stepQuestions, stepId: stepId, tripProfile: tripProfile, callbackTripAnswers: callbackTripAnswers })),
70910
70910
  react_1.default.createElement("div", { className: "row center" },
70911
70911
  react_1.default.createElement("div", { className: "col col6" }, stepId === -1 ? (react_1.default.createElement(Button_1.default, { text: "Cancel", color: "primary", onClick: function () {
70912
70912
  onCancel();
@@ -71195,7 +71195,7 @@ var RadioButtonQuestion = function (_a) {
71195
71195
  return (react_1.default.createElement(react_1.default.Fragment, null,
71196
71196
  react_1.default.createElement("h4", { className: "ml1 mb3" }, question.name),
71197
71197
  react_1.default.createElement("div", { style: flexDirection === 'column' ? { display: 'flex', flexDirection: 'column' } : { display: 'flex', flexDirection: 'column', gap: '1rem' } },
71198
- react_1.default.createElement(RadioButtonBoxGroup_1.default, { skippable: question.skippable, options: question.answers.map(function (option) { return ({ id: option.id, text: option.name }); }), defaultSelectedId: defaultAnswer, onChange: onChange }))));
71198
+ react_1.default.createElement(RadioButtonBoxGroup_1.default, { skippable: question.skippable, options: question.answers.map(function (option) { return ({ id: option.id, text: option.name, description: option.description }); }), defaultSelectedId: defaultAnswer, onChange: onChange }))));
71199
71199
  return (react_1.default.createElement(react_1.default.Fragment, null,
71200
71200
  react_1.default.createElement("h4", { className: "ml1 my2" }, question.name),
71201
71201
  react_1.default.createElement("div", { style: flexDirection === 'column' ? { display: 'flex', flexDirection: 'column' } : undefined },
@@ -71252,7 +71252,7 @@ var RadioButtonBoxGroup = function (_a) {
71252
71252
  setSelectedId(undefined);
71253
71253
  }
71254
71254
  };
71255
- return (react_1.default.createElement(react_1.default.Fragment, null, options.map(function (o) { return (react_1.default.createElement(RadioButtonBox_1.default, { key: o.id, domId: o.id.toString(), text: o.text, checked: selectedId === o.id, onChange: handleSelectedChange })); })));
71255
+ return (react_1.default.createElement(react_1.default.Fragment, null, options.map(function (o) { return (react_1.default.createElement(RadioButtonBox_1.default, { key: o.id, domId: o.id.toString(), text: o.text, description: o.description, checked: selectedId === o.id, onChange: handleSelectedChange })); })));
71256
71256
  };
71257
71257
  exports.default = RadioButtonBoxGroup;
71258
71258
 
@@ -71294,7 +71294,7 @@ var react_1 = __importStar(__webpack_require__(0));
71294
71294
  var Checkbox_1 = __webpack_require__(97);
71295
71295
  var RadioButtonBox_scss_1 = __importDefault(__webpack_require__(668));
71296
71296
  var RadioButtonBox = function (_a) {
71297
- var domId = _a.domId, text = _a.text, style = _a.style, checked = _a.checked, onChange = _a.onChange;
71297
+ var domId = _a.domId, text = _a.text, description = _a.description, style = _a.style, checked = _a.checked, onChange = _a.onChange;
71298
71298
  var handleRadioButtonBoxSelectedChange = function (event) {
71299
71299
  onChange(event.target.checked, event.target.name);
71300
71300
  };
@@ -71307,7 +71307,9 @@ var RadioButtonBox = function (_a) {
71307
71307
  react_1.default.createElement("span", { className: RadioButtonBox_scss_1.default.span1 },
71308
71308
  react_1.default.createElement("input", { id: memoizedUniqueDomId, name: domId, checked: checked, type: "checkbox", onChange: handleRadioButtonBoxSelectedChange }),
71309
71309
  svg),
71310
- react_1.default.createElement("span", { className: RadioButtonBox_scss_1.default.span2 }, text)));
71310
+ react_1.default.createElement("div", { className: RadioButtonBox_scss_1.default.span2 },
71311
+ react_1.default.createElement("span", null, text),
71312
+ react_1.default.createElement("span", null, description))));
71311
71313
  };
71312
71314
  exports.default = RadioButtonBox;
71313
71315
 
@@ -71684,7 +71686,7 @@ var StepDestination = function (_a) {
71684
71686
  react_1.default.createElement("div", { className: "col col12 col8-m" },
71685
71687
  react_1.default.createElement("div", { className: "col col12" },
71686
71688
  react_1.default.createElement("div", { className: "col col12 px0 mb4 ".concat(StepDestination_scss_1.default.content) },
71687
- react_1.default.createElement("h4", { className: "m0" }, "Where"),
71689
+ react_1.default.createElement("h4", { className: "m0" }, "Where are you going"),
71688
71690
  !tripProfile.cityId ? react_1.default.createElement(Required_1.default, { customClassName: "mb0" }) : null),
71689
71691
  react_1.default.createElement(RSelect_1.default, { options: citiesOptions, disabled: isTripEdit, selectedOptionValue: tripProfile.cityId.toString(), onSelectedOptionChange: callbackCitySelect, placeHolder: "Select destination from list", onFocus: function () { return setTip(destinationTips[1]); }, onBlur: function () { return setTip(destinationTips[0]); } })),
71690
71692
  react_1.default.createElement("div", { className: "col col12" },