@cakejp/design-system 0.20.1 → 0.21.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 (161) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/CLAUDE.md +5 -3
  3. package/MIGRATION.md +3 -3
  4. package/README.md +31 -11
  5. package/contracts/components.json +420 -63
  6. package/contracts/composition.json +38 -4
  7. package/contracts/rules.json +27 -5
  8. package/contracts/screen-patterns.json +6 -4
  9. package/dist/components/ec/admin-shell.js +62 -60
  10. package/dist/components/ec/anniversary-card.js +13 -12
  11. package/dist/components/ec/coupon-card.js +11 -11
  12. package/dist/components/ec/delivery-calendar.js +51 -45
  13. package/dist/components/ec/mypage-shell.js +80 -69
  14. package/dist/components/ec/product-card.js +93 -76
  15. package/dist/components/ec/product-carousel.js +65 -60
  16. package/dist/components/ec/product-detail-bar.js +13 -11
  17. package/dist/components/ec/product-detail-sidebar.js +60 -58
  18. package/dist/components/ec/product-list-item.js +64 -63
  19. package/dist/components/ec/product-option.js +30 -26
  20. package/dist/components/ec/rating-stars.js +27 -27
  21. package/dist/components/ec/review-card.js +32 -32
  22. package/dist/components/ec/review-form.js +37 -37
  23. package/dist/components/ec/shop-card.js +21 -19
  24. package/dist/components/foundations/accordion.js +33 -31
  25. package/dist/components/foundations/alert-dialog.js +4 -5
  26. package/dist/components/foundations/badge.js +5 -5
  27. package/dist/components/foundations/breadcrumb.js +27 -26
  28. package/dist/components/foundations/button.js +144 -25
  29. package/dist/components/foundations/calendar.js +28 -26
  30. package/dist/components/foundations/checkbox-card.js +71 -47
  31. package/dist/components/foundations/checkbox-group.js +30 -27
  32. package/dist/components/foundations/checkbox.js +69 -52
  33. package/dist/components/foundations/chip-variants.js +13 -0
  34. package/dist/components/foundations/command.js +81 -79
  35. package/dist/components/foundations/confirm-dialog.js +136 -0
  36. package/dist/components/foundations/context-menu.js +43 -38
  37. package/dist/components/foundations/data-table.js +87 -84
  38. package/dist/components/foundations/dialog.js +45 -36
  39. package/dist/components/foundations/dropdown-menu.js +47 -42
  40. package/dist/components/foundations/file-input.js +97 -67
  41. package/dist/components/foundations/hover-card.js +21 -21
  42. package/dist/components/foundations/menubar.js +75 -69
  43. package/dist/components/foundations/navigation-menu.js +31 -26
  44. package/dist/components/foundations/pagination.js +54 -50
  45. package/dist/components/foundations/popover.js +7 -7
  46. package/dist/components/foundations/progress.js +10 -6
  47. package/dist/components/foundations/radio-group.js +6 -3
  48. package/dist/components/foundations/responsive-dialog.js +73 -55
  49. package/dist/components/foundations/scroll-area.js +18 -14
  50. package/dist/components/foundations/select.js +44 -39
  51. package/dist/components/foundations/sheet.js +45 -37
  52. package/dist/components/foundations/skeleton.js +6 -6
  53. package/dist/components/foundations/skip-link.js +10 -8
  54. package/dist/components/foundations/slider.js +73 -48
  55. package/dist/components/foundations/sonner.js +5 -4
  56. package/dist/components/foundations/spinner.js +7 -5
  57. package/dist/components/foundations/switch.js +11 -10
  58. package/dist/components/foundations/tabs.js +54 -39
  59. package/dist/components/foundations/toggle-group.js +29 -21
  60. package/dist/components/foundations/toggle.js +20 -16
  61. package/dist/components/primitives/admin-side-nav.js +65 -62
  62. package/dist/components/primitives/banner-carousel.js +32 -29
  63. package/dist/components/primitives/bottom-tab-bar.js +16 -15
  64. package/dist/components/primitives/category-scroll.js +39 -29
  65. package/dist/components/primitives/category-shortcuts.js +9 -9
  66. package/dist/components/primitives/chat-composer.js +77 -74
  67. package/dist/components/primitives/chip.js +84 -61
  68. package/dist/components/primitives/combobox.js +63 -47
  69. package/dist/components/primitives/container.js +9 -9
  70. package/dist/components/primitives/content-card.js +15 -17
  71. package/dist/components/primitives/content-carousel.js +103 -83
  72. package/dist/components/primitives/date-picker.js +137 -99
  73. package/dist/components/primitives/footer.js +36 -37
  74. package/dist/components/primitives/header.js +175 -168
  75. package/dist/components/primitives/image-carousel.js +107 -87
  76. package/dist/components/primitives/image-gallery.js +32 -27
  77. package/dist/components/primitives/image-uploader.js +6 -6
  78. package/dist/components/primitives/list-item.js +59 -51
  79. package/dist/components/primitives/menu-drawer.js +36 -38
  80. package/dist/components/primitives/multi-select.js +89 -58
  81. package/dist/components/primitives/notification-list.js +10 -9
  82. package/dist/components/primitives/number-input.js +116 -105
  83. package/dist/components/primitives/scroll-row.js +21 -0
  84. package/dist/components/primitives/search-bar.js +31 -28
  85. package/dist/components/primitives/section-header.js +54 -53
  86. package/dist/components/primitives/side-nav.js +57 -56
  87. package/dist/components/primitives/sub-nav.js +13 -14
  88. package/dist/components/primitives/tag.js +4 -2
  89. package/dist/index.css +1 -1
  90. package/dist/index.js +3070 -925
  91. package/dist/lib/field-labelling.js +31 -21
  92. package/dist/lib/focus-ring.js +22 -4
  93. package/dist/lib/high-contrast.js +4 -0
  94. package/dist/lib/image-index.js +8 -0
  95. package/dist/lib/use-prefers-reduced-motion.js +21 -0
  96. package/dist/types/components/ec/admin-shell.d.ts +11 -1
  97. package/dist/types/components/ec/anniversary-card.d.ts +9 -1
  98. package/dist/types/components/ec/mypage-shell.d.ts +12 -1
  99. package/dist/types/components/ec/product-card.d.ts +13 -1
  100. package/dist/types/components/ec/product-carousel.d.ts +13 -1
  101. package/dist/types/components/ec/product-detail-bar.d.ts +12 -1
  102. package/dist/types/components/ec/product-detail-sidebar.d.ts +11 -1
  103. package/dist/types/components/ec/product-list-item.d.ts +9 -1
  104. package/dist/types/components/ec/rating-stars.d.ts +2 -0
  105. package/dist/types/components/ec/review-card.d.ts +1 -1
  106. package/dist/types/components/ec/shop-card.d.ts +8 -1
  107. package/dist/types/components/foundations/badge.d.ts +1 -1
  108. package/dist/types/components/foundations/breadcrumb.d.ts +8 -1
  109. package/dist/types/components/foundations/button.d.ts +38 -3
  110. package/dist/types/components/foundations/checkbox-card.d.ts +7 -1
  111. package/dist/types/components/foundations/checkbox.d.ts +1 -1
  112. package/dist/types/components/foundations/chip-variants.d.ts +2 -2
  113. package/dist/types/components/foundations/confirm-dialog.d.ts +61 -0
  114. package/dist/types/components/foundations/data-table.d.ts +9 -2
  115. package/dist/types/components/foundations/dialog.d.ts +16 -1
  116. package/dist/types/components/foundations/pagination.d.ts +1 -1
  117. package/dist/types/components/foundations/responsive-dialog.d.ts +2 -1
  118. package/dist/types/components/foundations/sheet.d.ts +12 -1
  119. package/dist/types/components/foundations/skeleton.d.ts +6 -0
  120. package/dist/types/components/foundations/slider.d.ts +15 -1
  121. package/dist/types/components/foundations/tabs.d.ts +7 -0
  122. package/dist/types/components/primitives/admin-side-nav.d.ts +22 -2
  123. package/dist/types/components/primitives/banner-carousel.d.ts +9 -1
  124. package/dist/types/components/primitives/bottom-tab-bar.d.ts +13 -2
  125. package/dist/types/components/primitives/category-scroll.d.ts +10 -1
  126. package/dist/types/components/primitives/category-shortcuts.d.ts +11 -2
  127. package/dist/types/components/primitives/chip.d.ts +22 -3
  128. package/dist/types/components/primitives/combobox.d.ts +7 -2
  129. package/dist/types/components/primitives/container.d.ts +3 -0
  130. package/dist/types/components/primitives/content-card.d.ts +1 -1
  131. package/dist/types/components/primitives/content-carousel.d.ts +13 -4
  132. package/dist/types/components/primitives/date-picker.d.ts +10 -3
  133. package/dist/types/components/primitives/footer.d.ts +1 -1
  134. package/dist/types/components/primitives/header.d.ts +14 -2
  135. package/dist/types/components/primitives/image-carousel.d.ts +23 -5
  136. package/dist/types/components/primitives/list-item.d.ts +10 -1
  137. package/dist/types/components/primitives/menu-drawer.d.ts +1 -1
  138. package/dist/types/components/primitives/multi-select.d.ts +7 -2
  139. package/dist/types/components/primitives/notification-list.d.ts +10 -1
  140. package/dist/types/components/primitives/number-input.d.ts +18 -5
  141. package/dist/types/components/primitives/scroll-row.d.ts +43 -0
  142. package/dist/types/components/primitives/section-header.d.ts +9 -2
  143. package/dist/types/components/primitives/side-nav.d.ts +13 -1
  144. package/dist/types/components/primitives/sub-nav.d.ts +1 -1
  145. package/dist/types/components/primitives/tag.d.ts +1 -1
  146. package/dist/types/index.d.ts +7 -1
  147. package/dist/types/lib/field-labelling.d.ts +23 -8
  148. package/dist/types/lib/focus-ring.d.ts +70 -3
  149. package/dist/types/lib/high-contrast.d.ts +25 -0
  150. package/dist/types/lib/image-index.d.ts +2 -0
  151. package/dist/types/lib/link-component.d.ts +26 -21
  152. package/dist/types/lib/use-prefers-reduced-motion.d.ts +9 -0
  153. package/package.json +11 -3
  154. package/src/components/COMPONENT_LOOKUP.md +18 -16
  155. package/src/preset-standalone.css +42 -0
  156. package/src/preset.css +20 -1
  157. package/src/styles/semantic.css +57 -0
  158. package/templates/AGENTS.md +5 -1
  159. package/templates/CLAUDE.md +3 -1
  160. package/tokens.json +49 -0
  161. package/dist/lib/link-component.js +0 -6
@@ -1,9 +1,10 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
2
  import "react";
3
- import { CheckIcon as u, CircleIcon as c, ChevronRightIcon as l } from "lucide-react";
3
+ import { CheckIcon as c, CircleIcon as l, ChevronRightIcon as m } from "lucide-react";
4
4
  import { Menubar as n } from "radix-ui";
5
- import { cn as o } from "../../lib/utils.js";
6
- function x({
5
+ import { cn as r } from "../../lib/utils.js";
6
+ import { FORCED_COLORS_MENU_ITEM as d } from "../../lib/focus-ring.js";
7
+ function M({
7
8
  className: e,
8
9
  ...t
9
10
  }) {
@@ -11,7 +12,7 @@ function x({
11
12
  n.Root,
12
13
  {
13
14
  "data-slot": "menubar",
14
- className: o(
15
+ className: r(
15
16
  "flex h-9 items-center gap-1 rounded-md border border-[var(--Border-Medium-Emphasis)] bg-background p-1 shadow-xs",
16
17
  e
17
18
  ),
@@ -19,27 +20,27 @@ function x({
19
20
  }
20
21
  );
21
22
  }
22
- function h({
23
+ function y({
23
24
  ...e
24
25
  }) {
25
26
  return /* @__PURE__ */ a(n.Menu, { "data-slot": "menubar-menu", ...e });
26
27
  }
27
- function y({
28
+ function N({
28
29
  ...e
29
30
  }) {
30
31
  return /* @__PURE__ */ a(n.Group, { "data-slot": "menubar-group", ...e });
31
32
  }
32
- function m({
33
+ function b({
33
34
  ...e
34
35
  }) {
35
36
  return /* @__PURE__ */ a(n.Portal, { "data-slot": "menubar-portal", ...e });
36
37
  }
37
- function M({
38
+ function z({
38
39
  ...e
39
40
  }) {
40
41
  return /* @__PURE__ */ a(n.RadioGroup, { "data-slot": "menubar-radio-group", ...e });
41
42
  }
42
- function z({
43
+ function I({
43
44
  className: e,
44
45
  ...t
45
46
  }) {
@@ -47,40 +48,41 @@ function z({
47
48
  n.Trigger,
48
49
  {
49
50
  "data-slot": "menubar-trigger",
50
- className: o(
51
- "flex items-center rounded-sm px-2 py-1 typo-label-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
51
+ className: r(
52
+ "flex items-center rounded-sm px-2 py-1 typo-label-md outline-none select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
53
+ d,
52
54
  e
53
55
  ),
54
56
  ...t
55
57
  }
56
58
  );
57
59
  }
58
- function N({
60
+ function _({
59
61
  className: e,
60
62
  align: t = "start",
61
- alignOffset: r = -4,
63
+ alignOffset: o = -4,
62
64
  sideOffset: s = 8,
63
- ...i
65
+ ...u
64
66
  }) {
65
- return /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(
67
+ return /* @__PURE__ */ a(b, { children: /* @__PURE__ */ a(
66
68
  n.Content,
67
69
  {
68
70
  "data-slot": "menubar-content",
69
71
  align: t,
70
- alignOffset: r,
72
+ alignOffset: o,
71
73
  sideOffset: s,
72
- className: o(
73
- "z-[var(--Z-Popover)] min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 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]: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",
74
+ className: r(
75
+ "z-[var(--Z-Popover)] min-w-[12rem] max-w-(--radix-menubar-content-available-width) origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 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]: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",
74
76
  e
75
77
  ),
76
- ...i
78
+ ...u
77
79
  }
78
80
  ) });
79
81
  }
80
- function I({
82
+ function w({
81
83
  className: e,
82
84
  inset: t,
83
- variant: r = "default",
85
+ variant: o = "default",
84
86
  ...s
85
87
  }) {
86
88
  return /* @__PURE__ */ a(
@@ -88,78 +90,81 @@ function I({
88
90
  {
89
91
  "data-slot": "menubar-item",
90
92
  "data-inset": t,
91
- "data-variant": r,
92
- className: o(
93
- "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
93
+ "data-variant": o,
94
+ className: r(
95
+ "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
96
+ d,
94
97
  e
95
98
  ),
96
99
  ...s
97
100
  }
98
101
  );
99
102
  }
100
- function _({
103
+ function C({
101
104
  className: e,
102
105
  children: t,
103
- checked: r,
106
+ checked: o,
104
107
  ...s
105
108
  }) {
106
- return /* @__PURE__ */ d(
109
+ return /* @__PURE__ */ i(
107
110
  n.CheckboxItem,
108
111
  {
109
112
  "data-slot": "menubar-checkbox-item",
110
- className: o(
111
- "relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 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",
113
+ className: r(
114
+ "relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-none 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",
115
+ d,
112
116
  e
113
117
  ),
114
- checked: r,
118
+ checked: o,
115
119
  ...s,
116
120
  children: [
117
- /* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(u, { className: "size-4" }) }) }),
121
+ /* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(c, { className: "size-4" }) }) }),
118
122
  t
119
123
  ]
120
124
  }
121
125
  );
122
126
  }
123
- function k({
127
+ function S({
124
128
  className: e,
125
129
  children: t,
126
- ...r
130
+ ...o
127
131
  }) {
128
- return /* @__PURE__ */ d(
132
+ return /* @__PURE__ */ i(
129
133
  n.RadioItem,
130
134
  {
131
135
  "data-slot": "menubar-radio-item",
132
- className: o(
133
- "relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 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",
136
+ className: r(
137
+ "relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-none 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",
138
+ d,
134
139
  e
135
140
  ),
136
- ...r,
141
+ ...o,
137
142
  children: [
138
- /* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(c, { className: "size-2 fill-current" }) }) }),
143
+ /* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(l, { className: "size-2 fill-current" }) }) }),
139
144
  t
140
145
  ]
141
146
  }
142
147
  );
143
148
  }
144
- function C({
149
+ function k({
145
150
  className: e,
146
151
  inset: t,
147
- ...r
152
+ ...o
148
153
  }) {
149
154
  return /* @__PURE__ */ a(
150
155
  n.Label,
151
156
  {
152
157
  "data-slot": "menubar-label",
153
158
  "data-inset": t,
154
- className: o(
159
+ className: r(
155
160
  "px-2 py-1.5 typo-label-md data-[inset]:pl-8",
156
161
  e
157
162
  ),
158
- ...r
163
+ ...o
159
164
  }
160
165
  );
161
166
  }
162
- function S({
167
+ function R({
163
168
  className: e,
164
169
  ...t
165
170
  }) {
@@ -167,12 +172,12 @@ function S({
167
172
  n.Separator,
168
173
  {
169
174
  "data-slot": "menubar-separator",
170
- className: o("-mx-1 my-1 h-px bg-border", e),
175
+ className: r("-mx-1 my-1 h-px bg-border", e),
171
176
  ...t
172
177
  }
173
178
  );
174
179
  }
175
- function w({
180
+ function E({
176
181
  className: e,
177
182
  ...t
178
183
  }) {
@@ -180,7 +185,7 @@ function w({
180
185
  "span",
181
186
  {
182
187
  "data-slot": "menubar-shortcut",
183
- className: o(
188
+ className: r(
184
189
  "ml-auto typo-body-xs text-muted-foreground",
185
190
  e
186
191
  ),
@@ -188,7 +193,7 @@ function w({
188
193
  }
189
194
  );
190
195
  }
191
- function R({
196
+ function T({
192
197
  ...e
193
198
  }) {
194
199
  return /* @__PURE__ */ a(n.Sub, { "data-slot": "menubar-sub", ...e });
@@ -196,22 +201,23 @@ function R({
196
201
  function j({
197
202
  className: e,
198
203
  inset: t,
199
- children: r,
204
+ children: o,
200
205
  ...s
201
206
  }) {
202
- return /* @__PURE__ */ d(
207
+ return /* @__PURE__ */ i(
203
208
  n.SubTrigger,
204
209
  {
205
210
  "data-slot": "menubar-sub-trigger",
206
211
  "data-inset": t,
207
- className: o(
212
+ className: r(
208
213
  "flex cursor-default items-center rounded-sm px-2 py-1.5 typo-body-md outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
214
+ d,
209
215
  e
210
216
  ),
211
217
  ...s,
212
218
  children: [
213
- r,
214
- /* @__PURE__ */ a(l, { className: "ml-auto h-4 w-4" })
219
+ o,
220
+ /* @__PURE__ */ a(m, { className: "ml-auto h-4 w-4" })
215
221
  ]
216
222
  }
217
223
  );
@@ -224,8 +230,8 @@ function G({
224
230
  n.SubContent,
225
231
  {
226
232
  "data-slot": "menubar-sub-content",
227
- className: o(
228
- "z-[var(--Z-Popover)] min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 text-popover-foreground shadow-lg 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",
233
+ className: r(
234
+ "z-[var(--Z-Popover)] min-w-[8rem] max-w-(--radix-menubar-content-available-width) origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 text-popover-foreground shadow-lg 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",
229
235
  e
230
236
  ),
231
237
  ...t
@@ -233,20 +239,20 @@ function G({
233
239
  );
234
240
  }
235
241
  export {
236
- x as Menubar,
237
- _ as MenubarCheckboxItem,
238
- N as MenubarContent,
239
- y as MenubarGroup,
240
- I as MenubarItem,
241
- C as MenubarLabel,
242
- h as MenubarMenu,
243
- m as MenubarPortal,
244
- M as MenubarRadioGroup,
245
- k as MenubarRadioItem,
246
- S as MenubarSeparator,
247
- w as MenubarShortcut,
248
- R as MenubarSub,
242
+ M as Menubar,
243
+ C as MenubarCheckboxItem,
244
+ _ as MenubarContent,
245
+ N as MenubarGroup,
246
+ w as MenubarItem,
247
+ k as MenubarLabel,
248
+ y as MenubarMenu,
249
+ b as MenubarPortal,
250
+ z as MenubarRadioGroup,
251
+ S as MenubarRadioItem,
252
+ R as MenubarSeparator,
253
+ E as MenubarShortcut,
254
+ T as MenubarSub,
249
255
  G as MenubarSubContent,
250
256
  j as MenubarSubTrigger,
251
- z as MenubarTrigger
257
+ I as MenubarTrigger
252
258
  };
@@ -1,14 +1,15 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cva as u } from "class-variance-authority";
4
- import { ChevronDownIcon as s } from "lucide-react";
4
+ import { ChevronDownIcon as l } from "lucide-react";
5
5
  import { NavigationMenu as n } from "radix-ui";
6
6
  import { cn as o } from "../../lib/utils.js";
7
- function b({
7
+ import { FORCED_COLORS_FOCUS as d } from "../../lib/focus-ring.js";
8
+ function h({
8
9
  className: t,
9
10
  children: a,
10
11
  viewport: i = !0,
11
- ...d
12
+ ...s
12
13
  }) {
13
14
  return /* @__PURE__ */ r(
14
15
  n.Root,
@@ -19,15 +20,15 @@ function b({
19
20
  "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
20
21
  t
21
22
  ),
22
- ...d,
23
+ ...s,
23
24
  children: [
24
25
  a,
25
- i && /* @__PURE__ */ e(g, {})
26
+ i && /* @__PURE__ */ e(m, {})
26
27
  ]
27
28
  }
28
29
  );
29
30
  }
30
- function x({
31
+ function N({
31
32
  className: t,
32
33
  ...a
33
34
  }) {
@@ -43,7 +44,7 @@ function x({
43
44
  }
44
45
  );
45
46
  }
46
- function h({
47
+ function M({
47
48
  className: t,
48
49
  ...a
49
50
  }) {
@@ -56,10 +57,13 @@ function h({
56
57
  }
57
58
  );
58
59
  }
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"
60
+ const g = u(
61
+ [
62
+ "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-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] 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",
63
+ d
64
+ ]
61
65
  );
62
- function N({
66
+ function y({
63
67
  className: t,
64
68
  children: a,
65
69
  ...i
@@ -68,13 +72,13 @@ function N({
68
72
  n.Trigger,
69
73
  {
70
74
  "data-slot": "navigation-menu-trigger",
71
- className: o(l(), "group", t),
75
+ className: o(g(), "group", t),
72
76
  ...i,
73
77
  children: [
74
78
  a,
75
79
  " ",
76
80
  /* @__PURE__ */ e(
77
- s,
81
+ l,
78
82
  {
79
83
  className: "relative top-[1px] ml-1 size-3 transition duration-[var(--Motion-Duration-Slow)] group-data-[state=open]:rotate-180",
80
84
  "aria-hidden": "true"
@@ -84,7 +88,7 @@ function N({
84
88
  }
85
89
  );
86
90
  }
87
- function M({
91
+ function z({
88
92
  className: t,
89
93
  ...a
90
94
  }) {
@@ -101,7 +105,7 @@ function M({
101
105
  }
102
106
  );
103
107
  }
104
- function g({
108
+ function m({
105
109
  className: t,
106
110
  ...a
107
111
  }) {
@@ -125,7 +129,7 @@ function g({
125
129
  }
126
130
  );
127
131
  }
128
- function y({
132
+ function k({
129
133
  className: t,
130
134
  ...a
131
135
  }) {
@@ -134,14 +138,15 @@ function y({
134
138
  {
135
139
  "data-slot": "navigation-menu-link",
136
140
  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",
141
+ "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-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] 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",
142
+ d,
138
143
  t
139
144
  ),
140
145
  ...a
141
146
  }
142
147
  );
143
148
  }
144
- function z({
149
+ function C({
145
150
  className: t,
146
151
  ...a
147
152
  }) {
@@ -159,13 +164,13 @@ function z({
159
164
  );
160
165
  }
161
166
  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
167
+ h as NavigationMenu,
168
+ z as NavigationMenuContent,
169
+ C as NavigationMenuIndicator,
170
+ M as NavigationMenuItem,
171
+ k as NavigationMenuLink,
172
+ N as NavigationMenuList,
173
+ y as NavigationMenuTrigger,
174
+ m as NavigationMenuViewport,
175
+ g as navigationMenuTriggerStyle
171
176
  };
@@ -1,74 +1,78 @@
1
1
  import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { MoreHorizontalIcon as c, ChevronRightIcon as p, ChevronLeftIcon as u } from "lucide-react";
3
+ import { MoreHorizontalIcon as c, ChevronRightIcon as m, ChevronLeftIcon as u } from "lucide-react";
4
4
  import { cn as t } from "../../lib/utils.js";
5
- import { resolveLinkComponent as f } from "../../lib/link-component.js";
6
- import { buttonVariants as d } from "./button.js";
7
- function v({ className: n, ...a }) {
5
+ import { buttonVariants as p } from "./button.js";
6
+ function P({ className: a, ...n }) {
8
7
  return /* @__PURE__ */ i(
9
8
  "nav",
10
9
  {
11
10
  role: "navigation",
12
11
  "aria-label": "pagination",
13
12
  "data-slot": "pagination",
14
- className: t("mx-auto flex w-full justify-center", n),
15
- ...a
13
+ className: t("mx-auto flex w-full justify-center", a),
14
+ ...n
16
15
  }
17
16
  );
18
17
  }
19
- function b({
20
- className: n,
21
- ...a
18
+ function k({
19
+ className: a,
20
+ ...n
22
21
  }) {
23
22
  return /* @__PURE__ */ i(
24
23
  "ul",
25
24
  {
26
25
  "data-slot": "pagination-content",
27
- className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", n),
28
- ...a
26
+ className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", a),
27
+ ...n
29
28
  }
30
29
  );
31
30
  }
32
- function j({ ...n }) {
33
- return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...n });
31
+ function b({ ...a }) {
32
+ return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
34
33
  }
35
- function o({
36
- className: n,
37
- isActive: a,
38
- size: r = "icon",
34
+ function r({
35
+ className: a,
36
+ isActive: n,
37
+ size: o = "icon",
39
38
  linkComponent: s,
40
39
  ...l
41
40
  }) {
42
- const m = f(s);
43
41
  return /* @__PURE__ */ i(
44
- m,
42
+ s ?? "a",
45
43
  {
46
- "aria-current": a ? "page" : void 0,
44
+ "aria-current": n ? "page" : void 0,
47
45
  "data-slot": "pagination-link",
48
- "data-active": a,
46
+ "data-active": n,
49
47
  className: t(
50
- d({
51
- variant: a ? "secondary" : "ghost",
52
- size: r
48
+ p({
49
+ variant: n ? "secondary" : "ghost",
50
+ size: o
53
51
  }),
54
52
  "min-h-9 min-w-9 sm:min-h-10 sm:min-w-10",
55
- n
53
+ // ページ番号(size="icon")は size-9 の固定幅で、桁が多いと文字が枠からはみ出していた
54
+ // (5 桁で中身 43px > 枠 40px、SP の 36px では 4 桁から)。幅を auto にして中身が
55
+ // 最小幅より広いときだけ横に伸ばす。3 桁以下は min-w の正方形(36 / 40px)のまま(実測で差なし)、
56
+ // 4 桁以上は文字幅に合わせて広がる(幅はフォント次第)。
57
+ // min-w-fit は tailwind-merge が上の min-w-9 / sm:min-w-10 を消すため使わない。
58
+ o === "icon" && "w-auto",
59
+ a
56
60
  ),
57
61
  ...l
58
62
  }
59
63
  );
60
64
  }
61
- function w({
62
- className: n,
63
- ...a
65
+ function v({
66
+ className: a,
67
+ ...n
64
68
  }) {
65
69
  return /* @__PURE__ */ e(
66
- o,
70
+ r,
67
71
  {
68
72
  "aria-label": "前のページへ",
69
73
  size: "default",
70
- className: t("gap-1 px-2.5 sm:pl-2.5", n),
71
- ...a,
74
+ className: t("gap-1 px-2.5 sm:pl-2.5", a),
75
+ ...n,
72
76
  children: [
73
77
  /* @__PURE__ */ i(u, {}),
74
78
  /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "前へ" })
@@ -76,35 +80,35 @@ function w({
76
80
  }
77
81
  );
78
82
  }
79
- function y({
80
- className: n,
81
- ...a
83
+ function w({
84
+ className: a,
85
+ ...n
82
86
  }) {
83
87
  return /* @__PURE__ */ e(
84
- o,
88
+ r,
85
89
  {
86
90
  "aria-label": "次のページへ",
87
91
  size: "default",
88
- className: t("gap-1 px-2.5 sm:pr-2.5", n),
89
- ...a,
92
+ className: t("gap-1 px-2.5 sm:pr-2.5", a),
93
+ ...n,
90
94
  children: [
91
95
  /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "次へ" }),
92
- /* @__PURE__ */ i(p, {})
96
+ /* @__PURE__ */ i(m, {})
93
97
  ]
94
98
  }
95
99
  );
96
100
  }
97
- function z({
98
- className: n,
99
- ...a
101
+ function j({
102
+ className: a,
103
+ ...n
100
104
  }) {
101
105
  return /* @__PURE__ */ e(
102
106
  "span",
103
107
  {
104
108
  "aria-hidden": !0,
105
109
  "data-slot": "pagination-ellipsis",
106
- className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", n),
107
- ...a,
110
+ className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", a),
111
+ ...n,
108
112
  children: [
109
113
  /* @__PURE__ */ i(c, { className: "size-4" }),
110
114
  /* @__PURE__ */ i("span", { className: "sr-only", children: "その他のページ" })
@@ -113,11 +117,11 @@ function z({
113
117
  );
114
118
  }
115
119
  export {
116
- v as Pagination,
117
- b as PaginationContent,
118
- z as PaginationEllipsis,
119
- j as PaginationItem,
120
- o as PaginationLink,
121
- y as PaginationNext,
122
- w as PaginationPrevious
120
+ P as Pagination,
121
+ k as PaginationContent,
122
+ j as PaginationEllipsis,
123
+ b as PaginationItem,
124
+ r as PaginationLink,
125
+ w as PaginationNext,
126
+ v as PaginationPrevious
123
127
  };