@lazar-ui/kit 0.2.0 → 0.2.3
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/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +64 -23
- package/dist/Icon-flib0kme.mjs +684 -0
- package/dist/Icon.css +1 -0
- package/dist/accordion.css +1 -1
- package/dist/accordion.d.ts +59 -9
- package/dist/accordion.js +59 -41
- package/dist/alert.css +1 -1
- package/dist/alert.js +12 -12
- package/dist/avatar.css +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.js +18 -18
- package/dist/badge.css +1 -1
- package/dist/badge.d.ts +3 -3
- package/dist/badge.js +8 -8
- package/dist/breadcrumbs.css +1 -1
- package/dist/breadcrumbs.js +35 -35
- package/dist/button.css +1 -1
- package/dist/button.d.ts +2 -0
- package/dist/button.js +41 -35
- package/dist/card.css +1 -1
- package/dist/card.js +15 -15
- package/dist/checkbox.css +1 -1
- package/dist/checkbox.js +25 -25
- package/dist/css/palettes/indigo.css +75 -75
- package/dist/css/palettes/monochrome.css +75 -75
- package/dist/css/semantic.css +67 -67
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +49 -48
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +65 -64
- package/dist/empty-state.css +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +27 -26
- package/dist/error-boundary.css +1 -1
- package/dist/error-boundary.js +9 -9
- package/dist/flex.js +6 -6
- package/dist/form-field.css +1 -1
- package/dist/form-field.js +10 -10
- package/dist/icon.d.ts +30 -0
- package/dist/icon.js +4 -0
- package/dist/input.css +1 -1
- package/dist/input.js +76 -103
- package/dist/{config-provider.d.ts → lazar-ui-provider.d.ts} +33 -33
- package/dist/lazar-ui-provider.js +14 -0
- package/dist/menu.css +1 -1
- package/dist/menu.d.ts +3 -3
- package/dist/menu.js +73 -91
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +49 -48
- package/dist/popover.css +1 -1
- package/dist/popover.js +18 -18
- package/dist/select.css +1 -1
- package/dist/select.js +81 -119
- package/dist/separator.css +1 -1
- package/dist/separator.d.ts +2 -2
- package/dist/separator.js +9 -9
- package/dist/skeleton.css +1 -1
- package/dist/skeleton.js +13 -13
- package/dist/spinner.css +1 -1
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js +7 -7
- package/dist/switch.css +1 -1
- package/dist/switch.js +15 -15
- package/dist/table.css +1 -1
- package/dist/table.js +23 -23
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +48 -48
- package/dist/textarea.css +1 -1
- package/dist/textarea.js +17 -17
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +10 -10
- package/dist/typography.css +1 -0
- package/dist/typography.d.ts +76 -0
- package/dist/typography.js +40 -0
- package/dist/{useLocale-D2Z0JH0l.mjs → useLocale-DdHNhmvT.mjs} +24 -24
- package/package.json +16 -3
- package/dist/config-provider.js +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.3] - 2026-06-01
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **Button**: fix icon alignment inside button (flex layout)
|
|
8
|
+
- **Input**: fix input base background color
|
|
9
|
+
|
|
10
|
+
### Documentation
|
|
11
|
+
|
|
12
|
+
- **README**: fix license badge link to point to npmjs
|
|
13
|
+
|
|
14
|
+
### Chores
|
|
15
|
+
|
|
16
|
+
- **package.json**: fix repository URL, add LICENSE to files
|
|
17
|
+
- **CI**: switch from NPM_TOKEN to Trusted Publisher (OIDC)
|
|
18
|
+
|
|
19
|
+
## [0.2.2] - 2026-06-01
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- **Button**: fix icon alignment inside button (flex layout)
|
|
24
|
+
- **Input**: fix input base background color
|
|
25
|
+
|
|
26
|
+
## [0.2.1] - 2026-06-01
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
|
|
30
|
+
- **package.json**: add homepage, repository, and bugs fields for npm display
|
|
31
|
+
|
|
3
32
|
## [0.2.0] - 2026-05-27
|
|
4
33
|
|
|
5
34
|
### Features
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Vasiliy Lazarev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
# @lazar-ui/kit
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@lazar-ui/kit)
|
|
4
|
+
[](https://www.npmjs.com/package/@lazar-ui/kit)
|
|
5
|
+
[](https://lazar-ui.github.io/docs)
|
|
6
|
+
|
|
3
7
|
A component library for building admin panels, dashboards, and internal tools.
|
|
4
8
|
Focuses on practical UI patterns commonly needed in B2B applications:
|
|
5
9
|
data-heavy layouts, modals, menus, forms, and navigation.
|
|
6
10
|
|
|
7
11
|
## Features
|
|
8
12
|
|
|
9
|
-
**
|
|
13
|
+
**30 production-ready components** — from buttons and tables to compound menus
|
|
10
14
|
and slot-based dialogs. Every component is designed for the admin panel context:
|
|
11
15
|
Actionable tables, pagination, filterable selects, and more.
|
|
12
16
|
|
|
13
|
-
**
|
|
17
|
+
**5 component patterns** to cover different composition needs:
|
|
14
18
|
|
|
15
|
-
- **Simple** — Button, Badge, Card, Table, Pagination, etc.
|
|
19
|
+
- **Simple** — Button, Badge, Card, Table, Pagination, Typography, etc.
|
|
16
20
|
- **Compound** — Accordion, Menu, Popover, Tabs
|
|
17
|
-
- **Slot-based** — Dialog, Drawer (Title / Content / Actions)
|
|
18
|
-
- **
|
|
21
|
+
- **Slot-based** — Dialog, Drawer, EmptyState (Title / Content / Actions)
|
|
22
|
+
- **Input-variations** — Input (Email, Password, Phone, Number via Object.assign)
|
|
23
|
+
- **Context-based** — LazarUiProvider, Breadcrumbs, Tabs
|
|
19
24
|
|
|
20
25
|
**Tree-shakeable by default.** Each component is a separate subpath export.
|
|
21
26
|
Import exactly what you need, nothing more:
|
|
@@ -30,10 +35,10 @@ Only `@lazar-ui/kit/button` ends up in your bundle — not the entire library.
|
|
|
30
35
|
No global CSS, no style conflicts, no unused rules.
|
|
31
36
|
|
|
32
37
|
**Light and dark themes** via `data-theme` and CSS custom properties.
|
|
33
|
-
Wrap your app in `
|
|
38
|
+
Wrap your app in `LazarUiProvider` and toggle with a single attribute.
|
|
34
39
|
|
|
35
40
|
**Custom color palettes.** Two palettes included (monochrome, indigo).
|
|
36
|
-
Replace them with your own: copy a palette file, override the `--palette-*`
|
|
41
|
+
Replace them with your own: copy a palette file, override the `--lui-palette-*`
|
|
37
42
|
variables, and import it instead.
|
|
38
43
|
|
|
39
44
|
**Localization ready.** Interface ships with `en` and `ru` locales.
|
|
@@ -53,6 +58,10 @@ Import styles with full type safety — class name typos are caught at build tim
|
|
|
53
58
|
**Vite-powered build.** ES output with automatic declaration generation (`dts`)
|
|
54
59
|
and CSS injection. No bundler lock-in — works with any Vite/Next/Rspack setup.
|
|
55
60
|
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
📖 [**Storybook docs**](https://lazar-ui.github.io/docs) — browse all components live
|
|
64
|
+
|
|
56
65
|
## Installation
|
|
57
66
|
|
|
58
67
|
```bash
|
|
@@ -73,15 +82,15 @@ npm install @lazar-ui/kit
|
|
|
73
82
|
## Quick start
|
|
74
83
|
|
|
75
84
|
```tsx
|
|
76
|
-
import {
|
|
85
|
+
import { LazarUiProvider } from '@lazar-ui/kit/lazar-ui-provider';
|
|
77
86
|
import '@lazar-ui/kit/css/palettes/monochrome.css';
|
|
78
87
|
import '@lazar-ui/kit/css/semantic.css';
|
|
79
88
|
|
|
80
89
|
function App() {
|
|
81
90
|
return (
|
|
82
|
-
<
|
|
91
|
+
<LazarUiProvider theme="light" locale="en">
|
|
83
92
|
<YourApp />
|
|
84
|
-
</
|
|
93
|
+
</LazarUiProvider>
|
|
85
94
|
);
|
|
86
95
|
}
|
|
87
96
|
```
|
|
@@ -97,6 +106,36 @@ function UsersPage() {
|
|
|
97
106
|
}
|
|
98
107
|
```
|
|
99
108
|
|
|
109
|
+
## Fonts
|
|
110
|
+
|
|
111
|
+
The kit uses **Inter** by default via `--lui-font-family-body`. The font is **not bundled** — you choose how to load it.
|
|
112
|
+
|
|
113
|
+
**Option A: Google Fonts CDN** (add to `<head>`)
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
117
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
118
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400..700&display=swap" rel="stylesheet" />
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Option B: npm** (`@fontsource/inter`)
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm install @fontsource/inter
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
import '@fontsource/inter';
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Custom font** — override the token:
|
|
132
|
+
|
|
133
|
+
```css
|
|
134
|
+
:root {
|
|
135
|
+
--lui-font-family-body: "Roboto", system-ui, sans-serif;
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
100
139
|
## Component list
|
|
101
140
|
|
|
102
141
|
| Component | Pattern | Description |
|
|
@@ -109,14 +148,15 @@ function UsersPage() {
|
|
|
109
148
|
| Button | Simple | Action trigger |
|
|
110
149
|
| Card | Simple | Content container |
|
|
111
150
|
| Checkbox | Simple | Binary input |
|
|
112
|
-
|
|
|
151
|
+
| LazarUiProvider | Context-based | Theme + locale provider |
|
|
113
152
|
| Dialog | Slot-based | Modal dialog |
|
|
114
153
|
| Drawer | Slot-based | Side panel |
|
|
115
|
-
| EmptyState |
|
|
154
|
+
| EmptyState | Slot-based | Empty / no-data state |
|
|
116
155
|
| ErrorBoundary | Simple | React error boundary |
|
|
117
156
|
| Flex | Simple | Flexbox layout helper |
|
|
118
157
|
| FormField | Simple | Field wrapper (label + error) |
|
|
119
|
-
|
|
|
158
|
+
| Icon | Simple | Lucide icon wrapper |
|
|
159
|
+
| Input | Input-variations | Text input variants (Email, Password, Phone, Number) |
|
|
120
160
|
| Menu | Compound | Dropdown menu |
|
|
121
161
|
| Pagination | Simple | Page navigation |
|
|
122
162
|
| Popover | Compound | Floating panel |
|
|
@@ -129,37 +169,38 @@ function UsersPage() {
|
|
|
129
169
|
| Tabs | Compound | Tabbed navigation |
|
|
130
170
|
| Textarea | Simple | Multi-line input |
|
|
131
171
|
| Tooltip | Simple | Hover hint |
|
|
172
|
+
| Typography | Simple | Typography variant compositor |
|
|
132
173
|
|
|
133
174
|
## Theming
|
|
134
175
|
|
|
135
|
-
Wrap your app with `
|
|
176
|
+
Wrap your app with `LazarUiProvider` and pass a `theme` prop:
|
|
136
177
|
|
|
137
178
|
```tsx
|
|
138
|
-
<
|
|
179
|
+
<LazarUiProvider theme="dark" locale="en">
|
|
139
180
|
<YourApp />
|
|
140
|
-
</
|
|
181
|
+
</LazarUiProvider>
|
|
141
182
|
```
|
|
142
183
|
|
|
143
184
|
Available themes: `light`, `dark`.
|
|
144
185
|
|
|
145
186
|
To create a custom palette, copy one of the bundled palettes
|
|
146
187
|
from `node_modules/@lazar-ui/kit/css/palettes/`, adjust the
|
|
147
|
-
`--palette-*` variables, and import your file before `semantic.css`.
|
|
188
|
+
`--lui-palette-*` variables, and import your file before `semantic.css`.
|
|
148
189
|
|
|
149
190
|
## Localization
|
|
150
191
|
|
|
151
|
-
Pass a locale to `
|
|
192
|
+
Pass a locale to `LazarUiProvider`. Built-in: `en`, `ru`.
|
|
152
193
|
|
|
153
194
|
```tsx
|
|
154
|
-
<
|
|
195
|
+
<LazarUiProvider locale="ru">
|
|
155
196
|
<YourApp />
|
|
156
|
-
</
|
|
197
|
+
</LazarUiProvider>
|
|
157
198
|
```
|
|
158
199
|
|
|
159
200
|
Add a new language by augmenting `ILocaleMessages`:
|
|
160
201
|
|
|
161
202
|
```tsx
|
|
162
|
-
declare module '@lazar-ui/kit' {
|
|
203
|
+
declare module '@lazar-ui/kit/lazar-ui-provider' {
|
|
163
204
|
interface ILocaleMessages {
|
|
164
205
|
myCustomSection: {
|
|
165
206
|
greeting: string;
|
|
@@ -171,9 +212,9 @@ declare module '@lazar-ui/kit' {
|
|
|
171
212
|
Then pass your locale object:
|
|
172
213
|
|
|
173
214
|
```tsx
|
|
174
|
-
<
|
|
215
|
+
<LazarUiProvider locale={{ myCustomSection: { greeting: 'Hello' } }}>
|
|
175
216
|
<YourApp />
|
|
176
|
-
</
|
|
217
|
+
</LazarUiProvider>
|
|
177
218
|
```
|
|
178
219
|
|
|
179
220
|
## Contacts
|