@chekinapp/ui 0.0.48 → 0.0.49
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.cjs +26 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2105,13 +2105,14 @@ declare function Skeleton({ className, ...props }: SkeletonProps): react_jsx_run
|
|
|
2105
2105
|
type MainLoaderProps = {
|
|
2106
2106
|
visible?: boolean;
|
|
2107
2107
|
label?: string | ReactNode;
|
|
2108
|
-
|
|
2108
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2109
|
+
height?: number | string;
|
|
2109
2110
|
width?: number | string;
|
|
2110
2111
|
position?: 'center';
|
|
2111
2112
|
className?: string;
|
|
2112
2113
|
};
|
|
2113
2114
|
|
|
2114
|
-
declare const CircularLoader: React__default.MemoExoticComponent<({ visible, height, width, position, label, className }: MainLoaderProps) => react_jsx_runtime.JSX.Element | null>;
|
|
2115
|
+
declare const CircularLoader: React__default.MemoExoticComponent<({ visible, size, height, width, position, label, className, }: MainLoaderProps) => react_jsx_runtime.JSX.Element | null>;
|
|
2115
2116
|
|
|
2116
2117
|
type SmallGridSingleItemProps = {
|
|
2117
2118
|
title?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2105,13 +2105,14 @@ declare function Skeleton({ className, ...props }: SkeletonProps): react_jsx_run
|
|
|
2105
2105
|
type MainLoaderProps = {
|
|
2106
2106
|
visible?: boolean;
|
|
2107
2107
|
label?: string | ReactNode;
|
|
2108
|
-
|
|
2108
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2109
|
+
height?: number | string;
|
|
2109
2110
|
width?: number | string;
|
|
2110
2111
|
position?: 'center';
|
|
2111
2112
|
className?: string;
|
|
2112
2113
|
};
|
|
2113
2114
|
|
|
2114
|
-
declare const CircularLoader: React__default.MemoExoticComponent<({ visible, height, width, position, label, className }: MainLoaderProps) => react_jsx_runtime.JSX.Element | null>;
|
|
2115
|
+
declare const CircularLoader: React__default.MemoExoticComponent<({ visible, size, height, width, position, label, className, }: MainLoaderProps) => react_jsx_runtime.JSX.Element | null>;
|
|
2115
2116
|
|
|
2116
2117
|
type SmallGridSingleItemProps = {
|
|
2117
2118
|
title?: string;
|
package/dist/index.js
CHANGED
|
@@ -5956,8 +5956,26 @@ import { memo as memo4 } from "react";
|
|
|
5956
5956
|
// src/circular-loader/CircularLoader.tsx
|
|
5957
5957
|
import React21 from "react";
|
|
5958
5958
|
import { jsx as jsx74, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5959
|
+
var loaderSizePixels = {
|
|
5960
|
+
sm: 16,
|
|
5961
|
+
md: 32,
|
|
5962
|
+
lg: 48
|
|
5963
|
+
};
|
|
5964
|
+
var labelSizeClassName = {
|
|
5965
|
+
sm: "text-xs",
|
|
5966
|
+
md: "text-sm",
|
|
5967
|
+
lg: "text-base"
|
|
5968
|
+
};
|
|
5959
5969
|
var CircularLoader = React21.memo(
|
|
5960
|
-
({
|
|
5970
|
+
({
|
|
5971
|
+
visible = true,
|
|
5972
|
+
size = "md",
|
|
5973
|
+
height,
|
|
5974
|
+
width,
|
|
5975
|
+
position,
|
|
5976
|
+
label,
|
|
5977
|
+
className
|
|
5978
|
+
}) => {
|
|
5961
5979
|
if (!visible) return null;
|
|
5962
5980
|
return /* @__PURE__ */ jsxs47(
|
|
5963
5981
|
"div",
|
|
@@ -5975,8 +5993,8 @@ var CircularLoader = React21.memo(
|
|
|
5975
5993
|
viewBox: "25 25 50 50",
|
|
5976
5994
|
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
5977
5995
|
style: {
|
|
5978
|
-
width: toCssSize(width),
|
|
5979
|
-
height: toCssSize(height)
|
|
5996
|
+
width: toCssSize(width ?? loaderSizePixels[size]),
|
|
5997
|
+
height: toCssSize(height ?? loaderSizePixels[size])
|
|
5980
5998
|
},
|
|
5981
5999
|
children: [
|
|
5982
6000
|
/* @__PURE__ */ jsx74(
|
|
@@ -6042,7 +6060,7 @@ var CircularLoader = React21.memo(
|
|
|
6042
6060
|
]
|
|
6043
6061
|
}
|
|
6044
6062
|
),
|
|
6045
|
-
label && /* @__PURE__ */ jsx74("div", { className: "
|
|
6063
|
+
label && /* @__PURE__ */ jsx74("div", { className: cn(labelSizeClassName[size], "font-medium text-chekin-gray-1"), children: label })
|
|
6046
6064
|
]
|
|
6047
6065
|
}
|
|
6048
6066
|
);
|
|
@@ -6060,14 +6078,7 @@ var ModalLoader = memo4(({ visible, className }) => /* @__PURE__ */ jsx75(
|
|
|
6060
6078
|
visible ? "flex" : "hidden",
|
|
6061
6079
|
className
|
|
6062
6080
|
),
|
|
6063
|
-
children: /* @__PURE__ */ jsx75("div", { className: "mb-[60px]", children: /* @__PURE__ */ jsx75(
|
|
6064
|
-
CircularLoader,
|
|
6065
|
-
{
|
|
6066
|
-
width: 48,
|
|
6067
|
-
height: 48,
|
|
6068
|
-
className: "[--circular-loader-color:#475569]"
|
|
6069
|
-
}
|
|
6070
|
-
) })
|
|
6081
|
+
children: /* @__PURE__ */ jsx75("div", { className: "mb-[60px]", children: /* @__PURE__ */ jsx75(CircularLoader, { size: "lg", className: "[--circular-loader-color:#475569]" }) })
|
|
6071
6082
|
}
|
|
6072
6083
|
));
|
|
6073
6084
|
ModalLoader.displayName = "ModalLoader";
|
|
@@ -6092,7 +6103,7 @@ function OverlayLoader({
|
|
|
6092
6103
|
"absolute inset-0 flex items-center justify-center bg-[rgb(255_255_255_/_0.6)]",
|
|
6093
6104
|
overlayClassName
|
|
6094
6105
|
),
|
|
6095
|
-
children: /* @__PURE__ */ jsx76(CircularLoader, {
|
|
6106
|
+
children: /* @__PURE__ */ jsx76(CircularLoader, { size: "lg", label: label || t("loading") })
|
|
6096
6107
|
}
|
|
6097
6108
|
)
|
|
6098
6109
|
] });
|
|
@@ -6108,7 +6119,7 @@ function PageLoader({ className, description, label }) {
|
|
|
6108
6119
|
{
|
|
6109
6120
|
className: cn("flex min-h-[300px] flex-col items-center justify-center", className),
|
|
6110
6121
|
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col items-center rounded-lg border border-[var(--chekin-color-gray-3)] bg-[rgb(255_255_255_/_0.8)] p-8 shadow-sm backdrop-blur-sm", children: [
|
|
6111
|
-
/* @__PURE__ */ jsx77(CircularLoader, {
|
|
6122
|
+
/* @__PURE__ */ jsx77(CircularLoader, { size: "lg", label: label || t("loading") }),
|
|
6112
6123
|
/* @__PURE__ */ jsx77("p", { className: "mt-4 max-w-xs text-center text-sm text-[var(--chekin-color-gray-1)]", children: description || t("loading_data_description") })
|
|
6113
6124
|
] })
|
|
6114
6125
|
}
|
|
@@ -7269,8 +7280,7 @@ var Section = forwardRef38(
|
|
|
7269
7280
|
loading && showLoader ? /* @__PURE__ */ jsx95(
|
|
7270
7281
|
CircularLoader,
|
|
7271
7282
|
{
|
|
7272
|
-
|
|
7273
|
-
height: 32,
|
|
7283
|
+
size: "md",
|
|
7274
7284
|
label: t("loading"),
|
|
7275
7285
|
className: "mx-auto mb-3 mt-2.5"
|
|
7276
7286
|
}
|