Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
38deec1
chore: init storybook
99mini Jun 5, 2025
bf74bae
feat: react native storybook
99mini Jun 5, 2025
c7bb3b1
chore: build react-native
99mini Jun 5, 2025
d10dd15
release: 0.0.4-canary.0
99mini Jun 5, 2025
0f41945
release: 0.0.4-canary.1
99mini Jun 5, 2025
06077cf
release: 0.0.4-canary.2
99mini Jun 5, 2025
7fddbb7
release: 0.0.4-canary.3
99mini Jun 5, 2025
df3e2a0
feat: textinput
99mini Jun 10, 2025
7e5cafe
feat: uncontrolled
99mini Jun 10, 2025
827f034
feat: css 인라인스타일 유틸 작성
99mini Jul 9, 2025
716fca9
feat: TextInput 컴포넌트에 라벨 위치 조정 기능 추가
99mini Jul 9, 2025
d3bafe5
feat: TextInput 컴포넌트에 full 속성 추가 및 레이블 위치 스타일 개선
99mini Jul 9, 2025
bec2d2a
feat: TextInput 컴포넌트에 커스텀 스타일과 라벨 컴포넌트 기능 추가
99mini Jul 9, 2025
6f3f672
feat: 버튼 컴포넌트를 테마 시스템과 통합하고 스타일 분리
99mini Jul 9, 2025
ee78f26
style: 스토리북 설정 파일들의 코드 포맷팅 정리
99mini Jul 9, 2025
dd5d79d
release: v0.0.4-canary.4
99mini Jul 9, 2025
4dcb927
feat: export 변경
99mini Jul 9, 2025
eadff7e
style: TextInput 컴포넌트에 border 스타일 추가 및 패키지 버전 업데이트
99mini Jul 9, 2025
4ea5745
chore: @emotion과 react-native를 peerDependencies에 추가
99mini Jul 10, 2025
e381a2b
feat: Emotion 테마 프로바이더 구현 및 경로 재구성
99mini Jul 11, 2025
8aa628c
refactor: 스타일 유틸리티 파일 구조 및 내보내기 정리
99mini Jul 11, 2025
ec164a5
refactor: emotion 디렉토리 구조 변경 및 import 경로 수정
99mini Jul 11, 2025
2ba5e56
feat: 스토리북 설정에 경로 별칭을 추가하고 TextInput 컴포넌트의 주석을 정리
99mini Jul 11, 2025
edc71ab
feat: TextInput 컴포넌트의 상태관리 및 읽기전용 기능 추가
99mini Jul 11, 2025
124009d
feat: TextInput 컴포넌트의 readOnly 상태 스타일 개선 및 테마 색상 추가
99mini Jul 11, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ dist

# test
coverage

*storybook.log
storybook-static
10 changes: 10 additions & 0 deletions .script/publish-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# 로컬에서 배포시 tag, release를 생성하지 않음
# 직접 version을 수정하고 publish를 실행
# tag와 release를 직접 생성

sh .script/pre-install.sh

yarn npm publish --access=public

sh .script/post-install.sh
22 changes: 22 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type {StorybookConfig} from '@storybook/react-vite';
import path from 'path';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-onboarding', '@storybook/addon-docs', '@storybook/addon-react-native-web'],
framework: {
name: '@storybook/react-vite',
options: {},
},
viteFinal: async config => {
config.resolve = {
...config.resolve,
alias: {
...config.resolve?.alias,
'@': path.resolve(__dirname, '../src'),
},
};
return config;
},
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- React Native Web 관련 스타일 설정 -->
<style>
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
#storybook-root {
display: flex;
flex-direction: column;
height: 100%;
overflow: auto;
}
</style>
27 changes: 27 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type {Preview} from '@storybook/react-vite';

import {EmotionProvider} from '@/react/provider';
import {theme} from '@/emotion/theme';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
reactNative: {
// React Native 옵션 설정
},
},
decorators: [
Story => (
<EmotionProvider theme={theme}>
<Story />
</EmotionProvider>
),
],
};

export default preview;
4 changes: 4 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import storybook from 'eslint-plugin-storybook';

import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import prettier from 'eslint-config-prettier';
Expand Down Expand Up @@ -48,4 +51,5 @@ export default [
},
},
},
...storybook.configs['flat/recommended'],
];
35 changes: 32 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ummgoban/shared",
"version": "0.0.3",
"version": "0.0.4-canary.12",
"description": "ummgoban 공통 패키지",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand All @@ -19,6 +19,12 @@
},
"./react": {
"types": "./dist/react/index.d.ts"
},
"./react-native": {
"types": "./dist/react-native/index.d.ts"
},
"./emotion": {
"types": "./dist/emotion/index.d.ts"
}
},
"files": [
Expand All @@ -37,7 +43,10 @@
"format": "prettier --write src",
"format:check": "prettier --check src",
"test:all": "yarn lint:check && yarn format:check && yarn type-check && yarn test",
"release": "standard-version"
"release": "standard-version",
"publish:local": "yarn run build && ./.script/publish-local.sh",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"repository": {
"type": "git",
Expand All @@ -50,15 +59,31 @@
"registry": "https://npm.pkg.github.com/"
},
"peerDependencies": {
"@emotion/native": ">=11.11.0",
"@emotion/react": ">=11.14.0",
"axios": ">=1.7.4",
"react": ">=18.0.0"
"react": ">=18.0.0",
"react-native": ">=0.79.0"
},
"devDependencies": {
"@emotion/native": "^11.11.0",
"@emotion/react": "^11.14.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.0.0",
"@storybook/addon-docs": "^9.0.5",
"@storybook/addon-essentials": "^8.6.14",
"@storybook/addon-interactions": "^8.6.14",
"@storybook/addon-links": "^9.0.5",
"@storybook/addon-onboarding": "^9.0.5",
"@storybook/addon-react-native-web": "^0.0.29",
"@storybook/blocks": "^8.6.14",
"@storybook/react": "^9.0.5",
"@storybook/react-native": "^9.0.6",
"@storybook/react-vite": "^9.0.5",
"@storybook/react-webpack5": "^9.0.5",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
Expand All @@ -77,13 +102,17 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-no-relative-import-paths": "^1.5.5",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-storybook": "^9.0.5",
"jiti": "^2.4.2",
"jsdom": "^26.1.0",
"prettier": "^3.5.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-native": "^0.79.3",
"react-native-web": "^0.20.0",
"rollup": "^4.41.1",
"standard-version": "^9.5.0",
"storybook": "^9.0.5",
"tslib": "^2.8.1",
"typescript": "^5.0.0",
"vite": "^6.3.5",
Expand Down
66 changes: 42 additions & 24 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,44 @@ import pkg from './package.json' assert {type: 'json'};

const __dirname = path.dirname(fileURLToPath(import.meta.url));

export default {
// 공통 플러그인 설정 (TypeScript 제외)
const createCommonPlugins = () => [
alias({
entries: [{find: '@', replacement: path.resolve(__dirname, 'src')}],
}),
nodeResolve({
extensions: ['.js', '.jsx', '.ts', '.tsx'],
browser: true,
preferBuiltins: false,
}),
commonjs(),
json(),
];

// 메인 패키지용 TypeScript 플러그인
const createMainTypescriptPlugin = () =>
typescript({
tsconfig: './tsconfig.build.json',
declaration: true,
declarationDir: 'dist',
outDir: 'dist',
sourceMap: true,
rootDir: 'src',
jsx: 'react-jsx',
exclude: ['**/*.{spec,test}.{ts,tsx}'],
});

// 외부 의존성 설정
const external = [
...Object.keys(pkg.peerDependencies || {}),
...Object.keys(pkg.dependencies || {}),
'axios',
'react',
'react-native',
];

// 메인 패키지 설정
const mainConfig = {
input: 'src/index.ts',
output: [
{
Expand All @@ -24,27 +61,8 @@ export default {
sourcemap: true,
},
],
external: [...Object.keys(pkg.peerDependencies || {}), ...Object.keys(pkg.dependencies || {}), 'axios', 'react'],
plugins: [
alias({
entries: [{find: '@', replacement: path.resolve(__dirname, 'src')}],
}),
nodeResolve({
extensions: ['.js', '.jsx', '.ts', '.tsx'],
browser: true,
preferBuiltins: false,
}),
commonjs(),
json(),
typescript({
tsconfig: './tsconfig.build.json',
declaration: true,
declarationDir: 'dist',
outDir: 'dist',
sourceMap: true,
rootDir: 'src',
jsx: 'react-jsx',
exclude: ['**/*.{spec,test}.{ts,tsx}'],
}),
],
external,
plugins: [...createCommonPlugins(), createMainTypescriptPlugin()],
};

export default [mainConfig];
1 change: 1 addition & 0 deletions src/emotion/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './theme';
8 changes: 8 additions & 0 deletions src/emotion/theme/emotion.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import '@emotion/react';
import theme from './theme';

type ThemeTpye = typeof theme;

declare module '@emotion/react' {
export type Theme = ThemeTpye;
}
3 changes: 3 additions & 0 deletions src/emotion/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import theme from './theme';

export {theme};
Loading