@atomazing-org/design-system 1.0.5 → 1.0.7
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/README.MD +191 -19
- package/dist/index.d.mts +297 -0
- package/dist/index.d.ts +297 -0
- package/dist/index.js +254 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +254 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +64 -40
- package/build/components/DialogBtn.d.ts +0 -5
- package/build/components/DialogBtn.js +0 -8
- package/build/components/ErrorBoundary.d.ts +0 -20
- package/build/components/ErrorBoundary.js +0 -75
- package/build/components/Loading.d.ts +0 -1
- package/build/components/Loading.js +0 -26
- package/build/components/PathName.d.ts +0 -4
- package/build/components/PathName.js +0 -8
- package/build/components/index.d.ts +0 -3
- package/build/components/index.js +0 -3
- package/build/styles/commonComponents.d.ts +0 -2
- package/build/styles/commonComponents.js +0 -69
- package/build/styles/index.d.ts +0 -3
- package/build/styles/index.js +0 -3
- package/build/styles/keyframes.d.ts +0 -10
- package/build/styles/keyframes.js +0 -108
- package/build/styles/typography.d.ts +0 -4
- package/build/styles/typography.js +0 -160
- package/build/utils/displayGreeting.d.ts +0 -5
- package/build/utils/displayGreeting.js +0 -19
- package/build/utils/getDayIdentifier.d.ts +0 -4
- package/build/utils/getDayIdentifier.js +0 -9
- package/build/utils/getSystemInfo.d.ts +0 -7
- package/build/utils/getSystemInfo.js +0 -26
- package/build/utils/index.d.ts +0 -5
- package/build/utils/index.js +0 -5
- package/build/utils/timeAgo.d.ts +0 -9
- package/build/utils/timeAgo.js +0 -56
- package/build/utils/useResponsiveDisplay.d.ts +0 -7
- package/build/utils/useResponsiveDisplay.js +0 -22
- package/index.d.ts +0 -187
- package/index.js +0 -26
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { ErrorInfo } from "react";
|
|
3
|
-
interface ErrorBoundaryProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
interface ErrorBoundaryState {
|
|
7
|
-
hasError: boolean;
|
|
8
|
-
error?: Error;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* ErrorBoundary component that catches and displays errors.
|
|
12
|
-
*/
|
|
13
|
-
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
14
|
-
constructor(props: ErrorBoundaryProps);
|
|
15
|
-
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
16
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
17
|
-
handleClearData(): void;
|
|
18
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
19
|
-
}
|
|
20
|
-
export default ErrorBoundary;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import styled from "@emotion/styled";
|
|
4
|
-
import { ErrorOutlineRounded } from "@mui/icons-material";
|
|
5
|
-
import { Box, Button } from "@mui/material";
|
|
6
|
-
/**
|
|
7
|
-
* ErrorBoundary component that catches and displays errors.
|
|
8
|
-
*/
|
|
9
|
-
class ErrorBoundary extends React.Component {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
super(props);
|
|
12
|
-
this.state = {
|
|
13
|
-
hasError: false,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
static getDerivedStateFromError(error) {
|
|
17
|
-
return {
|
|
18
|
-
hasError: true,
|
|
19
|
-
error,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
componentDidCatch(error, errorInfo) {
|
|
23
|
-
// eslint-disable-next-line no-console -- Выводим ошибку в консоль
|
|
24
|
-
console.error("Error:", error);
|
|
25
|
-
// eslint-disable-next-line no-console -- Выводим ошибку в консоль
|
|
26
|
-
console.error("Error Info:", errorInfo);
|
|
27
|
-
}
|
|
28
|
-
handleClearData() {
|
|
29
|
-
localStorage.clear();
|
|
30
|
-
sessionStorage.clear();
|
|
31
|
-
window.location.reload();
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
const { state, props } = this;
|
|
35
|
-
if (state.hasError) {
|
|
36
|
-
return (_jsxs(Container, { children: [_jsx(ErrorHeader, { children: _jsx(Box, { children: "\u041E\u0448\u0438\u0431\u043A\u0430.\u00A0" }) }), _jsxs("h3", { children: [_jsxs(Box, { style: { color: "#ff3131", display: "inline-block" }, children: [_jsx(ErrorOutlineRounded, { sx: { verticalAlign: "middle", mb: "4px" } }), " ", "ERROR:"] }), " ", _jsxs(Box, { translate: "no", children: ["[", state.error?.name, "] ", state.error?.message] }), _jsxs(Box, { style: { color: "#ff3131", display: "inline-block" }, children: [_jsx(ErrorOutlineRounded, { sx: { verticalAlign: "middle", mb: "4px" } }), " ", "Stack:"] }), " ", _jsxs(Box, { translate: "no", children: ["[", state.error?.stack, "]"] })] })] }));
|
|
37
|
-
}
|
|
38
|
-
return props.children;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const Container = styled.div `
|
|
42
|
-
margin: 0 8vw;
|
|
43
|
-
@media (max-width: 768px) {
|
|
44
|
-
margin: 0;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
const ErrorHeader = styled.h1 `
|
|
48
|
-
margin-top: 32px;
|
|
49
|
-
margin-bottom: 32px;
|
|
50
|
-
font-size: 36px;
|
|
51
|
-
color: #ff3131;
|
|
52
|
-
text-align: center;
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
@media (max-width: 768px) {
|
|
57
|
-
text-align: left;
|
|
58
|
-
justify-content: left;
|
|
59
|
-
font-size: 30px;
|
|
60
|
-
margin-top: 0;
|
|
61
|
-
margin-bottom: 0;
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
64
|
-
const StyledButton = styled(Button) `
|
|
65
|
-
padding: 10px 30px;
|
|
66
|
-
border-radius: 12px;
|
|
67
|
-
@media (max-width: 768px) {
|
|
68
|
-
width: 100%;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
StyledButton.defaultProps = {
|
|
72
|
-
variant: "outlined",
|
|
73
|
-
size: "large",
|
|
74
|
-
};
|
|
75
|
-
export default ErrorBoundary;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
|
-
import { Box, CircularProgress } from '@mui/material';
|
|
5
|
-
export const Loading = () => {
|
|
6
|
-
const [showLoading, setShowLoading] = useState(false);
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const timer = setTimeout(() => {
|
|
9
|
-
setShowLoading(true);
|
|
10
|
-
}, 100); // Show the loading spinner after 100 milliseconds
|
|
11
|
-
return () => clearTimeout(timer);
|
|
12
|
-
}, []);
|
|
13
|
-
return (_jsx(Container, { children: showLoading && (_jsxs(_Fragment, { children: [_jsx(CircularProgress, { "aria-label": "loading", size: 80, thickness: 4 }), _jsx("h3", { style: { opacity: 0.8 }, children: "Loading Page..." })] })) }));
|
|
14
|
-
};
|
|
15
|
-
const Container = styled(Box) `
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 50%;
|
|
18
|
-
left: 50%;
|
|
19
|
-
transform: translate(-50%, -50%);
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
text-align: center;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
`;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export const commonComponentProps = {
|
|
2
|
-
MuiTooltip: {
|
|
3
|
-
defaultProps: {
|
|
4
|
-
disableInteractive: true,
|
|
5
|
-
style: {
|
|
6
|
-
backdropFilter: "blur(6px)",
|
|
7
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
MuiButton: {
|
|
12
|
-
defaultProps: {
|
|
13
|
-
sx: {
|
|
14
|
-
p: "12px 24px",
|
|
15
|
-
borderRadius: "14px",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
MuiSelect: {
|
|
20
|
-
defaultProps: {
|
|
21
|
-
style: {
|
|
22
|
-
borderRadius: "18px",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
MuiDialog: {
|
|
27
|
-
defaultProps: {
|
|
28
|
-
PaperProps: {
|
|
29
|
-
style: {
|
|
30
|
-
padding: "12px",
|
|
31
|
-
borderRadius: "24px",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
MuiAvatar: {
|
|
37
|
-
defaultProps: {
|
|
38
|
-
style: {
|
|
39
|
-
fontWeight: 500,
|
|
40
|
-
color: "#fff",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
MuiAlert: {
|
|
45
|
-
styleOverrides: {
|
|
46
|
-
root: {
|
|
47
|
-
borderRadius: "16px",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
MuiTextField: {
|
|
52
|
-
styleOverrides: {
|
|
53
|
-
root: {
|
|
54
|
-
"& .MuiInputBase-root": {
|
|
55
|
-
borderRadius: "16px",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
MuiMenuItem: {
|
|
61
|
-
styleOverrides: {
|
|
62
|
-
root: {
|
|
63
|
-
"& .MuiInputBase-root": {
|
|
64
|
-
borderRadius: "16px",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
};
|
package/build/styles/index.d.ts
DELETED
package/build/styles/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const fadeInLeft: string;
|
|
2
|
-
export declare const fadeIn: string;
|
|
3
|
-
export declare const zoomIn: string;
|
|
4
|
-
export declare const slideIn: string;
|
|
5
|
-
export declare const slideInBottom: string;
|
|
6
|
-
export declare const scale: string;
|
|
7
|
-
export declare const pulseAnimation: (clr: string, shadowBlur?: number) => string;
|
|
8
|
-
export declare const rotateSlideBarIcons: string;
|
|
9
|
-
export declare const rotate: (angle: string) => string;
|
|
10
|
-
export declare const ring: string;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { keyframes } from "@emotion/css";
|
|
2
|
-
export const fadeInLeft = keyframes `
|
|
3
|
-
from {
|
|
4
|
-
opacity: 0;
|
|
5
|
-
transform: translateX(-40px)
|
|
6
|
-
}
|
|
7
|
-
to {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transform: translateX(0px)
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
export const fadeIn = keyframes `
|
|
13
|
-
from {
|
|
14
|
-
opacity: 0;
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
export const zoomIn = keyframes `
|
|
18
|
-
0% {
|
|
19
|
-
scale: 1;
|
|
20
|
-
}
|
|
21
|
-
50% {
|
|
22
|
-
scale: 1.2;
|
|
23
|
-
}
|
|
24
|
-
100% {
|
|
25
|
-
scale: 1;
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
export const slideIn = keyframes `
|
|
29
|
-
from{
|
|
30
|
-
transform: translateX(-100%);
|
|
31
|
-
}
|
|
32
|
-
to {
|
|
33
|
-
transform: translateX(0);
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
export const slideInBottom = keyframes `
|
|
37
|
-
from{
|
|
38
|
-
transform: translateY(100%);
|
|
39
|
-
}
|
|
40
|
-
to {
|
|
41
|
-
transform: translateY(0);
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
export const scale = keyframes `
|
|
45
|
-
from {
|
|
46
|
-
transform: scale(0)
|
|
47
|
-
}
|
|
48
|
-
to {
|
|
49
|
-
transform: scale(1)
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
export const pulseAnimation = (clr, shadowBlur = 12) => keyframes `
|
|
53
|
-
0% {
|
|
54
|
-
transform: scale(0.95);
|
|
55
|
-
box-shadow: 0 0 0 0 ${clr}b2;
|
|
56
|
-
}
|
|
57
|
-
70% {
|
|
58
|
-
transform: scale(1);
|
|
59
|
-
box-shadow: 0 0 0 ${shadowBlur}px ${clr}00;
|
|
60
|
-
}
|
|
61
|
-
100% {
|
|
62
|
-
transform: scale(0.95);
|
|
63
|
-
box-shadow: 0 0 0 0 ${clr}00;
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
export const rotateSlideBarIcons = keyframes `
|
|
67
|
-
0% {
|
|
68
|
-
transform: scale(1) rotate(0deg);
|
|
69
|
-
}
|
|
70
|
-
50% {
|
|
71
|
-
transform: scale(0.5) rotate(90deg);
|
|
72
|
-
}
|
|
73
|
-
100% {
|
|
74
|
-
transform: scale(1) rotate(360deg);
|
|
75
|
-
}`;
|
|
76
|
-
export const rotate = (angle) => keyframes `
|
|
77
|
-
0% {
|
|
78
|
-
transform: rotate(0deg);
|
|
79
|
-
}
|
|
80
|
-
100% {
|
|
81
|
-
transform: rotate(${angle});
|
|
82
|
-
}`;
|
|
83
|
-
export const ring = keyframes `
|
|
84
|
-
0% { -webkit-transform: rotateZ(0); }
|
|
85
|
-
1% { -webkit-transform: rotateZ(30deg); }
|
|
86
|
-
3% { -webkit-transform: rotateZ(-28deg); }
|
|
87
|
-
5% { -webkit-transform: rotateZ(34deg); }
|
|
88
|
-
7% { -webkit-transform: rotateZ(-32deg); }
|
|
89
|
-
9% { -webkit-transform: rotateZ(30deg); }
|
|
90
|
-
11% { -webkit-transform: rotateZ(-28deg); }
|
|
91
|
-
13% { -webkit-transform: rotateZ(26deg); }
|
|
92
|
-
15% { -webkit-transform: rotateZ(-24deg); }
|
|
93
|
-
17% { -webkit-transform: rotateZ(22deg); }
|
|
94
|
-
19% { -webkit-transform: rotateZ(-20deg); }
|
|
95
|
-
21% { -webkit-transform: rotateZ(18deg); }
|
|
96
|
-
23% { -webkit-transform: rotateZ(-16deg); }
|
|
97
|
-
25% { -webkit-transform: rotateZ(14deg); }
|
|
98
|
-
27% { -webkit-transform: rotateZ(-12deg); }
|
|
99
|
-
29% { -webkit-transform: rotateZ(10deg); }
|
|
100
|
-
31% { -webkit-transform: rotateZ(-8deg); }
|
|
101
|
-
33% { -webkit-transform: rotateZ(6deg); }
|
|
102
|
-
35% { -webkit-transform: rotateZ(-4deg); }
|
|
103
|
-
37% { -webkit-transform: rotateZ(2deg); }
|
|
104
|
-
39% { -webkit-transform: rotateZ(-1deg); }
|
|
105
|
-
41% { -webkit-transform: rotateZ(1deg); }
|
|
106
|
-
43% { -webkit-transform: rotateZ(0); }
|
|
107
|
-
100% { -webkit-transform: rotateZ(0); }
|
|
108
|
-
`;
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
export const typographyProps = {
|
|
2
|
-
MuiTypography: {
|
|
3
|
-
defaultProps: {
|
|
4
|
-
variantMapping: {
|
|
5
|
-
text_xl_regular: "p",
|
|
6
|
-
text_lg_regular: "p",
|
|
7
|
-
text_md_regular: "p",
|
|
8
|
-
text_sm_regular: "p",
|
|
9
|
-
text_xs_regular: "p",
|
|
10
|
-
text_2xs_regular: "p",
|
|
11
|
-
text_xl_bold: "p",
|
|
12
|
-
text_lg_bold: "p",
|
|
13
|
-
text_md_bold: "p",
|
|
14
|
-
text_sm_bold: "p",
|
|
15
|
-
text_xs_bold: "p",
|
|
16
|
-
text_2xs_bold: "p",
|
|
17
|
-
text_xl_semibold: "p",
|
|
18
|
-
text_lg_semibold: "p",
|
|
19
|
-
text_md_semibold: "p",
|
|
20
|
-
text_sm_semibold: "p",
|
|
21
|
-
text_xs_semibold: "p",
|
|
22
|
-
text_2xs_semibold: "p",
|
|
23
|
-
text_xl_thin: "p",
|
|
24
|
-
text_lg_thin: "p",
|
|
25
|
-
text_md_thin: "p",
|
|
26
|
-
text_sm_thin: "p",
|
|
27
|
-
text_xs_thin: "p",
|
|
28
|
-
text_2xs_thin: "p",
|
|
29
|
-
display_2xl_regular: "h1",
|
|
30
|
-
display_xl_regular: "h2",
|
|
31
|
-
display_lg_regular: "h3",
|
|
32
|
-
display_md_regular: "h4",
|
|
33
|
-
display_sm_regular: "h5",
|
|
34
|
-
display_xs_regular: "h6",
|
|
35
|
-
display_2xl_bold: "h1",
|
|
36
|
-
display_xl_bold: "h2",
|
|
37
|
-
display_lg_bold: "h3",
|
|
38
|
-
display_md_bold: "h4",
|
|
39
|
-
display_sm_bold: "h5",
|
|
40
|
-
display_xs_bold: "h6",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
export const typographyVariants = {
|
|
46
|
-
// TEXT_REGULAR
|
|
47
|
-
text_xl_regular: {
|
|
48
|
-
font: "400 20px/30px inherit inherit",
|
|
49
|
-
},
|
|
50
|
-
text_lg_regular: {
|
|
51
|
-
font: "400 18px/28px inherit inherit",
|
|
52
|
-
},
|
|
53
|
-
text_md_regular: {
|
|
54
|
-
font: "400 16px/24px inherit inherit",
|
|
55
|
-
},
|
|
56
|
-
text_sm_regular: {
|
|
57
|
-
font: "400 14px/20px inherit inherit",
|
|
58
|
-
},
|
|
59
|
-
text_xs_regular: {
|
|
60
|
-
font: "400 12px/18px inherit inherit",
|
|
61
|
-
},
|
|
62
|
-
text_2xs_regular: {
|
|
63
|
-
font: "400 10px/14px inherit inherit",
|
|
64
|
-
},
|
|
65
|
-
// TEXT_BOLD
|
|
66
|
-
text_xl_bold: {
|
|
67
|
-
font: "600 20px/30px inherit inherit",
|
|
68
|
-
},
|
|
69
|
-
text_lg_bold: {
|
|
70
|
-
font: "700 18px/28px inherit inherit",
|
|
71
|
-
},
|
|
72
|
-
text_md_bold: {
|
|
73
|
-
font: "700 16px/24px inherit inherit",
|
|
74
|
-
},
|
|
75
|
-
text_sm_bold: {
|
|
76
|
-
font: "700 14px/20px inherit inherit",
|
|
77
|
-
},
|
|
78
|
-
text_xs_bold: {
|
|
79
|
-
font: "700 12px/18px inherit inherit",
|
|
80
|
-
},
|
|
81
|
-
text_2xs_bold: {
|
|
82
|
-
font: "700 10px/14px inherit inherit",
|
|
83
|
-
},
|
|
84
|
-
// TEXT_SEMIBOLD
|
|
85
|
-
text_xl_semibold: {
|
|
86
|
-
font: "600 20px/30px inherit inherit",
|
|
87
|
-
},
|
|
88
|
-
text_lg_semibold: {
|
|
89
|
-
font: "600 18px/28px inherit inherit",
|
|
90
|
-
},
|
|
91
|
-
text_md_semibold: {
|
|
92
|
-
font: "600 16px/24px inherit inherit",
|
|
93
|
-
},
|
|
94
|
-
text_sm_semibold: {
|
|
95
|
-
font: "600 14px/20px inherit inherit",
|
|
96
|
-
},
|
|
97
|
-
text_xs_semibold: {
|
|
98
|
-
font: "600 12px/18px inherit inherit",
|
|
99
|
-
},
|
|
100
|
-
text_2xs_semibold: {
|
|
101
|
-
font: "600 10px/14px inherit inherit",
|
|
102
|
-
},
|
|
103
|
-
// TEXT_THIN
|
|
104
|
-
text_xl_thin: {
|
|
105
|
-
font: "100 20px/30px inherit inherit",
|
|
106
|
-
},
|
|
107
|
-
text_lg_thin: {
|
|
108
|
-
font: "100 18px/28px inherit inherit",
|
|
109
|
-
},
|
|
110
|
-
text_md_thin: {
|
|
111
|
-
font: "100 16px/24px inherit inherit",
|
|
112
|
-
},
|
|
113
|
-
text_sm_thin: {
|
|
114
|
-
font: "100 14px/20px inherit inherit",
|
|
115
|
-
},
|
|
116
|
-
text_xs_thin: {
|
|
117
|
-
font: "100 12px/18px inherit inherit",
|
|
118
|
-
},
|
|
119
|
-
text_2xs_thin: {
|
|
120
|
-
font: "100 10px/14px inherit inherit",
|
|
121
|
-
},
|
|
122
|
-
// DISPLAY_REGULAR
|
|
123
|
-
display_2xl_regular: {
|
|
124
|
-
font: "400 72px/90px inherit inherit",
|
|
125
|
-
},
|
|
126
|
-
display_xl_regular: {
|
|
127
|
-
font: "400 60px/72px inherit inherit",
|
|
128
|
-
},
|
|
129
|
-
display_lg_regular: {
|
|
130
|
-
font: "400 48px/60px inherit inherit",
|
|
131
|
-
},
|
|
132
|
-
display_md_regular: {
|
|
133
|
-
font: "400 36px/44px inherit inherit",
|
|
134
|
-
},
|
|
135
|
-
display_sm_regular: {
|
|
136
|
-
font: "400 30px/38px inherit inherit",
|
|
137
|
-
},
|
|
138
|
-
display_xs_regular: {
|
|
139
|
-
font: "400 24px/32px inherit inherit",
|
|
140
|
-
},
|
|
141
|
-
// DISPLAY_BOLD
|
|
142
|
-
display_2xl_bold: {
|
|
143
|
-
font: "700 72px/90px inherit inherit",
|
|
144
|
-
},
|
|
145
|
-
display_xl_bold: {
|
|
146
|
-
font: "700 60px/72px inherit inherit",
|
|
147
|
-
},
|
|
148
|
-
display_lg_bold: {
|
|
149
|
-
font: "700 48px/60px inherit inherit",
|
|
150
|
-
},
|
|
151
|
-
display_md_bold: {
|
|
152
|
-
font: "700 36px/44px inherit inherit",
|
|
153
|
-
},
|
|
154
|
-
display_sm_bold: {
|
|
155
|
-
font: "700 30px/38px inherit inherit",
|
|
156
|
-
},
|
|
157
|
-
display_xs_bold: {
|
|
158
|
-
font: "700 24px/32px inherit inherit",
|
|
159
|
-
},
|
|
160
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a greeting based on the current time.
|
|
3
|
-
* @returns {string} The appropriate greeting.
|
|
4
|
-
*/
|
|
5
|
-
export const displayGreeting = () => {
|
|
6
|
-
const currentTime = new Date();
|
|
7
|
-
const currentHour = currentTime.getHours();
|
|
8
|
-
let greeting;
|
|
9
|
-
if (currentHour < 12 && currentHour >= 5) {
|
|
10
|
-
greeting = 'Доброе утро,';
|
|
11
|
-
}
|
|
12
|
-
else if (currentHour < 18 && currentHour > 12) {
|
|
13
|
-
greeting = 'Добрый день,';
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
greeting = 'Добрый вечер,';
|
|
17
|
-
}
|
|
18
|
-
return greeting;
|
|
19
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Function to extract year, month, and day from a Date object
|
|
3
|
-
*/
|
|
4
|
-
export const getDayIdentifier = (date) => {
|
|
5
|
-
const year = date.getFullYear();
|
|
6
|
-
const month = String(date.getMonth() + 1).padStart(2, "0"); // Months are zero-based in JavaScript
|
|
7
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
8
|
-
return `${year}-${month}-${day}`;
|
|
9
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const { userAgent } = window.navigator;
|
|
2
|
-
const getOperatingSystem = () => {
|
|
3
|
-
if (/windows nt/i.test(userAgent))
|
|
4
|
-
return "Windows";
|
|
5
|
-
if (/iphone|ipad|ipod/i.test(userAgent))
|
|
6
|
-
return "iOS";
|
|
7
|
-
if (/mac/i.test(userAgent))
|
|
8
|
-
return "macOS";
|
|
9
|
-
if (/linux/i.test(userAgent))
|
|
10
|
-
return "Linux";
|
|
11
|
-
if (/android/i.test(userAgent))
|
|
12
|
-
return "Android";
|
|
13
|
-
return "Unknown";
|
|
14
|
-
};
|
|
15
|
-
const getBrowser = () => {
|
|
16
|
-
if (/chrome/i.test(userAgent) && !/edge/i.test(userAgent))
|
|
17
|
-
return "Chrome";
|
|
18
|
-
if (/firefox/i.test(userAgent))
|
|
19
|
-
return "Firefox";
|
|
20
|
-
if (/safari/i.test(userAgent) && !/chrome/i.test(userAgent))
|
|
21
|
-
return "Safari";
|
|
22
|
-
if (/edg/i.test(userAgent))
|
|
23
|
-
return "Edge";
|
|
24
|
-
return "Unknown";
|
|
25
|
-
};
|
|
26
|
-
export const systemInfo = { os: getOperatingSystem(), browser: getBrowser() };
|
package/build/utils/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { systemInfo } from "./getSystemInfo";
|
|
2
|
-
export { timeAgo, timeAgoFromStart } from "./timeAgo";
|
|
3
|
-
export { displayGreeting } from "./displayGreeting";
|
|
4
|
-
export { getDayIdentifier } from "./getDayIdentifier";
|
|
5
|
-
export { useResponsiveDisplay } from "./useResponsiveDisplay";
|
package/build/utils/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { systemInfo } from "./getSystemInfo";
|
|
2
|
-
export { timeAgo, timeAgoFromStart } from "./timeAgo";
|
|
3
|
-
export { displayGreeting } from "./displayGreeting";
|
|
4
|
-
export { getDayIdentifier } from "./getDayIdentifier";
|
|
5
|
-
export { useResponsiveDisplay } from "./useResponsiveDisplay";
|
package/build/utils/timeAgo.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a given date to a human-readable relative time string.
|
|
3
|
-
*
|
|
4
|
-
* @param {Date} date - The date to be converted.
|
|
5
|
-
* @param lang
|
|
6
|
-
* @returns {string} A string representing the relative time using `Intl` format (e.g., "2 days ago").
|
|
7
|
-
*/
|
|
8
|
-
export declare const timeAgo: (date: Date, lang?: string) => string;
|
|
9
|
-
export declare const timeAgoFromStart: (date: Date, lang?: string) => string;
|