-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
break box into multiple components and remove typescript path aliases
- Loading branch information
1 parent
df1bacb
commit e62e274
Showing
68 changed files
with
360 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
|
||
import { H5 } from "../../typography/Heading" | ||
import { Paragraph } from "../../typography/Paragraph" | ||
|
||
import { Accordion } from "./Accordion" | ||
|
||
type Story = StoryObj<typeof Accordion> | ||
|
||
// Meta | ||
export default { | ||
title: "UI/Accordion", | ||
component: Accordion, | ||
args: { | ||
...Accordion.defaultProps, | ||
style: { width: 300 }, | ||
children: ( | ||
<Accordion.Item value="1"> | ||
<Accordion.Trigger className="flex items-center justify-between"> | ||
<H5>Accordion Trigger</H5> | ||
</Accordion.Trigger> | ||
|
||
<Accordion.Content> | ||
<Paragraph> | ||
Excepteur quis Lorem ad labore excepteur qui. Ut aliquip officia dolor pariatur nulla. | ||
Amet dolore veniam commodo irure id. Aliqua anim mollit ullamco eiusmod do ad. Non | ||
commodo est amet. Velit eu eu nostrud. Culpa ullamco aliqua ex. Duis ipsum in incididunt | ||
laboris. | ||
</Paragraph> | ||
</Accordion.Content> | ||
</Accordion.Item> | ||
), | ||
}, | ||
} satisfies Meta | ||
|
||
// Stories | ||
export const Default = { | ||
args: {}, | ||
} satisfies Story |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as AccordionPrimitive from "@radix-ui/react-accordion" | ||
import { forwardRef } from "react" | ||
import type { ComponentPropsWithoutRef, ElementRef } from "react" | ||
|
||
import { cx } from "../../shared" | ||
|
||
import { accordionVariants } from "./Accordion.variants" | ||
|
||
export const AccordionContent = forwardRef< | ||
ElementRef<typeof AccordionPrimitive.Content>, | ||
ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> | ||
>(({ className, ...props }, ref) => ( | ||
<AccordionPrimitive.Content | ||
ref={ref} | ||
className={cx(accordionVariants({ className }), className)} | ||
{...props} | ||
/> | ||
)) | ||
|
||
AccordionContent.displayName = AccordionPrimitive.Content.displayName | ||
|
||
export const Accordion = Object.assign(AccordionPrimitive.Root, { | ||
Item: AccordionPrimitive.Item, | ||
Trigger: AccordionPrimitive.Trigger, | ||
Content: AccordionContent, | ||
}) | ||
|
||
Accordion.defaultProps = { | ||
collapsible: true, | ||
type: "single", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { cva } from "../../shared" | ||
|
||
export const accordionVariants = cva({ | ||
base: [ | ||
"overflow-hidden transition-all", | ||
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Accordion } from "./Accordion" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
|
||
import { Backdrop } from "./Backdrop" | ||
|
||
type Story = StoryObj<typeof Backdrop> | ||
|
||
// Meta | ||
export default { | ||
title: "UI/Backdrop", | ||
component: Backdrop, | ||
args: { | ||
...Backdrop.defaultProps, | ||
}, | ||
} satisfies Meta | ||
|
||
// Stories | ||
export const Default = { | ||
args: {}, | ||
} satisfies Story |
Oops, something went wrong.