-
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.
- Loading branch information
1 parent
073e5c5
commit 1614e46
Showing
119 changed files
with
27,003 additions
and
6,519 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
{ | ||
"$schema": "https://park-ui.com/schema.json", | ||
"cssFramework": "panda", | ||
"$schema": "https://park-ui.com/registry/latest/schema.json", | ||
"jsFramework": "react", | ||
"importAliases": { | ||
"components": "~/components/ui", | ||
"utils": "~/lib" | ||
}, | ||
"useReactServerComponents": true | ||
} | ||
"outputPath": "./src/components/ui" | ||
} |
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 |
---|---|---|
@@ -1,46 +1 @@ | ||
'use client' | ||
|
||
import type { Assign } from '@ark-ui/react' | ||
import { Accordion } from '@ark-ui/react/accordion' | ||
import { type AccordionVariantProps, accordion } from 'styled-system/recipes' | ||
import type { JsxStyleProps } from 'styled-system/types' | ||
import { createStyleContext } from '~/lib/create-style-context' | ||
|
||
const { withProvider, withContext } = createStyleContext(accordion) | ||
|
||
export interface RootProps | ||
extends Assign<JsxStyleProps, Accordion.RootProps>, | ||
AccordionVariantProps {} | ||
export const Root = withProvider<HTMLDivElement, RootProps>(Accordion.Root, 'root') | ||
|
||
export const ItemContent = withContext< | ||
HTMLDivElement, | ||
Assign<JsxStyleProps, Accordion.ItemContentProps> | ||
>(Accordion.ItemContent, 'itemContent') | ||
|
||
export const ItemIndicator = withContext< | ||
HTMLDivElement, | ||
Assign<JsxStyleProps, Accordion.ItemIndicatorProps> | ||
>(Accordion.ItemIndicator, 'itemIndicator') | ||
|
||
export const Item = withContext<HTMLDivElement, Assign<JsxStyleProps, Accordion.ItemProps>>( | ||
Accordion.Item, | ||
'item', | ||
) | ||
|
||
export const ItemTrigger = withContext< | ||
HTMLButtonElement, | ||
Assign<JsxStyleProps, Accordion.ItemTriggerProps> | ||
>(Accordion.ItemTrigger, 'itemTrigger') | ||
|
||
export { | ||
AccordionContext as Context, | ||
AccordionItemContext as ItemContext, | ||
type AccordionContextProps as ContextProps, | ||
type AccordionItemContextProps as ItemContextProps, | ||
} from '@ark-ui/react/accordion' | ||
|
||
export type { | ||
AccordionFocusChangeDetails as FocusChangeDetails, | ||
AccordionValueChangeDetails as ValueChangeDetails, | ||
} from '@ark-ui/react/accordion' | ||
export * as Accordion from './styled/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1 @@ | ||
'use client' | ||
|
||
import type { Assign } from '@ark-ui/react' | ||
import { type HTMLArkProps, ark } from '@ark-ui/react/factory' | ||
import { type AlertVariantProps, alert } from 'styled-system/recipes' | ||
import type { JsxStyleProps } from 'styled-system/types' | ||
import { createStyleContext } from '~/lib/create-style-context' | ||
|
||
const { withProvider, withContext } = createStyleContext(alert) | ||
|
||
export interface RootProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, AlertVariantProps {} | ||
export const Root = withProvider<HTMLDivElement, RootProps>(ark.div, 'root') | ||
|
||
export const Content = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.div, | ||
'content', | ||
) | ||
|
||
export const Description = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.div, | ||
'description', | ||
) | ||
|
||
export const Icon = withContext<HTMLOrSVGElement, Assign<JsxStyleProps, HTMLArkProps<'svg'>>>( | ||
ark.svg, | ||
'icon', | ||
) | ||
|
||
export const Title = withContext<HTMLHeadingElement, Assign<JsxStyleProps, HTMLArkProps<'h5'>>>( | ||
ark.h5, | ||
'title', | ||
) | ||
export * as Alert from './styled/alert' |
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 |
---|---|---|
@@ -1,8 +1 @@ | ||
import type { Assign } from '@ark-ui/react' | ||
import { type HTMLArkProps, ark } from '@ark-ui/react/factory' | ||
import { styled } from 'styled-system/jsx' | ||
import { type BadgeVariantProps, badge } from 'styled-system/recipes' | ||
import type { JsxStyleProps } from 'styled-system/types' | ||
|
||
export interface BadgeProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, BadgeVariantProps {} | ||
export const Badge = styled(ark.div, badge) | ||
export { Badge, type BadgeProps } from './styled/badge' |
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 |
---|---|---|
@@ -1,10 +1,40 @@ | ||
import type { Assign } from '@ark-ui/react' | ||
import { type HTMLArkProps, ark } from '@ark-ui/react/factory' | ||
import { styled } from 'styled-system/jsx' | ||
import { type ButtonVariantProps, button } from 'styled-system/recipes' | ||
import type { JsxStyleProps } from 'styled-system/types' | ||
|
||
export interface ButtonProps | ||
extends Assign<JsxStyleProps, HTMLArkProps<'button'>>, | ||
ButtonVariantProps {} | ||
export const Button = styled(ark.button, button) | ||
import { forwardRef } from 'react' | ||
import { Center, styled } from 'styled-system/jsx' | ||
import { Spinner } from './spinner' | ||
import { Button as StyledButton, type ButtonProps as StyledButtonProps } from './styled/button' | ||
|
||
interface ButtonLoadingProps { | ||
loading?: boolean | ||
loadingText?: React.ReactNode | ||
} | ||
|
||
export interface ButtonProps extends StyledButtonProps, ButtonLoadingProps {} | ||
|
||
export const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => { | ||
const { loading, disabled, loadingText, children, ...rest } = props | ||
|
||
const trulyDisabled = loading || disabled | ||
|
||
return ( | ||
<StyledButton disabled={trulyDisabled} ref={ref} {...rest}> | ||
{loading && !loadingText ? ( | ||
<> | ||
<ButtonSpinner /> | ||
<styled.span opacity={0}>{children}</styled.span> | ||
</> | ||
) : loadingText ? ( | ||
loadingText | ||
) : ( | ||
children | ||
)} | ||
</StyledButton> | ||
) | ||
}) | ||
|
||
Button.displayName = 'Button' | ||
|
||
const ButtonSpinner = () => ( | ||
<Center inline position="absolute" transform="translate(-50%, -50%)" top="50%" insetStart="50%"> | ||
<Spinner colorPalette="gray" /> | ||
</Center> | ||
) |
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 |
---|---|---|
@@ -1,37 +1 @@ | ||
'use client' | ||
|
||
import type { Assign } from '@ark-ui/react' | ||
import { type HTMLArkProps, ark } from '@ark-ui/react/factory' | ||
import { type CardVariantProps, card } from 'styled-system/recipes' | ||
import type { JsxStyleProps } from 'styled-system/types' | ||
import { createStyleContext } from '~/lib/create-style-context' | ||
|
||
const { withProvider, withContext } = createStyleContext(card) | ||
|
||
export interface RootProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, CardVariantProps {} | ||
export const Root = withProvider<HTMLDivElement, RootProps>(ark.div, 'root') | ||
|
||
export const Body = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.div, | ||
'body', | ||
) | ||
|
||
export const Description = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.div, | ||
'description', | ||
) | ||
|
||
export const Footer = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.footer, | ||
'footer', | ||
) | ||
|
||
export const Header = withContext<HTMLDivElement, Assign<JsxStyleProps, HTMLArkProps<'div'>>>( | ||
ark.div, | ||
'header', | ||
) | ||
|
||
export const Title = withContext<HTMLHeadingElement, Assign<JsxStyleProps, HTMLArkProps<'h3'>>>( | ||
ark.h3, | ||
'title', | ||
) | ||
export * as Card from './styled/card' |
Oops, something went wrong.