@tanishraj/ui-kit 2.3.0 → 2.4.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.3.0",
3
+ "version": "2.4.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",
@@ -75,6 +75,7 @@
75
75
  "lucide-react": "^1.17.0",
76
76
  "react": "^19.2.7",
77
77
  "react-dom": "^19.2.7",
78
+ "sonner": "^2.0.7",
78
79
  "tailwind-merge": "^3.6.0"
79
80
  },
80
81
  "devDependencies": {
package/readme.md CHANGED
@@ -75,13 +75,23 @@ import {
75
75
  Divider,
76
76
  Dropdown,
77
77
  Drawer,
78
+ Feedback,
78
79
  Input,
79
80
  ListBox,
80
81
  Link,
81
82
  Modal,
82
83
  OrganizationChart,
83
84
  Popover,
85
+ ProgressBar,
84
86
  Portal,
87
+ Radio,
88
+ RadioGroup,
89
+ Rating,
90
+ Slider,
91
+ Tab,
92
+ TabPanel,
93
+ Tabs,
94
+ TabsList,
85
95
  } from '@tanishraj/ui-kit';
86
96
 
87
97
  export function Demo() {
@@ -113,11 +123,21 @@ import {
113
123
  Divider,
114
124
  Dropdown,
115
125
  Drawer,
126
+ Feedback,
116
127
  Input,
117
128
  ListBox,
118
129
  Link,
119
130
  Modal,
120
131
  Popover,
132
+ ProgressBar,
133
+ Radio,
134
+ RadioGroup,
135
+ Rating,
136
+ Slider,
137
+ Tab,
138
+ TabPanel,
139
+ Tabs,
140
+ TabsList,
121
141
  } from '@tanishraj/ui-kit';
122
142
  import { Plus } from 'lucide-react';
123
143
  import { useState } from 'react';
@@ -141,6 +161,26 @@ export default function Demo() {
141
161
  placeholder='Placeholder'
142
162
  variant='primary'
143
163
  />
164
+ <Radio defaultChecked label='Radio' />
165
+ <RadioGroup
166
+ defaultValue='email'
167
+ label='Notification method'
168
+ options={[
169
+ { label: 'Email', value: 'email' },
170
+ { label: 'SMS', value: 'sms' },
171
+ ]}
172
+ />
173
+ <Feedback defaultValue={4} />
174
+ <Rating defaultValue={3.5} precision={0.5} />
175
+ <Slider label='Slider Label' max={10} value={5} />
176
+ <Tabs defaultValue={0}>
177
+ <TabsList>
178
+ <Tab>Overview</Tab>
179
+ <Tab>Details</Tab>
180
+ </TabsList>
181
+ <TabPanel>Overview content</TabPanel>
182
+ <TabPanel>Details content</TabPanel>
183
+ </Tabs>
144
184
  <ListBox
145
185
  items={[
146
186
  { label: 'Item Name', value: 'one' },
@@ -164,6 +204,12 @@ export default function Demo() {
164
204
  >
165
205
  Slot Area
166
206
  </Popover>
207
+ <ProgressBar
208
+ caption='There will be a caption text here'
209
+ label='Label'
210
+ value={30}
211
+ variant='primary'
212
+ />
167
213
  <Drawer
168
214
  footer={<Button onClick={() => setDrawerOpen(false)}>Close</Button>}
169
215
  onClose={() => setDrawerOpen(false)}
@@ -245,11 +291,21 @@ import {
245
291
  Divider,
246
292
  Dropdown,
247
293
  Drawer,
294
+ Feedback,
248
295
  Input,
249
296
  ListBox,
250
297
  Link,
251
298
  Modal,
252
299
  Popover,
300
+ ProgressBar,
301
+ Radio,
302
+ RadioGroup,
303
+ Rating,
304
+ Slider,
305
+ Tab,
306
+ TabPanel,
307
+ Tabs,
308
+ TabsList,
253
309
  } from '@tanishraj/ui-kit';
254
310
  import { Home, Plus, Tag } from 'lucide-react';
255
311
 
@@ -290,6 +346,30 @@ export function ComponentExamples() {
290
346
  shape='square'
291
347
  />
292
348
 
349
+ <Radio defaultChecked label='Radio option' />
350
+
351
+ <RadioGroup
352
+ defaultValue='email'
353
+ label='Notification method'
354
+ options={[
355
+ { label: 'Email', value: 'email' },
356
+ { label: 'SMS', value: 'sms' },
357
+ ]}
358
+ orientation='horizontal'
359
+ />
360
+
361
+ <Feedback defaultValue={4} />
362
+ <Rating defaultValue={3.5} precision={0.5} />
363
+ <Slider label='Slider Label' max={10} value={5} />
364
+ <Tabs defaultValue={0}>
365
+ <TabsList>
366
+ <Tab>Overview</Tab>
367
+ <Tab>Details</Tab>
368
+ </TabsList>
369
+ <TabPanel>Overview content</TabPanel>
370
+ <TabPanel>Details content</TabPanel>
371
+ </Tabs>
372
+
293
373
  <Divider>
294
374
  <Button leadingIcon={Plus} size='sm' variant='default'>
295
375
  Add item
@@ -338,6 +418,14 @@ export function ComponentExamples() {
338
418
  Slot Area
339
419
  </Popover>
340
420
 
421
+ <ProgressBar
422
+ caption='There will be a caption text here'
423
+ label='Label'
424
+ showDot
425
+ value={30}
426
+ variant='success'
427
+ />
428
+
341
429
  <AnimatePresence presence>
342
430
  <AnimatePresenceChild>
343
431
  <div className='animate-in slide-in-from-right duration-500'>
@@ -359,12 +447,19 @@ export function ComponentExamples() {
359
447
  - `Divider` supports `orientation="horizontal" | "vertical"` and optional centered content through `children`.
360
448
  - `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. It uses `ListBox` internally for list rendering.
361
449
  - `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.
450
+ - `Feedback` supports controlled or uncontrolled five-point sentiment selection with `value`, `defaultValue`, `onValueChange`, `options`, `variant="face" | "emoji"`, `size`, read-only state, disabled state, and custom accessible labels via `getLabelText`.
362
451
  - `Input` supports `label`, `caption`, `error`, `variant`, `size`, required marker, disabled state, optional leading/trailing icons, `clearable`, `onClear`, and `fullWidth`.
363
452
  - `ListBox` and `ListItem` provide reusable selectable list surfaces with shared row spacing, selected state, disabled state, optional leading icons, and `option` / `menuitem` semantics.
364
453
  - `Modal` is controlled with `open` and `onClose`, supports `size="sm" | "md" | "lg"`, optional leading header icon, overlay close, Escape close, footer actions, Portal targeting, and centered fade/scale animations.
365
454
  - `Portal` renders to `document.body` by default and can target a custom container via `container`, `containerRef`, or `containerId`.
366
455
  - `Link` supports `variant`, `size`, `underline="none" | "hover" | "always"`, `inverted`, `disabled`, `truncate`, optional leading/trailing icons, and `external` links.
367
456
  - `Popover` is powered by Floating UI, supports `placement`, `align`, `variant`, optional arrow/close controls, controlled or uncontrolled open state, and slot-style body content.
457
+ - `ProgressBar` supports `appearance="linear" | "circular"`, semantic `variant`, `size`, labels, captions, visible values, optional linear endpoint dots, custom value formatting, `fullWidth`, and inverted dark-surface styling.
458
+ - `Radio` supports `label`, `description`, `error`, `size`, required marker, disabled state, and native radio input props for single-option composition.
459
+ - `RadioGroup` supports controlled or uncontrolled single selection with `value`, `defaultValue`, `onValueChange`, options, group label, description, error text, `orientation`, `size`, disabled state, and required marker.
460
+ - `Rating` supports controlled or uncontrolled star ratings with `value`, `defaultValue`, `onValueChange`, `max`, `precision={1 | 0.5}`, `size`, read-only state, disabled state, and custom accessible labels.
461
+ - `Slider` supports controlled or uncontrolled single or range selection with `value`, `defaultValue`, `onValueChange`, `min`, `max`, `step`, size variants, visible value markers, labels, captions, and error/disabled states.
462
+ - `Tabs`, `TabsList`, `Tab`, and `TabPanel` provide a compound tabs API with controlled or uncontrolled selection, `variant="underline" | "pill"`, `size`, `orientation`, disabled states, optional adornments, status dots, and close actions.
368
463
 
369
464
  ### Documentation and examples
370
465
 
@@ -489,13 +584,20 @@ src/
489
584
  | Divider | `src/components/Divider` | [Divider](https://tanishraj.github.io/ui-kit/?path=/story/components-divider--playground) | Stable |
490
585
  | Dropdown | `src/components/Dropdown` | [Dropdown](https://tanishraj.github.io/ui-kit/?path=/story/components-dropdown--playground) | Stable |
491
586
  | Drawer | `src/components/Drawer` | [Drawer](https://tanishraj.github.io/ui-kit/?path=/story/components-drawer--playground) | Stable |
587
+ | Feedback | `src/components/Feedback` | [Feedback](https://tanishraj.github.io/ui-kit/?path=/story/components-feedback--playground) | Stable |
492
588
  | Input | `src/components/Input` | [Input](https://tanishraj.github.io/ui-kit/?path=/story/components-input--playground) | Stable |
493
589
  | ListBox | `src/components/ListBox` | [ListBox](https://tanishraj.github.io/ui-kit/?path=/story/components-listbox--playground) | Stable |
494
590
  | Link | `src/components/Link` | [Link](https://tanishraj.github.io/ui-kit/?path=/story/components-link--playground) | Stable |
495
591
  | Modal | `src/components/Modal` | [Modal](https://tanishraj.github.io/ui-kit/?path=/story/components-modal--playground) | Stable |
496
592
  | OrganizationChart | `src/components/OrganizationChart` | [OrganizationChart](https://tanishraj.github.io/ui-kit/?path=/story/components-organizationchart--playground) | Stable |
497
593
  | Popover | `src/components/Popover` | [Popover](https://tanishraj.github.io/ui-kit/?path=/story/components-popover--playground) | Stable |
594
+ | ProgressBar | `src/components/ProgressBar` | [ProgressBar](https://tanishraj.github.io/ui-kit/?path=/story/components-progressbar--playground) | Stable |
498
595
  | Portal | `src/components/Portal` | N/A | Stable |
596
+ | Radio | `src/components/Radio` | [Radio](https://tanishraj.github.io/ui-kit/?path=/story/components-radio--playground) | Stable |
597
+ | RadioGroup | `src/components/RadioGroup` | [RadioGroup](https://tanishraj.github.io/ui-kit/?path=/story/components-radiogroup--playground) | Stable |
598
+ | Rating | `src/components/Rating` | [Rating](https://tanishraj.github.io/ui-kit/?path=/story/components-rating--playground) | Stable |
599
+ | Slider | `src/components/Slider` | [Slider](https://tanishraj.github.io/ui-kit/?path=/story/components-slider--playground) | Stable |
600
+ | Tabs | `src/components/Tabs` | [Tabs](https://tanishraj.github.io/ui-kit/?path=/story/components-tabs--playground) | Stable |
499
601
 
500
602
  ## Versioning and Changelog
501
603