@ataraui/ataraui-react 0.5.0 → 0.6.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/README.md +90 -9
- package/dist/index.d.mts +76 -1
- package/dist/index.d.ts +76 -1
- package/dist/index.js +399 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +380 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,6 +95,22 @@ import {
|
|
|
95
95
|
AlertDescription,
|
|
96
96
|
Progress,
|
|
97
97
|
Skeleton,
|
|
98
|
+
Tabs,
|
|
99
|
+
TabsList,
|
|
100
|
+
TabsTrigger,
|
|
101
|
+
TabsContent,
|
|
102
|
+
Accordion,
|
|
103
|
+
AccordionItem,
|
|
104
|
+
AccordionTrigger,
|
|
105
|
+
AccordionContent,
|
|
106
|
+
Table,
|
|
107
|
+
TableHeader,
|
|
108
|
+
TableBody,
|
|
109
|
+
TableFooter,
|
|
110
|
+
TableRow,
|
|
111
|
+
TableHead,
|
|
112
|
+
TableCell,
|
|
113
|
+
TableCaption,
|
|
98
114
|
} from '@ataraui/ataraui-react'
|
|
99
115
|
|
|
100
116
|
export default function Page() {
|
|
@@ -207,6 +223,44 @@ export default function Page() {
|
|
|
207
223
|
<Skeleton variant="circle" width={40} height={40} />
|
|
208
224
|
<Skeleton variant="text" width="60%" />
|
|
209
225
|
<Skeleton variant="rect" height={120} />
|
|
226
|
+
|
|
227
|
+
<Tabs defaultValue="account">
|
|
228
|
+
<TabsList>
|
|
229
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
230
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
231
|
+
</TabsList>
|
|
232
|
+
<TabsContent value="account">Account content here.</TabsContent>
|
|
233
|
+
<TabsContent value="password">Password content here.</TabsContent>
|
|
234
|
+
</Tabs>
|
|
235
|
+
|
|
236
|
+
<Accordion type="single" defaultValue="item-1">
|
|
237
|
+
<AccordionItem value="item-1">
|
|
238
|
+
<AccordionTrigger>What is AtaraUI?</AccordionTrigger>
|
|
239
|
+
<AccordionContent>A calm, composable component library.</AccordionContent>
|
|
240
|
+
</AccordionItem>
|
|
241
|
+
<AccordionItem value="item-2">
|
|
242
|
+
<AccordionTrigger>Is it free?</AccordionTrigger>
|
|
243
|
+
<AccordionContent>Yes, MIT licensed.</AccordionContent>
|
|
244
|
+
</AccordionItem>
|
|
245
|
+
</Accordion>
|
|
246
|
+
|
|
247
|
+
<Table>
|
|
248
|
+
<TableHeader>
|
|
249
|
+
<TableRow>
|
|
250
|
+
<TableHead>Name</TableHead>
|
|
251
|
+
<TableHead>Email</TableHead>
|
|
252
|
+
<TableHead>Role</TableHead>
|
|
253
|
+
</TableRow>
|
|
254
|
+
</TableHeader>
|
|
255
|
+
<TableBody>
|
|
256
|
+
<TableRow>
|
|
257
|
+
<TableCell>Ryo Kurniawan</TableCell>
|
|
258
|
+
<TableCell>ryo@example.com</TableCell>
|
|
259
|
+
<TableCell>Admin</TableCell>
|
|
260
|
+
</TableRow>
|
|
261
|
+
</TableBody>
|
|
262
|
+
<TableCaption>A list of your team members.</TableCaption>
|
|
263
|
+
</Table>
|
|
210
264
|
</div>
|
|
211
265
|
<Toaster position="bottom-right" />
|
|
212
266
|
</ToastProvider>
|
|
@@ -237,6 +291,9 @@ export default function Page() {
|
|
|
237
291
|
| `Progress` | `sm` `md` `lg` | ✅ Ready |
|
|
238
292
|
| `Skeleton` | `text` `circle` `rect` | ✅ Ready |
|
|
239
293
|
| `ToastProvider` + `Toaster` | `default` `success` `warning` `destructive` | ✅ Ready |
|
|
294
|
+
| `Tabs` | `default` `outline` `pills` | ✅ Ready |
|
|
295
|
+
| `Accordion` | `default` `ghost` `outlined` | ✅ Ready |
|
|
296
|
+
| `Table` | `default` `striped` `bordered` | ✅ Ready |
|
|
240
297
|
|
|
241
298
|
## Button Props
|
|
242
299
|
|
|
@@ -442,6 +499,38 @@ toast({ title: 'Saved!', description: 'Your changes were saved.', variant: 'succ
|
|
|
442
499
|
| `icon` | `ReactNode` | Icon on the left |
|
|
443
500
|
| `action` | `{ label: string, onClick: () => void }` | Action button inside the toast |
|
|
444
501
|
|
|
502
|
+
## Tabs Props
|
|
503
|
+
|
|
504
|
+
| Prop | Type | Default | Description |
|
|
505
|
+
|------|------|---------|-------------|
|
|
506
|
+
| `variant` | `default` \| `outline` \| `pills` | `default` | Visual style |
|
|
507
|
+
| `value` | `string` | — | Controlled active tab |
|
|
508
|
+
| `defaultValue` | `string` | — | Initial active tab (uncontrolled) |
|
|
509
|
+
| `onChange` | `(value: string) => void` | — | Called when active tab changes |
|
|
510
|
+
|
|
511
|
+
## Accordion Props
|
|
512
|
+
|
|
513
|
+
| Prop | Type | Default | Description |
|
|
514
|
+
|------|------|---------|-------------|
|
|
515
|
+
| `type` | `single` \| `multiple` | `single` | Allow one or multiple items open at once |
|
|
516
|
+
| `variant` | `default` \| `ghost` \| `outlined` | `default` | Visual style |
|
|
517
|
+
| `value` | `string` \| `string[]` | — | Controlled open item(s) |
|
|
518
|
+
| `defaultValue` | `string` \| `string[]` | — | Initial open item(s) (uncontrolled) |
|
|
519
|
+
| `onChange` | `(value: string \| string[]) => void` | — | Called when open state changes |
|
|
520
|
+
|
|
521
|
+
## AccordionItem Props
|
|
522
|
+
|
|
523
|
+
| Prop | Type | Default | Description |
|
|
524
|
+
|------|------|---------|-------------|
|
|
525
|
+
| `value` | `string` | — | Unique identifier for this item (required) |
|
|
526
|
+
| `disabled` | `boolean` | `false` | Disable this item |
|
|
527
|
+
|
|
528
|
+
## Table Props
|
|
529
|
+
|
|
530
|
+
| Prop | Type | Default | Description |
|
|
531
|
+
|------|------|---------|-------------|
|
|
532
|
+
| `variant` | `default` \| `striped` \| `bordered` | `default` | Visual style |
|
|
533
|
+
|
|
445
534
|
## Development
|
|
446
535
|
|
|
447
536
|
```bash
|
|
@@ -459,14 +548,6 @@ npm run build
|
|
|
459
548
|
npm run dev
|
|
460
549
|
```
|
|
461
550
|
|
|
462
|
-
## Publishing
|
|
463
|
-
|
|
464
|
-
```bash
|
|
465
|
-
# Bump version in package.json, then:
|
|
466
|
-
npm run build
|
|
467
|
-
npm publish
|
|
468
|
-
```
|
|
469
|
-
|
|
470
551
|
## Roadmap
|
|
471
552
|
|
|
472
553
|
| Version | Components | Category |
|
|
@@ -476,7 +557,7 @@ npm publish
|
|
|
476
557
|
| **v0.3.0** ✅ | `Select` `Checkbox` `Radio` `Switch` | Form components |
|
|
477
558
|
| **v0.4.0** ✅ | `Modal/Dialog` `Drawer` `Tooltip` `Popover` | Overlay components |
|
|
478
559
|
| **v0.5.0** ✅ | `Toast` `Alert` `Progress` `Skeleton` | Feedback components |
|
|
479
|
-
| **v0.6.0** | `Table` `Tabs` `Accordion` | Data display |
|
|
560
|
+
| **v0.6.0** ✅ | `Table` `Tabs` `Accordion` | Data display |
|
|
480
561
|
| **v0.7.0** | Dark mode · Storybook docs | DX improvements |
|
|
481
562
|
| **v0.8.0** | `Navbar` `Sidebar` `Breadcrumb` | Navigation |
|
|
482
563
|
| **v0.9.0** | `DatePicker` `Combobox` `FileUpload` | Advanced inputs |
|
package/dist/index.d.mts
CHANGED
|
@@ -328,4 +328,79 @@ interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantPro
|
|
|
328
328
|
}
|
|
329
329
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
declare const tabsListVariants: (props?: ({
|
|
332
|
+
variant?: "outline" | "default" | "pills" | null | undefined;
|
|
333
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
334
|
+
declare const tabsTriggerVariants: (props?: ({
|
|
335
|
+
variant?: "outline" | "default" | "pills" | null | undefined;
|
|
336
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
337
|
+
interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof tabsListVariants> {
|
|
338
|
+
value?: string;
|
|
339
|
+
defaultValue?: string;
|
|
340
|
+
onChange?: (value: string) => void;
|
|
341
|
+
}
|
|
342
|
+
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
343
|
+
}
|
|
344
|
+
interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
345
|
+
value: string;
|
|
346
|
+
}
|
|
347
|
+
interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
348
|
+
value: string;
|
|
349
|
+
}
|
|
350
|
+
declare const Tabs: React.FC<TabsProps>;
|
|
351
|
+
declare const TabsList: React.FC<TabsListProps>;
|
|
352
|
+
declare const TabsTrigger: React.FC<TabsTriggerProps>;
|
|
353
|
+
declare const TabsContent: React.FC<TabsContentProps>;
|
|
354
|
+
|
|
355
|
+
declare const accordionVariants: (props?: ({
|
|
356
|
+
variant?: "ghost" | "default" | "outlined" | null | undefined;
|
|
357
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
358
|
+
type AccordionType = 'single' | 'multiple';
|
|
359
|
+
interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof accordionVariants> {
|
|
360
|
+
type?: AccordionType;
|
|
361
|
+
value?: string | string[];
|
|
362
|
+
defaultValue?: string | string[];
|
|
363
|
+
onChange?: (value: string | string[]) => void;
|
|
364
|
+
}
|
|
365
|
+
interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
366
|
+
value: string;
|
|
367
|
+
disabled?: boolean;
|
|
368
|
+
}
|
|
369
|
+
interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
370
|
+
}
|
|
371
|
+
interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
372
|
+
}
|
|
373
|
+
declare const Accordion: React.FC<AccordionProps>;
|
|
374
|
+
declare const AccordionItem: React.FC<AccordionItemProps>;
|
|
375
|
+
declare const AccordionTrigger: React.FC<AccordionTriggerProps>;
|
|
376
|
+
declare const AccordionContent: React.FC<AccordionContentProps>;
|
|
377
|
+
|
|
378
|
+
declare const tableVariants: (props?: ({
|
|
379
|
+
variant?: "default" | "striped" | "bordered" | null | undefined;
|
|
380
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
381
|
+
interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
|
|
382
|
+
}
|
|
383
|
+
interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
384
|
+
}
|
|
385
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
386
|
+
}
|
|
387
|
+
interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
388
|
+
}
|
|
389
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
390
|
+
}
|
|
391
|
+
interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
392
|
+
}
|
|
393
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
394
|
+
}
|
|
395
|
+
interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
|
|
396
|
+
}
|
|
397
|
+
declare const Table: React.FC<TableProps>;
|
|
398
|
+
declare const TableHeader: React.FC<TableHeaderProps>;
|
|
399
|
+
declare const TableBody: React.FC<TableBodyProps>;
|
|
400
|
+
declare const TableFooter: React.FC<TableFooterProps>;
|
|
401
|
+
declare const TableRow: React.FC<TableRowProps>;
|
|
402
|
+
declare const TableHead: React.FC<TableHeadProps>;
|
|
403
|
+
declare const TableCell: React.FC<TableCellProps>;
|
|
404
|
+
declare const TableCaption: React.FC<TableCaptionProps>;
|
|
405
|
+
|
|
406
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, AlertTitle, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, Input, type InputProps, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTitle, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type ToastInput, type ToastItem, type ToastPosition, ToastProvider, type ToastVariant, Toaster, type ToasterProps, Tooltip, type TooltipProps, accordionVariants, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, cn, colors, drawerVariants, fontSize, inputVariants, modalVariants, progressVariants, radius, selectVariants, separatorVariants, skeletonVariants, spinnerVariants, tableVariants, tabsListVariants, tabsTriggerVariants, toastVariants, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -328,4 +328,79 @@ interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantPro
|
|
|
328
328
|
}
|
|
329
329
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
declare const tabsListVariants: (props?: ({
|
|
332
|
+
variant?: "outline" | "default" | "pills" | null | undefined;
|
|
333
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
334
|
+
declare const tabsTriggerVariants: (props?: ({
|
|
335
|
+
variant?: "outline" | "default" | "pills" | null | undefined;
|
|
336
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
337
|
+
interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof tabsListVariants> {
|
|
338
|
+
value?: string;
|
|
339
|
+
defaultValue?: string;
|
|
340
|
+
onChange?: (value: string) => void;
|
|
341
|
+
}
|
|
342
|
+
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
343
|
+
}
|
|
344
|
+
interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
345
|
+
value: string;
|
|
346
|
+
}
|
|
347
|
+
interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
348
|
+
value: string;
|
|
349
|
+
}
|
|
350
|
+
declare const Tabs: React.FC<TabsProps>;
|
|
351
|
+
declare const TabsList: React.FC<TabsListProps>;
|
|
352
|
+
declare const TabsTrigger: React.FC<TabsTriggerProps>;
|
|
353
|
+
declare const TabsContent: React.FC<TabsContentProps>;
|
|
354
|
+
|
|
355
|
+
declare const accordionVariants: (props?: ({
|
|
356
|
+
variant?: "ghost" | "default" | "outlined" | null | undefined;
|
|
357
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
358
|
+
type AccordionType = 'single' | 'multiple';
|
|
359
|
+
interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof accordionVariants> {
|
|
360
|
+
type?: AccordionType;
|
|
361
|
+
value?: string | string[];
|
|
362
|
+
defaultValue?: string | string[];
|
|
363
|
+
onChange?: (value: string | string[]) => void;
|
|
364
|
+
}
|
|
365
|
+
interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
366
|
+
value: string;
|
|
367
|
+
disabled?: boolean;
|
|
368
|
+
}
|
|
369
|
+
interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
370
|
+
}
|
|
371
|
+
interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
372
|
+
}
|
|
373
|
+
declare const Accordion: React.FC<AccordionProps>;
|
|
374
|
+
declare const AccordionItem: React.FC<AccordionItemProps>;
|
|
375
|
+
declare const AccordionTrigger: React.FC<AccordionTriggerProps>;
|
|
376
|
+
declare const AccordionContent: React.FC<AccordionContentProps>;
|
|
377
|
+
|
|
378
|
+
declare const tableVariants: (props?: ({
|
|
379
|
+
variant?: "default" | "striped" | "bordered" | null | undefined;
|
|
380
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
381
|
+
interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
|
|
382
|
+
}
|
|
383
|
+
interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
384
|
+
}
|
|
385
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
386
|
+
}
|
|
387
|
+
interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
388
|
+
}
|
|
389
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
390
|
+
}
|
|
391
|
+
interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
392
|
+
}
|
|
393
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
394
|
+
}
|
|
395
|
+
interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
|
|
396
|
+
}
|
|
397
|
+
declare const Table: React.FC<TableProps>;
|
|
398
|
+
declare const TableHeader: React.FC<TableHeaderProps>;
|
|
399
|
+
declare const TableBody: React.FC<TableBodyProps>;
|
|
400
|
+
declare const TableFooter: React.FC<TableFooterProps>;
|
|
401
|
+
declare const TableRow: React.FC<TableRowProps>;
|
|
402
|
+
declare const TableHead: React.FC<TableHeadProps>;
|
|
403
|
+
declare const TableCell: React.FC<TableCellProps>;
|
|
404
|
+
declare const TableCaption: React.FC<TableCaptionProps>;
|
|
405
|
+
|
|
406
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, AlertTitle, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Drawer, DrawerBody, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, Input, type InputProps, Modal, ModalBody, ModalDescription, ModalFooter, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTitle, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type ToastInput, type ToastItem, type ToastPosition, ToastProvider, type ToastVariant, Toaster, type ToasterProps, Tooltip, type TooltipProps, accordionVariants, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, cn, colors, drawerVariants, fontSize, inputVariants, modalVariants, progressVariants, radius, selectVariants, separatorVariants, skeletonVariants, spinnerVariants, tableVariants, tabsListVariants, tabsTriggerVariants, toastVariants, useToast };
|