@cakejp/design-system 0.3.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.
Files changed (131) hide show
  1. package/AGENTS.md +144 -0
  2. package/CHANGELOG.md +115 -0
  3. package/CLAUDE.md +188 -0
  4. package/CLAUDE_PRODUCTION.md +121 -0
  5. package/MIGRATION.md +228 -0
  6. package/README.md +79 -0
  7. package/RELEASE.md +205 -0
  8. package/bin/init.js +134 -0
  9. package/component-registry.json +1146 -0
  10. package/contracts/components.json +730 -0
  11. package/contracts/rules.json +559 -0
  12. package/dist/index.css +1 -0
  13. package/dist/index.js +9344 -0
  14. package/dist/types/components/ec/_mypage-menu-data.d.ts +15 -0
  15. package/dist/types/components/ec/admin-layout.d.ts +31 -0
  16. package/dist/types/components/ec/anniversary-card.d.ts +50 -0
  17. package/dist/types/components/ec/cake-logo.d.ts +22 -0
  18. package/dist/types/components/ec/chart-controls.d.ts +16 -0
  19. package/dist/types/components/ec/countdown-timer.d.ts +24 -0
  20. package/dist/types/components/ec/coupon-card.d.ts +47 -0
  21. package/dist/types/components/ec/delivery-calendar.d.ts +36 -0
  22. package/dist/types/components/ec/order-section.d.ts +29 -0
  23. package/dist/types/components/ec/order-summary.d.ts +36 -0
  24. package/dist/types/components/ec/payment-method.d.ts +41 -0
  25. package/dist/types/components/ec/product-card.d.ts +77 -0
  26. package/dist/types/components/ec/product-carousel.d.ts +56 -0
  27. package/dist/types/components/ec/product-cta.d.ts +35 -0
  28. package/dist/types/components/ec/product-detail-bar.d.ts +62 -0
  29. package/dist/types/components/ec/product-detail-sidebar.d.ts +115 -0
  30. package/dist/types/components/ec/product-list-item.d.ts +90 -0
  31. package/dist/types/components/ec/product-option.d.ts +62 -0
  32. package/dist/types/components/ec/rating-stars.d.ts +30 -0
  33. package/dist/types/components/ec/review-card.d.ts +44 -0
  34. package/dist/types/components/ec/review-form.d.ts +40 -0
  35. package/dist/types/components/ec/review-summary.d.ts +53 -0
  36. package/dist/types/components/ec/shop-card.d.ts +48 -0
  37. package/dist/types/components/ec/stat-card.d.ts +44 -0
  38. package/dist/types/components/foundations/accordion.d.ts +7 -0
  39. package/dist/types/components/foundations/alert-dialog.d.ts +18 -0
  40. package/dist/types/components/foundations/alert.d.ts +42 -0
  41. package/dist/types/components/foundations/aspect-ratio.d.ts +3 -0
  42. package/dist/types/components/foundations/avatar.d.ts +11 -0
  43. package/dist/types/components/foundations/badge.d.ts +9 -0
  44. package/dist/types/components/foundations/breadcrumb.d.ts +11 -0
  45. package/dist/types/components/foundations/button.d.ts +10 -0
  46. package/dist/types/components/foundations/calendar.d.ts +8 -0
  47. package/dist/types/components/foundations/card.d.ts +9 -0
  48. package/dist/types/components/foundations/checkbox-card.d.ts +30 -0
  49. package/dist/types/components/foundations/checkbox-group.d.ts +53 -0
  50. package/dist/types/components/foundations/checkbox.d.ts +4 -0
  51. package/dist/types/components/foundations/collapsible.d.ts +5 -0
  52. package/dist/types/components/foundations/command.d.ts +18 -0
  53. package/dist/types/components/foundations/context-menu.d.ts +25 -0
  54. package/dist/types/components/foundations/data-table.d.ts +104 -0
  55. package/dist/types/components/foundations/dialog.d.ts +17 -0
  56. package/dist/types/components/foundations/drawer.d.ts +13 -0
  57. package/dist/types/components/foundations/dropdown-menu.d.ts +25 -0
  58. package/dist/types/components/foundations/form.d.ts +24 -0
  59. package/dist/types/components/foundations/hover-card.d.ts +6 -0
  60. package/dist/types/components/foundations/input.d.ts +3 -0
  61. package/dist/types/components/foundations/label.d.ts +7 -0
  62. package/dist/types/components/foundations/menubar.d.ts +26 -0
  63. package/dist/types/components/foundations/navigation-menu.d.ts +14 -0
  64. package/dist/types/components/foundations/pagination.d.ts +13 -0
  65. package/dist/types/components/foundations/popover.d.ts +10 -0
  66. package/dist/types/components/foundations/progress.d.ts +4 -0
  67. package/dist/types/components/foundations/radio-group.d.ts +9 -0
  68. package/dist/types/components/foundations/responsive-dialog.d.ts +52 -0
  69. package/dist/types/components/foundations/scroll-area.d.ts +5 -0
  70. package/dist/types/components/foundations/select.d.ts +15 -0
  71. package/dist/types/components/foundations/separator.d.ts +4 -0
  72. package/dist/types/components/foundations/sheet.d.ts +14 -0
  73. package/dist/types/components/foundations/skeleton.d.ts +2 -0
  74. package/dist/types/components/foundations/slider.d.ts +4 -0
  75. package/dist/types/components/foundations/sonner.d.ts +3 -0
  76. package/dist/types/components/foundations/spinner.d.ts +6 -0
  77. package/dist/types/components/foundations/switch.d.ts +13 -0
  78. package/dist/types/components/foundations/table.d.ts +10 -0
  79. package/dist/types/components/foundations/tabs.d.ts +12 -0
  80. package/dist/types/components/foundations/textarea.d.ts +3 -0
  81. package/dist/types/components/foundations/toggle-group.d.ts +23 -0
  82. package/dist/types/components/foundations/toggle.d.ts +9 -0
  83. package/dist/types/components/foundations/tooltip.d.ts +7 -0
  84. package/dist/types/components/pages/cake/_mypage-shell.d.ts +41 -0
  85. package/dist/types/components/primitives/banner-carousel.d.ts +54 -0
  86. package/dist/types/components/primitives/bottom-tab-bar.d.ts +39 -0
  87. package/dist/types/components/primitives/bulk-action-bar.d.ts +32 -0
  88. package/dist/types/components/primitives/category-scroll.d.ts +70 -0
  89. package/dist/types/components/primitives/category-shortcuts.d.ts +44 -0
  90. package/dist/types/components/primitives/chip.d.ts +44 -0
  91. package/dist/types/components/primitives/coach-mark.d.ts +28 -0
  92. package/dist/types/components/primitives/empty-state.d.ts +36 -0
  93. package/dist/types/components/primitives/error-state.d.ts +41 -0
  94. package/dist/types/components/primitives/filter-bar.d.ts +56 -0
  95. package/dist/types/components/primitives/footer.d.ts +81 -0
  96. package/dist/types/components/primitives/form-field.d.ts +46 -0
  97. package/dist/types/components/primitives/header.d.ts +69 -0
  98. package/dist/types/components/primitives/image-carousel.d.ts +52 -0
  99. package/dist/types/components/primitives/image-gallery.d.ts +35 -0
  100. package/dist/types/components/primitives/image-uploader.d.ts +19 -0
  101. package/dist/types/components/primitives/kebab-menu.d.ts +38 -0
  102. package/dist/types/components/primitives/list-item.d.ts +60 -0
  103. package/dist/types/components/primitives/menu-drawer.d.ts +75 -0
  104. package/dist/types/components/primitives/notification-badge.d.ts +30 -0
  105. package/dist/types/components/primitives/notification-list.d.ts +45 -0
  106. package/dist/types/components/primitives/price-display.d.ts +33 -0
  107. package/dist/types/components/primitives/progress-steps.d.ts +27 -0
  108. package/dist/types/components/primitives/quantity-selector.d.ts +50 -0
  109. package/dist/types/components/primitives/search-bar.d.ts +31 -0
  110. package/dist/types/components/primitives/search-panel.d.ts +41 -0
  111. package/dist/types/components/primitives/section-header.d.ts +51 -0
  112. package/dist/types/components/primitives/share-buttons.d.ts +23 -0
  113. package/dist/types/components/primitives/side-nav.d.ts +62 -0
  114. package/dist/types/components/primitives/social-login-button.d.ts +24 -0
  115. package/dist/types/components/primitives/status-count-tabs.d.ts +14 -0
  116. package/dist/types/components/primitives/sticky-action-bar.d.ts +7 -0
  117. package/dist/types/components/primitives/sub-nav.d.ts +34 -0
  118. package/dist/types/components/primitives/tag.d.ts +19 -0
  119. package/dist/types/index.d.ts +109 -0
  120. package/dist/types/lib/utils.d.ts +2 -0
  121. package/package.json +186 -0
  122. package/scripts/codemod/check-migration.mjs +97 -0
  123. package/scripts/codemod/v0.2-to-v0.3.mjs +192 -0
  124. package/src/preset-standalone.css +109 -0
  125. package/src/preset.css +288 -0
  126. package/src/styles/primitive.css +139 -0
  127. package/src/styles/semantic.css +203 -0
  128. package/src/styles/typography.css +129 -0
  129. package/templates/AGENTS.md +56 -0
  130. package/templates/CLAUDE.md +56 -0
  131. package/tokens.json +127 -0
@@ -0,0 +1,115 @@
1
+ import * as React from "react";
2
+ /** サイズピッカーの選択肢 */
3
+ export interface SizeOption {
4
+ /** 表示ラベル(例: "3号") */
5
+ label: string;
6
+ /** 値(識別用) */
7
+ value: string;
8
+ /** 売り切れ */
9
+ soldOut?: boolean;
10
+ }
11
+ /** クーポン情報 */
12
+ export interface CouponInfo {
13
+ /** クーポン名(例: "5%OFFクーポン") */
14
+ label: string;
15
+ /** アクションテキスト */
16
+ actionLabel?: string;
17
+ /** クリックハンドラ */
18
+ onAction?: () => void;
19
+ }
20
+ /** 商品タグ */
21
+ export interface ProductTag {
22
+ label: string;
23
+ variant?: "default" | "caution" | "info" | "info-fill" | "accent" | "sale";
24
+ }
25
+ /** プロモバナー */
26
+ export interface PromoBanner {
27
+ /** バッジテキスト(例: "初回¥3,000OFF") */
28
+ badge: string;
29
+ /** 本文 */
30
+ text: React.ReactNode;
31
+ /** クリックハンドラ */
32
+ onClick?: () => void;
33
+ }
34
+ /** ポイント情報 */
35
+ export interface PointInfo {
36
+ /** 通常ポイント(例: "35pt") */
37
+ points: string;
38
+ /** ポイント補足(例: "(円相当)") */
39
+ pointsSuffix?: string;
40
+ /** カード還元表示(例: "3%還元 105pt") */
41
+ cardReward?: string;
42
+ /** 詳細クリックハンドラ */
43
+ onDetailClick?: () => void;
44
+ }
45
+ export interface ProductDetailSidebarProps extends React.HTMLAttributes<HTMLDivElement> {
46
+ /** 商品名 */
47
+ productName: string;
48
+ /** 価格(税込、数値) */
49
+ price: number;
50
+ /** 商品タグ一覧 */
51
+ tags?: ProductTag[];
52
+ /** ショップ名 */
53
+ shopName?: string;
54
+ /** ショップリンクURL */
55
+ shopHref?: string;
56
+ /** ブランドタグ(例: "Cake.jp ORIGINAL") */
57
+ brandLabel?: string;
58
+ /** ブランドリンクURL */
59
+ brandHref?: string;
60
+ /** 評価値 */
61
+ rating?: number;
62
+ /** レビュー件数 */
63
+ reviewCount?: number;
64
+ /** クーポン一覧 */
65
+ coupons?: CouponInfo[];
66
+ /** サイズ選択肢(行ごとの配列) */
67
+ sizeOptions?: SizeOption[][];
68
+ /** 現在選択中のサイズ value */
69
+ selectedSize?: string;
70
+ /** サイズ変更ハンドラ */
71
+ onSizeChange?: (value: string) => void;
72
+ /** サイズの補足情報テキスト(例: "ケーキの号数、サイズについて") */
73
+ sizeInfoLabel?: string;
74
+ /** サイズ補足クリック */
75
+ onSizeInfoClick?: () => void;
76
+ /** 配送先の都道府県 */
77
+ deliveryPrefecture?: string;
78
+ /** 配送先変更ハンドラ */
79
+ onPrefectureChange?: () => void;
80
+ /** 最短お届け日テキスト(例: "1/5(木)") */
81
+ earliestDelivery?: string;
82
+ /** 数量 */
83
+ quantity?: number;
84
+ /** 数量変更ハンドラ */
85
+ onQuantityChange?: (value: number) => void;
86
+ /** ポイント情報 */
87
+ pointInfo?: PointInfo;
88
+ /** カートに追加ハンドラ */
89
+ onAddToCart?: () => void;
90
+ /** カートボタンのテキスト */
91
+ addToCartLabel?: string;
92
+ /** ブックマークに追加ハンドラ */
93
+ onBookmark?: () => void;
94
+ /** ブックマーク済みか */
95
+ isBookmarked?: boolean;
96
+ /** プロモバナー */
97
+ promoBanner?: PromoBanner;
98
+ }
99
+ /**
100
+ * 商品詳細サイドバー(CV セット)
101
+ *
102
+ * PC商品詳細ページの右カラムに表示する購入導線コンポーネント。
103
+ * タグ・商品名・ショップ名・価格・レビュー・クーポン・サイズ選択・
104
+ * お届け日・数量・ポイント・CTA・ブックマーク・プロモバナーを集約。
105
+ *
106
+ * ### AI 向け使用ルール
107
+ *
108
+ * - PC商品詳細ページの右カラムに配置(幅 400px 推奨)
109
+ * - 既存の `Tag`, `RatingStars`, `QuantitySelector`, `PriceDisplay`, `Button` を内部で使用
110
+ * - 価格表示は `PriceDisplay` コンポーネント(size="xl")を使用し、税込表示フォーマットを統一
111
+ * - サイズ選択肢は行単位の2次元配列で渡す
112
+ * - `onAddToCart` が未指定の場合、ボタンは disabled
113
+ */
114
+ declare function ProductDetailSidebar({ className, productName, price, tags, shopName, shopHref, brandLabel, brandHref, rating, reviewCount, coupons, sizeOptions, selectedSize, onSizeChange, sizeInfoLabel, onSizeInfoClick, deliveryPrefecture, onPrefectureChange, earliestDelivery, quantity, onQuantityChange, pointInfo, onAddToCart, addToCartLabel, onBookmark, isBookmarked, promoBanner, ...props }: ProductDetailSidebarProps): import("react/jsx-runtime").JSX.Element;
115
+ export { ProductDetailSidebar };
@@ -0,0 +1,90 @@
1
+ import * as React from "react";
2
+ export interface ProductListItemTag {
3
+ label: string;
4
+ variant?: "default" | "accent" | "info" | "timesale" | "sale";
5
+ }
6
+ export interface ProductListItemProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /** 商品名 */
8
+ name: string;
9
+ /** 商品画像URL */
10
+ imageUrl?: string;
11
+ /** 価格 */
12
+ price?: number;
13
+ /** ショップ名 */
14
+ shopName?: string;
15
+ /** ショップリンクURL */
16
+ shopHref?: string;
17
+ /** オリジナルブランド名 */
18
+ brandName?: string;
19
+ /** タグ群 */
20
+ tags?: ProductListItemTag[];
21
+ /** ハッシュタグ(例: ["ベストセラー", "メディア掲載"]) */
22
+ hashTags?: string[];
23
+ /** ステータスラベル(例: "商品出荷済", "準備中") */
24
+ statusLabel?: string;
25
+ /** 表示バリエーション */
26
+ variant?: "default" | "small" | "xsm" | "order-history" | "cart" | "review" | "ad" | "lp";
27
+ /** 「カートに追加」ボタン表示 */
28
+ showCartButton?: boolean;
29
+ /** カートボタンのハンドラ */
30
+ onAddToCart?: () => void;
31
+ /** 「商品詳細を見る」ボタン表示 */
32
+ showDetailButton?: boolean;
33
+ /** 商品詳細ボタンのハンドラ */
34
+ onViewDetail?: () => void;
35
+ /** ブックマークアイコンの表示 */
36
+ showBookmark?: boolean;
37
+ /** リンク先 */
38
+ href?: string;
39
+ /** 注文日 */
40
+ orderDate?: string;
41
+ /** お届け先 */
42
+ deliveryInfo?: string;
43
+ /** 合計金額 */
44
+ totalPrice?: number;
45
+ /** レビューボタン表示 */
46
+ showReviewButton?: boolean;
47
+ /** メッセージ・オプション情報 */
48
+ optionInfo?: Record<string, string>;
49
+ /** 数量(cart variant) */
50
+ quantity?: number;
51
+ /** 数量変更コールバック(cart variant) */
52
+ onQuantityChange?: (value: number) => void;
53
+ /** 数量セレクターのサイズ(cart variant) */
54
+ quantitySize?: "sm" | "md";
55
+ /** 元価格・割引前(cart variant) */
56
+ originalPrice?: number;
57
+ /** 価格ラベル(例: "商品価格")(cart variant) */
58
+ priceLabel?: string;
59
+ /** お届け日テキスト(例: "お届け日: 3/19(水)")(cart variant) */
60
+ deliveryText?: string;
61
+ /** 削除コールバック(cart variant) */
62
+ onDelete?: () => void;
63
+ /** あとで買うコールバック(cart variant) */
64
+ onSaveForLater?: () => void;
65
+ /** 画像サイズクラス(cart variant、デフォルト: "size-20") */
66
+ imageSize?: string;
67
+ /** 左側スロット(画像の代わりに任意コンテンツ) */
68
+ leftSlot?: React.ReactNode;
69
+ /** 右側スロット(ブックマークの代わりに任意コンテンツ) */
70
+ rightSlot?: React.ReactNode;
71
+ /** 下部スロット(アクションボタンの代わりに任意コンテンツ) */
72
+ bottomSlot?: React.ReactNode;
73
+ }
74
+ /**
75
+ * カードリストアイテム — Figma Card/List 準拠
76
+ *
77
+ * 横型の商品カード(注文履歴、カート、検索結果、レビュー画面など)。
78
+ *
79
+ * ### AI 向け使用ルール
80
+ *
81
+ * - 検索結果: `<ListItem variant="default" showCartButton showBookmark />`
82
+ * - 注文履歴: `<ListItem variant="order-history" />`
83
+ * - カート内: `<ListItem variant="cart" quantity={1} price={4980} onQuantityChange={...} />`
84
+ * - cart variant は `CartItem` ラッパーコンポーネント経由でも使用可能
85
+ * - レビュー画面: `<ListItem variant="review" showDetailButton showCartButton />`
86
+ * - 小さい: `<ListItem variant="small" />`
87
+ * - 極小: `<ListItem variant="xsm" />`
88
+ */
89
+ declare function ProductListItem({ name, imageUrl, price, shopName, shopHref, brandName, tags, hashTags, statusLabel, variant, showCartButton, onAddToCart, showDetailButton, onViewDetail, showBookmark, href, orderDate, deliveryInfo, totalPrice, showReviewButton, optionInfo, quantity, onQuantityChange, quantitySize, originalPrice, priceLabel, deliveryText, onDelete, onSaveForLater, imageSize, leftSlot, rightSlot, bottomSlot, className, ...props }: ProductListItemProps): import("react/jsx-runtime").JSX.Element;
90
+ export { ProductListItem };
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ export type ProductOptionType = "quantity" | "select" | "text" | "checkbox" | "image-upload" | "number-candle" | "letter";
3
+ export interface ProductOptionProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ /** オプションの種類 */
5
+ type: ProductOptionType;
6
+ /** ラベル */
7
+ label: string;
8
+ /** 必須かどうか */
9
+ required?: boolean;
10
+ /** 価格(例: "¥150") */
11
+ price?: string;
12
+ /** ヘルプテキスト */
13
+ helpText?: string;
14
+ /** エラーメッセージ */
15
+ error?: string;
16
+ /** 子要素(フォーム内容) */
17
+ children?: React.ReactNode;
18
+ }
19
+ /**
20
+ * 商品オプション
21
+ *
22
+ * カート内の商品オプション設定フォーム。
23
+ * Figma: _option/type
24
+ *
25
+ * ### AI 向け使用ルール
26
+ *
27
+ * - 数量: `<ProductOption type="quantity" label="数量" />`
28
+ * - セレクト: `<ProductOption type="select" label="サイズ" />`
29
+ * - テキスト入力: `<ProductOption type="text" label="メッセージ" />`
30
+ * - チェックボックス: `<ProductOption type="checkbox" label="ラッピング" />`
31
+ * - 画像アップロード: `<ProductOption type="image-upload" label="写真" />`
32
+ * - ナンバーキャンドル: `<ProductOption type="number-candle" label="キャンドル" />`
33
+ */
34
+ declare function ProductOption({ type, label, required, price, helpText, error, children, className, ...props }: ProductOptionProps): import("react/jsx-runtime").JSX.Element;
35
+ export interface OptionQuantityProps {
36
+ value: number;
37
+ min?: number;
38
+ max?: number;
39
+ onChange?: (value: number) => void;
40
+ }
41
+ declare function OptionQuantity({ value, min, max, onChange, ...rest }: OptionQuantityProps & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
42
+ export interface OptionSelectProps {
43
+ value?: string;
44
+ options: {
45
+ label: string;
46
+ value: string;
47
+ }[];
48
+ onChange?: (value: string) => void;
49
+ placeholder?: string;
50
+ }
51
+ declare function OptionSelect({ value, options, onChange, placeholder, ...rest }: OptionSelectProps & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
52
+ export interface OptionTextProps {
53
+ value?: string;
54
+ onChange?: (value: string) => void;
55
+ placeholder?: string;
56
+ maxLength?: number;
57
+ }
58
+ declare function OptionText({ value, onChange, placeholder, maxLength, ...rest }: OptionTextProps & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
59
+ declare function OptionImageUpload({ onUpload, ...rest }: {
60
+ onUpload?: () => void;
61
+ } & React.HTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
62
+ export { ProductOption, OptionQuantity, OptionSelect, OptionText, OptionImageUpload, };
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ export interface RatingStarsProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** 評価値 (0〜5) */
4
+ rating: number;
5
+ /** レビュー件数 */
6
+ reviewCount?: number;
7
+ /** サイズ */
8
+ size?: "sm" | "md" | "lg";
9
+ /** レビュー件数を表示するか */
10
+ showCount?: boolean;
11
+ /** 評価値を数字で表示するか */
12
+ showValue?: boolean;
13
+ }
14
+ /**
15
+ * ✦ キラ(スパークル)アイコン
16
+ * Cake.jp デザインシステムの標準レビューアイコン。
17
+ * 4 頂点の星型(kira)。
18
+ */
19
+ declare function SparkleIcon({ size, className, }: {
20
+ size?: number;
21
+ className?: string;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ /**
24
+ * レビュー評価表示コンポーネント。
25
+ *
26
+ * Cake.jp 標準パターン: ✦ 4.67 (345)
27
+ * 1つのスパークルアイコン + 数値 + レビュー件数。
28
+ */
29
+ declare function RatingStars({ className, rating, reviewCount, size, showCount, showValue, ...props }: RatingStarsProps): import("react/jsx-runtime").JSX.Element;
30
+ export { RatingStars, SparkleIcon };
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ export interface ReviewCardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** レビューバリアント */
4
+ variant?: "list" | "card" | "pc";
5
+ /** 星評価(1〜5) */
6
+ rating: number;
7
+ /** 投稿日 */
8
+ date: string;
9
+ /** レビュー本文 */
10
+ text: string;
11
+ /** レビュー画像URL */
12
+ imageUrl?: string;
13
+ /** 商品名(variant="card" で商品ヘッダー表示) */
14
+ productName?: string;
15
+ /** 商品サムネイルURL(variant="card" で商品ヘッダー表示) */
16
+ productImageUrl?: string;
17
+ /** 「参考になった」件数 */
18
+ helpfulCount?: number;
19
+ /** いいね済みか */
20
+ isLiked?: boolean;
21
+ /** いいねクリックハンドラ */
22
+ onLikeClick?: () => void;
23
+ /** 「もっと見る」クリックハンドラ */
24
+ onMoreClick?: () => void;
25
+ /** テキスト省略の最大文字数 */
26
+ maxLength?: number;
27
+ }
28
+ /**
29
+ * レビューカード
30
+ *
31
+ * ユーザーのレビューを表示するカード。
32
+ * 星評価・投稿日・レビュー文・画像・「参考になった」ボタンを含む。
33
+ *
34
+ * ### AI 向け使用ルール
35
+ *
36
+ * - 商品詳細ページのレビューセクションで使用
37
+ * - `variant="list"` はSPリスト表示(デフォルト)
38
+ * - `variant="card"` は商品ヘッダー付きカード
39
+ * - `variant="pc"` はPC向け幅広レイアウト
40
+ * - 既存の `RatingStars` の `SparkleIcon` を星表示に使用
41
+ * - 「もっと見る」はオレンジテキスト
42
+ */
43
+ declare function ReviewCard({ className, variant, rating, date, text, imageUrl, productName, productImageUrl, helpfulCount, isLiked, onLikeClick, onMoreClick, maxLength, ...props }: ReviewCardProps): import("react/jsx-runtime").JSX.Element;
44
+ export { ReviewCard };
@@ -0,0 +1,40 @@
1
+ import * as React from "react";
2
+ export interface ReviewFormProps extends Omit<React.HTMLAttributes<HTMLFormElement>, "onSubmit"> {
3
+ /** 初期星評価 */
4
+ defaultRating?: number;
5
+ /** 初期レビューテキスト */
6
+ defaultText?: string;
7
+ /** 送信ハンドラ */
8
+ onSubmit?: (data: {
9
+ rating: number;
10
+ text: string;
11
+ images: File[];
12
+ }) => void;
13
+ /** キャンセルハンドラ */
14
+ onCancel?: () => void;
15
+ /** 送信中かどうか */
16
+ isSubmitting?: boolean;
17
+ /** 最大画像枚数 */
18
+ maxImages?: number;
19
+ /** 最大文字数 */
20
+ maxLength?: number;
21
+ /** 商品名(ヘッダー表示用) */
22
+ productName?: string;
23
+ /** 商品画像URL(ヘッダー表示用) */
24
+ productImageUrl?: string;
25
+ }
26
+ /**
27
+ * レビュー投稿フォーム
28
+ *
29
+ * 星評価の選択・レビュー文の入力・画像添付ができるフォーム。
30
+ * Storybook上で直接レビューの入力体験を確認できる。
31
+ *
32
+ * ### AI 向け使用ルール
33
+ *
34
+ * - 商品詳細ページの「レビューを書く」から遷移するフォーム
35
+ * - `productName` + `productImageUrl` でどの商品のレビューか表示
36
+ * - `maxImages` でアップロード可能な画像枚数を制限(デフォルト3枚)
37
+ * - `onSubmit` で `{ rating, text, images }` を受け取る
38
+ */
39
+ declare function ReviewForm({ defaultRating, defaultText, onSubmit, onCancel, isSubmitting, maxImages, maxLength, productName, productImageUrl, className, ...props }: ReviewFormProps): import("react/jsx-runtime").JSX.Element;
40
+ export { ReviewForm };
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ export interface ReviewGaugeItem {
3
+ /** 星の数(5〜1) */
4
+ stars: number;
5
+ /** 件数 */
6
+ count: number;
7
+ }
8
+ export interface ReviewSummaryProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ /** 平均評価 */
10
+ averageRating: number;
11
+ /** 総レビュー数 */
12
+ totalCount: number;
13
+ /** 星ごとの内訳 */
14
+ breakdown?: ReviewGaugeItem[];
15
+ }
16
+ /**
17
+ * レビュー集計
18
+ *
19
+ * 商品・店舗の平均評価と星別の内訳ゲージ。
20
+ * Figma: gauge (レビュー)
21
+ *
22
+ * ### AI 向け使用ルール
23
+ *
24
+ * - `<ReviewSummary averageRating={4.67} totalCount={345} breakdown={[...]} />`
25
+ * - breakdown を省略するとゲージなしの簡易表示
26
+ */
27
+ declare function ReviewSummary({ averageRating, totalCount, breakdown, className, ...props }: ReviewSummaryProps): import("react/jsx-runtime").JSX.Element;
28
+ export interface ReviewItemProps extends React.HTMLAttributes<HTMLDivElement> {
29
+ /** レビュアー名 */
30
+ reviewer: string;
31
+ /** 評価(1〜5) */
32
+ rating: number;
33
+ /** レビュー日付 */
34
+ date: string;
35
+ /** レビュー本文 */
36
+ comment: string;
37
+ /** 購入商品名 */
38
+ productName?: string;
39
+ /** レビュー画像URL */
40
+ imageUrls?: string[];
41
+ }
42
+ /**
43
+ * レビューアイテム
44
+ *
45
+ * 1件分のレビュー表示。
46
+ * Figma: Review (s/m/l)
47
+ *
48
+ * ### AI 向け使用ルール
49
+ *
50
+ * - `<ReviewItem reviewer="花子" rating={5} date="2024/03/10" comment="..." />`
51
+ */
52
+ declare function ReviewItem({ reviewer, rating, date, comment, productName, imageUrls, className, ...props }: ReviewItemProps): import("react/jsx-runtime").JSX.Element;
53
+ export { ReviewSummary, ReviewItem };
@@ -0,0 +1,48 @@
1
+ import * as React from "react";
2
+ export interface ShopCardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** 店舗名 */
4
+ name: string;
5
+ /** 店舗名ルビ(ふりがな) */
6
+ ruby?: string;
7
+ /** 商品画像URL(カバー左側) */
8
+ productImageUrl?: string;
9
+ /** 店舗画像URL(カバー右側) */
10
+ shopImageUrl?: string;
11
+ /** 店舗の評価(星の平均) */
12
+ rating?: number;
13
+ /** レビュー件数 */
14
+ reviewCount?: number;
15
+ /** エリア・住所 */
16
+ area?: string;
17
+ /** 最短お届け日テキスト(例: "3/20") */
18
+ deliveryDate?: string;
19
+ /** お気に入り登録済み */
20
+ isBookmarked?: boolean;
21
+ /** お気に入り切り替えハンドラ */
22
+ onBookmarkToggle?: () => void;
23
+ /** リンク先 */
24
+ href?: string;
25
+ /** バリエーション */
26
+ variant?: "default" | "compact";
27
+ }
28
+ /**
29
+ * 店舗カード
30
+ *
31
+ * 店舗一覧(cake.jp/shops/)での店舗情報表示。
32
+ * 本番の p-shops-card クラスに準拠。
33
+ *
34
+ * 構造:
35
+ * - カバー: 商品画像と店舗画像を左右に並べて表示(各50%幅、1:1比率)
36
+ * - ボディ: 店舗名、住所、レビュー、最短お届け日、ブックマーク
37
+ *
38
+ * Figma: _カード/店舗, _Card/店舗
39
+ *
40
+ * ### AI 向け使用ルール
41
+ *
42
+ * - 一覧表示: `<ShopCard name="Patisserie A" variant="default" />`
43
+ * - コンパクト: `<ShopCard name="Patisserie A" variant="compact" />`
44
+ * - 画像は productImageUrl(商品)と shopImageUrl(店舗)の2枚を指定
45
+ * - ブックマークは onBookmarkToggle を渡すと表示される
46
+ */
47
+ declare function ShopCard({ name, ruby, productImageUrl, shopImageUrl, rating, reviewCount, area, deliveryDate, isBookmarked, onBookmarkToggle, href, variant, className, ...props }: ShopCardProps): import("react/jsx-runtime").JSX.Element;
48
+ export { ShopCard };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ## StatCard / 統計カード
3
+ *
4
+ * ダッシュボードのKPI表示用カード。
5
+ * アイコン + ラベル + 数値 + 前期比 の構成。
6
+ *
7
+ * ### インポート
8
+ * ```tsx
9
+ * import { StatCard } from '../../components/ec/stat-card'
10
+ * ```
11
+ *
12
+ * ### Props
13
+ * | Prop | 型 | デフォルト | 説明 |
14
+ * |------|-----|-----------|------|
15
+ * | label | string | — | KPI ラベル |
16
+ * | value | string | — | 表示値 |
17
+ * | icon | ReactNode | — | アイコン要素 |
18
+ * | trend | object | — | 前期比(value + isPositive) |
19
+ * | iconBgClass | string | — | アイコン背景色クラス |
20
+ *
21
+ * ### AI 向け使用ルール
22
+ * - ダッシュボードやレポートページで使用
23
+ * - 3〜4 カラムのグリッドで並べる
24
+ */
25
+ import * as React from "react";
26
+ export interface StatCardProps {
27
+ /** KPI ラベル */
28
+ label: string;
29
+ /** 表示値 */
30
+ value: string;
31
+ /** アイコン要素 */
32
+ icon: React.ReactNode;
33
+ /** アイコン背景色クラス */
34
+ iconBgClass?: string;
35
+ /** 前期比 */
36
+ trend?: {
37
+ value: string;
38
+ isPositive: boolean;
39
+ label?: string;
40
+ };
41
+ /** 追加クラス */
42
+ className?: string;
43
+ }
44
+ export declare function StatCard({ label, value, icon, iconBgClass, trend, className, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { Accordion as AccordionPrimitive } from "radix-ui";
3
+ declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
3
+ import { Button } from "../../components/foundations/button";
4
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
9
+ size?: "default" | "sm";
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
16
+ declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): import("react/jsx-runtime").JSX.Element;
17
+ declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): import("react/jsx-runtime").JSX.Element;
18
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ /**
4
+ * Alert variants mapped to Figma design:
5
+ *
6
+ * "bordered" variants (success / info / error / warning):
7
+ * - White background with colored 1px inner border + 5px outer ring
8
+ * - Icon (24px) + content column layout
9
+ * - Title: bold 14px, Description: regular 12px
10
+ * - Padding 16px, rounded-lg (8px), gap 8px
11
+ * - **prop-based API 対応**: title / description / icon / action を直接渡せる
12
+ *
13
+ * "inline" variants (inline-info / inline-caution / inline-warning):
14
+ * - Tinted background, no border
15
+ * - Compact: padding 8px 12px, rounded-sm (3px), gap 4px
16
+ * - Icon (20px) + content column layout
17
+ *
18
+ * 旧 `<Banner>` の用途は bordered variant + prop-based API で完全カバー:
19
+ * <Alert variant="warning" title="..." description="..." action={<Button />} />
20
+ */
21
+ declare const alertVariants: (props?: {
22
+ variant?: "success" | "info" | "error" | "warning" | "inline-info" | "inline-caution" | "inline-warning";
23
+ } & import("class-variance-authority/types").ClassProp) => string;
24
+ type AlertProps = React.ComponentProps<"div"> & VariantProps<typeof alertVariants> & {
25
+ /**
26
+ * prop-based API のタイトル(旧 Banner.title 相当)。
27
+ * children と排他(children 優先)。bordered variant でのみ有効。
28
+ */
29
+ title?: React.ReactNode;
30
+ /** prop-based API の説明テキスト(旧 Banner.description 相当) */
31
+ description?: React.ReactNode;
32
+ /** カスタムアイコン(未指定時は variant に応じて自動選択) */
33
+ icon?: React.ReactNode;
34
+ /** 右側アクション(Button など、旧 Banner.action 相当) */
35
+ action?: React.ReactNode;
36
+ };
37
+ declare function Alert({ className, variant, children, title, description, icon, action, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
38
+ declare const alertTitleVariants: Record<string, string>;
39
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
40
+ declare const alertDescriptionVariants: Record<string, string>;
41
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
42
+ export { Alert, AlertTitle, AlertDescription, alertVariants, alertTitleVariants, alertDescriptionVariants, };
@@ -0,0 +1,3 @@
1
+ import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
2
+ declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ export { AspectRatio };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { Avatar as AvatarPrimitive } from "radix-ui";
3
+ declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
4
+ size?: "default" | "sm" | "lg";
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
9
+ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount, };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: {
4
+ variant?: "link" | "default" | "success" | "secondary" | "destructive" | "ghost" | "info-subtle" | "success-subtle" | "accent-subtle" | "caution-subtle" | "warning-subtle" | "muted-subtle" | "outline";
5
+ } & import("class-variance-authority/types").ClassProp) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
3
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): import("react/jsx-runtime").JSX.Element;
4
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
5
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
6
+ asChild?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
9
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
10
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
11
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };