kupos-ui-components-lib 10.2.8 → 10.2.10
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/dist/components/PaymentSideBar/PaymentSideBarMobile.js +1 -1
- package/dist/components/Survey/SurveyDesktop.js +1 -1
- package/dist/components/Survey/SurveyMobile.js +1 -1
- package/dist/components/Survey/types.d.ts +1 -0
- package/dist/ui/KuposButton/KuposButton.d.ts +2 -1
- package/dist/ui/KuposButton/KuposButton.js +2 -2
- package/package.json +1 -1
- package/src/components/PaymentSideBar/PaymentSideBarMobile.tsx +1 -1
- package/src/components/Survey/SurveyDesktop.tsx +1 -0
- package/src/components/Survey/SurveyMobile.tsx +1 -0
- package/src/components/Survey/types.ts +1 -0
- package/src/ui/KuposButton/KuposButton.tsx +6 -1
|
@@ -76,7 +76,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
|
|
|
76
76
|
const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, isPeru, setShowServicefeeModal, serviceFeeDataStateValue, isOpsite, }) => {
|
|
77
77
|
var _a, _b, _c, _d, _e;
|
|
78
78
|
return (React.createElement("div", { className: "pb-[15px]" },
|
|
79
|
-
React.createElement("div", { className: "border border-[#ccc] rounded-[20px] relative", style: { margin: "
|
|
79
|
+
React.createElement("div", { className: "border border-[#ccc] rounded-[20px] relative", style: { margin: "0px 20px 20px" } },
|
|
80
80
|
React.createElement("div", { style: {
|
|
81
81
|
position: "absolute",
|
|
82
82
|
zIndex: 200,
|
|
@@ -26,6 +26,6 @@ const SurveyDesktop = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feed
|
|
|
26
26
|
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange, colors: colors }),
|
|
27
27
|
React.createElement("div", { className: "flex justify-center mt-[20px]" },
|
|
28
28
|
React.createElement("div", { className: "w-[180px]" },
|
|
29
|
-
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
|
|
29
|
+
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit, buttonTextColor: colors.buttonColor || "#fff" }))))));
|
|
30
30
|
};
|
|
31
31
|
export default SurveyDesktop;
|
|
@@ -26,6 +26,6 @@ const SurveyMobile = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedb
|
|
|
26
26
|
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
|
|
27
27
|
React.createElement("div", { className: "flex justify-center mt-[50px] mb-[50px]" },
|
|
28
28
|
React.createElement("div", { className: "w-[100px]" },
|
|
29
|
-
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
|
|
29
|
+
React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit, buttonTextColor: (colors === null || colors === void 0 ? void 0 : colors.buttonColor) || "#fff" }))))));
|
|
30
30
|
};
|
|
31
31
|
export default SurveyMobile;
|
|
@@ -7,6 +7,7 @@ interface KuposButtonProps {
|
|
|
7
7
|
soldOutLabel?: string;
|
|
8
8
|
soldOutIcon?: React.ReactNode;
|
|
9
9
|
onClick: () => void;
|
|
10
|
+
buttonTextColor?: any;
|
|
10
11
|
}
|
|
11
|
-
declare function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, }: KuposButtonProps): React.ReactElement;
|
|
12
|
+
declare function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, buttonTextColor, }: KuposButtonProps): React.ReactElement;
|
|
12
13
|
export default KuposButton;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, }) {
|
|
2
|
+
function KuposButton({ isSoldOut, isLoading, buttonColor, buyLabel, soldOutLabel, soldOutIcon, onClick, buttonTextColor, }) {
|
|
3
3
|
const isDisabled = isLoading || isSoldOut;
|
|
4
4
|
return (React.createElement("button", { onClick: () => (!isSoldOut ? onClick() : null), disabled: isLoading, className: "w-full text-[12px] font-bold text-white rounded-[14px] border-none px-[20px] flex items-center justify-center", style: {
|
|
5
5
|
backgroundColor: isDisabled ? "lightgray" : buttonColor,
|
|
6
6
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
7
7
|
padding: isLoading ? "7px 0" : isSoldOut ? "12px 0" : "12px 0",
|
|
8
8
|
} },
|
|
9
|
-
React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]" },
|
|
9
|
+
React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]", style: { color: buttonTextColor } },
|
|
10
10
|
isSoldOut ? soldOutIcon : null,
|
|
11
11
|
isLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (React.createElement("span", { className: "normal-case" }, buyLabel.charAt(0).toUpperCase() + buyLabel.slice(1).toLowerCase())) : (React.createElement("span", { className: "normal-case" }, soldOutLabel.charAt(0).toUpperCase() +
|
|
12
12
|
soldOutLabel.slice(1).toLowerCase())))));
|
package/package.json
CHANGED
|
@@ -248,7 +248,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
248
248
|
<div className="pb-[15px]">
|
|
249
249
|
<div
|
|
250
250
|
className="border border-[#ccc] rounded-[20px] relative"
|
|
251
|
-
style={{ margin: "
|
|
251
|
+
style={{ margin: "0px 20px 20px" }}
|
|
252
252
|
>
|
|
253
253
|
<div
|
|
254
254
|
style={{
|
|
@@ -8,6 +8,7 @@ interface KuposButtonProps {
|
|
|
8
8
|
soldOutLabel?: string;
|
|
9
9
|
soldOutIcon?: React.ReactNode;
|
|
10
10
|
onClick: () => void;
|
|
11
|
+
buttonTextColor?: any;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
function KuposButton({
|
|
@@ -18,6 +19,7 @@ function KuposButton({
|
|
|
18
19
|
soldOutLabel,
|
|
19
20
|
soldOutIcon,
|
|
20
21
|
onClick,
|
|
22
|
+
buttonTextColor,
|
|
21
23
|
}: KuposButtonProps): React.ReactElement {
|
|
22
24
|
const isDisabled = isLoading || isSoldOut;
|
|
23
25
|
|
|
@@ -32,7 +34,10 @@ function KuposButton({
|
|
|
32
34
|
padding: isLoading ? "7px 0" : isSoldOut ? "12px 0" : "12px 0",
|
|
33
35
|
}}
|
|
34
36
|
>
|
|
35
|
-
<span
|
|
37
|
+
<span
|
|
38
|
+
className="min-w-[75px] flex justify-center items-center bold-text uppercase gap-[5px]"
|
|
39
|
+
style={{ color: buttonTextColor }}
|
|
40
|
+
>
|
|
36
41
|
{isSoldOut ? soldOutIcon : null}
|
|
37
42
|
{isLoading ? (
|
|
38
43
|
<span className="loader-circle"></span>
|