@atomazing-org/design-system 1.0.5 → 1.0.6
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
package/README.MD
CHANGED
|
@@ -1,34 +1,206 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 📚 Table of Contents
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
1. [Introduction](#1-introduction)
|
|
4
|
+
2. [Installation](#2-installation)
|
|
5
|
+
3. [Usage](#3-usage)
|
|
6
|
+
3.1 [Theme Provider Setup](#31-theme-provider-setup)
|
|
7
|
+
3.2 [Typography Variants](#32-typography-variants)
|
|
8
|
+
3.3 [Global Styles](#33-global-styles)
|
|
9
|
+
3.4 [Component Overrides](#34-component-overrides)
|
|
10
|
+
4. [Utilities](#4-utilities)
|
|
11
|
+
4.1 [Color Utilities](#41-color-utilities)
|
|
12
|
+
4.2 [System Info](#42-system-info)
|
|
13
|
+
5. [Animations](#5-animations)
|
|
14
|
+
6. [Theming](#6-theming)
|
|
15
|
+
6.1 [Theme Creation](#61-theme-creation)
|
|
16
|
+
6.2 [Dark Mode Strategy](#62-dark-mode-strategy)
|
|
17
|
+
7. [Typography Configuration](#7-typography-configuration)
|
|
18
|
+
8. [Contributing](#8-contributing)
|
|
19
|
+
9. [License](#9-license)
|
|
4
20
|
|
|
5
|
-
|
|
21
|
+
## 1. Introduction
|
|
6
22
|
|
|
7
|
-
|
|
23
|
+
**@atomazing-org/design-system** is a reusable, opinionated design system built on top of [Material UI (MUI)](https://mui.com/) and [Emotion](https://emotion.sh/).
|
|
24
|
+
It offers a consistent foundation for building modern web interfaces with minimal configuration.
|
|
8
25
|
|
|
9
|
-
|
|
26
|
+
This package provides:
|
|
10
27
|
|
|
11
|
-
|
|
28
|
+
- 🌈 Customizable MUI theme generator
|
|
29
|
+
- ✍️ Extended typography variants
|
|
30
|
+
- 🎨 Global styles (with dark/light mode support)
|
|
31
|
+
- 🧩 Component style overrides
|
|
32
|
+
- 🛠 Utility functions (e.g., color contrast, system info)
|
|
33
|
+
- 🎞 Smooth keyframe animations
|
|
12
34
|
|
|
13
|
-
|
|
35
|
+
The design system is ideal for teams working across multiple front-end applications who want to unify styles, reduce duplication, and ship faster with consistent UI patterns.
|
|
14
36
|
|
|
15
|
-
## Installation
|
|
37
|
+
## 2. Installation
|
|
16
38
|
|
|
17
|
-
|
|
39
|
+
To install the design system in your project, use your preferred package manager:
|
|
18
40
|
|
|
41
|
+
```bash
|
|
42
|
+
# Using npm
|
|
43
|
+
npm install @atomazing-org/design-system
|
|
19
44
|
```
|
|
20
|
-
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Using yarn
|
|
48
|
+
yarn add @atomazing-org/design-system
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Using pnpm
|
|
53
|
+
pnpm add @atomazing-org/design-system
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## 3. Peer Dependencies & Requirements
|
|
58
|
+
|
|
59
|
+
The `@atomazing-org/design-system` package relies on several peer dependencies to integrate properly with your application stack.
|
|
60
|
+
|
|
61
|
+
Make sure the following libraries are installed in your project:
|
|
62
|
+
|
|
63
|
+
| Package | Version | Required For |
|
|
64
|
+
|----------------------|------------------|-------------------------------------|
|
|
65
|
+
| `@mui/material` | `^7.2.0` | Core MUI theming and components |
|
|
66
|
+
| `@mui/icons-material`| `^7.2.0` | Icon support |
|
|
67
|
+
| `@emotion/react` | `^11.0.0` | Emotion styling engine (required) |
|
|
68
|
+
| `@emotion/styled` | `^11.0.0` | Styled components with Emotion |
|
|
69
|
+
| `@emotion/css` | `^11.13.5` | (Optional) Raw className utility |
|
|
70
|
+
|
|
71
|
+
### TypeScript Support
|
|
72
|
+
|
|
73
|
+
This package is fully written in TypeScript and ships with `.d.ts` type declarations.
|
|
74
|
+
Ensure your project uses TypeScript 4.5+ for best compatibility.
|
|
75
|
+
|
|
76
|
+
> ✅ **Tip:** If you encounter missing types (e.g., for `@emotion/react`), install them manually:
|
|
77
|
+
```bash
|
|
78
|
+
npm install -D @types/react
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 4. Features Overview
|
|
82
|
+
|
|
83
|
+
This package provides a modular and extendable foundation for your design system, broken into the following areas:
|
|
84
|
+
|
|
85
|
+
### 🎨 Theme Generator (`createCustomTheme`)
|
|
86
|
+
- Dynamically generate MUI themes using custom primary and secondary colors.
|
|
87
|
+
- Supports light, dark, system, and auto modes.
|
|
88
|
+
- Automatically adapts based on background contrast.
|
|
89
|
+
|
|
90
|
+
### 🧩 Component Overrides (`commonComponentProps`)
|
|
91
|
+
- Global style customizations for common MUI components (e.g. `Button`, `Tooltip`, `Dialog`, `Slider`).
|
|
92
|
+
- Shared defaults to ensure consistent spacing, border-radius, shadows, and blur effects.
|
|
93
|
+
|
|
94
|
+
### ✍️ Typography Variants (`typographyVariants`)
|
|
95
|
+
- Dozens of additional font sizes and weights beyond MUI defaults.
|
|
96
|
+
- Uses names like `text_md_regular`, `display_lg_bold` for clarity and structure.
|
|
97
|
+
- Easily configurable in your MUI theme's `typography` field.
|
|
98
|
+
|
|
99
|
+
### 🖥 Global Styles (`GlobalStyles`)
|
|
100
|
+
- Applies global CSS resets and base styles (scrollbars, font, highlight colors).
|
|
101
|
+
- Reacts to theme mode (`light` or `dark`) to dynamically adjust UI contrast.
|
|
102
|
+
- Uses Emotion’s `<Global />` component under the hood.
|
|
103
|
+
|
|
104
|
+
### 🎞 Animations (`keyframes`)
|
|
105
|
+
- Predefined keyframes for fade, slide, scale, and pulse effects.
|
|
106
|
+
- Includes customizable utilities like `pulseAnimation(color)` and `progressPulse(color)`.
|
|
107
|
+
|
|
108
|
+
### 🛠 Utilities
|
|
109
|
+
- `getFontColor`: Calculates readable font color from a background hex.
|
|
110
|
+
- `isDarkMode`: Detects appropriate mode based on system or color contrast.
|
|
111
|
+
- `systemInfo`: Returns the user's OS and browser in a reliable format.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
These modules are built to be tree-shakable and can be imported individually.
|
|
116
|
+
|
|
117
|
+
## 5. Usage Examples
|
|
118
|
+
|
|
119
|
+
This section shows how to integrate the design system in your React application.
|
|
120
|
+
|
|
121
|
+
### 5.1. Wrapping with ThemeProvider
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import React from 'react';
|
|
125
|
+
import ReactDOM from 'react-dom/client';
|
|
126
|
+
import App from './App';
|
|
127
|
+
|
|
128
|
+
import {
|
|
129
|
+
createCustomTheme,
|
|
130
|
+
GlobalStyles,
|
|
131
|
+
} from '@atomazing-org/design-system';
|
|
132
|
+
|
|
133
|
+
import { ThemeProvider, CssBaseline } from '@mui/material';
|
|
134
|
+
|
|
135
|
+
const theme = createCustomTheme('#4461F2', '#F9F9FC', 'light');
|
|
136
|
+
|
|
137
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
138
|
+
<ThemeProvider theme={theme}>
|
|
139
|
+
<CssBaseline />
|
|
140
|
+
<GlobalStyles />
|
|
141
|
+
<App />
|
|
142
|
+
</ThemeProvider>,
|
|
143
|
+
);
|
|
21
144
|
```
|
|
22
145
|
|
|
23
|
-
##
|
|
146
|
+
## 6. Customization
|
|
147
|
+
|
|
148
|
+
The design system is built to be flexible and extendable. You can override or extend the default behavior in several ways.
|
|
149
|
+
|
|
150
|
+
### 6.1. Customizing the Theme
|
|
151
|
+
|
|
152
|
+
You can generate your own theme using `createCustomTheme`:
|
|
24
153
|
|
|
154
|
+
```ts
|
|
155
|
+
import { createCustomTheme } from '@atomazing-org/design-system';
|
|
156
|
+
|
|
157
|
+
const theme = createCustomTheme(
|
|
158
|
+
'#0088cc', // primary color
|
|
159
|
+
'#f0f4f8', // background (secondary) color
|
|
160
|
+
'light', // palette mode
|
|
161
|
+
);
|
|
25
162
|
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
163
|
+
|
|
164
|
+
## 7. Tree-Shaking & Importing
|
|
165
|
+
|
|
166
|
+
The `@atomazing-org/design-system` package is optimized for modern bundlers and supports tree-shaking out of the box.
|
|
167
|
+
|
|
168
|
+
To minimize bundle size:
|
|
169
|
+
|
|
170
|
+
### 7.1. Use Named Imports
|
|
171
|
+
|
|
172
|
+
Instead of importing everything at once, prefer named imports:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
// ✅ Recommended (tree-shakable)
|
|
176
|
+
import { fadeIn, getFontColor } from '@atomazing-org/design-system';
|
|
177
|
+
|
|
178
|
+
// 🚫 Not recommended (bundles everything)
|
|
179
|
+
import * as DesignSystem from '@atomazing-org/design-system';
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 8. Contribution Guide
|
|
183
|
+
|
|
184
|
+
We welcome contributions to the design system! Whether it's improving styles, fixing bugs, or adding utilities — every improvement helps.
|
|
185
|
+
|
|
186
|
+
### 8.1. Getting Started
|
|
187
|
+
|
|
188
|
+
Clone the repository and install dependencies:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
git clone https://github.com/atomazing/design-system.git
|
|
192
|
+
cd design-system
|
|
193
|
+
npm install
|
|
34
194
|
```
|
|
195
|
+
|
|
196
|
+
## 9. License
|
|
197
|
+
|
|
198
|
+
This project is licensed under the [MIT License](./LICENSE).
|
|
199
|
+
|
|
200
|
+
You are free to use, modify, distribute, and sublicense the design system in your projects, whether personal or commercial.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
© PonomarevBPM + MarkSinD, 2025
|
|
205
|
+
Maintained under the Atomazing Org initiative.
|
|
206
|
+
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
2
|
+
import * as _emotion_react from '@emotion/react';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ErrorInfo, FC } from 'react';
|
|
5
|
+
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
6
|
+
import * as _mui_material from '@mui/material';
|
|
7
|
+
import { Theme, PaletteMode } from '@mui/material';
|
|
8
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
+
import { TypographyVariantsOptions } from '@mui/material/styles/createTypography';
|
|
10
|
+
|
|
11
|
+
declare const DialogBtn: _emotion_styled.StyledComponent<_mui_material.ButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "href" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "size" | "startIcon" | "variant"> & {
|
|
12
|
+
theme?: _emotion_react.Theme;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
|
|
15
|
+
interface ErrorBoundaryProps {
|
|
16
|
+
children: React__default.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface ErrorBoundaryState {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
error?: Error;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* ErrorBoundary component that catches and displays errors.
|
|
24
|
+
*/
|
|
25
|
+
declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
26
|
+
constructor(props: ErrorBoundaryProps);
|
|
27
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
28
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
29
|
+
render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare const Loading: () => react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare const PathName: _emotion_styled.StyledComponent<{
|
|
35
|
+
theme?: _emotion_react.Theme;
|
|
36
|
+
as?: React.ElementType;
|
|
37
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Validates whether a given string is a valid 3- or 6-digit hex color code (e.g., "#fff" or "#ffffff").
|
|
41
|
+
*
|
|
42
|
+
* @param value - The string to check.
|
|
43
|
+
* @returns `true` if the string is a valid hex color; otherwise, `false`.
|
|
44
|
+
*/
|
|
45
|
+
declare const isHexColor: (value: string) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Determines the ideal font color (white or black) for contrast against a given background color.
|
|
48
|
+
*
|
|
49
|
+
* Uses luminance calculation (YIQ) to ensure accessibility and visual clarity.
|
|
50
|
+
*
|
|
51
|
+
* @param backgroundColor - A valid hex color (e.g., "#ffffff").
|
|
52
|
+
* @returns A hex color string (`fontLight` or `fontDark`) suitable for overlay text.
|
|
53
|
+
*/
|
|
54
|
+
declare const getFontColor: (backgroundColor: string) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Determines whether the ideal font color for a background is light (i.e., white).
|
|
57
|
+
*
|
|
58
|
+
* @param color - The background color in hex.
|
|
59
|
+
* @returns `true` if white text is recommended; otherwise, `false`.
|
|
60
|
+
*/
|
|
61
|
+
declare const isFontLight: (color: string) => boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Common component style overrides and default props shared across the design system.
|
|
65
|
+
* This object should be spread into the `components` field of the MUI theme.
|
|
66
|
+
*/
|
|
67
|
+
declare const commonComponentProps: Theme["components"];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Available options for dark mode configuration.
|
|
71
|
+
* - `system`: Follows the operating system preference.
|
|
72
|
+
* - `auto`: Uses contrast-based detection (e.g., based on background color).
|
|
73
|
+
* - `light`: Forces light mode.
|
|
74
|
+
* - `dark`: Forces dark mode.
|
|
75
|
+
*/
|
|
76
|
+
type DarkModeOptions = "system" | "auto" | "light" | "dark";
|
|
77
|
+
/**
|
|
78
|
+
* Represents user-specific theme preferences stored in the application.
|
|
79
|
+
*/
|
|
80
|
+
interface AppSettings {
|
|
81
|
+
/**
|
|
82
|
+
* The selected theme name. `"system"` indicates the app should follow system preference.
|
|
83
|
+
* Other values are custom theme names defined by the application.
|
|
84
|
+
*/
|
|
85
|
+
theme: "system" | (string & {});
|
|
86
|
+
/**
|
|
87
|
+
* Controls how dark mode is applied in the app.
|
|
88
|
+
*/
|
|
89
|
+
darkMode: DarkModeOptions;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Represents the theme mode as reported by the operating system or browser.
|
|
94
|
+
* - `light`: Light mode
|
|
95
|
+
* - `dark`: Dark mode
|
|
96
|
+
* - `unknown`: Theme mode could not be determined
|
|
97
|
+
*/
|
|
98
|
+
type SystemTheme = "light" | "dark" | "unknown";
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Generates a custom MUI theme using a primary color, background color, and color mode.
|
|
102
|
+
*
|
|
103
|
+
* @param primaryColor - The main color used for primary palette.
|
|
104
|
+
* @param backgroundColor - Background color (used as secondary). Defaults to dark blue.
|
|
105
|
+
* @param mode - MUI palette mode ('light' | 'dark'). Defaults to 'dark'.
|
|
106
|
+
* @returns A MUI Theme object.
|
|
107
|
+
*/
|
|
108
|
+
declare const createCustomTheme: (primaryColor: string, backgroundColor?: string, mode?: PaletteMode) => Theme;
|
|
109
|
+
/**
|
|
110
|
+
* A predefined list of named themes based on the `themeConfig` definition.
|
|
111
|
+
*/
|
|
112
|
+
declare const themes: {
|
|
113
|
+
name: string;
|
|
114
|
+
MuiTheme: Theme;
|
|
115
|
+
}[];
|
|
116
|
+
/**
|
|
117
|
+
* Determines whether dark mode should be enabled based on user settings and system conditions.
|
|
118
|
+
*
|
|
119
|
+
* @param darkMode - User preference: 'light' | 'dark' | 'system' | 'auto'.
|
|
120
|
+
* @param systemTheme - Detected OS-level theme: 'light' | 'dark'.
|
|
121
|
+
* @param backgroundColor - The background color to assess contrast in 'auto' mode.
|
|
122
|
+
* @returns True if dark mode should be used.
|
|
123
|
+
*/
|
|
124
|
+
declare const isDarkMode: (darkMode: AppSettings["darkMode"], systemTheme: SystemTheme, backgroundColor: string) => boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Injects global styles into the document using Emotion.
|
|
128
|
+
* These styles include font setup, base HTML styles, custom scrollbars,
|
|
129
|
+
* selection styling, and some accessibility tweaks.
|
|
130
|
+
*
|
|
131
|
+
* Uses the MUI theme to dynamically adjust colors for light/dark mode.
|
|
132
|
+
*/
|
|
133
|
+
declare const GlobalStyles: FC;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Fade in from the left with slight movement on the X-axis.
|
|
137
|
+
*/
|
|
138
|
+
declare const fadeInLeft: {
|
|
139
|
+
name: string;
|
|
140
|
+
styles: string;
|
|
141
|
+
anim: 1;
|
|
142
|
+
toString: () => string;
|
|
143
|
+
} & string;
|
|
144
|
+
/**
|
|
145
|
+
* Simple fade in animation (opacity only).
|
|
146
|
+
*/
|
|
147
|
+
declare const fadeIn: {
|
|
148
|
+
name: string;
|
|
149
|
+
styles: string;
|
|
150
|
+
anim: 1;
|
|
151
|
+
toString: () => string;
|
|
152
|
+
} & string;
|
|
153
|
+
/**
|
|
154
|
+
* Slide in from the left side of the screen.
|
|
155
|
+
*/
|
|
156
|
+
declare const slideIn: {
|
|
157
|
+
name: string;
|
|
158
|
+
styles: string;
|
|
159
|
+
anim: 1;
|
|
160
|
+
toString: () => string;
|
|
161
|
+
} & string;
|
|
162
|
+
/**
|
|
163
|
+
* Slide in from the bottom of the screen.
|
|
164
|
+
*/
|
|
165
|
+
declare const slideInBottom: {
|
|
166
|
+
name: string;
|
|
167
|
+
styles: string;
|
|
168
|
+
anim: 1;
|
|
169
|
+
toString: () => string;
|
|
170
|
+
} & string;
|
|
171
|
+
/**
|
|
172
|
+
* Scale from 0 to full size.
|
|
173
|
+
*/
|
|
174
|
+
declare const scale: {
|
|
175
|
+
name: string;
|
|
176
|
+
styles: string;
|
|
177
|
+
anim: 1;
|
|
178
|
+
toString: () => string;
|
|
179
|
+
} & string;
|
|
180
|
+
/**
|
|
181
|
+
* Creates a pulsating animation using scale and box-shadow.
|
|
182
|
+
* Simulates a glowing effect.
|
|
183
|
+
*
|
|
184
|
+
* @param clr - The base color for the shadow in hex format.
|
|
185
|
+
* @param shadowBlur - The maximum spread of the shadow during the pulse (default: 12).
|
|
186
|
+
* @returns Emotion keyframes animation.
|
|
187
|
+
*/
|
|
188
|
+
declare const pulseAnimation: (clr: string, shadowBlur?: number) => {
|
|
189
|
+
name: string;
|
|
190
|
+
styles: string;
|
|
191
|
+
anim: 1;
|
|
192
|
+
toString: () => string;
|
|
193
|
+
} & string;
|
|
194
|
+
/**
|
|
195
|
+
* Creates a glowing pulse animation using drop-shadow.
|
|
196
|
+
* Used in progress or highlight elements.
|
|
197
|
+
*
|
|
198
|
+
* @param clr - The glow color in hex.
|
|
199
|
+
* @returns Emotion keyframes animation.
|
|
200
|
+
*/
|
|
201
|
+
declare const progressPulse: (clr: string) => {
|
|
202
|
+
name: string;
|
|
203
|
+
styles: string;
|
|
204
|
+
anim: 1;
|
|
205
|
+
toString: () => string;
|
|
206
|
+
} & string;
|
|
207
|
+
/**
|
|
208
|
+
* A bounce-scale animation used during logout transition.
|
|
209
|
+
*/
|
|
210
|
+
declare const logoutAnimation: {
|
|
211
|
+
name: string;
|
|
212
|
+
styles: string;
|
|
213
|
+
anim: 1;
|
|
214
|
+
toString: () => string;
|
|
215
|
+
} & string;
|
|
216
|
+
/**
|
|
217
|
+
* Subtle bounce animation used for install app prompts.
|
|
218
|
+
*/
|
|
219
|
+
declare const installAppAnimation: {
|
|
220
|
+
name: string;
|
|
221
|
+
styles: string;
|
|
222
|
+
anim: 1;
|
|
223
|
+
toString: () => string;
|
|
224
|
+
} & string;
|
|
225
|
+
|
|
226
|
+
declare const ColorPalette: {
|
|
227
|
+
readonly fontDark: "#101727";
|
|
228
|
+
readonly fontLight: "#f0f0f0";
|
|
229
|
+
readonly darkMode: "#383838";
|
|
230
|
+
readonly lightMode: "#ffffff";
|
|
231
|
+
readonly purple: "#b624ff";
|
|
232
|
+
readonly red: "#ff3131";
|
|
233
|
+
readonly orange: "#ff9318";
|
|
234
|
+
readonly orangeDark: "#ff9500";
|
|
235
|
+
};
|
|
236
|
+
declare const themeConfig: Record<string, {
|
|
237
|
+
primaryColor: string;
|
|
238
|
+
secondaryColor?: string;
|
|
239
|
+
}>;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Default MUI Typography variant-to-element mapping.
|
|
243
|
+
* Custom variants are mapped to HTML tags like <p>, <h1>, etc.
|
|
244
|
+
*/
|
|
245
|
+
declare const typographyProps: Theme["components"];
|
|
246
|
+
/**
|
|
247
|
+
* Custom typography variants.
|
|
248
|
+
* Defines font-weight, size, line-height and optionally fallback font.
|
|
249
|
+
*/
|
|
250
|
+
declare const typographyVariants: TypographyVariantsOptions;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Returns a greeting based on the current time.
|
|
254
|
+
* @returns {string} The appropriate greeting.
|
|
255
|
+
*/
|
|
256
|
+
declare const displayGreeting: () => string;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Function to extract year, month, and day from a Date object
|
|
260
|
+
*/
|
|
261
|
+
declare const getDayIdentifier: (date: Date) => string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* A list of supported operating systems.
|
|
265
|
+
*/
|
|
266
|
+
type OperatingSystem = "Windows" | "macOS" | "Linux" | "iOS" | "Android" | "Unknown";
|
|
267
|
+
/**
|
|
268
|
+
* A list of supported browsers.
|
|
269
|
+
*/
|
|
270
|
+
type Browser = "Chrome" | "Firefox" | "Safari" | "Edge" | "Unknown";
|
|
271
|
+
/**
|
|
272
|
+
* Basic information about the user's system (OS and browser).
|
|
273
|
+
*/
|
|
274
|
+
declare const systemInfo: {
|
|
275
|
+
os: OperatingSystem;
|
|
276
|
+
browser: Browser;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Converts a given date to a human-readable relative time string.
|
|
281
|
+
*
|
|
282
|
+
* @param {Date} date - The date to be converted.
|
|
283
|
+
* @param lang
|
|
284
|
+
* @returns {string} A string representing the relative time using `Intl` format (e.g., "2 days ago").
|
|
285
|
+
*/
|
|
286
|
+
declare const timeAgo: (date: Date, lang?: string) => string;
|
|
287
|
+
declare const timeAgoFromStart: (date: Date, lang?: string) => string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* A custom React hook to determine if the current device is a smaller device
|
|
291
|
+
* based on the screen width.
|
|
292
|
+
* @param [breakpoint=768] - The breakpoint in pixels at which a device is considered "smaller".
|
|
293
|
+
* @returns {boolean} - A boolean value indicating whether the current device is a smaller device.
|
|
294
|
+
*/
|
|
295
|
+
declare const useResponsiveDisplay: (breakpoint?: number) => boolean;
|
|
296
|
+
|
|
297
|
+
export { type AppSettings, ColorPalette, type DarkModeOptions, DialogBtn, ErrorBoundary, GlobalStyles, Loading, PathName, type SystemTheme, commonComponentProps, createCustomTheme, displayGreeting, fadeIn, fadeInLeft, getDayIdentifier, getFontColor, installAppAnimation, isDarkMode, isFontLight, isHexColor, logoutAnimation, progressPulse, pulseAnimation, scale, slideIn, slideInBottom, systemInfo, themeConfig, themes, timeAgo, timeAgoFromStart, typographyProps, typographyVariants, useResponsiveDisplay };
|