cr-ui-lib 1.1.102 → 1.1.103
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -65,8 +65,9 @@ interface SimpleCardProps {
|
|
|
65
65
|
handleRefresh?: () => void;
|
|
66
66
|
isCustomTitle?: boolean;
|
|
67
67
|
customTitle?: React$1.ReactNode;
|
|
68
|
+
isAvailable?: boolean;
|
|
68
69
|
}
|
|
69
|
-
declare const SimpleCard: ({ title, value, image, unit, tooltip_text, subText, footerText, hasfooterDesign, footerDesign, hasDaysOption, hasTillDateDayOption, onDayChange, className, handleRefresh, isLoading, isError, isCustomTitle, customTitle, }: SimpleCardProps) => JSX.Element;
|
|
70
|
+
declare const SimpleCard: ({ title, value, image, unit, tooltip_text, subText, footerText, hasfooterDesign, footerDesign, hasDaysOption, hasTillDateDayOption, onDayChange, className, handleRefresh, isLoading, isError, isCustomTitle, customTitle, isAvailable, }: SimpleCardProps) => JSX.Element;
|
|
70
71
|
|
|
71
72
|
interface Props {
|
|
72
73
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -65,8 +65,9 @@ interface SimpleCardProps {
|
|
|
65
65
|
handleRefresh?: () => void;
|
|
66
66
|
isCustomTitle?: boolean;
|
|
67
67
|
customTitle?: React$1.ReactNode;
|
|
68
|
+
isAvailable?: boolean;
|
|
68
69
|
}
|
|
69
|
-
declare const SimpleCard: ({ title, value, image, unit, tooltip_text, subText, footerText, hasfooterDesign, footerDesign, hasDaysOption, hasTillDateDayOption, onDayChange, className, handleRefresh, isLoading, isError, isCustomTitle, customTitle, }: SimpleCardProps) => JSX.Element;
|
|
70
|
+
declare const SimpleCard: ({ title, value, image, unit, tooltip_text, subText, footerText, hasfooterDesign, footerDesign, hasDaysOption, hasTillDateDayOption, onDayChange, className, handleRefresh, isLoading, isError, isCustomTitle, customTitle, isAvailable, }: SimpleCardProps) => JSX.Element;
|
|
70
71
|
|
|
71
72
|
interface Props {
|
|
72
73
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -747,7 +747,8 @@ var SimpleCard = ({
|
|
|
747
747
|
isLoading,
|
|
748
748
|
isError,
|
|
749
749
|
isCustomTitle = false,
|
|
750
|
-
customTitle
|
|
750
|
+
customTitle,
|
|
751
|
+
isAvailable = true
|
|
751
752
|
}) => {
|
|
752
753
|
const [selectedDay, setSelectedDay] = React__default.default.useState("90");
|
|
753
754
|
const handleDayClick = (label) => {
|
|
@@ -837,18 +838,18 @@ var SimpleCard = ({
|
|
|
837
838
|
]
|
|
838
839
|
}
|
|
839
840
|
) }),
|
|
840
|
-
/* @__PURE__ */ jsxRuntime.
|
|
841
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-grow items-center`, children: isAvailable ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
841
842
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[24px] font-semibold text-gray-900 antialiased tracking-normal", children: [
|
|
842
843
|
subText == "$" ? "$" : "",
|
|
843
844
|
value.trim(),
|
|
844
845
|
subText == "$" ? "" : subText
|
|
845
846
|
] }),
|
|
846
847
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 ml-2", children: unit })
|
|
847
|
-
] })
|
|
848
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[24px] font-semibold text-gray-900 antialiased tracking-normal opacity-50", children: "0" }) })
|
|
848
849
|
] }),
|
|
849
850
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-4", children: image })
|
|
850
851
|
] }),
|
|
851
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
852
|
+
isAvailable && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
852
853
|
hasfooterDesign && footerDesign,
|
|
853
854
|
!hasDaysOption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
854
855
|
"span",
|
|
@@ -862,6 +863,10 @@ var SimpleCard = ({
|
|
|
862
863
|
}
|
|
863
864
|
)
|
|
864
865
|
] }),
|
|
866
|
+
!isAvailable && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-1 h-[22px] w-[107px] rounded-[40px] border border-[#D9E0FA] bg-[#F5F7FE]", children: [
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[5px] h-[5px] rounded-full bg-[#4062E5]" }),
|
|
868
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-[#4062E5] font-semibold antialiased text-center leading-[1px]", children: "Coming Soon" })
|
|
869
|
+
] }),
|
|
865
870
|
hasDaysOption && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-[4px] text-[12px] font-normal text-center items-center antialiased tracking-normal", children: options.map((label, index, array) => /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
|
|
866
871
|
renderDayOption(label),
|
|
867
872
|
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[#757575]", children: "|" })
|