@cakejp/design-system 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/CLAUDE.md +1 -0
  3. package/bin/init.js +29 -6
  4. package/contracts/components.json +42 -7
  5. package/contracts/composition.json +8 -2
  6. package/contracts/rules.json +5 -1
  7. package/contracts/screen-patterns.json +1 -1
  8. package/dist/components/ec/_mypage-menu-data.js +166 -0
  9. package/dist/components/ec/admin-shell.js +202 -0
  10. package/dist/components/ec/anniversary-card.js +63 -0
  11. package/dist/components/ec/cake-logo.js +38 -0
  12. package/dist/components/ec/chart-controls.js +91 -0
  13. package/dist/components/ec/countdown-timer.js +50 -0
  14. package/dist/components/ec/coupon-card.js +136 -0
  15. package/dist/components/ec/delivery-calendar.js +105 -0
  16. package/dist/components/ec/mypage-shell.js +98 -0
  17. package/dist/components/ec/order-section.js +53 -0
  18. package/dist/components/ec/order-summary.js +78 -0
  19. package/dist/components/ec/payment-method.js +81 -0
  20. package/dist/components/ec/product-card.js +235 -0
  21. package/dist/components/ec/product-carousel.js +106 -0
  22. package/dist/components/ec/product-cta.js +80 -0
  23. package/dist/components/ec/product-detail-bar.js +86 -0
  24. package/dist/components/ec/product-detail-sidebar.js +296 -0
  25. package/dist/components/ec/product-list-item.js +266 -0
  26. package/dist/components/ec/product-option.js +165 -0
  27. package/dist/components/ec/rating-stars.js +74 -0
  28. package/dist/components/ec/review-card.js +126 -0
  29. package/dist/components/ec/review-form.js +181 -0
  30. package/dist/components/ec/review-summary.js +95 -0
  31. package/dist/components/ec/shop-card.js +179 -0
  32. package/dist/components/ec/stat-card.js +50 -0
  33. package/dist/components/foundations/accordion.js +67 -0
  34. package/dist/components/foundations/alert-dialog.js +165 -0
  35. package/dist/components/foundations/alert.js +218 -0
  36. package/dist/components/foundations/aspect-ratio.js +10 -0
  37. package/dist/components/foundations/avatar.js +58 -0
  38. package/dist/components/foundations/badge.js +54 -0
  39. package/dist/components/foundations/breadcrumb.js +104 -0
  40. package/dist/components/foundations/button.js +99 -0
  41. package/dist/components/foundations/calendar.js +173 -0
  42. package/dist/components/foundations/card.js +109 -0
  43. package/dist/components/foundations/checkbox-card.js +111 -0
  44. package/dist/components/foundations/checkbox-group.js +92 -0
  45. package/dist/components/foundations/checkbox.js +90 -0
  46. package/dist/components/foundations/chip-variants.js +41 -0
  47. package/dist/components/foundations/collapsible.js +34 -0
  48. package/dist/components/foundations/command.js +171 -0
  49. package/dist/components/foundations/context-menu.js +225 -0
  50. package/dist/components/foundations/data-table.js +59 -0
  51. package/dist/components/foundations/dialog.js +148 -0
  52. package/dist/components/foundations/drawer.js +129 -0
  53. package/dist/components/foundations/dropdown-menu.js +232 -0
  54. package/dist/components/foundations/field.js +150 -0
  55. package/dist/components/foundations/file-input.js +116 -0
  56. package/dist/components/foundations/form.js +101 -0
  57. package/dist/components/foundations/hover-card.js +41 -0
  58. package/dist/components/foundations/icon-badge.js +41 -0
  59. package/dist/components/foundations/input.js +74 -0
  60. package/dist/components/foundations/label.js +29 -0
  61. package/dist/components/foundations/menubar.js +252 -0
  62. package/dist/components/foundations/navigation-menu.js +171 -0
  63. package/dist/components/foundations/pagination.js +120 -0
  64. package/dist/components/foundations/popover.js +45 -0
  65. package/dist/components/foundations/progress.js +34 -0
  66. package/dist/components/foundations/radio-group.js +134 -0
  67. package/dist/components/foundations/responsive-dialog.js +76 -0
  68. package/dist/components/foundations/scroll-area.js +62 -0
  69. package/dist/components/foundations/select.js +190 -0
  70. package/dist/components/foundations/separator.js +27 -0
  71. package/dist/components/foundations/sheet.js +130 -0
  72. package/dist/components/foundations/skeleton.js +15 -0
  73. package/dist/components/foundations/skip-link.js +27 -0
  74. package/dist/components/foundations/slider.js +81 -0
  75. package/dist/components/foundations/social-icon.js +36 -0
  76. package/dist/components/foundations/sonner.js +49 -0
  77. package/dist/components/foundations/spinner.js +28 -0
  78. package/dist/components/foundations/switch.js +54 -0
  79. package/dist/components/foundations/table.js +115 -0
  80. package/dist/components/foundations/tabs.js +102 -0
  81. package/dist/components/foundations/textarea.js +65 -0
  82. package/dist/components/foundations/toggle-group.js +107 -0
  83. package/dist/components/foundations/toggle.js +44 -0
  84. package/dist/components/foundations/tooltip.js +56 -0
  85. package/dist/components/primitives/admin-header.js +31 -0
  86. package/dist/components/primitives/admin-side-nav.js +135 -0
  87. package/dist/components/primitives/banner-carousel.js +97 -0
  88. package/dist/components/primitives/bottom-tab-bar.js +81 -0
  89. package/dist/components/primitives/bulk-action-bar.js +27 -0
  90. package/dist/components/primitives/category-scroll.js +110 -0
  91. package/dist/components/primitives/category-shortcuts.js +66 -0
  92. package/dist/components/primitives/chat-composer.js +141 -0
  93. package/dist/components/primitives/chip.js +123 -0
  94. package/dist/components/primitives/coach-mark.js +102 -0
  95. package/dist/components/primitives/combobox.js +88 -0
  96. package/dist/components/primitives/container.js +50 -0
  97. package/dist/components/primitives/content-carousel.js +144 -0
  98. package/dist/components/primitives/date-picker.js +175 -0
  99. package/dist/components/primitives/empty-state.js +32 -0
  100. package/dist/components/primitives/error-state.js +115 -0
  101. package/dist/components/primitives/filter-bar.js +144 -0
  102. package/dist/components/primitives/footer.js +247 -0
  103. package/dist/components/primitives/form-field.js +38 -0
  104. package/dist/components/primitives/funnel-shell.js +99 -0
  105. package/dist/components/primitives/header.js +257 -0
  106. package/dist/components/primitives/image-carousel.js +156 -0
  107. package/dist/components/primitives/image-gallery.js +177 -0
  108. package/dist/components/primitives/image-input.js +207 -0
  109. package/dist/components/primitives/image-uploader.js +69 -0
  110. package/dist/components/primitives/kebab-menu.js +40 -0
  111. package/dist/components/primitives/list-item.js +80 -0
  112. package/dist/components/primitives/menu-drawer.js +154 -0
  113. package/dist/components/primitives/multi-select.js +93 -0
  114. package/dist/components/primitives/notification-badge.js +61 -0
  115. package/dist/components/primitives/notification-list.js +72 -0
  116. package/dist/components/primitives/number-input.js +235 -0
  117. package/dist/components/primitives/price-display.js +101 -0
  118. package/dist/components/primitives/progress-steps.js +62 -0
  119. package/dist/components/primitives/search-bar.js +81 -0
  120. package/dist/components/primitives/search-panel.js +43 -0
  121. package/dist/components/primitives/section-header.js +148 -0
  122. package/dist/components/primitives/section-nav.js +85 -0
  123. package/dist/components/primitives/section.js +78 -0
  124. package/dist/components/primitives/share-buttons.js +102 -0
  125. package/dist/components/primitives/side-nav.js +98 -0
  126. package/dist/components/primitives/social-login-button.js +53 -0
  127. package/dist/components/primitives/standard-page-shell.js +34 -0
  128. package/dist/components/primitives/status-count-tabs.js +42 -0
  129. package/dist/components/primitives/sticky-action-bar.js +26 -0
  130. package/dist/components/primitives/sub-nav.js +67 -0
  131. package/dist/components/primitives/tag.js +57 -0
  132. package/dist/components/primitives/timeline.js +55 -0
  133. package/dist/components/primitives/workspace-shell.js +57 -0
  134. package/dist/index.css +1 -1
  135. package/dist/index.js +22961 -13130
  136. package/dist/lib/field-labelling.js +29 -0
  137. package/dist/lib/focus-ring.js +6 -0
  138. package/dist/lib/pagination-range.js +42 -0
  139. package/dist/lib/use-value-length.js +63 -0
  140. package/dist/lib/utils.js +33 -0
  141. package/dist/types/components/foundations/accordion.d.ts +8 -1
  142. package/dist/types/components/foundations/data-table.d.ts +6 -1
  143. package/dist/types/components/foundations/slider.d.ts +13 -1
  144. package/dist/types/components/primitives/admin-header.d.ts +10 -0
  145. package/dist/types/components/primitives/admin-side-nav.d.ts +18 -0
  146. package/dist/types/components/primitives/combobox.d.ts +9 -1
  147. package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
  148. package/dist/types/components/primitives/multi-select.d.ts +9 -1
  149. package/dist/types/lib/field-labelling.d.ts +66 -0
  150. package/package.json +8 -4
  151. package/scripts/codemod/README.md +9 -0
@@ -0,0 +1,148 @@
1
+ import { jsxs as a, jsx as e, Fragment as z } from "react/jsx-runtime";
2
+ import "react";
3
+ import B from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
4
+ import L from "iconsax-reactjs/dist/esm/ArrowRight2.js";
5
+ import { cn as i } from "../../lib/utils.js";
6
+ import { Button as b } from "../foundations/button.js";
7
+ const M = {
8
+ "3xl": "h1",
9
+ "2xl": "h2",
10
+ xl: "h3",
11
+ lg: "h4",
12
+ md: "h5",
13
+ sm: "h6"
14
+ }, S = {
15
+ "3xl": "typo-heading-3xl",
16
+ "2xl": "typo-heading-2xl",
17
+ xl: "typo-heading-xl",
18
+ lg: "typo-heading-lg",
19
+ md: "typo-heading-md",
20
+ sm: "typo-heading-sm"
21
+ }, F = {
22
+ "5xl": "@md:typo-heading-5xl",
23
+ "4xl": "@md:typo-heading-4xl"
24
+ };
25
+ function D({
26
+ className: d,
27
+ title: N,
28
+ subtitle: c,
29
+ moreHref: t,
30
+ moreLabel: o = "もっと見る",
31
+ onMoreClick: h,
32
+ action: m,
33
+ onPrev: x,
34
+ onNext: p,
35
+ prevDisabled: w = !1,
36
+ nextDisabled: C = !1,
37
+ size: s = "lg",
38
+ desktopSize: g,
39
+ as: T,
40
+ align: k = "start",
41
+ eyebrow: f,
42
+ ...y
43
+ }) {
44
+ const j = T ?? M[s], A = ["3xl", "2xl", "xl", "lg"].includes(s), u = x || p, v = t || h, l = k === "center", E = !!t && !l, n = (v || m || u) && /* @__PURE__ */ a("div", { className: i("flex shrink-0 items-center gap-2", l && "justify-center"), children: [
45
+ v && (t ? /* @__PURE__ */ e(
46
+ "a",
47
+ {
48
+ href: t,
49
+ className: "typo-label-lg text-[var(--Text-Accent-Primary)] whitespace-nowrap",
50
+ tabIndex: l ? void 0 : -1,
51
+ "aria-hidden": l ? void 0 : "true",
52
+ children: o
53
+ }
54
+ ) : /* @__PURE__ */ e(
55
+ "button",
56
+ {
57
+ type: "button",
58
+ onClick: h,
59
+ className: "typo-label-lg text-[var(--Text-Accent-Primary)] whitespace-nowrap",
60
+ children: o
61
+ }
62
+ )),
63
+ m,
64
+ u && /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
65
+ /* @__PURE__ */ e(
66
+ b,
67
+ {
68
+ variant: "ghost",
69
+ size: "icon-sm",
70
+ "aria-label": "前へ",
71
+ onClick: x,
72
+ disabled: w,
73
+ className: "rounded-full border border-[var(--Border-Medium-Emphasis)]",
74
+ children: /* @__PURE__ */ e(B, { size: 16 })
75
+ }
76
+ ),
77
+ /* @__PURE__ */ e(
78
+ b,
79
+ {
80
+ variant: "ghost",
81
+ size: "icon-sm",
82
+ "aria-label": "次へ",
83
+ onClick: p,
84
+ disabled: C,
85
+ className: "rounded-full border border-[var(--Border-Medium-Emphasis)]",
86
+ children: /* @__PURE__ */ e(L, { size: 16 })
87
+ }
88
+ )
89
+ ] })
90
+ ] }), r = /* @__PURE__ */ a(z, { children: [
91
+ /* @__PURE__ */ e(
92
+ j,
93
+ {
94
+ className: i(
95
+ "text-[var(--Text-High-Emphasis)]",
96
+ S[s],
97
+ g && F[g]
98
+ ),
99
+ children: N
100
+ }
101
+ ),
102
+ c && /* @__PURE__ */ e(
103
+ "p",
104
+ {
105
+ className: i(
106
+ "text-[var(--Text-High-Emphasis)]",
107
+ A ? "typo-body-lg" : "typo-body-md"
108
+ ),
109
+ children: c
110
+ }
111
+ )
112
+ ] });
113
+ return l ? /* @__PURE__ */ a(
114
+ "div",
115
+ {
116
+ "data-slot": "section-header",
117
+ "data-align": "center",
118
+ className: i(
119
+ "flex flex-col items-center gap-2 text-center [&>p]:mx-auto [&>p]:max-w-2xl",
120
+ d
121
+ ),
122
+ ...y,
123
+ children: [
124
+ f,
125
+ r,
126
+ n && /* @__PURE__ */ e("div", { className: "pt-1", children: n })
127
+ ]
128
+ }
129
+ ) : /* @__PURE__ */ a(
130
+ "div",
131
+ {
132
+ "data-slot": "section-header",
133
+ "data-align": "start",
134
+ className: i("flex flex-col gap-2", d),
135
+ ...y,
136
+ children: [
137
+ f,
138
+ /* @__PURE__ */ a("div", { className: "flex items-baseline justify-between gap-2 min-w-0", children: [
139
+ E ? /* @__PURE__ */ e("a", { href: t, className: "flex min-w-0 flex-1 flex-col gap-1", children: r }) : /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: r }),
140
+ n
141
+ ] })
142
+ ]
143
+ }
144
+ );
145
+ }
146
+ export {
147
+ D as SectionHeader
148
+ };
@@ -0,0 +1,85 @@
1
+ import { jsx as a, jsxs as h } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as t } from "../../lib/utils.js";
4
+ function m({
5
+ items: n,
6
+ activeKey: i,
7
+ orientation: p = "vertical",
8
+ ariaLabel: o = "ページ内セクション",
9
+ onItemClick: s,
10
+ className: c,
11
+ ...l
12
+ }) {
13
+ return p === "horizontal" ? /* @__PURE__ */ a(
14
+ "nav",
15
+ {
16
+ "data-slot": "section-nav",
17
+ "data-orientation": "horizontal",
18
+ className: t("w-full overflow-x-auto", c),
19
+ "aria-label": o,
20
+ ...l,
21
+ children: /* @__PURE__ */ a("ul", { className: "flex items-stretch gap-1 px-4", children: n.map((r) => {
22
+ const e = r.key === i;
23
+ return /* @__PURE__ */ a("li", { className: "shrink-0", children: /* @__PURE__ */ h(
24
+ "a",
25
+ {
26
+ href: r.href,
27
+ onClick: () => s?.(r.key),
28
+ className: t(
29
+ "flex items-center gap-2 border-b-2 px-3 py-3 typo-label-md whitespace-nowrap transition-colors cursor-pointer",
30
+ e ? "border-[var(--Brand-Cake-Orange)] text-[var(--Text-High-Emphasis)]" : "border-transparent text-[var(--Text-Low-Emphasis)] hover:text-[var(--Text-High-Emphasis)]"
31
+ ),
32
+ "aria-current": e ? "location" : void 0,
33
+ children: [
34
+ r.icon && /* @__PURE__ */ a(
35
+ "span",
36
+ {
37
+ className: e ? "text-[var(--Text-High-Emphasis)]" : "text-[var(--Object-High-Emphasis)]",
38
+ children: r.icon
39
+ }
40
+ ),
41
+ /* @__PURE__ */ a("span", { children: r.label })
42
+ ]
43
+ }
44
+ ) }, r.key);
45
+ }) })
46
+ }
47
+ ) : /* @__PURE__ */ a(
48
+ "nav",
49
+ {
50
+ "data-slot": "section-nav",
51
+ "data-orientation": "vertical",
52
+ className: t("w-full", c),
53
+ "aria-label": o,
54
+ ...l,
55
+ children: /* @__PURE__ */ a("ul", { className: "py-2", children: n.map((r) => {
56
+ const e = r.key === i;
57
+ return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ h(
58
+ "a",
59
+ {
60
+ href: r.href,
61
+ onClick: () => s?.(r.key),
62
+ className: t(
63
+ "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors cursor-pointer",
64
+ e ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "border-l-2 border-transparent text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Secondary)] hover:text-[var(--Text-High-Emphasis)]"
65
+ ),
66
+ "aria-current": e ? "location" : void 0,
67
+ children: [
68
+ r.icon && /* @__PURE__ */ a(
69
+ "span",
70
+ {
71
+ className: e ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Object-High-Emphasis)]",
72
+ children: r.icon
73
+ }
74
+ ),
75
+ /* @__PURE__ */ a("span", { className: "flex-1", children: r.label })
76
+ ]
77
+ }
78
+ ) }, r.key);
79
+ }) })
80
+ }
81
+ );
82
+ }
83
+ export {
84
+ m as SectionNav
85
+ };
@@ -0,0 +1,78 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cva as t } from "class-variance-authority";
4
+ import { cn as f } from "../../lib/utils.js";
5
+ const v = t("w-full", {
6
+ variants: {
7
+ // 縦 padding(上下)。値は SP / PC(md 以上)のペア。
8
+ spacing: {
9
+ sm: "py-[var(--Space-Section-xs)] md:py-[var(--Space-Section-sm)]",
10
+ // 32 / 40
11
+ md: "py-[var(--Space-Section-sm)] md:py-[var(--Space-Section-lg)]",
12
+ // 40 / 56
13
+ lg: "py-[var(--Space-Section-md)] md:py-[var(--Space-Section-xl)]",
14
+ // 48 / 64
15
+ xl: "py-[var(--Space-Section-xl)] md:py-[var(--Space-Section-2xl)]"
16
+ // 64 / 80
17
+ },
18
+ // 色地は配下 Card の既定サーフェスを白(Surface-Primary)に切り替える文脈も宣言する。
19
+ // dark では Surface-Secondary が「地の上に重ねる半透明白」なので、色地の上でも
20
+ // 一段明るく浮く(=沈まない)。ここで Surface-Primary(ほぼ不透明の黒)を強制すると
21
+ // 逆に地より暗い「穴」になり elevation が反転するため、dark は既定のまま据え置く。
22
+ // none は文脈を宣言しない(外側の色地 Section から継いだ文脈をリセットしない)。
23
+ background: {
24
+ none: "",
25
+ subtle: "bg-[var(--Surface-Tertiary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
26
+ "accent-subtle": "bg-[var(--Surface-Accent-Primary-Light)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ spacing: "md",
31
+ background: "none"
32
+ }
33
+ }), b = t("", {
34
+ variants: {
35
+ scrim: {
36
+ none: "",
37
+ dark: "relative isolate overflow-hidden bg-cover bg-center before:pointer-events-none before:absolute before:inset-0 before:z-0 before:bg-[var(--Surface-Overlay-Dark)] [&>*]:relative [&>*]:z-10",
38
+ light: "relative isolate overflow-hidden bg-cover bg-center before:pointer-events-none before:absolute before:inset-0 before:z-0 before:bg-[var(--Surface-Overlay-Light)] [&>*]:relative [&>*]:z-10",
39
+ "bottom-dark": "relative isolate overflow-hidden bg-cover bg-center before:pointer-events-none before:absolute before:inset-0 before:z-0 before:bg-[linear-gradient(to_top,var(--Surface-Overlay-Dark),transparent_75%)] [&>*]:relative [&>*]:z-10"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ scrim: "none"
44
+ }
45
+ });
46
+ function u({
47
+ className: n,
48
+ spacing: c,
49
+ background: e,
50
+ backgroundImage: r,
51
+ scrim: a,
52
+ style: o,
53
+ ...i
54
+ }) {
55
+ return /* @__PURE__ */ s(
56
+ "section",
57
+ {
58
+ "data-slot": "section",
59
+ "data-background": e ?? "none",
60
+ "data-scrim": a ?? "none",
61
+ className: f(
62
+ v({ spacing: c, background: e }),
63
+ b({ scrim: a }),
64
+ n
65
+ ),
66
+ style: {
67
+ ...o,
68
+ backgroundImage: r ? `url(${JSON.stringify(r)})` : o?.backgroundImage
69
+ },
70
+ ...i
71
+ }
72
+ );
73
+ }
74
+ export {
75
+ u as Section,
76
+ b as sectionScrimVariants,
77
+ v as sectionVariants
78
+ };
@@ -0,0 +1,102 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import g from "iconsax-reactjs/dist/esm/Link2.js";
4
+ import { cn as N } from "../../lib/utils.js";
5
+ import { Button as i } from "../foundations/button.js";
6
+ import { SocialIcon as c } from "../foundations/social-icon.js";
7
+ function L({
8
+ className: m,
9
+ url: r = "",
10
+ text: p = "",
11
+ copyLabel: d = "URLをコピー",
12
+ copiedLabel: u = "コピーしました",
13
+ copyErrorLabel: f = "コピーできませんでした",
14
+ onCopy: h,
15
+ ...y
16
+ }) {
17
+ const [s, l] = n.useState(
18
+ "idle"
19
+ ), t = n.useRef(null);
20
+ n.useEffect(() => () => {
21
+ t.current && clearTimeout(t.current);
22
+ }, []);
23
+ const b = async () => {
24
+ let a = "error";
25
+ try {
26
+ r && navigator.clipboard && (await navigator.clipboard.writeText(r), a = "success");
27
+ } catch {
28
+ a = "error";
29
+ }
30
+ l(a), h?.(a), t.current && clearTimeout(t.current), t.current = setTimeout(() => l("idle"), 2e3);
31
+ }, x = s === "success" ? u : s === "error" ? f : d;
32
+ return /* @__PURE__ */ o(
33
+ "div",
34
+ {
35
+ "data-slot": "share-buttons",
36
+ className: N("flex items-center gap-2", m),
37
+ ...y,
38
+ children: [
39
+ /* @__PURE__ */ e(
40
+ i,
41
+ {
42
+ variant: "tertiary",
43
+ size: "sm",
44
+ className: "flex-1 gap-1.5",
45
+ asChild: !0,
46
+ children: /* @__PURE__ */ o(
47
+ "a",
48
+ {
49
+ href: `https://social-plugins.line.me/lineit/share?url=${encodeURIComponent(r)}`,
50
+ target: "_blank",
51
+ rel: "noopener noreferrer",
52
+ "aria-label": "LINEでシェア",
53
+ children: [
54
+ /* @__PURE__ */ e(c, { platform: "line", size: 16 }),
55
+ /* @__PURE__ */ e("span", { className: "typo-body-sm", children: "LINE" })
56
+ ]
57
+ }
58
+ )
59
+ }
60
+ ),
61
+ /* @__PURE__ */ e(
62
+ i,
63
+ {
64
+ variant: "tertiary",
65
+ size: "sm",
66
+ className: "flex-1 gap-1.5",
67
+ asChild: !0,
68
+ children: /* @__PURE__ */ o(
69
+ "a",
70
+ {
71
+ href: `https://twitter.com/intent/tweet?url=${encodeURIComponent(r)}&text=${encodeURIComponent(p)}`,
72
+ target: "_blank",
73
+ rel: "noopener noreferrer",
74
+ "aria-label": "Xでシェア",
75
+ children: [
76
+ /* @__PURE__ */ e(c, { platform: "x", size: 14, tone: "mono" }),
77
+ /* @__PURE__ */ e("span", { className: "typo-body-sm", children: "X" })
78
+ ]
79
+ }
80
+ )
81
+ }
82
+ ),
83
+ /* @__PURE__ */ o(
84
+ i,
85
+ {
86
+ variant: "tertiary",
87
+ size: "sm",
88
+ className: "flex-1 gap-1.5",
89
+ onClick: b,
90
+ children: [
91
+ /* @__PURE__ */ e(g, { size: 14, "aria-hidden": "true" }),
92
+ /* @__PURE__ */ e("span", { className: "typo-body-sm", "aria-live": "polite", children: x })
93
+ ]
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }
100
+ export {
101
+ L as ShareButtons
102
+ };
@@ -0,0 +1,98 @@
1
+ import { jsx as n, jsxs as v } from "react/jsx-runtime";
2
+ import "react";
3
+ import x from "iconsax-reactjs/dist/esm/ArrowRight2.js";
4
+ import { cn as u } from "../../lib/utils.js";
5
+ import { Separator as b } from "../foundations/separator.js";
6
+ function g(r) {
7
+ const s = `/iframe.html?id=${encodeURIComponent(r)}&viewMode=story`;
8
+ window.location.href = s;
9
+ }
10
+ function f(r) {
11
+ return r.length > 1 ? r.replace(/\/+$/, "") : r;
12
+ }
13
+ function S(r, s) {
14
+ const { activeMenu: m, currentPath: h, activeMatch: o, isActive: p } = s, c = r.flatMap((t) => t.items);
15
+ if (p)
16
+ return new Set(c.filter(p).map((t) => t.key));
17
+ if (h != null) {
18
+ const t = f(h);
19
+ if (o === "prefix") {
20
+ let a, i = -1;
21
+ for (const l of c) {
22
+ const e = f(l.href);
23
+ (t === e || t.startsWith(e + "/")) && e.length > i && (a = l.key, i = e.length);
24
+ }
25
+ return new Set(a ? [a] : []);
26
+ }
27
+ return new Set(
28
+ c.filter((a) => f(a.href) === t).map((a) => a.key)
29
+ );
30
+ }
31
+ return new Set(m != null ? [m] : []);
32
+ }
33
+ function E({
34
+ activeMenu: r,
35
+ currentPath: s,
36
+ activeMatch: m = "exact",
37
+ isActive: h,
38
+ groups: o,
39
+ ariaLabel: p = "サイドメニュー",
40
+ className: c,
41
+ ...t
42
+ }) {
43
+ const a = S(o, {
44
+ activeMenu: r,
45
+ currentPath: s,
46
+ activeMatch: m,
47
+ isActive: h
48
+ });
49
+ return /* @__PURE__ */ n(
50
+ "nav",
51
+ {
52
+ "data-slot": "side-nav",
53
+ className: u(
54
+ "w-64 shrink-0 bg-[var(--Surface-Primary)] border-r border-[var(--Border-Low-Emphasis)]",
55
+ c
56
+ ),
57
+ "aria-label": p,
58
+ ...t,
59
+ children: /* @__PURE__ */ n("div", { className: "py-4", children: o.map((i, l) => /* @__PURE__ */ v("div", { className: "mb-1", children: [
60
+ i.groupLabel && /* @__PURE__ */ n("p", { className: "px-4 py-2 typo-label-xs text-[var(--Text-Low-Emphasis)] uppercase", children: i.groupLabel }),
61
+ /* @__PURE__ */ n("ul", { children: i.items.map((e) => {
62
+ const d = a.has(e.key);
63
+ return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ v(
64
+ "a",
65
+ {
66
+ href: e.href,
67
+ onClick: (y) => {
68
+ e.storyId && (y.preventDefault(), g(e.storyId));
69
+ },
70
+ className: u(
71
+ // hover はモーショントークン参照(prefers-reduced-motion で自動停止する)。
72
+ // 素の transition-colors は Tailwind 既定値でトークン制御が効かない(#201)
73
+ "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] cursor-pointer",
74
+ d ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "text-[var(--Text-High-Emphasis)] border-l-2 border-transparent"
75
+ ),
76
+ "aria-current": d ? "page" : void 0,
77
+ children: [
78
+ /* @__PURE__ */ n(
79
+ "span",
80
+ {
81
+ className: d ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Object-High-Emphasis)]",
82
+ children: e.icon
83
+ }
84
+ ),
85
+ /* @__PURE__ */ n("span", { className: "flex-1", children: e.label }),
86
+ /* @__PURE__ */ n(x, { size: 14, className: "text-[var(--Object-Low-Emphasis)]" })
87
+ ]
88
+ }
89
+ ) }, e.key);
90
+ }) }),
91
+ l < o.length - 1 && /* @__PURE__ */ n(b, { className: "my-2 mx-4" })
92
+ ] }, l)) })
93
+ }
94
+ );
95
+ }
96
+ export {
97
+ E as SideNav
98
+ };
@@ -0,0 +1,53 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as p } from "../../lib/utils.js";
4
+ import { Button as h } from "../foundations/button.js";
5
+ import { SocialIcon as v } from "../foundations/social-icon.js";
6
+ const o = {
7
+ line: "LINEでログイン",
8
+ amazon: "Amazonでログイン",
9
+ google: "Googleでログイン",
10
+ apple: "Appleでログイン"
11
+ }, s = {
12
+ line: "border-[var(--Third-Party-LINE)] bg-[var(--Third-Party-LINE)] text-[var(--Primitive-White-alpha-1000)]",
13
+ amazon: "border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] dark:border-[var(--Primitive-White-alpha-200)] dark:bg-[var(--Primitive-White-alpha-100)]",
14
+ google: "border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] dark:border-[var(--Primitive-White-alpha-200)] dark:bg-[var(--Primitive-White-alpha-100)]",
15
+ apple: "border-[var(--Primitive-Gray-alpha-900)] bg-[var(--Primitive-Gray-alpha-900)] text-[var(--Primitive-White-alpha-1000)] dark:border-[var(--Primitive-White-alpha-200)] dark:bg-[var(--Primitive-White-alpha-200)]"
16
+ }, d = {
17
+ line: "mono",
18
+ apple: "mono",
19
+ amazon: "brand",
20
+ google: "brand"
21
+ };
22
+ function u({
23
+ provider: a,
24
+ size: t = "default",
25
+ label: i,
26
+ className: l,
27
+ ...m
28
+ }) {
29
+ const r = t === "icon";
30
+ return /* @__PURE__ */ n(
31
+ h,
32
+ {
33
+ type: "button",
34
+ variant: "tertiary",
35
+ size: r ? "default" : "lg",
36
+ "aria-label": r ? i ?? o[a] : void 0,
37
+ className: p(
38
+ "border border-[var(--Border-Medium-Emphasis)] hover:opacity-90",
39
+ r ? "size-12 p-0" : "w-full gap-3",
40
+ s[a],
41
+ l
42
+ ),
43
+ ...m,
44
+ children: [
45
+ /* @__PURE__ */ e(v, { platform: a, size: 24, tone: d[a] }),
46
+ !r && /* @__PURE__ */ e("span", { children: i ?? o[a] })
47
+ ]
48
+ }
49
+ );
50
+ }
51
+ export {
52
+ u as SocialLoginButton
53
+ };
@@ -0,0 +1,34 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as n } from "../../lib/utils.js";
4
+ import { SkipLink as c } from "../foundations/skip-link.js";
5
+ function x({
6
+ header: i,
7
+ bottomTab: r,
8
+ footer: l,
9
+ children: t,
10
+ className: m,
11
+ mainId: a = "main-content",
12
+ skipLink: o
13
+ }) {
14
+ return /* @__PURE__ */ s(
15
+ "div",
16
+ {
17
+ "data-slot": "standard-page-shell",
18
+ className: n(
19
+ "@container flex min-h-dvh flex-col bg-[var(--Surface-Primary)]",
20
+ m
21
+ ),
22
+ children: [
23
+ o !== !1 && /* @__PURE__ */ e(c, { href: `#${a}` }),
24
+ i,
25
+ /* @__PURE__ */ e("main", { id: a, className: n("@container flex-1", r && "pb-20 @md:pb-0"), children: t }),
26
+ l,
27
+ r
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ x as StandardPageShell
34
+ };
@@ -0,0 +1,42 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { cn as f } from "../../lib/utils.js";
4
+ import { Chip as m } from "./chip.js";
5
+ function h({
6
+ items: c,
7
+ activeIndex: o = 0,
8
+ onSelect: n,
9
+ className: u
10
+ }) {
11
+ const [e, s] = r.useState(o);
12
+ r.useEffect(() => {
13
+ s(o);
14
+ }, [o]);
15
+ const i = (t) => {
16
+ s(t), n?.(t);
17
+ };
18
+ return /* @__PURE__ */ l(
19
+ "div",
20
+ {
21
+ "data-slot": "status-count-tabs",
22
+ className: f("flex gap-2 overflow-x-auto scrollbar-hide", u),
23
+ role: "tablist",
24
+ children: c.map((t, a) => /* @__PURE__ */ l(
25
+ m,
26
+ {
27
+ selected: e === a,
28
+ count: t.count,
29
+ size: "sm",
30
+ onClick: () => i(a),
31
+ role: "tab",
32
+ "aria-selected": e === a,
33
+ children: t.label
34
+ },
35
+ t.label
36
+ ))
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ h as StatusCountTabs
42
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as i } from "../../lib/utils.js";
4
+ function n({
5
+ className: r,
6
+ bordered: t = !0,
7
+ children: a,
8
+ ...o
9
+ }) {
10
+ return /* @__PURE__ */ e(
11
+ "div",
12
+ {
13
+ "data-slot": "sticky-action-bar",
14
+ className: i(
15
+ "sticky bottom-0 z-[var(--Z-Nav)] bg-[var(--Surface-Primary)] px-4 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))]",
16
+ t && "border-t border-[var(--Border-Low-Emphasis)]",
17
+ r
18
+ ),
19
+ ...o,
20
+ children: a
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ n as StickyActionBar
26
+ };