@cakejp/design-system 0.15.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 (186) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/CLAUDE.md +1 -0
  3. package/bin/init.js +29 -6
  4. package/contracts/components.json +45 -8
  5. package/contracts/composition.json +8 -2
  6. package/contracts/rules.json +14 -2
  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 -13082
  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/index.d.ts +1 -0
  180. package/dist/types/lib/field-labelling.d.ts +66 -0
  181. package/dist/types/lib/focus-ring.d.ts +42 -0
  182. package/package.json +2 -2
  183. package/scripts/codemod/README.md +9 -0
  184. package/src/components/COMPONENT_LOOKUP.md +1 -1
  185. package/src/preset-standalone.css +15 -0
  186. package/src/preset.css +15 -1
@@ -0,0 +1,171 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cva as u } from "class-variance-authority";
4
+ import { ChevronDownIcon as s } from "lucide-react";
5
+ import { NavigationMenu as n } from "radix-ui";
6
+ import { cn as o } from "../../lib/utils.js";
7
+ function b({
8
+ className: t,
9
+ children: a,
10
+ viewport: i = !0,
11
+ ...d
12
+ }) {
13
+ return /* @__PURE__ */ r(
14
+ n.Root,
15
+ {
16
+ "data-slot": "navigation-menu",
17
+ "data-viewport": i,
18
+ className: o(
19
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
20
+ t
21
+ ),
22
+ ...d,
23
+ children: [
24
+ a,
25
+ i && /* @__PURE__ */ e(g, {})
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ function x({
31
+ className: t,
32
+ ...a
33
+ }) {
34
+ return /* @__PURE__ */ e(
35
+ n.List,
36
+ {
37
+ "data-slot": "navigation-menu-list",
38
+ className: o(
39
+ "group flex flex-1 list-none items-center justify-center gap-1",
40
+ t
41
+ ),
42
+ ...a
43
+ }
44
+ );
45
+ }
46
+ function h({
47
+ className: t,
48
+ ...a
49
+ }) {
50
+ return /* @__PURE__ */ e(
51
+ n.Item,
52
+ {
53
+ "data-slot": "navigation-menu-item",
54
+ className: o("relative", t),
55
+ ...a
56
+ }
57
+ );
58
+ }
59
+ const l = u(
60
+ "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 typo-label-md text-foreground transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
61
+ );
62
+ function N({
63
+ className: t,
64
+ children: a,
65
+ ...i
66
+ }) {
67
+ return /* @__PURE__ */ r(
68
+ n.Trigger,
69
+ {
70
+ "data-slot": "navigation-menu-trigger",
71
+ className: o(l(), "group", t),
72
+ ...i,
73
+ children: [
74
+ a,
75
+ " ",
76
+ /* @__PURE__ */ e(
77
+ s,
78
+ {
79
+ className: "relative top-[1px] ml-1 size-3 transition duration-[var(--Motion-Duration-Slow)] group-data-[state=open]:rotate-180",
80
+ "aria-hidden": "true"
81
+ }
82
+ )
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ function M({
88
+ className: t,
89
+ ...a
90
+ }) {
91
+ return /* @__PURE__ */ e(
92
+ n.Content,
93
+ {
94
+ "data-slot": "navigation-menu-content",
95
+ className: o(
96
+ "top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto",
97
+ "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-[var(--Border-Medium-Emphasis)] group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-[var(--Motion-Duration-Base)] **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",
98
+ t
99
+ ),
100
+ ...a
101
+ }
102
+ );
103
+ }
104
+ function g({
105
+ className: t,
106
+ ...a
107
+ }) {
108
+ return /* @__PURE__ */ e(
109
+ "div",
110
+ {
111
+ className: o(
112
+ "absolute top-full left-0 isolate z-[var(--Z-Popover)] flex justify-center"
113
+ ),
114
+ children: /* @__PURE__ */ e(
115
+ n.Viewport,
116
+ {
117
+ "data-slot": "navigation-menu-viewport",
118
+ className: o(
119
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
120
+ t
121
+ ),
122
+ ...a
123
+ }
124
+ )
125
+ }
126
+ );
127
+ }
128
+ function y({
129
+ className: t,
130
+ ...a
131
+ }) {
132
+ return /* @__PURE__ */ e(
133
+ n.Link,
134
+ {
135
+ "data-slot": "navigation-menu-link",
136
+ className: o(
137
+ "flex flex-col gap-1 rounded-sm p-2 typo-body-md transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
138
+ t
139
+ ),
140
+ ...a
141
+ }
142
+ );
143
+ }
144
+ function z({
145
+ className: t,
146
+ ...a
147
+ }) {
148
+ return /* @__PURE__ */ e(
149
+ n.Indicator,
150
+ {
151
+ "data-slot": "navigation-menu-indicator",
152
+ className: o(
153
+ "top-full z-[var(--Z-Local-1)] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
154
+ t
155
+ ),
156
+ ...a,
157
+ children: /* @__PURE__ */ e("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
158
+ }
159
+ );
160
+ }
161
+ export {
162
+ b as NavigationMenu,
163
+ M as NavigationMenuContent,
164
+ z as NavigationMenuIndicator,
165
+ h as NavigationMenuItem,
166
+ y as NavigationMenuLink,
167
+ x as NavigationMenuList,
168
+ N as NavigationMenuTrigger,
169
+ g as NavigationMenuViewport,
170
+ l as navigationMenuTriggerStyle
171
+ };
@@ -0,0 +1,120 @@
1
+ import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { MoreHorizontalIcon as l, ChevronRightIcon as c, ChevronLeftIcon as m } from "lucide-react";
4
+ import { cn as t } from "../../lib/utils.js";
5
+ import { buttonVariants as p } from "./button.js";
6
+ function x({ className: a, ...n }) {
7
+ return /* @__PURE__ */ i(
8
+ "nav",
9
+ {
10
+ role: "navigation",
11
+ "aria-label": "pagination",
12
+ "data-slot": "pagination",
13
+ className: t("mx-auto flex w-full justify-center", a),
14
+ ...n
15
+ }
16
+ );
17
+ }
18
+ function N({
19
+ className: a,
20
+ ...n
21
+ }) {
22
+ return /* @__PURE__ */ i(
23
+ "ul",
24
+ {
25
+ "data-slot": "pagination-content",
26
+ className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", a),
27
+ ...n
28
+ }
29
+ );
30
+ }
31
+ function P({ ...a }) {
32
+ return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
33
+ }
34
+ function o({
35
+ className: a,
36
+ isActive: n,
37
+ size: r = "icon",
38
+ ...s
39
+ }) {
40
+ return /* @__PURE__ */ i(
41
+ "a",
42
+ {
43
+ "aria-current": n ? "page" : void 0,
44
+ "data-slot": "pagination-link",
45
+ "data-active": n,
46
+ className: t(
47
+ p({
48
+ variant: n ? "secondary" : "ghost",
49
+ size: r
50
+ }),
51
+ "min-h-9 min-w-9 sm:min-h-10 sm:min-w-10",
52
+ a
53
+ ),
54
+ ...s
55
+ }
56
+ );
57
+ }
58
+ function b({
59
+ className: a,
60
+ ...n
61
+ }) {
62
+ return /* @__PURE__ */ e(
63
+ o,
64
+ {
65
+ "aria-label": "前のページへ",
66
+ size: "default",
67
+ className: t("gap-1 px-2.5 sm:pl-2.5", a),
68
+ ...n,
69
+ children: [
70
+ /* @__PURE__ */ i(m, {}),
71
+ /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "前へ" })
72
+ ]
73
+ }
74
+ );
75
+ }
76
+ function v({
77
+ className: a,
78
+ ...n
79
+ }) {
80
+ return /* @__PURE__ */ e(
81
+ o,
82
+ {
83
+ "aria-label": "次のページへ",
84
+ size: "default",
85
+ className: t("gap-1 px-2.5 sm:pr-2.5", a),
86
+ ...n,
87
+ children: [
88
+ /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "次へ" }),
89
+ /* @__PURE__ */ i(c, {})
90
+ ]
91
+ }
92
+ );
93
+ }
94
+ function j({
95
+ className: a,
96
+ ...n
97
+ }) {
98
+ return /* @__PURE__ */ e(
99
+ "span",
100
+ {
101
+ "aria-hidden": !0,
102
+ "data-slot": "pagination-ellipsis",
103
+ className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", a),
104
+ ...n,
105
+ children: [
106
+ /* @__PURE__ */ i(l, { className: "size-4" }),
107
+ /* @__PURE__ */ i("span", { className: "sr-only", children: "その他のページ" })
108
+ ]
109
+ }
110
+ );
111
+ }
112
+ export {
113
+ x as Pagination,
114
+ N as PaginationContent,
115
+ j as PaginationEllipsis,
116
+ P as PaginationItem,
117
+ o as PaginationLink,
118
+ v as PaginationNext,
119
+ b as PaginationPrevious
120
+ };
@@ -0,0 +1,45 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Popover as e } from "radix-ui";
4
+ import { cn as d } from "../../lib/utils.js";
5
+ function f({
6
+ ...o
7
+ }) {
8
+ return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
9
+ }
10
+ function l({
11
+ ...o
12
+ }) {
13
+ return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
14
+ }
15
+ function c({
16
+ className: o,
17
+ align: r = "center",
18
+ sideOffset: a = 4,
19
+ ...n
20
+ }) {
21
+ return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(
22
+ e.Content,
23
+ {
24
+ "data-slot": "popover-content",
25
+ align: r,
26
+ sideOffset: a,
27
+ className: d(
28
+ "z-[var(--Z-Popover)] w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
29
+ o
30
+ ),
31
+ ...n
32
+ }
33
+ ) });
34
+ }
35
+ function v({
36
+ ...o
37
+ }) {
38
+ return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
39
+ }
40
+ export {
41
+ f as Popover,
42
+ v as PopoverAnchor,
43
+ c as PopoverContent,
44
+ l as PopoverTrigger
45
+ };
@@ -0,0 +1,34 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Progress as l } from "radix-ui";
4
+ import { cn as t } from "../../lib/utils.js";
5
+ function f({
6
+ className: o,
7
+ value: e,
8
+ ...r
9
+ }) {
10
+ const s = r["aria-label"] !== void 0 || r["aria-labelledby"] !== void 0;
11
+ return /* @__PURE__ */ a(
12
+ l.Root,
13
+ {
14
+ "data-slot": "progress",
15
+ "aria-label": s ? void 0 : "進捗",
16
+ className: t(
17
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
18
+ o
19
+ ),
20
+ ...r,
21
+ children: /* @__PURE__ */ a(
22
+ l.Indicator,
23
+ {
24
+ "data-slot": "progress-indicator",
25
+ className: "h-full w-full flex-1 bg-primary transition-all",
26
+ style: { transform: `translateX(-${100 - (e || 0)}%)` }
27
+ }
28
+ )
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ f as Progress
34
+ };
@@ -0,0 +1,134 @@
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { RadioGroup as i } from "radix-ui";
4
+ import { cn as e } from "../../lib/utils.js";
5
+ import { FOCUS_RING as m } from "../../lib/focus-ring.js";
6
+ import { chipVariants as p } from "./chip-variants.js";
7
+ const n = l.createContext("tile");
8
+ function x({
9
+ className: o,
10
+ variant: a = "tile",
11
+ ...t
12
+ }) {
13
+ return /* @__PURE__ */ r(n.Provider, { value: a, children: /* @__PURE__ */ r(
14
+ i.Root,
15
+ {
16
+ "data-slot": "radio-group",
17
+ "data-variant": a,
18
+ className: e(
19
+ a === "chip" ? "flex flex-wrap gap-2" : "grid gap-3",
20
+ o
21
+ ),
22
+ ...t
23
+ }
24
+ ) });
25
+ }
26
+ function y({
27
+ className: o,
28
+ children: a,
29
+ description: t,
30
+ expandedContent: d,
31
+ ...c
32
+ }) {
33
+ return l.useContext(n) === "chip" ? /* @__PURE__ */ r(
34
+ i.Item,
35
+ {
36
+ "data-slot": "radio-group-item",
37
+ "data-variant": "chip",
38
+ className: e(
39
+ // Chip 本体と同一の chipVariants(CVA)を再利用。unselected=filled 意匠。
40
+ // レイアウト・サイズ・角丸・typo・focus リングはここから供給され、Chip 意匠変更に自動追従する。
41
+ p({ variant: "filled", size: "md", shape: "pill" }),
42
+ "cursor-pointer outline-none",
43
+ // checked = Chip の accent(selected)意匠。Chip accent と同一トークンを参照し、
44
+ // 静止=薄オレンジ / hover=ベタ塗りオレンジ(Text-on-Inverse)まで一致させる。
45
+ "data-[state=checked]:bg-[var(--Surface-Accent-Primary-Light)] data-[state=checked]:text-[var(--Brand-Cake-Orange)]",
46
+ "data-[state=checked]:hover:bg-[var(--Surface-Accent-Primary)] data-[state=checked]:hover:text-[var(--Text-on-Inverse)]",
47
+ // form 固有の状態(chipVariants に無い分のみ compose)。disabled の配色は chipVariants filled が担う。
48
+ "aria-invalid:border aria-invalid:border-[var(--Border-Caution)]",
49
+ "disabled:cursor-not-allowed",
50
+ o
51
+ ),
52
+ ...c,
53
+ children: a
54
+ }
55
+ ) : /* @__PURE__ */ s(
56
+ i.Item,
57
+ {
58
+ "data-slot": "radio-group-item",
59
+ className: e(
60
+ // lint-scratch-allow: p-[15px] は border-2 を含めた見た目余白を Figma に合わせる補正値
61
+ "group flex cursor-pointer gap-2 rounded-lg border-2 border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-[15px] text-left outline-none transition-colors",
62
+ d ? "flex-col items-stretch" : "items-center",
63
+ "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]",
64
+ "data-[state=checked]:border-[var(--Object-Accent-Primary)] data-[state=checked]:bg-[var(--Surface-Primary)]",
65
+ // フォーカス意匠は DS 共通(FOCUS_RING = 緑リング)。以前はオレンジの
66
+ // ring-2 で checked 状態(同じくオレンジ枠)と紛らわしかったため統一した。
67
+ m,
68
+ "aria-invalid:border-[var(--Border-Caution)]",
69
+ "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)]",
70
+ o
71
+ ),
72
+ ...c,
73
+ children: [
74
+ /* @__PURE__ */ s("span", { className: e("flex items-center gap-2", d && "w-full"), children: [
75
+ /* @__PURE__ */ r(
76
+ "span",
77
+ {
78
+ "data-slot": "radio-group-icon",
79
+ className: e(
80
+ "flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] transition-colors",
81
+ "group-data-[state=checked]:border-[var(--Object-Accent-Primary)]",
82
+ "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Secondary)]"
83
+ ),
84
+ children: /* @__PURE__ */ r(
85
+ i.Indicator,
86
+ {
87
+ "data-slot": "radio-group-indicator",
88
+ className: "flex items-center justify-center",
89
+ children: /* @__PURE__ */ r("span", { className: "size-2.5 rounded-full bg-[var(--Object-Accent-Primary)]" })
90
+ }
91
+ )
92
+ }
93
+ ),
94
+ (a || t) && /* @__PURE__ */ s("span", { className: "flex min-w-0 flex-1 flex-col", children: [
95
+ a && /* @__PURE__ */ r(
96
+ "span",
97
+ {
98
+ "data-slot": "radio-group-label",
99
+ className: e(
100
+ "typo-body-lg text-[var(--Text-High-Emphasis)]",
101
+ "group-data-[disabled]:text-[var(--Text-Low-Emphasis)]"
102
+ ),
103
+ children: a
104
+ }
105
+ ),
106
+ t && /* @__PURE__ */ r(
107
+ "span",
108
+ {
109
+ "data-slot": "radio-group-description",
110
+ className: e(
111
+ "typo-body-sm text-[var(--Text-Medium-Emphasis)]",
112
+ "group-data-[disabled]:text-[var(--Text-Low-Emphasis)]"
113
+ ),
114
+ children: t
115
+ }
116
+ )
117
+ ] })
118
+ ] }),
119
+ d && /* @__PURE__ */ r(
120
+ "span",
121
+ {
122
+ "data-slot": "radio-group-expanded",
123
+ className: "hidden border-t border-[var(--Border-Medium-Emphasis)] pt-3 group-data-[state=checked]:block",
124
+ children: d
125
+ }
126
+ )
127
+ ]
128
+ }
129
+ );
130
+ }
131
+ export {
132
+ x as RadioGroup,
133
+ y as RadioGroupItem
134
+ };
@@ -0,0 +1,76 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { cn as c } from "../../lib/utils.js";
4
+ import { Dialog as D, DialogClose as g, DialogContent as u, DialogDescription as m, DialogFooter as p, DialogHeader as M, DialogTitle as b, DialogTrigger as f } from "./dialog.js";
5
+ import { Drawer as C, DrawerClose as v, DrawerContent as w, DrawerDescription as R, DrawerFooter as d, DrawerHeader as T, DrawerTitle as x, DrawerTrigger as h } from "./drawer.js";
6
+ function s(o = 768) {
7
+ const [e, n] = l.useState(!1);
8
+ return l.useEffect(() => {
9
+ const i = window.matchMedia(`(max-width: ${o - 1}px)`), r = (a) => {
10
+ n(a.matches);
11
+ };
12
+ return r(i), i.addEventListener("change", r), () => i.removeEventListener("change", r);
13
+ }, [o]), e;
14
+ }
15
+ function L({ children: o, ...e }) {
16
+ return s() ? /* @__PURE__ */ t(C, { ...e, children: o }) : /* @__PURE__ */ t(D, { ...e, children: o });
17
+ }
18
+ function j({
19
+ className: o,
20
+ ...e
21
+ }) {
22
+ const i = s() ? h : f;
23
+ return /* @__PURE__ */ t(i, { className: o, ...e });
24
+ }
25
+ function q({
26
+ className: o,
27
+ children: e,
28
+ ...n
29
+ }) {
30
+ return s() ? /* @__PURE__ */ t(w, { className: c("px-4 pb-6", o), ...n, children: e }) : /* @__PURE__ */ t(u, { className: o, ...n, children: e });
31
+ }
32
+ function S({
33
+ className: o,
34
+ ...e
35
+ }) {
36
+ const i = s() ? T : M;
37
+ return /* @__PURE__ */ t(i, { className: o, ...e });
38
+ }
39
+ function $({
40
+ className: o,
41
+ ...e
42
+ }) {
43
+ const i = s() ? d : p;
44
+ return /* @__PURE__ */ t(i, { className: o, ...e });
45
+ }
46
+ function y({
47
+ className: o,
48
+ ...e
49
+ }) {
50
+ const i = s() ? x : b;
51
+ return /* @__PURE__ */ t(i, { className: o, ...e });
52
+ }
53
+ function z({
54
+ className: o,
55
+ ...e
56
+ }) {
57
+ const i = s() ? R : m;
58
+ return /* @__PURE__ */ t(i, { className: o, ...e });
59
+ }
60
+ function A({
61
+ ...o
62
+ }) {
63
+ const n = s() ? v : g;
64
+ return /* @__PURE__ */ t(n, { ...o });
65
+ }
66
+ export {
67
+ L as ResponsiveDialog,
68
+ A as ResponsiveDialogClose,
69
+ q as ResponsiveDialogContent,
70
+ z as ResponsiveDialogDescription,
71
+ $ as ResponsiveDialogFooter,
72
+ S as ResponsiveDialogHeader,
73
+ y as ResponsiveDialogTitle,
74
+ j as ResponsiveDialogTrigger,
75
+ s as useIsMobile
76
+ };
@@ -0,0 +1,62 @@
1
+ import { jsxs as s, jsx as l } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ScrollArea as o } from "radix-ui";
4
+ import { cn as t } from "../../lib/utils.js";
5
+ function b({
6
+ className: e,
7
+ children: r,
8
+ ...a
9
+ }) {
10
+ return /* @__PURE__ */ s(
11
+ o.Root,
12
+ {
13
+ "data-slot": "scroll-area",
14
+ className: t("relative", e),
15
+ ...a,
16
+ children: [
17
+ /* @__PURE__ */ l(
18
+ o.Viewport,
19
+ {
20
+ "data-slot": "scroll-area-viewport",
21
+ tabIndex: 0,
22
+ className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
23
+ children: r
24
+ }
25
+ ),
26
+ /* @__PURE__ */ l(c, {}),
27
+ /* @__PURE__ */ l(o.Corner, {})
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ function c({
33
+ className: e,
34
+ orientation: r = "vertical",
35
+ ...a
36
+ }) {
37
+ return /* @__PURE__ */ l(
38
+ o.ScrollAreaScrollbar,
39
+ {
40
+ "data-slot": "scroll-area-scrollbar",
41
+ orientation: r,
42
+ className: t(
43
+ "flex touch-none p-px transition-colors select-none",
44
+ r === "vertical" && "h-full w-2.5 border-l border-l-transparent",
45
+ r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
46
+ e
47
+ ),
48
+ ...a,
49
+ children: /* @__PURE__ */ l(
50
+ o.ScrollAreaThumb,
51
+ {
52
+ "data-slot": "scroll-area-thumb",
53
+ className: "relative flex-1 rounded-full bg-border"
54
+ }
55
+ )
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ b as ScrollArea,
61
+ c as ScrollBar
62
+ };