@zenkigen-inc/component-icons 1.14.3 → 1.14.5
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/README.md +77 -0
- package/dist/icon.d.ts +3 -2
- package/dist/icons/add.d.ts +2 -0
- package/dist/icons/ai.d.ts +2 -0
- package/dist/icons/angle-down.d.ts +2 -0
- package/dist/icons/angle-left.d.ts +2 -0
- package/dist/icons/angle-right.d.ts +2 -0
- package/dist/icons/angle-small-down.d.ts +2 -0
- package/dist/icons/angle-small-up.d.ts +2 -0
- package/dist/icons/angle-up.d.ts +2 -0
- package/dist/icons/arrow-down.d.ts +2 -0
- package/dist/icons/arrow-left.d.ts +2 -0
- package/dist/icons/arrow-right.d.ts +2 -0
- package/dist/icons/arrow-up.d.ts +2 -0
- package/dist/icons/attachment.d.ts +2 -0
- package/dist/icons/attention.d.ts +2 -0
- package/dist/icons/building.d.ts +2 -0
- package/dist/icons/calendar-check.d.ts +2 -0
- package/dist/icons/calendar-draft.d.ts +2 -0
- package/dist/icons/calendar-minus.d.ts +2 -0
- package/dist/icons/calendar-today.d.ts +2 -0
- package/dist/icons/calendar.d.ts +2 -0
- package/dist/icons/caret-down.d.ts +2 -0
- package/dist/icons/caret-right.d.ts +2 -0
- package/dist/icons/chart-bar.d.ts +2 -0
- package/dist/icons/chart-line.d.ts +2 -0
- package/dist/icons/check.d.ts +2 -0
- package/dist/icons/circle.d.ts +2 -0
- package/dist/icons/close.d.ts +2 -0
- package/dist/icons/comment.d.ts +2 -0
- package/dist/icons/contract.d.ts +2 -0
- package/dist/icons/copy.d.ts +2 -0
- package/dist/icons/delete.d.ts +2 -0
- package/dist/icons/document.d.ts +2 -0
- package/dist/icons/documents.d.ts +2 -0
- package/dist/icons/double circle.d.ts +2 -0
- package/dist/icons/download-document.d.ts +2 -0
- package/dist/icons/download.d.ts +2 -0
- package/dist/icons/edit.d.ts +2 -0
- package/dist/icons/email.d.ts +2 -0
- package/dist/icons/expand.d.ts +2 -0
- package/dist/icons/external-link.d.ts +2 -0
- package/dist/icons/filter.d.ts +2 -0
- package/dist/icons/flag.d.ts +2 -0
- package/dist/icons/global.d.ts +2 -0
- package/dist/icons/graph-line.d.ts +2 -0
- package/dist/icons/hamburger-close.d.ts +2 -0
- package/dist/icons/hamburger.d.ts +2 -0
- package/dist/icons/help.d.ts +2 -0
- package/dist/icons/hint.d.ts +2 -0
- package/dist/icons/home.d.ts +2 -0
- package/dist/icons/image.d.ts +2 -0
- package/dist/icons/information-filled.d.ts +2 -0
- package/dist/icons/information.d.ts +2 -0
- package/dist/icons/input-delete.d.ts +2 -0
- package/dist/icons/link.d.ts +2 -0
- package/dist/icons/list.d.ts +2 -0
- package/dist/icons/logout.d.ts +2 -0
- package/dist/icons/message-text.d.ts +2 -0
- package/dist/icons/more.d.ts +2 -0
- package/dist/icons/movie.d.ts +2 -0
- package/dist/icons/notification.d.ts +2 -0
- package/dist/icons/pause.d.ts +2 -0
- package/dist/icons/pdf.d.ts +2 -0
- package/dist/icons/picture-in-picture.d.ts +2 -0
- package/dist/icons/play-filled.d.ts +2 -0
- package/dist/icons/play.d.ts +2 -0
- package/dist/icons/presentation.d.ts +2 -0
- package/dist/icons/remove.d.ts +2 -0
- package/dist/icons/score.d.ts +2 -0
- package/dist/icons/search.d.ts +2 -0
- package/dist/icons/send.d.ts +2 -0
- package/dist/icons/share.d.ts +2 -0
- package/dist/icons/shuffle.d.ts +2 -0
- package/dist/icons/sidebar.d.ts +2 -0
- package/dist/icons/slider-editing.d.ts +2 -0
- package/dist/icons/sort-down.d.ts +2 -0
- package/dist/icons/sort-up.d.ts +2 -0
- package/dist/icons/sort.d.ts +2 -0
- package/dist/icons/sparkle.d.ts +2 -0
- package/dist/icons/star-filled.d.ts +2 -0
- package/dist/icons/star.d.ts +2 -0
- package/dist/icons/store.d.ts +2 -0
- package/dist/icons/success-filled.d.ts +2 -0
- package/dist/icons/table-download.d.ts +2 -0
- package/dist/icons/table-upload.d.ts +2 -0
- package/dist/icons/table.d.ts +2 -0
- package/dist/icons/timer.d.ts +2 -0
- package/dist/icons/transcription.d.ts +2 -0
- package/dist/icons/triangle.d.ts +2 -0
- package/dist/icons/upload.d.ts +2 -0
- package/dist/icons/user-add.d.ts +2 -0
- package/dist/icons/user-group.d.ts +2 -0
- package/dist/icons/user-line.d.ts +2 -0
- package/dist/icons/user-multi.d.ts +2 -0
- package/dist/icons/user-one.d.ts +2 -0
- package/dist/icons/user-photograph.d.ts +2 -0
- package/dist/icons/user-remove.d.ts +2 -0
- package/dist/icons/user.d.ts +2 -0
- package/dist/icons/video.d.ts +2 -0
- package/dist/icons/volume-off.d.ts +2 -0
- package/dist/icons/volume.d.ts +2 -0
- package/dist/icons/warning.d.ts +2 -0
- package/dist/index.esm.js +1380 -1387
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1380 -1387
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# @zenkigen-inc/component-icons
|
|
2
2
|
|
|
3
|
+
コンポーネントで使用するアイコンを管理するパッケージです。
|
|
4
|
+
|
|
5
|
+
## 使い方
|
|
6
|
+
|
|
7
|
+
インストール:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
yarn add @zenkigen-inc/component-icons
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
アイコンのインポート:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { iconElements } from '@zenkigen-inc/component-icons';
|
|
17
|
+
|
|
18
|
+
// アイコンを表示する
|
|
19
|
+
<div>{iconElements['add']}</div>;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## SVGアイコンの追加方法
|
|
23
|
+
|
|
24
|
+
新しいSVGアイコンを追加するには、以下の手順に従ってください。
|
|
25
|
+
|
|
26
|
+
### 1. SVGファイルの準備
|
|
27
|
+
|
|
28
|
+
SVGファイルは以下の条件を満たす必要があります:
|
|
29
|
+
|
|
30
|
+
- サイズ: 基本的に24x24サイズを推奨
|
|
31
|
+
- 命名: キャメルケースまたはケバブケース (例: `arrow-right.svg`、`userAdd.svg`)
|
|
32
|
+
- フォーマット: 基本的なSVG構造を持つこと
|
|
33
|
+
|
|
34
|
+
以下は適切なSVGファイルの例です:
|
|
35
|
+
|
|
36
|
+
```svg
|
|
37
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
38
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.276 12.724H4.72399C4.3258 12.724 4 12.3982 4 12C4 11.6018 4.3258 11.276 4.72399 11.276H11.276V4.72398C11.276 4.32579 11.6018 4 12 4C12.3982 4 12.724 4.32579 12.724 4.72398V11.276H19.276C19.6742 11.276 20 11.6018 20 12C20 12.3982 19.6742 12.724 19.276 12.724H12.724V19.276C12.724 19.6742 12.3982 20 12 20C11.6018 20 11.276 19.6742 11.276 19.276V12.724Z" fill="#7C868A"/>
|
|
39
|
+
</svg>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
> **注意**: `fill`属性はコード生成時に削除されるため、アイコン表示時のスタイルに影響しません。
|
|
43
|
+
|
|
44
|
+
### 2. SVGファイルの配置
|
|
45
|
+
|
|
46
|
+
準備したSVGファイルを以下のディレクトリに配置します:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
packages/component-icons/src/svg/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3. ビルド実行
|
|
53
|
+
|
|
54
|
+
以下のコマンドを実行してアイコンをビルドします:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
yarn build:all
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
このビルドプロセスで以下の処理が行われます:
|
|
61
|
+
|
|
62
|
+
1. `codegen.cjs` スクリプトが実行され、SVGフォルダ内のファイルが読み込まれます
|
|
63
|
+
2. 各SVGファイルから不要な属性が削除されます
|
|
64
|
+
3. テンプレートを使用して `icon.tsx` が生成されます
|
|
65
|
+
4. パッケージがビルドされます
|
|
66
|
+
|
|
67
|
+
### 4. アイコンの利用
|
|
68
|
+
|
|
69
|
+
ビルド後、追加したアイコンは `iconElements` オブジェクトから使用できます:
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { iconElements } from '@zenkigen-inc/component-icons';
|
|
73
|
+
|
|
74
|
+
// 追加したアイコンを表示
|
|
75
|
+
<div>{iconElements['new-icon-name']}</div>;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
アイコン名は、ファイル名から拡張子を除いたものになります (例: `arrow-right.svg` → `'arrow-right'`)
|
|
79
|
+
|
|
3
80
|
## ライセンス
|
|
4
81
|
|
|
5
82
|
@zenkigen-inc/component-icons は MIT ライセンスに基づいています。
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type IconName = 'warning' | 'volume' | 'volume-off' | 'video' | 'user' | 'user-remove' | 'user-photograph' | 'user-one' | 'user-multi' | 'user-line' | 'user-group' | 'user-add' | 'upload' | 'triangle' | 'transcription' | 'timer' | 'table' | 'table-upload' | 'table-download' | 'success-filled' | 'store' | 'star' | 'star-filled' | 'sparkle' | 'sort' | 'sort-up' | 'sort-down' | 'slider-editing' | 'sidebar' | 'shuffle' | 'share' | 'send' | 'search' | 'score' | 'remove' | 'presentation' | 'play' | 'play-filled' | 'picture-in-picture' | 'pdf' | 'pause' | 'notification' | 'movie' | 'more' | 'message-text' | 'logout' | 'list' | 'link' | 'input-delete' | 'information' | 'information-filled' | 'image' | 'home' | 'hint' | 'help' | 'hamburger' | 'hamburger-close' | 'graph-line' | 'global' | 'flag' | 'filter' | 'external-link' | 'expand' | 'email' | 'edit' | 'download' | 'download-document' | 'double circle' | 'documents' | 'document' | 'delete' | 'copy' | 'contract' | 'comment' | 'close' | 'circle' | 'check' | 'chart-line' | 'chart-bar' | 'caret-right' | 'caret-down' | 'calendar' | 'calendar-today' | 'calendar-minus' | 'calendar-draft' | 'calendar-check' | 'building' | 'attention' | 'attachment' | 'arrow-up' | 'arrow-right' | 'arrow-left' | 'arrow-down' | 'angle-up' | 'angle-small-up' | 'angle-small-down' | 'angle-right' | 'angle-left' | 'angle-down' | 'ai' | 'add';
|
|
2
3
|
export type IconElements = Readonly<{
|
|
3
|
-
[name in IconName]:
|
|
4
|
+
[name in IconName]: React.ReactElement;
|
|
4
5
|
}>;
|
|
5
6
|
export declare const iconElements: IconElements;
|