@snorose/icons 0.6.0 → 1.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.
- package/LICENSE +21 -0
- package/README.md +146 -0
- package/dist/il-tv-BZ-yvFyp.js +12592 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/il-trashcan-circle-Bds-1V4d.js +0 -8297
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SNOROSE
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<img src="src/icons/multi/ic-multi-cloud-logo.svg" alt="스노로즈 구름 로고" width="184" height="120" />
|
|
2
|
+
|
|
3
|
+
# @snorose/icons
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
스노로즈에서 사용하는 아이콘과 일러스트레이션을 React 컴포넌트 형태로 제공하는 패키지입니다.
|
|
8
|
+
|
|
9
|
+
[아이콘 가이드 (Storybook) ↗](https://storybook.snorose.com/?path=/docs/foundations-iconography--docs)
|
|
10
|
+
|
|
11
|
+
패키지는 다음 세 종류의 에셋을 제공합니다.
|
|
12
|
+
|
|
13
|
+
- **Basic Icon**: 단색 아이콘
|
|
14
|
+
- **Multi Icon**: 여러 색상을 사용하는 아이콘
|
|
15
|
+
- **Illustration**: 일러스트레이션
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @snorose/icons
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
React 18 또는 19 환경을 지원합니다.
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
모든 아이콘과 일러스트레이션은 package root에서 named export됩니다.
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { IconSearch } from '@snorose/icons';
|
|
39
|
+
|
|
40
|
+
function SearchButton() {
|
|
41
|
+
return <IconSearch />;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 크기 지정
|
|
46
|
+
|
|
47
|
+
별도의 `size` prop은 제공하지 않습니다.
|
|
48
|
+
|
|
49
|
+
SVG의 `width`, `height`를 사용해 크기를 지정합니다.
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { IconSearch } from '@snorose/icons';
|
|
53
|
+
|
|
54
|
+
function SearchButton() {
|
|
55
|
+
return <IconSearch width={24} height={24} />;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 색상 지정
|
|
60
|
+
|
|
61
|
+
`color` prop 또는 CSS의 `color` 속성을 통해 색상을 변경할 수 있습니다.
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<IconSearch width={24} height={24} color="#000000" />
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<IconSearch className="search-icon" />
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```css
|
|
72
|
+
.search-icon {
|
|
73
|
+
color: #000000;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Multi Icon과 Illustration은 자체 색상을 가지므로 일반적으로 `color`를 이용해 내부 색상을 변경하지 않습니다.
|
|
78
|
+
|
|
79
|
+
## Props
|
|
80
|
+
|
|
81
|
+
아이콘 컴포넌트는 SVG root element에 전달할 수 있는 일반적인 SVG props를 사용할 수 있습니다.
|
|
82
|
+
|
|
83
|
+
예:
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
<IconSearch
|
|
87
|
+
width={24}
|
|
88
|
+
height={24}
|
|
89
|
+
color="currentColor"
|
|
90
|
+
className="search-icon"
|
|
91
|
+
style={{ flexShrink: 0 }}
|
|
92
|
+
aria-hidden="true"
|
|
93
|
+
/>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
주로 사용하는 props는 다음과 같습니다.
|
|
97
|
+
|
|
98
|
+
- `width`
|
|
99
|
+
- `height`
|
|
100
|
+
- `color`
|
|
101
|
+
- `className`
|
|
102
|
+
- `style`
|
|
103
|
+
- `aria-*`
|
|
104
|
+
- `role`
|
|
105
|
+
- SVG element에서 사용할 수 있는 event handler
|
|
106
|
+
|
|
107
|
+
별도의 `size` prop과 ref forwarding은 지원하지 않습니다.
|
|
108
|
+
|
|
109
|
+
## Accessibility
|
|
110
|
+
|
|
111
|
+
아이콘 컴포넌트 자체에서 접근성 속성을 자동으로 지정하지 않습니다.
|
|
112
|
+
|
|
113
|
+
장식 목적으로만 사용하는 아이콘은 스크린 리더에서 제외할 수 있습니다.
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
<IconSearch aria-hidden="true" />
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
아이콘 자체가 의미를 전달해야 하는 경우 적절한 접근성 정보를 제공해야 합니다.
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
<IconSearch role="img" aria-label="검색" />
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
버튼 내부에서 아이콘을 사용하는 경우에는 가능하면 아이콘 자체보다 버튼에 접근 가능한 이름을 제공합니다.
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
<button type="button" aria-label="검색">
|
|
129
|
+
<IconSearch aria-hidden="true" />
|
|
130
|
+
</button>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Docs
|
|
134
|
+
|
|
135
|
+
- [@snorose-icons/naming-convention](docs/icon-naming-convention.md)
|
|
136
|
+
- [@snorose-icons/versioning-convention](docs/package-versioning-convention.md)
|
|
137
|
+
- [@snorose-icons/management](docs/icon-management.md)
|
|
138
|
+
- [@snorose-icons/release](docs/release-guide.md)
|
|
139
|
+
|
|
140
|
+
## Contributors
|
|
141
|
+
|
|
142
|
+

|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
This project is licensed under the [MIT License](LICENSE).
|