@lism-css/mcp 0.1.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 +76 -0
- package/bin/lism-mcp.mjs +2 -0
- package/dist/data/components.json +366 -0
- package/dist/data/docs-index.json +646 -0
- package/dist/data/meta.d.ts +2 -0
- package/dist/data/meta.js +5 -0
- package/dist/data/overview.json +80 -0
- package/dist/data/props-system.json +596 -0
- package/dist/data/tokens.json +131 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -0
- package/dist/lib/load-data.d.ts +3 -0
- package/dist/lib/load-data.js +29 -0
- package/dist/lib/response.d.ts +14 -0
- package/dist/lib/response.js +28 -0
- package/dist/lib/schemas.d.ts +232 -0
- package/dist/lib/schemas.js +65 -0
- package/dist/lib/search.d.ts +2 -0
- package/dist/lib/search.js +57 -0
- package/dist/lib/types.d.ts +76 -0
- package/dist/lib/types.js +1 -0
- package/dist/tools/get-component.d.ts +2 -0
- package/dist/tools/get-component.js +39 -0
- package/dist/tools/get-overview.d.ts +2 -0
- package/dist/tools/get-overview.js +50 -0
- package/dist/tools/get-props-system.d.ts +2 -0
- package/dist/tools/get-props-system.js +32 -0
- package/dist/tools/get-tokens.d.ts +2 -0
- package/dist/tools/get-tokens.js +19 -0
- package/dist/tools/search-docs.d.ts +2 -0
- package/dist/tools/search-docs.js +22 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Loos, Inc.
|
|
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,76 @@
|
|
|
1
|
+
# @lism-css/mcp
|
|
2
|
+
|
|
3
|
+
[Lism CSS](https://lism-css.com) の [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) サーバーです。
|
|
4
|
+
AI ツール(Claude Code, Cursor 等)が Lism CSS の最新ドキュメント・API を正確に参照できるようにします。
|
|
5
|
+
|
|
6
|
+
## できること
|
|
7
|
+
|
|
8
|
+
| ツール | 説明 |
|
|
9
|
+
|--------|------|
|
|
10
|
+
| `get_overview` | フレームワークの全体像(アーキテクチャ、CSS Layers、パッケージ構成、インストール方法) |
|
|
11
|
+
| `get_tokens` | デザイントークン(色、余白、フォントサイズ、影、角丸など)の一覧・カテゴリ絞り込み |
|
|
12
|
+
| `get_props_system` | Props システム対応表(React props → CSS クラス/スタイルの変換ルール) |
|
|
13
|
+
| `get_component` | コンポーネント詳細(props、使い方、サブコンポーネント構成) |
|
|
14
|
+
| `search_docs` | ドキュメント全文検索(キーワードによるスコアリング付き) |
|
|
15
|
+
|
|
16
|
+
## 聞けること(例)
|
|
17
|
+
|
|
18
|
+
- 「Lism CSS の基本的なアーキテクチャを教えて」→ `get_overview`
|
|
19
|
+
- 「spacing トークンの一覧を見せて」→ `get_tokens(category: "spacing")`
|
|
20
|
+
- 「`p` や `fz` などの省略 props は何に対応している?」→ `get_props_system(prop: "p")`
|
|
21
|
+
- 「Accordion コンポーネントの使い方は?」→ `get_component(name: "Accordion")`
|
|
22
|
+
- 「レスポンシブ対応の方法を調べて」→ `search_docs(query: "レスポンシブ")`
|
|
23
|
+
|
|
24
|
+
## セットアップ
|
|
25
|
+
|
|
26
|
+
### Claude Code
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add lism-css -- npx -y @lism-css/mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Cursor
|
|
33
|
+
|
|
34
|
+
`.cursor/mcp.json`:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"lism-css": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "@lism-css/mcp"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Windsurf
|
|
48
|
+
|
|
49
|
+
`.windsurf/mcp.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"lism-css": {
|
|
55
|
+
"command": "npx",
|
|
56
|
+
"args": ["-y", "@lism-css/mcp"]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### VS Code (GitHub Copilot)
|
|
63
|
+
|
|
64
|
+
`.vscode/mcp.json`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"servers": {
|
|
69
|
+
"lism-css": {
|
|
70
|
+
"type": "stdio",
|
|
71
|
+
"command": "npx",
|
|
72
|
+
"args": ["-y", "@lism-css/mcp"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
package/bin/lism-mcp.mjs
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "Lism",
|
|
4
|
+
"package": "lism-css",
|
|
5
|
+
"category": "core",
|
|
6
|
+
"description": "全コンポーネントの基盤となるコアコンポーネント。Props システムによる CSS クラス・スタイルの自動変換を提供する。他の全てのコンポーネントは Lism を継承している。",
|
|
7
|
+
"props": [
|
|
8
|
+
{ "name": "tag", "type": "string", "default": "div", "description": "レンダリングするHTML要素を指定。" },
|
|
9
|
+
{ "name": "as", "type": "Component", "description": "外部コンポーネントとしてレンダリング。" },
|
|
10
|
+
{ "name": "layout", "type": "string", "description": "レイアウトモジュールを適用 (flex, grid 等)。" },
|
|
11
|
+
{ "name": "lismClass", "type": "string", "description": "メインのコンポーネントクラスを指定。" },
|
|
12
|
+
{ "name": "variant", "type": "string", "description": "モジュールクラスのバリエーションを指定。" },
|
|
13
|
+
{ "name": "exProps", "type": "object", "description": "Lism処理をバイパスして直接渡すprops。" }
|
|
14
|
+
],
|
|
15
|
+
"usage": "<Lism tag='section' p='20' bgc='base-2'>Content</Lism>"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "HTML",
|
|
19
|
+
"package": "lism-css",
|
|
20
|
+
"category": "core",
|
|
21
|
+
"description": "HTMLの主要なタグに<Lism>と同じプロパティを指定できるようにするためのコンポーネント。HTML.div, HTML.p, HTML.span, HTML.a, HTML.h, HTML.ul, HTML.ol, HTML.li, HTML.button が利用可能。例えば <HTML.p> は <Lism tag='p'> と同じように動作する。",
|
|
22
|
+
"props": [
|
|
23
|
+
{ "name": "lv", "type": "'1' | '2' | '3' | '4' | '5' | '6'", "default": "1", "description": "HTML.h で使用。見出しレベルを指定する。" }
|
|
24
|
+
],
|
|
25
|
+
"usage": "<HTML.p fz='l' c='text-2'>Text</HTML.p>"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "Dummy",
|
|
29
|
+
"package": "lism-css",
|
|
30
|
+
"category": "core",
|
|
31
|
+
"description": "ダミーテキストを生成するコンポーネント。プレビューやテスト用に使用。",
|
|
32
|
+
"props": [
|
|
33
|
+
{ "name": "lang", "type": "'ja' | 'en'", "default": "en", "description": "ダミーテキストの言語。" },
|
|
34
|
+
{ "name": "length", "type": "string", "default": "m", "description": "テキストの長さ。" }
|
|
35
|
+
],
|
|
36
|
+
"usage": "<Dummy lang='ja' />"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Box",
|
|
40
|
+
"package": "lism-css",
|
|
41
|
+
"category": "layout",
|
|
42
|
+
"description": "最も基本的なレイアウトモジュール。汎用的なボックス要素として使用。l--box クラスが付与される。",
|
|
43
|
+
"props": [],
|
|
44
|
+
"usage": "<Box p='20' bgc='base-2'>Content</Box>"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "Flex",
|
|
48
|
+
"package": "lism-css",
|
|
49
|
+
"category": "layout",
|
|
50
|
+
"description": "Flexboxレイアウトを構成するコンポーネント。display: flex が適用される。",
|
|
51
|
+
"props": [
|
|
52
|
+
{ "name": "fxw", "type": "string | array", "description": "flex-wrap の値。" },
|
|
53
|
+
{ "name": "fxd", "type": "string | array", "description": "flex-direction の値。" },
|
|
54
|
+
{ "name": "ai", "type": "string | array", "description": "align-items の値。" },
|
|
55
|
+
{ "name": "jc", "type": "string | array", "description": "justify-content の値。" }
|
|
56
|
+
],
|
|
57
|
+
"usage": "<Flex g='20' ai='center' jc='center'>...</Flex>"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "Stack",
|
|
61
|
+
"package": "lism-css",
|
|
62
|
+
"category": "layout",
|
|
63
|
+
"description": "縦方向に要素を積み重ねるFlexレイアウト。flex-direction: column のFlex。",
|
|
64
|
+
"props": [],
|
|
65
|
+
"usage": "<Stack g='20'>...</Stack>"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "Grid",
|
|
69
|
+
"package": "lism-css",
|
|
70
|
+
"category": "layout",
|
|
71
|
+
"description": "CSS Gridレイアウトを構成するコンポーネント。display: grid が適用される。",
|
|
72
|
+
"props": [
|
|
73
|
+
{ "name": "gt", "type": "string | array", "description": "grid-template の値。" },
|
|
74
|
+
{ "name": "gtc", "type": "string | array", "description": "grid-template-columns の値。" },
|
|
75
|
+
{ "name": "gtr", "type": "string | array", "description": "grid-template-rows の値。" },
|
|
76
|
+
{ "name": "cols", "type": "string | number | array", "description": "列数を指定する変数。" },
|
|
77
|
+
{ "name": "rows", "type": "string | number | array", "description": "行数を指定する変数。" }
|
|
78
|
+
],
|
|
79
|
+
"usage": "<Grid gtc='1fr 1fr' g='20'>...</Grid>"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Center",
|
|
83
|
+
"package": "lism-css",
|
|
84
|
+
"category": "layout",
|
|
85
|
+
"description": "子要素を中央揃えにするレイアウトコンポーネント。place-items: center の Grid。",
|
|
86
|
+
"props": [],
|
|
87
|
+
"usage": "<Center p='40' h='200px'>Centered Content</Center>"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "Cluster",
|
|
91
|
+
"package": "lism-css",
|
|
92
|
+
"category": "layout",
|
|
93
|
+
"description": "横方向に要素を並べ、自動的に折り返すFlexレイアウト。タグやバッジの並びに適している。",
|
|
94
|
+
"props": [],
|
|
95
|
+
"usage": "<Cluster g='10'>...</Cluster>"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "Columns",
|
|
99
|
+
"package": "lism-css",
|
|
100
|
+
"category": "layout",
|
|
101
|
+
"description": "均等幅のカラムレイアウト。cols で列数を指定する Grid。",
|
|
102
|
+
"props": [{ "name": "cols", "type": "number | array", "description": "列数。レスポンシブ対応可能。" }],
|
|
103
|
+
"usage": "<Columns cols={[1, 2, 3]} g='20'>...</Columns>"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "Flow",
|
|
107
|
+
"package": "lism-css",
|
|
108
|
+
"category": "layout",
|
|
109
|
+
"description": "コンテンツフロー用のレイアウト。子要素間に一定の余白を設ける。記事本文のような縦方向のフローコンテンツに適している。",
|
|
110
|
+
"props": [{ "name": "flow", "type": "string", "description": "フロー方向の余白サイズ ('s' または 'l')。" }],
|
|
111
|
+
"usage": "<Flow flow='s'>...</Flow>"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "FluidCols",
|
|
115
|
+
"package": "lism-css",
|
|
116
|
+
"category": "layout",
|
|
117
|
+
"description": "子要素が最小幅に達すると自動的に折り返すグリッドレイアウト。メディアクエリに依存しない流動的なカラムレイアウト。",
|
|
118
|
+
"props": [{ "name": "cols", "type": "string", "description": "各カラムの最小幅 (例: '320px')。" }],
|
|
119
|
+
"usage": "<FluidCols cols='320px' g='20'>...</FluidCols>"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "Frame",
|
|
123
|
+
"package": "lism-css",
|
|
124
|
+
"category": "layout",
|
|
125
|
+
"description": "アスペクト比を維持するフレーム要素。画像や動画のコンテナとして使用。",
|
|
126
|
+
"props": [{ "name": "ar", "type": "string | array", "description": "アスペクト比。" }],
|
|
127
|
+
"usage": "<Frame ar='16/9'>...</Frame>"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "SwitchCols",
|
|
131
|
+
"package": "lism-css",
|
|
132
|
+
"category": "layout",
|
|
133
|
+
"description": "一定の幅で自動的に1カラムと複数カラムを切り替えるレイアウト。メディアクエリに依存しない。",
|
|
134
|
+
"props": [{ "name": "breakSize", "type": "string", "description": "切り替えポイントとなる幅 (例: 's')。" }],
|
|
135
|
+
"usage": "<SwitchCols breakSize='s' g='20'>...</SwitchCols>"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "SideMain",
|
|
139
|
+
"package": "lism-css",
|
|
140
|
+
"category": "layout",
|
|
141
|
+
"description": "サイドバー + メインコンテンツの2カラムレイアウト。メイン側が可変幅。",
|
|
142
|
+
"props": [
|
|
143
|
+
{ "name": "sideW", "type": "string", "description": "サイドバーの幅。" },
|
|
144
|
+
{ "name": "mainW", "type": "string", "description": "メインエリアの最小幅。" }
|
|
145
|
+
],
|
|
146
|
+
"usage": "<SideMain sideW='240px'>...</SideMain>"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "Container",
|
|
150
|
+
"package": "lism-css",
|
|
151
|
+
"category": "layout",
|
|
152
|
+
"description": "コンテナクエリの基準要素。子要素のレスポンシブ対応の基準となる。is--container クラスが付与される。",
|
|
153
|
+
"props": [],
|
|
154
|
+
"usage": "<Container>...</Container>"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "Layer",
|
|
158
|
+
"package": "lism-css",
|
|
159
|
+
"category": "layout",
|
|
160
|
+
"description": "親要素に対して絶対配置で重なるレイヤー要素。オーバーレイや背景装飾に使用。is--layer クラスが付与される。",
|
|
161
|
+
"props": [],
|
|
162
|
+
"usage": "<Layer bgc='black' o='-30'>Overlay</Layer>"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "LinkBox",
|
|
166
|
+
"package": "lism-css",
|
|
167
|
+
"category": "layout",
|
|
168
|
+
"description": "ボックス全体をリンク領域にするコンポーネント。カード全体をクリッカブルにする場合等に使用。",
|
|
169
|
+
"props": [{ "name": "href", "type": "string", "description": "リンク先URL。" }],
|
|
170
|
+
"usage": "<LinkBox href='/path'>Clickable Card</LinkBox>"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "Wrapper",
|
|
174
|
+
"package": "lism-css",
|
|
175
|
+
"category": "layout",
|
|
176
|
+
"description": "コンテンツ幅を制限するラッパー要素。is--wrapper クラスが付与される。",
|
|
177
|
+
"props": [{ "name": "isWrapper", "type": "boolean | string", "description": "ラッパーのサイズバリエーション (s, l)。" }],
|
|
178
|
+
"usage": "<Wrapper isWrapper>...</Wrapper>"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "Icon",
|
|
182
|
+
"package": "lism-css",
|
|
183
|
+
"category": "atomic",
|
|
184
|
+
"description": "アイコンを表示するコンポーネント。SVGアイコンやアイコンコンポーネントを統一的に扱える。a--icon クラスが付与される。",
|
|
185
|
+
"props": [
|
|
186
|
+
{ "name": "icon", "type": "ReactNode | string", "description": "アイコン要素またはSVG文字列。" },
|
|
187
|
+
{ "name": "size", "type": "string", "description": "アイコンサイズ。" }
|
|
188
|
+
],
|
|
189
|
+
"usage": "<Icon icon={SomeIcon} size='1.5em' />"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "Divider",
|
|
193
|
+
"package": "lism-css",
|
|
194
|
+
"category": "atomic",
|
|
195
|
+
"description": "区切り線を表示するコンポーネント。a--divider クラスが付与される。",
|
|
196
|
+
"props": [{ "name": "variant", "type": "string", "description": "区切り線のバリエーション。" }],
|
|
197
|
+
"usage": "<Divider />"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "Media",
|
|
201
|
+
"package": "lism-css",
|
|
202
|
+
"category": "atomic",
|
|
203
|
+
"description": "img, video, iframe 等のメディア要素を統一的に扱うコンポーネント。a--media クラスが付与される。",
|
|
204
|
+
"props": [
|
|
205
|
+
{ "name": "tag", "type": "'img' | 'video' | 'iframe'", "default": "img", "description": "メディア要素の種類。" },
|
|
206
|
+
{ "name": "src", "type": "string", "description": "メディアのURL。" },
|
|
207
|
+
{ "name": "alt", "type": "string", "description": "代替テキスト (img の場合)。" }
|
|
208
|
+
],
|
|
209
|
+
"usage": "<Media src='/image.jpg' alt='Photo' />"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "Spacer",
|
|
213
|
+
"package": "lism-css",
|
|
214
|
+
"category": "atomic",
|
|
215
|
+
"description": "空白を挿入するコンポーネント。a--spacer クラスが付与される。",
|
|
216
|
+
"props": [{ "name": "h", "type": "string | number", "description": "高さ (スペーシングトークン値)。" }],
|
|
217
|
+
"usage": "<Spacer h='40' />"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "Decorator",
|
|
221
|
+
"package": "lism-css",
|
|
222
|
+
"category": "atomic",
|
|
223
|
+
"description": "装飾用のコンポーネント。視覚的な装飾要素を追加するために使用。a--decorator クラスが付与される。",
|
|
224
|
+
"props": [],
|
|
225
|
+
"usage": "<Decorator bdrs='99' bgc='accent' w='40px' h='40px' />"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "Accordion",
|
|
229
|
+
"package": "@lism-css/ui",
|
|
230
|
+
"category": "interactive",
|
|
231
|
+
"description": "アコーディオン UI。クリックでコンテンツの開閉を切り替える。JavaScriptが付属。サブコンポーネント構造: Accordion.Root > Accordion.Item > (Accordion.Heading > Accordion.Button) + Accordion.Panel。",
|
|
232
|
+
"props": [
|
|
233
|
+
{ "name": "allowMultiple", "type": "boolean", "description": "複数のアイテムを同時に開くことを許可 (Root)。" },
|
|
234
|
+
{ "name": "tag", "type": "string", "description": "見出しのHTMLタグ (Heading)。" },
|
|
235
|
+
{ "name": "flow", "type": "string", "description": "パネル内のコンテンツフロー余白 (Panel)。" }
|
|
236
|
+
],
|
|
237
|
+
"usage": "<Accordion.Root>\n <Accordion.Item>\n <Accordion.Heading>\n <Accordion.Button>Label</Accordion.Button>\n </Accordion.Heading>\n <Accordion.Panel>Content</Accordion.Panel>\n </Accordion.Item>\n</Accordion.Root>"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "Modal",
|
|
241
|
+
"package": "@lism-css/ui",
|
|
242
|
+
"category": "interactive",
|
|
243
|
+
"description": "モーダルダイアログ UI。dialog 要素を使用。JavaScriptが付属。サブコンポーネント構造: Modal.OpenBtn + Modal.Root > Modal.Inner > Modal.Body + Modal.CloseBtn。",
|
|
244
|
+
"props": [
|
|
245
|
+
{ "name": "id", "type": "string", "description": "モーダルのID (Root, 必須)。" },
|
|
246
|
+
{ "name": "modalId", "type": "string", "description": "対象モーダルのID (OpenBtn/CloseBtn)。" }
|
|
247
|
+
],
|
|
248
|
+
"usage": "<Modal.OpenBtn modalId='modal-01'>Open</Modal.OpenBtn>\n<Modal.Root id='modal-01'>\n <Modal.Inner p='30'>\n <Modal.Body>Content</Modal.Body>\n <Modal.CloseBtn modalId='modal-01'>Close</Modal.CloseBtn>\n </Modal.Inner>\n</Modal.Root>"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "Tabs",
|
|
252
|
+
"package": "@lism-css/ui",
|
|
253
|
+
"category": "interactive",
|
|
254
|
+
"description": "タブ切り替え UI。タブをクリックしてコンテンツパネルを切り替える。JavaScriptが付属。サブコンポーネント構造: Tabs.Root > Tabs.Item > (Tabs.Tab + Tabs.Panel)。",
|
|
255
|
+
"props": [
|
|
256
|
+
{ "name": "tabId", "type": "string", "description": "タブのID (aria-controls用)。" },
|
|
257
|
+
{ "name": "defaultIndex", "type": "number", "default": "1", "description": "初期アクティブタブ (1始まり)。" },
|
|
258
|
+
{ "name": "variant", "type": "string", "description": "スタイルバリエーション。" }
|
|
259
|
+
],
|
|
260
|
+
"usage": "<Tabs.Root>\n <Tabs.Item>\n <Tabs.Tab>Tab 1</Tabs.Tab>\n <Tabs.Panel>Content 1</Tabs.Panel>\n </Tabs.Item>\n <Tabs.Item>\n <Tabs.Tab>Tab 2</Tabs.Tab>\n <Tabs.Panel>Content 2</Tabs.Panel>\n </Tabs.Item>\n</Tabs.Root>"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "Details",
|
|
264
|
+
"package": "@lism-css/ui",
|
|
265
|
+
"category": "interactive",
|
|
266
|
+
"description": "HTMLの details/summary 要素をラップしたコンポーネント。アコーディオンと似ているが、ネイティブのHTML要素を使用。",
|
|
267
|
+
"props": [
|
|
268
|
+
{ "name": "label", "type": "string | ReactNode", "description": "Summary のラベルテキスト。" },
|
|
269
|
+
{ "name": "open", "type": "boolean", "description": "初期状態で開いているかどうか。" }
|
|
270
|
+
],
|
|
271
|
+
"usage": "<Details label='Details'>Hidden content</Details>"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "Alert",
|
|
275
|
+
"package": "@lism-css/ui",
|
|
276
|
+
"category": "feedback",
|
|
277
|
+
"description": "注意書きやお知らせを目立たせるアラートボックス。アイコンとキーカラーでバリエーションを表現。",
|
|
278
|
+
"props": [
|
|
279
|
+
{
|
|
280
|
+
"name": "type",
|
|
281
|
+
"type": "'alert' | 'point' | 'warning' | 'check' | 'info' | 'help'",
|
|
282
|
+
"description": "アラートタイプ (プリセットアイコンとカラーが適用される)。"
|
|
283
|
+
},
|
|
284
|
+
{ "name": "keycolor", "type": "string", "description": "アラートのキーカラー。" },
|
|
285
|
+
{ "name": "icon", "type": "ReactNode | string", "description": "カスタムアイコン。" },
|
|
286
|
+
{ "name": "layout", "type": "'flex' | 'sideMain'", "description": "レイアウトモジュール。" }
|
|
287
|
+
],
|
|
288
|
+
"usage": "<Alert type='warning'>Warning message</Alert>"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "Callout",
|
|
292
|
+
"package": "@lism-css/ui",
|
|
293
|
+
"category": "feedback",
|
|
294
|
+
"description": "コールアウト (補足情報) ボックス。Alertと似ているが、より強調度の高いデザイン。",
|
|
295
|
+
"props": [
|
|
296
|
+
{ "name": "keycolor", "type": "string", "description": "コールアウトのキーカラー。" },
|
|
297
|
+
{ "name": "icon", "type": "ReactNode | string", "description": "コールアウトのアイコン。" }
|
|
298
|
+
],
|
|
299
|
+
"usage": "<Callout keycolor='yellow' icon={WarningIcon}>Important note</Callout>"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "Button",
|
|
303
|
+
"package": "@lism-css/ui",
|
|
304
|
+
"category": "action",
|
|
305
|
+
"description": "ボタンコンポーネント。c--button クラスが付与される。バリエーション (outline 等) をサポート。",
|
|
306
|
+
"props": [
|
|
307
|
+
{ "name": "variant", "type": "string", "description": "ボタンのバリエーション (outline 等)。" },
|
|
308
|
+
{ "name": "keycolor", "type": "string", "description": "ボタンのキーカラー。" },
|
|
309
|
+
{ "name": "href", "type": "string", "description": "リンク先URL。指定するとa要素としてレンダリング。" }
|
|
310
|
+
],
|
|
311
|
+
"usage": "<Button variant='outline' keycolor='brand'>Click me</Button>"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "Badge",
|
|
315
|
+
"package": "@lism-css/ui",
|
|
316
|
+
"category": "display",
|
|
317
|
+
"description": "バッジ (ラベル) コンポーネント。カテゴリやステータスの表示に使用。",
|
|
318
|
+
"props": [
|
|
319
|
+
{ "name": "variant", "type": "string", "description": "バッジのバリエーション。" },
|
|
320
|
+
{ "name": "keycolor", "type": "string", "description": "バッジのキーカラー。" }
|
|
321
|
+
],
|
|
322
|
+
"usage": "<Badge keycolor='green'>New</Badge>"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "Avatar",
|
|
326
|
+
"package": "@lism-css/ui",
|
|
327
|
+
"category": "display",
|
|
328
|
+
"description": "アバター (プロフィール画像) コンポーネント。円形の画像表示に使用。",
|
|
329
|
+
"props": [
|
|
330
|
+
{ "name": "src", "type": "string", "description": "画像URL。" },
|
|
331
|
+
{ "name": "alt", "type": "string", "description": "代替テキスト。" },
|
|
332
|
+
{ "name": "size", "type": "string", "description": "アバターのサイズ。" }
|
|
333
|
+
],
|
|
334
|
+
"usage": "<Avatar src='/avatar.jpg' alt='User' size='48px' />"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "Chat",
|
|
338
|
+
"package": "@lism-css/ui",
|
|
339
|
+
"category": "display",
|
|
340
|
+
"description": "チャット風の吹き出しコンポーネント。会話形式のUI表現に使用。",
|
|
341
|
+
"props": [
|
|
342
|
+
{ "name": "name", "type": "string", "description": "発言者の名前。" },
|
|
343
|
+
{ "name": "avatar", "type": "string | ReactNode", "description": "アバター画像。" }
|
|
344
|
+
],
|
|
345
|
+
"usage": "<Chat name='Alice' avatar='/alice.jpg'>Hello!</Chat>"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "NavMenu",
|
|
349
|
+
"package": "@lism-css/ui",
|
|
350
|
+
"category": "navigation",
|
|
351
|
+
"description": "ナビゲーションメニューコンポーネント。リンクリストの表示に使用。",
|
|
352
|
+
"props": [],
|
|
353
|
+
"usage": "<NavMenu>\n <NavMenuItem href='/'>Home</NavMenuItem>\n <NavMenuItem href='/about'>About</NavMenuItem>\n</NavMenu>"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "ShapeDivider",
|
|
357
|
+
"package": "@lism-css/ui",
|
|
358
|
+
"category": "decoration",
|
|
359
|
+
"description": "セクション間の波型などの装飾的な区切り要素。SVGベースの形状で区切りを表現。",
|
|
360
|
+
"props": [
|
|
361
|
+
{ "name": "shape", "type": "string", "description": "区切りの形状。" },
|
|
362
|
+
{ "name": "isFlip", "type": "boolean", "description": "形状を上下反転するか。" }
|
|
363
|
+
],
|
|
364
|
+
"usage": "<ShapeDivider shape='wave' />"
|
|
365
|
+
}
|
|
366
|
+
]
|