Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0896d48
install rolldown & remove rollup-related dependencies
noahchoii Jul 9, 2026
00de410
migrate from rollup to rolldown
noahchoii Jul 9, 2026
d918c3e
remove get-tsconfig
noahchoii Jul 9, 2026
8b247e4
format
noahchoii Jul 9, 2026
5b361ae
remove build:rollup
noahchoii Jul 9, 2026
f60ff1d
split tsconfig according to scope
noahchoii Jul 16, 2026
0047235
edit ts-api-extractor integrations
noahchoii Jul 16, 2026
8e7efeb
Merge branch 'main' into rolldown
noahchoii Jul 16, 2026
a95fb75
Merge branch 'main' into rolldown
noahchoii Jul 27, 2026
7729185
cleanup tsconfig
noahchoii Jul 29, 2026
c674ee3
unify tsconfig
noahchoii Jul 29, 2026
94af759
disallow js in tsconfig, unify include with "."
noahchoii Jul 30, 2026
dc119dd
add .storybook
noahchoii Jul 30, 2026
d5f29ef
add hooks tsconfig exclude
noahchoii Jul 30, 2026
c53fe07
edit core tsconfig path from ts-api-extractor
noahchoii Jul 30, 2026
ee1b78a
edit ts-api-extractor constants
noahchoii Jul 30, 2026
9c85d19
add test case for default paths
noahchoii Jul 30, 2026
525240f
remove path test
noahchoii Jul 30, 2026
1258eb9
edit execution of ts-api-extractor test command
noahchoii Jul 30, 2026
fec56fc
add `@vapor-ui/composites` package
noahchoii Aug 5, 2026
48d53d5
split rolldown-config
noahchoii Aug 7, 2026
7a7e618
adjust rolldown configs to core/composites
noahchoii Aug 7, 2026
a716b09
add new `Dialog` composites
noahchoii Aug 13, 2026
94844fd
resolve storybook alias
noahchoii Aug 13, 2026
a309585
edit dialog style
noahchoii Aug 14, 2026
9a8e0e5
propagate slots props
noahchoii Aug 18, 2026
f29bcf7
add size prop & export with ts namespace
noahchoii Aug 18, 2026
193e20f
adjust rsc
noahchoii Aug 18, 2026
8bbc9b1
Merge branch 'main' into new-composites-package
noahchoii Aug 19, 2026
bc16436
fix: build dts for esm, cjs
noahchoii Aug 19, 2026
36d8651
add convention docs
noahchoii Aug 19, 2026
22edd97
adjust conventions.md for claude.md
noahchoii Aug 19, 2026
3c8edf7
add changeset
noahchoii Aug 19, 2026
83e4a76
adjust rolldown-config for core package
noahchoii Aug 19, 2026
91c48c3
format
noahchoii Aug 19, 2026
8776117
edit composites regressions port number
noahchoii Aug 19, 2026
4bef67b
update snapshots
noahchoii Aug 19, 2026
04e9e77
correct rolldown output type
noahchoii Aug 19, 2026
1989a30
notice resolve alias to bundler
noahchoii Aug 19, 2026
af65f87
replace visual into variants
noahchoii Aug 19, 2026
55fb0a4
add eslint & exec lint
noahchoii Aug 19, 2026
a89a31b
escape dot when find vapor.xxx layer
noahchoii Aug 19, 2026
e0ad52a
lint & format
noahchoii Aug 19, 2026
5cf01fc
remove footer & export assistive, action prop
noahchoii Aug 20, 2026
73079bf
infer slots prop types
noahchoii Aug 20, 2026
202d52b
ajdust design feedback
noahchoii Aug 20, 2026
2589af6
replace padding into margin
noahchoii Aug 21, 2026
0d1dbbe
early return when not exist render
noahchoii Aug 21, 2026
7172c1b
Merge branch 'main' into new-composites-package
noahchoii Aug 21, 2026
da37aa6
code-review
noahchoii Aug 24, 2026
0be04f5
code-review
noahchoii Aug 24, 2026
6843654
refactor dialog interface
noahchoii Aug 24, 2026
42b39e1
replace CONVENTIONS.md into rules
noahchoii Aug 24, 2026
3d04478
refactor action & assistive interface
noahchoii Aug 25, 2026
6f0d3f4
Merge branch 'main' into new-composites-package
noahchoii Aug 25, 2026
0840709
add manual close example to dialog stories
noahchoii Aug 25, 2026
65c2c28
apply Dialog Root naming to JSDoc
noahchoii Aug 25, 2026
0adef44
remove render prop example on actions
noahchoii Aug 25, 2026
23a7dcf
enhance create-slots early return conditions
noahchoii Aug 25, 2026
c9b7803
omit variants props from Action, Assistive
noahchoii Aug 25, 2026
008b144
Merge branch 'main' into new-composites-package
noahchoii Aug 25, 2026
74a8557
remove not found plugin
noahchoii Aug 25, 2026
7d12595
replace basic token into $fg-hint
noahchoii Aug 26, 2026
0df1a48
add data-slots plugin
noahchoii Aug 27, 2026
09616d7
apply data-slots plugin
noahchoii Aug 27, 2026
412943c
add pnpm-lock
noahchoii Aug 27, 2026
e420566
remove @vapor-ui/core alias
noahchoii Aug 27, 2026
55298bc
cleanup
noahchoii Aug 27, 2026
01b6fcf
remove unnecessary use-client
noahchoii Aug 27, 2026
3c52055
add changeset
noahchoii Aug 27, 2026
2be4c40
Merge branch 'new-composites-package' into data-slots
noahchoii Aug 27, 2026
36e19cc
add rolldown catalog
noahchoii Aug 28, 2026
c6dcb7b
add storybook pipeline
noahchoii Aug 28, 2026
ed7a6e0
change methods of calculating data-slots
noahchoii Aug 28, 2026
74085a2
Merge branch 'main' into data-slots
noahchoii Aug 31, 2026
789258e
Merge branch 'main' into data-slots
noahchoii Sep 1, 2026
6d5eb6f
Merge branch 'main' into data-slots
noahchoii Sep 2, 2026
e729d00
Merge branch 'main' into data-slots
noahchoii Sep 4, 2026
2f6836a
correct magic-string scope
noahchoii Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eager-lamps-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vapor-ui/core': minor
---

add data-slots for all components
28 changes: 23 additions & 5 deletions apps/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { StorybookConfig } from '@storybook/react-vite';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import { readFile } from 'node:fs/promises';
import { createRequire } from 'node:module';
import path, { dirname, join } from 'node:path';
import { mergeConfig } from 'vite';
Expand Down Expand Up @@ -31,6 +32,26 @@ const tildeAlias = {
},
};

const coreDistCssPassthrough = {
name: 'vapor-core-dist-css-passthrough',
enforce: 'pre' as const,

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async resolveId(this: any, source: string, importer: string | undefined) {
if (!source.endsWith('.vanilla.css')) return null;
const resolved = await this.resolve(source, importer, { skipSelf: true });
if (!resolved) return null;
if (resolved.id.includes('/packages/core/dist/')) return resolved.id;
return null;
},

async load(id: string) {
if (!id.endsWith('.vanilla.css')) return null;
if (!id.includes('/packages/core/dist/')) return null;
return await readFile(id.split('?')[0], 'utf-8');
},
};

const config: StorybookConfig = {
stories: ['../../../packages/**!(node_modules|dist)/src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [getAbsolutePath('@storybook/addon-docs')],
Expand All @@ -55,14 +76,11 @@ const config: StorybookConfig = {
...config,
resolve: {
...config.resolve,
alias: [
tildeAlias,
{ find: '@vapor-ui/core', replacement: CORE_SRC },
{ find: '@vapor-ui/composites', replacement: COMPOSITES_SRC },
],
alias: [tildeAlias],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vapor-ui/core의 컴포넌트 파일을 보는게 아니라 dist를 보게 되면서 스토리북 실행할 때 turbo.json 태스크 의존성을 지정해 주면 좋을 것 같습니다.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 스토리북 실행 시점의 문제라기보다는, 어차피 core의 dist가 없으면 개발 환경에서 모듈을 찾을 수 없기 때문에 해결될 해결이 충분히 될 문제로 보이긴 합니다..!

스크린샷 2026-08-28 오후 2 51 59

그래서 매번 파이프라인을 태우기보다 website의 스크립트들처럼 사용자가 직접 파이프라인을 시작할 수 있도록 구성해두겠습니다!

  • 파이프라인 실행 커맨드: pnpm turbo dev --filter=storybook

},

plugins: [
coreDistCssPassthrough,
vanillaExtractPlugin({
identifiers: ({ hash, filePath, debugId }) => {
const componentName = path.basename(filePath, '.css.ts');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"react": "catalog:",
"react-dom": "catalog:",
"rimraf": "^6.1.3",
"rolldown": "^1.2.6",
"rolldown": "catalog:",
"rolldown-plugin-dts": "^0.27.14",
"rollup-plugin-node-externals": "^8.1.2",
"typescript": "catalog:",
Expand Down
27 changes: 21 additions & 6 deletions packages/core/rolldown.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { bundle, generateInputs } from '@repo/rolldown-config';
import {
cleanLayerDeclaration,
dataSlots,
depsExternal,
dts,
identifiers,
Expand Down Expand Up @@ -40,19 +41,28 @@ const resolve = {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
};

const replaceFileName = (name: string, ext: string) => {
return `${name.replace(/\.css$/, '.css.vanilla')}.${ext}`;
};

export default defineConfig([
// ESM Build
bundle({
input: inputs,
resolve,
plugins: [depsExternal(), vanillaExtractPlugin({ identifiers }), cleanLayerDeclaration()],
plugins: [
depsExternal(),
dataSlots(),
vanillaExtractPlugin({ identifiers }),
cleanLayerDeclaration(),
],
output: {
format: 'esm',
strict: true,
exports: 'named',

// e.g., 'styles/tailwind-preset.css' -> 'styles/tailwind-preset.css.vanilla.js'
entryFileNames: ({ name }) => `${name.replace(/\.css$/, '.css.vanilla')}.mjs`,
entryFileNames: ({ name }) => replaceFileName(name, 'mjs'),
assetFileNames,
},
}),
Expand All @@ -61,13 +71,18 @@ export default defineConfig([
bundle({
input: inputs,
resolve,
plugins: [depsExternal(), vanillaExtractPlugin({ identifiers }), cleanLayerDeclaration()],
plugins: [
depsExternal(),
dataSlots(),
vanillaExtractPlugin({ identifiers }),
cleanLayerDeclaration(),
],
output: {
format: 'cjs',
strict: true,
exports: 'named',

entryFileNames: ({ name }) => `${name.replace(/\.css$/, '.css.vanilla')}.cjs`,
entryFileNames: ({ name }) => replaceFileName(name, 'cjs'),
assetFileNames,
},
}),
Expand All @@ -78,7 +93,7 @@ export default defineConfig([
resolve,
plugins: [depsExternal(), dts()],
output: {
entryFileNames: ({ name }) => `${name.replace(/\.css\.d$/, '.css.vanilla.d')}.mts`,
entryFileNames: ({ name }) => replaceFileName(name, 'mts'),
},
}),

Expand All @@ -87,7 +102,7 @@ export default defineConfig([
resolve,
plugins: [depsExternal(), dts()],
output: {
entryFileNames: ({ name }) => `${name.replace(/\.css\.d$/, '.css.vanilla.d')}.cts`,
entryFileNames: ({ name }) => replaceFileName(name, 'cts'),
},
}),
]);
2 changes: 1 addition & 1 deletion packages/core/src/components/pagination/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const PaginationRootPrimitive = forwardRef<HTMLElement, PaginationRootPri
return <PaginationProvider value={context}>{element}</PaginationProvider>;
},
);
PaginationRootPrimitive.displayName = 'PaginationRootPrimitive.Root';
PaginationRootPrimitive.displayName = 'Pagination.RootPrimitive';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용자가 쓰는 것 DOM에 찍히는 이름표
<Callout.Root> / <Callout.Icon> CalloutRoot / CalloutIcon
<Toolbar.Root> .Group .Button .Input .Separator ToolbarRoot ToolbarGroup …
<Grid.Root> Grid ← 같은 파일의 Grid.Item은 정상
<SegmentedControl.IconItem> SegmentedControl.IconOnlyItem

이렇게 지금 displayName이 없거나 컴포넌트 alias와 다른 케이스가 존재하는 것 같습니다.

displayName으로 data-slots이름을 지정하는 방법과 component export index.parts.ts를 통해 alias 이름을 가져와서 data-slots을 넣어주는 방법이 있었을 것 같은데 displayName을 채택한 이유가 궁금합니다.!

저는 export alias를 사용하면 사용단 사용 slot이름과 data-slots의 이름이 동일하게 갈 것 같다고 생각해서 리뷰 남깁니다.!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export alias 방식은 AST에서 대상을 선택하고 data-slots를 적용하는 부분과, 그것의 값을 꺼내오는 부분이 서로 달라 매핑 과정이 필요하다고 판단했습니다. 그래서 코드가 복잡해지고, 유지보수 비용이 커질 것을 우려해서 선택하지 않았어요!

그리고 지금 컴포넌트의 네이밍이나 alias를 지정하는 규칙 자체는 명확하게 지정되어 있긴 하니, 비용을 줄이되 컨벤션에 따라 값을 뽑아내는 방식은 어떠신가요??

컴포넌트의 이름에서 파일명 이후에 .을 찍는 방식처럼요!

ex) dialog.tsx에서 DialogPortalPrimitive의 data-slots 값을 계산하는 경우, 파일명(dialog) 다음 부분에 .찍고 Primitive 제거 -> Dialog.Portal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 것 같습니다.! 그럼 파일명 기반으로 서브 컴포넌트가 (.)뒤에 들어가면 명확해 질 것 같네요!

위에 언급한 callout, toolbar, grid, segmentedControl의 displayName은 다른 PR에서 차차 수정하면 될 것 같네요 그럼


/* -------------------------------------------------------------------------------------------------
* Pagination.ListPrimitive
Expand Down
26 changes: 16 additions & 10 deletions packages/core/src/components/sheet/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,33 +120,35 @@ SheetRoot.displayName = 'Sheet.Root';
* Sheet.Trigger
* -----------------------------------------------------------------------------------------------*/

export const SheetTrigger = Dialog.Trigger;
export const SheetTrigger = forwardRef<HTMLButtonElement, SheetTrigger.Props>((props, ref) => (
<Dialog.Trigger ref={ref} {...props} />
));
SheetTrigger.displayName = 'Sheet.Trigger';

/* -------------------------------------------------------------------------------------------------
* Sheet.Close
* -----------------------------------------------------------------------------------------------*/

export const SheetClose = Dialog.Close;
export const SheetClose = forwardRef<HTMLButtonElement, SheetClose.Props>((props, ref) => (
<Dialog.Close ref={ref} {...props} />
));
SheetClose.displayName = 'Sheet.Close';

/* -------------------------------------------------------------------------------------------------
* Sheet.OverlayPrimitive
* -----------------------------------------------------------------------------------------------*/

export const SheetOverlayPrimitive = Dialog.OverlayPrimitive;
export const SheetOverlayPrimitive = forwardRef<HTMLDivElement, SheetOverlayPrimitive.Props>(
(props, ref) => <Dialog.OverlayPrimitive ref={ref} {...props} />,
);
SheetOverlayPrimitive.displayName = 'Sheet.OverlayPrimitive';

/* -------------------------------------------------------------------------------------------------
* Sheet.PortalPrimitive
* -----------------------------------------------------------------------------------------------*/

export const SheetPortalPrimitive = forwardRef<HTMLDivElement, SheetPortalPrimitive.Props>(
(props, ref) => {
const componentProps = resolveStyles(props);

return <Dialog.PortalPrimitive ref={ref} {...componentProps} />;
},
(props, ref) => <Dialog.PortalPrimitive ref={ref} {...props} />,
);
SheetPortalPrimitive.displayName = 'Sheet.PortalPrimitive';

Expand Down Expand Up @@ -388,14 +390,18 @@ SheetFooter.displayName = 'Sheet.Footer';
* Sheet.Title
* -----------------------------------------------------------------------------------------------*/

export const SheetTitle = Dialog.Title;
export const SheetTitle = forwardRef<HTMLHeadingElement, SheetTitle.Props>((props, ref) => (
<Dialog.Title ref={ref} {...props} />
));
SheetTitle.displayName = 'Sheet.Title';

/* -------------------------------------------------------------------------------------------------
* Sheet.Description
* -----------------------------------------------------------------------------------------------*/

export const SheetDescription = Dialog.Description;
export const SheetDescription = forwardRef<HTMLParagraphElement, SheetDescription.Props>(
(props, ref) => <Dialog.Description ref={ref} {...props} />,
);
SheetDescription.displayName = 'Sheet.Description';

/* -----------------------------------------------------------------------------------------------*/
Expand Down
6 changes: 4 additions & 2 deletions packages/rolldown-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
"lint": "eslint ./src"
},
"dependencies": {
"rolldown-plugin-dts": "^0.27.1",
"magic-string": "^1.2.3",
"rolldown-plugin-dts": "^0.27.14",
"rollup-plugin-node-externals": "^8.1.2"
},
"devDependencies": {
"@oxc-project/types": "catalog:",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"eslint": "catalog:",
"rimraf": "^6.1.3",
"rolldown": "^1.2.6",
"rolldown": "catalog:",
"rollup": "^4.62.4",
"tinyglobby": "^0.2.17",
"typescript": "catalog:"
Expand Down
Loading
Loading