@cakejp/design-system 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/CLAUDE.md +5 -3
  3. package/MIGRATION.md +3 -3
  4. package/README.md +31 -11
  5. package/contracts/components.json +424 -62
  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 +88 -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 +79 -68
  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 +43 -22
  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 +3076 -929
  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 +12 -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 +19 -17
  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,116 +1,117 @@
1
- import { jsxs as a, jsx as e, Fragment as L } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as e, Fragment as H } from "react/jsx-runtime";
2
2
  import "react";
3
- import M from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
4
- import S from "iconsax-reactjs/dist/esm/ArrowRight2.js";
3
+ import I from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
4
+ import R from "iconsax-reactjs/dist/esm/ArrowRight2.js";
5
5
  import { cn as l } from "../../lib/utils.js";
6
- import { Button as b } from "../foundations/button.js";
7
- const F = {
6
+ import { Button as C } from "../foundations/button.js";
7
+ const w = "typo-label-lg whitespace-nowrap text-[var(--Text-Medium-Emphasis)] underline underline-offset-4 hover:text-[var(--Text-High-Emphasis)]", _ = {
8
8
  "3xl": "h1",
9
9
  "2xl": "h2",
10
10
  xl: "h3",
11
11
  lg: "h4",
12
12
  md: "h5",
13
13
  sm: "h6"
14
- }, H = {
14
+ }, F = {
15
15
  "3xl": "typo-heading-3xl",
16
16
  "2xl": "typo-heading-2xl",
17
17
  xl: "typo-heading-xl",
18
18
  lg: "typo-heading-lg",
19
19
  md: "typo-heading-md",
20
20
  sm: "typo-heading-sm"
21
- }, I = {
21
+ }, K = {
22
22
  "5xl": "@md:typo-heading-5xl",
23
23
  "4xl": "@md:typo-heading-4xl"
24
24
  };
25
- function J({
25
+ function Q({
26
26
  className: d,
27
- title: w,
28
- subtitle: c,
29
- moreHref: t,
30
- moreLabel: o = "もっと見る",
27
+ title: T,
28
+ subtitle: o,
29
+ moreHref: a,
30
+ moreLabel: c = "もっと見る",
31
31
  onMoreClick: h,
32
32
  action: m,
33
33
  onPrev: x,
34
- onNext: p,
35
- prevDisabled: C = !1,
36
- nextDisabled: T = !1,
34
+ onNext: g,
35
+ prevDisabled: E = !1,
36
+ nextDisabled: k = !1,
37
37
  size: s = "lg",
38
- desktopSize: g,
39
- as: k,
40
- align: j = "start",
38
+ desktopSize: p,
39
+ as: L,
40
+ align: B = "start",
41
41
  eyebrow: f,
42
+ linkComponent: j,
42
43
  ...u
43
44
  }) {
44
- const A = k ?? F[s], E = ["3xl", "2xl", "xl", "lg"].includes(s), v = x || p, y = t || h, i = j === "center", z = !!t && !i, n = (y || m || v) && /* @__PURE__ */ a("div", { className: l("flex shrink-0 items-center gap-2", i && "justify-center"), children: [
45
- y && (t ? /* @__PURE__ */ e(
46
- "a",
45
+ const v = j ?? "a", M = L ?? _[s], S = ["3xl", "2xl", "xl", "lg"].includes(s), N = x || g, y = a || h, i = B === "center", z = !!a && !i, n = (y || m || N) && /* @__PURE__ */ t("div", { className: l("flex shrink-0 items-center gap-2", i && "justify-center"), children: [
46
+ y && (a ? /* @__PURE__ */ e(
47
+ v,
47
48
  {
48
- href: t,
49
- className: "typo-label-lg text-[var(--Text-Accent-Primary)] whitespace-nowrap",
49
+ href: a,
50
+ className: w,
50
51
  tabIndex: i ? void 0 : -1,
51
52
  "aria-hidden": i ? void 0 : "true",
52
- children: o
53
+ children: c
53
54
  }
54
55
  ) : /* @__PURE__ */ e(
55
56
  "button",
56
57
  {
57
58
  type: "button",
58
59
  onClick: h,
59
- className: "typo-label-lg text-[var(--Text-Accent-Primary)] whitespace-nowrap",
60
- children: o
60
+ className: w,
61
+ children: c
61
62
  }
62
63
  )),
63
64
  m,
64
- v && /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
65
+ N && /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
65
66
  /* @__PURE__ */ e(
66
- b,
67
+ C,
67
68
  {
68
69
  variant: "ghost",
69
70
  size: "icon-sm",
70
71
  "aria-label": "前へ",
71
72
  onClick: x,
72
- disabled: C,
73
- className: "rounded-full border border-[var(--Border-Medium-Emphasis)]",
74
- children: /* @__PURE__ */ e(M, { size: 16 })
73
+ disabled: E,
74
+ className: "rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))]",
75
+ children: /* @__PURE__ */ e(I, { size: 16 })
75
76
  }
76
77
  ),
77
78
  /* @__PURE__ */ e(
78
- b,
79
+ C,
79
80
  {
80
81
  variant: "ghost",
81
82
  size: "icon-sm",
82
83
  "aria-label": "次へ",
83
- onClick: p,
84
- disabled: T,
85
- className: "rounded-full border border-[var(--Border-Medium-Emphasis)]",
86
- children: /* @__PURE__ */ e(S, { size: 16 })
84
+ onClick: g,
85
+ disabled: k,
86
+ className: "rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))]",
87
+ children: /* @__PURE__ */ e(R, { size: 16 })
87
88
  }
88
89
  )
89
90
  ] })
90
91
  ] }), r = /* @__PURE__ */ e(
91
- A,
92
+ M,
92
93
  {
93
94
  className: l(
94
95
  "text-[var(--Text-High-Emphasis)]",
95
- H[s],
96
- g && I[g]
96
+ F[s],
97
+ p && K[p]
97
98
  ),
98
- children: w
99
+ children: T
99
100
  }
100
- ), N = c && /* @__PURE__ */ e(
101
+ ), b = o && /* @__PURE__ */ e(
101
102
  "p",
102
103
  {
103
104
  className: l(
104
105
  "text-[var(--Text-High-Emphasis)]",
105
- E ? "typo-body-lg" : "typo-body-md"
106
+ S ? "typo-body-lg" : "typo-body-md"
106
107
  ),
107
- children: c
108
+ children: o
108
109
  }
109
- ), B = /* @__PURE__ */ a(L, { children: [
110
+ ), A = /* @__PURE__ */ t(H, { children: [
110
111
  r,
111
- N
112
+ b
112
113
  ] });
113
- return i ? /* @__PURE__ */ a(
114
+ return i ? /* @__PURE__ */ t(
114
115
  "div",
115
116
  {
116
117
  "data-slot": "section-header",
@@ -122,11 +123,11 @@ function J({
122
123
  ...u,
123
124
  children: [
124
125
  f,
125
- B,
126
+ A,
126
127
  n && /* @__PURE__ */ e("div", { className: "pt-1", children: n })
127
128
  ]
128
129
  }
129
- ) : /* @__PURE__ */ a(
130
+ ) : /* @__PURE__ */ t(
130
131
  "div",
131
132
  {
132
133
  "data-slot": "section-header",
@@ -135,17 +136,17 @@ function J({
135
136
  ...u,
136
137
  children: [
137
138
  f,
138
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: [
139
- /* @__PURE__ */ a("div", { className: "flex items-baseline justify-between gap-2 min-w-0", children: [
140
- z ? /* @__PURE__ */ e("a", { href: t, className: "min-w-0 flex-1", children: r }) : /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: r }),
139
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-1", children: [
140
+ /* @__PURE__ */ t("div", { className: "flex items-baseline justify-between gap-2 min-w-0", children: [
141
+ z ? /* @__PURE__ */ e(v, { href: a, className: "min-w-0 flex-1", children: r }) : /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: r }),
141
142
  n
142
143
  ] }),
143
- N
144
+ b
144
145
  ] })
145
146
  ]
146
147
  }
147
148
  );
148
149
  }
149
150
  export {
150
- J as SectionHeader
151
+ Q as SectionHeader
151
152
  };
@@ -1,98 +1,99 @@
1
- import { jsx as n, jsxs as v } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as y } from "react/jsx-runtime";
2
2
  import "react";
3
- import x from "iconsax-reactjs/dist/esm/ArrowRight2.js";
4
- import { cn as u } from "../../lib/utils.js";
5
- import { Separator as b } from "../foundations/separator.js";
6
- function g(r) {
7
- const s = `/iframe.html?id=${encodeURIComponent(r)}&viewMode=story`;
3
+ import g from "iconsax-reactjs/dist/esm/ArrowRight2.js";
4
+ import { cn as x } from "../../lib/utils.js";
5
+ import { Separator as S } from "../foundations/separator.js";
6
+ function w(e) {
7
+ const s = `/iframe.html?id=${encodeURIComponent(e)}&viewMode=story`;
8
8
  window.location.href = s;
9
9
  }
10
- function f(r) {
11
- return r.length > 1 ? r.replace(/\/+$/, "") : r;
10
+ function u(e) {
11
+ return e.length > 1 ? e.replace(/\/+$/, "") : e;
12
12
  }
13
- function S(r, s) {
14
- const { activeMenu: m, currentPath: h, activeMatch: o, isActive: p } = s, c = r.flatMap((t) => t.items);
15
- if (p)
16
- return new Set(c.filter(p).map((t) => t.key));
17
- if (h != null) {
18
- const t = f(h);
13
+ function N(e, s) {
14
+ const { activeMenu: l, currentPath: m, activeMatch: o, isActive: h } = s, c = e.flatMap((r) => r.items);
15
+ if (h)
16
+ return new Set(c.filter(h).map((r) => r.key));
17
+ if (m != null) {
18
+ const r = u(m);
19
19
  if (o === "prefix") {
20
- let a, i = -1;
21
- for (const l of c) {
22
- const e = f(l.href);
23
- (t === e || t.startsWith(e + "/")) && e.length > i && (a = l.key, i = e.length);
20
+ let t, p = -1;
21
+ for (const d of c) {
22
+ const n = u(d.href);
23
+ (r === n || r.startsWith(n + "/")) && n.length > p && (t = d.key, p = n.length);
24
24
  }
25
- return new Set(a ? [a] : []);
25
+ return new Set(t ? [t] : []);
26
26
  }
27
27
  return new Set(
28
- c.filter((a) => f(a.href) === t).map((a) => a.key)
28
+ c.filter((t) => u(t.href) === r).map((t) => t.key)
29
29
  );
30
30
  }
31
- return new Set(m != null ? [m] : []);
31
+ return new Set(l != null ? [l] : []);
32
32
  }
33
- function E({
34
- activeMenu: r,
33
+ function M({
34
+ activeMenu: e,
35
35
  currentPath: s,
36
- activeMatch: m = "exact",
37
- isActive: h,
36
+ activeMatch: l = "exact",
37
+ isActive: m,
38
38
  groups: o,
39
- ariaLabel: p = "サイドメニュー",
40
- className: c,
39
+ ariaLabel: h = "サイドメニュー",
40
+ linkComponent: c,
41
+ className: r,
41
42
  ...t
42
43
  }) {
43
- const a = S(o, {
44
- activeMenu: r,
44
+ const p = c ?? "a", d = N(o, {
45
+ activeMenu: e,
45
46
  currentPath: s,
46
- activeMatch: m,
47
- isActive: h
47
+ activeMatch: l,
48
+ isActive: m
48
49
  });
49
- return /* @__PURE__ */ n(
50
+ return /* @__PURE__ */ a(
50
51
  "nav",
51
52
  {
52
53
  "data-slot": "side-nav",
53
- className: u(
54
+ className: x(
54
55
  "w-64 shrink-0 bg-[var(--Surface-Primary)] border-r border-[var(--Border-Low-Emphasis)]",
55
- c
56
+ r
56
57
  ),
57
- "aria-label": p,
58
+ "aria-label": h,
58
59
  ...t,
59
- children: /* @__PURE__ */ n("div", { className: "py-4", children: o.map((i, l) => /* @__PURE__ */ v("div", { className: "mb-1", children: [
60
- i.groupLabel && /* @__PURE__ */ n("p", { className: "px-4 py-2 typo-label-xs text-[var(--Text-Low-Emphasis)] uppercase", children: i.groupLabel }),
61
- /* @__PURE__ */ n("ul", { children: i.items.map((e) => {
62
- const d = a.has(e.key);
63
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ v(
64
- "a",
60
+ children: /* @__PURE__ */ a("div", { className: "py-4", children: o.map((n, f) => /* @__PURE__ */ y("div", { className: "mb-1", children: [
61
+ n.groupLabel && /* @__PURE__ */ a("p", { className: "px-4 py-2 typo-label-xs text-[var(--Text-Low-Emphasis)] uppercase", children: n.groupLabel }),
62
+ /* @__PURE__ */ a("ul", { children: n.items.map((i) => {
63
+ const v = d.has(i.key);
64
+ return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ y(
65
+ p,
65
66
  {
66
- href: e.href,
67
- onClick: (y) => {
68
- e.storyId && (y.preventDefault(), g(e.storyId));
67
+ href: i.href,
68
+ onClick: (b) => {
69
+ i.storyId && (b.preventDefault(), w(i.storyId));
69
70
  },
70
- className: u(
71
+ className: x(
71
72
  // hover はモーショントークン参照(prefers-reduced-motion で自動停止する)。
72
73
  // 素の transition-colors は Tailwind 既定値でトークン制御が効かない(#201)
73
74
  "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] cursor-pointer",
74
- d ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "text-[var(--Text-High-Emphasis)] border-l-2 border-transparent"
75
+ v ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "text-[var(--Text-High-Emphasis)] border-l-2 border-transparent"
75
76
  ),
76
- "aria-current": d ? "page" : void 0,
77
+ "aria-current": v ? "page" : void 0,
77
78
  children: [
78
- /* @__PURE__ */ n(
79
+ /* @__PURE__ */ a(
79
80
  "span",
80
81
  {
81
- className: d ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Object-High-Emphasis)]",
82
- children: e.icon
82
+ className: v ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Object-High-Emphasis)]",
83
+ children: i.icon
83
84
  }
84
85
  ),
85
- /* @__PURE__ */ n("span", { className: "flex-1", children: e.label }),
86
- /* @__PURE__ */ n(x, { size: 14, className: "text-[var(--Object-Low-Emphasis)]" })
86
+ /* @__PURE__ */ a("span", { className: "flex-1", children: i.label }),
87
+ /* @__PURE__ */ a(g, { size: 14, className: "text-[var(--Object-Low-Emphasis)]" })
87
88
  ]
88
89
  }
89
- ) }, e.key);
90
+ ) }, i.key);
90
91
  }) }),
91
- l < o.length - 1 && /* @__PURE__ */ n(b, { className: "my-2 mx-4" })
92
- ] }, l)) })
92
+ f < o.length - 1 && /* @__PURE__ */ a(S, { className: "my-2 mx-4" })
93
+ ] }, f)) })
93
94
  }
94
95
  );
95
96
  }
96
97
  export {
97
- E as SideNav
98
+ M as SideNav
98
99
  };
@@ -1,19 +1,18 @@
1
- import { jsx as a, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as e } from "../../lib/utils.js";
4
- import { resolveLinkComponent as f } from "../../lib/link-component.js";
5
- import { containerVariants as g } from "./container.js";
4
+ import { containerVariants as m } from "./container.js";
6
5
  const u = "px-4 md:px-6";
7
- function N({
8
- className: t,
6
+ function E({
7
+ className: o,
9
8
  items: x,
10
9
  variant: n = "text",
11
10
  linkComponent: b,
12
- containerSize: o,
11
+ containerSize: s,
13
12
  ...l
14
13
  }) {
15
14
  const i = () => x.map((r) => {
16
- const p = r.href ? f(b) : "button", v = r.href ? { href: r.href } : { type: "button", onClick: r.onClick };
15
+ const p = r.href ? b ?? "a" : "button", v = r.href ? { href: r.href } : { type: "button", onClick: r.onClick };
17
16
  return n === "chip" ? /* @__PURE__ */ a(
18
17
  p,
19
18
  {
@@ -25,7 +24,7 @@ function N({
25
24
  children: r.label
26
25
  },
27
26
  r.label
28
- ) : /* @__PURE__ */ m(
27
+ ) : /* @__PURE__ */ f(
29
28
  p,
30
29
  {
31
30
  className: e(
@@ -40,14 +39,14 @@ function N({
40
39
  },
41
40
  r.label
42
41
  );
43
- }), s = n === "chip", c = s ? "div" : "nav", d = s ? e("flex gap-2 overflow-x-auto py-2 scrollbar-hide", u) : e("flex gap-4 overflow-x-auto scrollbar-hide", u), h = s ? void 0 : "border-b border-[var(--Border-Low-Emphasis)]";
44
- return o ? /* @__PURE__ */ a(c, { "data-slot": "sub-nav", className: e(h, t), ...l, children: /* @__PURE__ */ a(
42
+ }), t = n === "chip", c = t ? "div" : "nav", d = t ? e("flex gap-2 overflow-x-auto py-2 scrollbar-hide", u) : e("flex gap-4 overflow-x-auto scrollbar-hide", u), h = t ? void 0 : "border-b border-[var(--Border-Low-Emphasis)]";
43
+ return s ? /* @__PURE__ */ a(c, { "data-slot": "sub-nav", className: e(h, o), ...l, children: /* @__PURE__ */ a(
45
44
  "div",
46
45
  {
47
46
  "data-slot": "sub-nav-container",
48
- "data-container-size": o,
47
+ "data-container-size": s,
49
48
  className: e(
50
- g({ size: o, gutter: "none" }),
49
+ m({ size: s, gutter: "none" }),
51
50
  d
52
51
  ),
53
52
  children: i()
@@ -56,12 +55,12 @@ function N({
56
55
  c,
57
56
  {
58
57
  "data-slot": "sub-nav",
59
- className: e(h, d, t),
58
+ className: e(h, d, o),
60
59
  ...l,
61
60
  children: i()
62
61
  }
63
62
  );
64
63
  }
65
64
  export {
66
- N as SubNav
65
+ E as SubNav
67
66
  };
@@ -8,6 +8,8 @@ const x = o(
8
8
  variants: {
9
9
  variant: {
10
10
  default: "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] dark:bg-[var(--Surface-Tertiary)] dark:text-[var(--Text-High-Emphasis)] dark:ring-1 dark:ring-[var(--Border-Medium-Emphasis)]",
11
+ // 写真上のオーバーレイ用。画像の明暗に依存しない不透明な面を使う。
12
+ image: "bg-[var(--Primitive-Gray-900)] text-[var(--Primitive-White-alpha-1000)]",
11
13
  caution: "bg-[var(--Caution-Ultra-Light)] text-[var(--Text-Caution)] dark:bg-[var(--Text-Caution)]/20 dark:text-[var(--Text-Caution)]",
12
14
  sale: "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)]",
13
15
  warning: "bg-[var(--Primitive-Wood-100)] text-[var(--Text-Warning)]",
@@ -30,7 +32,7 @@ const x = o(
30
32
  }
31
33
  }
32
34
  );
33
- function u({
35
+ function p({
34
36
  className: a,
35
37
  variant: r,
36
38
  size: t,
@@ -52,6 +54,6 @@ function u({
52
54
  );
53
55
  }
54
56
  export {
55
- u as Tag,
57
+ p as Tag,
56
58
  x as tagVariants
57
59
  };