@candy.thieves/ui-kit-lumos 0.0.9 → 0.0.11
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 +164 -59
- package/dist/favicon-dark-108.svg +1 -0
- package/dist/favicon-dark-16.svg +4 -0
- package/dist/favicon-dark-24.svg +4 -0
- package/dist/favicon-dark-48.svg +4 -0
- package/dist/favicon-dark-72.svg +1 -0
- package/dist/favicon-light-108.svg +4 -0
- package/dist/favicon-light-16.svg +1 -0
- package/dist/favicon-light-24.svg +4 -0
- package/dist/favicon-light-48.svg +1 -0
- package/dist/favicon-light-72.svg +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2113 -1287
- package/dist/index.js.map +1 -1
- package/dist/types/assets/icons/ErrorIcon.d.ts +3 -0
- package/dist/types/assets/icons/FileIcon.d.ts +3 -0
- package/dist/types/assets/icons/Sending.d.ts +3 -0
- package/dist/types/assets/index.d.ts +4 -0
- package/dist/types/assets/logo/Logo.d.ts +10 -0
- package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +6 -0
- package/dist/types/components/AudioPlayer/index.d.ts +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +17 -0
- package/dist/types/components/Avatar/AvatarBlock.d.ts +15 -0
- package/dist/types/components/Avatar/MainAvatar.d.ts +20 -0
- package/dist/types/components/Avatar/index.d.ts +3 -0
- package/dist/types/components/Button/Button.d.ts +19 -0
- package/dist/types/components/Button/ButtonLegacy.d.ts +41 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Cards/Cards.d.ts +7 -0
- package/dist/types/components/Cards/index.d.ts +1 -0
- package/dist/types/components/Checkbox/FormCheckbox.d.ts +1 -2
- package/dist/types/components/CircularProgress/CircularProgress.d.ts +10 -0
- package/dist/types/components/CircularProgress/index.d.ts +1 -0
- package/dist/types/components/Input/FormInput.d.ts +1 -2
- package/dist/types/components/LinearProgress/LinearProgress.d.ts +14 -0
- package/dist/types/components/LinearProgress/index.d.ts +1 -0
- package/dist/types/components/Message/AttachmentItem.d.ts +2 -0
- package/dist/types/components/Message/Message.d.ts +2 -0
- package/dist/types/components/Message/MessageStatus.d.ts +2 -0
- package/dist/types/components/Message/ReplyPreview.d.ts +2 -0
- package/dist/types/components/Message/index.d.ts +2 -0
- package/dist/types/components/Message/types.d.ts +40 -0
- package/dist/types/components/PasswordInput/FormPasswordInput.d.ts +2 -3
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/types/components/ReadMore/ReadMore.d.ts +8 -0
- package/dist/types/components/ReadMore/index.d.ts +1 -0
- package/dist/types/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +66 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/Table/Table.d.ts +6 -0
- package/dist/types/components/Table/index.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +18 -0
- package/dist/types/components/Tabs/index.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +12 -0
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/Typography/Typography.d.ts +4 -5
- package/dist/types/components/index.d.ts +18 -7
- package/dist/types/constants/constants.d.ts +3 -0
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/demo/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/types.d.ts +4 -0
- package/dist/types/utils/formatTime.d.ts +1 -0
- package/dist/types/utils/getFirstLetterCapitalized.d.ts +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/isAudioAttachment.d.ts +2 -0
- package/dist/types/utils/isThemeColor.d.ts +2 -0
- package/dist/types/utils/truncateText.d.ts +1 -0
- package/package.json +5 -1
- package/dist/favicon.svg +0 -1
- package/dist/icons.svg +0 -24
- package/dist/types/components/TestMixins/index.d.ts +0 -1
- /package/dist/types/{components → demo}/TestMixins/TestMixins.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,36 +1,139 @@
|
|
|
1
|
-
|
|
2
|
-
# Lumos UI Kit
|
|
1
|
+
# Lumos UI-kit
|
|
3
2
|
|
|
4
3
|
🎨 **Component library for **Lumos app** — a unified design system and interface elements.**
|
|
5
4
|
|
|
6
5
|
**📖 Description:**
|
|
7
6
|
UI Kit is a centralized library of reusable components created to ensure interface consistency across the **Lumos app** ecosystem.
|
|
8
7
|
|
|
9
|
-
The project is built on
|
|
8
|
+
The project is built on _React_ and _TypeScript_, using _Storybook_ for component documentation and visual testing. Build is optimized with _Vite_.
|
|
10
9
|
|
|
11
10
|
👥 Team:
|
|
12
11
|
|
|
13
|
-
**PM** -
|
|
12
|
+
**PM** - _Yana Korotenko_
|
|
14
13
|
|
|
15
|
-
**Team-lead**
|
|
14
|
+
**Team-lead** - _Vladislav Kravchenko_
|
|
16
15
|
|
|
17
16
|
**Front-end:**
|
|
18
|
-
* [Vikastgn](https://github.com/Vikastgn) - Viktoriya Stognieva (**Main**)
|
|
19
|
-
* [Intrstng](https://github.com/intrstng) - Andrei Babich
|
|
20
|
-
* [hoakiin](https://github.com/hoakiin) - Ekaterina Olesik
|
|
21
|
-
* [VladSkij](https://github.com/VladSkij) - Vladislav Skalskij
|
|
22
|
-
* [tymanskaya](https://github.com/tymanskaya) - Ekaterina Tymanskaya
|
|
23
17
|
|
|
24
|
-
|
|
18
|
+
- [Vikastgn](https://github.com/Vikastgn) - Viktoriya Stognieva (**Main**)
|
|
19
|
+
- [Intrstng](https://github.com/intrstng) - Andrei Babich
|
|
20
|
+
- [hoakiin](https://github.com/hoakiin) - Ekaterina Olesik
|
|
21
|
+
- [VladSkij](https://github.com/VladSkij) - Vladislav Skalskij
|
|
22
|
+
- [tymanskaya](https://github.com/tymanskaya) - Ekaterina Tymanskaya
|
|
23
|
+
|
|
24
|
+
## 🔄 Deploy
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- [UI-kit Storybook deploy link](https://lumos-ui-kit-storybook.vercel.app/)
|
|
27
27
|
|
|
28
28
|
## 🔗 Related Projects
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
[UI-kit Lumos npm-package](https://www.npmjs.com/package/@candy.thieves/ui-kit-lumos) — a UI component library (UI-kit) for the **Lumos** application
|
|
31
|
+
|
|
32
|
+
[UI-kit Lumos repository](https://github.com/candysthieves/lumos-ui-kit) — UI-kit library repository for the **Lumos** application
|
|
33
|
+
|
|
34
|
+
[Lumos app repository](https://github.com/candysthieves/client) — main application using the UI-kit
|
|
35
|
+
|
|
36
|
+
[Lumos app deploy link](https://lumosapp.net/) — deployment link for the application using the UI-kit
|
|
30
37
|
|
|
31
38
|
[Figma Design](https://www.figma.com/design/UehOuThHVruUR8jcC22FXS/Inctagram?m=auto&t=DixPh2DJFl4iZtwB-6) — mockups and design system
|
|
32
39
|
|
|
33
|
-
##
|
|
40
|
+
## 📋 Instructions for Integrating UI-kit with the app
|
|
41
|
+
|
|
42
|
+
### 📦 UI-kit library installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install @candy.thieves/ui-kit-lumos@latest
|
|
46
|
+
# or
|
|
47
|
+
yarn add @candy.thieves/ui-kit-lumos@latest
|
|
48
|
+
# or
|
|
49
|
+
pnpm add @candy.thieves/ui-kit-lumos@latest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### ⚙️ Basic Setup
|
|
53
|
+
|
|
54
|
+
🌐 **Global Style import for _React app (Vite, CRA)_**
|
|
55
|
+
|
|
56
|
+
🎨 _Add the styles to main.tsx:_
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
// my-vite-app/src/main.tsx
|
|
60
|
+
|
|
61
|
+
import '@candy.thieves/ui-kit-lumos/dist/index.css'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
💻 **Using Components**
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// my-vite-app/src/components/MyComponent.tsx
|
|
68
|
+
|
|
69
|
+
import { Button } from '@candy.thieves/ui-kit-lumos'
|
|
70
|
+
import { Typography } from '@candy.thieves/ui-kit-lumos'
|
|
71
|
+
|
|
72
|
+
export const MyComponent = () => {
|
|
73
|
+
return (
|
|
74
|
+
<div>
|
|
75
|
+
<Typography variant={'h2'} color={'green'}>
|
|
76
|
+
How to use UI-kit components
|
|
77
|
+
</Typography>
|
|
78
|
+
|
|
79
|
+
<Button variant="primary" fullWidth onClick={() => console.log('clicked')}>
|
|
80
|
+
Click me!
|
|
81
|
+
</Button>
|
|
82
|
+
</div>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
<hr>
|
|
88
|
+
|
|
89
|
+
🌐 **Global Style import for _Next.js_ (App Router)**
|
|
90
|
+
|
|
91
|
+
🎨 _Add the styles to your root layout file:_
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
// my-next-app/app/layout.tsx
|
|
95
|
+
|
|
96
|
+
import '@candy.thieves/ui-kit-lumos/dist/index.css'
|
|
97
|
+
import type { Metadata } from 'next'
|
|
98
|
+
|
|
99
|
+
export const metadata: Metadata = {
|
|
100
|
+
title: 'My Next.js App',
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
104
|
+
return (
|
|
105
|
+
<html lang="en">
|
|
106
|
+
<body>{children}</body>
|
|
107
|
+
</html>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
💻 **Using Components**
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
// my-next-app/components/MyComponent.tsx
|
|
116
|
+
|
|
117
|
+
'use client'
|
|
118
|
+
|
|
119
|
+
import { Button, Typography } from '@candy.thieves/ui-kit-lumos'
|
|
120
|
+
|
|
121
|
+
export const MyComponent = () => {
|
|
122
|
+
return (
|
|
123
|
+
<div>
|
|
124
|
+
<Typography variant={'h2'} color={'green'}>
|
|
125
|
+
How to use UI-kit components
|
|
126
|
+
</Typography>
|
|
127
|
+
|
|
128
|
+
<Button variant="primary" fullWidth onClick={() => console.log('clicked')}>
|
|
129
|
+
Click me!
|
|
130
|
+
</Button>
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 🚀 Getting started locally with the UI-kit library
|
|
34
137
|
|
|
35
138
|
Follow these steps to run the application locally:
|
|
36
139
|
|
|
@@ -58,7 +161,7 @@ Follow these steps to run the application locally:
|
|
|
58
161
|
pnpm install
|
|
59
162
|
```
|
|
60
163
|
|
|
61
|
-
|
|
164
|
+
_If you have problems with running the script, use the following command in the CLI:_
|
|
62
165
|
|
|
63
166
|
```bash
|
|
64
167
|
pnpm install --legacy-peer-deps
|
|
@@ -76,66 +179,68 @@ Follow these steps to run the application locally:
|
|
|
76
179
|
|
|
77
180
|
## ⚙️Available Scripts
|
|
78
181
|
|
|
79
|
-
|
|
182
|
+
- **`dev`:** 💻 Starts a local Vite development server for quick debugging of the application.
|
|
80
183
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
* **`build`:** 📦 Checks the TypeScript, then it builds an optimised production build of the project.
|
|
184
|
+
```bash
|
|
185
|
+
pnpm run dev
|
|
186
|
+
```
|
|
85
187
|
|
|
86
|
-
|
|
87
|
-
pnpm run build
|
|
88
|
-
```
|
|
89
|
-
* **`type:check`:** 🔷 Checks TypeScript types without generating files; for validation purposes only.
|
|
188
|
+
- **`build`:** 📦 Checks the TypeScript, then it builds an optimised production build of the project.
|
|
90
189
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
190
|
+
```bash
|
|
191
|
+
pnpm run build
|
|
192
|
+
```
|
|
94
193
|
|
|
95
|
-
|
|
194
|
+
- **`type:check`:** 🔷 Checks TypeScript types without generating files; for validation purposes only.
|
|
96
195
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
196
|
+
```bash
|
|
197
|
+
pnpm run type:check
|
|
198
|
+
```
|
|
100
199
|
|
|
101
|
-
|
|
200
|
+
- **`stylelint:check`:** 🎨 Checks SCSS files for stylelint errors.
|
|
102
201
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
202
|
+
```bash
|
|
203
|
+
pnpm run stylelint:check
|
|
204
|
+
```
|
|
106
205
|
|
|
107
|
-
|
|
206
|
+
- **`stylelint:fix`:** 🔧 Automatically fixes SCSS stylelint errors.
|
|
108
207
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
208
|
+
```bash
|
|
209
|
+
pnpm run stylelint:fix
|
|
210
|
+
```
|
|
112
211
|
|
|
113
|
-
|
|
212
|
+
- **`format`:** ✅ Checks and automatically formats code with Prettier.
|
|
114
213
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
214
|
+
```bash
|
|
215
|
+
pnpm run format
|
|
216
|
+
```
|
|
118
217
|
|
|
119
|
-
|
|
218
|
+
- **`lint`:** 🔍 Runs ESLint to check for code quality issues and automatically fixes ESLint errors.
|
|
120
219
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
220
|
+
```bash
|
|
221
|
+
pnpm run lint
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- **`preview`:** 👀 Starts a local server to preview the production build.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
pnpm run preview
|
|
228
|
+
```
|
|
124
229
|
|
|
125
|
-
|
|
230
|
+
- **`storybook`:** ✨ Starts a local server to preview the production build.
|
|
126
231
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
232
|
+
```bash
|
|
233
|
+
pnpm run storybook
|
|
234
|
+
```
|
|
130
235
|
|
|
131
|
-
|
|
236
|
+
- **`build-storybook`:** 🌐 Starts a local server to preview the production build.
|
|
132
237
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
238
|
+
```bash
|
|
239
|
+
pnpm run build-storybook
|
|
240
|
+
```
|
|
136
241
|
|
|
137
|
-
|
|
242
|
+
- **`prepare`:** ⚙️A lifecycle script that Husky uses to set up Git hooks. This is automatically run after `npm install`.
|
|
138
243
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
244
|
+
```bash
|
|
245
|
+
pnpm run build-storybook
|
|
246
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="108" height="108" fill="none"><rect width="108" height="108" fill="#fff" rx="15"/><circle cx="54" cy="54" r="25" fill="#4c8dff" stroke="#333" stroke-width="10"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="none"><rect width="72" height="72" fill="#fff" rx="15"/><circle cx="36" cy="36" r="16" fill="#4c8dff" stroke="#333" stroke-width="8"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><rect width="16" height="16" fill="#333" rx="3"/><circle cx="8" cy="8" r="3" fill="#4c8dff" stroke="#fff" stroke-width="2"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none"><rect width="48" height="48" fill="#333" rx="10"/><circle cx="24" cy="24" r="9.5" fill="#4c8dff" stroke="#fff" stroke-width="5"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="none"><rect width="72" height="72" fill="#333" rx="15"/><circle cx="36" cy="36" r="16" fill="#4c8dff" stroke="#fff" stroke-width="8"/></svg>
|