@cakejp/design-system 0.17.0 → 0.19.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 (118) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/CLAUDE.md +15 -0
  3. package/contracts/components.json +144 -16
  4. package/contracts/composition.json +1 -1
  5. package/contracts/rules.json +5 -1
  6. package/contracts/screen-patterns.json +1 -1
  7. package/dist/components/ec/admin-shell.js +7 -6
  8. package/dist/components/ec/product-card.js +107 -102
  9. package/dist/components/ec/product-option.js +1 -0
  10. package/dist/components/ec/review-card.js +22 -20
  11. package/dist/components/ec/review-form.js +1 -0
  12. package/dist/components/foundations/accordion.js +23 -22
  13. package/dist/components/foundations/alert.js +1 -0
  14. package/dist/components/foundations/aspect-ratio.js +3 -2
  15. package/dist/components/foundations/avatar.js +1 -0
  16. package/dist/components/foundations/button.js +7 -1
  17. package/dist/components/foundations/calendar.js +1 -0
  18. package/dist/components/foundations/checkbox-group.js +1 -0
  19. package/dist/components/foundations/checkbox.js +1 -0
  20. package/dist/components/foundations/command.js +1 -0
  21. package/dist/components/foundations/context-menu.js +1 -0
  22. package/dist/components/foundations/drawer.js +1 -0
  23. package/dist/components/foundations/file-input.js +1 -0
  24. package/dist/components/foundations/form.js +26 -25
  25. package/dist/components/foundations/pagination.js +49 -46
  26. package/dist/components/foundations/popover.js +9 -8
  27. package/dist/components/foundations/radio-group.js +3 -2
  28. package/dist/components/foundations/responsive-dialog.js +1 -0
  29. package/dist/components/foundations/separator.js +7 -6
  30. package/dist/components/foundations/sheet.js +40 -33
  31. package/dist/components/foundations/slider.js +7 -6
  32. package/dist/components/foundations/social-icon.js +30 -10
  33. package/dist/components/foundations/sonner.js +5 -4
  34. package/dist/components/foundations/tabs.js +45 -25
  35. package/dist/components/foundations/toggle-group.js +6 -5
  36. package/dist/components/primitives/admin-side-nav.js +1 -0
  37. package/dist/components/primitives/chat-composer.js +1 -0
  38. package/dist/components/primitives/combobox.js +1 -0
  39. package/dist/components/primitives/content-card.js +111 -0
  40. package/dist/components/primitives/content-carousel.js +9 -8
  41. package/dist/components/primitives/date-picker.js +9 -8
  42. package/dist/components/primitives/footer.js +169 -100
  43. package/dist/components/primitives/form-field.js +1 -0
  44. package/dist/components/primitives/header.js +220 -176
  45. package/dist/components/primitives/image-carousel.js +8 -7
  46. package/dist/components/primitives/image-gallery.js +15 -14
  47. package/dist/components/primitives/image-input.js +9 -8
  48. package/dist/components/primitives/list-item.js +9 -8
  49. package/dist/components/primitives/menu-drawer.js +60 -56
  50. package/dist/components/primitives/multi-select.js +7 -6
  51. package/dist/components/primitives/number-input.js +1 -0
  52. package/dist/components/primitives/prose.js +52 -0
  53. package/dist/components/primitives/search-bar.js +81 -66
  54. package/dist/components/primitives/section-header.js +58 -55
  55. package/dist/components/primitives/share-buttons.js +93 -85
  56. package/dist/components/primitives/status-count-tabs.js +8 -7
  57. package/dist/components/primitives/sub-nav.js +52 -52
  58. package/dist/index.css +1 -1
  59. package/dist/index.js +1785 -831
  60. package/dist/lib/field-labelling.js +7 -6
  61. package/dist/lib/link-component.js +6 -0
  62. package/dist/lib/use-value-length.js +1 -0
  63. package/dist/types/components/ec/_mypage-menu-data.d.ts +3 -3
  64. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  65. package/dist/types/components/ec/anniversary-card.d.ts +1 -1
  66. package/dist/types/components/ec/mypage-shell.d.ts +3 -3
  67. package/dist/types/components/ec/product-card.d.ts +13 -20
  68. package/dist/types/components/ec/product-carousel.d.ts +3 -3
  69. package/dist/types/components/ec/review-card.d.ts +6 -1
  70. package/dist/types/components/ec/stat-card.d.ts +1 -1
  71. package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
  72. package/dist/types/components/foundations/button.d.ts +1 -1
  73. package/dist/types/components/foundations/calendar.d.ts +1 -1
  74. package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
  75. package/dist/types/components/foundations/chip-variants.d.ts +1 -1
  76. package/dist/types/components/foundations/command.d.ts +1 -1
  77. package/dist/types/components/foundations/data-table.d.ts +9 -1
  78. package/dist/types/components/foundations/field.d.ts +2 -2
  79. package/dist/types/components/foundations/file-input.d.ts +1 -1
  80. package/dist/types/components/foundations/pagination.d.ts +8 -2
  81. package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
  82. package/dist/types/components/foundations/sheet.d.ts +6 -1
  83. package/dist/types/components/foundations/skip-link.d.ts +1 -1
  84. package/dist/types/components/foundations/social-icon.d.ts +1 -1
  85. package/dist/types/components/foundations/tabs.d.ts +2 -1
  86. package/dist/types/components/primitives/admin-header.d.ts +1 -1
  87. package/dist/types/components/primitives/admin-side-nav.d.ts +1 -1
  88. package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
  89. package/dist/types/components/primitives/category-scroll.d.ts +2 -2
  90. package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
  91. package/dist/types/components/primitives/chat-composer.d.ts +1 -1
  92. package/dist/types/components/primitives/chip.d.ts +1 -1
  93. package/dist/types/components/primitives/content-card.d.ts +67 -0
  94. package/dist/types/components/primitives/content-carousel.d.ts +1 -1
  95. package/dist/types/components/primitives/footer.d.ts +21 -1
  96. package/dist/types/components/primitives/form-field.d.ts +1 -1
  97. package/dist/types/components/primitives/header.d.ts +30 -2
  98. package/dist/types/components/primitives/image-input.d.ts +1 -1
  99. package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
  100. package/dist/types/components/primitives/menu-drawer.d.ts +7 -1
  101. package/dist/types/components/primitives/notification-list.d.ts +1 -1
  102. package/dist/types/components/primitives/prose.d.ts +35 -0
  103. package/dist/types/components/primitives/search-bar.d.ts +14 -1
  104. package/dist/types/components/primitives/search-panel.d.ts +1 -1
  105. package/dist/types/components/primitives/section-header.d.ts +2 -1
  106. package/dist/types/components/primitives/section-nav.d.ts +1 -1
  107. package/dist/types/components/primitives/share-buttons.d.ts +26 -4
  108. package/dist/types/components/primitives/side-nav.d.ts +1 -1
  109. package/dist/types/components/primitives/social-login-button.d.ts +1 -1
  110. package/dist/types/components/primitives/sub-nav.d.ts +16 -1
  111. package/dist/types/index.d.ts +4 -0
  112. package/dist/types/lib/link-component.d.ts +26 -0
  113. package/package.json +10 -5
  114. package/src/components/COMPONENT_LOOKUP.md +7 -5
  115. package/src/preset-standalone.css +1 -0
  116. package/src/preset.css +8 -0
  117. package/src/styles/semantic.css +1 -0
  118. package/tokens.json +8 -1
@@ -1,7 +1,8 @@
1
- import * as a from "react";
2
- const n = a.createContext(null);
3
- function t() {
4
- return a.useContext(n);
1
+ "use client";
2
+ import * as n from "react";
3
+ const t = n.createContext(null);
4
+ function a() {
5
+ return n.useContext(t);
5
6
  }
6
7
  function d(r, e) {
7
8
  if (!e) return {};
@@ -22,8 +23,8 @@ function o(r, e) {
22
23
  };
23
24
  }
24
25
  export {
25
- n as FieldLabellingContext,
26
+ t as FieldLabellingContext,
26
27
  d as resolveFieldAria,
27
28
  o as resolveNativeFieldAria,
28
- t as useFieldLabelling
29
+ a as useFieldLabelling
29
30
  };
@@ -0,0 +1,6 @@
1
+ function n(r, e) {
2
+ return e || !r ? "a" : r;
3
+ }
4
+ export {
5
+ n as resolveLinkComponent
6
+ };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import * as u from "react";
2
3
  function a(e, c) {
3
4
  if (typeof e == "function") {
@@ -1,4 +1,4 @@
1
- import type { SideNavGroup } from "../../../components/primitives/side-nav";
1
+ import type { SideNavGroup } from "../../components/primitives/side-nav";
2
2
  /**
3
3
  * Cake.jp マイページのメニュー定義
4
4
  *
@@ -6,8 +6,8 @@ import type { SideNavGroup } from "../../../components/primitives/side-nav";
6
6
  *
7
7
  * ### 使い方
8
8
  * ```tsx
9
- * import { SideNav } from '../../../components/primitives/side-nav'
10
- * import { mypageMenuGroups } from '../../../components/ec/_mypage-menu-data'
9
+ * import { SideNav } from '../../components/primitives/side-nav'
10
+ * import { mypageMenuGroups } from '../../components/ec/_mypage-menu-data'
11
11
  *
12
12
  * <SideNav groups={mypageMenuGroups} activeMenu="news" ariaLabel="マイページメニュー" />
13
13
  * ```
@@ -27,7 +27,7 @@
27
27
  * - CSS: admin_shops/layout/nav_layout.css
28
28
  */
29
29
  import * as React from "react";
30
- import { type AdminNavItem } from "../../../components/primitives/admin-side-nav";
30
+ import { type AdminNavItem } from "../../components/primitives/admin-side-nav";
31
31
  export declare function MissingComponent({ name, children, className, }: {
32
32
  name: string;
33
33
  children: React.ReactNode;
@@ -25,7 +25,7 @@ export interface AnniversaryCardProps extends React.HTMLAttributes<HTMLDivElemen
25
25
  *
26
26
  * ### インポート
27
27
  * ```tsx
28
- * import { AnniversaryCard } from '../../../components/ec/anniversary-card'
28
+ * import { AnniversaryCard } from '../../components/ec/anniversary-card'
29
29
  * ```
30
30
  *
31
31
  * ### Props(主要なもの)
@@ -27,9 +27,9 @@
27
27
  * 「マイページ配下だけ Cake.jp ロゴに割れる」問題を避けられる。
28
28
  */
29
29
  import React from "react";
30
- import { type HeaderAction, type HeaderNavItem } from "../../../components/primitives/header";
31
- import { type SideNavGroup, type SideNavItem } from "../../../components/primitives/side-nav";
32
- import { type BottomTabBarItem } from "../../../components/primitives/bottom-tab-bar";
30
+ import { type HeaderAction, type HeaderNavItem } from "../../components/primitives/header";
31
+ import { type SideNavGroup, type SideNavItem } from "../../components/primitives/side-nav";
32
+ import { type BottomTabBarItem } from "../../components/primitives/bottom-tab-bar";
33
33
  export interface MypageShellBreadcrumb {
34
34
  label: string;
35
35
  href?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { type TagProps } from "../../../components/primitives/tag";
2
+ import { type TagProps } from "../../components/primitives/tag";
3
3
  export interface ProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /** 商品名 */
5
5
  name: string;
@@ -19,6 +19,17 @@ export interface ProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
19
19
  reviewCount?: number;
20
20
  /** ショップ名 */
21
21
  shopName?: string;
22
+ /**
23
+ * ホバー時の画像演出。
24
+ * - `zoom` : 画像をわずかに拡大
25
+ * - `fade` : 拡大せず画像をわずかに明るくする(本番 EC 準拠)
26
+ * - `none` : 演出なし
27
+ *
28
+ * 未指定時の既定は orientation で変わる(従来の見た目を維持するため):
29
+ * `vertical` = `zoom` / `horizontal` = `none`。明示指定すればどちらの
30
+ * orientation でも同じように効く。
31
+ */
32
+ hoverEffect?: "zoom" | "fade" | "none";
22
33
  /** ショップページURL(指定するとショップ名がリンク化、hover時アンダーライン) */
23
34
  shopHref?: string;
24
35
  /** タグリスト(配送方法・キャンペーンなど) */
@@ -57,23 +68,5 @@ export declare function BookmarkRibbonIcon({ size, filled }: {
57
68
  size?: number;
58
69
  filled?: boolean;
59
70
  }): import("react/jsx-runtime").JSX.Element;
60
- /**
61
- * 商品カードコンポーネント — Figma DS 準拠
62
- *
63
- * Cake.jp の商品一覧・検索結果に使用するカードUI。
64
- * vertical(グリッド表示)と horizontal(リスト表示)の2レイアウト対応。
65
- *
66
- * ### Figma との対応
67
- * - 画像エリア: 正方形、rounded-lg (8px)、4px パディング
68
- * - ブックマーク: 画像右下に 36px 円形ボタン(本番 .m-bookmark-button--mid 準拠)
69
- * - タグ: 画像左下に配置(PR、セールバッジ等)
70
- * - 商品情報: gap-[2px]、商品名 → レビュー+最短日(同行) → 価格
71
- * - カートボタン: h-[36px]、rounded-[12px]、Brand-Cake-Orange
72
- *
73
- * ### 機能
74
- * - `shopHref` でショップ名リンク化(hover時アンダーライン付き)
75
- * - `showCartButton` で「カートに追加」ボタン表示(verticalのみ)
76
- * - ランキングバッジ、お気に入り、割引バッジなどEC必須要素を統合提供
77
- */
78
- declare function ProductCard({ className, name, imageUrl, imageAlt, price, originalPrice, caption, rating, reviewCount, shopName, shopHref, tags, isFavorite, onFavoriteToggle, onCardClick, href, ranking, deliveryDate, orientation, showDiscountBadge, showCartButton, onCartAdd, cartButtonLabel, ...props }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
71
+ declare function ProductCard({ className, name, imageUrl, imageAlt, price, originalPrice, caption, rating, reviewCount, shopName, shopHref, hoverEffect, tags, isFavorite, onFavoriteToggle, onCardClick, href, ranking, deliveryDate, orientation, showDiscountBadge, showCartButton, onCartAdd, cartButtonLabel, ...props }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
79
72
  export { ProductCard };
@@ -1,5 +1,5 @@
1
- import { type SectionHeaderSize } from "../../../components/primitives/section-header";
2
- import { type ProductCardProps } from "../../../components/ec/product-card";
1
+ import { type SectionHeaderSize } from "../../components/primitives/section-header";
2
+ import { type ProductCardProps } from "../../components/ec/product-card";
3
3
  export interface ProductCarouselProps {
4
4
  /** セクションタイトル */
5
5
  title: string;
@@ -40,7 +40,7 @@ export interface ProductCarouselProps {
40
40
  *
41
41
  * ### インポート
42
42
  * ```tsx
43
- * import { ProductCarousel } from '../../../components/ec/product-carousel'
43
+ * import { ProductCarousel } from '../../components/ec/product-carousel'
44
44
  * ```
45
45
  *
46
46
  * ### AI 向け使用ルール
@@ -2,6 +2,11 @@ import * as React from "react";
2
2
  export interface ReviewCardProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  /** レビューバリアント */
4
4
  variant?: "list" | "card" | "pc";
5
+ /**
6
+ * 枠線を出すか(既定 true)。
7
+ * 商品詳細などページ全体をフラットに統一する画面では false にする。
8
+ */
9
+ bordered?: boolean;
5
10
  /** 星評価(1〜5) */
6
11
  rating: number;
7
12
  /** 投稿日 */
@@ -40,5 +45,5 @@ export interface ReviewCardProps extends React.HTMLAttributes<HTMLDivElement> {
40
45
  * - 既存の `RatingStars` の `SparkleIcon` を星表示に使用
41
46
  * - 「もっと見る」はオレンジテキスト
42
47
  */
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;
48
+ declare function ReviewCard({ className, variant, bordered, rating, date, text, imageUrl, productName, productImageUrl, helpfulCount, isLiked, onLikeClick, onMoreClick, maxLength, ...props }: ReviewCardProps): import("react/jsx-runtime").JSX.Element;
44
49
  export { ReviewCard };
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { StatCard } from '../../../components/ec/stat-card'
9
+ * import { StatCard } from '../../components/ec/stat-card'
10
10
  * ```
11
11
  *
12
12
  * ### Props
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
3
- import { Button } from "../../../components/foundations/button";
3
+ import { Button } from "../../components/foundations/button";
4
4
  declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
6
  declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: {
4
4
  variant?: "link" | "default" | "secondary" | "tertiary" | "destructive" | "ghost" | "inverse" | "ghost-inverse" | "overlay";
5
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "hero" | "icon-xs" | "icon-sm" | "icon-lg";
5
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "hero" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl";
6
6
  } & import("class-variance-authority/types").ClassProp) => string;
7
7
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
8
  asChild?: boolean;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { DayPicker, type DayButton } from "react-day-picker";
3
- import { Button } from "../../../components/foundations/button";
3
+ import { Button } from "../../components/foundations/button";
4
4
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { CheckboxGroup, CheckboxGroupItem } from "../../../components/foundations/checkbox-group"
9
+ * import { CheckboxGroup, CheckboxGroupItem } from "../../components/foundations/checkbox-group"
10
10
  * ```
11
11
  *
12
12
  * ### Props(CheckboxGroup)
@@ -12,6 +12,6 @@ import { type VariantProps } from "class-variance-authority";
12
12
  export declare const chipVariants: (props?: {
13
13
  variant?: "accent" | "filled";
14
14
  size?: "sm" | "lg" | "md" | "tile";
15
- shape?: "pill" | "square";
15
+ shape?: "square" | "pill";
16
16
  } & import("class-variance-authority/types").ClassProp) => string;
17
17
  export type ChipVariantProps = VariantProps<typeof chipVariants>;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { Command as CommandPrimitive } from "cmdk";
3
- import { Dialog } from "../../../components/foundations/dialog";
3
+ import { Dialog } from "../../components/foundations/dialog";
4
4
  declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
6
  title?: string;
@@ -9,12 +9,20 @@ declare const dataTableRowVariants: (props?: {
9
9
  } & import("class-variance-authority/types").ClassProp) => string;
10
10
  declare function DataTableRow({ className, state, ...props }: React.ComponentProps<"tr"> & VariantProps<typeof dataTableRowVariants>): import("react/jsx-runtime").JSX.Element;
11
11
  type SortDirection = "asc" | "desc" | null;
12
- declare function DataTableHead({ className, sortable, sortDirection, onSort, width, children, ...props }: React.ComponentProps<"th"> & {
12
+ declare function DataTableHead({ className, sortable, sortDirection, onSort, width, srLabel, children, ...props }: React.ComponentProps<"th"> & {
13
13
  sortable?: boolean;
14
14
  sortDirection?: SortDirection;
15
15
  onSort?: () => void;
16
16
  /** セル幅バリアント: max=320-360px, hug=最小 */
17
17
  width?: "auto" | "max" | "hug";
18
+ /**
19
+ * 見出し文字を出さない列(チェックボックス選択列・操作列など)の読み上げ用ラベル。
20
+ * 画面には出さず、スクリーンリーダーにだけ列の意味を伝える。
21
+ *
22
+ * 空の `<th>` は「この列が何か」が支援技術に伝わらない(axe: empty-table-header)。
23
+ * 見出しを出したくない列には必ず指定する。
24
+ */
25
+ srLabel?: string;
18
26
  }): import("react/jsx-runtime").JSX.Element;
19
27
  declare const dataTableCellVariants: (props?: {
20
28
  width?: "auto" | "max" | "hug";
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * ### インポート
9
9
  * ```tsx
10
- * import { Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator } from "../../../components/foundations/field"
10
+ * import { Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator } from "../../components/foundations/field"
11
11
  * ```
12
12
  *
13
13
  * ### 構成要素
@@ -32,7 +32,7 @@
32
32
  */
33
33
  import * as React from "react";
34
34
  import { type VariantProps } from "class-variance-authority";
35
- import { Label } from "../../../components/foundations/label";
35
+ import { Label } from "../../components/foundations/label";
36
36
  /**
37
37
  * Field — 1 フィールド分の箱(ラベル + 入力 + 説明/エラー)。
38
38
  * `FieldGroup`(gap-4)の中に並べる**縦リズムの最小単位**。
@@ -63,7 +63,7 @@ export declare function validateFileSize(files: File[], maxSize?: number): {
63
63
  *
64
64
  * ### インポート
65
65
  * ```tsx
66
- * import { FileInput } from '../../../components/foundations/file-input'
66
+ * import { FileInput } from '../../components/foundations/file-input'
67
67
  * ```
68
68
  *
69
69
  * ### AI 向け使用ルール
@@ -1,12 +1,18 @@
1
1
  import * as React from "react";
2
- import { type Button } from "../../../components/foundations/button";
2
+ import { type LinkComponent } from "../../lib/link-component";
3
+ import { type Button } from "../../components/foundations/button";
3
4
  declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
4
5
  declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
5
6
  declare function PaginationItem({ ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
6
7
  type PaginationLinkProps = {
7
8
  isActive?: boolean;
9
+ /**
10
+ * リンクの描画に使うコンポーネント(既定 `a`)。
11
+ * `next/link` 等を渡すとクライアント遷移になる(#236)。
12
+ */
13
+ linkComponent?: LinkComponent;
8
14
  } & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
9
- declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function PaginationLink({ className, isActive, size, linkComponent, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
10
16
  declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
11
17
  declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
12
18
  declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../../../components/foundations/dialog";
2
+ import { DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../../components/foundations/dialog";
3
3
  declare function useIsMobile(breakpoint?: number): boolean;
4
4
  interface ResponsiveDialogProps {
5
5
  children: React.ReactNode;
@@ -3,9 +3,14 @@ import { Dialog as SheetPrimitive } from "radix-ui";
3
3
  declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
6
- declare function SheetContent({ className, children, side, showCloseButton, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
6
+ declare function SheetContent({ className, children, side, showCloseButton, autoFocus, onOpenAutoFocus, onCloseAutoFocus, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
7
7
  side?: "top" | "right" | "bottom" | "left";
8
8
  showCloseButton?: boolean;
9
+ /**
10
+ * 開閉時のフォーカス自動移動。既定 true(Radix 既定=開いたら中へ入り、閉じたらトリガーへ戻る)。
11
+ * WCAG 2.4.3 を満たすため、止めたい特別な事情があるときだけ false にする。
12
+ */
13
+ autoFocus?: boolean;
9
14
  }): import("react/jsx-runtime").JSX.Element;
10
15
  declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
16
  declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
@@ -19,7 +19,7 @@ export interface SkipLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElem
19
19
  *
20
20
  * ### インポート
21
21
  * ```tsx
22
- * import { SkipLink } from '../../../components/foundations/skip-link'
22
+ * import { SkipLink } from '../../components/foundations/skip-link'
23
23
  * ```
24
24
  *
25
25
  * ### 使い方(シェルを使わず素の DOM に置く場合)
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- export type SocialPlatform = "line" | "x" | "facebook" | "amazon" | "google" | "apple";
2
+ export type SocialPlatform = "line" | "x" | "facebook" | "amazon" | "google" | "apple" | "hatena";
3
3
  export interface SocialIconProps extends Omit<React.ComponentProps<"svg">, "children"> {
4
4
  platform: SocialPlatform;
5
5
  /**
@@ -5,8 +5,9 @@ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsP
5
5
  declare const tabsListVariants: (props?: {
6
6
  variant?: "underbar" | "segment";
7
7
  scrollable?: boolean;
8
+ size?: "sm" | "md";
8
9
  } & import("class-variance-authority/types").ClassProp) => string;
9
- declare function TabsList({ className, variant, scrollable, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): import("react/jsx-runtime").JSX.Element;
10
+ declare function TabsList({ className, variant, scrollable, size, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): import("react/jsx-runtime").JSX.Element;
10
11
  declare function TabsTrigger({ className, children, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
11
12
  declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
12
13
  export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -27,7 +27,7 @@ export interface AdminHeaderProps {
27
27
  *
28
28
  * ### インポート
29
29
  * ```tsx
30
- * import { AdminHeader } from '../../../components/primitives/admin-header'
30
+ * import { AdminHeader } from '../../components/primitives/admin-header'
31
31
  * ```
32
32
  *
33
33
  * ### Props
@@ -68,7 +68,7 @@ export interface AdminSideNavProps {
68
68
  *
69
69
  * ### インポート
70
70
  * ```tsx
71
- * import { AdminSideNav } from '../../../components/primitives/admin-side-nav'
71
+ * import { AdminSideNav } from '../../components/primitives/admin-side-nav'
72
72
  * ```
73
73
  *
74
74
  * ### Props
@@ -1,4 +1,4 @@
1
- import { type SectionHeaderSize } from "../../../components/primitives/section-header";
1
+ import { type SectionHeaderSize } from "../../components/primitives/section-header";
2
2
  export interface BannerItem {
3
3
  /** バナー画像URL */
4
4
  imageUrl: string;
@@ -40,7 +40,7 @@ export interface BannerCarouselProps {
40
40
  *
41
41
  * ### インポート
42
42
  * ```tsx
43
- * import { BannerCarousel } from '../../../components/primitives/banner-carousel'
43
+ * import { BannerCarousel } from '../../components/primitives/banner-carousel'
44
44
  * ```
45
45
  *
46
46
  * ### AI 向け使用ルール
@@ -1,4 +1,4 @@
1
- import { type SectionHeaderSize } from "../../../components/primitives/section-header";
1
+ import { type SectionHeaderSize } from "../../components/primitives/section-header";
2
2
  export interface CategoryItem {
3
3
  /** カテゴリ名 */
4
4
  name: string;
@@ -47,7 +47,7 @@ export interface CategoryScrollProps {
47
47
  *
48
48
  * ### インポート
49
49
  * ```tsx
50
- * import { CategoryScroll } from '../../../components/primitives/category-scroll'
50
+ * import { CategoryScroll } from '../../components/primitives/category-scroll'
51
51
  * ```
52
52
  *
53
53
  * ### Props(主要なもの)
@@ -31,7 +31,7 @@ export interface CategoryShortcutsProps {
31
31
  *
32
32
  * ### インポート
33
33
  * ```tsx
34
- * import { CategoryShortcuts } from '../../../components/primitives/category-shortcuts'
34
+ * import { CategoryShortcuts } from '../../components/primitives/category-shortcuts'
35
35
  * ```
36
36
  *
37
37
  * ### AI 向け使用ルール
@@ -70,7 +70,7 @@ export interface ChatComposerProps {
70
70
  *
71
71
  * ### インポート
72
72
  * ```tsx
73
- * import { ChatComposer } from "../../../components/primitives/chat-composer"
73
+ * import { ChatComposer } from "../../components/primitives/chat-composer"
74
74
  * ```
75
75
  *
76
76
  * ### 送信キー
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { chipVariants, type ChipVariantProps } from "../../../components/foundations/chip-variants";
2
+ import { chipVariants, type ChipVariantProps } from "../../components/foundations/chip-variants";
3
3
  export interface ChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ChipVariantProps {
4
4
  /** リンクとして使う場合のURL */
5
5
  href?: string;
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ import { type LinkComponent } from "../../lib/link-component";
3
+ import { type TagProps } from "../../components/primitives/tag";
4
+ export type ContentCardOrientation = "vertical" | "horizontal" | "list";
5
+ export type ContentCardAspect = "16/10" | "16/9" | "1/1";
6
+ export interface ContentCardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
7
+ /** 記事タイトル。一覧で高さが割れないよう常に 2 行ぶんの高さを取る */
8
+ title: string;
9
+ /** 遷移先。カード全体がリンクになる */
10
+ href: string;
11
+ /**
12
+ * 画像。`next/image` や CMS の img、図版をそのまま渡す。
13
+ * 縦横比とクリップはカード側が持つので、中身は `h-full w-full object-cover` を想定。
14
+ */
15
+ imageSlot?: React.ReactNode;
16
+ /** 画像左下に重ねるラベル(カテゴリ等)。長いラベルは省略記号で切る */
17
+ tag?: {
18
+ label: string;
19
+ variant?: TagProps["variant"];
20
+ };
21
+ /** 日付・著者などの補足。**必ず 1 行**に収まる内容にする(複数行だと一覧で高さが割れる) */
22
+ meta?: React.ReactNode;
23
+ /**
24
+ * カードの向き。
25
+ * - `vertical`(既定): 画像が上、本文が下。グリッド一覧向け
26
+ * - `horizontal` : 画像が左、本文が右
27
+ * - `list` : 本文が左、サムネイルが右(記事一覧の Medium 型)
28
+ */
29
+ orientation?: ContentCardOrientation;
30
+ /** 画像の縦横比(既定 `16/10`。記事のアイキャッチは横長素材が前提) */
31
+ aspect?: ContentCardAspect;
32
+ /**
33
+ * リンクの描画に使うコンポーネント(既定 `a`)。
34
+ * `next/link` 等を渡すとクライアント遷移になる(#236)。
35
+ */
36
+ linkComponent?: LinkComponent;
37
+ }
38
+ /**
39
+ * 記事・特集・お知らせなど「画像 + タイトル + メタ」のカード。
40
+ *
41
+ * `ProductCard`(商品)/ `ShopCard`(店舗)の兄弟で、記事メディア向け。
42
+ * 汎用の `Card` に載せて組むと、枠線・タイトル行数・カード高さが揃わない
43
+ * (実測で高さ 268 と 312 に割れる事例あり)ため、この部品を使う。
44
+ *
45
+ * ### 作法
46
+ *
47
+ * - 枠線なし・`rounded-lg`・サーフェスは親から伝播(`Section background="subtle"` 配下では白)
48
+ * - タイトルは 2 行で省略し、常に 2 行ぶんの高さを取る(一覧で下端が揃う)
49
+ * - `meta` は 1 行固定でカード下端へ寄る
50
+ * - 画像は `imageSlot` で consumer が用意する(`next/image` / CMS / 図版を吸収する)
51
+ *
52
+ * ### AI 向け使用ルール
53
+ *
54
+ * - 記事一覧・関連記事・注目記事は `Card` + `CardContent` で組まずこれを使う
55
+ * - グリッド一覧は `orientation="vertical"`、Medium 型の縦リストは `orientation="list"` +
56
+ * `ContentList`(区切り線つき)
57
+ * - タイトルの文字装飾を利用側で足さない(`font-bold` にしない。既定は `font-medium`)
58
+ */
59
+ declare function ContentCard({ className, title, href, imageSlot, tag, meta, orientation, aspect, linkComponent, ...props }: ContentCardProps): import("react/jsx-runtime").JSX.Element;
60
+ /**
61
+ * `ContentCard` を区切り線つきで縦に並べるリスト(記事一覧の Medium 型)。
62
+ *
63
+ * 一覧ページで `orientation="list"` の `ContentCard` を並べるときに使う。
64
+ * 区切り線と項目間の余白だけを持ち、幅・背景は持たない。
65
+ */
66
+ declare function ContentList({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
67
+ export { ContentCard, ContentList };
@@ -44,7 +44,7 @@ export interface ContentCarouselProps extends Omit<React.HTMLAttributes<HTMLDivE
44
44
  *
45
45
  * ### インポート
46
46
  * ```tsx
47
- * import { ContentCarousel } from '../../../components/primitives/content-carousel'
47
+ * import { ContentCarousel } from '../../components/primitives/content-carousel'
48
48
  * ```
49
49
  *
50
50
  * ### AI 向け使用ルール
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type LinkComponent } from "../../lib/link-component";
2
3
  export interface FooterLink {
3
4
  label: string;
4
5
  href: string;
@@ -53,6 +54,25 @@ export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
53
54
  trustBadge?: FooterTrustBadge;
54
55
  /** フッター下部の補助リンク(特定商取引法、プライバシーポリシー等) */
55
56
  bottomLinks?: FooterLink[];
57
+ /**
58
+ * リンクの描画に使うコンポーネント(既定 `a`)。
59
+ * `next/link` 等を渡すとクライアント遷移になる(#236)。
60
+ * `external: true` のリンクは常に素の `<a target="_blank">` で描く。
61
+ */
62
+ linkComponent?: LinkComponent;
63
+ /**
64
+ * レイアウト(既定 `default`)。
65
+ * - `default` : ロゴ・説明文を最下部に中央寄せ(本番 Cake.jp 準拠)
66
+ * - `brand-first` : ロゴ・説明文を先頭カラムに置き、その右にリンク群を並べる。
67
+ * 下部バーはコピーライト左・`bottomRightSlot` 右の左右振り分けになる
68
+ * (求人ケーキ屋さん.jp / 仕入れケーキ屋さん.JP のフッター構成)
69
+ */
70
+ variant?: "default" | "brand-first";
71
+ /**
72
+ * 下部バーの右側に置く要素(`Powered by` 等)。
73
+ * `variant="brand-first"` でのみ配置され、既定レイアウトでは無視される。
74
+ */
75
+ bottomRightSlot?: React.ReactNode;
56
76
  }
57
77
  /**
58
78
  * フッターコンポーネント
@@ -77,5 +97,5 @@ export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
77
97
  * - `copyright` でコピーライト表示
78
98
  * - BottomTabBar と併用する場合は `pb-16` 等でマージン確保
79
99
  */
80
- declare function Footer({ className, linkGroups, copyright, logo, logoHref, socialLinks, description, paymentMethods, trustBadge, bottomLinks, ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
100
+ declare function Footer({ className, linkGroups, copyright, logo, logoHref, socialLinks, description, paymentMethods, trustBadge, bottomLinks, variant, bottomRightSlot, linkComponent, ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
81
101
  export { Footer };
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { FormField } from '../../../components/primitives/form-field'
9
+ * import { FormField } from '../../components/primitives/form-field'
10
10
  * ```
11
11
  *
12
12
  * ### Props