@cakejp/design-system 0.20.1 → 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 +172 -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 +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 +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 +3051 -924
  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 +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,10 +1,11 @@
1
1
  "use client";
2
- import { jsx as i } from "react/jsx-runtime";
2
+ import { jsx as n } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
4
  import { cva as l } from "class-variance-authority";
5
5
  import { ToggleGroup as d } from "radix-ui";
6
6
  import { cn as g } from "../../lib/utils.js";
7
- const c = l(
7
+ import { FORCED_COLORS_FOCUS_INSET as u } from "../../lib/focus-ring.js";
8
+ const p = l(
8
9
  "flex items-center gap-1.5 py-1.5 overflow-x-auto scrollbar-none",
9
10
  {
10
11
  variants: {
@@ -18,15 +19,22 @@ const c = l(
18
19
  width: "fit"
19
20
  }
20
21
  }
21
- ), p = l(
22
+ ), f = l(
22
23
  [
23
24
  "inline-flex shrink-0 items-center justify-center",
24
25
  "h-9 rounded-full px-3",
25
26
  "typo-label-md whitespace-nowrap",
26
27
  "outline-none transition-colors",
27
- "focus-visible:ring-2 focus-visible:ring-ring/50",
28
+ // 内側に描く(ring-inset / FORCED_COLORS_FOCUS_INSET): ToggleGroup 本体の overflow-x-auto が外側のリングを左右で切り取る
29
+ "focus-visible:ring-2 focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))]",
30
+ "focus-visible:ring-inset",
31
+ u,
28
32
  "disabled:pointer-events-none disabled:opacity-50",
29
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
33
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
34
+ // forced-colors(Windows ハイコントラスト)では押されている項目の薄オレンジ地・濃い枠が
35
+ // Canvas / CanvasText に置き換わり、押されていない項目と見分けがつかないため、
36
+ // 押されている項目だけ OS の選択色で示す(default / outline 共通。通常表示は不変)
37
+ "forced-colors:data-[state=on]:bg-[Highlight] forced-colors:data-[state=on]:text-[HighlightText]"
30
38
  ].join(" "),
31
39
  {
32
40
  variants: {
@@ -39,7 +47,7 @@ const c = l(
39
47
  "dark:data-[state=on]:bg-[var(--Surface-Accent-Primary-Light)] dark:data-[state=on]:text-[var(--Text-Accent-Primary)]"
40
48
  ].join(" "),
41
49
  outline: [
42
- "border border-[var(--Border-Low-Emphasis)] bg-transparent text-[var(--Text-Low-Emphasis)]",
50
+ "border border-[var(--Border-Control,var(--Border-Low-Emphasis))] bg-transparent text-[var(--Text-Low-Emphasis)]",
43
51
  "hover:bg-[var(--Surface-Tertiary)]",
44
52
  "data-[state=on]:border-[var(--Text-High-Emphasis)] data-[state=on]:bg-transparent data-[state=on]:text-[var(--Text-High-Emphasis)]"
45
53
  ].join(" ")
@@ -55,54 +63,54 @@ const c = l(
55
63
  size: "default"
56
64
  }
57
65
  }
58
- ), u = s.createContext({
66
+ ), c = s.createContext({
59
67
  variant: "default",
60
68
  size: "default"
61
69
  });
62
- function h({
70
+ function T({
63
71
  className: a,
64
72
  variant: e,
65
73
  size: r,
66
74
  width: o,
67
- children: n,
75
+ children: i,
68
76
  ...t
69
77
  }) {
70
- return /* @__PURE__ */ i(
78
+ return /* @__PURE__ */ n(
71
79
  d.Root,
72
80
  {
73
81
  "data-slot": "toggle-group",
74
- className: g(c({ width: o }), a),
82
+ className: g(p({ width: o }), a),
75
83
  ...t,
76
- children: /* @__PURE__ */ i(u.Provider, { value: { variant: e, size: r }, children: n })
84
+ children: /* @__PURE__ */ n(c.Provider, { value: { variant: e, size: r }, children: i })
77
85
  }
78
86
  );
79
87
  }
80
- function b({
88
+ function y({
81
89
  className: a,
82
90
  children: e,
83
91
  variant: r,
84
92
  size: o,
85
- ...n
93
+ ...i
86
94
  }) {
87
- const t = s.useContext(u);
88
- return /* @__PURE__ */ i(
95
+ const t = s.useContext(c);
96
+ return /* @__PURE__ */ n(
89
97
  d.Item,
90
98
  {
91
99
  "data-slot": "toggle-group-item",
92
100
  className: g(
93
- p({
101
+ f({
94
102
  variant: t.variant || r,
95
103
  size: t.size || o
96
104
  }),
97
105
  a
98
106
  ),
99
- ...n,
107
+ ...i,
100
108
  children: e
101
109
  }
102
110
  );
103
111
  }
104
112
  export {
105
- h as ToggleGroup,
106
- b as ToggleGroupItem,
107
- p as toggleGroupItemVariants
113
+ T as ToggleGroup,
114
+ y as ToggleGroupItem,
115
+ f as toggleGroupItemVariants
108
116
  };
@@ -1,15 +1,19 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as a } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cva as o } from "class-variance-authority";
4
- import { Toggle as a } from "radix-ui";
3
+ import { cva as i } from "class-variance-authority";
4
+ import { Toggle as n } from "radix-ui";
5
5
  import { cn as s } from "../../lib/utils.js";
6
- const d = o(
7
- "inline-flex items-center justify-center gap-2 rounded-md typo-label-sm whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
6
+ import { FORCED_COLORS_FOCUS as d } from "../../lib/focus-ring.js";
7
+ const l = i(
8
+ // forced-colors:data-[state=on]:…: Windows ハイコントラスト(forced-colors)では押されているときの
9
+ // 地(bg-accent)が Canvas に置き換わり、押されていないものと見分けがつかないため、
10
+ // 押されているときだけ OS の選択色で示す(ToggleGroup と同じ方式。通常表示は不変)
11
+ ["forced-colors:data-[state=on]:bg-[Highlight] forced-colors:data-[state=on]:text-[HighlightText] inline-flex items-center justify-center gap-2 rounded-md typo-label-sm whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", d],
8
12
  {
9
13
  variants: {
10
14
  variant: {
11
15
  default: "bg-transparent",
12
- outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
16
+ outline: "border border-[var(--Border-Control,var(--input))] bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
13
17
  },
14
18
  size: {
15
19
  default: "h-9 min-w-9 px-2",
@@ -23,22 +27,22 @@ const d = o(
23
27
  }
24
28
  }
25
29
  );
26
- function p({
27
- className: e,
28
- variant: t,
30
+ function f({
31
+ className: t,
32
+ variant: e,
29
33
  size: r,
30
- ...i
34
+ ...o
31
35
  }) {
32
- return /* @__PURE__ */ n(
33
- a.Root,
36
+ return /* @__PURE__ */ a(
37
+ n.Root,
34
38
  {
35
39
  "data-slot": "toggle",
36
- className: s(d({ variant: t, size: r, className: e })),
37
- ...i
40
+ className: s(l({ variant: e, size: r, className: t })),
41
+ ...o
38
42
  }
39
43
  );
40
44
  }
41
45
  export {
42
- p as Toggle,
43
- d as toggleVariants
46
+ f as Toggle,
47
+ l as toggleVariants
44
48
  };
@@ -1,87 +1,88 @@
1
1
  "use client";
2
- import { jsxs as f, Fragment as T, jsx as n } from "react/jsx-runtime";
2
+ import { jsxs as f, Fragment as S, jsx as n } from "react/jsx-runtime";
3
3
  import * as t from "react";
4
- import L from "iconsax-reactjs/dist/esm/ArrowDown2.js";
5
- import { XIcon as j } from "lucide-react";
6
- import { DropdownMenu as B, DropdownMenuTrigger as G, DropdownMenuContent as q, DropdownMenuItem as Z } from "../foundations/dropdown-menu.js";
7
- import { FOCUS_RING as U } from "../../lib/focus-ring.js";
8
- import { cn as A } from "../../lib/utils.js";
9
- function F(v, M) {
10
- return typeof v == "function" ? v(M) : v;
4
+ import B from "iconsax-reactjs/dist/esm/ArrowDown2.js";
5
+ import { XIcon as G } from "lucide-react";
6
+ import { DropdownMenu as q, DropdownMenuTrigger as Z, DropdownMenuContent as U, DropdownMenuItem as W } from "../foundations/dropdown-menu.js";
7
+ import { FOCUS_RING as X } from "../../lib/focus-ring.js";
8
+ import { cn as F } from "../../lib/utils.js";
9
+ function H(v, w) {
10
+ return typeof v == "function" ? v(w) : v;
11
11
  }
12
- function Y({
12
+ function K({
13
13
  items: v,
14
- activeKey: M,
15
- drawerTitle: H,
16
- open: z = !1,
17
- onOpenChange: C,
18
- ariaLabel: S = "管理メニュー"
14
+ activeKey: w,
15
+ drawerTitle: z,
16
+ open: L = !1,
17
+ onOpenChange: R,
18
+ ariaLabel: E = "管理メニュー",
19
+ linkComponent: I
19
20
  }) {
20
- const [P, w] = t.useState(null), c = t.useRef(null), y = t.useRef(/* @__PURE__ */ new Set()), k = t.useRef(null), s = t.useRef(null), b = t.useRef(null), a = t.useRef(null), g = t.useRef(/* @__PURE__ */ new Map()), R = t.useRef(/* @__PURE__ */ new Map()), d = t.useRef(null), p = t.useRef(null), E = t.useRef(null), o = t.useCallback(() => {
21
+ const N = I ?? "a", [P, M] = t.useState(null), c = t.useRef(null), y = t.useRef(/* @__PURE__ */ new Set()), k = t.useRef(null), s = t.useRef(null), b = t.useRef(null), a = t.useRef(null), g = t.useRef(/* @__PURE__ */ new Map()), T = t.useRef(/* @__PURE__ */ new Map()), d = t.useRef(null), p = t.useRef(null), D = t.useRef(null), o = t.useCallback(() => {
21
22
  p.current !== null && (clearTimeout(p.current), p.current = null);
22
23
  }, []), i = t.useCallback(() => {
23
24
  d.current !== null && (clearTimeout(d.current), d.current = null);
24
- }, []), I = t.useCallback(
25
+ }, []), j = t.useCallback(
25
26
  (e, l) => {
26
27
  l !== "touch" && (i(), o(), d.current = setTimeout(() => {
27
- s.current !== null && s.current !== e && (s.current = null, g.current.get(e)?.focus({ preventScroll: !0 })), c.current = e, y.current.add(e), w(e), d.current = null;
28
+ s.current !== null && s.current !== e && (s.current = null, g.current.get(e)?.focus({ preventScroll: !0 })), c.current = e, y.current.add(e), M(e), d.current = null;
28
29
  }, 80));
29
30
  },
30
31
  [o, i]
31
- ), D = t.useCallback(
32
+ ), A = t.useCallback(
32
33
  (e) => {
33
34
  i(), o(), p.current = setTimeout(() => {
34
- w((l) => l === e ? null : l), p.current = null;
35
+ M((l) => l === e ? null : l), p.current = null;
35
36
  }, 120);
36
37
  },
37
38
  [o, i]
38
39
  ), O = t.useCallback(() => {
39
- i(), o(), c.current = null, y.current.clear(), k.current = null, s.current = null, b.current = null, a.current = null, w(null);
40
+ i(), o(), c.current = null, y.current.clear(), k.current = null, s.current = null, b.current = null, a.current = null, M(null);
40
41
  }, [o, i]);
41
42
  return t.useEffect(
42
43
  () => () => {
43
- d.current !== null && clearTimeout(d.current), p.current !== null && clearTimeout(p.current), k.current = null, s.current = null, b.current = null, a.current = null, g.current.clear(), R.current.clear();
44
+ d.current !== null && clearTimeout(d.current), p.current !== null && clearTimeout(p.current), k.current = null, s.current = null, b.current = null, a.current = null, g.current.clear(), T.current.clear();
44
45
  },
45
46
  []
46
47
  ), t.useEffect(() => {
47
- const e = E.current;
48
+ const e = D.current;
48
49
  if (!e || typeof ResizeObserver > "u") return;
49
50
  const l = () => {
50
51
  const u = e.getBoundingClientRect();
51
52
  (getComputedStyle(e).display === "none" || u.width === 0 || u.height === 0) && O();
52
53
  }, h = new ResizeObserver(l);
53
54
  return h.observe(e), l(), () => h.disconnect();
54
- }, [O]), /* @__PURE__ */ f(T, { children: [
55
+ }, [O]), /* @__PURE__ */ f(S, { children: [
55
56
  /* @__PURE__ */ n(
56
57
  "nav",
57
58
  {
58
- ref: E,
59
+ ref: D,
59
60
  "data-slot": "admin-side-nav",
60
- "aria-label": S,
61
+ "aria-label": E,
61
62
  className: "hidden @md:flex fixed left-0 top-16 bottom-0 z-[var(--Z-Sticky)] w-[72px] flex-col items-center bg-[var(--Surface-Elevated)] border-r border-[var(--Border-Low-Emphasis)]",
62
63
  children: v.map((e) => {
63
- const l = M === e.key, h = !!e.subMenus && e.subMenus.length > 0;
64
+ const l = w === e.key, h = !!e.subMenus && e.subMenus.length > 0;
64
65
  return /* @__PURE__ */ n("div", { className: "relative", children: (() => {
65
- const u = A(
66
+ const u = F(
66
67
  "flex h-16 w-16 flex-col items-center justify-center gap-1 rounded-md transition-colors",
67
68
  l ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)]",
68
- U
69
- ), m = /* @__PURE__ */ f(T, { children: [
70
- F(e.icon, { active: l, placement: "rail" }),
69
+ X
70
+ ), m = /* @__PURE__ */ f(S, { children: [
71
+ H(e.icon, { active: l, placement: "rail" }),
71
72
  /* @__PURE__ */ n("span", { className: "max-w-12 text-center typo-label-xs", children: e.label })
72
73
  ] });
73
74
  return h ? /* @__PURE__ */ f(
74
- B,
75
+ q,
75
76
  {
76
77
  modal: !1,
77
78
  open: P === e.key,
78
79
  onOpenChange: (r) => {
79
- o(), r ? (a.current === e.key && (a.current = null), c.current = null, y.current.delete(e.key), w(e.key)) : w(
80
+ o(), r ? (a.current === e.key && (a.current = null), c.current = null, y.current.delete(e.key), M(e.key)) : M(
80
81
  (x) => x === e.key ? null : x
81
82
  );
82
83
  },
83
84
  children: [
84
- /* @__PURE__ */ n(G, { asChild: !0, children: /* @__PURE__ */ n(
85
+ /* @__PURE__ */ n(Z, { asChild: !0, children: /* @__PURE__ */ n(
85
86
  "button",
86
87
  {
87
88
  ref: (r) => {
@@ -96,19 +97,19 @@ function Y({
96
97
  k.current === e.key && (k.current = null);
97
98
  },
98
99
  onPointerEnter: (r) => {
99
- k.current === e.key || b.current === e.key || I(e.key, r.pointerType);
100
+ k.current === e.key || b.current === e.key || j(e.key, r.pointerType);
100
101
  },
101
102
  onPointerDownCapture: () => {
102
103
  i(), P !== e.key && (s.current = e.key);
103
104
  },
104
105
  onPointerLeave: () => {
105
- b.current === e.key && (b.current = null), D(e.key);
106
+ b.current === e.key && (b.current = null), A(e.key);
106
107
  },
107
108
  children: m
108
109
  }
109
110
  ) }),
110
111
  /* @__PURE__ */ n(
111
- q,
112
+ U,
112
113
  {
113
114
  side: "right",
114
115
  align: "start",
@@ -116,7 +117,7 @@ function Y({
116
117
  collisionPadding: 8,
117
118
  className: "w-[240px] rounded-2xl p-2 shadow-menu",
118
119
  onPointerEnter: o,
119
- onPointerLeave: () => D(e.key),
120
+ onPointerLeave: () => A(e.key),
120
121
  onPointerMoveCapture: (r) => {
121
122
  c.current === e.key && r.preventDefault();
122
123
  },
@@ -126,7 +127,7 @@ function Y({
126
127
  },
127
128
  onOpenAutoFocus: (r) => {
128
129
  c.current === e.key ? r.preventDefault() : s.current === e.key && (r.preventDefault(), requestAnimationFrame(() => {
129
- R.current.get(e.key)?.focus();
130
+ T.current.get(e.key)?.focus();
130
131
  }));
131
132
  },
132
133
  onCloseAutoFocus: (r) => {
@@ -135,21 +136,21 @@ function Y({
135
136
  }))), a.current === e.key && (a.current = null);
136
137
  },
137
138
  children: e.subMenus.map((r, x) => /* @__PURE__ */ n(
138
- Z,
139
+ W,
139
140
  {
140
141
  asChild: !0,
141
142
  className: "min-h-11 px-4",
142
- onPointerLeave: (N) => {
143
- c.current === e.key && N.preventDefault();
143
+ onPointerLeave: (C) => {
144
+ c.current === e.key && C.preventDefault();
144
145
  },
145
146
  children: /* @__PURE__ */ n(
146
- "a",
147
+ N,
147
148
  {
148
- ref: x === 0 ? (N) => {
149
- N ? R.current.set(
149
+ ref: x === 0 ? (C) => {
150
+ C ? T.current.set(
150
151
  e.key,
151
- N
152
- ) : R.current.delete(e.key);
152
+ C
153
+ ) : T.current.delete(e.key);
153
154
  } : void 0,
154
155
  href: r.href,
155
156
  children: r.label
@@ -163,7 +164,7 @@ function Y({
163
164
  ]
164
165
  }
165
166
  ) : e.href ? /* @__PURE__ */ n(
166
- "a",
167
+ N,
167
168
  {
168
169
  href: e.href,
169
170
  className: u,
@@ -175,58 +176,60 @@ function Y({
175
176
  })
176
177
  }
177
178
  ),
178
- z && /* @__PURE__ */ f("div", { className: "fixed inset-0 z-[var(--Z-Overlay)] @md:hidden", children: [
179
+ L && /* @__PURE__ */ f("div", { className: "fixed inset-0 z-[var(--Z-Overlay)] @md:hidden", children: [
179
180
  /* @__PURE__ */ n(
180
181
  "div",
181
182
  {
182
- className: "absolute inset-0 bg-[var(--Primitive-Black-alpha-1000)]/40",
183
- onClick: () => C?.(!1)
183
+ className: "absolute inset-0 bg-[var(--Overlay-Medium)]",
184
+ onClick: () => R?.(!1)
184
185
  }
185
186
  ),
186
187
  /* @__PURE__ */ f(
187
188
  "nav",
188
189
  {
189
- "aria-label": S,
190
+ "aria-label": E,
190
191
  className: "absolute left-0 top-0 h-full w-[280px] bg-[var(--Surface-Primary)] shadow-lg overflow-y-auto dark:bg-[var(--Primitive-Gray-900)]",
191
192
  children: [
192
193
  /* @__PURE__ */ f("div", { className: "flex items-center justify-between px-4 py-3", children: [
193
- /* @__PURE__ */ n("span", { className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: H }),
194
+ /* @__PURE__ */ n("span", { className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: z }),
194
195
  /* @__PURE__ */ n(
195
196
  "button",
196
197
  {
197
- onClick: () => C?.(!1),
198
+ onClick: () => R?.(!1),
198
199
  className: "flex size-10 shrink-0 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden",
199
200
  "aria-label": "閉じる",
200
- children: /* @__PURE__ */ n(j, { className: "size-5" })
201
+ children: /* @__PURE__ */ n(G, { className: "size-5" })
201
202
  }
202
203
  )
203
204
  ] }),
204
205
  v.map((e) => {
205
- const l = M === e.key, h = !!e.subMenus && e.subMenus.length > 0;
206
+ const l = w === e.key, h = !!e.subMenus && e.subMenus.length > 0;
206
207
  return /* @__PURE__ */ f("div", { children: [
207
208
  (() => {
208
- const u = A(
209
+ const u = F(
209
210
  "flex w-full items-center gap-3 px-4 py-3 transition-colors",
210
211
  l ? "text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)]" : "text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]"
211
- ), m = /* @__PURE__ */ f(T, { children: [
212
- F(e.icon, { active: l, placement: "drawer" }),
212
+ ), m = /* @__PURE__ */ f(S, { children: [
213
+ H(e.icon, { active: l, placement: "drawer" }),
213
214
  /* @__PURE__ */ n("span", { className: "typo-label-md", children: e.label }),
214
- h && /* @__PURE__ */ n(L, { size: 16, className: "ml-auto text-[var(--Text-Low-Emphasis)]" })
215
+ h && /* @__PURE__ */ n(B, { size: 16, className: "ml-auto text-[var(--Text-Low-Emphasis)]" })
215
216
  ] });
216
217
  return e.href ? /* @__PURE__ */ n(
217
- "a",
218
+ N,
218
219
  {
219
220
  href: e.href,
220
221
  className: u,
221
222
  "aria-current": l ? "page" : void 0,
223
+ onClick: () => R?.(!1),
222
224
  children: m
223
225
  }
224
226
  ) : /* @__PURE__ */ n("button", { type: "button", className: u, children: m });
225
227
  })(),
226
228
  h && /* @__PURE__ */ n("div", { className: "bg-[var(--Surface-Secondary)] dark:bg-[var(--Primitive-Gray-900)]", children: e.subMenus.map((u) => /* @__PURE__ */ n(
227
- "a",
229
+ N,
228
230
  {
229
231
  href: u.href,
232
+ onClick: () => R?.(!1),
230
233
  className: "flex min-h-11 items-center px-12 py-2.5 typo-body-md text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)]",
231
234
  children: u.label
232
235
  },
@@ -241,5 +244,5 @@ function Y({
241
244
  ] });
242
245
  }
243
246
  export {
244
- Y as AdminSideNav
247
+ K as AdminSideNav
245
248
  };
@@ -1,54 +1,57 @@
1
- import { jsxs as r, jsx as a, Fragment as x } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as a, Fragment as w } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as e } from "../../lib/utils.js";
4
- import { SectionHeader as f } from "./section-header.js";
5
- const c = {
4
+ import { SectionHeader as b } from "./section-header.js";
5
+ const i = {
6
6
  sm: "w-[48vw] @md:w-[180px]",
7
7
  md: "w-[70vw] @md:w-[260px]",
8
8
  lg: "w-[85vw] @md:w-[320px]"
9
- }, w = {
9
+ }, N = {
10
10
  "16/9": "aspect-[16/9]",
11
11
  "1/1": "aspect-[1/1]",
12
12
  "4/3": "aspect-[4/3]",
13
13
  "3/4": "aspect-[3/4]"
14
14
  };
15
- function j({
15
+ function T({
16
16
  title: n,
17
- subtitle: i,
18
- moreHref: d,
19
- moreLabel: p,
20
- headerSize: m,
21
- items: h,
22
- aspectRatio: u = "16/9",
17
+ subtitle: d,
18
+ moreHref: p,
19
+ moreLabel: m,
20
+ headerSize: h,
21
+ items: u,
22
+ aspectRatio: v = "16/9",
23
23
  bannerSize: l = "md",
24
- className: v
24
+ className: x,
25
+ linkComponent: c
25
26
  }) {
27
+ const f = c ?? "a";
26
28
  return /* @__PURE__ */ r(
27
29
  "section",
28
30
  {
29
31
  "data-slot": "banner-carousel",
30
- className: e("py-4", v),
32
+ className: e("py-4", x),
31
33
  children: [
32
34
  /* @__PURE__ */ a(
33
- f,
35
+ b,
34
36
  {
35
37
  title: n,
36
- subtitle: i,
37
- moreHref: d,
38
- moreLabel: p,
39
- size: m,
38
+ subtitle: d,
39
+ moreHref: p,
40
+ moreLabel: m,
41
+ size: h,
42
+ linkComponent: c,
40
43
  className: "px-4"
41
44
  }
42
45
  ),
43
46
  /* @__PURE__ */ r("div", { className: "flex gap-3 overflow-x-auto px-4 pb-2 scrollbar-hide mt-3", children: [
44
- h.map((s, o) => {
45
- const t = /* @__PURE__ */ r(x, { children: [
47
+ u.map((s, t) => {
48
+ const o = /* @__PURE__ */ r(w, { children: [
46
49
  /* @__PURE__ */ a(
47
50
  "div",
48
51
  {
49
52
  className: e(
50
53
  "overflow-hidden rounded-lg",
51
- w[u]
54
+ N[v]
52
55
  ),
53
56
  children: /* @__PURE__ */ a(
54
57
  "img",
@@ -64,26 +67,26 @@ function j({
64
67
  s.sublabel && /* @__PURE__ */ a("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: s.sublabel })
65
68
  ] });
66
69
  return s.href ? /* @__PURE__ */ a(
67
- "a",
70
+ f,
68
71
  {
69
72
  href: s.href,
70
73
  className: e(
71
74
  "group shrink-0",
72
- c[l]
75
+ i[l]
73
76
  ),
74
- children: /* @__PURE__ */ a("div", { className: "transition-opacity duration-[var(--Motion-Duration-Fast)] group-hover:opacity-80", children: t })
77
+ children: /* @__PURE__ */ a("div", { className: "transition-opacity duration-[var(--Motion-Duration-Fast)] group-hover:opacity-80", children: o })
75
78
  },
76
- o
79
+ t
77
80
  ) : /* @__PURE__ */ a(
78
81
  "div",
79
82
  {
80
83
  className: e(
81
84
  "shrink-0",
82
- c[l]
85
+ i[l]
83
86
  ),
84
- children: t
87
+ children: o
85
88
  },
86
- o
89
+ t
87
90
  );
88
91
  }),
89
92
  /* @__PURE__ */ a("div", { className: "shrink-0 w-4", "aria-hidden": "true" })
@@ -93,5 +96,5 @@ function j({
93
96
  );
94
97
  }
95
98
  export {
96
- j as BannerCarousel
99
+ T as BannerCarousel
97
100
  };
@@ -1,14 +1,15 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as a } from "../../lib/utils.js";
4
- import { NotificationBadge as d } from "./notification-badge.js";
5
- function x({
4
+ import { NotificationBadge as b } from "./notification-badge.js";
5
+ function h({
6
6
  className: n,
7
7
  items: s,
8
- banner: t,
9
- ...c
8
+ banner: o,
9
+ linkComponent: c,
10
+ ...i
10
11
  }) {
11
- return /* @__PURE__ */ o(
12
+ return /* @__PURE__ */ t(
12
13
  "nav",
13
14
  {
14
15
  "data-slot": "bottom-tab-bar",
@@ -17,27 +18,27 @@ function x({
17
18
  "fixed inset-x-0 bottom-0 z-[var(--Z-Floating)] border-t border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Elevated)] pb-[env(safe-area-inset-bottom)] @md:hidden",
18
19
  n
19
20
  ),
20
- ...c,
21
+ ...i,
21
22
  children: [
22
- t && /* @__PURE__ */ r(
23
+ o && /* @__PURE__ */ r(
23
24
  "div",
24
25
  {
25
26
  "data-slot": "bottom-tab-bar-banner",
26
27
  className: "border-b border-[var(--Border-Low-Emphasis)]",
27
- children: t
28
+ children: o
28
29
  }
29
30
  ),
30
31
  /* @__PURE__ */ r("div", { className: "flex h-[52px] items-center justify-around px-1 @sm:px-4", children: s.map((e) => {
31
- const i = e.href ? "a" : "button", l = e.href ? { href: e.href } : { type: "button", onClick: e.onClick };
32
- return /* @__PURE__ */ o(
33
- i,
32
+ const l = e.href ? c ?? "a" : "button", d = e.href ? { href: e.href, onClick: e.onClick } : { type: "button", onClick: e.onClick };
33
+ return /* @__PURE__ */ t(
34
+ l,
34
35
  {
35
36
  className: a(
36
37
  "relative flex flex-1 flex-col items-center gap-0.5 pb-1 pt-0.5 transition-colors min-w-0",
37
38
  e.isActive ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Text-High-Emphasis)]"
38
39
  ),
39
40
  "aria-current": e.isActive ? "page" : void 0,
40
- ...l,
41
+ ...d,
41
42
  children: [
42
43
  /* @__PURE__ */ r(
43
44
  "span",
@@ -47,7 +48,7 @@ function x({
47
48
  e.isActive && "bg-[var(--Surface-Accent-Primary-Light)]"
48
49
  ),
49
50
  children: /* @__PURE__ */ r(
50
- d,
51
+ b,
51
52
  {
52
53
  count: e.badgeCount,
53
54
  size: "md",
@@ -77,5 +78,5 @@ function x({
77
78
  );
78
79
  }
79
80
  export {
80
- x as BottomTabBar
81
+ h as BottomTabBar
81
82
  };