podo-ui 0.3.6 → 0.3.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podo-ui",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "type": "module",
5
5
  "author": "hada0127 <work@tarucy.net>",
6
6
  "license": "MIT",
@@ -12,9 +12,55 @@
12
12
  "url": "https://github.com/hada0127/podo-ui/issues"
13
13
  },
14
14
  "homepage": "https://podoui.com",
15
+ "main": "dist/react.js",
16
+ "types": "dist/react.d.ts",
17
+ "files": [
18
+ "dist",
19
+ "scss",
20
+ "global.scss",
21
+ "mixin.scss",
22
+ "vite-fonts.scss",
23
+ "README.md"
24
+ ],
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/react.d.ts",
28
+ "import": "./dist/react.js",
29
+ "default": "./dist/react.js"
30
+ },
31
+ "./react": {
32
+ "types": "./dist/react.d.ts",
33
+ "import": "./dist/react.js",
34
+ "default": "./dist/react.js"
35
+ },
36
+ "./next": {
37
+ "types": "./dist/next.d.ts",
38
+ "import": "./dist/next.js",
39
+ "default": "./dist/next.js"
40
+ },
41
+ "./react/atom/*": {
42
+ "types": "./dist/react/atom/*.d.ts",
43
+ "import": "./dist/react/atom/*.js",
44
+ "default": "./dist/react/atom/*.js"
45
+ },
46
+ "./react/molecule/*": {
47
+ "types": "./dist/react/molecule/*.d.ts",
48
+ "import": "./dist/react/molecule/*.js",
49
+ "default": "./dist/react/molecule/*.js"
50
+ },
51
+ "./global.scss": "./global.scss",
52
+ "./mixin.scss": "./mixin.scss",
53
+ "./vite-fonts.scss": "./vite-fonts.scss",
54
+ "./scss/*": "./scss/*",
55
+ "./package.json": "./package.json"
56
+ },
15
57
  "scripts": {
16
58
  "dev": "next dev",
17
59
  "build": "next build",
60
+ "build:lib": "npm run clean && tsc -p tsconfig.build.json && npm run copy:styles",
61
+ "copy:styles": "find react -name '*.scss' -exec sh -c 'mkdir -p \"dist/$(dirname \"{}\")\" && cp \"{}\" \"dist/{}\"' \\;",
62
+ "clean": "rm -rf dist",
63
+ "prepublishOnly": "npm run build:lib",
18
64
  "start": "next start",
19
65
  "lint": "next lint",
20
66
  "icon": "node ./cli/icon-scss.js",
package/readme.md CHANGED
@@ -34,7 +34,20 @@ import 'podo-ui/vite-fonts.scss'; // Vite 사용 시
34
34
  ### React 컴포넌트
35
35
 
36
36
  ```tsx
37
- import { Input, Textarea, Editor, Field } from 'podo-ui/react';
37
+ // Atomic 컴포넌트
38
+ import Input from 'podo-ui/react/atom/input';
39
+ import Textarea from 'podo-ui/react/atom/textarea';
40
+ import Editor from 'podo-ui/react/atom/editor';
41
+ import EditorView from 'podo-ui/react/atom/editor-view';
42
+
43
+ // Molecule 컴포넌트
44
+ import Field from 'podo-ui/react/molecule/field';
45
+ import Pagination from 'podo-ui/react/molecule/pagination';
46
+ import Toast from 'podo-ui/react/molecule/toast';
47
+ import ToastProvider from 'podo-ui/react/molecule/toast-provider';
48
+
49
+ // SCSS 모듈도 함께 import (Next.js에서)
50
+ import 'podo-ui/dist/react/atom/input.module.scss';
38
51
  ```
39
52
 
40
53
  ## 주요 기능
package/next.ts DELETED
@@ -1,21 +0,0 @@
1
- 'use client';
2
- import dynamic from 'next/dynamic';
3
-
4
- import Input from './react/atom/input';
5
- import Textarea from './react/atom/textarea';
6
- import EditorView from './react/atom/editor-view';
7
- import Pagination from './react/molecule/pagination';
8
- import Field from './react/molecule/field';
9
- const Editor = dynamic(() => import('./react/atom/editor'), { ssr: false });
10
-
11
- const Form = {
12
- Input,
13
- Textarea,
14
- Editor,
15
- EditorView,
16
- Field,
17
- };
18
-
19
- export default Form;
20
-
21
- export { Input, Textarea, Editor, EditorView, Pagination, Field };
@@ -1,17 +0,0 @@
1
- import styles from './editor-view.module.scss';
2
-
3
- interface Props {
4
- value: string;
5
- className?: string;
6
- }
7
-
8
- const EditorView = ({ value, className }: Props) => {
9
- return (
10
- <div
11
- className={`${styles.editorView} ${className || ''}`}
12
- dangerouslySetInnerHTML={{ __html: value }}
13
- />
14
- );
15
- };
16
-
17
- export default EditorView;