@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.cjs
CHANGED
|
@@ -6269,8 +6269,26 @@ var import_react49 = require("react");
|
|
|
6269
6269
|
// src/circular-loader/CircularLoader.tsx
|
|
6270
6270
|
var import_react48 = __toESM(require("react"), 1);
|
|
6271
6271
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6272
|
+
var loaderSizePixels = {
|
|
6273
|
+
sm: 16,
|
|
6274
|
+
md: 32,
|
|
6275
|
+
lg: 48
|
|
6276
|
+
};
|
|
6277
|
+
var labelSizeClassName = {
|
|
6278
|
+
sm: "text-xs",
|
|
6279
|
+
md: "text-sm",
|
|
6280
|
+
lg: "text-base"
|
|
6281
|
+
};
|
|
6272
6282
|
var CircularLoader = import_react48.default.memo(
|
|
6273
|
-
({
|
|
6283
|
+
({
|
|
6284
|
+
visible = true,
|
|
6285
|
+
size = "md",
|
|
6286
|
+
height,
|
|
6287
|
+
width,
|
|
6288
|
+
position,
|
|
6289
|
+
label,
|
|
6290
|
+
className
|
|
6291
|
+
}) => {
|
|
6274
6292
|
if (!visible) return null;
|
|
6275
6293
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6276
6294
|
"div",
|
|
@@ -6288,8 +6306,8 @@ var CircularLoader = import_react48.default.memo(
|
|
|
6288
6306
|
viewBox: "25 25 50 50",
|
|
6289
6307
|
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
6290
6308
|
style: {
|
|
6291
|
-
width: toCssSize(width),
|
|
6292
|
-
height: toCssSize(height)
|
|
6309
|
+
width: toCssSize(width ?? loaderSizePixels[size]),
|
|
6310
|
+
height: toCssSize(height ?? loaderSizePixels[size])
|
|
6293
6311
|
},
|
|
6294
6312
|
children: [
|
|
6295
6313
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
@@ -6355,7 +6373,7 @@ var CircularLoader = import_react48.default.memo(
|
|
|
6355
6373
|
]
|
|
6356
6374
|
}
|
|
6357
6375
|
),
|
|
6358
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "
|
|
6376
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: cn(labelSizeClassName[size], "font-medium text-chekin-gray-1"), children: label })
|
|
6359
6377
|
]
|
|
6360
6378
|
}
|
|
6361
6379
|
);
|
|
@@ -6373,14 +6391,7 @@ var ModalLoader = (0, import_react49.memo)(({ visible, className }) => /* @__PUR
|
|
|
6373
6391
|
visible ? "flex" : "hidden",
|
|
6374
6392
|
className
|
|
6375
6393
|
),
|
|
6376
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "mb-[60px]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6377
|
-
CircularLoader,
|
|
6378
|
-
{
|
|
6379
|
-
width: 48,
|
|
6380
|
-
height: 48,
|
|
6381
|
-
className: "[--circular-loader-color:#475569]"
|
|
6382
|
-
}
|
|
6383
|
-
) })
|
|
6394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "mb-[60px]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CircularLoader, { size: "lg", className: "[--circular-loader-color:#475569]" }) })
|
|
6384
6395
|
}
|
|
6385
6396
|
));
|
|
6386
6397
|
ModalLoader.displayName = "ModalLoader";
|
|
@@ -6405,7 +6416,7 @@ function OverlayLoader({
|
|
|
6405
6416
|
"absolute inset-0 flex items-center justify-center bg-[rgb(255_255_255_/_0.6)]",
|
|
6406
6417
|
overlayClassName
|
|
6407
6418
|
),
|
|
6408
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CircularLoader, {
|
|
6419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CircularLoader, { size: "lg", label: label || t("loading") })
|
|
6409
6420
|
}
|
|
6410
6421
|
)
|
|
6411
6422
|
] });
|
|
@@ -6421,7 +6432,7 @@ function PageLoader({ className, description, label }) {
|
|
|
6421
6432
|
{
|
|
6422
6433
|
className: cn("flex min-h-[300px] flex-col items-center justify-center", className),
|
|
6423
6434
|
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("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: [
|
|
6424
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CircularLoader, {
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CircularLoader, { size: "lg", label: label || t("loading") }),
|
|
6425
6436
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "mt-4 max-w-xs text-center text-sm text-[var(--chekin-color-gray-1)]", children: description || t("loading_data_description") })
|
|
6426
6437
|
] })
|
|
6427
6438
|
}
|
|
@@ -7582,8 +7593,7 @@ var Section = (0, import_react55.forwardRef)(
|
|
|
7582
7593
|
loading && showLoader ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7583
7594
|
CircularLoader,
|
|
7584
7595
|
{
|
|
7585
|
-
|
|
7586
|
-
height: 32,
|
|
7596
|
+
size: "md",
|
|
7587
7597
|
label: t("loading"),
|
|
7588
7598
|
className: "mx-auto mb-3 mt-2.5"
|
|
7589
7599
|
}
|