pixelize-design-library 2.2.18 → 2.2.20
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/Card/PaymentCard/PaymentCard.d.ts +1 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +15 -4
- package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/MeasuredItem.js +0 -47
- package/dist/Components/Slider/Slider.js +0 -121
- package/dist/Components/Timeline/Timeline.js +0 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaymentCardProps } from "./PaymentCardProps";
|
|
3
|
-
declare const PaymentCard: ({ plan, isActive, isNextUpgrade, billingCycle, onSelect, onHover, buttonLoading, }: PaymentCardProps) => React.JSX.Element;
|
|
3
|
+
declare const PaymentCard: ({ plan, isActive, isNextUpgrade, billingCycle, onSelect, onHover, buttonLoading, isLoading, }: PaymentCardProps) => React.JSX.Element;
|
|
4
4
|
export default PaymentCard;
|
|
@@ -52,9 +52,9 @@ var getCardStyles = function (isActive, isNextUpgrade, popular, theme) {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
var PaymentCard = function (_a) {
|
|
55
|
-
var plan = _a.plan, _b = _a.isActive, isActive = _b === void 0 ? false : _b, _c = _a.isNextUpgrade, isNextUpgrade = _c === void 0 ? false : _c, billingCycle = _a.billingCycle, onSelect = _a.onSelect, onHover = _a.onHover, buttonLoading = _a.buttonLoading;
|
|
55
|
+
var plan = _a.plan, _b = _a.isActive, isActive = _b === void 0 ? false : _b, _c = _a.isNextUpgrade, isNextUpgrade = _c === void 0 ? false : _c, billingCycle = _a.billingCycle, onSelect = _a.onSelect, onHover = _a.onHover, buttonLoading = _a.buttonLoading, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d;
|
|
56
56
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
57
|
-
var
|
|
57
|
+
var _e = getCardStyles(isActive, isNextUpgrade, !!plan.popular, theme), badgeText = _e.badgeText, badgeColor = _e.badgeColor, buttonColor = _e.buttonColor, buttonColor50 = _e.buttonColor50;
|
|
58
58
|
var variantStyles = plan.buttonVariant === "outline"
|
|
59
59
|
? {
|
|
60
60
|
borderColor: buttonColor,
|
|
@@ -67,7 +67,18 @@ var PaymentCard = function (_a) {
|
|
|
67
67
|
_hover: { bg: buttonColor },
|
|
68
68
|
};
|
|
69
69
|
return (react_1.default.createElement(react_2.GridItem, null,
|
|
70
|
-
react_1.default.createElement(react_2.Box, { bg: theme.colors.white, minH: "100%", borderRadius: "lg", p: 8, borderWidth: "0.063rem", borderColor: theme.colors.gray[200], boxShadow: "md", position: "relative", transition: "all 0.2s", transform: plan.popular ? "scale(1.03)" : "none", border: badgeColor, _hover: { transform: "translateY(-0.313rem)", shadow: "xl" }
|
|
70
|
+
react_1.default.createElement(react_2.Box, { bg: theme.colors.white, minH: "100%", borderRadius: "lg", p: 8, borderWidth: "0.063rem", borderColor: theme.colors.gray[200], boxShadow: "md", position: "relative", transition: "all 0.2s", transform: plan.popular ? "scale(1.03)" : "none", border: badgeColor, _hover: { transform: "translateY(-0.313rem)", shadow: "xl" } }, isLoading ? (
|
|
71
|
+
// 🔹 Skeleton Loader Layout
|
|
72
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
|
+
react_1.default.createElement(react_2.Skeleton, { height: "24px", width: "120px", mx: "auto", mb: 4 }),
|
|
74
|
+
react_1.default.createElement(react_2.Skeleton, { height: "50px", width: "50px", borderRadius: "lg", mx: "auto", mb: 4 }),
|
|
75
|
+
react_1.default.createElement(react_2.Skeleton, { height: "24px", width: "100px", mx: "auto", mb: 3 }),
|
|
76
|
+
react_1.default.createElement(react_2.Skeleton, { height: "30px", width: "160px", mx: "auto", mb: 4 }),
|
|
77
|
+
react_1.default.createElement(react_2.SkeletonText, { noOfLines: 2, spacing: "2" }),
|
|
78
|
+
react_1.default.createElement(react_2.Skeleton, { height: "44px", width: "full", mt: 6, borderRadius: "md" }),
|
|
79
|
+
react_1.default.createElement(react_2.VStack, { align: "start", spacing: 3, mt: 6 }, [1, 2, 3, 4].map(function (i) { return (react_1.default.createElement(react_2.Skeleton, { key: i, height: "16px", width: "80%" })); })))) : (
|
|
80
|
+
// 🔹 Actual Card Content
|
|
81
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
|
71
82
|
badgeText && (react_1.default.createElement(react_2.Badge, { position: "absolute", top: "-0.75rem", left: "50%", transform: "translateX(-50%)", bg: buttonColor, color: theme.colors.white, fontSize: "sm", px: 4, py: 1, borderRadius: "full" }, badgeText)),
|
|
72
83
|
react_1.default.createElement(react_2.Box, { textAlign: "center", mb: 6 },
|
|
73
84
|
react_1.default.createElement(react_2.Flex, { justify: "center", align: "center", w: "3.125rem", h: "3.125rem", borderRadius: "lg", bg: buttonColor50, color: buttonColor, mx: "auto", mb: 4 }, plan.icon),
|
|
@@ -82,6 +93,6 @@ var PaymentCard = function (_a) {
|
|
|
82
93
|
!isActive && (react_1.default.createElement(Button_1.default, __assign({ isLoading: plan.plan_id === buttonLoading, loadingText: plan.buttonLoadingText, width: "full", variant: plan.buttonVariant, size: "lg", onClick: function () { return onSelect === null || onSelect === void 0 ? void 0 : onSelect(plan.plan_id); }, onMouseEnter: function () { return onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", true); }, onMouseLeave: function () { return onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", false); } }, variantStyles), plan.buttonText)),
|
|
83
94
|
react_1.default.createElement(react_2.VStack, { align: "start", spacing: 3, mt: 6 }, plan.features.map(function (feature, i) { return (react_1.default.createElement(react_2.Flex, { key: i, align: "center" },
|
|
84
95
|
react_1.default.createElement(react_2.Icon, { as: lucide_react_1.Check, color: theme.colors.green[500], mr: 2 }),
|
|
85
|
-
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, feature))); })))));
|
|
96
|
+
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, feature))); })))))));
|
|
86
97
|
};
|
|
87
98
|
exports.default = PaymentCard;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// import React, { useRef, useLayoutEffect } from "react";
|
|
3
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
3
|
if (k2 === undefined) k2 = k;
|
|
5
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -24,52 +23,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
23
|
return result;
|
|
25
24
|
};
|
|
26
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
// type MeasuredItemProps = {
|
|
28
|
-
// index: number;
|
|
29
|
-
// setSize: (index: number, size: number) => void;
|
|
30
|
-
// children: React.ReactNode;
|
|
31
|
-
// };
|
|
32
|
-
// const MeasuredItem: React.FC<MeasuredItemProps> = ({
|
|
33
|
-
// index,
|
|
34
|
-
// setSize,
|
|
35
|
-
// children,
|
|
36
|
-
// }) => {
|
|
37
|
-
// const ref = useRef<HTMLDivElement | null>(null);
|
|
38
|
-
// const prevHeight = useRef<number | null>(null);
|
|
39
|
-
// // measure function
|
|
40
|
-
// const measure = () => {
|
|
41
|
-
// if (ref.current) {
|
|
42
|
-
// const height = Math.round(ref.current.getBoundingClientRect().height);
|
|
43
|
-
// if (prevHeight.current !== height) {
|
|
44
|
-
// prevHeight.current = height;
|
|
45
|
-
// setSize(index, height);
|
|
46
|
-
// }
|
|
47
|
-
// }
|
|
48
|
-
// };
|
|
49
|
-
// useLayoutEffect(() => {
|
|
50
|
-
// // initial measure
|
|
51
|
-
// measure();
|
|
52
|
-
// // ResizeObserver to capture any content changes (collapse/expand)
|
|
53
|
-
// let ro: ResizeObserver | undefined;
|
|
54
|
-
// if (typeof ResizeObserver !== "undefined") {
|
|
55
|
-
// ro = new ResizeObserver(() => {
|
|
56
|
-
// measure();
|
|
57
|
-
// });
|
|
58
|
-
// if (ref.current) ro.observe(ref.current);
|
|
59
|
-
// } else {
|
|
60
|
-
// // fallback: window resize
|
|
61
|
-
// window.addEventListener("resize", measure);
|
|
62
|
-
// }
|
|
63
|
-
// return () => {
|
|
64
|
-
// if (ro && ref.current) ro.unobserve(ref.current);
|
|
65
|
-
// if (!ro) window.removeEventListener("resize", measure);
|
|
66
|
-
// };
|
|
67
|
-
// // We intentionally do not add children to deps to avoid extra runs; ResizeObserver catches updates.
|
|
68
|
-
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
-
// }, [index, setSize]);
|
|
70
|
-
// return <div ref={ref}>{children}</div>;
|
|
71
|
-
// };
|
|
72
|
-
// export default MeasuredItem;
|
|
73
26
|
var react_1 = __importStar(require("react"));
|
|
74
27
|
var MeasuredItem = function (_a) {
|
|
75
28
|
var index = _a.index, setSize = _a.setSize, children = _a.children;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// import React, { useEffect, useRef, useState } from "react";
|
|
3
|
-
// import { Box, Flex, IconButton, Image } from "@chakra-ui/react";
|
|
4
|
-
// import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
|
-
// import { useCustomTheme } from "../../Theme/useCustomTheme";
|
|
6
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
3
|
if (k2 === undefined) k2 = k;
|
|
8
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -36,123 +32,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
36
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
33
|
};
|
|
38
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
// type ImageSliderProps = {
|
|
40
|
-
// images: SliderImage[];
|
|
41
|
-
// interval?: number;
|
|
42
|
-
// isArrow?: boolean;
|
|
43
|
-
// };
|
|
44
|
-
// type SliderImage = {
|
|
45
|
-
// id: string | number;
|
|
46
|
-
// label?: string;
|
|
47
|
-
// previewUrl: string;
|
|
48
|
-
// order: number;
|
|
49
|
-
// };
|
|
50
|
-
// const Slider: React.FC<ImageSliderProps> = ({
|
|
51
|
-
// images,
|
|
52
|
-
// interval = 5000,
|
|
53
|
-
// isArrow = false,
|
|
54
|
-
// }) => {
|
|
55
|
-
// const { colors } = useCustomTheme();
|
|
56
|
-
// const [currentIndex, setCurrentIndex] = useState(0);
|
|
57
|
-
// const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
58
|
-
// const nextSlide = () => setCurrentIndex((prev) => (prev + 1) % images.length);
|
|
59
|
-
// const prevSlide = () =>
|
|
60
|
-
// setCurrentIndex((prev) => (prev - 1 + images.length) % images.length);
|
|
61
|
-
// useEffect(() => {
|
|
62
|
-
// if (interval > 0) {
|
|
63
|
-
// timeoutRef.current = setTimeout(nextSlide, interval);
|
|
64
|
-
// }
|
|
65
|
-
// return () => {
|
|
66
|
-
// if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
67
|
-
// };
|
|
68
|
-
// }, [currentIndex, interval]);
|
|
69
|
-
// return (
|
|
70
|
-
// <Box
|
|
71
|
-
// position="relative"
|
|
72
|
-
// w="100%"
|
|
73
|
-
// h="30rem"
|
|
74
|
-
// overflow="hidden"
|
|
75
|
-
// >
|
|
76
|
-
// <Flex
|
|
77
|
-
// w={`${images.length * 100}vw`}
|
|
78
|
-
// transform={`translateX(-${currentIndex * 100}vw)`}
|
|
79
|
-
// transition="transform 0.5s ease"
|
|
80
|
-
// >
|
|
81
|
-
// {[...images]
|
|
82
|
-
// .sort((a, b) => a.order - b.order)
|
|
83
|
-
// .map((image, idx) => (
|
|
84
|
-
// <Box
|
|
85
|
-
// key={image.id}
|
|
86
|
-
// w="100vw"
|
|
87
|
-
// h="30rem"
|
|
88
|
-
// flexShrink={0}
|
|
89
|
-
// display="flex"
|
|
90
|
-
// justifyContent="center"
|
|
91
|
-
// alignItems="center"
|
|
92
|
-
// >
|
|
93
|
-
// <Image
|
|
94
|
-
// src={image.previewUrl}
|
|
95
|
-
// alt={`Slide ${idx + 1}`}
|
|
96
|
-
// objectFit="cover"
|
|
97
|
-
// w="100vw"
|
|
98
|
-
// h="100%"
|
|
99
|
-
// />
|
|
100
|
-
// </Box>
|
|
101
|
-
// ))}
|
|
102
|
-
// </Flex>
|
|
103
|
-
// {isArrow && (
|
|
104
|
-
// <>
|
|
105
|
-
// <IconButton
|
|
106
|
-
// icon={<ChevronLeft color={colors?.gray?.[800]} />}
|
|
107
|
-
// aria-label="Previous Slide"
|
|
108
|
-
// onClick={prevSlide}
|
|
109
|
-
// position="absolute"
|
|
110
|
-
// top="50%"
|
|
111
|
-
// left="1rem"
|
|
112
|
-
// transform="translateY(-50%)"
|
|
113
|
-
// zIndex={2}
|
|
114
|
-
// variant="ghost"
|
|
115
|
-
// _hover={{ bg: colors?.gray?.[200] }}
|
|
116
|
-
// />
|
|
117
|
-
// <IconButton
|
|
118
|
-
// icon={<ChevronRight color={colors?.gray?.[800]} />}
|
|
119
|
-
// aria-label="Next Slide"
|
|
120
|
-
// onClick={nextSlide}
|
|
121
|
-
// position="absolute"
|
|
122
|
-
// top="50%"
|
|
123
|
-
// right="1rem"
|
|
124
|
-
// transform="translateY(-50%)"
|
|
125
|
-
// zIndex={2}
|
|
126
|
-
// variant="ghost"
|
|
127
|
-
// _hover={{ bg: colors?.gray?.[200] }}
|
|
128
|
-
// />
|
|
129
|
-
// </>
|
|
130
|
-
// )}
|
|
131
|
-
// <Flex
|
|
132
|
-
// position="absolute"
|
|
133
|
-
// bottom="1rem"
|
|
134
|
-
// left="50%"
|
|
135
|
-
// transform="translateX(-50%)"
|
|
136
|
-
// gap="0.5rem"
|
|
137
|
-
// zIndex={2}
|
|
138
|
-
// >
|
|
139
|
-
// {images.map((_, idx) => (
|
|
140
|
-
// <Box
|
|
141
|
-
// key={idx}
|
|
142
|
-
// w="0.8rem"
|
|
143
|
-
// h="0.8rem"
|
|
144
|
-
// bg={idx === currentIndex ? "white" : "whiteAlpha.600"}
|
|
145
|
-
// borderRadius="full"
|
|
146
|
-
// cursor="pointer"
|
|
147
|
-
// onClick={() => setCurrentIndex(idx)}
|
|
148
|
-
// transition="all 0.3s"
|
|
149
|
-
// />
|
|
150
|
-
// ))}
|
|
151
|
-
// </Flex>
|
|
152
|
-
// </Box>
|
|
153
|
-
// );
|
|
154
|
-
// };
|
|
155
|
-
// export default Slider;
|
|
156
35
|
var react_1 = __importStar(require("react"));
|
|
157
36
|
var react_2 = require("@chakra-ui/react");
|
|
158
37
|
var lucide_react_1 = require("lucide-react");
|
|
@@ -90,8 +90,6 @@ var Timeline = function (_a) {
|
|
|
90
90
|
react_1.default.createElement(react_2.Box, { fontSize: "1rem", fontWeight: "400", color: theme.colors.black, bg: theme.colors.gray[50], border: "0.063rem solid ".concat(theme.colors.gray[300]), borderRadius: "0.313rem", px: { base: 3, md: 6 }, py: 1, textAlign: "center", zIndex: 1 }, date)),
|
|
91
91
|
groupedEvents[date].map(function (event, index) {
|
|
92
92
|
var isLeft = index % 2 === 0 && !isMobile;
|
|
93
|
-
// const title = event.title; /* "Updated" | "Created" | Delete*/
|
|
94
|
-
console.log(event, "event");
|
|
95
93
|
return (react_1.default.createElement(react_2.Flex, { key: index, justify: isLeft ? "flex-end" : "flex-start", flexDir: { base: "column", md: "row" }, align: "center", mb: 6, position: "relative", textAlign: { base: "left", md: isLeft ? "left" : "right" } },
|
|
96
94
|
react_1.default.createElement(react_2.Box, { position: "absolute", left: { base: "1.25rem", md: "50%" }, transform: { base: "none", md: "translateX(-50%)" }, w: "1.875rem", h: "1.875rem", bg: theme.colors.gray[50], borderRadius: "full", border: "0.063rem solid ".concat(theme.colors.gray[300]), display: "flex", alignItems: "center", justifyContent: "center", zIndex: 1 }, getIcon(event)),
|
|
97
95
|
react_1.default.createElement(react_2.Text, { position: { base: "relative", md: "absolute" }, left: { md: isLeft ? "38%" : "53%" }, ml: { base: "3.125rem", md: 0 }, color: theme.colors.gray[500] }, formatTimestamp(event.created_at, "time")),
|