@lazar-ui/kit 0.1.0 → 0.2.2

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 (85) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/LICENSE +21 -0
  3. package/README.md +64 -23
  4. package/dist/Icon-flib0kme.mjs +684 -0
  5. package/dist/Icon.css +1 -0
  6. package/dist/{Overlay-RmiBtqDR.mjs → Overlay-OYo7gW8m.mjs} +165 -156
  7. package/dist/accordion.css +1 -1
  8. package/dist/accordion.d.ts +59 -9
  9. package/dist/accordion.js +59 -41
  10. package/dist/alert.css +1 -1
  11. package/dist/alert.js +12 -12
  12. package/dist/avatar.css +1 -1
  13. package/dist/avatar.d.ts +2 -2
  14. package/dist/avatar.js +18 -18
  15. package/dist/badge.css +1 -1
  16. package/dist/badge.d.ts +3 -3
  17. package/dist/badge.js +8 -8
  18. package/dist/breadcrumbs.css +1 -1
  19. package/dist/breadcrumbs.js +35 -35
  20. package/dist/button.css +1 -1
  21. package/dist/button.d.ts +2 -0
  22. package/dist/button.js +41 -35
  23. package/dist/card.css +1 -1
  24. package/dist/card.js +15 -15
  25. package/dist/checkbox.css +1 -1
  26. package/dist/checkbox.js +25 -25
  27. package/dist/css/palettes/indigo.css +75 -75
  28. package/dist/css/palettes/monochrome.css +75 -75
  29. package/dist/css/semantic.css +67 -67
  30. package/dist/dialog.css +1 -1
  31. package/dist/dialog.js +61 -60
  32. package/dist/drawer.css +1 -1
  33. package/dist/drawer.d.ts +11 -0
  34. package/dist/drawer.js +102 -81
  35. package/dist/empty-state.css +1 -1
  36. package/dist/empty-state.d.ts +1 -1
  37. package/dist/empty-state.js +27 -26
  38. package/dist/error-boundary.css +1 -1
  39. package/dist/error-boundary.js +9 -9
  40. package/dist/flex.js +6 -6
  41. package/dist/form-field.css +1 -1
  42. package/dist/form-field.js +10 -10
  43. package/dist/icon.d.ts +30 -0
  44. package/dist/icon.js +4 -0
  45. package/dist/input.css +1 -1
  46. package/dist/input.js +77 -103
  47. package/dist/{config-provider.d.ts → lazar-ui-provider.d.ts} +33 -33
  48. package/dist/lazar-ui-provider.js +14 -0
  49. package/dist/menu.css +1 -1
  50. package/dist/menu.d.ts +3 -3
  51. package/dist/menu.js +73 -91
  52. package/dist/pagination.css +1 -1
  53. package/dist/pagination.js +49 -48
  54. package/dist/popover.css +1 -1
  55. package/dist/popover.d.ts +1 -1
  56. package/dist/popover.js +26 -25
  57. package/dist/select.css +1 -1
  58. package/dist/select.js +81 -119
  59. package/dist/separator.css +1 -1
  60. package/dist/separator.d.ts +2 -2
  61. package/dist/separator.js +9 -9
  62. package/dist/skeleton.css +1 -1
  63. package/dist/skeleton.js +13 -13
  64. package/dist/spinner.css +1 -1
  65. package/dist/spinner.d.ts +2 -2
  66. package/dist/spinner.js +7 -7
  67. package/dist/switch.css +1 -1
  68. package/dist/switch.js +15 -15
  69. package/dist/table.css +1 -1
  70. package/dist/table.js +23 -23
  71. package/dist/tabs.css +1 -1
  72. package/dist/tabs.js +48 -48
  73. package/dist/textarea.css +1 -1
  74. package/dist/textarea.js +17 -17
  75. package/dist/tooltip.css +1 -1
  76. package/dist/tooltip.js +34 -33
  77. package/dist/typography.css +1 -0
  78. package/dist/typography.d.ts +76 -0
  79. package/dist/typography.js +40 -0
  80. package/dist/{useLocale-D2Z0JH0l.mjs → useLocale-DdHNhmvT.mjs} +24 -24
  81. package/dist/{useModalOverlay-D5Bs9FCB.mjs → useModalOverlay-B93fkWbb.mjs} +2 -2
  82. package/dist/{useOverlayPosition-DVu1Qziq.mjs → useOverlayPosition-CK3oEqVS.mjs} +1 -1
  83. package/dist/{useOverlayTriggerState-BIo1Jcba.mjs → useOverlayTriggerState-DK8Xy6Kr.mjs} +1 -1
  84. package/package.json +17 -4
  85. package/dist/config-provider.js +0 -14
package/CHANGELOG.md ADDED
@@ -0,0 +1,83 @@
1
+ # Changelog
2
+
3
+ ## [0.2.2] - 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
+ ## [0.2.1] - 2026-06-01
11
+
12
+ ### Documentation
13
+
14
+ - **package.json**: add homepage, repository, and bugs fields for npm display
15
+
16
+ ## [0.2.0] - 2026-05-27
17
+
18
+ ### Features
19
+
20
+ - **ConfigProvider**: add ConfigProvider and palettes ([4a1d0d0](https://github.com/anomalyco/lazar-ui/commit/4a1d0d0))
21
+ - **Badge**: add Badge component ([ce0ffc7](https://github.com/anomalyco/lazar-ui/commit/ce0ffc7))
22
+ - **Popover**: add Popover component ([68a2c06](https://github.com/anomalyco/lazar-ui/commit/68a2c06))
23
+ - **Popover.Content**: add padding prop ([712142b](https://github.com/anomalyco/lazar-ui/commit/712142b))
24
+ - **Tooltip**: add Tooltip component ([d937823](https://github.com/anomalyco/lazar-ui/commit/d937823))
25
+ - **Input**: add Input components ([6bf346a](https://github.com/anomalyco/lazar-ui/commit/6bf346a))
26
+ - **Avatar**: add Avatar component ([76c523f](https://github.com/anomalyco/lazar-ui/commit/76c523f))
27
+ - **Separator**: add Separator component ([8e395f6](https://github.com/anomalyco/lazar-ui/commit/8e395f6))
28
+ - **Card**: add Card component ([bfe36cf](https://github.com/anomalyco/lazar-ui/commit/bfe36cf))
29
+ - **Skeleton**: add Skeleton component ([d1980e0](https://github.com/anomalyco/lazar-ui/commit/d1980e0))
30
+ - **Alert**: add Alert component ([85217f3](https://github.com/anomalyco/lazar-ui/commit/85217f3))
31
+ - **EmptyState**: add EmptyState component ([0c8a81c](https://github.com/anomalyco/lazar-ui/commit/0c8a81c))
32
+ - **FormField**: add FormField component ([c5e87a2](https://github.com/anomalyco/lazar-ui/commit/c5e87a2))
33
+ - **Spinner**: add Spinner component ([9e5bafc](https://github.com/anomalyco/lazar-ui/commit/9e5bafc))
34
+ - **Checkbox**: add Checkbox component ([1272021](https://github.com/anomalyco/lazar-ui/commit/1272021))
35
+ - **Select**: add Select component ([1378e1a](https://github.com/anomalyco/lazar-ui/commit/1378e1a))
36
+ - **Switch**: add Switch component ([a581b19](https://github.com/anomalyco/lazar-ui/commit/a581b19))
37
+ - **Textarea**: add Textarea component ([2cf5daf](https://github.com/anomalyco/lazar-ui/commit/2cf5daf))
38
+ - **Pagination**: add Pagination component ([61212a4](https://github.com/anomalyco/lazar-ui/commit/61212a4))
39
+ - **Menu**: add Menu component ([6ca3761](https://github.com/anomalyco/lazar-ui/commit/6ca3761))
40
+ - **Flex**: add Flex component ([6ec9525](https://github.com/anomalyco/lazar-ui/commit/6ec9525))
41
+ - **ErrorBoundary**: add ErrorBoundary component ([242e48f](https://github.com/anomalyco/lazar-ui/commit/242e48f))
42
+ - **Breadcrumbs**: add Breadcrumbs component ([b9b1875](https://github.com/anomalyco/lazar-ui/commit/b9b1875))
43
+ - **Drawer**: add Drawer component ([e7f2a90](https://github.com/anomalyco/lazar-ui/commit/e7f2a90))
44
+ - **Drawer**: add Actions slot ([7f3d103](https://github.com/anomalyco/lazar-ui/commit/7f3d103))
45
+ - **Dialog**: add Dialog component ([9e3acf3](https://github.com/anomalyco/lazar-ui/commit/9e3acf3))
46
+ - **Table**: add Table component ([8c1b287](https://github.com/anomalyco/lazar-ui/commit/8c1b287))
47
+ - **vitest-config**: add vitest-config package ([1cfb90a](https://github.com/anomalyco/lazar-ui/commit/1cfb90a))
48
+ - **storybook**: setup Storybook and linters ([ef8c246](https://github.com/anomalyco/lazar-ui/commit/ef8c246))
49
+ - **styles**: fix global styles setup ([692fc7c](https://github.com/anomalyco/lazar-ui/commit/692fc7c))
50
+
51
+ ### Bug Fixes
52
+
53
+ - **Badge**: update heights ([53d104b](https://github.com/anomalyco/lazar-ui/commit/53d104b))
54
+ - **Table**: update Table component ([94c0d8c](https://github.com/anomalyco/lazar-ui/commit/94c0d8c))
55
+ - **storybook**: update stories ([b7e6add](https://github.com/anomalyco/lazar-ui/commit/b7e6add))
56
+ - **css**: update tokens ([c80a00b](https://github.com/anomalyco/lazar-ui/commit/c80a00b))
57
+ - **Dialog**: update styles ([21bf726](https://github.com/anomalyco/lazar-ui/commit/21bf726))
58
+ - **EmptyState**: rename slot Action to Actions ([419eb59](https://github.com/anomalyco/lazar-ui/commit/419eb59))
59
+ - **Popover**: fix first render position ([798c1b6](https://github.com/anomalyco/lazar-ui/commit/798c1b6))
60
+ - **Popover/Tooltip**: fix access to overlays inside overlay (html invert attr problem) ([bee4472](https://github.com/anomalyco/lazar-ui/commit/bee4472))
61
+ - **Popover/Tooltip**: fix incorrect first render position ([93e17af](https://github.com/anomalyco/lazar-ui/commit/93e17af))
62
+
63
+ ### Documentation
64
+
65
+ - **Popover/Tooltip**: correct placements ([ab05441](https://github.com/anomalyco/lazar-ui/commit/ab05441))
66
+ - **kit**: add README.md and set version to 0.1.0 ([d00235d](https://github.com/anomalyco/lazar-ui/commit/d00235d))
67
+
68
+ ### Refactor
69
+
70
+ - rename @repo/ui → @lazar-ui/kit and @repo/builder → @lazar-ui/admin ([ff79f0c](https://github.com/anomalyco/lazar-ui/commit/ff79f0c))
71
+
72
+ ### Styles
73
+
74
+ - fix react import paths ([db8ad4b](https://github.com/anomalyco/lazar-ui/commit/db8ad4b))
75
+
76
+ ### Tests
77
+
78
+ - add test coverage page to storybook ([86d1d4d](https://github.com/anomalyco/lazar-ui/commit/86d1d4d))
79
+
80
+ ### Chores
81
+
82
+ - update package.json ([2dfa0b1](https://github.com/anomalyco/lazar-ui/commit/2dfa0b1))
83
+ - fix lint and typecheck errors for release ([81a6b5b](https://github.com/anomalyco/lazar-ui/commit/81a6b5b))
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
+ [![npm version](https://img.shields.io/npm/v/@lazar-ui/kit)](https://www.npmjs.com/package/@lazar-ui/kit)
4
+ [![npm license](https://img.shields.io/npm/l/@lazar-ui/kit)](https://github.com/lazar-ui/lazar-ui/blob/main/packages/kit/LICENSE)
5
+ [![Storybook](https://img.shields.io/badge/docs-storybook-44403c)](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
- **28+ production-ready components** — from buttons and tables to compound menus
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
- **4 component patterns** to cover different composition needs:
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
- - **Context-based** — ConfigProvider, Breadcrumbs, Tabs
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 `ConfigProvider` and toggle with a single attribute.
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 { ConfigProvider } from '@lazar-ui/kit';
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
- <ConfigProvider theme="light" locale="en">
91
+ <LazarUiProvider theme="light" locale="en">
83
92
  <YourApp />
84
- </ConfigProvider>
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
- | ConfigProvider | Context-based | Theme + locale provider |
151
+ | LazarUiProvider | Context-based | Theme + locale provider |
113
152
  | Dialog | Slot-based | Modal dialog |
114
153
  | Drawer | Slot-based | Side panel |
115
- | EmptyState | Simple | Empty / no-data state |
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
- | Input | Simple | Text input variants |
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 `ConfigProvider` and pass a `theme` prop:
176
+ Wrap your app with `LazarUiProvider` and pass a `theme` prop:
136
177
 
137
178
  ```tsx
138
- <ConfigProvider theme="dark" locale="en">
179
+ <LazarUiProvider theme="dark" locale="en">
139
180
  <YourApp />
140
- </ConfigProvider>
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 `ConfigProvider`. Built-in: `en`, `ru`.
192
+ Pass a locale to `LazarUiProvider`. Built-in: `en`, `ru`.
152
193
 
153
194
  ```tsx
154
- <ConfigProvider locale="ru">
195
+ <LazarUiProvider locale="ru">
155
196
  <YourApp />
156
- </ConfigProvider>
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
- <ConfigProvider locale={{ myCustomSection: { greeting: 'Hello' } }}>
215
+ <LazarUiProvider locale={{ myCustomSection: { greeting: 'Hello' } }}>
175
216
  <YourApp />
176
- </ConfigProvider>
217
+ </LazarUiProvider>
177
218
  ```
178
219
 
179
220
  ## Contacts