@ews-admin/global-design-system 1.26.0 → 1.27.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ews-admin/global-design-system",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "EWS Global Design System - Reusable components for EWS applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { Lock } from "lucide-react";
3
+
4
+ /**
5
+ * The loader is purely presentational: the caller decides when to render it
6
+ * (while the session is validated, fetched or terminated) and provides
7
+ * already-translated labels.
8
+ */
9
+ export interface SecureLoaderProps {
10
+ label: string;
11
+ /** Extra line shown under the label. */
12
+ description?: string;
13
+ }
14
+
15
+ /**
16
+ * Full-screen loader (lock icon with a spinner) shown while the user's
17
+ * session is being checked.
18
+ */
19
+ const SecureLoader: React.FC<SecureLoaderProps> = ({ label, description }) => (
20
+ <div
21
+ data-testid="secure-loader"
22
+ className="flex min-h-screen items-center justify-center bg-gray-100"
23
+ >
24
+ <div className="flex flex-col items-center rounded-lg bg-white p-6 shadow-lg">
25
+ <div className="relative">
26
+ <Lock className="h-16 w-16 text-gray-500" />
27
+ <div className="absolute bottom-2 right-1 h-6 w-6 animate-spin rounded-full border-4 border-gray-300 border-t-green-500"></div>
28
+ </div>
29
+ <p className="mt-4 text-lg text-gray-600">{label}</p>
30
+ {description && (
31
+ <p className="mt-2 text-sm text-gray-500">{description}</p>
32
+ )}
33
+ </div>
34
+ </div>
35
+ );
36
+
37
+ export default SecureLoader;
@@ -0,0 +1,2 @@
1
+ export { default as SecureLoader } from "./SecureLoader";
2
+ export type { SecureLoaderProps } from "./SecureLoader";
package/src/index.ts CHANGED
@@ -52,6 +52,9 @@ export type { TagListProps } from "./components/TagList";
52
52
  export { PaymentDueBanner } from "./components/PaymentDueBanner";
53
53
  export type { PaymentDueBannerProps } from "./components/PaymentDueBanner";
54
54
 
55
+ export { SecureLoader } from "./components/SecureLoader";
56
+ export type { SecureLoaderProps } from "./components/SecureLoader";
57
+
55
58
  // Molecules
56
59
  export { SpecialtySearchAutocomplete } from "./molecules";
57
60
  export type { Specialty, SpecialtySearchAutocompleteProps } from "./molecules";