@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.
Files changed (181) hide show
  1. package/CHANGELOG.md +49 -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/ec/_mypage-menu-data.d.ts +3 -3
  142. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  143. package/dist/types/components/ec/anniversary-card.d.ts +1 -1
  144. package/dist/types/components/ec/mypage-shell.d.ts +3 -3
  145. package/dist/types/components/ec/product-card.d.ts +1 -1
  146. package/dist/types/components/ec/product-carousel.d.ts +3 -3
  147. package/dist/types/components/ec/stat-card.d.ts +1 -1
  148. package/dist/types/components/foundations/accordion.d.ts +8 -1
  149. package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
  150. package/dist/types/components/foundations/calendar.d.ts +1 -1
  151. package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
  152. package/dist/types/components/foundations/command.d.ts +1 -1
  153. package/dist/types/components/foundations/data-table.d.ts +6 -1
  154. package/dist/types/components/foundations/field.d.ts +2 -2
  155. package/dist/types/components/foundations/file-input.d.ts +1 -1
  156. package/dist/types/components/foundations/pagination.d.ts +1 -1
  157. package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
  158. package/dist/types/components/foundations/skip-link.d.ts +1 -1
  159. package/dist/types/components/foundations/slider.d.ts +13 -1
  160. package/dist/types/components/primitives/admin-header.d.ts +11 -1
  161. package/dist/types/components/primitives/admin-side-nav.d.ts +19 -1
  162. package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
  163. package/dist/types/components/primitives/category-scroll.d.ts +2 -2
  164. package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
  165. package/dist/types/components/primitives/chat-composer.d.ts +1 -1
  166. package/dist/types/components/primitives/chip.d.ts +1 -1
  167. package/dist/types/components/primitives/combobox.d.ts +9 -1
  168. package/dist/types/components/primitives/content-carousel.d.ts +1 -1
  169. package/dist/types/components/primitives/form-field.d.ts +1 -1
  170. package/dist/types/components/primitives/image-input.d.ts +1 -1
  171. package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
  172. package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
  173. package/dist/types/components/primitives/multi-select.d.ts +9 -1
  174. package/dist/types/components/primitives/notification-list.d.ts +1 -1
  175. package/dist/types/components/primitives/search-panel.d.ts +1 -1
  176. package/dist/types/components/primitives/section-nav.d.ts +1 -1
  177. package/dist/types/components/primitives/side-nav.d.ts +1 -1
  178. package/dist/types/components/primitives/social-login-button.d.ts +1 -1
  179. package/dist/types/lib/field-labelling.d.ts +66 -0
  180. package/package.json +2 -2
  181. package/scripts/codemod/README.md +9 -0
@@ -0,0 +1,190 @@
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
+ import "react";
3
+ import { CheckIcon as c, ChevronDownIcon as i, ChevronUpIcon as u } from "lucide-react";
4
+ import { Select as a } from "radix-ui";
5
+ import { cn as o } from "../../lib/utils.js";
6
+ import { FOCUS_RING as m } from "../../lib/focus-ring.js";
7
+ import { resolveFieldAria as p, useFieldLabelling as f } from "../../lib/field-labelling.js";
8
+ function z({
9
+ ...e
10
+ }) {
11
+ return /* @__PURE__ */ t(a.Root, { "data-slot": "select", ...e });
12
+ }
13
+ function B({
14
+ ...e
15
+ }) {
16
+ return /* @__PURE__ */ t(a.Group, { "data-slot": "select-group", ...e });
17
+ }
18
+ function I({
19
+ ...e
20
+ }) {
21
+ return /* @__PURE__ */ t(a.Value, { "data-slot": "select-value", ...e });
22
+ }
23
+ function C({
24
+ className: e,
25
+ size: r = "default",
26
+ children: s,
27
+ ...l
28
+ }) {
29
+ const n = p(l, f());
30
+ return /* @__PURE__ */ d(
31
+ a.Trigger,
32
+ {
33
+ "data-slot": "select-trigger",
34
+ "data-size": r,
35
+ className: o(
36
+ "flex w-full items-center justify-between gap-2 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-2 typo-body-md whitespace-nowrap transition-[color,box-shadow,border-color] outline-none hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Secondary)] disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)] aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
37
+ // フォーカス意匠は DS 共通(FOCUS_RING)。
38
+ m,
39
+ // 高さは「素のクラス」で当てる。data 属性セレクタ(data-[size=default]:h-10)だと
40
+ // 詳細度が高く、consumer の className="h-14" 等が効かず twMerge でも打ち消せないため。
41
+ // default=44px は Input / DatePicker trigger / Button(default) と一致させている
42
+ // (検索 + 絞り込みセレクト + ボタンの並置が定番)。
43
+ r === "sm" ? "h-9" : "h-11",
44
+ e
45
+ ),
46
+ ...l,
47
+ ...n,
48
+ children: [
49
+ s,
50
+ /* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(i, { className: "size-4 text-[var(--Text-High-Emphasis)]" }) })
51
+ ]
52
+ }
53
+ );
54
+ }
55
+ function _({
56
+ className: e,
57
+ children: r,
58
+ position: s = "item-aligned",
59
+ align: l = "center",
60
+ ...n
61
+ }) {
62
+ return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ d(
63
+ a.Content,
64
+ {
65
+ "data-slot": "select-content",
66
+ className: o(
67
+ "relative z-[var(--Z-Popover)] max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
68
+ s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
69
+ e
70
+ ),
71
+ position: s,
72
+ align: l,
73
+ ...n,
74
+ children: [
75
+ /* @__PURE__ */ t(g, {}),
76
+ /* @__PURE__ */ t(
77
+ a.Viewport,
78
+ {
79
+ className: o(
80
+ "p-1",
81
+ s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
82
+ ),
83
+ children: r
84
+ }
85
+ ),
86
+ /* @__PURE__ */ t(v, {})
87
+ ]
88
+ }
89
+ ) });
90
+ }
91
+ function j({
92
+ className: e,
93
+ ...r
94
+ }) {
95
+ return /* @__PURE__ */ t(
96
+ a.Label,
97
+ {
98
+ "data-slot": "select-label",
99
+ className: o("px-2 py-1.5 typo-body-sm text-muted-foreground", e),
100
+ ...r
101
+ }
102
+ );
103
+ }
104
+ function E({
105
+ className: e,
106
+ children: r,
107
+ ...s
108
+ }) {
109
+ return /* @__PURE__ */ d(
110
+ a.Item,
111
+ {
112
+ "data-slot": "select-item",
113
+ className: o(
114
+ "relative flex w-full cursor-default items-center gap-2 rounded-md py-2.5 pr-8 pl-3 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
115
+ e
116
+ ),
117
+ ...s,
118
+ children: [
119
+ /* @__PURE__ */ t(
120
+ "span",
121
+ {
122
+ "data-slot": "select-item-indicator",
123
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
124
+ children: /* @__PURE__ */ t(a.ItemIndicator, { children: /* @__PURE__ */ t(c, { className: "size-4" }) })
125
+ }
126
+ ),
127
+ /* @__PURE__ */ t(a.ItemText, { children: r })
128
+ ]
129
+ }
130
+ );
131
+ }
132
+ function T({
133
+ className: e,
134
+ ...r
135
+ }) {
136
+ return /* @__PURE__ */ t(
137
+ a.Separator,
138
+ {
139
+ "data-slot": "select-separator",
140
+ className: o("pointer-events-none -mx-1 my-1 h-px bg-border", e),
141
+ ...r
142
+ }
143
+ );
144
+ }
145
+ function g({
146
+ className: e,
147
+ ...r
148
+ }) {
149
+ return /* @__PURE__ */ t(
150
+ a.ScrollUpButton,
151
+ {
152
+ "data-slot": "select-scroll-up-button",
153
+ className: o(
154
+ "flex cursor-default items-center justify-center py-1",
155
+ e
156
+ ),
157
+ ...r,
158
+ children: /* @__PURE__ */ t(u, { className: "size-4" })
159
+ }
160
+ );
161
+ }
162
+ function v({
163
+ className: e,
164
+ ...r
165
+ }) {
166
+ return /* @__PURE__ */ t(
167
+ a.ScrollDownButton,
168
+ {
169
+ "data-slot": "select-scroll-down-button",
170
+ className: o(
171
+ "flex cursor-default items-center justify-center py-1",
172
+ e
173
+ ),
174
+ ...r,
175
+ children: /* @__PURE__ */ t(i, { className: "size-4" })
176
+ }
177
+ );
178
+ }
179
+ export {
180
+ z as Select,
181
+ _ as SelectContent,
182
+ B as SelectGroup,
183
+ E as SelectItem,
184
+ j as SelectLabel,
185
+ v as SelectScrollDownButton,
186
+ g as SelectScrollUpButton,
187
+ T as SelectSeparator,
188
+ C as SelectTrigger,
189
+ I as SelectValue
190
+ };
@@ -0,0 +1,27 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Separator as n } from "radix-ui";
4
+ import { cn as e } from "../../lib/utils.js";
5
+ function d({
6
+ className: t,
7
+ orientation: o = "horizontal",
8
+ decorative: r = !0,
9
+ ...a
10
+ }) {
11
+ return /* @__PURE__ */ i(
12
+ n.Root,
13
+ {
14
+ "data-slot": "separator",
15
+ decorative: r,
16
+ orientation: o,
17
+ className: e(
18
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
+ t
20
+ ),
21
+ ...a
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ d as Separator
27
+ };
@@ -0,0 +1,130 @@
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import "react";
3
+ import { XIcon as u } from "lucide-react";
4
+ import { Dialog as a } from "radix-ui";
5
+ import { cn as r } from "../../lib/utils.js";
6
+ function x({ ...t }) {
7
+ return /* @__PURE__ */ e(a.Root, { "data-slot": "sheet", ...t });
8
+ }
9
+ function b({
10
+ ...t
11
+ }) {
12
+ return /* @__PURE__ */ e(a.Trigger, { "data-slot": "sheet-trigger", ...t });
13
+ }
14
+ function y({
15
+ ...t
16
+ }) {
17
+ return /* @__PURE__ */ e(a.Close, { "data-slot": "sheet-close", ...t });
18
+ }
19
+ function c({
20
+ ...t
21
+ }) {
22
+ return /* @__PURE__ */ e(a.Portal, { "data-slot": "sheet-portal", ...t });
23
+ }
24
+ function f({
25
+ className: t,
26
+ ...o
27
+ }) {
28
+ return /* @__PURE__ */ e(
29
+ a.Overlay,
30
+ {
31
+ "data-slot": "sheet-overlay",
32
+ className: r(
33
+ "fixed inset-0 z-[var(--Z-Overlay)] bg-[var(--Overlay-Medium)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
34
+ t
35
+ ),
36
+ ...o
37
+ }
38
+ );
39
+ }
40
+ function S({
41
+ className: t,
42
+ children: o,
43
+ side: s = "right",
44
+ showCloseButton: l = !0,
45
+ ...d
46
+ }) {
47
+ return /* @__PURE__ */ i(c, { children: [
48
+ /* @__PURE__ */ e(f, {}),
49
+ /* @__PURE__ */ i(
50
+ a.Content,
51
+ {
52
+ "data-slot": "sheet-content",
53
+ onOpenAutoFocus: (n) => n.preventDefault(),
54
+ onCloseAutoFocus: (n) => n.preventDefault(),
55
+ className: r(
56
+ "fixed z-[var(--Z-Modal)] flex flex-col gap-4 border-[var(--Border-Medium-Emphasis)] bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-[var(--Motion-Duration-Slow)] data-[state=open]:animate-in data-[state=open]:duration-[var(--Motion-Duration-Slower)]",
57
+ s === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
58
+ s === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
59
+ s === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
60
+ s === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
61
+ t
62
+ ),
63
+ ...d,
64
+ children: [
65
+ o,
66
+ l && /* @__PURE__ */ i(a.Close, { className: "absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)] focus:outline-hidden disabled:pointer-events-none", children: [
67
+ /* @__PURE__ */ e(u, { className: "size-5" }),
68
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "閉じる" })
69
+ ] })
70
+ ]
71
+ }
72
+ )
73
+ ] });
74
+ }
75
+ function N({ className: t, ...o }) {
76
+ return /* @__PURE__ */ e(
77
+ "div",
78
+ {
79
+ "data-slot": "sheet-header",
80
+ className: r("flex flex-col gap-1.5 p-4", t),
81
+ ...o
82
+ }
83
+ );
84
+ }
85
+ function w({ className: t, ...o }) {
86
+ return /* @__PURE__ */ e(
87
+ "div",
88
+ {
89
+ "data-slot": "sheet-footer",
90
+ className: r("mt-auto flex flex-col gap-2 p-4", t),
91
+ ...o
92
+ }
93
+ );
94
+ }
95
+ function D({
96
+ className: t,
97
+ ...o
98
+ }) {
99
+ return /* @__PURE__ */ e(
100
+ a.Title,
101
+ {
102
+ "data-slot": "sheet-title",
103
+ className: r("typo-heading-lg text-foreground", t),
104
+ ...o
105
+ }
106
+ );
107
+ }
108
+ function T({
109
+ className: t,
110
+ ...o
111
+ }) {
112
+ return /* @__PURE__ */ e(
113
+ a.Description,
114
+ {
115
+ "data-slot": "sheet-description",
116
+ className: r("typo-body-sm text-muted-foreground", t),
117
+ ...o
118
+ }
119
+ );
120
+ }
121
+ export {
122
+ x as Sheet,
123
+ y as SheetClose,
124
+ S as SheetContent,
125
+ T as SheetDescription,
126
+ w as SheetFooter,
127
+ N as SheetHeader,
128
+ D as SheetTitle,
129
+ b as SheetTrigger
130
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { cn as o } from "../../lib/utils.js";
3
+ function m({ className: e, ...r }) {
4
+ return /* @__PURE__ */ t(
5
+ "div",
6
+ {
7
+ "data-slot": "skeleton",
8
+ className: o("animate-pulse rounded-md bg-[var(--Surface-Tertiary)]", e),
9
+ ...r
10
+ }
11
+ );
12
+ }
13
+ export {
14
+ m as Skeleton
15
+ };
@@ -0,0 +1,27 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as i } from "../../lib/utils.js";
4
+ function a({ href: o = "#main-content", label: s = "コンテンツへ移動", className: c, ...r }) {
5
+ return /* @__PURE__ */ u(
6
+ "a",
7
+ {
8
+ "data-slot": "skip-link",
9
+ href: o,
10
+ className: i(
11
+ // 通常は視覚的に隠す(読み上げ・タブ順には残す)。フォーカス時のみ左上に可視化。
12
+ "sr-only",
13
+ "focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-[var(--Z-SkipLink)] focus:px-4 focus:py-2",
14
+ "focus:rounded-md focus:shadow-md focus:outline-none",
15
+ "focus:bg-[var(--Surface-Primary)] focus:text-[var(--Text-High-Emphasis)]",
16
+ "focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)]",
17
+ "typo-label-md",
18
+ c
19
+ ),
20
+ ...r,
21
+ children: s
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ a as SkipLink
27
+ };
@@ -0,0 +1,81 @@
1
+ import { jsxs as y, jsx as s } from "react/jsx-runtime";
2
+ import * as p from "react";
3
+ import { Slider as i } from "radix-ui";
4
+ import { cn as o } from "../../lib/utils.js";
5
+ import { FOCUS_RING as w } from "../../lib/focus-ring.js";
6
+ import { useFieldLabelling as k } from "../../lib/field-labelling.js";
7
+ function O({
8
+ className: b,
9
+ defaultValue: t,
10
+ value: e,
11
+ min: l = 0,
12
+ max: n = 100,
13
+ thumbLabels: d,
14
+ "aria-label": c,
15
+ "aria-labelledby": f,
16
+ ...u
17
+ }) {
18
+ const h = k(), m = p.useMemo(
19
+ () => Array.isArray(e) ? e : Array.isArray(t) ? t : [l, n],
20
+ [e, t, l, n]
21
+ ), v = (r, a) => {
22
+ if (d?.[r]) return { "aria-label": d[r] };
23
+ if (c) {
24
+ const g = a === 1 ? "" : r === 0 ? "(下限)" : r === a - 1 ? "(上限)" : `(${r + 1}つ目)`;
25
+ return { "aria-label": `${c}${g}` };
26
+ }
27
+ return f ? { "aria-labelledby": f } : h ? { "aria-labelledby": h.labelId } : {};
28
+ };
29
+ return /* @__PURE__ */ y(
30
+ i.Root,
31
+ {
32
+ "data-slot": "slider",
33
+ defaultValue: t,
34
+ value: e,
35
+ min: l,
36
+ max: n,
37
+ className: o(
38
+ "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
39
+ b
40
+ ),
41
+ ...u,
42
+ children: [
43
+ /* @__PURE__ */ s(
44
+ i.Track,
45
+ {
46
+ "data-slot": "slider-track",
47
+ className: o(
48
+ "relative grow overflow-hidden rounded-full bg-[var(--Surface-Tertiary)] data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
49
+ ),
50
+ children: /* @__PURE__ */ s(
51
+ i.Range,
52
+ {
53
+ "data-slot": "slider-range",
54
+ className: o(
55
+ "absolute bg-[var(--Brand-Cake-Orange)] data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
56
+ )
57
+ }
58
+ )
59
+ }
60
+ ),
61
+ Array.from({ length: m.length }, (r, a) => /* @__PURE__ */ s(
62
+ i.Thumb,
63
+ {
64
+ "data-slot": "slider-thumb",
65
+ ...v(a, m.length),
66
+ className: o(
67
+ "block size-5 shrink-0 rounded-full border-2 border-[var(--Brand-Cake-Orange)] bg-[var(--Surface-Primary)] shadow-sm ring-[var(--Brand-Cake-Orange)]/20 transition-[color,box-shadow,transform] hover:ring-4 hover:scale-125 focus-visible:outline-hidden active:scale-110 active:ring-6 active:shadow-md disabled:pointer-events-none disabled:opacity-50",
68
+ // hover もリングを出すため、フォーカスは DS 共通の緑リング(FOCUS_RING)
69
+ // で区別できるようにする(以前は hover と同じオレンジ ring-4 だった)。
70
+ w
71
+ )
72
+ },
73
+ a
74
+ ))
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ export {
80
+ O as Slider
81
+ };
@@ -0,0 +1,36 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as v } from "../../lib/utils.js";
4
+ const s = {
5
+ line: "var(--Third-Party-LINE)",
6
+ x: "var(--Third-Party-X)",
7
+ facebook: "var(--Third-Party-Facebook)",
8
+ apple: "var(--Third-Party-Apple)"
9
+ }, d = {
10
+ line: "M12 2C6.48 2 2 5.81 2 10.4c0 4.17 3.74 7.65 8.78 8.3.34.07.8.22.92.5.1.26.07.67.03.93l-.15.86c-.04.25-.2.98.87.54s5.8-3.41 7.91-5.84C22.14 13.65 22 11.14 22 10.4 22 5.81 17.52 2 12 2zm-3.18 11.1H6.57a.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v3.68h1.75a.5.5 0 01.5.5.5.5 0 01-.5.5zm1.67-.5a.5.5 0 01-.5.5.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v4.18zm4.63 0a.5.5 0 01-.4.49.5.5 0 01-.13.01.5.5 0 01-.4-.21l-2.39-3.24v2.95a.5.5 0 01-.5.5.5.5 0 01-.5-.5V8.42a.5.5 0 01.4-.49h.1a.5.5 0 01.4.21l2.39 3.24V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v4.18h-.47zm2.7-2.6a.5.5 0 01.5.5.5.5 0 01-.5.5h-1.75v1.1h1.75a.5.5 0 01.5.5.5.5 0 01-.5.5H16.1a.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5h2.25a.5.5 0 01.5.5.5.5 0 01-.5.5h-1.75v1.08h1.75z",
11
+ x: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",
12
+ facebook: "M22 12a10 10 0 1 0-11.56 9.88v-6.99H7.9V12h2.54V9.8c0-2.5 1.49-3.89 3.77-3.89 1.09 0 2.23.2 2.23.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56V12h2.77l-.44 2.89h-2.33v6.99A10 10 0 0 0 22 12",
13
+ apple: "M16.5 12.8c0-2.2 1.8-3.2 1.9-3.3-1-1.5-2.6-1.7-3.2-1.7-1.3-.1-2.6.8-3.3.8s-1.7-.8-2.8-.8c-1.5 0-2.8.8-3.6 2.2-1.5 2.6-.4 6.5 1.1 8.7.7 1 1.6 2.2 2.7 2.2s1.5-.7 2.8-.7 1.7.7 2.8.7c1.2 0 1.9-1.1 2.6-2.1.8-1.2 1.2-2.4 1.2-2.5 0 0-2.2-.9-2.2-3.5M14.3 6.4c.6-.7 1-1.7.9-2.8-.9 0-1.9.6-2.5 1.3-.6.6-1 1.7-.9 2.7 1 .1 1.9-.5 2.5-1.2"
14
+ };
15
+ function p({ platform: a, size: c = 24, tone: h = "brand", className: t, style: e, ...i }) {
16
+ const l = h === "mono", o = {
17
+ viewBox: "0 0 24 24",
18
+ "aria-hidden": !0,
19
+ className: v("shrink-0", t),
20
+ style: { width: c, height: c, ...e },
21
+ ...i
22
+ };
23
+ return a === "google" ? /* @__PURE__ */ n("svg", { ...o, fill: "none", children: [
24
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#4285F4", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" }),
25
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#34A853", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }),
26
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }),
27
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })
28
+ ] }) : a === "amazon" ? /* @__PURE__ */ n("svg", { ...o, fill: "none", children: [
29
+ /* @__PURE__ */ r("path", { transform: "translate(-2.4 0) scale(1.2 1)", fill: "currentColor", d: "M13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705a.66.66 0 0 1-.753.077c-1.06-.878-1.25-1.287-1.829-2.126-1.748 1.783-2.988 2.317-5.253 2.317-2.682 0-4.77-1.656-4.77-4.967 0-2.586 1.402-4.347 3.395-5.206 1.728-.762 4.14-.897 5.983-1.107v-.414c0-.762.058-1.664-.39-2.322-.387-.586-1.13-.83-1.788-.83-1.214 0-2.296.623-2.56 1.914-.054.293-.264.58-.553.595l-3.094-.333a.577.577 0 0 1-.481-.675C5.765 1.677 9.16.578 12.232.578c1.553 0 3.583.414 4.808 1.59 1.553 1.44 1.406 3.362 1.406 5.456v4.94c0 1.484.616 2.136 1.195 2.937.203.284.248.624-.01.835l-2.488 2.14v.32z" }),
30
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FF9900", d: "M21.397 19.78c-2.768 2.04-6.783 3.13-10.238 3.13-4.84 0-9.198-1.79-12.496-4.764-.259-.234-.029-.553.283-.371 3.558 2.068 7.957 3.316 12.504 3.316 3.067 0 6.44-.636 9.543-1.952.467-.2.862.307.404.641z" }),
31
+ /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FF9900", d: "M22.338 18.549c-.363-.464-2.397-.22-3.31-.111-.279.033-.321-.207-.071-.381 1.622-1.14 4.282-.811 4.593-.429.312.387-.082 3.07-1.605 4.352-.234.196-.457.091-.354-.169.343-.855 1.11-2.8.747-3.262z" })
32
+ ] }) : /* @__PURE__ */ r("svg", { ...o, fill: l ? "currentColor" : s[a], children: /* @__PURE__ */ r("path", { d: d[a] }) });
33
+ }
34
+ export {
35
+ p as SocialIcon
36
+ };
@@ -0,0 +1,49 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Loader2Icon as t, OctagonXIcon as i, TriangleAlertIcon as o, InfoIcon as s, CircleCheckIcon as v } from "lucide-react";
3
+ import { useTheme as n } from "next-themes";
4
+ import { Toaster as c } from "sonner";
5
+ const g = ({ ...a }) => {
6
+ const { theme: e = "system" } = n();
7
+ return /* @__PURE__ */ r(
8
+ c,
9
+ {
10
+ theme: e,
11
+ className: "toaster group",
12
+ icons: {
13
+ success: /* @__PURE__ */ r(v, { className: "size-4 text-[var(--Text-Success)]" }),
14
+ info: /* @__PURE__ */ r(s, { className: "size-4 text-[var(--Primitive-Sea-600)]" }),
15
+ warning: /* @__PURE__ */ r(o, { className: "size-4 text-[var(--Text-Warning)]" }),
16
+ error: /* @__PURE__ */ r(i, { className: "size-4 text-[var(--Primitive-Sun-800)]" }),
17
+ loading: /* @__PURE__ */ r(t, { className: "size-4 animate-spin text-[var(--Text-Medium-Emphasis)]" })
18
+ },
19
+ toastOptions: {
20
+ classNames: {
21
+ toast: "!mx-auto",
22
+ description: "!text-[var(--Text-Medium-Emphasis)]",
23
+ actionButton: "!bg-[var(--Brand-Cake-Orange)] !text-[var(--Text-on-Inverse)] !typo-label-sm !rounded-lg !px-4 !py-2 !h-8 hover:!bg-[var(--Hover-Primary-Button)]",
24
+ cancelButton: "!bg-[var(--Surface-Tertiary)] !text-[var(--Text-High-Emphasis)] !typo-label-sm !rounded-lg !px-4 !py-2 !h-8",
25
+ // 状態トースト(success/error/warning/info)は背景を primitive の明色で固定しているため、
26
+ // 中の description / cancel もモード反転しない primitive に固定する。
27
+ // semantic(Text-Medium-Emphasis 等)のままだとダークモードで白系に反転し、
28
+ // 明色背景の上で文字が不可視になる(デフォルトトーストは背景が反転するので semantic のままで正しい)
29
+ success: "!bg-[var(--Primitive-Forest-50)] !border-[var(--Primitive-Forest-200)] !text-[var(--Text-Success)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
30
+ error: "!bg-[var(--Surface-Caution-Light)] !border-[var(--Border-Caution)] !text-[var(--Primitive-Sun-800)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
31
+ warning: "!bg-[var(--Surface-Warning)] !border-[var(--Primitive-Wood-200)] !text-[var(--Text-Warning)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
32
+ info: "!bg-[var(--Primitive-Sea-50)] !border-[var(--Primitive-Sea-200)] !text-[var(--Primitive-Sea-600)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]"
33
+ }
34
+ },
35
+ style: {
36
+ "--normal-bg": "var(--popover)",
37
+ "--normal-text": "var(--popover-foreground)",
38
+ "--normal-border": "var(--border)",
39
+ "--border-radius": "var(--radius)"
40
+ },
41
+ position: "bottom-center",
42
+ containerAriaLabel: "通知",
43
+ ...a
44
+ }
45
+ );
46
+ };
47
+ export {
48
+ g as Toaster
49
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as i } from "../../lib/utils.js";
4
+ function m({ className: e, size: s = "md", ...a }) {
5
+ return /* @__PURE__ */ r(
6
+ "div",
7
+ {
8
+ "data-slot": "spinner",
9
+ role: "status",
10
+ "aria-label": "読み込み中",
11
+ className: i(
12
+ // shrink-0 必須: 「読み込み中…」テキストと横並びにされるため、既定の flex-shrink:1 だと円が楕円に潰れる
13
+ "shrink-0 animate-spin rounded-full border-[var(--Border-Medium-Emphasis)] border-t-[var(--Brand-Cake-Orange)]",
14
+ {
15
+ sm: "size-4 border-2",
16
+ md: "size-8 border-[3px]",
17
+ lg: "size-12 border-4"
18
+ }[s],
19
+ e
20
+ ),
21
+ ...a,
22
+ children: /* @__PURE__ */ r("span", { className: "sr-only", children: "読み込み中" })
23
+ }
24
+ );
25
+ }
26
+ export {
27
+ m as Spinner
28
+ };
@@ -0,0 +1,54 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Switch as s } from "radix-ui";
4
+ import { Check as n } from "lucide-react";
5
+ import { cn as a } from "../../lib/utils.js";
6
+ import { resolveFieldAria as d, useFieldLabelling as u } from "../../lib/field-labelling.js";
7
+ function k({
8
+ className: o,
9
+ size: r = "default",
10
+ ...i
11
+ }) {
12
+ const t = r === "default", c = d(i, u());
13
+ return /* @__PURE__ */ e(
14
+ s.Root,
15
+ {
16
+ "data-slot": "switch",
17
+ "data-size": r,
18
+ className: a(
19
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 transition-colors duration-[var(--Motion-Duration-Base)] outline-none",
20
+ "focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50",
21
+ "disabled:cursor-not-allowed disabled:opacity-50",
22
+ "data-[state=checked]:border-[var(--Object-Accent-Primary)] data-[state=checked]:bg-[var(--Object-Accent-Primary)]",
23
+ "data-[state=unchecked]:border-[var(--Object-Low-Emphasis)] data-[state=unchecked]:bg-[var(--Object-Low-Emphasis)]",
24
+ "dark:data-[state=unchecked]:border-[var(--Object-Medium-Emphasis)] dark:data-[state=unchecked]:bg-[var(--Object-Medium-Emphasis)]",
25
+ t ? "h-8 w-[52px]" : "h-6 w-10",
26
+ o
27
+ ),
28
+ ...i,
29
+ ...c,
30
+ children: /* @__PURE__ */ e(
31
+ s.Thumb,
32
+ {
33
+ "data-slot": "switch-thumb",
34
+ className: a(
35
+ "group/thumb pointer-events-none flex items-center justify-center rounded-full bg-[var(--Surface-Primary)] shadow-sm transition-transform duration-[var(--Motion-Duration-Base)]",
36
+ t ? "size-6 data-[state=unchecked]:translate-x-[1px] data-[state=checked]:translate-x-[22px]" : "size-[18px] data-[state=unchecked]:translate-x-[1px] data-[state=checked]:translate-x-[18px]"
37
+ ),
38
+ children: /* @__PURE__ */ e(
39
+ n,
40
+ {
41
+ className: a(
42
+ "text-[var(--Object-Accent-Primary)] opacity-0 transition-opacity duration-[var(--Motion-Duration-Fast)] group-data-[state=checked]/thumb:opacity-100",
43
+ t ? "size-3.5 stroke-[3]" : "size-2.5 stroke-[3]"
44
+ )
45
+ }
46
+ )
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ k as Switch
54
+ };