soliq-design-system 1.0.2
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/NotFound/NotFound.d.ts +20 -0
- package/dist/NotFound/NotFound.js +56 -0
- package/dist/NotFound/NotFound.styles.d.ts +1 -0
- package/dist/NotFound/NotFound.styles.js +346 -0
- package/dist/NotFound/index.d.ts +1 -0
- package/dist/NotFound/index.js +1 -0
- package/dist/NotFound.d.ts +1 -0
- package/dist/NotFound.js +1 -0
- package/dist/SessionExpired/SessionExpired.d.ts +20 -0
- package/dist/SessionExpired/SessionExpired.js +56 -0
- package/dist/SessionExpired/SessionExpired.styles.d.ts +1 -0
- package/dist/SessionExpired/SessionExpired.styles.js +355 -0
- package/dist/SessionExpired/index.d.ts +1 -0
- package/dist/SessionExpired/index.js +1 -0
- package/dist/SessionExpired.d.ts +1 -0
- package/dist/SessionExpired.js +1 -0
- package/dist/SoliqLoader/SoliqLoader.d.ts +10 -0
- package/dist/SoliqLoader/SoliqLoader.js +12 -0
- package/dist/SoliqLoader/SoliqLoader.styles.d.ts +1 -0
- package/dist/SoliqLoader/SoliqLoader.styles.js +347 -0
- package/dist/SoliqLoader/index.d.ts +1 -0
- package/dist/SoliqLoader/index.js +1 -0
- package/dist/SoliqLoader.d.ts +1 -0
- package/dist/SoliqLoader.js +1 -0
- package/dist/ThemeToggleTransition/ThemeToggleTransition.d.ts +9 -0
- package/dist/ThemeToggleTransition/ThemeToggleTransition.js +86 -0
- package/dist/ThemeToggleTransition/ThemeToggleTransition.styles.d.ts +1 -0
- package/dist/ThemeToggleTransition/ThemeToggleTransition.styles.js +454 -0
- package/dist/ThemeToggleTransition/index.d.ts +1 -0
- package/dist/ThemeToggleTransition/index.js +1 -0
- package/dist/ThemeToggleTransition.d.ts +1 -0
- package/dist/ThemeToggleTransition.js +1 -0
- package/dist/assets/images/logo.svg +9 -0
- package/dist/assets/images/moon.svg +13 -0
- package/dist/assets/images/sun.svg +73 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package.json +31 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MouseEventHandler } from "react";
|
|
2
|
+
type NotFoundMode = "light" | "dark" | "auto";
|
|
3
|
+
export interface NotFoundProps {
|
|
4
|
+
mode?: NotFoundMode;
|
|
5
|
+
fullScreen?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
actionLabel?: string;
|
|
9
|
+
brandLabel?: string;
|
|
10
|
+
showCountdown?: boolean;
|
|
11
|
+
countdownText?: string;
|
|
12
|
+
countdownSeconds?: number;
|
|
13
|
+
autoRedirectOnEnd?: boolean;
|
|
14
|
+
onCountdownEnd?: () => void;
|
|
15
|
+
onActionClick?: MouseEventHandler<HTMLButtonElement>;
|
|
16
|
+
actionHref?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function NotFound({ mode, fullScreen, title, subtitle, actionLabel, brandLabel, showCountdown, countdownText, countdownSeconds, autoRedirectOnEnd, onCountdownEnd, onActionClick, actionHref, className }: NotFoundProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import logoUrl from "../assets/images/logo.svg";
|
|
4
|
+
import { styles } from "./NotFound.styles";
|
|
5
|
+
function QuestionIcon() {
|
|
6
|
+
return (_jsxs("svg", { className: "not-found__icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M12 16.2V18.2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }), _jsx("path", { d: "M9.6 9.8C9.6 8.47 10.67 7.4 12 7.4C13.33 7.4 14.4 8.47 14.4 9.8C14.4 10.64 13.97 11.28 13.05 11.87C12.28 12.37 12 12.76 12 13.5V14", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })] }));
|
|
7
|
+
}
|
|
8
|
+
export function NotFound({ mode = "auto", fullScreen = true, title = "САҲИФА ТОПИЛМАДИ", subtitle = "Сўралган саҳифа манзили нотўғри ёки у ўчирилган бўлиши мумкин.", actionLabel = "БОШ САҲИФАГА ҚАЙТИШ", brandLabel = "ДАВЛАТ СОЛИҚ ҚЎМИТАСИ", showCountdown = false, countdownText = "ичида бош саҳифага ўтасиз", countdownSeconds = 60, autoRedirectOnEnd = false, onCountdownEnd, onActionClick, actionHref, className }) {
|
|
9
|
+
const fullClass = fullScreen ? " not-found--fullscreen" : "";
|
|
10
|
+
const userClass = className ? ` ${className}` : "";
|
|
11
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
12
|
+
const hiddenClass = isVisible ? "" : " not-found--hidden";
|
|
13
|
+
const safeCountdownSeconds = Math.max(1, countdownSeconds);
|
|
14
|
+
const [remainingSeconds, setRemainingSeconds] = useState(safeCountdownSeconds);
|
|
15
|
+
const handledEndRef = useRef(false);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setRemainingSeconds(safeCountdownSeconds);
|
|
18
|
+
handledEndRef.current = false;
|
|
19
|
+
}, [safeCountdownSeconds]);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const rafId = window.requestAnimationFrame(() => {
|
|
22
|
+
setIsVisible(true);
|
|
23
|
+
});
|
|
24
|
+
return () => window.cancelAnimationFrame(rafId);
|
|
25
|
+
}, []);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!showCountdown || remainingSeconds <= 0 || handledEndRef.current) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const timeoutId = window.setTimeout(() => {
|
|
31
|
+
setRemainingSeconds((prev) => Math.max(prev - 1, 0));
|
|
32
|
+
}, 1000);
|
|
33
|
+
return () => window.clearTimeout(timeoutId);
|
|
34
|
+
}, [remainingSeconds, showCountdown]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!showCountdown || remainingSeconds > 0 || handledEndRef.current) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
handledEndRef.current = true;
|
|
40
|
+
onCountdownEnd?.();
|
|
41
|
+
if (!autoRedirectOnEnd) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (actionHref) {
|
|
45
|
+
window.location.assign(actionHref);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
window.location.assign("/");
|
|
49
|
+
}
|
|
50
|
+
}, [remainingSeconds, autoRedirectOnEnd, showCountdown, actionHref, onCountdownEnd]);
|
|
51
|
+
const countdownProgress = (remainingSeconds / safeCountdownSeconds) * 100;
|
|
52
|
+
const countdownStyle = {
|
|
53
|
+
"--countdown-progress": countdownProgress
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: `not-found${fullClass}${hiddenClass}${userClass}`, "data-mode": mode, "aria-hidden": !isVisible, children: [_jsx("style", { children: styles }), _jsxs("div", { className: "not-found__top", children: [_jsx("img", { className: "not-found__logo", src: logoUrl, alt: "" }), _jsx("p", { className: "not-found__brand", children: brandLabel })] }), _jsxs("div", { className: "not-found__center", children: [_jsxs("div", { className: "not-found__mark-wrap", children: [_jsx("div", { className: "not-found__halo" }), _jsxs("svg", { className: "not-found__rings", width: "198", height: "198", viewBox: "0 0 198 198", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { className: "not-found__ring-inner", cx: "99", cy: "99", r: "76", stroke: "var(--line)", strokeWidth: "0.9", strokeDasharray: "4 12" }), _jsx("circle", { className: "not-found__ring-outer", cx: "99", cy: "99", r: "88", stroke: "var(--line)", strokeWidth: "0.7", strokeDasharray: "2 22" })] }), _jsx("div", { className: "not-found__orb", children: _jsx(QuestionIcon, {}) })] }), _jsx("p", { className: "not-found__title", children: title }), _jsx("p", { className: "not-found__subtitle", children: subtitle }), _jsx("div", { className: "not-found__actions", children: actionHref ? (_jsxs("a", { className: "not-found__action", href: actionHref, children: [actionLabel, _jsx("svg", { className: "not-found__action-icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5 12H19M13 6L19 12L13 18", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) })] })) : (_jsxs("button", { className: "not-found__action", type: "button", onClick: onActionClick, children: [actionLabel, _jsx("svg", { className: "not-found__action-icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5 12H19M13 6L19 12L13 18", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) })] })) }), showCountdown && (_jsxs("p", { className: "not-found__countdown", children: [_jsx("span", { className: "not-found__countdown-dot", style: countdownStyle }), remainingSeconds, "s ", countdownText] }))] })] }));
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles = "\n.not-found {\n --bg: #f8fafc;\n --title: #0f172a;\n --muted: #64748b;\n --primary: #0b4f8a;\n --primary-hover: #0a4578;\n --action-bg: rgba(233, 241, 252, 0.92);\n --action-bg-hover: rgba(224, 235, 249, 0.96);\n --action-text: #0b4f8a;\n --action-border: rgba(11, 79, 138, 0.34);\n --line: rgba(15, 23, 42, 0.14);\n --soft-line: rgba(11, 79, 138, 0.2);\n --halo: rgba(11, 79, 138, 0.16);\n --shadow: rgba(15, 23, 42, 0.16);\n width: 100%;\n min-height: 560px;\n position: relative;\n overflow: hidden;\n background:\n radial-gradient(circle at 50% 42%, var(--halo), transparent 42%),\n var(--bg);\n font-family: Inter, system-ui, sans-serif;\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n\n.not-found--fullscreen {\n position: fixed;\n inset: 0;\n width: 100vw;\n height: 100vh;\n min-height: 100vh;\n z-index: 9998;\n}\n\n.not-found--hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.not-found[data-mode=\"dark\"] {\n --bg: #020f25;\n --title: #d7e5f4;\n --muted: #7f97b5;\n --primary: #2f73bb;\n --primary-hover: #3f83ca;\n --action-bg: rgba(23, 43, 75, 0.88);\n --action-bg-hover: rgba(25, 48, 84, 0.92);\n --action-text: #8bb5e2;\n --action-border: rgba(74, 122, 184, 0.45);\n --line: rgba(130, 167, 210, 0.2);\n --soft-line: rgba(130, 167, 210, 0.22);\n --halo: rgba(19, 73, 138, 0.26);\n --shadow: rgba(0, 0, 0, 0.36);\n}\n\n@media (prefers-color-scheme: dark) {\n .not-found[data-mode=\"auto\"] {\n --bg: #020f25;\n --title: #d7e5f4;\n --muted: #7f97b5;\n --primary: #2f73bb;\n --primary-hover: #3f83ca;\n --action-bg: rgba(23, 43, 75, 0.88);\n --action-bg-hover: rgba(25, 48, 84, 0.92);\n --action-text: #8bb5e2;\n --action-border: rgba(74, 122, 184, 0.45);\n --line: rgba(130, 167, 210, 0.2);\n --soft-line: rgba(130, 167, 210, 0.22);\n --halo: rgba(19, 73, 138, 0.26);\n --shadow: rgba(0, 0, 0, 0.36);\n }\n}\n\n.not-found__top {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translateX(-50%);\n display: grid;\n place-items: center;\n gap: 4px;\n z-index: 2;\n opacity: 0;\n transform: translate(-50%, -10px);\n animation: not-found-top-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;\n}\n\n.not-found__logo {\n width: 30px;\n height: auto;\n opacity: 0.9;\n margin-bottom: 5px;\n}\n\n.not-found__brand {\n margin: 0;\n color: var(--muted);\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n}\n\n.not-found__center {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: min(340px, calc(100vw - 40px));\n text-align: center;\n}\n\n.not-found__halo {\n position: absolute;\n inset: -70px -40px -30px;\n border-radius: 50%;\n background: radial-gradient(circle, var(--halo), transparent 70%);\n filter: blur(4px);\n pointer-events: none;\n}\n\n.not-found__mark-wrap {\n position: relative;\n margin: 0 auto 18px;\n width: 198px;\n height: 198px;\n display: grid;\n place-items: center;\n opacity: 0;\n transform: translateY(-8px);\n animation: not-found-drop-in 760ms cubic-bezier(0.22, 1, 0.36, 1) 420ms forwards;\n}\n\n.not-found__rings {\n position: absolute;\n inset: 0;\n animation: fade-in 0.8s ease both;\n}\n\n.not-found__ring-inner {\n transform-origin: 99px 99px;\n animation: spin-ccw 20s linear infinite;\n}\n\n.not-found__ring-outer {\n transform-origin: 99px 99px;\n animation: spin-cw 32s linear infinite;\n}\n\n.not-found__orb {\n width: 82px;\n height: 82px;\n border-radius: 999px;\n border: 1px solid var(--soft-line);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));\n display: grid;\n place-items: center;\n box-shadow: 0 10px 22px var(--shadow);\n animation: orb-pulse 2.6s ease-in-out infinite;\n}\n\n.not-found__icon {\n width: 34px;\n height: 34px;\n color: var(--title);\n}\n\n.not-found__title {\n margin: 0;\n color: var(--title);\n font-size: 24px;\n line-height: 1.25;\n font-weight: 620;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n opacity: 0;\n transform: translateY(-8px);\n animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 680ms forwards;\n}\n\n.not-found__subtitle {\n margin: 8px 0 0;\n color: var(--muted);\n font-size: 13px;\n line-height: 1.45;\n max-width: 300px;\n margin-left: auto;\n margin-right: auto;\n opacity: 0;\n transform: translateY(-8px);\n animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 920ms forwards;\n}\n\n.not-found__actions {\n margin-top: 18px;\n display: flex;\n justify-content: center;\n width: 100%;\n opacity: 0;\n transform: translateY(-8px);\n animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1140ms forwards;\n}\n\n.not-found__action {\n border: 1px solid var(--action-border);\n border-radius: 8px;\n padding: 8px 12px;\n width: auto;\n font-size: clamp(10px, 1.5vw, 12px);\n font-weight: 700;\n letter-spacing: 0.03em;\n text-transform: uppercase;\n white-space: nowrap;\n color: var(--action-text);\n background: var(--action-bg);\n cursor: pointer;\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n line-height: 1;\n transition: border-color 160ms ease, background-color 160ms ease, transform 140ms ease;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);\n}\n\n.not-found__action:hover {\n border-color: var(--primary-hover);\n background: var(--action-bg-hover);\n transform: translateY(-1px);\n}\n\n.not-found__action:active {\n transform: translateY(0);\n}\n\n.not-found__action:focus-visible {\n outline: 2px solid #8bb5de;\n outline-offset: 2px;\n}\n\n.not-found__action-icon {\n width: clamp(12px, 1.5vw, 16px);\n height: clamp(12px, 1.5vw, 16px);\n display: inline-block;\n}\n\n.not-found__countdown {\n margin: 14px 0 0;\n color: var(--muted);\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n gap: 10px;\n opacity: 0;\n transform: translateY(-8px);\n animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1360ms forwards;\n}\n\n.not-found__countdown-dot {\n width: 18px;\n height: 18px;\n border-radius: 999px;\n background: conic-gradient(\n from -90deg,\n var(--muted) calc(var(--countdown-progress, 0) * 1%),\n rgba(130, 167, 210, 0.28) 0\n );\n -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);\n mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);\n position: relative;\n}\n\n.not-found__countdown-dot::before {\n content: \"\";\n position: absolute;\n inset: 5px;\n border-radius: 999px;\n background: #d8c1aa;\n opacity: 0.9;\n}\n\n@keyframes spin-cw {\n to { transform: rotate(360deg); }\n}\n\n@keyframes spin-ccw {\n to { transform: rotate(-360deg); }\n}\n\n@keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes not-found-drop-in {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes not-found-top-drop-in {\n from {\n opacity: 0;\n transform: translate(-50%, -10px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n\n@keyframes orb-pulse {\n 0%, 100% {\n box-shadow:\n 0 10px 22px var(--shadow),\n 0 0 0 0 rgba(47, 115, 187, 0.22);\n }\n 50% {\n box-shadow:\n 0 12px 26px var(--shadow),\n 0 0 0 10px rgba(47, 115, 187, 0.06);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .not-found__top,\n .not-found__mark-wrap,\n .not-found__title,\n .not-found__subtitle,\n .not-found__actions,\n .not-found__countdown {\n animation: none !important;\n opacity: 1;\n transform: none;\n }\n}\n";
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
export const styles = `
|
|
2
|
+
.not-found {
|
|
3
|
+
--bg: #f8fafc;
|
|
4
|
+
--title: #0f172a;
|
|
5
|
+
--muted: #64748b;
|
|
6
|
+
--primary: #0b4f8a;
|
|
7
|
+
--primary-hover: #0a4578;
|
|
8
|
+
--action-bg: rgba(233, 241, 252, 0.92);
|
|
9
|
+
--action-bg-hover: rgba(224, 235, 249, 0.96);
|
|
10
|
+
--action-text: #0b4f8a;
|
|
11
|
+
--action-border: rgba(11, 79, 138, 0.34);
|
|
12
|
+
--line: rgba(15, 23, 42, 0.14);
|
|
13
|
+
--soft-line: rgba(11, 79, 138, 0.2);
|
|
14
|
+
--halo: rgba(11, 79, 138, 0.16);
|
|
15
|
+
--shadow: rgba(15, 23, 42, 0.16);
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-height: 560px;
|
|
18
|
+
position: relative;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
background:
|
|
21
|
+
radial-gradient(circle at 50% 42%, var(--halo), transparent 42%),
|
|
22
|
+
var(--bg);
|
|
23
|
+
font-family: Inter, system-ui, sans-serif;
|
|
24
|
+
opacity: 1;
|
|
25
|
+
visibility: visible;
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.not-found--fullscreen {
|
|
30
|
+
position: fixed;
|
|
31
|
+
inset: 0;
|
|
32
|
+
width: 100vw;
|
|
33
|
+
height: 100vh;
|
|
34
|
+
min-height: 100vh;
|
|
35
|
+
z-index: 9998;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.not-found--hidden {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.not-found[data-mode="dark"] {
|
|
45
|
+
--bg: #020f25;
|
|
46
|
+
--title: #d7e5f4;
|
|
47
|
+
--muted: #7f97b5;
|
|
48
|
+
--primary: #2f73bb;
|
|
49
|
+
--primary-hover: #3f83ca;
|
|
50
|
+
--action-bg: rgba(23, 43, 75, 0.88);
|
|
51
|
+
--action-bg-hover: rgba(25, 48, 84, 0.92);
|
|
52
|
+
--action-text: #8bb5e2;
|
|
53
|
+
--action-border: rgba(74, 122, 184, 0.45);
|
|
54
|
+
--line: rgba(130, 167, 210, 0.2);
|
|
55
|
+
--soft-line: rgba(130, 167, 210, 0.22);
|
|
56
|
+
--halo: rgba(19, 73, 138, 0.26);
|
|
57
|
+
--shadow: rgba(0, 0, 0, 0.36);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (prefers-color-scheme: dark) {
|
|
61
|
+
.not-found[data-mode="auto"] {
|
|
62
|
+
--bg: #020f25;
|
|
63
|
+
--title: #d7e5f4;
|
|
64
|
+
--muted: #7f97b5;
|
|
65
|
+
--primary: #2f73bb;
|
|
66
|
+
--primary-hover: #3f83ca;
|
|
67
|
+
--action-bg: rgba(23, 43, 75, 0.88);
|
|
68
|
+
--action-bg-hover: rgba(25, 48, 84, 0.92);
|
|
69
|
+
--action-text: #8bb5e2;
|
|
70
|
+
--action-border: rgba(74, 122, 184, 0.45);
|
|
71
|
+
--line: rgba(130, 167, 210, 0.2);
|
|
72
|
+
--soft-line: rgba(130, 167, 210, 0.22);
|
|
73
|
+
--halo: rgba(19, 73, 138, 0.26);
|
|
74
|
+
--shadow: rgba(0, 0, 0, 0.36);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.not-found__top {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 18px;
|
|
81
|
+
left: 50%;
|
|
82
|
+
transform: translateX(-50%);
|
|
83
|
+
display: grid;
|
|
84
|
+
place-items: center;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
z-index: 2;
|
|
87
|
+
opacity: 0;
|
|
88
|
+
transform: translate(-50%, -10px);
|
|
89
|
+
animation: not-found-top-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.not-found__logo {
|
|
93
|
+
width: 30px;
|
|
94
|
+
height: auto;
|
|
95
|
+
opacity: 0.9;
|
|
96
|
+
margin-bottom: 5px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.not-found__brand {
|
|
100
|
+
margin: 0;
|
|
101
|
+
color: var(--muted);
|
|
102
|
+
font-size: 9px;
|
|
103
|
+
letter-spacing: 0.14em;
|
|
104
|
+
text-transform: uppercase;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.not-found__center {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 50%;
|
|
110
|
+
left: 50%;
|
|
111
|
+
transform: translate(-50%, -50%);
|
|
112
|
+
width: min(340px, calc(100vw - 40px));
|
|
113
|
+
text-align: center;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.not-found__halo {
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: -70px -40px -30px;
|
|
119
|
+
border-radius: 50%;
|
|
120
|
+
background: radial-gradient(circle, var(--halo), transparent 70%);
|
|
121
|
+
filter: blur(4px);
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.not-found__mark-wrap {
|
|
126
|
+
position: relative;
|
|
127
|
+
margin: 0 auto 18px;
|
|
128
|
+
width: 198px;
|
|
129
|
+
height: 198px;
|
|
130
|
+
display: grid;
|
|
131
|
+
place-items: center;
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transform: translateY(-8px);
|
|
134
|
+
animation: not-found-drop-in 760ms cubic-bezier(0.22, 1, 0.36, 1) 420ms forwards;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.not-found__rings {
|
|
138
|
+
position: absolute;
|
|
139
|
+
inset: 0;
|
|
140
|
+
animation: fade-in 0.8s ease both;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.not-found__ring-inner {
|
|
144
|
+
transform-origin: 99px 99px;
|
|
145
|
+
animation: spin-ccw 20s linear infinite;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.not-found__ring-outer {
|
|
149
|
+
transform-origin: 99px 99px;
|
|
150
|
+
animation: spin-cw 32s linear infinite;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.not-found__orb {
|
|
154
|
+
width: 82px;
|
|
155
|
+
height: 82px;
|
|
156
|
+
border-radius: 999px;
|
|
157
|
+
border: 1px solid var(--soft-line);
|
|
158
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
|
|
159
|
+
display: grid;
|
|
160
|
+
place-items: center;
|
|
161
|
+
box-shadow: 0 10px 22px var(--shadow);
|
|
162
|
+
animation: orb-pulse 2.6s ease-in-out infinite;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.not-found__icon {
|
|
166
|
+
width: 34px;
|
|
167
|
+
height: 34px;
|
|
168
|
+
color: var(--title);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.not-found__title {
|
|
172
|
+
margin: 0;
|
|
173
|
+
color: var(--title);
|
|
174
|
+
font-size: 24px;
|
|
175
|
+
line-height: 1.25;
|
|
176
|
+
font-weight: 620;
|
|
177
|
+
letter-spacing: 0.02em;
|
|
178
|
+
text-transform: uppercase;
|
|
179
|
+
opacity: 0;
|
|
180
|
+
transform: translateY(-8px);
|
|
181
|
+
animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 680ms forwards;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.not-found__subtitle {
|
|
185
|
+
margin: 8px 0 0;
|
|
186
|
+
color: var(--muted);
|
|
187
|
+
font-size: 13px;
|
|
188
|
+
line-height: 1.45;
|
|
189
|
+
max-width: 300px;
|
|
190
|
+
margin-left: auto;
|
|
191
|
+
margin-right: auto;
|
|
192
|
+
opacity: 0;
|
|
193
|
+
transform: translateY(-8px);
|
|
194
|
+
animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 920ms forwards;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.not-found__actions {
|
|
198
|
+
margin-top: 18px;
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
width: 100%;
|
|
202
|
+
opacity: 0;
|
|
203
|
+
transform: translateY(-8px);
|
|
204
|
+
animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1140ms forwards;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.not-found__action {
|
|
208
|
+
border: 1px solid var(--action-border);
|
|
209
|
+
border-radius: 8px;
|
|
210
|
+
padding: 8px 12px;
|
|
211
|
+
width: auto;
|
|
212
|
+
font-size: clamp(10px, 1.5vw, 12px);
|
|
213
|
+
font-weight: 700;
|
|
214
|
+
letter-spacing: 0.03em;
|
|
215
|
+
text-transform: uppercase;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
color: var(--action-text);
|
|
218
|
+
background: var(--action-bg);
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
text-decoration: none;
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
gap: 8px;
|
|
225
|
+
line-height: 1;
|
|
226
|
+
transition: border-color 160ms ease, background-color 160ms ease, transform 140ms ease;
|
|
227
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.not-found__action:hover {
|
|
231
|
+
border-color: var(--primary-hover);
|
|
232
|
+
background: var(--action-bg-hover);
|
|
233
|
+
transform: translateY(-1px);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.not-found__action:active {
|
|
237
|
+
transform: translateY(0);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.not-found__action:focus-visible {
|
|
241
|
+
outline: 2px solid #8bb5de;
|
|
242
|
+
outline-offset: 2px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.not-found__action-icon {
|
|
246
|
+
width: clamp(12px, 1.5vw, 16px);
|
|
247
|
+
height: clamp(12px, 1.5vw, 16px);
|
|
248
|
+
display: inline-block;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.not-found__countdown {
|
|
252
|
+
margin: 14px 0 0;
|
|
253
|
+
color: var(--muted);
|
|
254
|
+
font-size: 12px;
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 10px;
|
|
258
|
+
opacity: 0;
|
|
259
|
+
transform: translateY(-8px);
|
|
260
|
+
animation: not-found-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1360ms forwards;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.not-found__countdown-dot {
|
|
264
|
+
width: 18px;
|
|
265
|
+
height: 18px;
|
|
266
|
+
border-radius: 999px;
|
|
267
|
+
background: conic-gradient(
|
|
268
|
+
from -90deg,
|
|
269
|
+
var(--muted) calc(var(--countdown-progress, 0) * 1%),
|
|
270
|
+
rgba(130, 167, 210, 0.28) 0
|
|
271
|
+
);
|
|
272
|
+
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
|
|
273
|
+
mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
|
|
274
|
+
position: relative;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.not-found__countdown-dot::before {
|
|
278
|
+
content: "";
|
|
279
|
+
position: absolute;
|
|
280
|
+
inset: 5px;
|
|
281
|
+
border-radius: 999px;
|
|
282
|
+
background: #d8c1aa;
|
|
283
|
+
opacity: 0.9;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@keyframes spin-cw {
|
|
287
|
+
to { transform: rotate(360deg); }
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
@keyframes spin-ccw {
|
|
291
|
+
to { transform: rotate(-360deg); }
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@keyframes fade-in {
|
|
295
|
+
from { opacity: 0; }
|
|
296
|
+
to { opacity: 1; }
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@keyframes not-found-drop-in {
|
|
300
|
+
from {
|
|
301
|
+
opacity: 0;
|
|
302
|
+
transform: translateY(-10px);
|
|
303
|
+
}
|
|
304
|
+
to {
|
|
305
|
+
opacity: 1;
|
|
306
|
+
transform: translateY(0);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@keyframes not-found-top-drop-in {
|
|
311
|
+
from {
|
|
312
|
+
opacity: 0;
|
|
313
|
+
transform: translate(-50%, -10px);
|
|
314
|
+
}
|
|
315
|
+
to {
|
|
316
|
+
opacity: 1;
|
|
317
|
+
transform: translate(-50%, 0);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@keyframes orb-pulse {
|
|
322
|
+
0%, 100% {
|
|
323
|
+
box-shadow:
|
|
324
|
+
0 10px 22px var(--shadow),
|
|
325
|
+
0 0 0 0 rgba(47, 115, 187, 0.22);
|
|
326
|
+
}
|
|
327
|
+
50% {
|
|
328
|
+
box-shadow:
|
|
329
|
+
0 12px 26px var(--shadow),
|
|
330
|
+
0 0 0 10px rgba(47, 115, 187, 0.06);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@media (prefers-reduced-motion: reduce) {
|
|
335
|
+
.not-found__top,
|
|
336
|
+
.not-found__mark-wrap,
|
|
337
|
+
.not-found__title,
|
|
338
|
+
.not-found__subtitle,
|
|
339
|
+
.not-found__actions,
|
|
340
|
+
.not-found__countdown {
|
|
341
|
+
animation: none !important;
|
|
342
|
+
opacity: 1;
|
|
343
|
+
transform: none;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NotFound";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NotFound";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NotFound/index";
|
package/dist/NotFound.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NotFound/index";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MouseEventHandler } from "react";
|
|
2
|
+
type SessionExpiredMode = "light" | "dark" | "auto";
|
|
3
|
+
export interface SessionExpiredProps {
|
|
4
|
+
mode?: SessionExpiredMode;
|
|
5
|
+
fullScreen?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
actionLabel?: string;
|
|
9
|
+
brandLabel?: string;
|
|
10
|
+
countdownText?: string;
|
|
11
|
+
showCountdown?: boolean;
|
|
12
|
+
countdownSeconds?: number;
|
|
13
|
+
autoCloseOnEnd?: boolean;
|
|
14
|
+
onCountdownEnd?: () => void;
|
|
15
|
+
onActionClick?: MouseEventHandler<HTMLButtonElement>;
|
|
16
|
+
actionHref?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function SessionExpired({ mode, fullScreen, title, subtitle, actionLabel, brandLabel, countdownText, showCountdown, countdownSeconds, autoCloseOnEnd, onCountdownEnd, onActionClick, actionHref, className }: SessionExpiredProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import logoUrl from "../assets/images/logo.svg";
|
|
4
|
+
import { styles } from "./SessionExpired.styles";
|
|
5
|
+
function SessionIcon() {
|
|
6
|
+
return (_jsxs("svg", { className: "session-expired__icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [_jsx("path", { d: "M12 3.2L18.5 6V11.9C18.5 16.2 15.8 19.7 12 20.9C8.2 19.7 5.5 16.2 5.5 11.9V6L12 3.2Z", stroke: "currentColor", strokeWidth: "1.6" }), _jsx("path", { d: "M12 8.3V12.3", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }), _jsx("circle", { cx: "12", cy: "14.9", r: "0.9", fill: "currentColor" })] }));
|
|
7
|
+
}
|
|
8
|
+
export function SessionExpired({ mode = "auto", fullScreen = true, title = "СЕССИЯ ТУГАДИ", subtitle = "Хавфсизлик сабабли сиз тизимдан автоматик чиқарилдингиз.", actionLabel = "ТИЗИМГА КИРИШ", brandLabel = "ДАВЛАТ СОЛИҚ ҚЎМИТАСИ", countdownText = "ичида саҳифадан чиқасиз", showCountdown = true, countdownSeconds = 60, autoCloseOnEnd = true, onCountdownEnd, onActionClick, actionHref, className }) {
|
|
9
|
+
const fullClass = fullScreen ? " session-expired--fullscreen" : "";
|
|
10
|
+
const userClass = className ? ` ${className}` : "";
|
|
11
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
12
|
+
const hiddenClass = isVisible ? "" : " session-expired--hidden";
|
|
13
|
+
const safeCountdownSeconds = Math.max(1, countdownSeconds);
|
|
14
|
+
const [remainingSeconds, setRemainingSeconds] = useState(safeCountdownSeconds);
|
|
15
|
+
const handledEndRef = useRef(false);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setRemainingSeconds(safeCountdownSeconds);
|
|
18
|
+
handledEndRef.current = false;
|
|
19
|
+
}, [safeCountdownSeconds]);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const rafId = window.requestAnimationFrame(() => {
|
|
22
|
+
setIsVisible(true);
|
|
23
|
+
});
|
|
24
|
+
return () => window.cancelAnimationFrame(rafId);
|
|
25
|
+
}, []);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!showCountdown || remainingSeconds <= 0 || handledEndRef.current) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const timeoutId = window.setTimeout(() => {
|
|
31
|
+
setRemainingSeconds((prev) => Math.max(prev - 1, 0));
|
|
32
|
+
}, 1000);
|
|
33
|
+
return () => window.clearTimeout(timeoutId);
|
|
34
|
+
}, [remainingSeconds, showCountdown]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!showCountdown || remainingSeconds > 0 || handledEndRef.current) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
handledEndRef.current = true;
|
|
40
|
+
onCountdownEnd?.();
|
|
41
|
+
if (!autoCloseOnEnd) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
window.close();
|
|
45
|
+
window.setTimeout(() => {
|
|
46
|
+
if (!window.closed) {
|
|
47
|
+
window.location.replace("about:blank");
|
|
48
|
+
}
|
|
49
|
+
}, 120);
|
|
50
|
+
}, [remainingSeconds, autoCloseOnEnd, onCountdownEnd, showCountdown]);
|
|
51
|
+
const countdownProgress = (remainingSeconds / safeCountdownSeconds) * 100;
|
|
52
|
+
const countdownStyle = {
|
|
53
|
+
"--countdown-progress": countdownProgress
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: `session-expired${fullClass}${hiddenClass}${userClass}`, "data-mode": mode, "aria-hidden": !isVisible, children: [_jsx("style", { children: styles }), _jsxs("div", { className: "session-expired__top", children: [_jsx("img", { className: "session-expired__logo", src: logoUrl, alt: "" }), _jsx("p", { className: "session-expired__brand", children: brandLabel })] }), _jsxs("div", { className: "session-expired__center", children: [_jsxs("div", { className: "session-expired__lock-wrap", children: [_jsx("div", { className: "session-expired__halo" }), _jsxs("svg", { className: "session-expired__rings", width: "198", height: "198", viewBox: "0 0 198 198", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { className: "session-expired__ring-inner", cx: "99", cy: "99", r: "76", stroke: "var(--line)", strokeWidth: "0.9", strokeDasharray: "4 12" }), _jsx("circle", { className: "session-expired__ring-outer", cx: "99", cy: "99", r: "88", stroke: "var(--line)", strokeWidth: "0.7", strokeDasharray: "2 22" })] }), _jsx("div", { className: "session-expired__lock-orb", children: _jsx(SessionIcon, {}) })] }), _jsx("p", { className: "session-expired__title", children: title }), _jsx("p", { className: "session-expired__subtitle", children: subtitle }), _jsx("div", { className: "session-expired__actions", children: actionHref ? (_jsxs("a", { className: "session-expired__action", href: actionHref, children: [actionLabel, _jsx("svg", { className: "session-expired__action-icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5 12H19M13 6L19 12L13 18", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) })] })) : (_jsxs("button", { className: "session-expired__action", type: "button", onClick: onActionClick, children: [actionLabel, _jsx("svg", { className: "session-expired__action-icon", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M5 12H19M13 6L19 12L13 18", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) })] })) }), showCountdown && (_jsxs("p", { className: "session-expired__countdown", children: [_jsx("span", { className: "session-expired__countdown-dot", style: countdownStyle }), remainingSeconds, "s ", countdownText] }))] })] }));
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles = "\n.session-expired {\n --bg: #f8fafc;\n --panel: #ffffff;\n --title: #0f172a;\n --muted: #64748b;\n --primary: #0b4f8a;\n --primary-hover: #0a4578;\n --action-bg: rgba(233, 241, 252, 0.92);\n --action-bg-hover: rgba(224, 235, 249, 0.96);\n --action-text: #0b4f8a;\n --action-border: rgba(11, 79, 138, 0.34);\n --line: rgba(15, 23, 42, 0.14);\n --soft-line: rgba(11, 79, 138, 0.2);\n --halo: rgba(11, 79, 138, 0.16);\n --chip: rgba(15, 23, 42, 0.04);\n --chip-border: rgba(15, 23, 42, 0.1);\n --shadow: rgba(15, 23, 42, 0.16);\n width: 100%;\n min-height: 560px;\n position: relative;\n overflow: hidden;\n background:\n radial-gradient(circle at 50% 42%, var(--halo), transparent 42%),\n var(--bg);\n font-family: Inter, system-ui, sans-serif;\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n\n.session-expired--fullscreen {\n position: fixed;\n inset: 0;\n width: 100vw;\n height: 100vh;\n min-height: 100vh;\n z-index: 9998;\n}\n\n.session-expired--hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.session-expired[data-mode=\"dark\"] {\n --bg: #020f25;\n --panel: rgba(5, 20, 42, 0.58);\n --title: #d7e5f4;\n --muted: #7f97b5;\n --primary: #2f73bb;\n --primary-hover: #3f83ca;\n --action-bg: rgba(23, 43, 75, 0.88);\n --action-bg-hover: rgba(25, 48, 84, 0.92);\n --action-text: #8bb5e2;\n --action-border: rgba(74, 122, 184, 0.45);\n --line: rgba(130, 167, 210, 0.2);\n --soft-line: rgba(130, 167, 210, 0.22);\n --halo: rgba(19, 73, 138, 0.26);\n --chip: rgba(129, 167, 209, 0.09);\n --chip-border: rgba(129, 167, 209, 0.16);\n --shadow: rgba(0, 0, 0, 0.36);\n}\n\n@media (prefers-color-scheme: dark) {\n .session-expired[data-mode=\"auto\"] {\n --bg: #020f25;\n --panel: rgba(5, 20, 42, 0.58);\n --title: #d7e5f4;\n --muted: #7f97b5;\n --primary: #2f73bb;\n --primary-hover: #3f83ca;\n --action-bg: rgba(23, 43, 75, 0.88);\n --action-bg-hover: rgba(25, 48, 84, 0.92);\n --action-text: #8bb5e2;\n --action-border: rgba(74, 122, 184, 0.45);\n --line: rgba(130, 167, 210, 0.2);\n --soft-line: rgba(130, 167, 210, 0.22);\n --halo: rgba(19, 73, 138, 0.26);\n --chip: rgba(129, 167, 209, 0.09);\n --chip-border: rgba(129, 167, 209, 0.16);\n --shadow: rgba(0, 0, 0, 0.36);\n }\n}\n\n.session-expired__top {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translateX(-50%);\n display: grid;\n place-items: center;\n gap: 4px;\n z-index: 2;\n opacity: 0;\n transform: translate(-50%, -10px);\n animation: session-expired-top-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;\n}\n\n.session-expired__logo {\n width: 30px;\n height: auto;\n opacity: 0.9;\n margin-bottom: 5px;\n}\n\n.session-expired__brand {\n margin: 0;\n color: var(--muted);\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n}\n\n.session-expired__center {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: min(340px, calc(100vw - 40px));\n text-align: center;\n}\n\n.session-expired__halo {\n position: absolute;\n inset: -70px -40px -30px;\n border-radius: 50%;\n background: radial-gradient(circle, var(--halo), transparent 70%);\n filter: blur(4px);\n pointer-events: none;\n}\n\n.session-expired__lock-wrap {\n position: relative;\n margin: 0 auto 18px;\n width: 198px;\n height: 198px;\n display: grid;\n place-items: center;\n opacity: 0;\n transform: translateY(-8px);\n animation: session-expired-drop-in 760ms cubic-bezier(0.22, 1, 0.36, 1) 420ms forwards;\n}\n\n.session-expired__rings {\n position: absolute;\n inset: 0;\n animation: fade-in 0.8s ease both;\n}\n\n.session-expired__ring-inner {\n transform-origin: 99px 99px;\n animation: spin-ccw 20s linear infinite;\n}\n\n.session-expired__ring-outer {\n transform-origin: 99px 99px;\n animation: spin-cw 32s linear infinite;\n}\n\n.session-expired__lock-orb {\n width: 82px;\n height: 82px;\n border-radius: 999px;\n border: 1px solid var(--soft-line);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));\n display: grid;\n place-items: center;\n box-shadow: 0 10px 22px var(--shadow);\n animation: orb-pulse 2.6s ease-in-out infinite;\n}\n\n.session-expired__icon {\n width: 34px;\n height: 34px;\n color: var(--title);\n}\n\n.session-expired__title {\n margin: 0;\n color: var(--title);\n font-size: 24px;\n line-height: 1.25;\n font-weight: 620;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n opacity: 0;\n transform: translateY(-8px);\n animation: session-expired-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 680ms forwards;\n}\n\n.session-expired__subtitle {\n margin: 8px 0 0;\n color: var(--muted);\n font-size: 13px;\n line-height: 1.45;\n max-width: 300px;\n margin-left: auto;\n margin-right: auto;\n opacity: 0;\n transform: translateY(-8px);\n animation: session-expired-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 920ms forwards;\n}\n\n.session-expired__actions {\n margin-top: 18px;\n display: flex;\n justify-content: center;\n width: 100%;\n opacity: 0;\n transform: translateY(-8px);\n animation: session-expired-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1140ms forwards;\n}\n\n.session-expired__action {\n border: 1px solid var(--action-border);\n border-radius: 8px;\n padding: 8px 12px;\n width: auto;\n font-size: clamp(10px, 1.5vw, 12px);\n font-weight: 700;\n letter-spacing: 0.03em;\n text-transform: uppercase;\n white-space: nowrap;\n color: var(--action-text);\n background: var(--action-bg);\n cursor: pointer;\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n line-height: 1;\n transition: border-color 160ms ease, background-color 160ms ease, transform 140ms ease;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);\n}\n\n.session-expired__action:hover {\n border-color: var(--primary-hover);\n background: var(--action-bg-hover);\n transform: translateY(-1px);\n}\n\n.session-expired__action:active {\n transform: translateY(0);\n}\n\n.session-expired__action:focus-visible {\n outline: 2px solid #8bb5de;\n outline-offset: 2px;\n}\n\n.session-expired__action-icon {\n width: clamp(12px, 1.5vw, 16px);\n height: clamp(12px, 1.5vw, 16px);\n display: inline-block;\n}\n\n.session-expired__countdown {\n margin: 14px 0 0;\n color: var(--muted);\n font-size: 12px;\n display: inline-flex;\n align-items: center;\n gap: 10px;\n opacity: 0;\n transform: translateY(-8px);\n animation: session-expired-drop-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 1360ms forwards;\n}\n\n.session-expired__countdown-dot {\n width: 18px;\n height: 18px;\n border-radius: 999px;\n background: conic-gradient(\n from -90deg,\n var(--muted) calc(var(--countdown-progress, 0) * 1%),\n rgba(130, 167, 210, 0.28) 0\n );\n -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);\n mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);\n position: relative;\n}\n\n.session-expired__countdown-dot::before {\n content: \"\";\n position: absolute;\n inset: 5px;\n border-radius: 999px;\n background: #d8c1aa;\n opacity: 0.9;\n}\n\n@keyframes spin-cw {\n to { transform: rotate(360deg); }\n}\n\n@keyframes spin-ccw {\n to { transform: rotate(-360deg); }\n}\n\n@keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes session-expired-drop-in {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes session-expired-top-drop-in {\n from {\n opacity: 0;\n transform: translate(-50%, -10px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n\n@keyframes orb-pulse {\n 0%, 100% {\n box-shadow:\n 0 10px 22px var(--shadow),\n 0 0 0 0 rgba(47, 115, 187, 0.22);\n }\n 50% {\n box-shadow:\n 0 12px 26px var(--shadow),\n 0 0 0 10px rgba(47, 115, 187, 0.06);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .session-expired__top,\n .session-expired__lock-wrap,\n .session-expired__title,\n .session-expired__subtitle,\n .session-expired__actions,\n .session-expired__countdown {\n animation: none !important;\n opacity: 1;\n transform: none;\n }\n}\n";
|