@tirth_jasoliya/ui 1.0.3 → 1.0.5
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 +323 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +317 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
AppMetaProvider: () => AppMetaProvider,
|
|
34
|
+
CurrencyTransfer: () => CurrencyTransfer,
|
|
34
35
|
DataTable: () => DataTable,
|
|
35
36
|
DataTableActionBar: () => DataTableActionBar,
|
|
36
37
|
DataTableActionBarAction: () => DataTableActionBarAction,
|
|
@@ -39,7 +40,12 @@ __export(index_exports, {
|
|
|
39
40
|
DataTemplateActionBar: () => DataTemplateActionBar,
|
|
40
41
|
DataTemplateActionBarAction: () => DataTemplateActionBarAction,
|
|
41
42
|
DataTemplateActionBarSelection: () => DataTemplateActionBarSelection,
|
|
43
|
+
ErrorComponent: () => ErrorComponent,
|
|
42
44
|
GeneralHelper: () => GeneralHelper,
|
|
45
|
+
Loader: () => Loader4,
|
|
46
|
+
NotFound: () => NotFound,
|
|
47
|
+
OfflineUI: () => OfflineUI,
|
|
48
|
+
Unauthorized: () => Unauthorized,
|
|
43
49
|
createLayoutComponents: () => createLayoutComponents,
|
|
44
50
|
createPageTemplateHook: () => createPageTemplateHook,
|
|
45
51
|
createTypedAppMetaContext: () => createTypedAppMetaContext
|
|
@@ -3149,9 +3155,321 @@ var GeneralHelper = class {
|
|
|
3149
3155
|
) });
|
|
3150
3156
|
};
|
|
3151
3157
|
};
|
|
3158
|
+
|
|
3159
|
+
// src/components/core/error.tsx
|
|
3160
|
+
var import_lucide_react19 = require("lucide-react");
|
|
3161
|
+
var import_react_router2 = require("react-router");
|
|
3162
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3163
|
+
var ErrorComponent = () => {
|
|
3164
|
+
const error = (0, import_react_router2.useRouteError)();
|
|
3165
|
+
const navigate = (0, import_react_router2.useNavigate)();
|
|
3166
|
+
const renderErrorDetails = () => {
|
|
3167
|
+
if ((0, import_react_router2.isRouteErrorResponse)(error)) {
|
|
3168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3169
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("h2", { className: "text-3xl font-semibold text-destructive", children: [
|
|
3170
|
+
"Error ",
|
|
3171
|
+
error.status,
|
|
3172
|
+
": ",
|
|
3173
|
+
error.statusText
|
|
3174
|
+
] }),
|
|
3175
|
+
typeof error.data === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "text-lg text-muted-foreground whitespace-pre-wrap max-w-4xl text-left", children: error.data }) : error.data?.message && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "text-lg text-muted-foreground whitespace-pre-wrap max-w-4xl text-left", children: error.data.message })
|
|
3176
|
+
] });
|
|
3177
|
+
}
|
|
3178
|
+
if (error instanceof Error) {
|
|
3179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3180
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { className: "text-3xl font-semibold text-destructive", children: "Unexpected Error" }),
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "text-lg text-muted-foreground whitespace-pre-wrap max-w-4xl text-left", children: error.message }),
|
|
3182
|
+
error.stack && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "mt-2 text-sm text-muted-foreground max-w-4xl text-left", children: [
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer underline", children: "Stack Trace" }),
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "whitespace-pre-wrap", children: error.stack })
|
|
3185
|
+
] })
|
|
3186
|
+
] });
|
|
3187
|
+
}
|
|
3188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3189
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { className: "text-3xl font-semibold text-destructive", children: "Unknown Error" }),
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "text-lg text-muted-foreground whitespace-pre-wrap max-w-4xl text-left", children: typeof error === "string" ? error : JSON.stringify(error, null, 2) })
|
|
3191
|
+
] });
|
|
3192
|
+
};
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "rounded-2xl flex justify-center items-center h-full bg-sidebar px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center space-y-4 text-center", children: [
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react19.AlertTriangleIcon, { className: "h-16 w-16 text-destructive" }),
|
|
3195
|
+
renderErrorDetails(),
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "outline", onClick: () => navigate(-1), children: "Go Back" })
|
|
3197
|
+
] }) });
|
|
3198
|
+
};
|
|
3199
|
+
|
|
3200
|
+
// src/components/core/event-success.tsx
|
|
3201
|
+
var import_framer_motion3 = require("framer-motion");
|
|
3202
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3203
|
+
function Checkmark({ size = 100, strokeWidth = 2, color = "currentColor", className = "" }) {
|
|
3204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3205
|
+
import_framer_motion3.motion.svg,
|
|
3206
|
+
{
|
|
3207
|
+
width: size,
|
|
3208
|
+
height: size,
|
|
3209
|
+
viewBox: "0 0 100 100",
|
|
3210
|
+
initial: "hidden",
|
|
3211
|
+
animate: "visible",
|
|
3212
|
+
className,
|
|
3213
|
+
children: [
|
|
3214
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("title", { children: "Animated Checkmark" }),
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3216
|
+
import_framer_motion3.motion.circle,
|
|
3217
|
+
{
|
|
3218
|
+
cx: "50",
|
|
3219
|
+
cy: "50",
|
|
3220
|
+
r: "40",
|
|
3221
|
+
stroke: color,
|
|
3222
|
+
custom: 0,
|
|
3223
|
+
style: {
|
|
3224
|
+
strokeWidth,
|
|
3225
|
+
strokeLinecap: "round",
|
|
3226
|
+
fill: "transparent"
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
),
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3231
|
+
import_framer_motion3.motion.path,
|
|
3232
|
+
{
|
|
3233
|
+
d: "M30 50L45 65L70 35",
|
|
3234
|
+
stroke: color,
|
|
3235
|
+
custom: 1,
|
|
3236
|
+
style: {
|
|
3237
|
+
strokeWidth,
|
|
3238
|
+
strokeLinecap: "round",
|
|
3239
|
+
strokeLinejoin: "round",
|
|
3240
|
+
fill: "transparent"
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
)
|
|
3244
|
+
]
|
|
3245
|
+
}
|
|
3246
|
+
);
|
|
3247
|
+
}
|
|
3248
|
+
function CurrencyTransfer() {
|
|
3249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card, { className: "w-full max-w-sm mx-auto p-6 min-h-[300px] flex flex-col justify-center bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CardContent, { className: "space-y-4 flex flex-col items-center justify-center", children: [
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3251
|
+
import_framer_motion3.motion.div,
|
|
3252
|
+
{
|
|
3253
|
+
className: "flex justify-center",
|
|
3254
|
+
initial: { opacity: 0, scale: 0.8 },
|
|
3255
|
+
animate: { opacity: 1, scale: 1 },
|
|
3256
|
+
transition: {
|
|
3257
|
+
duration: 0.4,
|
|
3258
|
+
ease: [0.4, 0, 0.2, 1],
|
|
3259
|
+
scale: {
|
|
3260
|
+
type: "spring",
|
|
3261
|
+
damping: 15,
|
|
3262
|
+
stiffness: 200
|
|
3263
|
+
}
|
|
3264
|
+
},
|
|
3265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative", children: [
|
|
3266
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3267
|
+
import_framer_motion3.motion.div,
|
|
3268
|
+
{
|
|
3269
|
+
className: "absolute inset-0 bg-primary/5 rounded-full",
|
|
3270
|
+
initial: { opacity: 0, scale: 0.8 },
|
|
3271
|
+
animate: { opacity: 1, scale: 1 },
|
|
3272
|
+
transition: {
|
|
3273
|
+
delay: 0.2,
|
|
3274
|
+
duration: 0.8,
|
|
3275
|
+
ease: "circOut"
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
),
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3280
|
+
Checkmark,
|
|
3281
|
+
{
|
|
3282
|
+
size: 80,
|
|
3283
|
+
strokeWidth: 4,
|
|
3284
|
+
color: "rgb(16 185 129)",
|
|
3285
|
+
className: "relative z-10 dark:drop-shadow-[0_0_10px_rgba(0,0,0,0.1)]"
|
|
3286
|
+
}
|
|
3287
|
+
)
|
|
3288
|
+
] })
|
|
3289
|
+
}
|
|
3290
|
+
),
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3292
|
+
import_framer_motion3.motion.div,
|
|
3293
|
+
{
|
|
3294
|
+
className: "space-y-2 text-center w-full",
|
|
3295
|
+
initial: { opacity: 0, y: 10 },
|
|
3296
|
+
animate: { opacity: 1, y: 0 },
|
|
3297
|
+
transition: {
|
|
3298
|
+
delay: 0.2,
|
|
3299
|
+
duration: 0.6,
|
|
3300
|
+
ease: [0.4, 0, 0.2, 1]
|
|
3301
|
+
},
|
|
3302
|
+
children: [
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3304
|
+
import_framer_motion3.motion.h2,
|
|
3305
|
+
{
|
|
3306
|
+
className: "text-lg text-zinc-100 dark:text-zinc-900 tracking-tighter font-semibold uppercase",
|
|
3307
|
+
initial: { opacity: 0, y: 5 },
|
|
3308
|
+
animate: { opacity: 1, y: 0 },
|
|
3309
|
+
transition: { delay: 1, duration: 0.4 },
|
|
3310
|
+
children: "Transfer Successful"
|
|
3311
|
+
}
|
|
3312
|
+
),
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3314
|
+
import_framer_motion3.motion.div,
|
|
3315
|
+
{
|
|
3316
|
+
className: "flex-1 bg-zinc-800/50 dark:bg-zinc-50/50 rounded-xl p-3 border border-zinc-700/50 dark:border-zinc-200/50 backdrop-blur-md",
|
|
3317
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
3318
|
+
animate: { opacity: 1, scale: 1 },
|
|
3319
|
+
transition: {
|
|
3320
|
+
delay: 1.2,
|
|
3321
|
+
duration: 0.4,
|
|
3322
|
+
ease: [0.4, 0, 0.2, 1]
|
|
3323
|
+
},
|
|
3324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1.5", children: [
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "text-xs font-medium text-secondary-foreground flex items-center gap-1.5", children: [
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3328
|
+
"svg",
|
|
3329
|
+
{
|
|
3330
|
+
className: "w-3 h-3",
|
|
3331
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3332
|
+
viewBox: "0 0 24 24",
|
|
3333
|
+
fill: "none",
|
|
3334
|
+
stroke: "currentColor",
|
|
3335
|
+
strokeWidth: "2",
|
|
3336
|
+
strokeLinecap: "round",
|
|
3337
|
+
strokeLinejoin: "round",
|
|
3338
|
+
children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("title", { children: "From" }),
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M12 19V5M5 12l7-7 7 7" })
|
|
3341
|
+
]
|
|
3342
|
+
}
|
|
3343
|
+
),
|
|
3344
|
+
"From"
|
|
3345
|
+
] }),
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2.5 group transition-all", children: [
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "inline-flex items-center justify-center w-7 h-7 rounded-lg bg-zinc-900 dark:bg-white shadow-lg border border-zinc-700 dark:border-zinc-300 text-sm font-medium text-zinc-100 dark:text-zinc-900 group-hover:scale-105 transition-transform", children: "$" }),
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-medium text-zinc-100 dark:text-zinc-900 tracking-tight", children: "500.00 USD" })
|
|
3349
|
+
] })
|
|
3350
|
+
] }),
|
|
3351
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-full h-px bg-gradient-to-r from-transparent via-zinc-700 dark:via-zinc-300 to-transparent" }),
|
|
3352
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1.5", children: [
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "text-xs font-medium text-secondary-foreground flex items-center gap-1.5", children: [
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3355
|
+
"svg",
|
|
3356
|
+
{
|
|
3357
|
+
className: "w-3 h-3",
|
|
3358
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3359
|
+
viewBox: "0 0 24 24",
|
|
3360
|
+
fill: "none",
|
|
3361
|
+
stroke: "currentColor",
|
|
3362
|
+
strokeWidth: "2",
|
|
3363
|
+
strokeLinecap: "round",
|
|
3364
|
+
strokeLinejoin: "round",
|
|
3365
|
+
children: [
|
|
3366
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("title", { children: "To" }),
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M12 5v14M5 12l7 7 7-7" })
|
|
3368
|
+
]
|
|
3369
|
+
}
|
|
3370
|
+
),
|
|
3371
|
+
"To"
|
|
3372
|
+
] }),
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2.5 group transition-all", children: [
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "inline-flex items-center justify-center w-7 h-7 rounded-lg bg-zinc-900 dark:bg-white shadow-lg border border-zinc-700 dark:border-zinc-300 text-sm font-medium text-zinc-100 dark:text-zinc-900 group-hover:scale-105 transition-transform", children: "\u20AC" }),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-medium text-zinc-100 dark:text-zinc-900 tracking-tight", children: "460.00 EUR" })
|
|
3376
|
+
] })
|
|
3377
|
+
] })
|
|
3378
|
+
] })
|
|
3379
|
+
}
|
|
3380
|
+
) }),
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3382
|
+
import_framer_motion3.motion.div,
|
|
3383
|
+
{
|
|
3384
|
+
className: "w-full text-xs text-secondary-foreground mt-2 text-center",
|
|
3385
|
+
initial: { opacity: 0 },
|
|
3386
|
+
animate: { opacity: 1 },
|
|
3387
|
+
transition: { delay: 1.4, duration: 0.4 },
|
|
3388
|
+
children: "Exchange Rate: 1 USD = 0.92 EUR"
|
|
3389
|
+
}
|
|
3390
|
+
)
|
|
3391
|
+
]
|
|
3392
|
+
}
|
|
3393
|
+
)
|
|
3394
|
+
] }) });
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3397
|
+
// src/components/core/loader.tsx
|
|
3398
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3399
|
+
var Loader4 = () => {
|
|
3400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "rounded-2xl flex justify-center items-center h-full bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col items-center space-y-4", children: [
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "animate-spin rounded-full border-t-4 border-ring h-16 w-16 mb-4" }),
|
|
3402
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h2", { className: "text-xl font-semibold text-muted-foreground", children: "Loading, please wait..." }),
|
|
3403
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm text-muted-foreground", children: "Your content is on its way." })
|
|
3404
|
+
] }) });
|
|
3405
|
+
};
|
|
3406
|
+
|
|
3407
|
+
// src/components/core/notfound.tsx
|
|
3408
|
+
var import_react_router3 = require("react-router");
|
|
3409
|
+
var import_lucide_react20 = require("lucide-react");
|
|
3410
|
+
var import_react_router4 = require("react-router");
|
|
3411
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3412
|
+
var NotFound = () => {
|
|
3413
|
+
const location = (0, import_react_router3.useLocation)();
|
|
3414
|
+
const navigate = (0, import_react_router4.useNavigate)();
|
|
3415
|
+
const goBack = () => {
|
|
3416
|
+
if (window.history.length > 2) {
|
|
3417
|
+
navigate(-1);
|
|
3418
|
+
} else {
|
|
3419
|
+
navigate("/");
|
|
3420
|
+
}
|
|
3421
|
+
};
|
|
3422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "rounded-2xl flex flex-col items-center justify-center h-full p-6 text-center bg-sidebar text-muted-foreground select-none", children: [
|
|
3423
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react20.GhostIcon, { className: "h-15 w-15 text-destructive mb-4" }),
|
|
3424
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h1", { className: "text-2xl font-bold text-destructive mb-2", children: "Page Not Found" }),
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: "text-xl mb-4", children: [
|
|
3426
|
+
"The page ",
|
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("code", { className: "px-1 py-0.5 rounded bg-muted text-foreground", children: location.pathname }),
|
|
3428
|
+
" doesn't exist or has been moved."
|
|
3429
|
+
] }),
|
|
3430
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex space-x-4", children: [
|
|
3431
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { variant: "outline", onClick: goBack, children: "Go Back" }),
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_router4.NavLink, { to: "/", children: "Return Home" }) })
|
|
3433
|
+
] })
|
|
3434
|
+
] });
|
|
3435
|
+
};
|
|
3436
|
+
|
|
3437
|
+
// src/components/core/offline-content.tsx
|
|
3438
|
+
var import_lucide_react21 = require("lucide-react");
|
|
3439
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3440
|
+
var OfflineUI = () => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "rounded-2xl flex flex-col items-center justify-center h-screen p-6 text-center text-muted-foreground bg-background select-none", children: [
|
|
3441
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.WifiOffIcon, { className: "h-15 w-15 text-destructive mb-4" }),
|
|
3442
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "text-3xl font-bold text-destructive mb-2", children: "You're offline" }),
|
|
3443
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-xl max-w-md", children: "We couldn't connect to the server." })
|
|
3444
|
+
] });
|
|
3445
|
+
|
|
3446
|
+
// src/components/core/unauthorized.tsx
|
|
3447
|
+
var import_lucide_react22 = require("lucide-react");
|
|
3448
|
+
var import_react_router5 = require("react-router");
|
|
3449
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3450
|
+
var Unauthorized = () => {
|
|
3451
|
+
const navigate = (0, import_react_router5.useNavigate)();
|
|
3452
|
+
const goBack = () => {
|
|
3453
|
+
if (window.history.length > 2) {
|
|
3454
|
+
navigate(-1);
|
|
3455
|
+
} else {
|
|
3456
|
+
navigate("/");
|
|
3457
|
+
}
|
|
3458
|
+
};
|
|
3459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "rounded-2xl flex flex-col items-center justify-center h-full p-6 text-center bg-sidebar text-muted-foreground select-none", children: [
|
|
3460
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react22.ShieldOffIcon, { className: "h-15 w-15 text-destructive mb-4" }),
|
|
3461
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h1", { className: "text-2xl font-bold text-destructive mb-2", children: "Access Denied" }),
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-xl mb-4", children: "You don't have permission to view this page. Please sign in with an authorized account or contact your administrator." }),
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex space-x-4", children: [
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { variant: "outline", onClick: goBack, children: "Go Back" }),
|
|
3465
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_router5.NavLink, { to: "/", children: "Go to Home" }) })
|
|
3466
|
+
] })
|
|
3467
|
+
] });
|
|
3468
|
+
};
|
|
3152
3469
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3153
3470
|
0 && (module.exports = {
|
|
3154
3471
|
AppMetaProvider,
|
|
3472
|
+
CurrencyTransfer,
|
|
3155
3473
|
DataTable,
|
|
3156
3474
|
DataTableActionBar,
|
|
3157
3475
|
DataTableActionBarAction,
|
|
@@ -3160,7 +3478,12 @@ var GeneralHelper = class {
|
|
|
3160
3478
|
DataTemplateActionBar,
|
|
3161
3479
|
DataTemplateActionBarAction,
|
|
3162
3480
|
DataTemplateActionBarSelection,
|
|
3481
|
+
ErrorComponent,
|
|
3163
3482
|
GeneralHelper,
|
|
3483
|
+
Loader,
|
|
3484
|
+
NotFound,
|
|
3485
|
+
OfflineUI,
|
|
3486
|
+
Unauthorized,
|
|
3164
3487
|
createLayoutComponents,
|
|
3165
3488
|
createPageTemplateHook,
|
|
3166
3489
|
createTypedAppMetaContext
|