podo-ui 0.1.39 → 0.1.41

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.1.39",
3
+ "version": "0.1.41",
4
4
  "type": "module",
5
5
  "author": "hada0127 <work@tarucy.net>",
6
6
  "license": "MIT",
@@ -12,13 +12,6 @@
12
12
  "url": "https://github.com/hada0127/podo-ui/issues"
13
13
  },
14
14
  "homepage": "https://github.com/hada0127/podo-ui#readme",
15
- "exports": {
16
- ".": "./index.html",
17
- "./global.scss": "./global.scss",
18
- "./mixin.scss": "./mixin.scss",
19
- "./system.scss": "./system.scss",
20
- "./react": "./react.ts"
21
- },
22
15
  "scripts": {
23
16
  "dev": "next dev",
24
17
  "build": "next build",
package/readme.md CHANGED
@@ -38,28 +38,21 @@ import 'podo-ui/global.scss';
38
38
  }
39
39
  ```
40
40
 
41
- ### 3. Vite 프로젝트 설정 (선택)
42
-
43
- ⚠️ **Vite에서 `@use 'podo-ui/mixin'`이 작동하지 않는다면 아래 설정을 추가하세요:**
44
-
45
- ```javascript
46
- // vite.config.js
47
- import { defineConfig } from 'vite';
48
- import react from '@vitejs/plugin-react';
49
- import path from 'path';
50
-
51
- export default defineConfig({
52
- plugins: [react()],
53
- resolve: {
54
- alias: {
55
- 'podo-ui/mixin': path.resolve(__dirname, 'node_modules/podo-ui/mixin.scss'),
56
- 'podo-ui/system': path.resolve(__dirname, 'node_modules/podo-ui/system.scss'),
57
- }
58
- }
59
- });
41
+ ### 3. Vite 프로젝트 설정 (필수)
42
+
43
+ ⚠️ **Vite 사용하는 경우 폰트 경로 재정의가 필요합니다!**
44
+
45
+ Vite에서는 node_modules 내의 상대 경로를 올바르게 처리하지 못할 수 있습니다. `podo-ui/vite-fonts.scss`를 추가로 import하세요:
46
+
47
+ ```typescript
48
+ // main.tsx
49
+ import 'podo-ui/global.scss';
50
+ import 'podo-ui/vite-fonts.scss'; // Vite용 폰트 경로 재정의
60
51
  ```
61
52
 
62
- **대부분의 경우 추가 설정 없이 바로 사용 가능합니다.**
53
+ 파일은 아이콘 폰트와 Pretendard 폰트의 경로를 Vite에서 올바르게 로드되도록 재정의합니다.
54
+
55
+ **Next.js나 CRA 등 다른 번들러는 `vite-fonts.scss` 없이 사용 가능합니다.**
63
56
 
64
57
  ---
65
58
 
@@ -1,6 +1,5 @@
1
- @use 'sass:map';
2
1
  @use './icon-name' as *;
3
2
 
4
3
  @function icon($key) {
5
- @return '#{map.get($icon-name, $key)}';
4
+ @return '#{map-get($icon-name, $key)}';
6
5
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  @font-face {
5
5
  font-family: 'podo-ui-icon';
6
- src: url('~/podo-ui/scss/icon/font/icon.woff') format('woff');
6
+ src: url('./font/icon.woff') format('woff');
7
7
  font-display: swap;
8
8
  }
9
9
  :root {
@@ -1,4 +1,3 @@
1
- @use 'sass:map';
2
1
  @use '../color/function' as *;
3
2
  /*
4
3
  Shadow
@@ -13,7 +12,7 @@ $shadow: (
13
12
  );
14
13
 
15
14
  @function shadow($key) {
16
- @return map.get($shadow, $key);
15
+ @return map-get($shadow, $key);
17
16
  }
18
17
 
19
18
  @each $key, $value in $shadow {
@@ -1,5 +1,3 @@
1
- @use 'sass:map';
2
-
3
1
  /*
4
2
  Border
5
3
  */
@@ -12,7 +10,7 @@ $border: (
12
10
  );
13
11
 
14
12
  @function border($key) {
15
- @return map.get($border, $key);
13
+ @return map-get($border, $key);
16
14
  }
17
15
 
18
16
  @each $key, $value in $border {
@@ -1,5 +1,3 @@
1
- @use 'sass:map';
2
-
3
1
  /*
4
2
  Radius
5
3
  */
@@ -15,7 +13,7 @@ $r: (
15
13
  full: 9999px,
16
14
  );
17
15
  @function r($key) {
18
- @return map.get($r, $key);
16
+ @return map-get($r, $key);
19
17
  }
20
18
 
21
19
  @each $key, $value in $r {
@@ -1,5 +1,3 @@
1
- @use 'sass:map';
2
-
3
1
  /*
4
2
  Spacing
5
3
  */
@@ -21,7 +19,7 @@ $spacing: (
21
19
  );
22
20
 
23
21
  @function s($key) {
24
- @return map.get($spacing, $key);
22
+ @return map-get($spacing, $key);
25
23
  }
26
24
 
27
25
  @each $key, $value in $spacing {
@@ -3,7 +3,7 @@
3
3
  font-weight: 900;
4
4
  src:
5
5
  local('Pretendard Black'),
6
- url(~/podo-ui/scss/typo/font/Pretendard-Black.woff2) format('woff2');
6
+ url(./font/Pretendard-Black.woff2) format('woff2');
7
7
  font-display: swap;
8
8
  }
9
9
 
@@ -12,7 +12,7 @@
12
12
  font-weight: 800;
13
13
  src:
14
14
  local('Pretendard ExtraBold'),
15
- url(~/podo-ui/scss/typo/font/Pretendard-ExtraBold.woff2) format('woff2');
15
+ url(./font/Pretendard-ExtraBold.woff2) format('woff2');
16
16
  font-display: swap;
17
17
  }
18
18
 
@@ -21,7 +21,7 @@
21
21
  font-weight: 700;
22
22
  src:
23
23
  local('Pretendard Bold'),
24
- url(~/podo-ui/scss/typo/font/Pretendard-Bold.woff2) format('woff2');
24
+ url(./font/Pretendard-Bold.woff2) format('woff2');
25
25
  font-display: swap;
26
26
  }
27
27
 
@@ -30,7 +30,7 @@
30
30
  font-weight: 600;
31
31
  src:
32
32
  local('Pretendard SemiBold'),
33
- url(~/podo-ui/scss/typo/font/Pretendard-SemiBold.woff2) format('woff2');
33
+ url(./font/Pretendard-SemiBold.woff2) format('woff2');
34
34
  font-display: swap;
35
35
  }
36
36
 
@@ -39,7 +39,7 @@
39
39
  font-weight: 500;
40
40
  src:
41
41
  local('Pretendard Medium'),
42
- url(~/podo-ui/scss/typo/font/Pretendard-Medium.woff2) format('woff2');
42
+ url(./font/Pretendard-Medium.woff2) format('woff2');
43
43
  font-display: swap;
44
44
  }
45
45
 
@@ -48,7 +48,7 @@
48
48
  font-weight: 400;
49
49
  src:
50
50
  local('Pretendard Regular'),
51
- url(~/podo-ui/scss/typo/font/Pretendard-Regular.woff2) format('woff2');
51
+ url(./font/Pretendard-Regular.woff2) format('woff2');
52
52
  font-display: swap;
53
53
  }
54
54
 
@@ -57,7 +57,7 @@
57
57
  font-weight: 300;
58
58
  src:
59
59
  local('Pretendard Light'),
60
- url(~/podo-ui/scss/typo/font/Pretendard-Light.woff2) format('woff2');
60
+ url(./font/Pretendard-Light.woff2) format('woff2');
61
61
  font-display: swap;
62
62
  }
63
63
 
@@ -66,7 +66,7 @@
66
66
  font-weight: 200;
67
67
  src:
68
68
  local('Pretendard ExtraLight'),
69
- url(~/podo-ui/scss/typo/font/Pretendard-ExtraLight.woff2) format('woff2');
69
+ url(./font/Pretendard-ExtraLight.woff2) format('woff2');
70
70
  font-display: swap;
71
71
  }
72
72
 
@@ -75,6 +75,6 @@
75
75
  font-weight: 100;
76
76
  src:
77
77
  local('Pretendard Thin'),
78
- url(~/podo-ui/scss/typo/font/Pretendard-Thin.woff2) format('woff2');
78
+ url(./font/Pretendard-Thin.woff2) format('woff2');
79
79
  font-display: swap;
80
80
  }
@@ -0,0 +1,91 @@
1
+ // Vite 프로젝트용 폰트 경로 재정의 파일
2
+ // 사용법: import 'podo-ui/vite-fonts.scss';
3
+
4
+ // 아이콘 폰트
5
+ @font-face {
6
+ font-family: 'podo-ui-icon';
7
+ src: url('podo-ui/scss/icon/font/icon.woff') format('woff');
8
+ font-display: swap;
9
+ }
10
+
11
+ // Pretendard 폰트
12
+ @font-face {
13
+ font-family: 'Pretendard';
14
+ font-weight: 900;
15
+ src:
16
+ local('Pretendard Black'),
17
+ url(podo-ui/scss/typo/font/Pretendard-Black.woff2) format('woff2');
18
+ font-display: swap;
19
+ }
20
+
21
+ @font-face {
22
+ font-family: 'Pretendard';
23
+ font-weight: 800;
24
+ src:
25
+ local('Pretendard ExtraBold'),
26
+ url(podo-ui/scss/typo/font/Pretendard-ExtraBold.woff2) format('woff2');
27
+ font-display: swap;
28
+ }
29
+
30
+ @font-face {
31
+ font-family: 'Pretendard';
32
+ font-weight: 700;
33
+ src:
34
+ local('Pretendard Bold'),
35
+ url(podo-ui/scss/typo/font/Pretendard-Bold.woff2) format('woff2');
36
+ font-display: swap;
37
+ }
38
+
39
+ @font-face {
40
+ font-family: 'Pretendard';
41
+ font-weight: 600;
42
+ src:
43
+ local('Pretendard SemiBold'),
44
+ url(podo-ui/scss/typo/font/Pretendard-SemiBold.woff2) format('woff2');
45
+ font-display: swap;
46
+ }
47
+
48
+ @font-face {
49
+ font-family: 'Pretendard';
50
+ font-weight: 500;
51
+ src:
52
+ local('Pretendard Medium'),
53
+ url(podo-ui/scss/typo/font/Pretendard-Medium.woff2) format('woff2');
54
+ font-display: swap;
55
+ }
56
+
57
+ @font-face {
58
+ font-family: 'Pretendard';
59
+ font-weight: 400;
60
+ src:
61
+ local('Pretendard Regular'),
62
+ url(podo-ui/scss/typo/font/Pretendard-Regular.woff2) format('woff2');
63
+ font-display: swap;
64
+ }
65
+
66
+ @font-face {
67
+ font-family: 'Pretendard';
68
+ font-weight: 300;
69
+ src:
70
+ local('Pretendard Light'),
71
+ url(podo-ui/scss/typo/font/Pretendard-Light.woff2) format('woff2');
72
+ font-display: swap;
73
+ }
74
+
75
+ @font-face {
76
+ font-family: 'Pretendard';
77
+ font-weight: 200;
78
+ src:
79
+ local('Pretendard ExtraLight'),
80
+ url(podo-ui/scss/typo/font/Pretendard-ExtraLight.woff2) format('woff2');
81
+ font-display: swap;
82
+ }
83
+
84
+ @font-face {
85
+ font-family: 'Pretendard';
86
+ font-weight: 100;
87
+ src:
88
+ local('Pretendard Thin'),
89
+ url(podo-ui/scss/typo/font/Pretendard-Thin.woff2) format('woff2');
90
+ font-display: swap;
91
+ }