@cakejp/design-system 0.13.0 → 0.14.1

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.
@@ -106,7 +106,7 @@ export interface ProductDetailSidebarProps extends React.HTMLAttributes<HTMLDivE
106
106
  * ### AI 向け使用ルール
107
107
  *
108
108
  * - PC商品詳細ページの右カラムに配置(幅 400px 推奨)
109
- * - 既存の `Tag`, `RatingStars`, `QuantitySelector`, `PriceDisplay`, `Button` を内部で使用
109
+ * - 既存の `Tag`, `RatingStars`, `NumberInput`, `PriceDisplay`, `Button` を内部で使用
110
110
  * - 価格表示は `PriceDisplay` コンポーネント(size="xl")を使用し、税込表示フォーマットを統一
111
111
  * - サイズ選択肢は行単位の2次元配列で渡す
112
112
  * - `onAddToCart` が未指定の場合、ボタンは disabled
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ export type SocialPlatform = "line" | "x" | "facebook" | "amazon" | "google" | "apple";
3
+ export interface SocialIconProps extends Omit<React.ComponentProps<"svg">, "children"> {
4
+ platform: SocialPlatform;
5
+ /**
6
+ * 表示サイズ(px)。
7
+ * width/height 属性は詳細度 0 のため Button の
8
+ * `[&_svg:not([class*='size-'])]:size-4` に負ける。確実に効かせるため inline style で当てる
9
+ * (consumer が `style` を渡した場合はそちらを優先)。
10
+ */
11
+ size?: number;
12
+ /**
13
+ * brand=ブランド配色 / mono=currentColor。
14
+ *
15
+ * **地がブランド色のボタン(LINE の緑地・Apple の黒地)では必ず `mono` を指定すること。**
16
+ * brand のままだとアイコンが地と同色になって消える。
17
+ */
18
+ tone?: "brand" | "mono";
19
+ }
20
+ /**
21
+ * SNS・決済ブランドのアイコン
22
+ *
23
+ * ブランドロゴの SVG を 1 箇所に集約する。ShareButtons / SocialLoginButton から利用し、
24
+ * 各所での SVG 手組み・二重管理を避ける。
25
+ *
26
+ * ### AI 向け使用ルール
27
+ *
28
+ * - ブランド色の地に載せるときは `tone="mono"` を指定する(地と同色になって消えるため)
29
+ * - サイズは `size`(px)で指定する。`className` の `size-*` は inline style に負ける
30
+ * - HEX 直書きは各ブランドの公式ロゴ色のみ(CLAUDE.md のブランドロゴ例外)
31
+ */
32
+ declare function SocialIcon({ platform, size, tone, className, style, ...props }: SocialIconProps): import("react/jsx-runtime").JSX.Element;
33
+ export { SocialIcon };
@@ -0,0 +1,24 @@
1
+ export interface ComboboxOption {
2
+ value: string;
3
+ label: string;
4
+ keywords?: string[];
5
+ disabled?: boolean;
6
+ }
7
+ export interface ComboboxProps {
8
+ options: ComboboxOption[];
9
+ value?: string;
10
+ onValueChange?: (value: string) => void;
11
+ placeholder?: string;
12
+ searchPlaceholder?: string;
13
+ emptyLabel?: string;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ /** trigger の id。FormField / FieldLabel の htmlFor と揃える */
17
+ id?: string;
18
+ /** 検証エラー時に true。FieldError と併せて使う */
19
+ "aria-invalid"?: boolean;
20
+ /** FieldError / FieldDescription の id */
21
+ "aria-describedby"?: string;
22
+ }
23
+ declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
24
+ export { Combobox };
@@ -0,0 +1,24 @@
1
+ export interface MultiSelectOption {
2
+ value: string;
3
+ label: string;
4
+ keywords?: string[];
5
+ disabled?: boolean;
6
+ }
7
+ export interface MultiSelectProps {
8
+ options: MultiSelectOption[];
9
+ value?: string[];
10
+ onValueChange?: (value: string[]) => void;
11
+ placeholder?: string;
12
+ searchPlaceholder?: string;
13
+ emptyLabel?: string;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ /** trigger の id。FormField / FieldLabel の htmlFor と揃える */
17
+ id?: string;
18
+ /** 検証エラー時に true。FieldError と併せて使う */
19
+ "aria-invalid"?: boolean;
20
+ /** FieldError / FieldDescription の id */
21
+ "aria-describedby"?: string;
22
+ }
23
+ declare function MultiSelect({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
24
+ export { MultiSelect };
@@ -5,7 +5,7 @@ import { type VariantProps } from "class-variance-authority";
5
5
  * CVA では color のみ管理し、サイズは条件分岐で適用する。
6
6
  */
7
7
  declare const notificationBadgeVariants: (props?: {
8
- color?: "red" | "green";
8
+ color?: "green" | "red";
9
9
  size?: "sm" | "md";
10
10
  } & import("class-variance-authority/types").ClassProp) => string;
11
11
  export interface NotificationBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color">, VariantProps<typeof notificationBadgeVariants> {
@@ -0,0 +1,84 @@
1
+ import * as React from "react";
2
+ export interface NumberInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
3
+ /** 現在の値(制御) */
4
+ value?: number;
5
+ /** 初期値(非制御) */
6
+ defaultValue?: number;
7
+ /** 最小値。既定 1 — 汎用の数値入力では明示すること */
8
+ min?: number;
9
+ /** 最大値。既定 99 — 価格・在庫など上限が違う用途では明示すること */
10
+ max?: number;
11
+ /** 増減幅 */
12
+ step?: number;
13
+ /** 値変更時のコールバック */
14
+ onChange?: (value: number) => void;
15
+ /** 無効状態 */
16
+ disabled?: boolean;
17
+ /** エラー状態 */
18
+ error?: boolean;
19
+ /** サイズ(md = Pattern 2 サークル / sm = Pattern 1 ピル) */
20
+ size?: "sm" | "md";
21
+ /** 数値の直接入力を許可する */
22
+ editable?: boolean;
23
+ /** 値が min のときにゴミ箱アイコンを表示する(カート行の削除導線) */
24
+ showTrash?: boolean;
25
+ /** ゴミ箱アイコン押下時のコールバック(削除確認ダイアログ表示等に使用) */
26
+ onDelete?: () => void;
27
+ /** 表示のフォーマット。桁区切り・通貨表示に使う(編集中は素の数値) */
28
+ formatOptions?: Intl.NumberFormatOptions;
29
+ /** formatOptions のロケール */
30
+ locale?: string;
31
+ /** 入力欄の id。FormField / FieldLabel の htmlFor と揃える */
32
+ inputId?: string;
33
+ /**
34
+ * 入力欄・増減ボタンの読み上げラベル。既定はカート数量向けの「数量」。
35
+ * 価格・在庫など数量以外に使うときは必ず指定する(例: "販売価格")
36
+ */
37
+ label?: string;
38
+ }
39
+ /**
40
+ * 数値入力コンポーネント(Figma 準拠デザイン)
41
+ *
42
+ * `−` / 数値 / `+` のステッパー。カートの数量から管理画面の価格・在庫まで、
43
+ * **DS の数値入力はすべてこれ**を使う(生の `<input type="number">` は使わない)。
44
+ *
45
+ * Figma DS の Adjust コンポーネントを再現。2つのパターンを提供:
46
+ *
47
+ * - **`size="sm"`(Pattern 1: コンパクト型)** — カート内での使用。
48
+ * 108×36px のコンテナに −/数字/+ をインライン配置。背景 `Surface/Tertiary`、角丸は全周。
49
+ * ボタン(28px 円)の内側余白は上下左右とも 4px。
50
+ *
51
+ * - **`size="md"`(Pattern 2: サークル型)** — 商品詳細・管理画面での使用。
52
+ * 40px の円形ボタンが左右に独立し、中央に 48px 幅の数値コンテナ。ボタン間隔 12px。
53
+ * `formatOptions` 指定時のみ、数値コンテナが内容幅に追従する(上限 160px)。
54
+ *
55
+ * ### ステート
56
+ * - `disabled`: 全要素のテキスト/アイコンが `Text/Disable` (#B7B5B4)
57
+ * - `error`: コンパクト型は赤枠(2px)、サークル型は数値コンテナが赤枠
58
+ * - `showTrash`: 値が min のとき − がゴミ箱アイコンに変化
59
+ *
60
+ * ### AI 向け使用ルール
61
+ *
62
+ * - **商品詳細ページ**: `size="md"` で配置
63
+ * - **カート内**: `size="sm"` でコンパクトに表示
64
+ * - **カート数量では `min=1` が標準**(0 にしない — 削除は別の UI で行う)
65
+ * - **価格・在庫など汎用の数値入力では `min` / `max` を必ず明示する**
66
+ * (既定はカート数量向けの `min=1` / `max=99`)
67
+ * - 桁区切り・通貨表示は `formatOptions` を渡す(編集中は素の数値になる)
68
+ * - `editable=true` で数値の直接入力可能
69
+ *
70
+ * ※ 旧名 `QuantitySelector` は「カート数量」という用途名だったため、
71
+ * 同じものを探した人が見つけられず別実装が生まれた。機能名に改名し、
72
+ * 旧名は deprecated alias として残している。
73
+ */
74
+ declare function NumberInput({ className, value, defaultValue, min, max, step, onChange, disabled, error, size, editable, showTrash, onDelete, formatOptions, locale, inputId, label, ...props }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
75
+ export { NumberInput };
76
+ /**
77
+ * @deprecated 用途名(カート数量)ではなく機能名の `NumberInput` を使ってください。
78
+ * 同じものを別名で探して見つけられず二重実装が生まれたため改名しました。
79
+ * 意匠・API は同一で、この別名は互換のために残しています。
80
+ */
81
+ declare const QuantitySelector: typeof NumberInput;
82
+ /** @deprecated `NumberInputProps` を使ってください */
83
+ export type QuantitySelectorProps = NumberInputProps;
84
+ export { QuantitySelector };
@@ -53,7 +53,7 @@ declare const sectionVariants: (props?: {
53
53
  background?: "none" | "accent-subtle" | "subtle";
54
54
  } & import("class-variance-authority/types").ClassProp) => string;
55
55
  declare const sectionScrimVariants: (props?: {
56
- scrim?: "none" | "light" | "dark" | "bottom-dark";
56
+ scrim?: "none" | "dark" | "light" | "bottom-dark";
57
57
  } & import("class-variance-authority/types").ClassProp) => string;
58
58
  declare function Section({ className, spacing, background, backgroundImage, scrim, style, ...props }: SectionProps): import("react/jsx-runtime").JSX.Element;
59
59
  export { Section, sectionVariants, sectionScrimVariants };
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
- export type SocialProvider = "line" | "amazon" | "google" | "apple";
2
+ import { type SocialPlatform } from "../../components/foundations/social-icon";
3
+ export type SocialProvider = Extract<SocialPlatform, "line" | "amazon" | "google" | "apple">;
3
4
  export interface SocialLoginButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
5
  /** ソーシャルプロバイダー */
5
6
  provider: SocialProvider;
@@ -19,6 +20,7 @@ export interface SocialLoginButtonProps extends React.ButtonHTMLAttributes<HTMLB
19
20
  * - フルサイズ: `<SocialLoginButton provider="line" />`
20
21
  * - アイコンのみ: `<SocialLoginButton provider="google" size="icon" />`
21
22
  * - LINE は緑背景、他は白背景、Apple は黒背景
23
+ * - ブランドロゴは `SocialIcon` に集約している。個別に SVG を手組みしない
22
24
  */
23
25
  declare function SocialLoginButton({ provider, size, label, className, ...props }: SocialLoginButtonProps): import("react/jsx-runtime").JSX.Element;
24
26
  export { SocialLoginButton };
@@ -52,6 +52,8 @@ export { SkipLink } from "./components/foundations/skip-link";
52
52
  export type { SkipLinkProps } from "./components/foundations/skip-link";
53
53
  export { Slider } from "./components/foundations/slider";
54
54
  export { Spinner } from "./components/foundations/spinner";
55
+ export { SocialIcon } from "./components/foundations/social-icon";
56
+ export type { SocialIconProps, SocialPlatform } from "./components/foundations/social-icon";
55
57
  export { Switch } from "./components/foundations/switch";
56
58
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/foundations/table";
57
59
  export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/foundations/tabs";
@@ -67,10 +69,14 @@ export { AdminHeader } from "./components/primitives/admin-header";
67
69
  export type { AdminHeaderProps } from "./components/primitives/admin-header";
68
70
  export { CoachMark } from "./components/primitives/coach-mark";
69
71
  export type { CoachMarkProps, CoachMarkDirection } from "./components/primitives/coach-mark";
72
+ export { Combobox } from "./components/primitives/combobox";
73
+ export type { ComboboxOption, ComboboxProps } from "./components/primitives/combobox";
70
74
  export { BannerCarousel } from "./components/primitives/banner-carousel";
71
75
  export type { BannerCarouselProps, BannerItem } from "./components/primitives/banner-carousel";
72
76
  export { ContentCarousel } from "./components/primitives/content-carousel";
73
77
  export type { ContentCarouselProps, ContentCarouselItemsPerView } from "./components/primitives/content-carousel";
78
+ export { MultiSelect } from "./components/primitives/multi-select";
79
+ export type { MultiSelectOption, MultiSelectProps } from "./components/primitives/multi-select";
74
80
  export { StickyActionBar } from "./components/primitives/sticky-action-bar";
75
81
  export { BottomTabBar } from "./components/primitives/bottom-tab-bar";
76
82
  export type { BottomTabBarProps, BottomTabBarItem } from "./components/primitives/bottom-tab-bar";
@@ -136,8 +142,8 @@ export { ProgressSteps } from "./components/primitives/progress-steps";
136
142
  export type { ProgressStepsProps } from "./components/primitives/progress-steps";
137
143
  export { Timeline } from "./components/primitives/timeline";
138
144
  export type { TimelineItem, TimelineProps } from "./components/primitives/timeline";
139
- export { QuantitySelector } from "./components/primitives/quantity-selector";
140
- export type { QuantitySelectorProps } from "./components/primitives/quantity-selector";
145
+ export { NumberInput, QuantitySelector } from "./components/primitives/number-input";
146
+ export type { NumberInputProps, QuantitySelectorProps } from "./components/primitives/number-input";
141
147
  export { SearchBar } from "./components/primitives/search-bar";
142
148
  export type { SearchBarProps } from "./components/primitives/search-bar";
143
149
  export { SearchPanel } from "./components/primitives/search-panel";
@@ -0,0 +1,44 @@
1
+ import { readFileSync } from "node:fs"
2
+
3
+ const contractUrl = new URL("../contracts/components.json", import.meta.url)
4
+ const contracts = JSON.parse(readFileSync(contractUrl, "utf8"))
5
+ const entries = ["foundations", "primitives", "ec"].flatMap(
6
+ (tier) => contracts[tier] ?? []
7
+ )
8
+ const deprecated = new Map(
9
+ entries.flatMap((entry) =>
10
+ (entry.deprecatedAliases ?? []).map((alias) => [alias, entry.name])
11
+ )
12
+ )
13
+
14
+ const noDeprecated = {
15
+ meta: {
16
+ type: "suggestion",
17
+ docs: { description: "Cake.jp DS の非推奨 export を検出する" },
18
+ schema: [],
19
+ messages: {
20
+ deprecated: "[cakejp-ds] {{name}} は非推奨です。{{replacement}} を使ってください。",
21
+ },
22
+ },
23
+ create(context) {
24
+ return {
25
+ ImportDeclaration(node) {
26
+ if (node.source.value !== "@cakejp/design-system") return
27
+ for (const specifier of node.specifiers) {
28
+ if (specifier.type !== "ImportSpecifier") continue
29
+ const imported = specifier.imported.name
30
+ const replacement = deprecated.get(imported)
31
+ if (replacement) {
32
+ context.report({
33
+ node: specifier,
34
+ messageId: "deprecated",
35
+ data: { name: imported, replacement },
36
+ })
37
+ }
38
+ }
39
+ },
40
+ }
41
+ },
42
+ }
43
+
44
+ export default { rules: { "no-deprecated": noDeprecated } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakejp/design-system",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "type": "module",
5
5
  "description": "Cake.jp Design System — UI コンポーネント・カラートークン・タイポグラフィ",
6
6
  "license": "UNLICENSED",
@@ -39,7 +39,9 @@
39
39
  "bin",
40
40
  "contracts",
41
41
  "dist",
42
+ "eslint",
42
43
  "scripts/codemod",
44
+ "src/components/COMPONENT_LOOKUP.md",
43
45
  "src/preset-standalone.css",
44
46
  "src/preset.css",
45
47
  "src/styles",
@@ -68,7 +70,8 @@
68
70
  "./styles": "./src/preset.css",
69
71
  "./tokens/primitive": "./src/styles/primitive.css",
70
72
  "./tokens/semantic": "./src/styles/semantic.css",
71
- "./tokens/typography": "./src/styles/typography.css"
73
+ "./tokens/typography": "./src/styles/typography.css",
74
+ "./eslint/deprecated": "./eslint/deprecated.js"
72
75
  },
73
76
  "sideEffects": [
74
77
  "*.css"
@@ -91,7 +94,8 @@
91
94
  "typecheck:stories": "tsc --noEmit -p tsconfig.stories.json",
92
95
  "generate:lint-rules": "node scripts/generate-lint-rules.mjs",
93
96
  "generate:lookup": "node scripts/generate-component-lookup.mjs",
94
- "check": "tsc --noEmit -p tsconfig.app.json && npm run typecheck:stories && bash scripts/check-deps.sh && bash scripts/check-drift.sh && bash scripts/check-docs-drift.sh && bash scripts/lint-scratch.sh && bash scripts/check-story-reuse.sh && bash scripts/check-responsive.sh && node scripts/check-border-color.mjs && bash scripts/lint-scratch.sh --components && bash scripts/check-generated-drift.sh",
97
+ "lint:contrast": "node scripts/check-contrast.mjs",
98
+ "check": "tsc --noEmit -p tsconfig.app.json && npm run typecheck:stories && bash scripts/check-deps.sh && bash scripts/check-drift.sh && bash scripts/check-docs-drift.sh && bash scripts/lint-scratch.sh && bash scripts/check-story-reuse.sh && bash scripts/check-responsive.sh && node scripts/check-border-color.mjs && npm run lint:contrast && bash scripts/lint-scratch.sh --components && bash scripts/check-generated-drift.sh",
95
99
  "test": "vitest run --config vitest.config.ts"
96
100
  },
97
101
  "dependencies": {
@@ -0,0 +1,14 @@
1
+ # Codemod
2
+
3
+ 破壊的変更では `template.mjs` を複製し、`RENAMES`、`PROP_RENAMES`、
4
+ `WARNINGS` の3箇所を埋めて移行スクリプトを作ります。
5
+
6
+ ```bash
7
+ cp scripts/codemod/template.mjs scripts/codemod/v1-to-v2.mjs
8
+ node scripts/codemod/v1-to-v2.mjs --dry ./src
9
+ node scripts/codemod/v1-to-v2.mjs ./src
10
+ ```
11
+
12
+ 正規表現ベースのため、必ずコミット済みの利用側で `--dry` を先に実行し、
13
+ 適用後は `git diff` と ESLint の `@cakejp/design-system/eslint/deprecated`
14
+ で残件を確認してください。
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs"
3
+ import path from "node:path"
4
+
5
+ const PACKAGE_PATTERN = /@cakejp\/design-system/
6
+ const RENAMES = []
7
+ const PROP_RENAMES = []
8
+ const WARNINGS = []
9
+
10
+ const args = process.argv.slice(2)
11
+ const dry = args.includes("--dry")
12
+ const targetDir = args.find((arg) => !arg.startsWith("--")) ?? "./src"
13
+ if (!fs.existsSync(targetDir)) {
14
+ console.error(`Directory not found: ${targetDir}`)
15
+ process.exit(1)
16
+ }
17
+
18
+ function filesIn(directory) {
19
+ return fs.readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
20
+ const full = path.join(directory, entry.name)
21
+ if (entry.isDirectory()) {
22
+ return ["node_modules", "dist"].includes(entry.name) || entry.name.startsWith(".")
23
+ ? []
24
+ : filesIn(full)
25
+ }
26
+ return /\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(entry.name) ? [full] : []
27
+ })
28
+ }
29
+
30
+ let changedFiles = 0
31
+ let changedItems = 0
32
+ for (const file of filesIn(targetDir)) {
33
+ const source = fs.readFileSync(file, "utf8")
34
+ if (!PACKAGE_PATTERN.test(source)) continue
35
+ let output = source
36
+ let count = 0
37
+ for (const [before, after] of [...RENAMES].sort((a, b) => b[0].length - a[0].length)) {
38
+ const pattern = new RegExp(`\\b${before}\\b`, "g")
39
+ const matches = output.match(pattern)
40
+ if (matches) {
41
+ output = output.replace(pattern, after)
42
+ count += matches.length
43
+ }
44
+ }
45
+ for (const [component, before, after] of PROP_RENAMES) {
46
+ const pattern = new RegExp(`(<${component}[^>]*\\s)${before}=`, "g")
47
+ const matches = output.match(pattern)
48
+ if (matches) {
49
+ output = output.replace(pattern, `$1${after}=`)
50
+ count += matches.length
51
+ }
52
+ }
53
+ for (const warning of WARNINGS) {
54
+ if (warning.pattern.test(source)) console.warn(`⚠ ${file}: ${warning.message}`)
55
+ }
56
+ if (!count) continue
57
+ changedFiles++
58
+ changedItems += count
59
+ if (!dry) fs.writeFileSync(file, output)
60
+ console.log(`${dry ? "[dry]" : "✓"} ${file}: ${count}`)
61
+ }
62
+ console.log(`${changedFiles} files / ${changedItems} replacements`)
@@ -0,0 +1,166 @@
1
+ # Component Lookup (AI必読)
2
+
3
+ > **このファイルは `node scripts/generate-component-lookup.mjs` で自動生成されています。手動編集しないでください。**
4
+
5
+ ページストーリーを書く前に、このファイルを確認して既存コンポーネントを必ず使うこと。
6
+ 独自でコンポーネントを定義する(function Xxx)前に、ここに同等品がないか確認すること。
7
+
8
+ ---
9
+
10
+ ## Foundations Components (src/components/foundations/)
11
+
12
+ | Component | Import | Variants | Stories |
13
+ |-----------|--------|----------|---------|
14
+ | Accordion, AccordionItem, AccordionTrigger, AccordionContent | `@/components/foundations/accordion` | — | Default(単一展開), 複数展開, 商品ページFAQ例 |
15
+ | AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger | `@/components/foundations/alert-dialog` | — | Default, 破壊的操作(アカウント削除), コンパクトサイズ |
16
+ | Alert, AlertTitle, AlertDescription | `@/components/foundations/alert` | **variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`<br>**variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning` | Success(成功), Info(お知らせ), Error(エラー), Warning(注意), Inline Info(インライン情報), Inline Caution(インラインエラー), Inline Warning(インライン警告), Prop-based Warning(旧 Banner 相当), Prop-based Error(エラー), Prop-based Info(お知らせ), Prop-based Success(成功), Prop-based with Action(アクション付き), Prop-based Inline Info(インライン情報), Prop-based Inline Caution(インラインエラー), Prop-based Inline Warning(インライン警告), Info + ボタン, Error(複数メッセージ), 全 Bordered バリアント, 全 Inline バリアント |
17
+ | AspectRatio | `@/components/foundations/aspect-ratio` | — | Square, Banner16x9, ProductImage4x3, RatioComparison |
18
+ | Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount | `@/components/foundations/avatar` | — | Default, フォールバック, サイズ比較, バッジ付き, グループ表示, レビュー表示例 |
19
+ | Badge | `@/components/foundations/badge` | **variant**: `default`, `destructive`, `success`, `info-subtle`, `success-subtle`, `accent-subtle`, `caution-subtle`, `warning-subtle`, `muted-subtle`, `secondary`, `outline`, `ghost` | Default(商品ハイライト), Secondary(カテゴリ), Success(成功・完了), Warning(注意), Destructive(エラー), Outline(枠線), WithIcon, 注文ステータス例, 全バリアント一覧 |
20
+ | Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis | `@/components/foundations/breadcrumb` | — | Default, 省略表示, 長いパス, 商品ページ例 |
21
+ | Button | `@/components/foundations/button` | **variant**: `default`, `secondary`, `tertiary`, `destructive`, `ghost` | Default(CTA), Secondary(副次的), Secondary(追加済み), Tertiary(低優先度), Ghost(透明), Destructive(破壊的), Link(リンク), Inverse(暗背景用 primary), Ghost Inverse(暗背景用 secondary), Inverse + Ghost Inverse(dark CTA 帯), Overlay(画像上), サイズ比較, XL(56px / rounded-18px), Hero(56px / pill), Large, FullWidth, Disabled(無効), Loading(読込中), WithIcon, IconOnly |
22
+ | Calendar, CalendarDayButton | `@/components/foundations/calendar` | — | Default, お届け日選択, 日付範囲選択 |
23
+ | Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent | `@/components/foundations/card` | **surface**: `default`, `primary` | Default, アクション付き, surface=, サーフェス文脈の伝播, 注文サマリー例 |
24
+ | CheckboxCardGroup, CheckboxCardItem | `@/components/foundations/checkbox-card` | — | Default, 説明付き, 無効状態, 展開コンテンツ付き, ギフトオプション選択例, アレルギー情報例, バッジ付き, エラー状態 |
25
+ | CheckboxGroup, CheckboxGroupItem | `@/components/foundations/checkbox-group` | — | Default, 選択済み, エラー, 非活性, ヘルプテキスト付き, 1カラム, 説明付き |
26
+ | Checkbox | `@/components/foundations/checkbox` | — | Default, チェック済み, 件数バッジ付き, 説明テキスト付き, 非活性, HoverState, filter sidebar 実用例, 素の Checkbox(label なし), エラーパターン, グループ例 |
27
+ | Collapsible, CollapsibleTrigger, CollapsibleContent | `@/components/foundations/collapsible` | — | Default, CouponCodeInput, OrderOptions |
28
+ | Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator | `@/components/foundations/command` | — | Default, ProductSearch, DeliveryOptions |
29
+ | ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup | `@/components/foundations/context-menu` | — | Default, WithCheckboxItems |
30
+ | DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState | `@/components/foundations/data-table` | **state**: `default`, `selected`<br>**width**: `auto`, `max`, `hug`<br>**align**: `left`, `right`, `center` | Default, チェックボックス選択, タイトル固定, セクション, 空状態, 新規追加行, セル型バリエーション, 実用例(注文管理), 入力系セル一覧, ソートヘッダー, D&D並び替え |
31
+ | Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger | `@/components/foundations/dialog` | — | Default, 確認ダイアログ, フォーム入力 |
32
+ | Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription | `@/components/foundations/drawer` | — | Default, カート追加クイックビュー, お届け日選択 |
33
+ | DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent | `@/components/foundations/dropdown-menu` | — | Default, グループ付き, 注文アクション例 |
34
+ | Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator | `@/components/foundations/field` | — | フォーム一式, ラベル付き区切り, Field / FieldLabel(1フィールドの箱) |
35
+ | FileInput | `@/components/foundations/file-input` | — | Default, 複数選択 + accept, 無効, maxSize 超過エラー, FormField 連携 |
36
+ | Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField | `@/components/foundations/form` | — | RHF register / reset 統合, DeliveryAddressForm, ReviewForm, ContactForm, RHF: register() + 保存済みの初期値, RHF: Controller + 保存済みの初期値 |
37
+ | HoverCard, HoverCardTrigger, HoverCardContent | `@/components/foundations/hover-card` | — | Default, DeliveryInfo, RatingDetail |
38
+ | IconBadge | `@/components/foundations/icon-badge` | **size**: `md`, `ml`, `lg` | md(44px), ml(48px), lg(72px), サイズ比較, Card 内(間隔=Card の gap-4), リスト見出し(md) |
39
+ | Input | `@/components/foundations/input` | — | Default, WithLabel, Email, Password, Tel, Search, WithIcon, Disabled, Invalid(エラー), Textarea, フォーム例(配送先), 文字数カウンタ |
40
+ | Label | `@/components/foundations/label` | — | Default, 必須ラベル, ヘルプテキスト付き, 登録フォームパターン, エラーパターン |
41
+ | Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent | `@/components/foundations/menubar` | — | Default, WithOptions |
42
+ | NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport | `@/components/foundations/navigation-menu` | — | Default, WithoutViewport |
43
+ | Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis | `@/components/foundations/pagination` | — | Default, 省略付き, 表示窓を自動計算, 最初のページ, 商品一覧ページ例 |
44
+ | Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription | `@/components/foundations/popover` | — | Default, DeliveryDatePicker, AllergyInfo |
45
+ | Progress | `@/components/foundations/progress` | — | Default, 送料無料まで, 送料無料達成 |
46
+ | RadioGroup, RadioGroupItem | `@/components/foundations/radio-group` | — | Default, 説明付き, 選択済み, 無効状態, エラーパターン, 補足説明なし, 配送方法選択例, チップ型(choice chip), チップ型(制御・無効), チップ型(エラー), 支払い方法(クレカ入力済), 支払い方法(クレカ未入力) |
47
+ | ResponsiveDialog, ResponsiveDialogTrigger, ResponsiveDialogContent, ResponsiveDialogHeader, ResponsiveDialogFooter, ResponsiveDialogTitle, ResponsiveDialogDescription, ResponsiveDialogClose | `@/components/foundations/responsive-dialog` | — | 確認ダイアログ, フォーム入力, お知らせ(閉じるのみ) |
48
+ | ScrollArea, ScrollBar | `@/components/foundations/scroll-area` | — | Default, HorizontalTagScroll, OrderHistoryList |
49
+ | Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue | `@/components/foundations/select` | — | Default, ラベル付き, グループ分け, サイズ比較, 注文フォーム例, エラーパターン, 横並びパターン(氏名・住所), Input と並置(高さが揃う) |
50
+ | Separator | `@/components/foundations/separator` | — | Default(水平), 垂直, 注文確認ページ例 |
51
+ | Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription | `@/components/foundations/sheet` | — | Default, モバイルメニュー, 商品フィルター, スライド方向 |
52
+ | Skeleton | `@/components/foundations/skeleton` | — | Default, 円形(アバター用), 商品カードスケルトン, 商品グリッドスケルトン, レビュースケルトン, 商品詳細ページスケルトン |
53
+ | SkipLink | `@/components/foundations/skip-link` | — | Default, CustomTarget |
54
+ | Slider | `@/components/foundations/slider` | — | Default, PriceRangeFilter, ServingSizeSelector, RatingFilter |
55
+ | SocialIcon | `@/components/foundations/social-icon` | — | Brand, Mono |
56
+ | Toaster | `@/components/foundations/sonner` | — | Default, AddToCart, FavoriteAdded, StockError, OrderProcessing |
57
+ | Spinner | `@/components/foundations/spinner` | — | Default, Small, Large, InlineWithText, FullPage |
58
+ | Switch | `@/components/foundations/switch` | — | Default, ON 状態, 無効, サイズ比較, ブロック型, 通知設定例(リスト型) |
59
+ | Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption | `@/components/foundations/table` | — | Default, フッター付き, 商品比較例, カート注文サマリー |
60
+ | Tabs, TabsList, TabsTrigger, TabsContent | `@/components/foundations/tabs` | **variant**: `underbar`, `segment`<br>**scrollable**: `true` | Default(Underbar), タブ数バリエーション, 横スクロール(多数タブ), PC モード(文字幅ベース), Segment(ピル型), Segment 3択 |
61
+ | Textarea | `@/components/foundations/textarea` | — | Default, 無効, メッセージカード入力例, エラーパターン, レビュー投稿例, 文字数カウンタ |
62
+ | ToggleGroup, ToggleGroupItem | `@/components/foundations/toggle-group` | **width**: `fit`, `full`<br>**variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg`<br>**variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, 複数選択, サイズ, アイコン付き, アイコンのみ, 無効 |
63
+ | Toggle | `@/components/foundations/toggle` | **variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, TextFormatting, FavoriteToggle, Outline, Sizes |
64
+ | Tooltip, TooltipTrigger, TooltipContent, TooltipProvider | `@/components/foundations/tooltip` | — | Default, 表示位置, アイコンボタン例 |
65
+
66
+ ---
67
+
68
+ ## Primitives Components (src/components/primitives/)
69
+
70
+ | Component | Import | Variants | Stories |
71
+ |-----------|--------|----------|---------|
72
+ | AdminHeader | `@/components/primitives/admin-header` | — | — |
73
+ | AdminSideNav | `@/components/primitives/admin-side-nav` | — | — |
74
+ | BannerCarousel | `@/components/primitives/banner-carousel` | — | Default, SmallBanners, LargeBanners |
75
+ | BottomTabBar | `@/components/primitives/bottom-tab-bar` | — | Default(ホーム), アクティブ状態, バッジ付き, バッジオーバーフロー(99+), バナー付き, 記念日アクティブ |
76
+ | BulkActionBar | `@/components/primitives/bulk-action-bar` | — | — |
77
+ | CategoryScroll | `@/components/primitives/category-scroll` | — | Default, CircleThumbnails |
78
+ | CategoryShortcuts | `@/components/primitives/category-shortcuts` | — | Default, 選択あり, インタラクティブ(onClick), 商品一覧ページでの使用例 |
79
+ | ChatComposer | `@/components/primitives/chat-composer` | — | 基本, 添付あり, ⌘Enter 送信, 送信中, 無効化, 文字数カウンタ |
80
+ | Chip | `@/components/primitives/chip` | **variant**: `filled`, `accent`<br>**size**: `sm`, `md`, `lg`, `tile`<br>**shape**: `pill`, `square` | Default, 人気キーワード, 全バリアント, States(hover / disabled), サイズ比較, フィルター選択, 削除可能(選択済みフィルター), 検索画面での使用例 |
81
+ | CoachMark | `@/components/primitives/coach-mark` | — | オンボーディング, 全方向, オンボーディング各方向 |
82
+ | Combobox | `@/components/primitives/combobox` | — | Default |
83
+ | Container | `@/components/primitives/container` | — | Default(page / default gutter), サイズ比較, gutter 比較 |
84
+ | ContentCarousel | `@/components/primitives/content-carousel` | — | ヒーローバナー, 自動再生(5秒), peek表示, 多列カード(PC 3枚), 1枚のみ |
85
+ | DatePicker, DateTimePicker | `@/components/primitives/date-picker` | — | 日付ピッカー, 初期値あり, 選択範囲を制限, 特定日を無効化, FormField 連携, 無効化, クリア可能(任意項目) |
86
+ | EmptyState | `@/components/primitives/empty-state` | — | お気に入り商品(空), カート(空), ブックマーク(空), 検索結果なし, 汎用(説明のみ) |
87
+ | ErrorState, NotFoundIllustration | `@/components/primitives/error-state` | — | ネットワークエラー, サーバーエラー, ページが見つからない, タイムアウト, 404(notFound variant), 404(文言上書き), イラスト単体 |
88
+ | FilterBar | `@/components/primitives/filter-bar` | — | SP, SP(選択済み), PC, 地域フィルター, もっと絞り込む |
89
+ | Footer | `@/components/primitives/footer` | — | Default, 最小構成, SNSリンク付き, 決済方法付き |
90
+ | FormField | `@/components/primitives/form-field` | — | — |
91
+ | FunnelShell | `@/components/primitives/funnel-shell` | — | 注文内容の確認(ご購入手続き) |
92
+ | Header | `@/components/primitives/header` | — | ロゴ+アクション, ロゴ+未ログイン, ロゴ+グローバルナビ+検索スロット(PC), ロゴセンター(決済・申し込み用), 戻る+タイトル, 戻る+検索バー, 戻る+右側アクション, カスタムロゴ |
93
+ | ImageCarousel | `@/components/primitives/image-carousel` | — | バナーカルーセル, 横長バナー, 正方形(商品画像), OGP比率, 自動再生(3秒), PC幅(ビューポート切替で確認), トップページ ヒーローバナー |
94
+ | ImageGallery | `@/components/primitives/image-gallery` | — | ドット付き, サムネイル付き, バナー(16:9), PC商品詳細, 単一画像 |
95
+ | ImageInput | `@/components/primitives/image-input` | **aspect**: `square`, `landscape`<br>**size**: `sm`, `md`, `lg` | 基本, 保存済み画像あり, 表示サイズ, FormField 連携, 検証エラー, クリア不可, 無効化 |
96
+ | ImageUploader | `@/components/primitives/image-uploader` | — | — |
97
+ | KebabMenu | `@/components/primitives/kebab-menu` | — | — |
98
+ | ListItem | `@/components/primitives/list-item` | — | デフォルト(矢印), キャプション付き, アイコン付き, テキスト値, バッジ付き, トグル, 矢印なし, 選択状態, メニューリスト(複数行), アイコン付きメニュー, インタラクティブ(hover / focus) |
99
+ | MenuDrawer | `@/components/primitives/menu-drawer` | — | デフォルト(最小構成), ログイン済 (ユーザー名表示), 未ログイン (ログインボタン表示), サムネイル付きカテゴリ, バナー付き, 全部入り (大規模アプリ向け), ログインリンク非表示 |
100
+ | MultiSelect | `@/components/primitives/multi-select` | — | Default |
101
+ | NotificationBadge | `@/components/primitives/notification-badge` | **color**: `red`, `green`<br>**size**: `sm`, `md` | Default, ドットバッジ, 数値バッジ, カラーバリエーション, ヘッダーでの使用例, 非表示状態 |
102
+ | NotificationList | `@/components/primitives/notification-list` | — | デフォルト, 横並び(管理画面向け), 空の状態 |
103
+ | NumberInput, QuantitySelector | `@/components/primitives/number-input` | — | Default, コンパクト型(sm), サイズ比較, 最小・最大値, 無効状態, エラー状態, ゴミ箱アイコン, ゴミ箱+削除確認ダイアログ, 直接入力パターン, 商品詳細での使用例, カート内での使用例, 価格・在庫入力(管理画面) |
104
+ | PriceDisplay | `@/components/primitives/price-display` | — | Default, セール価格, サイズ比較, セール × サイズ, 税込ラベルなし, 高額商品, 価格レンジ |
105
+ | ProgressSteps | `@/components/primitives/progress-steps` | — | ステップ1(カート), ステップ2(注文内容), ステップ3(確認), ステップ4(完了), 全ステップ一覧, 会員登録フロー |
106
+ | SearchBar | `@/components/primitives/search-bar` | — | Default, Small(ヘッダー向け), カスタムプレースホルダー |
107
+ | SearchPanel | `@/components/primitives/search-panel` | — | — |
108
+ | SectionHeader | `@/components/primitives/section-header` | — | Default, サブタイトル付き, リンクなし, カスタムラベル, カルーセルナビ付き, ナビのみ, ナビ(先頭位置), アクションボタン付き, サブタイトル + アクション, サイズ一覧, キャプション付きサイズ比較, align=, LPヒーロー(SP 3xl / PC 5xl), align=, start / center 比較 |
109
+ | SectionNav | `@/components/primitives/section-nav` | — | Vertical, Horizontal |
110
+ | Section | `@/components/primitives/section` | — | 推奨: Section + Container, 背景画像 + scrim, 背景バリアント, 縦 spacing バリアント, 配下 Card のサーフェス伝播, ランディング見出し |
111
+ | ShareButtons | `@/components/primitives/share-buttons` | — | Default, コピーフィードバック |
112
+ | SideNav | `@/components/primitives/side-nav` | — | Default, WithGroupLabels, MypageExample, PrefixMatch |
113
+ | SocialLoginButton | `@/components/primitives/social-login-button` | — | LINE, フルサイズ一覧, アイコンのみ |
114
+ | StandardPageShell | `@/components/primitives/standard-page-shell` | — | 検索結果ページ |
115
+ | StatusCountTabs | `@/components/primitives/status-count-tabs` | — | — |
116
+ | StickyActionBar | `@/components/primitives/sticky-action-bar` | — | SingleButton, TwoButtons, WithPrice |
117
+ | SubNav | `@/components/primitives/sub-nav` | — | テキスト(本番準拠), チップ型, アクティブなし |
118
+ | Tag | `@/components/primitives/tag` | **variant**: `default`, `caution`, `sale`, `warning`, `info`, `info-fill`, `success`, `accent`, `timesale`, `berry`, `coupon`<br>**size**: `sm`, `md` | Default, 全バリアント一覧, サイズ比較, アイコン付き, 配送方法タグ, 商品カード内の例 |
119
+ | Timeline | `@/components/primitives/timeline` | — | Default, カスタムマーカー |
120
+ | WorkspaceShell | `@/components/primitives/workspace-shell` | — | 集中編集ワークスペース, ヘッダー中央寄せ(headerLayout=center), 1カラム集中編集 |
121
+
122
+ ---
123
+
124
+ ## EC Components (src/components/ec/)
125
+
126
+ | Component | Import | Variants | Stories |
127
+ |-----------|--------|----------|---------|
128
+ | MissingComponent, AdminShell | `@/components/ec/admin-shell` | — | 管理画面の骨格, 他ブランドでの再利用(brand / sidebarHeader 差し替え), 長いレールラベル |
129
+ | AnniversaryCard | `@/components/ec/anniversary-card` | — | — |
130
+ | CakeLogo | `@/components/ec/cake-logo` | — | Default, カラー, ヘッダー配置例 |
131
+ | ChartControls | `@/components/ec/chart-controls` | — | Default, WithPreviousPeriod, Interactive, InCard |
132
+ | CountdownTimer | `@/components/ec/countdown-timer` | — | 開始前, 開催中, 終了後, 全バリエーション |
133
+ | CouponCard | `@/components/ec/coupon-card` | — | 縦型 / 獲得可能, 縦型 / 獲得済み, 縦型 / 獲得不可, 縦型 / 画像なし, SP横長 / 獲得可能, SP横長 / 獲得済み, SP横長 / お店限定クーポン一覧, 縦型 / 一覧 |
134
+ | DeliveryCalendar | `@/components/ec/delivery-calendar` | — | デフォルト, 日付選択あり, 3月 |
135
+ | MypageShell | `@/components/ec/mypage-shell` | — | ブックマークした商品, 他ブランドでの再利用(logo / navItems 差し替え) |
136
+ | OrderSection | `@/components/ec/order-section` | — | 入力済み, 未入力, エラー, 購入確認画面 |
137
+ | OrderSummary | `@/components/ec/order-summary` | — | カート合計, チェックアウト合計, クーポン適用時, 合計のみ |
138
+ | PaymentMethodDisplay, CreditCardIcon | `@/components/ec/payment-method` | — | 登録済み, 未登録, 期限切れ, 対応ブランド一覧, カードブランドアイコン |
139
+ | ProductCard, BookmarkRibbonIcon | `@/components/ec/product-card` | — | ストロベリーショートケーキ 5号(15cm), お気に入りボタン付き, タグ付き, ランキング, 配送日表示, 規格・仕様キャプション, 横向き, グリッドレイアウト(標準コンテナクエリ), 割引バッジ, カートボタン付き, ショップ名リンク付き, 最小構成 |
140
+ | ProductCarousel | `@/components/ec/product-carousel` | — | Default, WithRanking, LargeCards, WithSectionImage, WithDescription, WithCartButton |
141
+ | ProductCTA | `@/components/ec/product-cta` | — | カートに追加, タイムセール中, 完売, 全バリエーション |
142
+ | ProductDetailBar | `@/components/ec/product-detail-bar` | — | — |
143
+ | ProductDetailSidebar | `@/components/ec/product-detail-sidebar` | — | フルセット(未作成ハイライト), 最小構成, クーポンなし, ブックマーク済み |
144
+ | ProductListItem | `@/components/ec/product-list-item` | — | デフォルト, 規格・仕様キャプション, 小サイズ, レビュー画面, 注文履歴, レビュー付き, 広告掲載, 一覧表示, レビュー画面一覧, カート, カート(小計付き), カート一覧 |
145
+ | ProductOption, OptionQuantity, OptionSelect, OptionText, OptionImageUpload | `@/components/ec/product-option` | — | 数量選択, プルダウン選択, テキスト入力, チェックボックス, 画像アップロード, 全オプション一覧 |
146
+ | RatingStars, SparkleIcon | `@/components/ec/rating-stars` | — | Default, サイズ比較, 評価値バリエーション, 件数なし, アイコンのみ, 大量レビュー |
147
+ | ReviewCard | `@/components/ec/review-card` | — | リスト(SP), リスト(いいね済み), カード(商品付き), カード(商品なし), PC, 画像なし, インタラクティブ |
148
+ | ReviewForm | `@/components/ec/review-form` | — | デフォルト, 商品ヘッダーなし, 入力済み, 送信中, キャンセルなし |
149
+ | ReviewSummary, ReviewItem | `@/components/ec/review-summary` | — | レビュー集計, 簡易集計, レビュー一覧 |
150
+ | ShopCard | `@/components/ec/shop-card` | — | デフォルト, コンパクト, ルビ付き, グリッド表示 |
151
+ | StatCard | `@/components/ec/stat-card` | — | — |
152
+
153
+ ---
154
+
155
+ ## よくある間違い
156
+
157
+ | やっていたこと(禁止) | 正しい書き方 |
158
+ |---|---|
159
+ | `function SectionHeader()` を story 内で定義 | `import { SectionHeader } from '@/components/primitives/section-header'` |
160
+ | `function FieldRow()` を定義してラベル+入力表示 | `import { FormField } from '@/components/primitives/form-field'` |
161
+ | `<div className="rounded-xl bg-[var(--Surface-Primary)] border p-4">` | `<Card><CardContent className="p-4">` |
162
+ | `<button className="...">` でボタンを作成 | `<Button variant="..." size="...">` |
163
+ | `function StarRating()` を定義 | `import { RatingStars } from '@/components/ec/rating-stars'` |
164
+ | `function CartSummaryTable()` を定義 | `import { OrderSummary } from '@/components/ec/order-summary'` |
165
+ | 数量変更の +/- ボタンを raw button で実装 | `import { QuantitySelector } from '@/components/primitives/quantity-selector'` |
166
+ | 配送切替を `ToggleGroup` で実装 | `<Tabs variant="segment">` で Segment(ピル型)タブを使う |
@@ -13,10 +13,12 @@ Codex(および他の AI エージェント)は UI 作業を始める前に
13
13
  |---------|------|
14
14
  | `node_modules/@cakejp/design-system/CLAUDE.md` | DS 利用ガイド・禁止パターン |
15
15
  | `node_modules/@cakejp/design-system/contracts/components.json` | 全コンポーネントの定義・バリアント |
16
+ | `node_modules/@cakejp/design-system/src/components/COMPONENT_LOOKUP.md` | 125コンポーネントの軽量な早見表 |
16
17
  | `node_modules/@cakejp/design-system/contracts/rules.json` | 禁止パターン・アクセシビリティ要件 |
17
18
  | `node_modules/@cakejp/design-system/tokens.json` | カラー・余白・角丸・影・タイポ |
18
19
 
19
20
  > DS 側のルール更新は `npm update @cakejp/design-system` で自動反映されます。このファイルは書き換え不要。
21
+ > 旧exportの残存は `@cakejp/design-system/eslint/deprecated` の `no-deprecated` ルールで継続検出できます。
20
22
 
21
23
  ## ❌ 書く前に必ず確認するパターン
22
24