@pisodev/test-component-library 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/components/Anchor/Anchor.native.tsx +44 -0
  2. package/components/Anchor/Anchor.types.ts +11 -0
  3. package/components/Anchor/Anchor.web.module.scss +33 -0
  4. package/components/Anchor/Anchor.web.tsx +35 -0
  5. package/components/Anchor/README.md +58 -0
  6. package/components/Anchor/index.ts +2 -0
  7. package/components/README.md +195 -0
  8. package/components/StatusBar/README.md +56 -0
  9. package/components/StatusBar/StatusBar.tsx +17 -0
  10. package/components/StatusBar/StatusBar.types.ts +5 -0
  11. package/components/StatusBar/index.ts +3 -0
  12. package/components/StatusBar/index.web.ts +14 -0
  13. package/components/Tooltip/README.md +45 -0
  14. package/components/Tooltip/Tooltip.module.scss +44 -0
  15. package/components/Tooltip/Tooltip.tsx +26 -0
  16. package/components/Tooltip/Tooltip.types.ts +7 -0
  17. package/components/Tooltip/index.native.ts +15 -0
  18. package/components/Tooltip/index.ts +3 -0
  19. package/components/index.ts +8 -0
  20. package/dist/Anchor/Anchor.native.d.ts +3 -0
  21. package/dist/Anchor/Anchor.native.js +34 -0
  22. package/dist/Anchor/Anchor.types.d.ts +10 -0
  23. package/dist/Anchor/Anchor.types.js +2 -0
  24. package/dist/Anchor/Anchor.web.d.ts +3 -0
  25. package/dist/Anchor/index.d.ts +2 -0
  26. package/dist/StatusBar/StatusBar.d.ts +3 -0
  27. package/dist/StatusBar/StatusBar.types.d.ts +5 -0
  28. package/dist/StatusBar/StatusBar.types.js +2 -0
  29. package/dist/StatusBar/index.d.ts +2 -0
  30. package/dist/StatusBar/index.web.d.ts +3 -0
  31. package/dist/Tooltip/Tooltip.d.ts +3 -0
  32. package/dist/Tooltip/Tooltip.types.d.ts +6 -0
  33. package/dist/Tooltip/Tooltip.types.js +2 -0
  34. package/dist/Tooltip/index.d.ts +2 -0
  35. package/dist/Tooltip/index.native.d.ts +4 -0
  36. package/dist/Tooltip/index.native.js +12 -0
  37. package/dist/index.d.ts +3 -2
  38. package/dist/index.esm.js +23 -143
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.js +23 -146
  41. package/dist/index.js.map +1 -1
  42. package/package.json +22 -9
  43. package/README.md +0 -101
  44. package/dist/components/Anchor/Anchor.d.ts +0 -11
  45. package/dist/components/Anchor/index.d.ts +0 -2
  46. package/dist/components/Button/Button.d.ts +0 -11
  47. package/dist/components/Button/index.d.ts +0 -2
  48. package/dist/components/Card/Card.d.ts +0 -11
  49. package/dist/components/Card/index.d.ts +0 -2
  50. package/dist/components/index.d.ts +0 -6
  51. package/dist/theme/ThemeProvider.d.ts +0 -12
  52. package/dist/theme/defaultTheme.d.ts +0 -2
  53. package/dist/theme/index.d.ts +0 -3
  54. package/dist/theme/types.d.ts +0 -23
package/package.json CHANGED
@@ -1,31 +1,42 @@
1
1
  {
2
2
  "name": "@pisodev/test-component-library",
3
- "version": "1.1.1",
4
- "description": "SCSS 기반 React 컴포넌트 라이브러리",
5
- "type": "module",
3
+ "version": "2.0.0",
4
+ "description": "웹과 React Native를 위한 컴포넌트 라이브러리",
6
5
  "main": "dist/index.js",
7
6
  "module": "dist/index.esm.js",
8
7
  "types": "dist/index.d.ts",
8
+ "react-native": "dist/index.native.js",
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "components"
11
12
  ],
12
13
  "scripts": {
13
- "build": "rollup -c",
14
+ "build": "npm run build:web",
15
+ "build:web": "rollup -c rollup.config.web.js",
16
+ "build:native": "tsc -p tsconfig.native.json",
14
17
  "prepublishOnly": "npm run build"
15
18
  },
16
19
  "keywords": [
17
20
  "react",
21
+ "react-native",
18
22
  "components",
19
- "sass",
20
23
  "ui",
21
24
  "component-library",
22
- "typescript"
25
+ "typescript",
26
+ "cross-platform"
23
27
  ],
24
28
  "author": "",
25
29
  "license": "MIT",
26
30
  "peerDependencies": {
27
- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
28
- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
31
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "react-dom": {
35
+ "optional": true
36
+ },
37
+ "react-native": {
38
+ "optional": true
39
+ }
29
40
  },
30
41
  "devDependencies": {
31
42
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -33,8 +44,10 @@
33
44
  "@rollup/plugin-typescript": "^12.3.0",
34
45
  "@types/react": "^19.2.7",
35
46
  "@types/react-dom": "^19.2.3",
47
+ "@types/react-native": "^0.73.0",
36
48
  "react": "^19.2.3",
37
49
  "react-dom": "^19.2.3",
50
+ "react-native": "^0.76.6",
38
51
  "rollup": "^4.54.0",
39
52
  "rollup-plugin-peer-deps-external": "^2.2.4",
40
53
  "rollup-plugin-postcss": "^4.0.2",
package/README.md DELETED
@@ -1,101 +0,0 @@
1
- # @pisodev/test-component-library
2
-
3
- SASS 기반 React 컴포넌트 라이브러리입니다.
4
-
5
- ## 설치
6
-
7
- ```bash
8
- npm install @pisodev/test-component-library
9
- ```
10
-
11
- ## 사용법
12
-
13
- ### 기본 사용
14
-
15
- ```tsx
16
- import { Anchor, ThemeProvider } from '@pisodev/test-component-library';
17
-
18
- function App() {
19
- return (
20
- <ThemeProvider>
21
- <Anchor
22
- href="https://example.com"
23
- rel="noopener noreferrer"
24
- title="예시 사이트로 이동"
25
- target="_blank"
26
- >
27
- 외부 링크
28
- </Anchor>
29
- </ThemeProvider>
30
- );
31
- }
32
- ```
33
-
34
- ### 테마 커스터마이징
35
-
36
- 컬러 시스템을 커스터마이징하여 브랜드 컬러를 적용할 수 있습니다.
37
-
38
- ```tsx
39
- import { ThemeProvider } from '@pisodev/test-component-library';
40
-
41
- function App() {
42
- return (
43
- <ThemeProvider
44
- colors={{
45
- primary: {
46
- 600: '#ff6b6b', // 링크의 기본 색상
47
- 700: '#ee5a52', // hover 상태 색상
48
- },
49
- }}
50
- >
51
- <YourApp />
52
- </ThemeProvider>
53
- );
54
- }
55
- ```
56
-
57
- **사용 가능한 컬러 스케일**: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
58
-
59
- **기본 제공 컬러**: `primary`, `secondary`, `success`, `warning`, `danger`
60
-
61
- **컬러 변경 방법**:
62
- - 일부 스케일만 변경: 필요한 스케일만 지정하면 나머지는 기본값 유지
63
- - 새 컬러 추가: 원하는 이름으로 새로운 컬러 스케일 추가 가능
64
-
65
- ## 컴포넌트
66
-
67
- ### Anchor
68
-
69
- `rel`과 `title` 속성이 **필수**인 링크 컴포넌트입니다. 접근성과 SEO를 위해 항상 이 속성들을 제공해야 합니다.
70
-
71
- ```tsx
72
- <Anchor
73
- href="https://example.com"
74
- rel="noopener noreferrer"
75
- title="예시 사이트로 이동"
76
- target="_blank"
77
- >
78
- 외부 링크
79
- </Anchor>
80
-
81
- <Anchor
82
- href="/about"
83
- rel="internal"
84
- title="회사 소개 페이지"
85
- >
86
- 회사 소개
87
- </Anchor>
88
- ```
89
-
90
- **Props (필수 항목)**
91
- - `href`: `string` (필수)
92
- - `rel`: `string` (필수) - 링크 관계 (예: `"noopener noreferrer"`, `"internal"`)
93
- - `title`: `string` (필수) - 링크 설명 (접근성 및 SEO에 중요)
94
- - `target`: `'_blank'` | `'_self'` | `'_parent'` | `'_top'` (기본값: `'_self'`)
95
- - `onClick`: `(e: React.MouseEvent<HTMLAnchorElement>) => void`
96
-
97
- > **참고**: `rel`과 `title`은 접근성, SEO, 보안을 위해 반드시 제공해야 하는 필수 속성입니다.
98
-
99
- ## 라이센스
100
-
101
- MIT
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export interface AnchorProps {
3
- children: React.ReactNode;
4
- href: string;
5
- rel: string;
6
- title: string;
7
- target?: '_blank' | '_self' | '_parent' | '_top';
8
- className?: string;
9
- onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
10
- }
11
- export declare const Anchor: React.FC<AnchorProps>;
@@ -1,2 +0,0 @@
1
- export { Anchor } from './Anchor';
2
- export type { AnchorProps } from './Anchor';
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export interface ButtonProps {
3
- children: React.ReactNode;
4
- variant?: 'primary' | 'secondary' | 'outline';
5
- size?: 'small' | 'medium' | 'large';
6
- onClick?: () => void;
7
- disabled?: boolean;
8
- type?: 'button' | 'submit' | 'reset';
9
- className?: string;
10
- }
11
- export declare const Button: React.FC<ButtonProps>;
@@ -1,2 +0,0 @@
1
- export { Button } from './Button';
2
- export type { ButtonProps } from './Button';
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export interface CardProps {
3
- children: React.ReactNode;
4
- title?: string;
5
- subtitle?: string;
6
- footer?: React.ReactNode;
7
- variant?: 'default' | 'elevated' | 'outlined';
8
- className?: string;
9
- onClick?: () => void;
10
- }
11
- export declare const Card: React.FC<CardProps>;
@@ -1,2 +0,0 @@
1
- export { Card } from './Card';
2
- export type { CardProps } from './Card';
@@ -1,6 +0,0 @@
1
- export { Button } from './Button';
2
- export type { ButtonProps } from './Button';
3
- export { Card } from './Card';
4
- export type { CardProps } from './Card';
5
- export { Anchor } from './Anchor';
6
- export type { AnchorProps } from './Anchor';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Theme, ThemeColors } from './types';
3
- interface ThemeContextValue {
4
- theme: Theme;
5
- }
6
- interface ThemeProviderProps {
7
- children: React.ReactNode;
8
- colors?: ThemeColors;
9
- }
10
- export declare const ThemeProvider: React.FC<ThemeProviderProps>;
11
- export declare const useTheme: () => ThemeContextValue;
12
- export {};
@@ -1,2 +0,0 @@
1
- import { Theme } from './types';
2
- export declare const defaultTheme: Theme;
@@ -1,3 +0,0 @@
1
- export { ThemeProvider, useTheme } from './ThemeProvider';
2
- export { defaultTheme } from './defaultTheme';
3
- export type { Theme, ThemeColors, ColorScale } from './types';
@@ -1,23 +0,0 @@
1
- export interface ColorScale {
2
- 50: string;
3
- 100: string;
4
- 200: string;
5
- 300: string;
6
- 400: string;
7
- 500: string;
8
- 600: string;
9
- 700: string;
10
- 800: string;
11
- 900: string;
12
- }
13
- export interface ThemeColors {
14
- primary?: Partial<ColorScale>;
15
- secondary?: Partial<ColorScale>;
16
- success?: Partial<ColorScale>;
17
- warning?: Partial<ColorScale>;
18
- danger?: Partial<ColorScale>;
19
- [key: string]: Partial<ColorScale> | undefined;
20
- }
21
- export interface Theme {
22
- colors: ThemeColors;
23
- }