@cakejp/design-system 0.20.0 → 0.21.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 +179 -0
- package/CLAUDE.md +5 -3
- package/MIGRATION.md +3 -3
- package/README.md +31 -11
- package/contracts/components.json +424 -62
- package/contracts/composition.json +38 -4
- package/contracts/rules.json +27 -5
- package/contracts/screen-patterns.json +6 -4
- package/dist/components/ec/admin-shell.js +62 -60
- package/dist/components/ec/anniversary-card.js +13 -12
- package/dist/components/ec/coupon-card.js +11 -11
- package/dist/components/ec/delivery-calendar.js +51 -45
- package/dist/components/ec/mypage-shell.js +80 -69
- package/dist/components/ec/product-card.js +93 -76
- package/dist/components/ec/product-carousel.js +65 -60
- package/dist/components/ec/product-detail-bar.js +13 -11
- package/dist/components/ec/product-detail-sidebar.js +60 -58
- package/dist/components/ec/product-list-item.js +64 -63
- package/dist/components/ec/product-option.js +30 -26
- package/dist/components/ec/rating-stars.js +27 -27
- package/dist/components/ec/review-card.js +32 -32
- package/dist/components/ec/review-form.js +37 -37
- package/dist/components/ec/shop-card.js +21 -19
- package/dist/components/foundations/accordion.js +33 -31
- package/dist/components/foundations/alert-dialog.js +4 -5
- package/dist/components/foundations/badge.js +5 -5
- package/dist/components/foundations/breadcrumb.js +27 -26
- package/dist/components/foundations/button.js +144 -25
- package/dist/components/foundations/calendar.js +28 -26
- package/dist/components/foundations/checkbox-card.js +71 -47
- package/dist/components/foundations/checkbox-group.js +30 -27
- package/dist/components/foundations/checkbox.js +69 -52
- package/dist/components/foundations/chip-variants.js +13 -0
- package/dist/components/foundations/command.js +81 -79
- package/dist/components/foundations/confirm-dialog.js +136 -0
- package/dist/components/foundations/context-menu.js +43 -38
- package/dist/components/foundations/data-table.js +88 -84
- package/dist/components/foundations/dialog.js +45 -36
- package/dist/components/foundations/dropdown-menu.js +47 -42
- package/dist/components/foundations/file-input.js +97 -67
- package/dist/components/foundations/hover-card.js +21 -21
- package/dist/components/foundations/menubar.js +75 -69
- package/dist/components/foundations/navigation-menu.js +31 -26
- package/dist/components/foundations/pagination.js +54 -50
- package/dist/components/foundations/popover.js +7 -7
- package/dist/components/foundations/progress.js +10 -6
- package/dist/components/foundations/radio-group.js +6 -3
- package/dist/components/foundations/responsive-dialog.js +73 -55
- package/dist/components/foundations/scroll-area.js +18 -14
- package/dist/components/foundations/select.js +44 -39
- package/dist/components/foundations/sheet.js +45 -37
- package/dist/components/foundations/skeleton.js +6 -6
- package/dist/components/foundations/skip-link.js +10 -8
- package/dist/components/foundations/slider.js +73 -48
- package/dist/components/foundations/sonner.js +5 -4
- package/dist/components/foundations/spinner.js +7 -5
- package/dist/components/foundations/switch.js +11 -10
- package/dist/components/foundations/tabs.js +54 -39
- package/dist/components/foundations/toggle-group.js +29 -21
- package/dist/components/foundations/toggle.js +20 -16
- package/dist/components/primitives/admin-side-nav.js +65 -62
- package/dist/components/primitives/banner-carousel.js +32 -29
- package/dist/components/primitives/bottom-tab-bar.js +16 -15
- package/dist/components/primitives/category-scroll.js +39 -29
- package/dist/components/primitives/category-shortcuts.js +9 -9
- package/dist/components/primitives/chat-composer.js +77 -74
- package/dist/components/primitives/chip.js +84 -61
- package/dist/components/primitives/combobox.js +63 -47
- package/dist/components/primitives/container.js +9 -9
- package/dist/components/primitives/content-card.js +15 -17
- package/dist/components/primitives/content-carousel.js +79 -68
- package/dist/components/primitives/date-picker.js +137 -99
- package/dist/components/primitives/footer.js +36 -37
- package/dist/components/primitives/header.js +175 -168
- package/dist/components/primitives/image-carousel.js +107 -87
- package/dist/components/primitives/image-gallery.js +32 -27
- package/dist/components/primitives/image-uploader.js +43 -22
- package/dist/components/primitives/list-item.js +59 -51
- package/dist/components/primitives/menu-drawer.js +36 -38
- package/dist/components/primitives/multi-select.js +89 -58
- package/dist/components/primitives/notification-list.js +10 -9
- package/dist/components/primitives/number-input.js +116 -105
- package/dist/components/primitives/scroll-row.js +21 -0
- package/dist/components/primitives/search-bar.js +31 -28
- package/dist/components/primitives/section-header.js +54 -53
- package/dist/components/primitives/side-nav.js +57 -56
- package/dist/components/primitives/sub-nav.js +13 -14
- package/dist/components/primitives/tag.js +4 -2
- package/dist/index.css +1 -1
- package/dist/index.js +3076 -929
- package/dist/lib/field-labelling.js +31 -21
- package/dist/lib/focus-ring.js +22 -4
- package/dist/lib/high-contrast.js +4 -0
- package/dist/lib/image-index.js +8 -0
- package/dist/lib/use-prefers-reduced-motion.js +21 -0
- package/dist/types/components/ec/admin-shell.d.ts +11 -1
- package/dist/types/components/ec/anniversary-card.d.ts +9 -1
- package/dist/types/components/ec/mypage-shell.d.ts +12 -1
- package/dist/types/components/ec/product-card.d.ts +13 -1
- package/dist/types/components/ec/product-carousel.d.ts +13 -1
- package/dist/types/components/ec/product-detail-bar.d.ts +12 -1
- package/dist/types/components/ec/product-detail-sidebar.d.ts +11 -1
- package/dist/types/components/ec/product-list-item.d.ts +9 -1
- package/dist/types/components/ec/rating-stars.d.ts +2 -0
- package/dist/types/components/ec/review-card.d.ts +1 -1
- package/dist/types/components/ec/shop-card.d.ts +8 -1
- package/dist/types/components/foundations/badge.d.ts +1 -1
- package/dist/types/components/foundations/breadcrumb.d.ts +8 -1
- package/dist/types/components/foundations/button.d.ts +38 -3
- package/dist/types/components/foundations/checkbox-card.d.ts +7 -1
- package/dist/types/components/foundations/checkbox.d.ts +1 -1
- package/dist/types/components/foundations/chip-variants.d.ts +2 -2
- package/dist/types/components/foundations/confirm-dialog.d.ts +61 -0
- package/dist/types/components/foundations/data-table.d.ts +9 -2
- package/dist/types/components/foundations/dialog.d.ts +16 -1
- package/dist/types/components/foundations/pagination.d.ts +1 -1
- package/dist/types/components/foundations/responsive-dialog.d.ts +2 -1
- package/dist/types/components/foundations/sheet.d.ts +12 -1
- package/dist/types/components/foundations/skeleton.d.ts +6 -0
- package/dist/types/components/foundations/slider.d.ts +15 -1
- package/dist/types/components/foundations/tabs.d.ts +7 -0
- package/dist/types/components/primitives/admin-side-nav.d.ts +22 -2
- package/dist/types/components/primitives/banner-carousel.d.ts +9 -1
- package/dist/types/components/primitives/bottom-tab-bar.d.ts +13 -2
- package/dist/types/components/primitives/category-scroll.d.ts +10 -1
- package/dist/types/components/primitives/category-shortcuts.d.ts +11 -2
- package/dist/types/components/primitives/chip.d.ts +22 -3
- package/dist/types/components/primitives/combobox.d.ts +7 -2
- package/dist/types/components/primitives/container.d.ts +3 -0
- package/dist/types/components/primitives/content-card.d.ts +1 -1
- package/dist/types/components/primitives/content-carousel.d.ts +12 -4
- package/dist/types/components/primitives/date-picker.d.ts +10 -3
- package/dist/types/components/primitives/footer.d.ts +1 -1
- package/dist/types/components/primitives/header.d.ts +14 -2
- package/dist/types/components/primitives/image-carousel.d.ts +23 -5
- package/dist/types/components/primitives/list-item.d.ts +10 -1
- package/dist/types/components/primitives/menu-drawer.d.ts +1 -1
- package/dist/types/components/primitives/multi-select.d.ts +7 -2
- package/dist/types/components/primitives/notification-list.d.ts +10 -1
- package/dist/types/components/primitives/number-input.d.ts +18 -5
- package/dist/types/components/primitives/scroll-row.d.ts +43 -0
- package/dist/types/components/primitives/section-header.d.ts +9 -2
- package/dist/types/components/primitives/side-nav.d.ts +13 -1
- package/dist/types/components/primitives/sub-nav.d.ts +1 -1
- package/dist/types/components/primitives/tag.d.ts +1 -1
- package/dist/types/index.d.ts +7 -1
- package/dist/types/lib/field-labelling.d.ts +23 -8
- package/dist/types/lib/focus-ring.d.ts +70 -3
- package/dist/types/lib/high-contrast.d.ts +25 -0
- package/dist/types/lib/image-index.d.ts +2 -0
- package/dist/types/lib/link-component.d.ts +26 -21
- package/dist/types/lib/use-prefers-reduced-motion.d.ts +9 -0
- package/package.json +11 -3
- package/src/components/COMPONENT_LOOKUP.md +19 -17
- package/src/preset-standalone.css +42 -0
- package/src/preset.css +20 -1
- package/src/styles/semantic.css +57 -0
- package/templates/AGENTS.md +5 -1
- package/templates/CLAUDE.md +3 -1
- package/tokens.json +49 -0
- package/dist/lib/link-component.js +0 -6
|
@@ -1,176 +1,214 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { X as
|
|
6
|
-
import { ja as
|
|
7
|
-
import { cn as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
|
+
import j from "iconsax-reactjs/dist/esm/Calendar.js";
|
|
5
|
+
import { X as k } from "lucide-react";
|
|
6
|
+
import { ja as B } from "react-day-picker/locale";
|
|
7
|
+
import { cn as $ } from "../../lib/utils.js";
|
|
8
|
+
import { useFieldLabelling as D, resolveNativeFieldAria as F } from "../../lib/field-labelling.js";
|
|
9
|
+
import { Button as A } from "../foundations/button.js";
|
|
10
|
+
import { Calendar as R } from "../foundations/calendar.js";
|
|
11
|
+
import { Popover as V, PopoverTrigger as _, PopoverContent as J } from "../foundations/popover.js";
|
|
12
|
+
import { Select as T, SelectTrigger as w, SelectValue as E, SelectContent as H, SelectItem as P } from "../foundations/select.js";
|
|
13
|
+
const O = ["日", "月", "火", "水", "木", "金", "土"];
|
|
14
|
+
function z(e) {
|
|
15
|
+
return `${e.getMonth() + 1}月${e.getDate()}日(${O[e.getDay()]})`;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return e &&
|
|
17
|
+
function K(e, n, a) {
|
|
18
|
+
const s = [];
|
|
19
|
+
return e && s.push({ before: e }), n && s.push({ after: n }), a && (Array.isArray(a) ? s.push(...a) : s.push(a)), s.length > 0 ? s : void 0;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function W({
|
|
21
22
|
value: e,
|
|
22
|
-
onChange:
|
|
23
|
-
placeholder:
|
|
24
|
-
min:
|
|
25
|
-
max:
|
|
26
|
-
disabledDates:
|
|
27
|
-
disabled:
|
|
28
|
-
clearable:
|
|
29
|
-
clearLabel:
|
|
30
|
-
id:
|
|
31
|
-
|
|
23
|
+
onChange: n,
|
|
24
|
+
placeholder: a = "日付を選択",
|
|
25
|
+
min: s,
|
|
26
|
+
max: g,
|
|
27
|
+
disabledDates: S,
|
|
28
|
+
disabled: m,
|
|
29
|
+
clearable: N = !1,
|
|
30
|
+
clearLabel: h = "日付をクリア",
|
|
31
|
+
id: l,
|
|
32
|
+
"aria-invalid": b,
|
|
33
|
+
"aria-describedby": u,
|
|
34
|
+
className: M
|
|
32
35
|
}) {
|
|
33
|
-
const [
|
|
36
|
+
const [y, v] = d.useState(!1), C = K(s, g, S), p = N && !!e && !m, x = d.useRef(null), f = `${d.useId()}-value`, r = D(), i = F(
|
|
37
|
+
{ id: l, "aria-describedby": u, "aria-invalid": b },
|
|
38
|
+
r
|
|
39
|
+
), o = r ? { "aria-labelledby": `${r.labelId} ${f}` } : { "aria-label": e ? z(e) : a };
|
|
34
40
|
return (
|
|
35
41
|
// クリアボタンは trigger の「兄弟」として絶対配置する。trigger の内側に置くと
|
|
36
42
|
// button の入れ子になり a11y 上不正(Chip removable と同じ解決)。
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
43
|
+
/* @__PURE__ */ c("div", { className: $("relative w-full", M), children: [
|
|
44
|
+
/* @__PURE__ */ c(V, { open: y, onOpenChange: v, children: [
|
|
45
|
+
/* @__PURE__ */ t(_, { asChild: !0, children: /* @__PURE__ */ c(
|
|
46
|
+
A,
|
|
41
47
|
{
|
|
42
|
-
|
|
48
|
+
ref: x,
|
|
49
|
+
id: l,
|
|
50
|
+
"aria-invalid": b,
|
|
51
|
+
"aria-describedby": u,
|
|
52
|
+
...i,
|
|
43
53
|
type: "button",
|
|
44
54
|
variant: "ghost",
|
|
45
|
-
disabled:
|
|
46
|
-
|
|
55
|
+
disabled: m,
|
|
56
|
+
...o,
|
|
47
57
|
"data-empty": !e,
|
|
48
|
-
className:
|
|
58
|
+
className: $(
|
|
49
59
|
// h-11(44px)= 入力コントロールの共通高さ(Input / SelectTrigger / Button default と揃える)
|
|
50
60
|
"h-11 w-full justify-start gap-2 border border-[var(--Border-High-Emphasis)] bg-transparent px-3 typo-body-md text-[var(--Text-High-Emphasis)] hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Secondary)] data-[empty=true]:text-[var(--Text-Low-Emphasis)]",
|
|
61
|
+
// エラー時の枠は Input / Select と同じ Border-Caution(Button 共通の destructive を上書き)
|
|
62
|
+
"aria-invalid:border-[var(--Border-Caution)]",
|
|
51
63
|
// クリアボタンの領域を空ける
|
|
52
|
-
|
|
64
|
+
p && "pr-10"
|
|
53
65
|
),
|
|
54
66
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ t(j, { size: 16, className: "shrink-0" }),
|
|
68
|
+
/* @__PURE__ */ t("span", { id: r ? f : void 0, className: "truncate", children: e ? z(e) : a })
|
|
57
69
|
]
|
|
58
70
|
}
|
|
59
71
|
) }),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
72
|
+
/* @__PURE__ */ t(J, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ t(
|
|
73
|
+
R,
|
|
62
74
|
{
|
|
63
75
|
mode: "single",
|
|
64
76
|
selected: e,
|
|
65
|
-
onSelect: (
|
|
66
|
-
|
|
77
|
+
onSelect: (I) => {
|
|
78
|
+
n?.(I), v(!1);
|
|
67
79
|
},
|
|
68
|
-
disabled:
|
|
69
|
-
locale:
|
|
80
|
+
disabled: C,
|
|
81
|
+
locale: B,
|
|
70
82
|
autoFocus: !0
|
|
71
83
|
}
|
|
72
84
|
) })
|
|
73
85
|
] }),
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
p && /* @__PURE__ */ t(
|
|
87
|
+
A,
|
|
76
88
|
{
|
|
77
89
|
type: "button",
|
|
78
90
|
variant: "ghost",
|
|
79
91
|
size: "icon-sm",
|
|
80
|
-
"aria-label":
|
|
81
|
-
onClick: () =>
|
|
92
|
+
"aria-label": h,
|
|
93
|
+
onClick: () => {
|
|
94
|
+
n?.(void 0), x.current?.focus();
|
|
95
|
+
},
|
|
82
96
|
className: "absolute top-1/2 right-1 -translate-y-1/2 text-[var(--Text-Medium-Emphasis)]",
|
|
83
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ t(k, { className: "size-4" })
|
|
84
98
|
}
|
|
85
99
|
)
|
|
86
100
|
] })
|
|
87
101
|
);
|
|
88
102
|
}
|
|
89
|
-
function
|
|
103
|
+
function te({
|
|
90
104
|
value: e,
|
|
91
|
-
onChange:
|
|
92
|
-
minuteStep:
|
|
93
|
-
hourLabel:
|
|
94
|
-
minuteLabel:
|
|
95
|
-
clearLabel:
|
|
96
|
-
disabled:
|
|
97
|
-
className:
|
|
98
|
-
|
|
105
|
+
onChange: n,
|
|
106
|
+
minuteStep: a = 5,
|
|
107
|
+
hourLabel: s = "時",
|
|
108
|
+
minuteLabel: g = "分",
|
|
109
|
+
clearLabel: S = "日時をクリア",
|
|
110
|
+
disabled: m,
|
|
111
|
+
className: N,
|
|
112
|
+
"aria-invalid": h,
|
|
113
|
+
"aria-describedby": l,
|
|
114
|
+
...b
|
|
99
115
|
}) {
|
|
100
|
-
const
|
|
101
|
-
()
|
|
116
|
+
const u = D(), M = d.useId(), y = (r, i) => {
|
|
117
|
+
if (!u) return { "aria-label": i };
|
|
118
|
+
const o = `${M}-${r}`;
|
|
119
|
+
return {
|
|
120
|
+
id: o,
|
|
121
|
+
"aria-label": i,
|
|
122
|
+
"aria-labelledby": `${u.labelId} ${o}`
|
|
123
|
+
};
|
|
124
|
+
}, v = d.useMemo(
|
|
125
|
+
() => Array.from({ length: 24 }, (r, i) => i),
|
|
102
126
|
[]
|
|
103
|
-
),
|
|
127
|
+
), C = d.useMemo(
|
|
104
128
|
() => Array.from(
|
|
105
|
-
{ length: Math.ceil(60 /
|
|
106
|
-
(
|
|
129
|
+
{ length: Math.ceil(60 / a) },
|
|
130
|
+
(r, i) => i * a
|
|
107
131
|
),
|
|
108
|
-
[
|
|
109
|
-
),
|
|
132
|
+
[a]
|
|
133
|
+
), p = (r, i) => {
|
|
110
134
|
if (!e) return;
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
if (!
|
|
115
|
-
|
|
135
|
+
const o = new Date(e);
|
|
136
|
+
r === "hours" ? o.setHours(Number(i)) : o.setMinutes(Number(i)), n?.(o);
|
|
137
|
+
}, x = (r) => {
|
|
138
|
+
if (!r || !e) {
|
|
139
|
+
n?.(r);
|
|
116
140
|
return;
|
|
117
141
|
}
|
|
118
|
-
const i = new Date(
|
|
142
|
+
const i = new Date(r);
|
|
119
143
|
i.setHours(
|
|
120
144
|
e.getHours(),
|
|
121
145
|
e.getMinutes(),
|
|
122
146
|
e.getSeconds(),
|
|
123
147
|
e.getMilliseconds()
|
|
124
|
-
),
|
|
125
|
-
},
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
|
|
148
|
+
), n?.(i);
|
|
149
|
+
}, f = m || !e;
|
|
150
|
+
return /* @__PURE__ */ c("div", { className: $("flex items-center gap-2", N), children: [
|
|
151
|
+
/* @__PURE__ */ t(
|
|
152
|
+
W,
|
|
129
153
|
{
|
|
130
|
-
...
|
|
154
|
+
...b,
|
|
131
155
|
value: e,
|
|
132
|
-
onChange:
|
|
133
|
-
disabled:
|
|
134
|
-
clearLabel:
|
|
156
|
+
onChange: x,
|
|
157
|
+
disabled: m,
|
|
158
|
+
clearLabel: S,
|
|
159
|
+
"aria-invalid": h,
|
|
160
|
+
"aria-describedby": l,
|
|
135
161
|
className: "flex-1"
|
|
136
162
|
}
|
|
137
163
|
),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
164
|
+
/* @__PURE__ */ c(
|
|
165
|
+
T,
|
|
140
166
|
{
|
|
141
167
|
value: e ? String(e.getHours()) : void 0,
|
|
142
|
-
onValueChange: (
|
|
143
|
-
disabled:
|
|
168
|
+
onValueChange: (r) => p("hours", r),
|
|
169
|
+
disabled: f,
|
|
144
170
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
|
|
171
|
+
/* @__PURE__ */ t(
|
|
172
|
+
w,
|
|
173
|
+
{
|
|
174
|
+
size: "default",
|
|
175
|
+
className: "w-[72px]",
|
|
176
|
+
...y("hour", s),
|
|
177
|
+
"aria-invalid": h,
|
|
178
|
+
"aria-describedby": l,
|
|
179
|
+
children: /* @__PURE__ */ t(E, { placeholder: s })
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ t(H, { children: v.map((r) => /* @__PURE__ */ t(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
|
|
147
183
|
]
|
|
148
184
|
}
|
|
149
185
|
),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
|
|
186
|
+
/* @__PURE__ */ t("span", { className: "typo-body-md text-[var(--Text-Medium-Emphasis)]", children: ":" }),
|
|
187
|
+
/* @__PURE__ */ c(
|
|
188
|
+
T,
|
|
153
189
|
{
|
|
154
190
|
value: e ? String(e.getMinutes()) : void 0,
|
|
155
|
-
onValueChange: (
|
|
156
|
-
disabled:
|
|
191
|
+
onValueChange: (r) => p("minutes", r),
|
|
192
|
+
disabled: f,
|
|
157
193
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
194
|
+
/* @__PURE__ */ t(
|
|
195
|
+
w,
|
|
160
196
|
{
|
|
161
197
|
size: "default",
|
|
162
198
|
className: "w-[72px]",
|
|
163
|
-
"
|
|
164
|
-
|
|
199
|
+
...y("minute", g),
|
|
200
|
+
"aria-invalid": h,
|
|
201
|
+
"aria-describedby": l,
|
|
202
|
+
children: /* @__PURE__ */ t(E, { placeholder: g })
|
|
165
203
|
}
|
|
166
204
|
),
|
|
167
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ t(H, { children: C.map((r) => /* @__PURE__ */ t(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
|
|
168
206
|
]
|
|
169
207
|
}
|
|
170
208
|
)
|
|
171
209
|
] });
|
|
172
210
|
}
|
|
173
211
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
212
|
+
W as DatePicker,
|
|
213
|
+
te as DateTimePicker
|
|
176
214
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as s, Fragment as
|
|
2
|
+
import { jsxs as s, Fragment as M, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
4
|
import { cn as d } from "../../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
title: l,
|
|
5
|
+
function H({
|
|
6
|
+
title: o,
|
|
8
7
|
children: i
|
|
9
8
|
}) {
|
|
10
|
-
const [r,
|
|
9
|
+
const [r, l] = v.useState(!1), t = v.useRef(null), [n, c] = v.useState(0);
|
|
11
10
|
return v.useEffect(() => {
|
|
12
11
|
t.current && c(t.current.scrollHeight);
|
|
13
12
|
}, [r]), /* @__PURE__ */ s("div", { "data-slot": "footer-accordion", children: [
|
|
@@ -21,10 +20,10 @@ function B({
|
|
|
21
20
|
"typo-body-md text-[var(--Text-High-Emphasis)]",
|
|
22
21
|
"cursor-pointer"
|
|
23
22
|
),
|
|
24
|
-
onClick: () =>
|
|
23
|
+
onClick: () => l(!r),
|
|
25
24
|
"aria-expanded": r,
|
|
26
25
|
children: [
|
|
27
|
-
/* @__PURE__ */ e("span", { children:
|
|
26
|
+
/* @__PURE__ */ e("span", { children: o }),
|
|
28
27
|
/* @__PURE__ */ s("span", { className: "relative size-3 shrink-0", children: [
|
|
29
28
|
/* @__PURE__ */ e("span", { className: "absolute top-1/2 left-0 block h-px w-3 -translate-y-1/2 bg-[var(--Text-High-Emphasis)] transition-transform duration-[var(--Motion-Duration-Base)]" }),
|
|
30
29
|
/* @__PURE__ */ e(
|
|
@@ -51,11 +50,11 @@ function B({
|
|
|
51
50
|
)
|
|
52
51
|
] });
|
|
53
52
|
}
|
|
54
|
-
function g({ groups:
|
|
55
|
-
const r =
|
|
56
|
-
return /* @__PURE__ */ e("div", { className: d("grid grid-cols-3 gap-6", r), children:
|
|
57
|
-
/* @__PURE__ */ e("h3", { className: "typo-label-md text-[var(--Text-High-Emphasis)] mb-3", children:
|
|
58
|
-
/* @__PURE__ */ e("ul", { className: "space-y-1.5", children:
|
|
53
|
+
function g({ groups: o, linkComponent: i }) {
|
|
54
|
+
const r = o.length <= 4 ? "@lg:grid-cols-4" : o.length === 5 ? "@lg:grid-cols-5" : "@lg:grid-cols-6";
|
|
55
|
+
return /* @__PURE__ */ e("div", { className: d("grid grid-cols-3 gap-6", r), children: o.map((l) => /* @__PURE__ */ s("div", { children: [
|
|
56
|
+
/* @__PURE__ */ e("h3", { className: "typo-label-md text-[var(--Text-High-Emphasis)] mb-3", children: l.title }),
|
|
57
|
+
/* @__PURE__ */ e("ul", { className: "space-y-1.5", children: l.links.map((t) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
59
58
|
b,
|
|
60
59
|
{
|
|
61
60
|
link: t,
|
|
@@ -64,7 +63,7 @@ function g({ groups: l, linkComponent: i }) {
|
|
|
64
63
|
children: t.label
|
|
65
64
|
}
|
|
66
65
|
) }, t.label)) }),
|
|
67
|
-
|
|
66
|
+
l.subGroups?.map((t) => /* @__PURE__ */ s("div", { className: "mt-4", children: [
|
|
68
67
|
/* @__PURE__ */ e("h4", { className: "typo-label-md text-[var(--Text-High-Emphasis)] mb-3", children: t.title }),
|
|
69
68
|
/* @__PURE__ */ e("ul", { className: "space-y-1.5", children: t.links.map((n) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
70
69
|
b,
|
|
@@ -76,27 +75,27 @@ function g({ groups: l, linkComponent: i }) {
|
|
|
76
75
|
}
|
|
77
76
|
) }, n.label)) })
|
|
78
77
|
] }, t.title))
|
|
79
|
-
] },
|
|
78
|
+
] }, l.title)) });
|
|
80
79
|
}
|
|
81
80
|
function b({
|
|
82
|
-
link:
|
|
81
|
+
link: o,
|
|
83
82
|
linkComponent: i,
|
|
84
83
|
className: r,
|
|
85
|
-
children:
|
|
84
|
+
children: l
|
|
86
85
|
}) {
|
|
87
|
-
const t =
|
|
86
|
+
const t = o.external ? "a" : i ?? "a";
|
|
88
87
|
return /* @__PURE__ */ e(
|
|
89
88
|
t,
|
|
90
89
|
{
|
|
91
|
-
href:
|
|
90
|
+
href: o.href,
|
|
92
91
|
className: r,
|
|
93
|
-
...
|
|
94
|
-
children:
|
|
92
|
+
...o.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
93
|
+
children: l
|
|
95
94
|
}
|
|
96
95
|
);
|
|
97
96
|
}
|
|
98
|
-
function E({ links:
|
|
99
|
-
return /* @__PURE__ */ e("ul", { children:
|
|
97
|
+
function E({ links: o, linkComponent: i }) {
|
|
98
|
+
return /* @__PURE__ */ e("ul", { children: o.map((r) => /* @__PURE__ */ e("li", { className: "border-b border-[var(--Border-Low-Emphasis)] last:border-b-0", children: /* @__PURE__ */ s(
|
|
100
99
|
b,
|
|
101
100
|
{
|
|
102
101
|
link: r,
|
|
@@ -123,24 +122,24 @@ function E({ links: l, linkComponent: i }) {
|
|
|
123
122
|
}
|
|
124
123
|
) }, r.label)) });
|
|
125
124
|
}
|
|
126
|
-
function
|
|
127
|
-
className:
|
|
125
|
+
function j({
|
|
126
|
+
className: o,
|
|
128
127
|
linkGroups: i = [],
|
|
129
128
|
copyright: r = "© Cake.jp Co., Ltd.",
|
|
130
|
-
logo:
|
|
129
|
+
logo: l,
|
|
131
130
|
logoHref: t = "/",
|
|
132
131
|
socialLinks: n = [],
|
|
133
132
|
description: c,
|
|
134
133
|
paymentMethods: u = [],
|
|
135
134
|
trustBadge: m,
|
|
136
135
|
bottomLinks: y = [],
|
|
137
|
-
variant:
|
|
138
|
-
bottomRightSlot:
|
|
136
|
+
variant: w = "default",
|
|
137
|
+
bottomRightSlot: T,
|
|
139
138
|
linkComponent: h,
|
|
140
|
-
...
|
|
139
|
+
...L
|
|
141
140
|
}) {
|
|
142
|
-
const x =
|
|
143
|
-
|
|
141
|
+
const x = w === "brand-first", N = h ?? "a", p = (l || c) && /* @__PURE__ */ s("div", { "data-slot": "footer-brand", className: "grid content-start gap-4", children: [
|
|
142
|
+
l && /* @__PURE__ */ e(N, { href: t, className: "block w-fit text-[var(--Text-High-Emphasis)]", children: l }),
|
|
144
143
|
c && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: c })
|
|
145
144
|
] });
|
|
146
145
|
return /* @__PURE__ */ s(
|
|
@@ -150,13 +149,13 @@ function D({
|
|
|
150
149
|
style: { containerType: "inline-size" },
|
|
151
150
|
className: d(
|
|
152
151
|
"bg-[var(--Surface-Primary)] text-[var(--Text-Medium-Emphasis)]",
|
|
153
|
-
|
|
152
|
+
o
|
|
154
153
|
),
|
|
155
|
-
...
|
|
154
|
+
...L,
|
|
156
155
|
children: [
|
|
157
|
-
i.length > 0 && /* @__PURE__ */ s(
|
|
156
|
+
i.length > 0 && /* @__PURE__ */ s(M, { children: [
|
|
158
157
|
x && p && /* @__PURE__ */ e("div", { className: "border-t border-[var(--Border-Medium-Emphasis)] px-5 py-8 @lg:hidden", children: p }),
|
|
159
|
-
/* @__PURE__ */ e("nav", { "aria-label": "フッターナビゲーション", "data-slot": "footer-links", className: d("border-t border-[var(--Border-Medium-Emphasis)] @lg:hidden", x && "border-t-0"), children: i.map((a) => /* @__PURE__ */ s(
|
|
158
|
+
/* @__PURE__ */ e("nav", { "aria-label": "フッターナビゲーション", "data-slot": "footer-links", className: d("border-t border-[var(--Border-Medium-Emphasis)] @lg:hidden", x && "border-t-0"), children: i.map((a) => /* @__PURE__ */ s(H, { title: a.title, children: [
|
|
160
159
|
/* @__PURE__ */ e(E, { links: a.links, linkComponent: h }),
|
|
161
160
|
a.subGroups?.map((f) => /* @__PURE__ */ s("div", { children: [
|
|
162
161
|
/* @__PURE__ */ e("div", { className: "border-t border-[var(--Border-Low-Emphasis)] px-5 py-5 typo-body-md text-[var(--Text-High-Emphasis)]", children: f.title }),
|
|
@@ -291,7 +290,7 @@ function D({
|
|
|
291
290
|
className: "border-t border-[var(--Border-Medium-Emphasis)] px-5 py-5",
|
|
292
291
|
children: /* @__PURE__ */ s("div", { className: "mx-auto flex max-w-[1065px] flex-col gap-3 typo-body-sm text-[var(--Text-Low-Emphasis)] @lg:flex-row @lg:items-center @lg:justify-between", children: [
|
|
293
292
|
/* @__PURE__ */ e("p", { children: r }),
|
|
294
|
-
|
|
293
|
+
T
|
|
295
294
|
] })
|
|
296
295
|
}
|
|
297
296
|
)
|
|
@@ -301,7 +300,7 @@ function D({
|
|
|
301
300
|
"data-slot": "footer-bottom",
|
|
302
301
|
className: "border-t border-[var(--Border-Medium-Emphasis)] px-5 pt-8 pb-9 text-center",
|
|
303
302
|
children: [
|
|
304
|
-
|
|
303
|
+
l && /* @__PURE__ */ e("div", { className: "mx-auto w-fit max-w-[160px]", children: /* @__PURE__ */ e(N, { href: t, className: "block text-[var(--Text-High-Emphasis)]", children: l }) }),
|
|
305
304
|
c && /* @__PURE__ */ e("p", { className: "mt-6 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: c }),
|
|
306
305
|
/* @__PURE__ */ e("p", { className: "mt-5 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: r })
|
|
307
306
|
]
|
|
@@ -312,5 +311,5 @@ function D({
|
|
|
312
311
|
);
|
|
313
312
|
}
|
|
314
313
|
export {
|
|
315
|
-
|
|
314
|
+
j as Footer
|
|
316
315
|
};
|