@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.
Files changed (74) hide show
  1. package/README.md +164 -59
  2. package/dist/favicon-dark-108.svg +1 -0
  3. package/dist/favicon-dark-16.svg +4 -0
  4. package/dist/favicon-dark-24.svg +4 -0
  5. package/dist/favicon-dark-48.svg +4 -0
  6. package/dist/favicon-dark-72.svg +1 -0
  7. package/dist/favicon-light-108.svg +4 -0
  8. package/dist/favicon-light-16.svg +1 -0
  9. package/dist/favicon-light-24.svg +4 -0
  10. package/dist/favicon-light-48.svg +1 -0
  11. package/dist/favicon-light-72.svg +1 -0
  12. package/dist/index.css +1 -1
  13. package/dist/index.js +2113 -1287
  14. package/dist/index.js.map +1 -1
  15. package/dist/types/assets/icons/ErrorIcon.d.ts +3 -0
  16. package/dist/types/assets/icons/FileIcon.d.ts +3 -0
  17. package/dist/types/assets/icons/Sending.d.ts +3 -0
  18. package/dist/types/assets/index.d.ts +4 -0
  19. package/dist/types/assets/logo/Logo.d.ts +10 -0
  20. package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +6 -0
  21. package/dist/types/components/AudioPlayer/index.d.ts +1 -0
  22. package/dist/types/components/Avatar/Avatar.d.ts +17 -0
  23. package/dist/types/components/Avatar/AvatarBlock.d.ts +15 -0
  24. package/dist/types/components/Avatar/MainAvatar.d.ts +20 -0
  25. package/dist/types/components/Avatar/index.d.ts +3 -0
  26. package/dist/types/components/Button/Button.d.ts +19 -0
  27. package/dist/types/components/Button/ButtonLegacy.d.ts +41 -0
  28. package/dist/types/components/Button/index.d.ts +2 -0
  29. package/dist/types/components/Cards/Cards.d.ts +7 -0
  30. package/dist/types/components/Cards/index.d.ts +1 -0
  31. package/dist/types/components/Checkbox/FormCheckbox.d.ts +1 -2
  32. package/dist/types/components/CircularProgress/CircularProgress.d.ts +10 -0
  33. package/dist/types/components/CircularProgress/index.d.ts +1 -0
  34. package/dist/types/components/Input/FormInput.d.ts +1 -2
  35. package/dist/types/components/LinearProgress/LinearProgress.d.ts +14 -0
  36. package/dist/types/components/LinearProgress/index.d.ts +1 -0
  37. package/dist/types/components/Message/AttachmentItem.d.ts +2 -0
  38. package/dist/types/components/Message/Message.d.ts +2 -0
  39. package/dist/types/components/Message/MessageStatus.d.ts +2 -0
  40. package/dist/types/components/Message/ReplyPreview.d.ts +2 -0
  41. package/dist/types/components/Message/index.d.ts +2 -0
  42. package/dist/types/components/Message/types.d.ts +40 -0
  43. package/dist/types/components/PasswordInput/FormPasswordInput.d.ts +2 -3
  44. package/dist/types/components/PasswordInput/PasswordInput.d.ts +2 -1
  45. package/dist/types/components/ReadMore/ReadMore.d.ts +8 -0
  46. package/dist/types/components/ReadMore/index.d.ts +1 -0
  47. package/dist/types/components/SearchInput/SearchInput.d.ts +1 -1
  48. package/dist/types/components/Select/Select.d.ts +66 -0
  49. package/dist/types/components/Select/index.d.ts +1 -0
  50. package/dist/types/components/Table/Table.d.ts +6 -0
  51. package/dist/types/components/Table/index.d.ts +1 -0
  52. package/dist/types/components/Tabs/Tabs.d.ts +18 -0
  53. package/dist/types/components/Tabs/index.d.ts +1 -0
  54. package/dist/types/components/Tooltip/Tooltip.d.ts +12 -0
  55. package/dist/types/components/Tooltip/index.d.ts +1 -0
  56. package/dist/types/components/Typography/Typography.d.ts +4 -5
  57. package/dist/types/components/index.d.ts +18 -7
  58. package/dist/types/constants/constants.d.ts +3 -0
  59. package/dist/types/constants/index.d.ts +1 -0
  60. package/dist/types/demo/index.d.ts +1 -0
  61. package/dist/types/index.d.ts +1 -0
  62. package/dist/types/types/index.d.ts +1 -0
  63. package/dist/types/types/types.d.ts +4 -0
  64. package/dist/types/utils/formatTime.d.ts +1 -0
  65. package/dist/types/utils/getFirstLetterCapitalized.d.ts +1 -0
  66. package/dist/types/utils/index.d.ts +5 -0
  67. package/dist/types/utils/isAudioAttachment.d.ts +2 -0
  68. package/dist/types/utils/isThemeColor.d.ts +2 -0
  69. package/dist/types/utils/truncateText.d.ts +1 -0
  70. package/package.json +5 -1
  71. package/dist/favicon.svg +0 -1
  72. package/dist/icons.svg +0 -24
  73. package/dist/types/components/TestMixins/index.d.ts +0 -1
  74. /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 *React* and *TypeScript*, using *Storybook* for component documentation and visual testing. Build is optimized with *Vite*.
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** - *Yana Korotenko*
12
+ **PM** - _Yana Korotenko_
14
13
 
15
- **Team-lead** - *Vladislav Kravchenko*
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
- ## 🌐 Deploy
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
- * [Deploy link](https://vercel.com/)
26
+ - [UI-kit Storybook deploy link](https://lumos-ui-kit-storybook.vercel.app/)
27
27
 
28
28
  ## 🔗 Related Projects
29
- [Lumos app](https://github.com/candysthieves/lumos-ui-kit) — main application using the UI Kit
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
- ## 🚀Getting Started locally
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
- *If you have problems with running the script, use the following command in the CLI:*
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
- * **`dev`:** 💻 Starts a local Vite development server for quick debugging of the application.
182
+ - **`dev`:** 💻 Starts a local Vite development server for quick debugging of the application.
80
183
 
81
- ```bash
82
- pnpm run dev
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
- ```bash
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
- ```bash
92
- pnpm run type:check
93
- ```
190
+ ```bash
191
+ pnpm run build
192
+ ```
94
193
 
95
- * **`stylelint:check`:** 🎨 Checks SCSS files for stylelint errors.
194
+ - **`type:check`:** 🔷 Checks TypeScript types without generating files; for validation purposes only.
96
195
 
97
- ```bash
98
- pnpm run stylelint:check
99
- ```
196
+ ```bash
197
+ pnpm run type:check
198
+ ```
100
199
 
101
- * **`stylelint:fix`:** 🔧 Automatically fixes SCSS stylelint errors.
200
+ - **`stylelint:check`:** 🎨 Checks SCSS files for stylelint errors.
102
201
 
103
- ```bash
104
- pnpm run stylelint:fix
105
- ```
202
+ ```bash
203
+ pnpm run stylelint:check
204
+ ```
106
205
 
107
- * **`format`:** ✅ Checks and automatically formats code with Prettier.
206
+ - **`stylelint:fix`:** 🔧 Automatically fixes SCSS stylelint errors.
108
207
 
109
- ```bash
110
- pnpm run format
111
- ```
208
+ ```bash
209
+ pnpm run stylelint:fix
210
+ ```
112
211
 
113
- * **`lint`:** 🔍 Runs ESLint to check for code quality issues and automatically fixes ESLint errors.
212
+ - **`format`:** ✅ Checks and automatically formats code with Prettier.
114
213
 
115
- ```bash
116
- pnpm run lint
117
- ```
214
+ ```bash
215
+ pnpm run format
216
+ ```
118
217
 
119
- * **`preview`:** 👀 Starts a local server to preview the production build.
218
+ - **`lint`:** 🔍 Runs ESLint to check for code quality issues and automatically fixes ESLint errors.
120
219
 
121
- ```bash
122
- pnpm run preview
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
- * **`storybook`:** ✨ Starts a local server to preview the production build.
230
+ - **`storybook`:** ✨ Starts a local server to preview the production build.
126
231
 
127
- ```bash
128
- pnpm run storybook
129
- ```
232
+ ```bash
233
+ pnpm run storybook
234
+ ```
130
235
 
131
- * **`build-storybook`:** 🌐 Starts a local server to preview the production build.
236
+ - **`build-storybook`:** 🌐 Starts a local server to preview the production build.
132
237
 
133
- ```bash
134
- pnpm run build-storybook
135
- ```
238
+ ```bash
239
+ pnpm run build-storybook
240
+ ```
136
241
 
137
- * **`prepare`:** ⚙️A lifecycle script that Husky uses to set up Git hooks. This is automatically run after `npm install`.
242
+ - **`prepare`:** ⚙️A lifecycle script that Husky uses to set up Git hooks. This is automatically run after `npm install`.
138
243
 
139
- ```bash
140
- pnpm run build-storybook
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,4 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="16" height="16" rx="3" fill="white"/>
3
+ <circle cx="8" cy="8" r="3" fill="#4C8DFF" stroke="#333333" stroke-width="2"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="24" height="24" rx="5" fill="white"/>
3
+ <circle cx="12" cy="12" r="4.5" fill="#4C8DFF" stroke="#333333" stroke-width="3"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="48" height="48" rx="10" fill="white"/>
3
+ <circle cx="24" cy="24" r="9.5" fill="#4C8DFF" stroke="#333333" stroke-width="5"/>
4
+ </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,4 @@
1
+ <svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="108" height="108" rx="15" fill="#333333"/>
3
+ <circle cx="54" cy="54" r="25" fill="#4C8DFF" stroke="white" stroke-width="10"/>
4
+ </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,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="24" height="24" rx="5" fill="#333333"/>
3
+ <circle cx="12" cy="12" r="4.5" fill="#4C8DFF" stroke="white" stroke-width="3"/>
4
+ </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>