Skip to content

Commit

Permalink
feat: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanyawat-Arsaga committed Oct 24, 2024
1 parent 073e5c5 commit 1614e46
Show file tree
Hide file tree
Showing 119 changed files with 27,003 additions and 6,519 deletions.
19,690 changes: 19,690 additions & 0 deletions apps/api/package-lock.json

Large diffs are not rendered by default.

54 changes: 28 additions & 26 deletions apps/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"prepare": "panda codegen",
"prepare": "pnpm codegen:panda",
"codegen": "graphql-codegen",
"codegen:prod": "graphql-codegen -c codegen.prod.yml",
"codegen:panda": "panda codegen",
"codegen:park-ui": "pnpx @park-ui/cli components add --all",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"compile": "tsc --pretty --noEmit",
Expand All @@ -19,43 +21,43 @@
"fix:all": "pnpm lint:fix && pnpm format:fix"
},
"dependencies": {
"@ark-ui/react": "^3.3.0",
"@astrojs/check": "^0.7.0",
"@astrojs/netlify": "^5.3.5",
"@astrojs/react": "^3.6.0",
"@astropub/md": "^0.4.0",
"@types/lodash": "^4.17.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.11.5",
"date-fns": "^3.6.0",
"eslint-plugin-astro": "^1.2.2",
"fets": "^0.8.1",
"@ark-ui/react": "^4.1.2",
"@astrojs/check": "^0.9.4",
"@astrojs/netlify": "^5.5.4",
"@astrojs/react": "^3.6.2",
"@astropub/md": "^1.0.0",
"@types/lodash": "^4.17.12",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.7",
"date-fns": "^4.1.0",
"eslint-plugin-astro": "^1.3.0",
"fets": "^0.8.3",
"front-matter": "^4.0.2",
"lodash": "^4.17.21",
"mdast-util-from-markdown": "^2.0.1",
"mdast-util-gfm": "^3.0.0",
"micromark-extension-gfm": "^3.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
"react-icons": "^5.3.0",
"react-markdown": "^9.0.1",
"remark-gfm": "^4.0.0",
"remark-textr": "^6.1.0",
"typescript": "^5.5.3"
"typescript": "^5.6.3"
},
"devDependencies": {
"@pandabox/prettier-plugin": "^0.1.3",
"@pandacss/dev": "^0.41.0",
"@pandacss/eslint-plugin": "^0.1.9",
"@pandacss/studio": "^0.41.0",
"@pandacss/types": "0.41.0",
"@park-ui/panda-preset": "^0.38.1",
"@typescript-eslint/parser": "^7.15.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"prettier": "^3.3.2",
"prettier-plugin-astro": "^0.14.0"
"@pandacss/dev": "^0.47.0",
"@pandacss/eslint-plugin": "^0.2.0",
"@pandacss/studio": "^0.47.0",
"@pandacss/types": "0.47.0",
"@park-ui/panda-preset": "^0.42.0",
"@typescript-eslint/parser": "^8.11.0",
"eslint-plugin-jsx-a11y": "^6.10.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1"
}
}
11 changes: 3 additions & 8 deletions apps/astro/park-ui.json
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"
}
2 changes: 1 addition & 1 deletion apps/astro/src/components/common/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
import { Grid, GridItem, Stack, styled } from 'styled-system/jsx';
import * as _Carousel from '~/components/ui/carousel';
import { Carousel as _Carousel } from '~/components/ui/carousel';
import { IconButton } from '~/components/ui/icon-button';

export const Carousel = (props: _Carousel.RootProps & { images: string[] }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/astro/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FaList, FaTimes } from 'react-icons/fa';
import { Divider, Stack } from 'styled-system/jsx';
import * as Drawer from '~/components/ui/drawer';
import { Drawer } from '~/components/ui/drawer';
import { Languages, languages } from '~/i18n/ui';
import { useTranslations } from '~/i18n/utils';
import { IconButton } from '../ui/icon-button';
Expand Down
2 changes: 1 addition & 1 deletion apps/astro/src/components/lib/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import remarkTextr from 'remark-textr';
import { Divider, Stack, styled } from 'styled-system/jsx';
import { Heading } from '../ui/heading';
import { Link } from '../ui/link';
import * as Table from '../ui/table';
import { Table } from '../ui/table';
import { Text } from '../ui/text';

// https://github.com/remarkjs/react-markdown
Expand Down
47 changes: 1 addition & 46 deletions apps/astro/src/components/ui/accordion.tsx
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'
33 changes: 1 addition & 32 deletions apps/astro/src/components/ui/alert.tsx
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'
26 changes: 7 additions & 19 deletions apps/astro/src/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
import type { Assign } from '@ark-ui/react'
import { Avatar as ArkAvatar } from '@ark-ui/react/avatar'
import { forwardRef } from 'react'
import { css, cx } from 'styled-system/css'
import { splitCssProps } from 'styled-system/jsx'
import { type AvatarVariantProps, avatar } from 'styled-system/recipes'
import type { JsxStyleProps } from 'styled-system/types'
import * as StyledAvatar from './styled/avatar'

export interface AvatarProps
extends Assign<JsxStyleProps, ArkAvatar.RootProps>,
AvatarVariantProps {
export interface AvatarProps extends StyledAvatar.RootProps {
name?: string
src?: string
}

export const Avatar = forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {
const [variantProps, avatarProps] = avatar.splitVariantProps(props)
const [cssProps, localProps] = splitCssProps(avatarProps)
const { name, src, className, ...rootProps } = localProps
const styles = avatar(variantProps)
const { name, src, ...rootProps } = props

return (
<ArkAvatar.Root ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>
<ArkAvatar.Fallback className={styles.fallback}>
{getInitials(name) || <UserIcon />}
</ArkAvatar.Fallback>
<ArkAvatar.Image className={styles.image} src={src} alt={name} />
</ArkAvatar.Root>
<StyledAvatar.Root ref={ref} {...rootProps}>
<StyledAvatar.Fallback>{getInitials(name) || <UserIcon />}</StyledAvatar.Fallback>
<StyledAvatar.Image src={src} alt={name} />
</StyledAvatar.Root>
)
})

Expand Down
9 changes: 1 addition & 8 deletions apps/astro/src/components/ui/badge.tsx
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'
50 changes: 40 additions & 10 deletions apps/astro/src/components/ui/button.tsx
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>
)
38 changes: 1 addition & 37 deletions apps/astro/src/components/ui/card.tsx
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'
Loading

0 comments on commit 1614e46

Please sign in to comment.