-
Notifications
You must be signed in to change notification settings - Fork 11
feat(AlertDialog): add new AlertDialog composites
#725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
noahchoii
wants to merge
89
commits into
main
Choose a base branch
from
feature/vapor-258
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 85 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
0896d48
install rolldown & remove rollup-related dependencies
noahchoii 00de410
migrate from rollup to rolldown
noahchoii d918c3e
remove get-tsconfig
noahchoii 8b247e4
format
noahchoii 5b361ae
remove build:rollup
noahchoii f60ff1d
split tsconfig according to scope
noahchoii 0047235
edit ts-api-extractor integrations
noahchoii 8e7efeb
Merge branch 'main' into rolldown
noahchoii a95fb75
Merge branch 'main' into rolldown
noahchoii 7729185
cleanup tsconfig
noahchoii c674ee3
unify tsconfig
noahchoii 94af759
disallow js in tsconfig, unify include with "."
noahchoii dc119dd
add .storybook
noahchoii d5f29ef
add hooks tsconfig exclude
noahchoii c53fe07
edit core tsconfig path from ts-api-extractor
noahchoii ee1b78a
edit ts-api-extractor constants
noahchoii 9c85d19
add test case for default paths
noahchoii 525240f
remove path test
noahchoii 1258eb9
edit execution of ts-api-extractor test command
noahchoii fec56fc
add `@vapor-ui/composites` package
noahchoii 48d53d5
split rolldown-config
noahchoii 7a7e618
adjust rolldown configs to core/composites
noahchoii a716b09
add new `Dialog` composites
noahchoii 94844fd
resolve storybook alias
noahchoii a309585
edit dialog style
noahchoii 9a8e0e5
propagate slots props
noahchoii f29bcf7
add size prop & export with ts namespace
noahchoii 193e20f
adjust rsc
noahchoii 8bbc9b1
Merge branch 'main' into new-composites-package
noahchoii bc16436
fix: build dts for esm, cjs
noahchoii 36d8651
add convention docs
noahchoii 22edd97
adjust conventions.md for claude.md
noahchoii 3c8edf7
add changeset
noahchoii 83e4a76
adjust rolldown-config for core package
noahchoii 91c48c3
format
noahchoii 8776117
edit composites regressions port number
noahchoii 4bef67b
update snapshots
noahchoii 04e9e77
correct rolldown output type
noahchoii 1989a30
notice resolve alias to bundler
noahchoii af65f87
replace visual into variants
noahchoii 55fb0a4
add eslint & exec lint
noahchoii a89a31b
escape dot when find vapor.xxx layer
noahchoii e0ad52a
lint & format
noahchoii 5cf01fc
remove footer & export assistive, action prop
noahchoii 73079bf
infer slots prop types
noahchoii 202d52b
ajdust design feedback
noahchoii 2589af6
replace padding into margin
noahchoii 0d1dbbe
early return when not exist render
noahchoii 7172c1b
Merge branch 'main' into new-composites-package
noahchoii da37aa6
code-review
noahchoii 0be04f5
code-review
noahchoii 6843654
refactor dialog interface
noahchoii 42b39e1
replace CONVENTIONS.md into rules
noahchoii 3d04478
refactor action & assistive interface
noahchoii 6f0d3f4
Merge branch 'main' into new-composites-package
noahchoii 0840709
add manual close example to dialog stories
noahchoii 65c2c28
apply Dialog Root naming to JSDoc
noahchoii 0adef44
remove render prop example on actions
noahchoii 23a7dcf
enhance create-slots early return conditions
noahchoii c9b7803
omit variants props from Action, Assistive
noahchoii 008b144
Merge branch 'main' into new-composites-package
noahchoii 74a8557
remove not found plugin
noahchoii bec0c26
add alert-dialog
noahchoii 68aed96
edit alert-dialog description style
noahchoii f93b17d
update snapshots
noahchoii cb40e98
edit alert-dialog widths
noahchoii a0f966e
add changeset
noahchoii e5a82c7
add composites alert-dialog
noahchoii ba70f9f
add changeset
noahchoii 8f31bfa
edit dialog type values
noahchoii 80594d1
change some props to required
noahchoii 231da20
change info type prop name to confirm
noahchoii 1a2b044
apply alert-dialog style change
noahchoii c77214a
Merge branch 'main' into feature/vapor-258
noahchoii aa73303
update snapshots
noahchoii 6cccd96
add alert-dialog header
noahchoii 601cbce
apply core alert-dialog changes to composites
noahchoii 4103db2
export alert-dialog
noahchoii 6689099
update snapshots
noahchoii 08301f0
add sha in regressions reports comment
noahchoii 9c99818
allow number 0 for children
noahchoii 58b75e3
edit alert-dialog header comments
noahchoii dd11e22
add alert-dialog code-connect
noahchoii 88722c4
edit SHA_FULL to github.sha
noahchoii 54265e4
Merge branch 'main' into feature/vapor-258
noahchoii 9fcd46a
update changeset
noahchoii 840c429
edit semantic naming
noahchoii 61f47db
format
noahchoii 0ee313b
Merge branch 'main' into feature/vapor-258
noahchoii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
| --- | ||
| '@vapor-ui/composites': patch | ||
| --- | ||
|
|
||
| add composite `AlertDialog` component | ||
This file contains hidden or 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
43 changes: 43 additions & 0 deletions
43
packages/composites/src/components/alert-dialog/alert-dialog.figma.ts
This file contains hidden or 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,43 @@ | ||
| // url=https://www.figma.com/design/he4tiAGOKGPl0Fm56ZpJsy/-Composites--Vapor-Design-System?node-id=2359-50676&t=TnnpGTYHBh9MjPQH-11 | ||
| // source=src/components/alert-dialog/alert-dialog.tsx | ||
| // component=AlertDialog | ||
| import figma from 'figma'; | ||
|
|
||
| import { getProperties } from '../../utils/figma-utils'; | ||
|
|
||
| const instance = figma.selectedInstance; | ||
|
|
||
| const popup = getProperties(instance, '(Popup)', { | ||
| type: { kind: 'enum', name: 'type', options: { critical: 'critical', confirm: 'confirm' } }, | ||
| }); | ||
|
|
||
| const header = getProperties(instance, '(Header)', { | ||
| description: { kind: 'string', name: 'description' }, | ||
| title: { kind: 'string', name: 'title' }, | ||
| }); | ||
|
|
||
| const body = getProperties(instance, '(Body)', { | ||
| children: { kind: 'slot', name: '(content)' }, | ||
| }); | ||
|
|
||
| const footer = getProperties(instance, '(Footer)', { | ||
| cancel: { kind: 'instance', name: 'Cancel' }, | ||
| action: { kind: 'instance', name: 'Action' }, | ||
| }); | ||
|
|
||
| export default { | ||
| example: figma.code` | ||
| <AlertDialog.Root | ||
| ${popup.type} | ||
| ${header.description} | ||
| ${header.title} | ||
| ${footer.cancel} | ||
| ${footer.action} | ||
|
noahchoii marked this conversation as resolved.
|
||
| > | ||
| ${body.children} | ||
| </AlertDialog.Root> | ||
| `, | ||
| imports: ['import { AlertDialog } from "@vapor-ui/composites"'], | ||
| id: 'alert-dialog', | ||
| metadata: { nestable: false }, | ||
| }; | ||
38 changes: 38 additions & 0 deletions
38
packages/composites/src/components/alert-dialog/alert-dialog.stories.tsx
This file contains hidden or 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,38 @@ | ||
| import type { Meta, StoryObj } from '@storybook/react-vite'; | ||
| import { Button } from '@vapor-ui/core'; | ||
|
|
||
| import { AlertDialog } from '.'; | ||
|
|
||
| export default { | ||
| title: 'Composites/AlertDialog', | ||
| component: AlertDialog.Root, | ||
| argTypes: { | ||
| type: { control: 'inline-radio', options: ['critical', 'confirm'] }, | ||
| title: { control: 'text' }, | ||
| description: { control: 'text' }, | ||
| }, | ||
| } satisfies Meta<typeof AlertDialog.Root>; | ||
|
|
||
| type Story = StoryObj<typeof AlertDialog.Root>; | ||
|
|
||
| export const Default: Story = { | ||
| args: { | ||
| type: 'critical', | ||
| title: '이 항목을 삭제할까요?', | ||
| description: '삭제하면 되돌릴 수 없습니다. 연결된 기록도 함께 사라집니다.', | ||
| }, | ||
| render: ({ | ||
| action = <AlertDialog.Action>Remove</AlertDialog.Action>, | ||
| cancel = <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>, | ||
| ...args | ||
| }) => { | ||
| return ( | ||
| <AlertDialog.Root | ||
| trigger={<Button>트리거</Button>} | ||
| cancel={cancel} | ||
| action={action} | ||
| {...args} | ||
| /> | ||
| ); | ||
| }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core component alert dialog header component part가 추가된 것 같습니다.! 이 부분도 추가하면 어떨까요? 그리고 composite도 alert component가 추가되었으니 minor로 가면 어떨까요?
파일을 그럼 분리해서 두 개 추가해야 할 듯 합니다.!