@tanishraj/ui-kit 2.1.0 → 2.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanishraj/ui-kit",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A production-ready React component library with modern tooling, Storybook docs, and TypeScript support.",
5
5
  "author": "Tanishraj",
6
6
  "license": "MIT",
package/readme.md CHANGED
@@ -5,13 +5,14 @@
5
5
  [![license](https://img.shields.io/github/license/tanishraj/ui-kit.svg)](https://github.com/tanishraj/ui-kit/blob/develop/LICENSE)
6
6
  [![storybook](https://img.shields.io/badge/storybook-live-purple)](https://tanishraj.github.io/ui-kit/)
7
7
 
8
- A production-ready React + TypeScript UI component library built with Vite, Storybook, Tailwind CSS, CVA, and strict quality gates.
8
+ A production-ready React + TypeScript UI component library built with Vite, Storybook, Tailwind CSS, CVA, Floating UI, and strict quality gates.
9
9
 
10
10
  ## Table of Contents
11
11
 
12
12
  - [About](#about)
13
13
  - [Installation](#installation)
14
14
  - [Usage](#usage)
15
+ - [Setup for app consumers](#setup-for-app-consumers)
15
16
  - [Component Library API](#component-library-api)
16
17
  - [Theming](#theming)
17
18
  - [Accessibility](#accessibility)
@@ -21,6 +22,7 @@ A production-ready React + TypeScript UI component library built with Vite, Stor
21
22
  - [Publishing](#publishing)
22
23
  - [Release Process](#release-process)
23
24
  - [Repository Structure](#repository-structure)
25
+ - [Components](#components)
24
26
  - [Contributing](#contributing)
25
27
  - [License](#license)
26
28
  - [Changelog](#changelog)
@@ -57,20 +59,26 @@ pnpm add @tanishraj/ui-kit
57
59
 
58
60
  ```tsx
59
61
  import {
62
+ Accordion,
63
+ Alert,
60
64
  AnimatePresence,
61
65
  AnimatePresenceChild,
62
- Button,
63
66
  Badge,
64
67
  Avatar,
65
68
  AvatarGroup,
66
69
  Breadcrumb,
70
+ Button,
71
+ ButtonGroup,
67
72
  Checkbox,
68
73
  CheckboxGroup,
69
74
  Chip,
70
75
  Divider,
76
+ Dropdown,
71
77
  Drawer,
72
- Portal,
73
78
  Link,
79
+ OrganizationChart,
80
+ Popover,
81
+ Portal,
74
82
  } from '@tanishraj/ui-kit';
75
83
 
76
84
  export function Demo() {
@@ -100,8 +108,10 @@ import {
100
108
  Button,
101
109
  Chip,
102
110
  Divider,
103
- Link,
111
+ Dropdown,
104
112
  Drawer,
113
+ Link,
114
+ Popover,
105
115
  } from '@tanishraj/ui-kit';
106
116
  import { Plus } from 'lucide-react';
107
117
  import { useState } from 'react';
@@ -118,7 +128,14 @@ export default function Demo() {
118
128
  <Chip icon={Plus} variant='success'>
119
129
  Active
120
130
  </Chip>
131
+ <Dropdown variant='primary'>Dropdown</Dropdown>
121
132
  <Button onClick={() => setDrawerOpen(true)}>Open Drawer</Button>
133
+ <Popover
134
+ title='Title'
135
+ trigger={<Button appearance='filled'>Open Popover</Button>}
136
+ >
137
+ Slot Area
138
+ </Popover>
122
139
  <Drawer
123
140
  footer={<Button onClick={() => setDrawerOpen(false)}>Close</Button>}
124
141
  onClose={() => setDrawerOpen(false)}
@@ -146,6 +163,12 @@ export default function Demo() {
146
163
  ### Theme file options
147
164
 
148
165
  ```ts
166
+ // Optional: import globals explicitly when your bundler does not auto-include package CSS
167
+ import '@tanishraj/ui-kit/globals.css';
168
+
169
+ // Optional: import base color tokens directly
170
+ import '@tanishraj/ui-kit/base.css';
171
+
149
172
  // Optional: import this only when you want secondary theme
150
173
  import '@tanishraj/ui-kit/theme-secondary.css';
151
174
  ```
@@ -163,6 +186,7 @@ To add a new packaged theme later:
163
186
  You can also import through:
164
187
 
165
188
  ```ts
189
+ import '@tanishraj/ui-kit/themes/primary.css';
166
190
  import '@tanishraj/ui-kit/themes/secondary.css';
167
191
  ```
168
192
 
@@ -191,8 +215,10 @@ import {
191
215
  CheckboxGroup,
192
216
  Chip,
193
217
  Divider,
218
+ Dropdown,
194
219
  Drawer,
195
220
  Link,
221
+ Popover,
196
222
  } from '@tanishraj/ui-kit';
197
223
  import { Home, Plus, Tag } from 'lucide-react';
198
224
 
@@ -239,6 +265,19 @@ export function ComponentExamples() {
239
265
  </Button>
240
266
  </Divider>
241
267
 
268
+ <Dropdown appearance='outline' variant='primary'>
269
+ Dropdown
270
+ </Dropdown>
271
+
272
+ <Popover
273
+ placement='bottom'
274
+ title='Title'
275
+ trigger={<Button variant='primary'>Open popover</Button>}
276
+ variant='primary'
277
+ >
278
+ Slot Area
279
+ </Popover>
280
+
242
281
  <AnimatePresence presence>
243
282
  <AnimatePresenceChild>
244
283
  <div className='animate-in slide-in-from-right duration-500'>
@@ -258,9 +297,11 @@ export function ComponentExamples() {
258
297
  - `Checkbox` and `CheckboxGroup` support `shape="square" | "circle"`, with `square` as the default.
259
298
  - `Chip` supports `variant`, `appearance="filled" | "outline"`, `shape`, `size`, `inverted`, optional `icon`, and removable chips via `onClose`.
260
299
  - `Divider` supports `orientation="horizontal" | "vertical"` and optional centered content through `children`.
300
+ - `Dropdown` opens a Floating UI menu-style popover list. It shares Button `variant`, `appearance`, `size`, `loading`, `disabled`, `inverted`, and `fullWidth` props, with default chevron, optional icon-only mode, `items`, `selectedValue`, `onItemSelect`, custom `trigger` / `menuContent`, `triggerAction="click" | "hover"`, `menuPlacement`, `menuOffset`, optional arrow, and Portal targeting. `DropdownList` and `DropdownItem` are exported for lower-level composition.
261
301
  - `Drawer` is controlled with `open` and `onClose`, supports `placement="right" | "left" | "top" | "bottom"`, `size="sm" | "md" | "lg" | "full"`, overlay close, Escape close, footer actions, Portal targeting, and placement-aware slide animations.
262
302
  - `Portal` renders to `document.body` by default and can target a custom container via `container`, `containerRef`, or `containerId`.
263
303
  - `Link` supports `variant`, `size`, `underline="none" | "hover" | "always"`, `inverted`, `disabled`, `truncate`, optional leading/trailing icons, and `external` links.
304
+ - `Popover` is powered by Floating UI, supports `placement`, `align`, `variant`, optional arrow/close controls, controlled or uncontrolled open state, and slot-style body content.
264
305
 
265
306
  ### Documentation and examples
266
307
 
@@ -271,7 +312,10 @@ export function ComponentExamples() {
271
312
 
272
313
  - Component style variants are centralized with CVA + Tailwind utility patterns.
273
314
  - Theme tokens are built in and theme files are exported from package entry points:
315
+ - `base.css`
274
316
  - `theme-secondary.css`
317
+ - `themes/primary.css`
318
+ - `themes/secondary.css`
275
319
  - `globals.css`
276
320
 
277
321
  ## Accessibility
@@ -380,9 +424,11 @@ src/
380
424
  | CheckboxGroup | `src/components/CheckboxGroup` | [CheckboxGroup](https://tanishraj.github.io/ui-kit/?path=/story/components-checkboxgroup--playground) | Stable |
381
425
  | Chip | `src/components/Chip` | [Chip](https://tanishraj.github.io/ui-kit/?path=/story/components-chip--playground) | Stable |
382
426
  | Divider | `src/components/Divider` | [Divider](https://tanishraj.github.io/ui-kit/?path=/story/components-divider--playground) | Stable |
427
+ | Dropdown | `src/components/Dropdown` | [Dropdown](https://tanishraj.github.io/ui-kit/?path=/story/components-dropdown--playground) | Stable |
383
428
  | Drawer | `src/components/Drawer` | [Drawer](https://tanishraj.github.io/ui-kit/?path=/story/components-drawer--playground) | Stable |
384
429
  | Link | `src/components/Link` | [Link](https://tanishraj.github.io/ui-kit/?path=/story/components-link--playground) | Stable |
385
430
  | OrganizationChart | `src/components/OrganizationChart` | [OrganizationChart](https://tanishraj.github.io/ui-kit/?path=/story/components-organizationchart--playground) | Stable |
431
+ | Popover | `src/components/Popover` | [Popover](https://tanishraj.github.io/ui-kit/?path=/story/components-popover--playground) | Stable |
386
432
  | Portal | `src/components/Portal` | N/A | Stable |
387
433
 
388
434
  ## Versioning and Changelog