-
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.
Designsystem chromatic deploy add and a11y testing add (#38)
* ๐ Typescript and prettier version up and little change * โจ Generate arg types utilfunction add * โจ Button ์ปดํฌ๋ํธ ์ ์ ์๋ฃ * โจ Font ์ค์ ์ถ๊ฐ * ๐ง Font ์์๋ง๊ฒ ์ ๋ ฌ * โ Radix alert dialog dependency add * ๐ง Alertdialog ์์ * โจ ํด๋ ๊ตฌ์กฐ ์ ๋ฆฝ * โจ Jsx a11y addon add * โจ Chromatic deploy add * ๐ง ๋ฃจํธ์์ ์คํํ๋๋ก ๋ณ๊ฒฝ * ๐ง ๊ถ์ฅ์ ๋ง์ถ์ด checkoutv1๋ก ๋ค์ด๊ทธ๋ ์ด๋ * ๐ง Token workspace ๋ฒ์ ์ ์ฐ๋๋ก ๋ณ๊ฒฝ * ๐ง Eslint rule import/no-unresolved off * ๐ง Auto accept change option add * ๐ง Chromatic flow wใ ๊ฑฐ * ๐ง Chromatic ci ์ค์ ๋ณ๊ฒฝ * ๐ง Chromatic install ์ต์ ๋ณ๊ฒฝ * ๐ง Packagejosn qusrud * ๐ง Working directory ์ถ๊ฐ * ๐ง Token reoslve * ๐ง Chromatic * ๐ง Chromatic ์๋์ผ๋ก ๋ณ๊ฒฝ * ๐ง Env์ค์ ๋ณ๊ฒฝ * ๐ง Working directory wใ ๊ฑฐ * ๐ง Build ๋ฌธ์ ์ธ๊ฐ ์ถ์ด์ ์ถ๊ฐ * ๐ง Pullrequest ์กฐ๊ฑด ์ถ๊ฐ * ๐ง ์ ๋ถ ๋น๋ํ๋๊ฑด ๋นํจ์จ์ ์ด์ด์ token ๋ง ๋น๋ * ๐ง Dependency resolve
- Loading branch information
Showing
33 changed files
with
1,575 additions
and
118 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
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,36 @@ | ||
name: 'Chromatic' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '/packages/design-system' | ||
|
||
env: | ||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
|
||
jobs: | ||
chromatic: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: build all | ||
run: yarn token build | ||
|
||
- name: Run Chromatic | ||
run: yarn chromatic |
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 |
---|---|---|
|
@@ -21,3 +21,6 @@ coverage | |
*storybook.log | ||
|
||
.env.local | ||
storybook-static | ||
|
||
.env |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ module.exports = { | |
'^~widget/(.*)$', | ||
'^~page/(.*)$', | ||
'^~app/(.*)$', | ||
'^~/(.*)$', | ||
'^[./]', | ||
'^[../]', | ||
], | ||
|
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
Empty file.
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
26 changes: 26 additions & 0 deletions
26
packages/design-system/src/components/alert-dialog/alert-dialog.tsx
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,26 @@ | ||
import React, { forwardRef } from 'react'; | ||
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; | ||
import { cn } from '../../utils/cn'; | ||
const AlertDialogRoot = AlertDialogPrimitive.Root; | ||
|
||
const AlertDialogTrigger = AlertDialogPrimitive.Trigger; | ||
|
||
const AlertDialogPortal = AlertDialogPrimitive.Portal; | ||
|
||
const AlertDialogOverlay = forwardRef< | ||
React.ElementRef<typeof AlertDialogPrimitive.Overlay>, | ||
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay> | ||
>(({ className, ...props }, ref) => { | ||
return <AlertDialogPrimitive.Overlay ref={ref} className={cn(className)} {...props} />; | ||
}); | ||
|
||
AlertDialogOverlay.displayName = 'AlertDialogOverlay'; | ||
|
||
const AlertDialogContent = forwardRef< | ||
React.ElementRef<typeof AlertDialogPrimitive.Content>, | ||
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> | ||
>(({ className, ...props }, ref) => { | ||
return <AlertDialogContent ref={ref} className={cn(className)} {...props} />; | ||
}); | ||
|
||
AlertDialogContent.displayName = 'ALertDialogContent'; |
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 * from './alert-dialog'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
packages/design-system/src/components/button/button.stories.tsx
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,58 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { argTypes } from '../../utils/arg-types'; | ||
import { Button } from './button'; | ||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export | ||
const selectListRounded = ['default', 'xs', 'sm', 'md', 'xl', 'full'] as const; | ||
const selectListSize = ['full', 'half', 'none'] as const; | ||
const selectListPress = ['default', 'press'] as const; | ||
const selectListVariants = [ | ||
'primary', | ||
'secondary', | ||
'tetiary', | ||
'ghost', | ||
'danger-primary', | ||
'danger-secondary', | ||
'danger-tetiary', | ||
'danger-ghost', | ||
'neutral-primary', | ||
'neutral-secondary', | ||
'neutral-tetiory', | ||
'neutral-ghost', | ||
'neutral-focus-ghost', | ||
] as const; | ||
|
||
const meta = { | ||
title: 'Xds/Button', | ||
component: Button, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: 'centered', | ||
}, | ||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs | ||
tags: ['autodocs'], | ||
// More on argTypes: https://storybook.js.org/docs/api/argtypes | ||
argTypes: { | ||
variant: argTypes({ control: 'select', options: selectListVariants }), | ||
size: argTypes({ control: 'select', options: selectListSize }), | ||
press: argTypes({ control: 'select', options: selectListPress }), | ||
rounded: argTypes({ control: 'select', options: selectListRounded }), | ||
disabled: argTypes({ control: 'boolean' }), | ||
slot: argTypes({ control: 'text' }), | ||
slotDirection: argTypes({ control: 'select', options: ['start', 'end', 'none'] }), | ||
}, | ||
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args | ||
args: { variant: 'primary' }, | ||
} satisfies Meta<typeof Button>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const PrimaryButton: Story = { | ||
args: { | ||
children: 'button', | ||
variant: 'primary', | ||
rounded: 'default', | ||
size: 'full', | ||
press: 'default', | ||
}, | ||
}; |
Oops, something went wrong.