ui-arreya-components 0.0.1 → 0.0.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.
@@ -0,0 +1,44 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+ import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"
3
+
4
+ import {
5
+ ChartContainer,
6
+ ChartTooltip,
7
+ ChartTooltipContent,
8
+ ChartLegend,
9
+ ChartLegendContent,
10
+ ChartStyle
11
+ } from "./chart"
12
+
13
+ const meta = {
14
+ title: "Components/ChartContainer",
15
+ component: ChartContainer,
16
+ parameters: {
17
+ layout: "centered",
18
+ },
19
+ tags: ["autodocs"],
20
+ } satisfies Meta<typeof ChartContainer>
21
+
22
+ export default meta
23
+ type Story = StoryObj<typeof meta>
24
+
25
+ export const Default: Story = {
26
+ args: {
27
+ data: [
28
+ { month: "January", desktop: 186, mobile: 80 },
29
+ { month: "February", desktop: 305, mobile: 200 },
30
+ { month: "March", desktop: 237, mobile: 120 },
31
+ { month: "April", desktop: 73, mobile: 190 },
32
+ { month: "May", desktop: 209, mobile: 130 },
33
+ { month: "June", desktop: 214, mobile: 140 },
34
+ ]
35
+ },
36
+ render: (args) => (
37
+ <ChartContainer className="h-[200px] w-full">
38
+ <BarChart accessibilityLayer data={args.data}>
39
+ <CartesianGrid vertical={false} />
40
+ <Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
41
+ </BarChart>
42
+ </ChartContainer>
43
+ )
44
+ }
@@ -0,0 +1,56 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Checkbox,
5
+ } from "./checkbox"
6
+
7
+ const meta = {
8
+ title: "Components/Checkbox",
9
+ component: Checkbox,
10
+ parameters: {
11
+ layout: "centered",
12
+ },
13
+ tags: ["autodocs"],
14
+ } satisfies Meta<typeof Checkbox>
15
+
16
+ export default meta
17
+ type Story = StoryObj<typeof meta>
18
+
19
+ export const Default: Story = {
20
+ render: () => (
21
+ <Checkbox />
22
+ )
23
+ }
24
+
25
+ export const CheckboxWithText: Story = {
26
+ render: () => (
27
+ <div className="items-top flex space-x-2">
28
+ <Checkbox id="terms1" />
29
+ <div className="grid gap-1.5 leading-none">
30
+ <label
31
+ htmlFor="terms1"
32
+ className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
33
+ >
34
+ Accept terms and conditions
35
+ </label>
36
+ <p className="text-sm text-muted-foreground">
37
+ You agree to our Terms of Service and Privacy Policy.
38
+ </p>
39
+ </div>
40
+ </div>
41
+ )
42
+ }
43
+
44
+ export const Disabled: Story = {
45
+ render: () => (
46
+ <div className="flex items-center space-x-2">
47
+ <Checkbox id="terms2" disabled />
48
+ <label
49
+ htmlFor="terms2"
50
+ className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
51
+ >
52
+ Accept terms and conditions
53
+ </label>
54
+ </div>
55
+ )
56
+ }
@@ -0,0 +1,58 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Collapsible,
5
+ CollapsibleTrigger,
6
+ CollapsibleContent
7
+ } from "./collapsible"
8
+ import {
9
+ Button
10
+ } from "./button"
11
+
12
+ import { ChevronsUpDown } from 'lucide-react'
13
+
14
+ const meta = {
15
+ title: "Components/Collapsible",
16
+ component: Collapsible,
17
+ parameters: {
18
+ layout: "centered",
19
+ },
20
+ tags: ["autodocs"],
21
+ } satisfies Meta<typeof Collapsible>
22
+
23
+ export default meta
24
+ type Story = StoryObj<typeof meta>
25
+
26
+ export const Default: Story = {
27
+ render: () => (
28
+ <Collapsible
29
+ open={ false }
30
+ className="w-[350px] space-y-2"
31
+ >
32
+ <div className="flex items-center justify-between space-x-4 px-4">
33
+ <h4 className="text-sm font-semibold">
34
+ @peduarte starred 3 repositories
35
+ </h4>
36
+ <CollapsibleTrigger asChild>
37
+ <Button variant="ghost" size="sm">
38
+ <ChevronsUpDown className="h-4 w-4" />
39
+ <span className="sr-only">Toggle</span>
40
+ </Button>
41
+ </CollapsibleTrigger>
42
+ </div>
43
+ <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
44
+ @radix-ui/primitives
45
+ </div>
46
+ <CollapsibleContent className="space-y-2">
47
+ <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
48
+ @radix-ui/colors
49
+ </div>
50
+ <div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">
51
+ @stitches/react
52
+ </div>
53
+ </CollapsibleContent>
54
+ </Collapsible>
55
+ )
56
+ }
57
+
58
+
@@ -0,0 +1,34 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ ContextMenu,
5
+ ContextMenuContent,
6
+ ContextMenuItem,
7
+ ContextMenuTrigger,
8
+ } from "./context-menu"
9
+
10
+ const meta = {
11
+ title: "Components/ContextMenu",
12
+ component: ContextMenu,
13
+ parameters: {
14
+ layout: "centered",
15
+ },
16
+ tags: ["autodocs"],
17
+ } satisfies Meta<typeof ContextMenu>
18
+
19
+ export default meta
20
+ type Story = StoryObj<typeof meta>
21
+
22
+ export const Default: Story = {
23
+ render: () => (
24
+ <ContextMenu>
25
+ <ContextMenuTrigger>Right click</ContextMenuTrigger>
26
+ <ContextMenuContent>
27
+ <ContextMenuItem>Profile</ContextMenuItem>
28
+ <ContextMenuItem>Billing</ContextMenuItem>
29
+ <ContextMenuItem>Team</ContextMenuItem>
30
+ <ContextMenuItem>Subscription</ContextMenuItem>
31
+ </ContextMenuContent>
32
+ </ContextMenu>
33
+ )
34
+ }
@@ -0,0 +1,40 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Dialog,
5
+ DialogTrigger,
6
+ DialogContent,
7
+ DialogHeader,
8
+ DialogTitle,
9
+ DialogDescription,
10
+ } from "./dialog"
11
+
12
+ const meta = {
13
+ title: "Components/Dialog",
14
+ component: Dialog,
15
+ parameters: {
16
+ layout: "centered",
17
+ },
18
+ tags: ["autodocs"],
19
+ } satisfies Meta<typeof Dialog>
20
+
21
+ export default meta
22
+ type Story = StoryObj<typeof meta>
23
+
24
+ export const Default: Story = {
25
+ render: () => (
26
+ <Dialog>
27
+ <DialogTrigger>Open</DialogTrigger>
28
+ <DialogContent>
29
+ <DialogHeader>
30
+ <DialogTitle>Are you absolutely sure?</DialogTitle>
31
+ <DialogDescription>
32
+ This action cannot be undone. This will permanently delete your account
33
+ and remove your data from our servers.
34
+ </DialogDescription>
35
+ </DialogHeader>
36
+ </DialogContent>
37
+ </Dialog>
38
+ )
39
+ }
40
+
@@ -0,0 +1,48 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Drawer,
5
+ DrawerClose,
6
+ DrawerContent,
7
+ DrawerDescription,
8
+ DrawerFooter,
9
+ DrawerHeader,
10
+ DrawerTitle,
11
+ DrawerTrigger,
12
+ } from "./drawer"
13
+ import {
14
+ Button
15
+ } from './button'
16
+
17
+ const meta = {
18
+ title: "Components/Drawer",
19
+ component: Drawer,
20
+ parameters: {
21
+ layout: "centered",
22
+ },
23
+ tags: ["autodocs"],
24
+ } satisfies Meta<typeof Drawer>
25
+
26
+ export default meta
27
+ type Story = StoryObj<typeof meta>
28
+
29
+ export const Default: Story = {
30
+ render: () => (
31
+ <Drawer>
32
+ <DrawerTrigger>Open</DrawerTrigger>
33
+ <DrawerContent>
34
+ <DrawerHeader>
35
+ <DrawerTitle>Are you absolutely sure?</DrawerTitle>
36
+ <DrawerDescription>This action cannot be undone.</DrawerDescription>
37
+ </DrawerHeader>
38
+ <DrawerFooter>
39
+ <Button>Submit</Button>
40
+ <DrawerClose>
41
+ <Button variant="outline">Cancel</Button>
42
+ </DrawerClose>
43
+ </DrawerFooter>
44
+ </DrawerContent>
45
+ </Drawer>
46
+ )
47
+ }
48
+
@@ -0,0 +1,31 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ HoverCard,
5
+ HoverCardContent,
6
+ HoverCardTrigger,
7
+ } from "./hover-card"
8
+
9
+ const meta = {
10
+ title: "Components/HoverCard",
11
+ component: HoverCard,
12
+ parameters: {
13
+ layout: "centered",
14
+ },
15
+ tags: ["autodocs"],
16
+ } satisfies Meta<typeof HoverCard>
17
+
18
+ export default meta
19
+ type Story = StoryObj<typeof meta>
20
+
21
+ export const Default: Story = {
22
+ render: () => (
23
+ <HoverCard>
24
+ <HoverCardTrigger>Hover</HoverCardTrigger>
25
+ <HoverCardContent>
26
+ The React Framework – created and maintained by @vercel.
27
+ </HoverCardContent>
28
+ </HoverCard>
29
+ )
30
+ }
31
+
@@ -0,0 +1,63 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Input
5
+ } from "./input"
6
+ import {
7
+ Button
8
+ } from './button'
9
+ import {
10
+ Label
11
+ } from './label'
12
+
13
+ const meta = {
14
+ title: "Components/Input",
15
+ component: Input,
16
+ parameters: {
17
+ layout: "centered",
18
+ },
19
+ tags: ["autodocs"],
20
+ } satisfies Meta<typeof Input>
21
+
22
+ export default meta
23
+ type Story = StoryObj<typeof meta>
24
+
25
+ export const Default: Story = {
26
+ render: () => (
27
+ <Input type="email" placeholder="Email" />
28
+ )
29
+ }
30
+
31
+ export const File: Story = {
32
+ render: () => (
33
+ <div className="grid w-full max-w-sm items-center gap-1.5">
34
+ <Label htmlFor="picture">Picture</Label>
35
+ <Input id="picture" type="file" />
36
+ </div>
37
+ )
38
+ }
39
+
40
+ export const Disabled: Story = {
41
+ render: () => (
42
+ <Input disabled type="email" placeholder="Email" />
43
+ )
44
+ }
45
+
46
+ export const WithLabel: Story = {
47
+ render: () => (
48
+ <div className="grid w-full max-w-sm items-center gap-1.5">
49
+ <Label htmlFor="email">Email</Label>
50
+ <Input type="email" id="email" placeholder="Email" />
51
+ </div>
52
+ )
53
+ }
54
+
55
+ export const WithButton: Story = {
56
+ render: () => (
57
+ <div className="flex w-full max-w-sm items-center space-x-2">
58
+ <Input type="email" placeholder="Email" />
59
+ <Button type="submit">Subscribe</Button>
60
+ </div>
61
+ )
62
+ }
63
+