@awaymess/ui 0.1.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/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # @awaymess/ui
2
+
3
+ Custom MUI UI Component Library with Liquid Glass Design.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @awaymess/ui @mui/material @emotion/react @emotion/styled @mui/icons-material
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### 1. Wrap your application with `LibThemeProvider`
14
+
15
+ For the library to automatically apply the Glass Design to all components, wrap your app with the provider at the root level.
16
+
17
+ ```tsx
18
+ import { LibThemeProvider } from '@awaymess/ui';
19
+
20
+ function App() {
21
+ return (
22
+ <LibThemeProvider mode="light"> {/* or "dark" */}
23
+ {/* Your app components */}
24
+ </LibThemeProvider>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ### 2. Using Built-in MUI Components
30
+
31
+ All standard MUI components exported by this library have been restyled automatically. You don't need to do any extra work!
32
+
33
+ ```tsx
34
+ import { Button, TextField, Stack } from '@awaymess/ui';
35
+
36
+ function MyForm() {
37
+ return (
38
+ <Stack spacing={2} sx={{ maxWidth: 300 }}>
39
+ <TextField label="Username" variant="outlined" />
40
+ <TextField label="Password" type="password" variant="outlined" />
41
+ <Button variant="contained" color="primary">
42
+ Login
43
+ </Button>
44
+ </Stack>
45
+ );
46
+ }
47
+ ```
48
+
49
+ ### 3. Using Custom Components
50
+
51
+ We also provide ready-made complex components that utilize the glass theme out of the box.
52
+
53
+ #### `UserCard`
54
+
55
+ ```tsx
56
+ import { UserCard } from '@awaymess/ui';
57
+
58
+ function Profile() {
59
+ return (
60
+ <UserCard
61
+ name="Night Developer"
62
+ role="Senior Software Engineer"
63
+ avatarUrl="https://example.com/avatar.jpg"
64
+ />
65
+ );
66
+ }
67
+ ```
68
+
69
+ #### `ExampleForm`
70
+
71
+ A complex form that showcases multiple restyled MUI components (Inputs, Selects, Checkboxes, Switches, Buttons) working together.
72
+
73
+ ```tsx
74
+ import { ExampleForm } from '@awaymess/ui';
75
+
76
+ function RegistrationPage() {
77
+ return <ExampleForm />;
78
+ }
79
+ ```
80
+
81
+ ## Themes
82
+
83
+ The library provides both `lightTheme` and `darkTheme` based on the Liquid Glass Design system. You can switch between them using the `mode` prop on `LibThemeProvider`.
84
+
85
+ ## Publishing to npm
86
+
87
+ 1. Change the name in `package.json` to your desired npm package name.
88
+ 2. Build the library: `npm run build`
89
+ 3. Publish: `npm publish --access public`
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { CardProps } from '@mui/material';
3
+ export { Alert, AlertProps, AppBar, AppBarProps, Autocomplete, AutocompleteProps, Box, Button, ButtonProps, Card, CardProps, Checkbox, CheckboxProps, Chip, ChipProps, Container, Dialog, DialogProps, Divider, DividerProps, Drawer, DrawerProps, Grid, LinearProgress, LinearProgressProps, Menu, MenuItem, MenuItemProps, MenuProps, OutlinedInput, Paper, PaperProps, Select, SelectProps, Stack, Step, StepConnector, StepIcon, StepLabel, Stepper, StepperProps, Switch, SwitchProps, Tab, TabProps, Table, TableBody, TableCell, TableContainer, TableHead, TableProps, TableRow, Tabs, TabsProps, TextField, TextFieldProps, Tooltip, TooltipProps, Typography, TypographyProps } from '@mui/material';
4
+ export { DatePicker } from '@mui/x-date-pickers';
5
+
6
+ interface LibThemeProviderProps {
7
+ children: React.ReactNode;
8
+ mode?: 'light' | 'dark';
9
+ }
10
+ declare const LibThemeProvider: React.FC<LibThemeProviderProps>;
11
+
12
+ interface GlassCardProps extends CardProps {
13
+ }
14
+ declare const GlassCard: React.FC<GlassCardProps>;
15
+
16
+ interface UserCardProps extends CardProps {
17
+ name: string;
18
+ role?: string;
19
+ avatarUrl?: string;
20
+ }
21
+ declare const UserCard: React.FC<UserCardProps>;
22
+
23
+ declare const ExampleForm: React.FC;
24
+
25
+ export { ExampleForm, GlassCard, GlassCardProps, LibThemeProvider, LibThemeProviderProps, UserCard, UserCardProps };