@nibssplc/cams-sdk-react 1.0.0-rc.60 → 1.0.0-rc.62
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/ui/button.d.ts +8 -8
- package/dist/components/ui/card.d.ts +7 -7
- package/dist/index.cjs.js +42 -64
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +42 -64
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/styles.d.ts +0 -42
package/dist/index.esm.js
CHANGED
|
@@ -14,6 +14,7 @@ import { clsx } from 'clsx';
|
|
|
14
14
|
import { twMerge } from 'tailwind-merge';
|
|
15
15
|
import { Slot } from '@radix-ui/react-slot';
|
|
16
16
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
17
|
+
import { cva } from 'class-variance-authority';
|
|
17
18
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
18
19
|
import { toast } from 'sonner';
|
|
19
20
|
import { motion } from 'framer-motion';
|
|
@@ -1282,77 +1283,33 @@ function FormMessage(_a) {
|
|
|
1282
1283
|
return (jsx("p", __assign({ "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-sm", className) }, props, { children: body })));
|
|
1283
1284
|
}
|
|
1284
1285
|
|
|
1285
|
-
// CSS-in-JS styles to replace Tailwind classes for maximum compatibility
|
|
1286
|
-
var styles = {
|
|
1287
|
-
button: {
|
|
1288
|
-
base: {
|
|
1289
|
-
display: 'inline-flex',
|
|
1290
|
-
alignItems: 'center',
|
|
1291
|
-
justifyContent: 'center',
|
|
1292
|
-
gap: '0.5rem',
|
|
1293
|
-
whiteSpace: 'nowrap',
|
|
1294
|
-
borderRadius: '0.375rem',
|
|
1295
|
-
fontSize: '0.875rem',
|
|
1296
|
-
fontWeight: '500',
|
|
1297
|
-
transition: 'all 0.2s',
|
|
1298
|
-
outline: 'none',
|
|
1299
|
-
cursor: 'pointer',
|
|
1300
|
-
border: 'none',
|
|
1301
|
-
},
|
|
1302
|
-
variants: {
|
|
1303
|
-
default: {
|
|
1304
|
-
backgroundColor: '#3b82f6',
|
|
1305
|
-
color: 'white',
|
|
1306
|
-
padding: '0.5rem 1rem',
|
|
1307
|
-
height: '2.25rem',
|
|
1308
|
-
},
|
|
1309
|
-
outline: {
|
|
1310
|
-
backgroundColor: 'transparent',
|
|
1311
|
-
border: '1px solid #d1d5db',
|
|
1312
|
-
color: '#374151',
|
|
1313
|
-
padding: '0.5rem 1rem',
|
|
1314
|
-
height: '2.25rem',
|
|
1315
|
-
},
|
|
1316
|
-
},
|
|
1317
|
-
},
|
|
1318
|
-
card: {
|
|
1319
|
-
base: {
|
|
1320
|
-
backgroundColor: 'white',
|
|
1321
|
-
border: '1px solid #e5e7eb',
|
|
1322
|
-
borderRadius: '0.75rem',
|
|
1323
|
-
padding: '1.5rem',
|
|
1324
|
-
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1)',
|
|
1325
|
-
},
|
|
1326
|
-
},
|
|
1327
|
-
};
|
|
1328
|
-
|
|
1329
1286
|
function Card(_a) {
|
|
1330
|
-
var
|
|
1331
|
-
return (jsx("div", __assign({ "data-slot": "card",
|
|
1287
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1288
|
+
return (jsx("div", __assign({ "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className) }, props)));
|
|
1332
1289
|
}
|
|
1333
1290
|
function CardHeader(_a) {
|
|
1334
|
-
var
|
|
1335
|
-
return (jsx("div", __assign({ "data-slot": "card-header",
|
|
1291
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1292
|
+
return (jsx("div", __assign({ "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className) }, props)));
|
|
1336
1293
|
}
|
|
1337
1294
|
function CardTitle(_a) {
|
|
1338
|
-
var
|
|
1339
|
-
return (jsx("div", __assign({ "data-slot": "card-title",
|
|
1295
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1296
|
+
return (jsx("div", __assign({ "data-slot": "card-title", className: cn("leading-none font-semibold", className) }, props)));
|
|
1340
1297
|
}
|
|
1341
1298
|
function CardDescription(_a) {
|
|
1342
|
-
var
|
|
1343
|
-
return (jsx("div", __assign({ "data-slot": "card-description",
|
|
1299
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1300
|
+
return (jsx("div", __assign({ "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
1344
1301
|
}
|
|
1345
1302
|
function CardAction(_a) {
|
|
1346
|
-
var
|
|
1347
|
-
return (jsx("div", __assign({ "data-slot": "card-action",
|
|
1303
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1304
|
+
return (jsx("div", __assign({ "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className) }, props)));
|
|
1348
1305
|
}
|
|
1349
1306
|
function CardContent(_a) {
|
|
1350
|
-
var
|
|
1351
|
-
return (jsx("div", __assign({ "data-slot": "card-content",
|
|
1307
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1308
|
+
return (jsx("div", __assign({ "data-slot": "card-content", className: cn("px-6", className) }, props)));
|
|
1352
1309
|
}
|
|
1353
1310
|
function CardFooter(_a) {
|
|
1354
|
-
var
|
|
1355
|
-
return (jsx("div", __assign({ "data-slot": "card-footer",
|
|
1311
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
1312
|
+
return (jsx("div", __assign({ "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className) }, props)));
|
|
1356
1313
|
}
|
|
1357
1314
|
|
|
1358
1315
|
var GenericOTPVerifier = function (_a) {
|
|
@@ -1385,11 +1342,32 @@ var OTPAuthenticationImg = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2F
|
|
|
1385
1342
|
|
|
1386
1343
|
var MicrosoftAuthenticatorImg = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20fill%3D%22%23228BE6%22%20version%3D%221.1%22%20baseProfile%3D%22basic%22%20id%3D%22%26%23x421%3B%26%23x43B%3B%26%23x43E%3B%26%23x439%3B_1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2050%2050%22%20%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20marker-start%3D%22none%22%20marker-end%3D%22none%22%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A79.8403%3B%22%20d%3D%22%20M25.001%2C48.001c-9.877%2C0-19-14.025-19-26c0-7.007%2C7.025-9%2C19-9c11.975%2C0%2C19%2C1.993%2C19%2C9C44.001%2C33.975%2C34.878%2C48.001%2C25.001%2C48.001z%22%20%2F%3E%3Cpath%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A79.8403%3B%22%20d%3D%22%20M12.009%2C14.495c0.235-6.781%2C5.185-12.495%2C12.992-12.495c7.805%2C0%2C12.756%2C5.713%2C12.991%2C12.495%22%2F%3E%3Cpath%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A79.8403%3B%22%20d%3D%22%20M17.205%2C13.394c0.761-3.087%2C3.597-6.393%2C7.796-6.393c4.197%2C0%2C7.033%2C3.307%2C7.795%2C6.393%22%2F%3E%3Cpath%20marker-start%3D%22none%22%20marker-end%3D%22none%22%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A79.8403%3B%22%20d%3D%22%20M24.995%2C17.011c3.304%2C0%2C5.987%2C2.681%2C5.987%2C5.984c0%2C3.303-2.683%2C5.984-5.987%2C5.984c-3.304%2C0-5.987-2.681-5.987-5.984%20C19.009%2C19.693%2C21.691%2C17.011%2C24.995%2C17.011z%22%2F%3E%3Cpath%20style%3D%22fill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A79.8403%3B%22%20d%3D%22%20M37.017%2C41.054c-2.4-4.805-6.885-8.041-12.016-8.041c-5.133%2C0-9.617%2C3.235-12.017%2C8.04%22%2F%3E%3C%2Fsvg%3E";
|
|
1387
1344
|
|
|
1345
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
1346
|
+
variants: {
|
|
1347
|
+
variant: {
|
|
1348
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1349
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
1350
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
1351
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1352
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1353
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
1354
|
+
},
|
|
1355
|
+
size: {
|
|
1356
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
1357
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
1358
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1359
|
+
icon: "size-9",
|
|
1360
|
+
},
|
|
1361
|
+
},
|
|
1362
|
+
defaultVariants: {
|
|
1363
|
+
variant: "default",
|
|
1364
|
+
size: "default",
|
|
1365
|
+
},
|
|
1366
|
+
});
|
|
1388
1367
|
function Button(_a) {
|
|
1389
|
-
var
|
|
1368
|
+
var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
1390
1369
|
var Comp = asChild ? Slot : "button";
|
|
1391
|
-
|
|
1392
|
-
return (jsx(Comp, __assign({ "data-slot": "button", style: buttonStyle }, props)));
|
|
1370
|
+
return (jsx(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
|
|
1393
1371
|
}
|
|
1394
1372
|
|
|
1395
1373
|
function Dialog(_a) {
|
|
@@ -1421,7 +1399,7 @@ var a="container_f782f4",i="inner_37f4c9",c="bar_409d0f";const r=({size:r=35,col
|
|
|
1421
1399
|
|
|
1422
1400
|
var LoadingSpinner = function (_a) {
|
|
1423
1401
|
var loadingText = _a.loadingText;
|
|
1424
|
-
return (jsxs("div", {
|
|
1402
|
+
return (jsxs("div", { className: "flex flex-col justify-center items-center h-full w-full py-10", children: [jsx("script", { type: "module", defer: true, src: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/waveform.js" }), jsx(r, { size: "35", stroke: "3.5", speed: "1", color: "green" }), loadingText && (jsx("p", { className: "text-center font-semibold mt-3", children: "Loading..." }))] }));
|
|
1425
1403
|
};
|
|
1426
1404
|
|
|
1427
1405
|
var AuthSuccessAnimation = function (_a) {
|
|
@@ -1978,7 +1956,7 @@ var DefaultLoginPage = function (_a) {
|
|
|
1978
1956
|
|
|
1979
1957
|
var ErrorFallback = function (_a) {
|
|
1980
1958
|
var message = _a.message;
|
|
1981
|
-
return (jsx("div", {
|
|
1959
|
+
return (jsx("div", { className: "flex items-center justify-center min-h-screen bg-gray-50", children: jsxs("div", { className: "bg-white p-6 rounded-lg shadow-lg border border-red-200 max-w-md", children: [jsxs("div", { className: "flex items-center gap-3 mb-2", children: [jsx("svg", { className: "w-6 h-6 text-red-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), jsx("h2", { className: "text-lg font-semibold text-gray-900", children: "Configuration Error" })] }), jsx("p", { className: "text-red-600", children: message })] }) }));
|
|
1982
1960
|
};
|
|
1983
1961
|
|
|
1984
1962
|
var MFAEndpointsSchema = z$1.object({
|
|
@@ -1989,7 +1967,7 @@ var MFAEndpointsSchema = z$1.object({
|
|
|
1989
1967
|
AuthChallengeVerify: z$1.url("MFA AuthChallengeVerify must be a valid URL"),
|
|
1990
1968
|
});
|
|
1991
1969
|
var MFAGate = function (_a) {
|
|
1992
|
-
var children = _a.children, _b = _a.fallback, fallback = _b === void 0 ? jsx("div", {
|
|
1970
|
+
var children = _a.children, _b = _a.fallback, fallback = _b === void 0 ? jsx("div", { className: 'h-screen flex items-center justify-center', children: jsx(LoadingSpinner, {}) }) : _b,
|
|
1993
1971
|
// loginComponent: LoginComponent = DefaultLoginPage,
|
|
1994
1972
|
_c = _a.usePassKey,
|
|
1995
1973
|
// loginComponent: LoginComponent = DefaultLoginPage,
|