@cakejp/design-system 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/CLAUDE.md +1 -0
- package/bin/init.js +29 -6
- package/contracts/components.json +42 -7
- package/contracts/composition.json +8 -2
- package/contracts/rules.json +5 -1
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/_mypage-menu-data.js +166 -0
- package/dist/components/ec/admin-shell.js +202 -0
- package/dist/components/ec/anniversary-card.js +63 -0
- package/dist/components/ec/cake-logo.js +38 -0
- package/dist/components/ec/chart-controls.js +91 -0
- package/dist/components/ec/countdown-timer.js +50 -0
- package/dist/components/ec/coupon-card.js +136 -0
- package/dist/components/ec/delivery-calendar.js +105 -0
- package/dist/components/ec/mypage-shell.js +98 -0
- package/dist/components/ec/order-section.js +53 -0
- package/dist/components/ec/order-summary.js +78 -0
- package/dist/components/ec/payment-method.js +81 -0
- package/dist/components/ec/product-card.js +235 -0
- package/dist/components/ec/product-carousel.js +106 -0
- package/dist/components/ec/product-cta.js +80 -0
- package/dist/components/ec/product-detail-bar.js +86 -0
- package/dist/components/ec/product-detail-sidebar.js +296 -0
- package/dist/components/ec/product-list-item.js +266 -0
- package/dist/components/ec/product-option.js +165 -0
- package/dist/components/ec/rating-stars.js +74 -0
- package/dist/components/ec/review-card.js +126 -0
- package/dist/components/ec/review-form.js +181 -0
- package/dist/components/ec/review-summary.js +95 -0
- package/dist/components/ec/shop-card.js +179 -0
- package/dist/components/ec/stat-card.js +50 -0
- package/dist/components/foundations/accordion.js +67 -0
- package/dist/components/foundations/alert-dialog.js +165 -0
- package/dist/components/foundations/alert.js +218 -0
- package/dist/components/foundations/aspect-ratio.js +10 -0
- package/dist/components/foundations/avatar.js +58 -0
- package/dist/components/foundations/badge.js +54 -0
- package/dist/components/foundations/breadcrumb.js +104 -0
- package/dist/components/foundations/button.js +99 -0
- package/dist/components/foundations/calendar.js +173 -0
- package/dist/components/foundations/card.js +109 -0
- package/dist/components/foundations/checkbox-card.js +111 -0
- package/dist/components/foundations/checkbox-group.js +92 -0
- package/dist/components/foundations/checkbox.js +90 -0
- package/dist/components/foundations/chip-variants.js +41 -0
- package/dist/components/foundations/collapsible.js +34 -0
- package/dist/components/foundations/command.js +171 -0
- package/dist/components/foundations/context-menu.js +225 -0
- package/dist/components/foundations/data-table.js +59 -0
- package/dist/components/foundations/dialog.js +148 -0
- package/dist/components/foundations/drawer.js +129 -0
- package/dist/components/foundations/dropdown-menu.js +232 -0
- package/dist/components/foundations/field.js +150 -0
- package/dist/components/foundations/file-input.js +116 -0
- package/dist/components/foundations/form.js +101 -0
- package/dist/components/foundations/hover-card.js +41 -0
- package/dist/components/foundations/icon-badge.js +41 -0
- package/dist/components/foundations/input.js +74 -0
- package/dist/components/foundations/label.js +29 -0
- package/dist/components/foundations/menubar.js +252 -0
- package/dist/components/foundations/navigation-menu.js +171 -0
- package/dist/components/foundations/pagination.js +120 -0
- package/dist/components/foundations/popover.js +45 -0
- package/dist/components/foundations/progress.js +34 -0
- package/dist/components/foundations/radio-group.js +134 -0
- package/dist/components/foundations/responsive-dialog.js +76 -0
- package/dist/components/foundations/scroll-area.js +62 -0
- package/dist/components/foundations/select.js +190 -0
- package/dist/components/foundations/separator.js +27 -0
- package/dist/components/foundations/sheet.js +130 -0
- package/dist/components/foundations/skeleton.js +15 -0
- package/dist/components/foundations/skip-link.js +27 -0
- package/dist/components/foundations/slider.js +81 -0
- package/dist/components/foundations/social-icon.js +36 -0
- package/dist/components/foundations/sonner.js +49 -0
- package/dist/components/foundations/spinner.js +28 -0
- package/dist/components/foundations/switch.js +54 -0
- package/dist/components/foundations/table.js +115 -0
- package/dist/components/foundations/tabs.js +102 -0
- package/dist/components/foundations/textarea.js +65 -0
- package/dist/components/foundations/toggle-group.js +107 -0
- package/dist/components/foundations/toggle.js +44 -0
- package/dist/components/foundations/tooltip.js +56 -0
- package/dist/components/primitives/admin-header.js +31 -0
- package/dist/components/primitives/admin-side-nav.js +135 -0
- package/dist/components/primitives/banner-carousel.js +97 -0
- package/dist/components/primitives/bottom-tab-bar.js +81 -0
- package/dist/components/primitives/bulk-action-bar.js +27 -0
- package/dist/components/primitives/category-scroll.js +110 -0
- package/dist/components/primitives/category-shortcuts.js +66 -0
- package/dist/components/primitives/chat-composer.js +141 -0
- package/dist/components/primitives/chip.js +123 -0
- package/dist/components/primitives/coach-mark.js +102 -0
- package/dist/components/primitives/combobox.js +88 -0
- package/dist/components/primitives/container.js +50 -0
- package/dist/components/primitives/content-carousel.js +144 -0
- package/dist/components/primitives/date-picker.js +175 -0
- package/dist/components/primitives/empty-state.js +32 -0
- package/dist/components/primitives/error-state.js +115 -0
- package/dist/components/primitives/filter-bar.js +144 -0
- package/dist/components/primitives/footer.js +247 -0
- package/dist/components/primitives/form-field.js +38 -0
- package/dist/components/primitives/funnel-shell.js +99 -0
- package/dist/components/primitives/header.js +257 -0
- package/dist/components/primitives/image-carousel.js +156 -0
- package/dist/components/primitives/image-gallery.js +177 -0
- package/dist/components/primitives/image-input.js +207 -0
- package/dist/components/primitives/image-uploader.js +69 -0
- package/dist/components/primitives/kebab-menu.js +40 -0
- package/dist/components/primitives/list-item.js +80 -0
- package/dist/components/primitives/menu-drawer.js +154 -0
- package/dist/components/primitives/multi-select.js +93 -0
- package/dist/components/primitives/notification-badge.js +61 -0
- package/dist/components/primitives/notification-list.js +72 -0
- package/dist/components/primitives/number-input.js +235 -0
- package/dist/components/primitives/price-display.js +101 -0
- package/dist/components/primitives/progress-steps.js +62 -0
- package/dist/components/primitives/search-bar.js +81 -0
- package/dist/components/primitives/search-panel.js +43 -0
- package/dist/components/primitives/section-header.js +148 -0
- package/dist/components/primitives/section-nav.js +85 -0
- package/dist/components/primitives/section.js +78 -0
- package/dist/components/primitives/share-buttons.js +102 -0
- package/dist/components/primitives/side-nav.js +98 -0
- package/dist/components/primitives/social-login-button.js +53 -0
- package/dist/components/primitives/standard-page-shell.js +34 -0
- package/dist/components/primitives/status-count-tabs.js +42 -0
- package/dist/components/primitives/sticky-action-bar.js +26 -0
- package/dist/components/primitives/sub-nav.js +67 -0
- package/dist/components/primitives/tag.js +57 -0
- package/dist/components/primitives/timeline.js +55 -0
- package/dist/components/primitives/workspace-shell.js +57 -0
- package/dist/index.css +1 -1
- package/dist/index.js +22961 -13130
- package/dist/lib/field-labelling.js +29 -0
- package/dist/lib/focus-ring.js +6 -0
- package/dist/lib/pagination-range.js +42 -0
- package/dist/lib/use-value-length.js +63 -0
- package/dist/lib/utils.js +33 -0
- package/dist/types/components/ec/_mypage-menu-data.d.ts +3 -3
- package/dist/types/components/ec/admin-shell.d.ts +1 -1
- package/dist/types/components/ec/anniversary-card.d.ts +1 -1
- package/dist/types/components/ec/mypage-shell.d.ts +3 -3
- package/dist/types/components/ec/product-card.d.ts +1 -1
- package/dist/types/components/ec/product-carousel.d.ts +3 -3
- package/dist/types/components/ec/stat-card.d.ts +1 -1
- package/dist/types/components/foundations/accordion.d.ts +8 -1
- package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
- package/dist/types/components/foundations/calendar.d.ts +1 -1
- package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
- package/dist/types/components/foundations/command.d.ts +1 -1
- package/dist/types/components/foundations/data-table.d.ts +6 -1
- package/dist/types/components/foundations/field.d.ts +2 -2
- package/dist/types/components/foundations/file-input.d.ts +1 -1
- package/dist/types/components/foundations/pagination.d.ts +1 -1
- package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
- package/dist/types/components/foundations/skip-link.d.ts +1 -1
- package/dist/types/components/foundations/slider.d.ts +13 -1
- package/dist/types/components/primitives/admin-header.d.ts +11 -1
- package/dist/types/components/primitives/admin-side-nav.d.ts +19 -1
- package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
- package/dist/types/components/primitives/category-scroll.d.ts +2 -2
- package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
- package/dist/types/components/primitives/chat-composer.d.ts +1 -1
- package/dist/types/components/primitives/chip.d.ts +1 -1
- package/dist/types/components/primitives/combobox.d.ts +9 -1
- package/dist/types/components/primitives/content-carousel.d.ts +1 -1
- package/dist/types/components/primitives/form-field.d.ts +1 -1
- package/dist/types/components/primitives/image-input.d.ts +1 -1
- package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
- package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
- package/dist/types/components/primitives/multi-select.d.ts +9 -1
- package/dist/types/components/primitives/notification-list.d.ts +1 -1
- package/dist/types/components/primitives/search-panel.d.ts +1 -1
- package/dist/types/components/primitives/section-nav.d.ts +1 -1
- package/dist/types/components/primitives/side-nav.d.ts +1 -1
- package/dist/types/components/primitives/social-login-button.d.ts +1 -1
- package/dist/types/lib/field-labelling.d.ts +66 -0
- package/package.json +2 -2
- package/scripts/codemod/README.md +9 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import E from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
|
|
4
|
+
import z from "iconsax-reactjs/dist/esm/ArrowRight2.js";
|
|
5
|
+
import { cn as m } from "../../lib/utils.js";
|
|
6
|
+
import { Button as u } from "../foundations/button.js";
|
|
7
|
+
const A = ["日", "月", "火", "水", "木", "金", "土"];
|
|
8
|
+
function H({
|
|
9
|
+
year: a,
|
|
10
|
+
month: r,
|
|
11
|
+
days: h,
|
|
12
|
+
onMonthChange: v,
|
|
13
|
+
onDaySelect: x,
|
|
14
|
+
selectedDate: c,
|
|
15
|
+
className: f,
|
|
16
|
+
...y
|
|
17
|
+
}) {
|
|
18
|
+
const b = new Date(a, r - 1, 1), D = new Date(a, r, 0), N = b.getDay(), w = D.getDate(), p = [];
|
|
19
|
+
let l = Array(N).fill(null);
|
|
20
|
+
for (let e = 1; e <= w; e++) {
|
|
21
|
+
const n = new Date(a, r - 1, e), i = h.find(
|
|
22
|
+
(s) => s.date.getFullYear() === a && s.date.getMonth() === r - 1 && s.date.getDate() === e
|
|
23
|
+
);
|
|
24
|
+
l.push(
|
|
25
|
+
i ?? { date: n, availability: "available" }
|
|
26
|
+
), l.length === 7 && (p.push(l), l = []);
|
|
27
|
+
}
|
|
28
|
+
if (l.length > 0) {
|
|
29
|
+
for (; l.length < 7; ) l.push(null);
|
|
30
|
+
p.push(l);
|
|
31
|
+
}
|
|
32
|
+
const k = () => {
|
|
33
|
+
const e = r === 1 ? { y: a - 1, m: 12 } : { y: a, m: r - 1 };
|
|
34
|
+
v?.(e.y, e.m);
|
|
35
|
+
}, T = () => {
|
|
36
|
+
const e = r === 12 ? { y: a + 1, m: 1 } : { y: a, m: r + 1 };
|
|
37
|
+
v?.(e.y, e.m);
|
|
38
|
+
}, C = (e) => c && e.getFullYear() === c.getFullYear() && e.getMonth() === c.getMonth() && e.getDate() === c.getDate();
|
|
39
|
+
return /* @__PURE__ */ g(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "delivery-calendar",
|
|
43
|
+
className: m("space-y-2", f),
|
|
44
|
+
...y,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
47
|
+
/* @__PURE__ */ t(u, { variant: "ghost", size: "icon-sm", onClick: k, "aria-label": "前月", children: /* @__PURE__ */ t(E, { size: 16 }) }),
|
|
48
|
+
/* @__PURE__ */ g("span", { className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: [
|
|
49
|
+
r,
|
|
50
|
+
"月"
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ t(u, { variant: "ghost", size: "icon-sm", onClick: T, "aria-label": "次月", children: /* @__PURE__ */ t(z, { size: 16 }) })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 text-center", children: A.map((e, n) => /* @__PURE__ */ t(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: m(
|
|
58
|
+
"py-1 typo-label-sm",
|
|
59
|
+
n === 0 && "text-[var(--Text-Caution)]",
|
|
60
|
+
n === 6 && "text-[var(--Primitive-Sea-600)]",
|
|
61
|
+
n > 0 && n < 6 && "text-[var(--Text-Medium-Emphasis)]"
|
|
62
|
+
),
|
|
63
|
+
children: e
|
|
64
|
+
},
|
|
65
|
+
e
|
|
66
|
+
)) }),
|
|
67
|
+
p.map((e, n) => /* @__PURE__ */ t("div", { className: "grid grid-cols-7 text-center", children: e.map((i, s) => {
|
|
68
|
+
if (!i)
|
|
69
|
+
return /* @__PURE__ */ t("div", { className: "py-1" }, `empty-${s}`);
|
|
70
|
+
const o = i.date.getDay(), S = C(i.date), d = i.availability !== "unavailable";
|
|
71
|
+
return /* @__PURE__ */ g(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
disabled: !d,
|
|
76
|
+
onClick: () => d && x?.(i.date),
|
|
77
|
+
className: m(
|
|
78
|
+
"flex flex-col items-center gap-0.5 rounded-md py-1.5 typo-body-md transition-colors",
|
|
79
|
+
d && "cursor-pointer hover:bg-[var(--Surface-Secondary)]",
|
|
80
|
+
S && "relative z-10 bg-[var(--Brand-Cake-Orange)]/10 ring-1 ring-inset ring-[var(--Brand-Cake-Orange)]",
|
|
81
|
+
!d && "cursor-default opacity-60",
|
|
82
|
+
o === 0 && "text-[var(--Text-Caution)]",
|
|
83
|
+
o === 6 && "text-[var(--Primitive-Sea-600)]",
|
|
84
|
+
o > 0 && o < 6 && "text-[var(--Text-High-Emphasis)]"
|
|
85
|
+
),
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ t("span", { children: i.date.getDate() }),
|
|
88
|
+
/* @__PURE__ */ t(Y, { availability: i.availability })
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
i.date.getDate()
|
|
92
|
+
);
|
|
93
|
+
}) }, n))
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function Y({
|
|
99
|
+
availability: a
|
|
100
|
+
}) {
|
|
101
|
+
return a === "available" ? /* @__PURE__ */ t("span", { className: "typo-heading-lg text-[var(--Text-Success)]", children: "○" }) : a === "few" ? /* @__PURE__ */ t("span", { className: "typo-heading-lg text-[var(--Text-Warning)]", children: "△" }) : /* @__PURE__ */ t("span", { className: "typo-heading-lg text-[var(--Text-Low-Emphasis)]", children: "×" });
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
H as DeliveryCalendar
|
|
105
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import L from "react";
|
|
3
|
+
import z from "iconsax-reactjs/dist/esm/Home2.js";
|
|
4
|
+
import c from "iconsax-reactjs/dist/esm/SearchNormal1.js";
|
|
5
|
+
import _ from "iconsax-reactjs/dist/esm/Shop.js";
|
|
6
|
+
import w from "iconsax-reactjs/dist/esm/Calendar.js";
|
|
7
|
+
import H from "iconsax-reactjs/dist/esm/Bookmark.js";
|
|
8
|
+
import P from "iconsax-reactjs/dist/esm/User.js";
|
|
9
|
+
import E from "iconsax-reactjs/dist/esm/ShoppingCart.js";
|
|
10
|
+
import { BreadcrumbList as C, BreadcrumbSeparator as T, BreadcrumbItem as j, BreadcrumbPage as A, BreadcrumbLink as M, Breadcrumb as s } from "../foundations/breadcrumb.js";
|
|
11
|
+
import { SkipLink as F } from "../foundations/skip-link.js";
|
|
12
|
+
import { Header as n } from "../primitives/header.js";
|
|
13
|
+
import { SideNav as G } from "../primitives/side-nav.js";
|
|
14
|
+
import { CakeLogo as I } from "./cake-logo.js";
|
|
15
|
+
import { mypageMenuGroups as R } from "./_mypage-menu-data.js";
|
|
16
|
+
import { BottomTabBar as U } from "../primitives/bottom-tab-bar.js";
|
|
17
|
+
const $ = [
|
|
18
|
+
{ icon: /* @__PURE__ */ e(c, { size: 20 }), label: "検索" },
|
|
19
|
+
{ icon: /* @__PURE__ */ e(P, { size: 20 }), label: "マイページ" },
|
|
20
|
+
{ icon: /* @__PURE__ */ e(E, { size: 20 }), label: "カート" }
|
|
21
|
+
], q = [
|
|
22
|
+
{ label: "ホーム", icon: /* @__PURE__ */ e(z, { size: 20 }), href: "/" },
|
|
23
|
+
{ label: "探す", icon: /* @__PURE__ */ e(c, { size: 20 }), href: "/search/" },
|
|
24
|
+
{ label: "店舗受取予約", icon: /* @__PURE__ */ e(_, { size: 20 }), href: "/takeout/" },
|
|
25
|
+
{
|
|
26
|
+
label: "記念日",
|
|
27
|
+
icon: /* @__PURE__ */ e(w, { size: 20 }),
|
|
28
|
+
href: "/mypage/anniversary/"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: "ブックマーク",
|
|
32
|
+
icon: /* @__PURE__ */ e(H, { size: 20 }),
|
|
33
|
+
href: "/mypage/bookmark/item_list/"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
function D(r) {
|
|
37
|
+
return [
|
|
38
|
+
{ label: "ホーム", href: "/" },
|
|
39
|
+
{ label: "山田 太郎 さまのマイページ", href: "/mypage/" },
|
|
40
|
+
{ label: r }
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
function le({
|
|
44
|
+
title: r,
|
|
45
|
+
activeMenu: t,
|
|
46
|
+
currentPath: h,
|
|
47
|
+
activeMatch: p,
|
|
48
|
+
isActiveMenuItem: b,
|
|
49
|
+
children: f,
|
|
50
|
+
breadcrumbs: u,
|
|
51
|
+
bottomNavItems: g = q,
|
|
52
|
+
menuGroups: v = R,
|
|
53
|
+
headerActions: x = $,
|
|
54
|
+
logo: N = /* @__PURE__ */ e(I, {}),
|
|
55
|
+
navItems: y,
|
|
56
|
+
onBack: k,
|
|
57
|
+
mainId: d = "main-content",
|
|
58
|
+
skipLink: B
|
|
59
|
+
}) {
|
|
60
|
+
const o = u ?? D(r), l = /* @__PURE__ */ e(C, { children: o.map((i, m) => {
|
|
61
|
+
const S = m === o.length - 1;
|
|
62
|
+
return /* @__PURE__ */ a(L.Fragment, { children: [
|
|
63
|
+
m > 0 && /* @__PURE__ */ e(T, {}),
|
|
64
|
+
/* @__PURE__ */ e(j, { children: S ? /* @__PURE__ */ e(A, { children: i.label }) : /* @__PURE__ */ e(M, { href: i.href ?? "#", children: i.label }) })
|
|
65
|
+
] }, m);
|
|
66
|
+
}) });
|
|
67
|
+
return /* @__PURE__ */ a("div", { className: "@container min-h-screen bg-[var(--Surface-Secondary)]", children: [
|
|
68
|
+
B !== !1 && /* @__PURE__ */ e(F, { href: `#${d}` }),
|
|
69
|
+
/* @__PURE__ */ a("div", { className: "@md:hidden bg-[var(--Surface-Primary)]", children: [
|
|
70
|
+
/* @__PURE__ */ e(n, { variant: "back", onBack: k }),
|
|
71
|
+
/* @__PURE__ */ e("div", { className: "px-4 pt-3", children: /* @__PURE__ */ e(s, { children: l }) }),
|
|
72
|
+
/* @__PURE__ */ e("h1", { className: "typo-heading-xl text-[var(--Text-High-Emphasis)] px-4 pt-1 pb-3", children: r })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ e("div", { className: "hidden @md:block", children: /* @__PURE__ */ e(n, { logo: N, variant: "logo", actions: x, navItems: y }) }),
|
|
75
|
+
/* @__PURE__ */ e("div", { className: "hidden @md:block bg-[var(--Surface-Primary)] border-b border-[var(--Border-Low-Emphasis)]", children: /* @__PURE__ */ e("div", { className: "max-w-[1280px] mx-auto px-6 py-3", children: /* @__PURE__ */ e(s, { children: l }) }) }),
|
|
76
|
+
/* @__PURE__ */ a("div", { className: "@md:max-w-[1280px] @md:mx-auto @md:px-6 @md:mt-10 @md:mb-10 @md:grid @md:[grid-template:'side_main'_1fr_/_256px_1fr] @md:gap-6 @md:items-start", children: [
|
|
77
|
+
/* @__PURE__ */ e("div", { className: "hidden @md:block @md:[grid-area:side] rounded-2xl overflow-hidden shadow-sm", children: /* @__PURE__ */ e(
|
|
78
|
+
G,
|
|
79
|
+
{
|
|
80
|
+
groups: v,
|
|
81
|
+
activeMenu: t,
|
|
82
|
+
currentPath: h,
|
|
83
|
+
activeMatch: p,
|
|
84
|
+
isActive: b,
|
|
85
|
+
ariaLabel: "マイページメニュー"
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
/* @__PURE__ */ a("main", { id: d, className: "@container @md:[grid-area:main] bg-[var(--Surface-Primary)] @md:rounded-2xl @md:shadow-sm pb-20 @md:pb-8", children: [
|
|
89
|
+
/* @__PURE__ */ e("div", { className: "hidden @md:flex items-center gap-3 px-6 py-5 border-b border-[var(--Border-Low-Emphasis)]", children: /* @__PURE__ */ e("h1", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: r }) }),
|
|
90
|
+
f
|
|
91
|
+
] })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ e(U, { items: g, className: "@md:hidden" })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
le as MypageShell
|
|
98
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import n from "iconsax-reactjs/dist/esm/ArrowRight2.js";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
function y({
|
|
6
|
+
title: i,
|
|
7
|
+
status: e = "default",
|
|
8
|
+
summary: o,
|
|
9
|
+
editLabel: s = "変更する",
|
|
10
|
+
onEdit: a,
|
|
11
|
+
children: c,
|
|
12
|
+
className: m,
|
|
13
|
+
...d
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
"data-slot": "order-section",
|
|
19
|
+
className: l(
|
|
20
|
+
"flex items-center gap-2 rounded-xl border bg-[var(--Surface-Primary)] p-4 transition-colors duration-[var(--Motion-Duration-Fast)]",
|
|
21
|
+
e === "error" || e === "empty" ? "border-[var(--Border-Caution)]" : "border-[var(--Border-Medium-Emphasis)]",
|
|
22
|
+
a && "cursor-pointer hover:bg-[var(--Surface-Secondary)] hover:border-[var(--Border-High-Emphasis)]",
|
|
23
|
+
m
|
|
24
|
+
),
|
|
25
|
+
...d,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
28
|
+
/* @__PURE__ */ r("h3", { className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: i }),
|
|
29
|
+
e === "empty" ? /* @__PURE__ */ r("p", { className: "typo-body-md text-[var(--Text-Caution)]", children: "未入力" }) : /* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
30
|
+
o && /* @__PURE__ */ r("p", { className: "typo-body-sm text-[var(--Text-High-Emphasis)]", children: o }),
|
|
31
|
+
/* @__PURE__ */ r("div", { className: "typo-body-sm text-[var(--Text-High-Emphasis)]", children: c })
|
|
32
|
+
] }),
|
|
33
|
+
e === "error" && /* @__PURE__ */ r("p", { className: "mt-1 typo-body-sm text-[var(--Text-Caution)]", children: "入力内容にエラーがあります。確認してください。" })
|
|
34
|
+
] }),
|
|
35
|
+
a && /* @__PURE__ */ t(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: a,
|
|
40
|
+
className: "flex shrink-0 items-center gap-0.5 typo-body-md text-[var(--Text-Accent-Primary)] transition-colors hover:opacity-80",
|
|
41
|
+
children: [
|
|
42
|
+
s,
|
|
43
|
+
/* @__PURE__ */ r(n, { size: 20, className: "text-[var(--Text-Accent-Primary)]" })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
y as OrderSection
|
|
53
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import y from "iconsax-reactjs/dist/esm/ShieldTick.js";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
import { Button as u } from "../foundations/button.js";
|
|
6
|
+
import { Separator as v } from "../foundations/separator.js";
|
|
7
|
+
function T({
|
|
8
|
+
className: t,
|
|
9
|
+
lineItems: r,
|
|
10
|
+
totalLabel: o = "合計(税込)",
|
|
11
|
+
totalValue: d,
|
|
12
|
+
ctaLabel: c,
|
|
13
|
+
onCTAClick: n,
|
|
14
|
+
showSecurityBadge: p = !1,
|
|
15
|
+
securityText: h = "SSL暗号化通信で安全にお手続きいただけます",
|
|
16
|
+
disableFixed: x = !1,
|
|
17
|
+
ctaDisabled: f = !1,
|
|
18
|
+
...i
|
|
19
|
+
}) {
|
|
20
|
+
const m = /* @__PURE__ */ a("div", { className: "space-y-2 px-4 py-3", children: [
|
|
21
|
+
r && r.map((s) => /* @__PURE__ */ a(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: "flex items-center justify-between typo-body-md",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ e("span", { className: "text-[var(--Text-Medium-Emphasis)]", children: s.label }),
|
|
27
|
+
/* @__PURE__ */ e("span", { className: "text-[var(--Text-High-Emphasis)]", children: s.value })
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
s.label
|
|
31
|
+
)),
|
|
32
|
+
r && r.length > 0 && /* @__PURE__ */ e(v, {}),
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
34
|
+
/* @__PURE__ */ e("span", { className: "typo-heading-md text-[var(--Text-High-Emphasis)]", children: o }),
|
|
35
|
+
/* @__PURE__ */ e("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: d })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
u,
|
|
39
|
+
{
|
|
40
|
+
size: "xl",
|
|
41
|
+
className: "w-full",
|
|
42
|
+
onClick: n,
|
|
43
|
+
disabled: f,
|
|
44
|
+
children: c
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
p && /* @__PURE__ */ a("p", { className: "flex items-center justify-center gap-1 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: [
|
|
48
|
+
/* @__PURE__ */ e(y, { size: 12 }),
|
|
49
|
+
h
|
|
50
|
+
] })
|
|
51
|
+
] });
|
|
52
|
+
return x ? /* @__PURE__ */ e(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "order-summary",
|
|
56
|
+
className: l(
|
|
57
|
+
"border-t border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)]",
|
|
58
|
+
t
|
|
59
|
+
),
|
|
60
|
+
...i,
|
|
61
|
+
children: m
|
|
62
|
+
}
|
|
63
|
+
) : /* @__PURE__ */ e(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "order-summary",
|
|
67
|
+
className: l(
|
|
68
|
+
"fixed inset-x-0 bottom-[52px] z-[var(--Z-Sticky)] mx-auto max-w-[430px] border-t border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)]",
|
|
69
|
+
t
|
|
70
|
+
),
|
|
71
|
+
...i,
|
|
72
|
+
children: m
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
T as OrderSummary
|
|
78
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as o } from "../../lib/utils.js";
|
|
4
|
+
const d = {
|
|
5
|
+
visa: "Visa",
|
|
6
|
+
mastercard: "Mastercard",
|
|
7
|
+
jcb: "JCB",
|
|
8
|
+
amex: "American Express",
|
|
9
|
+
diners: "Diners Club"
|
|
10
|
+
}, g = {
|
|
11
|
+
visa: "https://assets.cake.jp/bp/img/carts/ec/logo/visa.png",
|
|
12
|
+
mastercard: "https://assets.cake.jp/bp/img/carts/ec/logo/mastercard.png",
|
|
13
|
+
jcb: "https://assets.cake.jp/bp/img/carts/ec/logo/jcb.png",
|
|
14
|
+
amex: "https://assets.cake.jp/bp/img/carts/ec/logo/amex.png",
|
|
15
|
+
diners: "https://assets.cake.jp/bp/img/carts/ec/logo/diners.png"
|
|
16
|
+
};
|
|
17
|
+
function p({ brand: i, className: t, ...a }) {
|
|
18
|
+
return /* @__PURE__ */ s(
|
|
19
|
+
"img",
|
|
20
|
+
{
|
|
21
|
+
src: g[i],
|
|
22
|
+
alt: d[i],
|
|
23
|
+
className: o("h-[30px] w-auto object-contain", t),
|
|
24
|
+
...a
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function y({
|
|
29
|
+
method: i,
|
|
30
|
+
cardBrand: t,
|
|
31
|
+
cardLast4: a,
|
|
32
|
+
cardExpiry: m,
|
|
33
|
+
status: r = "registered",
|
|
34
|
+
acceptedBrands: c,
|
|
35
|
+
className: n,
|
|
36
|
+
...h
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "payment-method",
|
|
42
|
+
className: o("space-y-3", n),
|
|
43
|
+
...h,
|
|
44
|
+
children: [
|
|
45
|
+
r === "registered" && t && /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: [
|
|
46
|
+
/* @__PURE__ */ s(p, { brand: t }),
|
|
47
|
+
/* @__PURE__ */ e("div", { children: [
|
|
48
|
+
/* @__PURE__ */ s("p", { className: "typo-label-sm text-[var(--Text-High-Emphasis)]", children: i }),
|
|
49
|
+
a && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)]", children: [
|
|
50
|
+
"**** **** **** ",
|
|
51
|
+
a
|
|
52
|
+
] }),
|
|
53
|
+
m && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: [
|
|
54
|
+
"有効期限: ",
|
|
55
|
+
m
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
r === "unregistered" && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: [
|
|
60
|
+
i,
|
|
61
|
+
"が登録されていません"
|
|
62
|
+
] }),
|
|
63
|
+
r === "expired" && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
64
|
+
t && /* @__PURE__ */ s(p, { brand: t }),
|
|
65
|
+
/* @__PURE__ */ e("div", { children: [
|
|
66
|
+
/* @__PURE__ */ s("p", { className: "typo-label-sm text-[var(--Text-Caution)]", children: "有効期限切れ" }),
|
|
67
|
+
a && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: [
|
|
68
|
+
"**** ",
|
|
69
|
+
a
|
|
70
|
+
] })
|
|
71
|
+
] })
|
|
72
|
+
] }),
|
|
73
|
+
c && c.length > 0 && /* @__PURE__ */ s("ul", { className: "flex items-center gap-2 list-none p-0 m-0", children: c.map((l) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(p, { brand: l }) }, l)) })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
p as CreditCardIcon,
|
|
80
|
+
y as PaymentMethodDisplay
|
|
81
|
+
};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as x } from "../../lib/utils.js";
|
|
4
|
+
import { PriceDisplay as T } from "../primitives/price-display.js";
|
|
5
|
+
import { RatingStars as k } from "./rating-stars.js";
|
|
6
|
+
import { Tag as p } from "../primitives/tag.js";
|
|
7
|
+
function B({
|
|
8
|
+
href: l,
|
|
9
|
+
onClick: a,
|
|
10
|
+
name: t
|
|
11
|
+
}) {
|
|
12
|
+
return l ? /* @__PURE__ */ e(
|
|
13
|
+
"a",
|
|
14
|
+
{
|
|
15
|
+
href: l,
|
|
16
|
+
className: "absolute inset-0 z-[var(--Z-Local-1)]",
|
|
17
|
+
"aria-label": t,
|
|
18
|
+
onClick: a,
|
|
19
|
+
children: /* @__PURE__ */ e("span", { className: "sr-only", children: t })
|
|
20
|
+
}
|
|
21
|
+
) : a ? /* @__PURE__ */ e(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
className: "absolute inset-0 z-[var(--Z-Local-1)] cursor-pointer",
|
|
26
|
+
"aria-label": t,
|
|
27
|
+
onClick: a,
|
|
28
|
+
children: /* @__PURE__ */ e("span", { className: "sr-only", children: t })
|
|
29
|
+
}
|
|
30
|
+
) : null;
|
|
31
|
+
}
|
|
32
|
+
function O({ size: l = 20, filled: a = !1 }) {
|
|
33
|
+
return /* @__PURE__ */ e(
|
|
34
|
+
"svg",
|
|
35
|
+
{
|
|
36
|
+
width: l,
|
|
37
|
+
height: l,
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
fill: "none",
|
|
40
|
+
className: "transition-colors",
|
|
41
|
+
children: /* @__PURE__ */ e(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: "M17 3H7a2 2 0 0 0-2 2v16l7-4 7 4V5a2 2 0 0 0-2-2Z",
|
|
45
|
+
fill: a ? "var(--Brand-Cake-Orange)" : "none",
|
|
46
|
+
stroke: a ? "var(--Brand-Cake-Orange)" : "var(--Object-High-Emphasis)",
|
|
47
|
+
strokeWidth: 1.5,
|
|
48
|
+
strokeLinecap: "round",
|
|
49
|
+
strokeLinejoin: "round"
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function E({
|
|
56
|
+
isFavorite: l,
|
|
57
|
+
onToggle: a,
|
|
58
|
+
size: t = "md"
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ e(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
className: x(
|
|
65
|
+
"relative z-10 flex items-center justify-center rounded-full border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)]/80 backdrop-blur-sm transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)]",
|
|
66
|
+
t === "sm" ? "size-[30px]" : "size-9"
|
|
67
|
+
),
|
|
68
|
+
onClick: (i) => {
|
|
69
|
+
i.preventDefault(), i.stopPropagation(), a();
|
|
70
|
+
},
|
|
71
|
+
"aria-label": l ? "お気に入りから削除" : "お気に入りに追加",
|
|
72
|
+
children: /* @__PURE__ */ e(
|
|
73
|
+
O,
|
|
74
|
+
{
|
|
75
|
+
size: t === "sm" ? 16 : 20,
|
|
76
|
+
filled: l
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
function j({ rank: l }) {
|
|
83
|
+
return /* @__PURE__ */ e(
|
|
84
|
+
"img",
|
|
85
|
+
{
|
|
86
|
+
src: `https://assets.cake.jp/bp/img/common/tags/ranking_${l}.png`,
|
|
87
|
+
alt: `${l}位`,
|
|
88
|
+
loading: "lazy",
|
|
89
|
+
className: "absolute left-1 top-0 z-[var(--Z-Local-2)] h-auto w-[60px]"
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function R(l, a) {
|
|
94
|
+
return a == null || a <= l ? null : `${Math.round((a - l) / a * 100)}%OFF`;
|
|
95
|
+
}
|
|
96
|
+
function M({ name: l, href: a }) {
|
|
97
|
+
return a ? /* @__PURE__ */ e(
|
|
98
|
+
"a",
|
|
99
|
+
{
|
|
100
|
+
href: a,
|
|
101
|
+
className: "relative z-10 truncate typo-body-sm text-[var(--Text-Low-Emphasis)] hover:text-[var(--Text-Medium-Emphasis)] hover:underline",
|
|
102
|
+
onClick: (t) => t.stopPropagation(),
|
|
103
|
+
children: l
|
|
104
|
+
}
|
|
105
|
+
) : /* @__PURE__ */ e("p", { className: "truncate typo-body-sm text-[var(--Text-Low-Emphasis)]", children: l });
|
|
106
|
+
}
|
|
107
|
+
function _({
|
|
108
|
+
className: l,
|
|
109
|
+
name: a,
|
|
110
|
+
imageUrl: t,
|
|
111
|
+
imageAlt: i,
|
|
112
|
+
price: v,
|
|
113
|
+
originalPrice: f,
|
|
114
|
+
caption: m,
|
|
115
|
+
rating: o,
|
|
116
|
+
reviewCount: y,
|
|
117
|
+
shopName: u,
|
|
118
|
+
shopHref: N,
|
|
119
|
+
tags: b = [],
|
|
120
|
+
isFavorite: w = !1,
|
|
121
|
+
onFavoriteToggle: h,
|
|
122
|
+
onCardClick: g,
|
|
123
|
+
href: z,
|
|
124
|
+
ranking: n,
|
|
125
|
+
deliveryDate: c,
|
|
126
|
+
orientation: Z = "vertical",
|
|
127
|
+
showDiscountBadge: P = !0,
|
|
128
|
+
showCartButton: S = !1,
|
|
129
|
+
onCartAdd: C,
|
|
130
|
+
cartButtonLabel: H = "カートに追加",
|
|
131
|
+
...L
|
|
132
|
+
}) {
|
|
133
|
+
const d = P ? R(v, f) : null;
|
|
134
|
+
return Z === "horizontal" ? /* @__PURE__ */ r(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "product-card",
|
|
138
|
+
"data-orientation": "horizontal",
|
|
139
|
+
className: x(
|
|
140
|
+
// min-w-0: 列トラック(1fr = minmax(auto,1fr))が nowrap の内容や
|
|
141
|
+
// 固定 min-width に押し広げられ、カードが列からはみ出すのを防ぐ(#210)
|
|
142
|
+
"group relative flex min-w-0 rounded-lg bg-[var(--Surface-Primary)]",
|
|
143
|
+
n != null && "pt-3",
|
|
144
|
+
l
|
|
145
|
+
),
|
|
146
|
+
...L,
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ e(B, { href: z, onClick: g, name: a }),
|
|
149
|
+
n != null && /* @__PURE__ */ e(j, { rank: n }),
|
|
150
|
+
/* @__PURE__ */ r("div", { className: "relative h-auto w-28 shrink-0 overflow-hidden rounded-lg @sm:w-36", children: [
|
|
151
|
+
/* @__PURE__ */ e("img", { src: t, alt: i ?? a, className: "h-full w-full object-cover", loading: "lazy" }),
|
|
152
|
+
d && /* @__PURE__ */ e(p, { variant: "sale", size: "sm", className: "absolute bottom-1.5 left-1.5 z-[var(--Z-Local-2)]", children: d }),
|
|
153
|
+
b.length > 0 && /* @__PURE__ */ e("div", { className: "absolute bottom-1.5 left-1.5 z-[var(--Z-Local-2)] flex flex-wrap gap-1", children: !d && b.map((s) => /* @__PURE__ */ e(p, { variant: s.variant, size: "sm", children: s.label }, s.label)) }),
|
|
154
|
+
h && /* @__PURE__ */ e("div", { className: "absolute bottom-1 right-1 z-10", children: /* @__PURE__ */ e(E, { isFavorite: w, onToggle: h, size: "sm" }) })
|
|
155
|
+
] }),
|
|
156
|
+
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-col justify-between py-1 pl-3 pr-1", children: [
|
|
157
|
+
/* @__PURE__ */ r("div", { className: "space-y-0.5", children: [
|
|
158
|
+
u && /* @__PURE__ */ e(M, { name: u, href: N }),
|
|
159
|
+
/* @__PURE__ */ e("h3", { className: "line-clamp-2 typo-body-md text-[var(--Text-High-Emphasis)]", children: a })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ r("div", { className: "mt-1 min-w-0 space-y-0.5", children: [
|
|
162
|
+
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
163
|
+
o != null && /* @__PURE__ */ e(k, { rating: o, reviewCount: y, size: "sm" }),
|
|
164
|
+
c && /* @__PURE__ */ r("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: [
|
|
165
|
+
"最短 ",
|
|
166
|
+
c
|
|
167
|
+
] })
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ e(T, { price: v, originalPrice: f, size: "sm", showTaxLabel: !1 }),
|
|
170
|
+
m && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: m })
|
|
171
|
+
] })
|
|
172
|
+
] })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
) : /* @__PURE__ */ r(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
"data-slot": "product-card",
|
|
179
|
+
"data-orientation": "vertical",
|
|
180
|
+
className: x(
|
|
181
|
+
// max-w: 広いグリッドセルでもカードが膨らみすぎないようカード自身が上限を持つ。
|
|
182
|
+
// 280px は本番の検索結果グリッド(PC 5列 ≈ カード215px)では未到達=影響なし。
|
|
183
|
+
// マイページ等の3列グリッド(実効幅 ~950px)で 3×280+gap が収まる上限として採用。
|
|
184
|
+
// min-w-0: 旧 min-w-[140px] は列幅より広い床を作り、狭い列でカード・サムネイルが
|
|
185
|
+
// 列からはみ出す原因だった(#210)。幅は列(minmax(0,1fr))側が決める。
|
|
186
|
+
"group relative flex w-full min-w-0 max-w-[280px] flex-col gap-1 bg-[var(--Surface-Primary)]",
|
|
187
|
+
n != null && "pt-3",
|
|
188
|
+
l
|
|
189
|
+
),
|
|
190
|
+
...L,
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ e(B, { href: z, onClick: g, name: a }),
|
|
193
|
+
n != null && /* @__PURE__ */ e(j, { rank: n }),
|
|
194
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
195
|
+
/* @__PURE__ */ r("div", { className: "aspect-square overflow-hidden rounded-lg", children: [
|
|
196
|
+
/* @__PURE__ */ e("img", { src: t, alt: i ?? a, className: "h-full w-full object-cover transition-transform duration-[var(--Motion-Duration-Base)] group-hover:scale-105", loading: "lazy" }),
|
|
197
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-x-1 bottom-1 z-[var(--Z-Local-3)] flex items-end", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1", children: [
|
|
198
|
+
d && /* @__PURE__ */ e(p, { variant: "sale", size: "sm", children: d }),
|
|
199
|
+
b.map((s) => /* @__PURE__ */ e(p, { variant: s.variant, size: "sm", children: s.label }, s.label))
|
|
200
|
+
] }) })
|
|
201
|
+
] }),
|
|
202
|
+
h && /* @__PURE__ */ e("div", { className: "absolute bottom-1.5 right-1.5 z-[var(--Z-Local-4)]", children: /* @__PURE__ */ e(E, { isFavorite: w, onToggle: h }) })
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
205
|
+
u && /* @__PURE__ */ e(M, { name: u, href: N }),
|
|
206
|
+
/* @__PURE__ */ e("h3", { className: "line-clamp-2 min-h-[2lh] typo-body-md text-[var(--Text-High-Emphasis)]", children: a }),
|
|
207
|
+
(o != null || c) && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
208
|
+
o != null && /* @__PURE__ */ e(k, { rating: o, reviewCount: y, size: "sm" }),
|
|
209
|
+
c && /* @__PURE__ */ r("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: [
|
|
210
|
+
"最短 ",
|
|
211
|
+
c
|
|
212
|
+
] })
|
|
213
|
+
] }),
|
|
214
|
+
/* @__PURE__ */ e(T, { price: v, originalPrice: f, size: "md", showTaxLabel: !1 }),
|
|
215
|
+
m && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: m })
|
|
216
|
+
] }),
|
|
217
|
+
S && /* @__PURE__ */ e(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
type: "button",
|
|
221
|
+
className: "relative z-10 flex h-9 w-full items-center justify-center gap-0.5 rounded-lg bg-[var(--Brand-Cake-Orange)] typo-label-md text-[var(--Text-on-Inverse)] transition-colors hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)]",
|
|
222
|
+
onClick: (s) => {
|
|
223
|
+
s.preventDefault(), s.stopPropagation(), C?.();
|
|
224
|
+
},
|
|
225
|
+
children: H
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
export {
|
|
233
|
+
O as BookmarkRibbonIcon,
|
|
234
|
+
_ as ProductCard
|
|
235
|
+
};
|