futsuno-ui 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/README.md +199 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1386 -0
- package/dist/index.js.map +1 -0
- package/dist/lp/index.d.ts +375 -0
- package/dist/lp/index.js +1136 -0
- package/dist/lp/index.js.map +1 -0
- package/dist/styles.css +131 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/tokens/index.d.ts +432 -0
- package/dist/tokens/index.js +252 -0
- package/dist/tokens/index.js.map +1 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Futsuno UI Design System
|
|
2
|
+
|
|
3
|
+
ふつうのショップ([futsuno.shop](https://futsuno.shop/))のD2Cブランド向けデザインシステム。
|
|
4
|
+
|
|
5
|
+
## 概要
|
|
6
|
+
|
|
7
|
+
このデザインシステムは、ecforceのテーマ管理とLP管理に対応するReactコンポーネントライブラリです。Figma Makeとの連携を想定して設計されており、Atomic Design方法論に基づいて構成されています。
|
|
8
|
+
|
|
9
|
+
## インストール
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install futsuno-ui
|
|
13
|
+
# or
|
|
14
|
+
pnpm add futsuno-ui
|
|
15
|
+
# or
|
|
16
|
+
yarn add futsuno-ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 使用方法
|
|
20
|
+
|
|
21
|
+
### デザイントークン
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { colors, typography, spacing } from 'futsuno-ui/tokens';
|
|
25
|
+
|
|
26
|
+
// カラートークンの使用
|
|
27
|
+
console.log(colors.accent.gold); // #978E5F
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### LP用コンポーネント
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import {
|
|
34
|
+
// Atoms
|
|
35
|
+
Button,
|
|
36
|
+
Text,
|
|
37
|
+
Image,
|
|
38
|
+
// Molecules
|
|
39
|
+
UserVoice,
|
|
40
|
+
FaqParts,
|
|
41
|
+
// Organisms
|
|
42
|
+
KeyVisual,
|
|
43
|
+
Cta,
|
|
44
|
+
Faq,
|
|
45
|
+
// Templates
|
|
46
|
+
ProductLpTemplate
|
|
47
|
+
} from 'futsuno-ui/lp';
|
|
48
|
+
|
|
49
|
+
function LandingPage() {
|
|
50
|
+
return (
|
|
51
|
+
<ProductLpTemplate
|
|
52
|
+
keyVisual={{
|
|
53
|
+
copyLines: ['食卓を特別な時間に', '600年の歴史を持つ調味料'],
|
|
54
|
+
backgroundImage: '/images/hero.jpg',
|
|
55
|
+
}}
|
|
56
|
+
cta={{
|
|
57
|
+
productName: '煎り酒',
|
|
58
|
+
productPrice: '¥1,700',
|
|
59
|
+
buttonText: '購入する',
|
|
60
|
+
}}
|
|
61
|
+
faqItems={[
|
|
62
|
+
{ question: '賞味期限は?', answer: '製造日より1年間です。' }
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Theme用コンポーネント(将来実装)
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { Header, Footer } from 'futsuno-ui/theme';
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## ディレクトリ構成(Atomic Design)
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
src/lp/
|
|
79
|
+
├── atoms/ # 原子 - 基本要素
|
|
80
|
+
│ ├── Button/ # Button, AnchorButton
|
|
81
|
+
│ ├── Icon/ # Icon
|
|
82
|
+
│ ├── Image/ # Image, ProductImage
|
|
83
|
+
│ └── Text/ # Text
|
|
84
|
+
│
|
|
85
|
+
├── molecules/ # 分子 - 原子の組み合わせ
|
|
86
|
+
│ ├── UserVoice/ # ユーザーレビュー
|
|
87
|
+
│ └── FaqParts/ # FAQ個別アイテム
|
|
88
|
+
│
|
|
89
|
+
├── organisms/ # 有機体 - 複合コンポーネント
|
|
90
|
+
│ ├── KeyVisual/ # メインビジュアル
|
|
91
|
+
│ ├── Section/ # 汎用セクション
|
|
92
|
+
│ ├── Spec/ # 商品スペック
|
|
93
|
+
│ ├── Cta/ # CTA(購入導線)
|
|
94
|
+
│ ├── Faq/ # FAQセクション
|
|
95
|
+
│ └── Blank/ # 空白セクション
|
|
96
|
+
│
|
|
97
|
+
└── templates/ # テンプレート - ページレイアウト
|
|
98
|
+
├── LpTemplate/ # 基本LPテンプレート
|
|
99
|
+
└── ProductLpTemplate/ # 商品LP用テンプレート
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## デザイントークン
|
|
103
|
+
|
|
104
|
+
### Colors
|
|
105
|
+
|
|
106
|
+
| トークン | カラーコード | 用途 |
|
|
107
|
+
|---------|-------------|------|
|
|
108
|
+
| `black` | #040404 | テキスト、背景 |
|
|
109
|
+
| `white` | #FFFFFF | 背景、テキスト |
|
|
110
|
+
| `gray.900` | #464646 | ボタン、テキスト |
|
|
111
|
+
| `gray.400` | #BDC1C2 | ボーダー |
|
|
112
|
+
| `gray.200` | #E5E6E6 | 背景 |
|
|
113
|
+
| `background.gray` | #F2F3F1 | セクション背景 |
|
|
114
|
+
| `accent.gold` | #978E5F | アクセント、バッジ |
|
|
115
|
+
| `accent.blue` | #457D99 | アクセント |
|
|
116
|
+
| `accent.red` | #CC5E58 | CTA、強調 |
|
|
117
|
+
|
|
118
|
+
### Typography
|
|
119
|
+
|
|
120
|
+
- **Font**: Noto Sans JP (Medium/Bold)
|
|
121
|
+
- **H1**: 24px / line-height 1.55 / letter-spacing 16%
|
|
122
|
+
- **H2**: 22px / line-height 1.55 / letter-spacing 16%
|
|
123
|
+
- **H3**: 20px / line-height 1.35 / letter-spacing 16%
|
|
124
|
+
- **H4**: 18px / line-height 1.45 / letter-spacing 16%
|
|
125
|
+
- **Body**: 16px, 15px, 13px
|
|
126
|
+
- **Caption**: 12px, 11px, 10px, 8px
|
|
127
|
+
|
|
128
|
+
### Spacing
|
|
129
|
+
|
|
130
|
+
4, 8, 12, 16, 24, 32, 40, 48px
|
|
131
|
+
|
|
132
|
+
## コンポーネント一覧
|
|
133
|
+
|
|
134
|
+
### Atoms(原子)
|
|
135
|
+
|
|
136
|
+
| コンポーネント | 説明 |
|
|
137
|
+
|--------------|------|
|
|
138
|
+
| `Button` | 購入ボタン(black/red/gold/white variants) |
|
|
139
|
+
| `AnchorButton` | ページ内リンクボタン |
|
|
140
|
+
| `Image` | 画像(1:1, 4:3 アスペクト比) |
|
|
141
|
+
| `ProductImage` | 商品画像 |
|
|
142
|
+
| `Icon` | アイコン |
|
|
143
|
+
| `Text` | テキスト・タイトル |
|
|
144
|
+
|
|
145
|
+
### Molecules(分子)
|
|
146
|
+
|
|
147
|
+
| コンポーネント | 説明 |
|
|
148
|
+
|--------------|------|
|
|
149
|
+
| `UserVoice` | ユーザーレビュー・評価 |
|
|
150
|
+
| `FaqParts` | FAQ個別アイテム(アコーディオン) |
|
|
151
|
+
|
|
152
|
+
### Organisms(有機体)
|
|
153
|
+
|
|
154
|
+
| コンポーネント | 説明 |
|
|
155
|
+
|--------------|------|
|
|
156
|
+
| `KeyVisual` | メインビジュアル(MV) |
|
|
157
|
+
| `Section` | 汎用セクション |
|
|
158
|
+
| `Spec` | 商品スペック |
|
|
159
|
+
| `Cta` | CTA(購入導線) |
|
|
160
|
+
| `Faq` | FAQセクション |
|
|
161
|
+
| `Blank` | 空白セクション |
|
|
162
|
+
|
|
163
|
+
### Templates(テンプレート)
|
|
164
|
+
|
|
165
|
+
| コンポーネント | 説明 |
|
|
166
|
+
|--------------|------|
|
|
167
|
+
| `LpTemplate` | 基本LPレイアウト |
|
|
168
|
+
| `ProductLpTemplate` | 商品LP用テンプレート |
|
|
169
|
+
|
|
170
|
+
## 開発
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# 依存関係のインストール
|
|
174
|
+
npm install
|
|
175
|
+
|
|
176
|
+
# 開発モード(watchモード)
|
|
177
|
+
npm run dev
|
|
178
|
+
|
|
179
|
+
# ビルド
|
|
180
|
+
npm run build
|
|
181
|
+
|
|
182
|
+
# 型チェック
|
|
183
|
+
npm run typecheck
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Figma連携
|
|
187
|
+
|
|
188
|
+
このデザインシステムはFigma Makeとの連携を想定しています。Figmaファイルとの対応関係:
|
|
189
|
+
|
|
190
|
+
| Figma | Design System |
|
|
191
|
+
|-------|---------------|
|
|
192
|
+
| Tokens | `futsuno-ui/tokens` |
|
|
193
|
+
| Atoms | `lp/atoms` |
|
|
194
|
+
| Molecules + Organisms (Blocks) | `lp/molecules` + `lp/organisms` |
|
|
195
|
+
| Templates | `lp/templates` |
|
|
196
|
+
|
|
197
|
+
## ライセンス
|
|
198
|
+
|
|
199
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Colors, Spacing, SpacingKey, Typography, TypographyKey, borderRadius, boxShadow, colorPalette, colors, fontFamily, fontWeight, spacing, spacingValues, tokens, typography } from './tokens/index.js';
|
|
2
|
+
export { AnchorButton, AnchorButtonProps, Badge, Blank, BlankBackground, BlankProps, BlankSize, Button, ButtonProps, ButtonSize, ButtonVariant, Cta, CtaProps, Faq, FaqItem, FaqParts, FaqPartsProps, FaqProps, Icon, IconName, IconProps, Image, ImageAspectRatio, ImageProps, KeyVisual, KeyVisualProps, LpSection, LpTemplate, LpTemplateProps, ProductImage, ProductImageProps, ProductLpTemplate, ProductLpTemplateProps, ProductOption, Section, SectionBackground, SectionProps, Spec, SpecItem, SpecProps, Text, TextAlign, TextColor, TextProps, TextVariant, UserVoice, UserVoiceProps } from './lp/index.js';
|
|
3
|
+
export { themeVersion } from './theme/index.js';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Utility function to merge Tailwind CSS classes
|
|
9
|
+
* Combines clsx and tailwind-merge for optimal class handling
|
|
10
|
+
*/
|
|
11
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
12
|
+
|
|
13
|
+
export { cn };
|