@djangocfg/ui-core 2.1.120 → 2.1.123

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 (55) hide show
  1. package/package.json +8 -5
  2. package/src/components/accordion.story.tsx +110 -0
  3. package/src/components/alert-dialog.story.tsx +104 -0
  4. package/src/components/alert.story.tsx +77 -0
  5. package/src/components/aspect-ratio.story.tsx +94 -0
  6. package/src/components/avatar.story.tsx +115 -0
  7. package/src/components/badge.story.tsx +56 -0
  8. package/src/components/button-download.story.tsx +112 -0
  9. package/src/components/button-group.story.tsx +79 -0
  10. package/src/components/button.story.tsx +116 -0
  11. package/src/components/calendar.story.tsx +126 -0
  12. package/src/components/card.story.tsx +105 -0
  13. package/src/components/carousel.story.tsx +122 -0
  14. package/src/components/carousel.tsx +2 -2
  15. package/src/components/checkbox.story.tsx +89 -0
  16. package/src/components/collapsible.story.tsx +133 -0
  17. package/src/components/combobox.story.tsx +145 -0
  18. package/src/components/command.story.tsx +121 -0
  19. package/src/components/context-menu.story.tsx +125 -0
  20. package/src/components/copy.story.tsx +77 -0
  21. package/src/components/dialog.story.tsx +137 -0
  22. package/src/components/drawer.story.tsx +131 -0
  23. package/src/components/dropdown-menu.story.tsx +208 -0
  24. package/src/components/empty.story.tsx +115 -0
  25. package/src/components/hover-card.story.tsx +102 -0
  26. package/src/components/image-with-fallback.story.tsx +105 -0
  27. package/src/components/input-group.story.tsx +119 -0
  28. package/src/components/input-otp.story.tsx +105 -0
  29. package/src/components/input.story.tsx +77 -0
  30. package/src/components/kbd.story.tsx +113 -0
  31. package/src/components/label.story.tsx +52 -0
  32. package/src/components/menubar.story.tsx +152 -0
  33. package/src/components/multi-select.story.tsx +122 -0
  34. package/src/components/navigation-menu.story.tsx +154 -0
  35. package/src/components/popover.story.tsx +127 -0
  36. package/src/components/preloader.story.tsx +86 -0
  37. package/src/components/progress.story.tsx +97 -0
  38. package/src/components/radio-group.story.tsx +113 -0
  39. package/src/components/resizable.story.tsx +119 -0
  40. package/src/components/responsive-sheet.story.tsx +117 -0
  41. package/src/components/scroll-area.story.tsx +112 -0
  42. package/src/components/select.story.tsx +112 -0
  43. package/src/components/separator.story.tsx +69 -0
  44. package/src/components/sheet.story.tsx +148 -0
  45. package/src/components/skeleton.story.tsx +101 -0
  46. package/src/components/slider.story.tsx +113 -0
  47. package/src/components/spinner.story.tsx +66 -0
  48. package/src/components/switch.story.tsx +98 -0
  49. package/src/components/table.story.tsx +148 -0
  50. package/src/components/tabs.story.tsx +98 -0
  51. package/src/components/tabs.tsx +1 -1
  52. package/src/components/textarea.story.tsx +94 -0
  53. package/src/components/toggle-group.story.tsx +118 -0
  54. package/src/components/toggle.story.tsx +104 -0
  55. package/src/components/tooltip.story.tsx +139 -0
@@ -0,0 +1,148 @@
1
+ import { defineStory } from '@djangocfg/playground';
2
+ import {
3
+ Table,
4
+ TableBody,
5
+ TableCaption,
6
+ TableCell,
7
+ TableHead,
8
+ TableHeader,
9
+ TableRow,
10
+ } from './table';
11
+ import { Badge } from './badge';
12
+
13
+ export default defineStory({
14
+ title: 'Core/Table',
15
+ component: Table,
16
+ description: 'Table for displaying tabular data.',
17
+ });
18
+
19
+ const invoices = [
20
+ { id: 'INV001', status: 'Paid', method: 'Credit Card', amount: '$250.00' },
21
+ { id: 'INV002', status: 'Pending', method: 'PayPal', amount: '$150.00' },
22
+ { id: 'INV003', status: 'Unpaid', method: 'Bank Transfer', amount: '$350.00' },
23
+ { id: 'INV004', status: 'Paid', method: 'Credit Card', amount: '$450.00' },
24
+ { id: 'INV005', status: 'Paid', method: 'PayPal', amount: '$550.00' },
25
+ ];
26
+
27
+ const users = [
28
+ { id: 1, name: 'John Doe', email: 'john@example.com', role: 'Admin', status: 'Active' },
29
+ { id: 2, name: 'Jane Smith', email: 'jane@example.com', role: 'User', status: 'Active' },
30
+ { id: 3, name: 'Bob Johnson', email: 'bob@example.com', role: 'User', status: 'Inactive' },
31
+ { id: 4, name: 'Alice Brown', email: 'alice@example.com', role: 'Editor', status: 'Active' },
32
+ ];
33
+
34
+ export const Default = () => (
35
+ <Table>
36
+ <TableCaption>A list of your recent invoices.</TableCaption>
37
+ <TableHeader>
38
+ <TableRow>
39
+ <TableHead className="w-[100px]">Invoice</TableHead>
40
+ <TableHead>Status</TableHead>
41
+ <TableHead>Method</TableHead>
42
+ <TableHead className="text-right">Amount</TableHead>
43
+ </TableRow>
44
+ </TableHeader>
45
+ <TableBody>
46
+ {invoices.map((invoice) => (
47
+ <TableRow key={invoice.id}>
48
+ <TableCell className="font-medium">{invoice.id}</TableCell>
49
+ <TableCell>{invoice.status}</TableCell>
50
+ <TableCell>{invoice.method}</TableCell>
51
+ <TableCell className="text-right">{invoice.amount}</TableCell>
52
+ </TableRow>
53
+ ))}
54
+ </TableBody>
55
+ </Table>
56
+ );
57
+
58
+ export const WithBadges = () => (
59
+ <Table>
60
+ <TableHeader>
61
+ <TableRow>
62
+ <TableHead>Name</TableHead>
63
+ <TableHead>Email</TableHead>
64
+ <TableHead>Role</TableHead>
65
+ <TableHead>Status</TableHead>
66
+ </TableRow>
67
+ </TableHeader>
68
+ <TableBody>
69
+ {users.map((user) => (
70
+ <TableRow key={user.id}>
71
+ <TableCell className="font-medium">{user.name}</TableCell>
72
+ <TableCell>{user.email}</TableCell>
73
+ <TableCell>
74
+ <Badge variant="secondary">{user.role}</Badge>
75
+ </TableCell>
76
+ <TableCell>
77
+ <Badge variant={user.status === 'Active' ? 'default' : 'outline'}>
78
+ {user.status}
79
+ </Badge>
80
+ </TableCell>
81
+ </TableRow>
82
+ ))}
83
+ </TableBody>
84
+ </Table>
85
+ );
86
+
87
+ export const Striped = () => (
88
+ <Table>
89
+ <TableHeader>
90
+ <TableRow>
91
+ <TableHead>Invoice</TableHead>
92
+ <TableHead>Status</TableHead>
93
+ <TableHead>Method</TableHead>
94
+ <TableHead className="text-right">Amount</TableHead>
95
+ </TableRow>
96
+ </TableHeader>
97
+ <TableBody>
98
+ {invoices.map((invoice, i) => (
99
+ <TableRow key={invoice.id} className={i % 2 === 0 ? 'bg-muted/50' : ''}>
100
+ <TableCell className="font-medium">{invoice.id}</TableCell>
101
+ <TableCell>{invoice.status}</TableCell>
102
+ <TableCell>{invoice.method}</TableCell>
103
+ <TableCell className="text-right">{invoice.amount}</TableCell>
104
+ </TableRow>
105
+ ))}
106
+ </TableBody>
107
+ </Table>
108
+ );
109
+
110
+ export const Compact = () => (
111
+ <Table>
112
+ <TableHeader>
113
+ <TableRow>
114
+ <TableHead className="h-8">Invoice</TableHead>
115
+ <TableHead className="h-8">Status</TableHead>
116
+ <TableHead className="h-8">Amount</TableHead>
117
+ </TableRow>
118
+ </TableHeader>
119
+ <TableBody>
120
+ {invoices.slice(0, 3).map((invoice) => (
121
+ <TableRow key={invoice.id}>
122
+ <TableCell className="py-2">{invoice.id}</TableCell>
123
+ <TableCell className="py-2">{invoice.status}</TableCell>
124
+ <TableCell className="py-2">{invoice.amount}</TableCell>
125
+ </TableRow>
126
+ ))}
127
+ </TableBody>
128
+ </Table>
129
+ );
130
+
131
+ export const Empty = () => (
132
+ <Table>
133
+ <TableHeader>
134
+ <TableRow>
135
+ <TableHead>Invoice</TableHead>
136
+ <TableHead>Status</TableHead>
137
+ <TableHead>Amount</TableHead>
138
+ </TableRow>
139
+ </TableHeader>
140
+ <TableBody>
141
+ <TableRow>
142
+ <TableCell colSpan={3} className="h-24 text-center text-muted-foreground">
143
+ No results.
144
+ </TableCell>
145
+ </TableRow>
146
+ </TableBody>
147
+ </Table>
148
+ );
@@ -0,0 +1,98 @@
1
+ import { defineStory } from '@djangocfg/playground';
2
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs';
3
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './card';
4
+ import { Input } from './input';
5
+ import { Label } from './label';
6
+ import { Button } from './button';
7
+
8
+ export default defineStory({
9
+ title: 'Core/Tabs',
10
+ component: Tabs,
11
+ description: 'Tabbed interface for organizing content.',
12
+ });
13
+
14
+ export const Default = () => (
15
+ <Tabs defaultValue="account" className="w-full max-w-md">
16
+ <TabsList className="grid w-full grid-cols-2">
17
+ <TabsTrigger value="account">Account</TabsTrigger>
18
+ <TabsTrigger value="password">Password</TabsTrigger>
19
+ </TabsList>
20
+ <TabsContent value="account">
21
+ <Card>
22
+ <CardHeader>
23
+ <CardTitle>Account</CardTitle>
24
+ <CardDescription>
25
+ Make changes to your account here.
26
+ </CardDescription>
27
+ </CardHeader>
28
+ <CardContent className="space-y-4">
29
+ <div className="space-y-2">
30
+ <Label htmlFor="name">Name</Label>
31
+ <Input id="name" defaultValue="John Doe" />
32
+ </div>
33
+ <div className="space-y-2">
34
+ <Label htmlFor="username">Username</Label>
35
+ <Input id="username" defaultValue="@johndoe" />
36
+ </div>
37
+ <Button>Save changes</Button>
38
+ </CardContent>
39
+ </Card>
40
+ </TabsContent>
41
+ <TabsContent value="password">
42
+ <Card>
43
+ <CardHeader>
44
+ <CardTitle>Password</CardTitle>
45
+ <CardDescription>
46
+ Change your password here.
47
+ </CardDescription>
48
+ </CardHeader>
49
+ <CardContent className="space-y-4">
50
+ <div className="space-y-2">
51
+ <Label htmlFor="current">Current password</Label>
52
+ <Input id="current" type="password" />
53
+ </div>
54
+ <div className="space-y-2">
55
+ <Label htmlFor="new">New password</Label>
56
+ <Input id="new" type="password" />
57
+ </div>
58
+ <Button>Save password</Button>
59
+ </CardContent>
60
+ </Card>
61
+ </TabsContent>
62
+ </Tabs>
63
+ );
64
+
65
+ export const SimpleTabs = () => (
66
+ <Tabs defaultValue="tab1" className="w-full max-w-lg">
67
+ <TabsList>
68
+ <TabsTrigger value="tab1">Tab 1</TabsTrigger>
69
+ <TabsTrigger value="tab2">Tab 2</TabsTrigger>
70
+ <TabsTrigger value="tab3">Tab 3</TabsTrigger>
71
+ </TabsList>
72
+ <TabsContent value="tab1" className="p-4">
73
+ Content for Tab 1
74
+ </TabsContent>
75
+ <TabsContent value="tab2" className="p-4">
76
+ Content for Tab 2
77
+ </TabsContent>
78
+ <TabsContent value="tab3" className="p-4">
79
+ Content for Tab 3
80
+ </TabsContent>
81
+ </Tabs>
82
+ );
83
+
84
+ export const DisabledTab = () => (
85
+ <Tabs defaultValue="active" className="w-full max-w-lg">
86
+ <TabsList>
87
+ <TabsTrigger value="active">Active</TabsTrigger>
88
+ <TabsTrigger value="disabled" disabled>Disabled</TabsTrigger>
89
+ <TabsTrigger value="another">Another</TabsTrigger>
90
+ </TabsList>
91
+ <TabsContent value="active" className="p-4">
92
+ This tab is active.
93
+ </TabsContent>
94
+ <TabsContent value="another" className="p-4">
95
+ Another active tab.
96
+ </TabsContent>
97
+ </Tabs>
98
+ );
@@ -16,7 +16,7 @@ import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from './sh
16
16
  // Tabs Root with Mobile Sheet Support
17
17
  // ─────────────────────────────────────────────────────────────────────────
18
18
 
19
- interface TabsProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
19
+ export interface TabsProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
20
20
  /**
21
21
  * Enable mobile sheet mode (automatically shows Sheet on mobile devices)
22
22
  * @default false
@@ -0,0 +1,94 @@
1
+ import { defineStory, useBoolean, useNumber } from '@djangocfg/playground';
2
+ import { Textarea } from './textarea';
3
+ import { Label } from './label';
4
+
5
+ export default defineStory({
6
+ title: 'Core/Textarea',
7
+ component: Textarea,
8
+ description: 'Multi-line text input.',
9
+ });
10
+
11
+ export const Interactive = () => {
12
+ const [disabled] = useBoolean('disabled', {
13
+ defaultValue: false,
14
+ label: 'Disabled',
15
+ description: 'Disable textarea',
16
+ });
17
+
18
+ const [rows] = useNumber('rows', {
19
+ defaultValue: 4,
20
+ min: 2,
21
+ max: 10,
22
+ label: 'Rows',
23
+ description: 'Number of visible rows',
24
+ });
25
+
26
+ return (
27
+ <div className="max-w-md space-y-2">
28
+ <Label htmlFor="message">Message</Label>
29
+ <Textarea
30
+ id="message"
31
+ placeholder="Type your message here..."
32
+ disabled={disabled}
33
+ rows={rows}
34
+ />
35
+ </div>
36
+ );
37
+ };
38
+
39
+ export const Default = () => (
40
+ <div className="max-w-md">
41
+ <Textarea placeholder="Type your message here..." />
42
+ </div>
43
+ );
44
+
45
+ export const WithLabel = () => (
46
+ <div className="max-w-md space-y-2">
47
+ <Label htmlFor="bio">Bio</Label>
48
+ <Textarea id="bio" placeholder="Tell us about yourself..." />
49
+ <p className="text-sm text-muted-foreground">
50
+ Write a short introduction about yourself.
51
+ </p>
52
+ </div>
53
+ );
54
+
55
+ export const Disabled = () => (
56
+ <div className="max-w-md">
57
+ <Textarea placeholder="Disabled textarea" disabled />
58
+ </div>
59
+ );
60
+
61
+ export const WithDefaultValue = () => (
62
+ <div className="max-w-md space-y-2">
63
+ <Label htmlFor="notes">Notes</Label>
64
+ <Textarea
65
+ id="notes"
66
+ defaultValue="This is some default text that was pre-filled in the textarea."
67
+ />
68
+ </div>
69
+ );
70
+
71
+ export const Sizes = () => (
72
+ <div className="max-w-md space-y-4">
73
+ <div className="space-y-2">
74
+ <Label>Small (2 rows)</Label>
75
+ <Textarea placeholder="Small textarea" rows={2} />
76
+ </div>
77
+ <div className="space-y-2">
78
+ <Label>Medium (4 rows)</Label>
79
+ <Textarea placeholder="Medium textarea" rows={4} />
80
+ </div>
81
+ <div className="space-y-2">
82
+ <Label>Large (8 rows)</Label>
83
+ <Textarea placeholder="Large textarea" rows={8} />
84
+ </div>
85
+ </div>
86
+ );
87
+
88
+ export const WithCharacterCount = () => (
89
+ <div className="max-w-md space-y-2">
90
+ <Label htmlFor="limited">Description</Label>
91
+ <Textarea id="limited" placeholder="Enter description..." maxLength={200} />
92
+ <p className="text-sm text-muted-foreground text-right">0/200</p>
93
+ </div>
94
+ );
@@ -0,0 +1,118 @@
1
+ import { defineStory, useSelect, useBoolean } from '@djangocfg/playground';
2
+ import { ToggleGroup, ToggleGroupItem } from './toggle-group';
3
+ import { Bold, Italic, Underline, AlignLeft, AlignCenter, AlignRight, AlignJustify } from 'lucide-react';
4
+
5
+ export default defineStory({
6
+ title: 'Core/Toggle Group',
7
+ component: ToggleGroup,
8
+ description: 'Group of toggle buttons for multiple or single selection.',
9
+ });
10
+
11
+ export const Interactive = () => {
12
+ const [type] = useSelect('type', {
13
+ options: ['single', 'multiple'] as const,
14
+ defaultValue: 'single',
15
+ label: 'Type',
16
+ description: 'Selection type',
17
+ });
18
+
19
+ const [variant] = useSelect('variant', {
20
+ options: ['default', 'outline'] as const,
21
+ defaultValue: 'default',
22
+ label: 'Variant',
23
+ description: 'Toggle style',
24
+ });
25
+
26
+ const [disabled] = useBoolean('disabled', {
27
+ defaultValue: false,
28
+ label: 'Disabled',
29
+ description: 'Disable group',
30
+ });
31
+
32
+ return (
33
+ <ToggleGroup type={type} variant={variant} disabled={disabled}>
34
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
35
+ <Bold className="h-4 w-4" />
36
+ </ToggleGroupItem>
37
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
38
+ <Italic className="h-4 w-4" />
39
+ </ToggleGroupItem>
40
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
41
+ <Underline className="h-4 w-4" />
42
+ </ToggleGroupItem>
43
+ </ToggleGroup>
44
+ );
45
+ };
46
+
47
+ export const Single = () => (
48
+ <ToggleGroup type="single" defaultValue="center">
49
+ <ToggleGroupItem value="left" aria-label="Align left">
50
+ <AlignLeft className="h-4 w-4" />
51
+ </ToggleGroupItem>
52
+ <ToggleGroupItem value="center" aria-label="Align center">
53
+ <AlignCenter className="h-4 w-4" />
54
+ </ToggleGroupItem>
55
+ <ToggleGroupItem value="right" aria-label="Align right">
56
+ <AlignRight className="h-4 w-4" />
57
+ </ToggleGroupItem>
58
+ <ToggleGroupItem value="justify" aria-label="Justify">
59
+ <AlignJustify className="h-4 w-4" />
60
+ </ToggleGroupItem>
61
+ </ToggleGroup>
62
+ );
63
+
64
+ export const Multiple = () => (
65
+ <ToggleGroup type="multiple" defaultValue={['bold']}>
66
+ <ToggleGroupItem value="bold" aria-label="Toggle bold">
67
+ <Bold className="h-4 w-4" />
68
+ </ToggleGroupItem>
69
+ <ToggleGroupItem value="italic" aria-label="Toggle italic">
70
+ <Italic className="h-4 w-4" />
71
+ </ToggleGroupItem>
72
+ <ToggleGroupItem value="underline" aria-label="Toggle underline">
73
+ <Underline className="h-4 w-4" />
74
+ </ToggleGroupItem>
75
+ </ToggleGroup>
76
+ );
77
+
78
+ export const Outline = () => (
79
+ <ToggleGroup type="single" variant="outline" defaultValue="left">
80
+ <ToggleGroupItem value="left" aria-label="Align left">
81
+ <AlignLeft className="h-4 w-4" />
82
+ </ToggleGroupItem>
83
+ <ToggleGroupItem value="center" aria-label="Align center">
84
+ <AlignCenter className="h-4 w-4" />
85
+ </ToggleGroupItem>
86
+ <ToggleGroupItem value="right" aria-label="Align right">
87
+ <AlignRight className="h-4 w-4" />
88
+ </ToggleGroupItem>
89
+ </ToggleGroup>
90
+ );
91
+
92
+ export const Sizes = () => (
93
+ <div className="flex flex-col gap-4">
94
+ <ToggleGroup type="single" size="sm">
95
+ <ToggleGroupItem value="left"><AlignLeft className="h-3 w-3" /></ToggleGroupItem>
96
+ <ToggleGroupItem value="center"><AlignCenter className="h-3 w-3" /></ToggleGroupItem>
97
+ <ToggleGroupItem value="right"><AlignRight className="h-3 w-3" /></ToggleGroupItem>
98
+ </ToggleGroup>
99
+ <ToggleGroup type="single" size="default">
100
+ <ToggleGroupItem value="left"><AlignLeft className="h-4 w-4" /></ToggleGroupItem>
101
+ <ToggleGroupItem value="center"><AlignCenter className="h-4 w-4" /></ToggleGroupItem>
102
+ <ToggleGroupItem value="right"><AlignRight className="h-4 w-4" /></ToggleGroupItem>
103
+ </ToggleGroup>
104
+ <ToggleGroup type="single" size="lg">
105
+ <ToggleGroupItem value="left"><AlignLeft className="h-5 w-5" /></ToggleGroupItem>
106
+ <ToggleGroupItem value="center"><AlignCenter className="h-5 w-5" /></ToggleGroupItem>
107
+ <ToggleGroupItem value="right"><AlignRight className="h-5 w-5" /></ToggleGroupItem>
108
+ </ToggleGroup>
109
+ </div>
110
+ );
111
+
112
+ export const Disabled = () => (
113
+ <ToggleGroup type="single" disabled>
114
+ <ToggleGroupItem value="left"><AlignLeft className="h-4 w-4" /></ToggleGroupItem>
115
+ <ToggleGroupItem value="center"><AlignCenter className="h-4 w-4" /></ToggleGroupItem>
116
+ <ToggleGroupItem value="right"><AlignRight className="h-4 w-4" /></ToggleGroupItem>
117
+ </ToggleGroup>
118
+ );
@@ -0,0 +1,104 @@
1
+ import { defineStory, useSelect, useBoolean } from '@djangocfg/playground';
2
+ import { Toggle } from './toggle';
3
+ import { Bold, Italic, Underline, AlignLeft, AlignCenter, AlignRight } from 'lucide-react';
4
+
5
+ export default defineStory({
6
+ title: 'Core/Toggle',
7
+ component: Toggle,
8
+ description: 'Toggle button for binary states.',
9
+ });
10
+
11
+ export const Interactive = () => {
12
+ const [variant] = useSelect('variant', {
13
+ options: ['default', 'outline'] as const,
14
+ defaultValue: 'default',
15
+ label: 'Variant',
16
+ description: 'Toggle style',
17
+ });
18
+
19
+ const [size] = useSelect('size', {
20
+ options: ['default', 'sm', 'lg'] as const,
21
+ defaultValue: 'default',
22
+ label: 'Size',
23
+ description: 'Toggle size',
24
+ });
25
+
26
+ const [disabled] = useBoolean('disabled', {
27
+ defaultValue: false,
28
+ label: 'Disabled',
29
+ description: 'Disable toggle',
30
+ });
31
+
32
+ return (
33
+ <Toggle variant={variant} size={size} disabled={disabled}>
34
+ <Bold className="h-4 w-4" />
35
+ </Toggle>
36
+ );
37
+ };
38
+
39
+ export const Default = () => (
40
+ <Toggle aria-label="Toggle bold">
41
+ <Bold className="h-4 w-4" />
42
+ </Toggle>
43
+ );
44
+
45
+ export const Outline = () => (
46
+ <Toggle variant="outline" aria-label="Toggle italic">
47
+ <Italic className="h-4 w-4" />
48
+ </Toggle>
49
+ );
50
+
51
+ export const WithText = () => (
52
+ <Toggle aria-label="Toggle bold">
53
+ <Bold className="h-4 w-4" />
54
+ Bold
55
+ </Toggle>
56
+ );
57
+
58
+ export const Sizes = () => (
59
+ <div className="flex items-center gap-2">
60
+ <Toggle size="sm" aria-label="Toggle bold">
61
+ <Bold className="h-4 w-4" />
62
+ </Toggle>
63
+ <Toggle size="default" aria-label="Toggle bold">
64
+ <Bold className="h-4 w-4" />
65
+ </Toggle>
66
+ <Toggle size="lg" aria-label="Toggle bold">
67
+ <Bold className="h-4 w-4" />
68
+ </Toggle>
69
+ </div>
70
+ );
71
+
72
+ export const Disabled = () => (
73
+ <Toggle disabled aria-label="Toggle bold">
74
+ <Bold className="h-4 w-4" />
75
+ </Toggle>
76
+ );
77
+
78
+ export const Formatting = () => (
79
+ <div className="flex gap-1">
80
+ <Toggle aria-label="Toggle bold">
81
+ <Bold className="h-4 w-4" />
82
+ </Toggle>
83
+ <Toggle aria-label="Toggle italic">
84
+ <Italic className="h-4 w-4" />
85
+ </Toggle>
86
+ <Toggle aria-label="Toggle underline">
87
+ <Underline className="h-4 w-4" />
88
+ </Toggle>
89
+ </div>
90
+ );
91
+
92
+ export const Alignment = () => (
93
+ <div className="flex gap-1">
94
+ <Toggle aria-label="Align left" defaultPressed>
95
+ <AlignLeft className="h-4 w-4" />
96
+ </Toggle>
97
+ <Toggle aria-label="Align center">
98
+ <AlignCenter className="h-4 w-4" />
99
+ </Toggle>
100
+ <Toggle aria-label="Align right">
101
+ <AlignRight className="h-4 w-4" />
102
+ </Toggle>
103
+ </div>
104
+ );