@cakejp/design-system 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/CLAUDE.md +1 -0
  3. package/bin/init.js +29 -6
  4. package/contracts/components.json +42 -7
  5. package/contracts/composition.json +8 -2
  6. package/contracts/rules.json +5 -1
  7. package/contracts/screen-patterns.json +1 -1
  8. package/dist/components/ec/_mypage-menu-data.js +166 -0
  9. package/dist/components/ec/admin-shell.js +202 -0
  10. package/dist/components/ec/anniversary-card.js +63 -0
  11. package/dist/components/ec/cake-logo.js +38 -0
  12. package/dist/components/ec/chart-controls.js +91 -0
  13. package/dist/components/ec/countdown-timer.js +50 -0
  14. package/dist/components/ec/coupon-card.js +136 -0
  15. package/dist/components/ec/delivery-calendar.js +105 -0
  16. package/dist/components/ec/mypage-shell.js +98 -0
  17. package/dist/components/ec/order-section.js +53 -0
  18. package/dist/components/ec/order-summary.js +78 -0
  19. package/dist/components/ec/payment-method.js +81 -0
  20. package/dist/components/ec/product-card.js +235 -0
  21. package/dist/components/ec/product-carousel.js +106 -0
  22. package/dist/components/ec/product-cta.js +80 -0
  23. package/dist/components/ec/product-detail-bar.js +86 -0
  24. package/dist/components/ec/product-detail-sidebar.js +296 -0
  25. package/dist/components/ec/product-list-item.js +266 -0
  26. package/dist/components/ec/product-option.js +165 -0
  27. package/dist/components/ec/rating-stars.js +74 -0
  28. package/dist/components/ec/review-card.js +126 -0
  29. package/dist/components/ec/review-form.js +181 -0
  30. package/dist/components/ec/review-summary.js +95 -0
  31. package/dist/components/ec/shop-card.js +179 -0
  32. package/dist/components/ec/stat-card.js +50 -0
  33. package/dist/components/foundations/accordion.js +67 -0
  34. package/dist/components/foundations/alert-dialog.js +165 -0
  35. package/dist/components/foundations/alert.js +218 -0
  36. package/dist/components/foundations/aspect-ratio.js +10 -0
  37. package/dist/components/foundations/avatar.js +58 -0
  38. package/dist/components/foundations/badge.js +54 -0
  39. package/dist/components/foundations/breadcrumb.js +104 -0
  40. package/dist/components/foundations/button.js +99 -0
  41. package/dist/components/foundations/calendar.js +173 -0
  42. package/dist/components/foundations/card.js +109 -0
  43. package/dist/components/foundations/checkbox-card.js +111 -0
  44. package/dist/components/foundations/checkbox-group.js +92 -0
  45. package/dist/components/foundations/checkbox.js +90 -0
  46. package/dist/components/foundations/chip-variants.js +41 -0
  47. package/dist/components/foundations/collapsible.js +34 -0
  48. package/dist/components/foundations/command.js +171 -0
  49. package/dist/components/foundations/context-menu.js +225 -0
  50. package/dist/components/foundations/data-table.js +59 -0
  51. package/dist/components/foundations/dialog.js +148 -0
  52. package/dist/components/foundations/drawer.js +129 -0
  53. package/dist/components/foundations/dropdown-menu.js +232 -0
  54. package/dist/components/foundations/field.js +150 -0
  55. package/dist/components/foundations/file-input.js +116 -0
  56. package/dist/components/foundations/form.js +101 -0
  57. package/dist/components/foundations/hover-card.js +41 -0
  58. package/dist/components/foundations/icon-badge.js +41 -0
  59. package/dist/components/foundations/input.js +74 -0
  60. package/dist/components/foundations/label.js +29 -0
  61. package/dist/components/foundations/menubar.js +252 -0
  62. package/dist/components/foundations/navigation-menu.js +171 -0
  63. package/dist/components/foundations/pagination.js +120 -0
  64. package/dist/components/foundations/popover.js +45 -0
  65. package/dist/components/foundations/progress.js +34 -0
  66. package/dist/components/foundations/radio-group.js +134 -0
  67. package/dist/components/foundations/responsive-dialog.js +76 -0
  68. package/dist/components/foundations/scroll-area.js +62 -0
  69. package/dist/components/foundations/select.js +190 -0
  70. package/dist/components/foundations/separator.js +27 -0
  71. package/dist/components/foundations/sheet.js +130 -0
  72. package/dist/components/foundations/skeleton.js +15 -0
  73. package/dist/components/foundations/skip-link.js +27 -0
  74. package/dist/components/foundations/slider.js +81 -0
  75. package/dist/components/foundations/social-icon.js +36 -0
  76. package/dist/components/foundations/sonner.js +49 -0
  77. package/dist/components/foundations/spinner.js +28 -0
  78. package/dist/components/foundations/switch.js +54 -0
  79. package/dist/components/foundations/table.js +115 -0
  80. package/dist/components/foundations/tabs.js +102 -0
  81. package/dist/components/foundations/textarea.js +65 -0
  82. package/dist/components/foundations/toggle-group.js +107 -0
  83. package/dist/components/foundations/toggle.js +44 -0
  84. package/dist/components/foundations/tooltip.js +56 -0
  85. package/dist/components/primitives/admin-header.js +31 -0
  86. package/dist/components/primitives/admin-side-nav.js +135 -0
  87. package/dist/components/primitives/banner-carousel.js +97 -0
  88. package/dist/components/primitives/bottom-tab-bar.js +81 -0
  89. package/dist/components/primitives/bulk-action-bar.js +27 -0
  90. package/dist/components/primitives/category-scroll.js +110 -0
  91. package/dist/components/primitives/category-shortcuts.js +66 -0
  92. package/dist/components/primitives/chat-composer.js +141 -0
  93. package/dist/components/primitives/chip.js +123 -0
  94. package/dist/components/primitives/coach-mark.js +102 -0
  95. package/dist/components/primitives/combobox.js +88 -0
  96. package/dist/components/primitives/container.js +50 -0
  97. package/dist/components/primitives/content-carousel.js +144 -0
  98. package/dist/components/primitives/date-picker.js +175 -0
  99. package/dist/components/primitives/empty-state.js +32 -0
  100. package/dist/components/primitives/error-state.js +115 -0
  101. package/dist/components/primitives/filter-bar.js +144 -0
  102. package/dist/components/primitives/footer.js +247 -0
  103. package/dist/components/primitives/form-field.js +38 -0
  104. package/dist/components/primitives/funnel-shell.js +99 -0
  105. package/dist/components/primitives/header.js +257 -0
  106. package/dist/components/primitives/image-carousel.js +156 -0
  107. package/dist/components/primitives/image-gallery.js +177 -0
  108. package/dist/components/primitives/image-input.js +207 -0
  109. package/dist/components/primitives/image-uploader.js +69 -0
  110. package/dist/components/primitives/kebab-menu.js +40 -0
  111. package/dist/components/primitives/list-item.js +80 -0
  112. package/dist/components/primitives/menu-drawer.js +154 -0
  113. package/dist/components/primitives/multi-select.js +93 -0
  114. package/dist/components/primitives/notification-badge.js +61 -0
  115. package/dist/components/primitives/notification-list.js +72 -0
  116. package/dist/components/primitives/number-input.js +235 -0
  117. package/dist/components/primitives/price-display.js +101 -0
  118. package/dist/components/primitives/progress-steps.js +62 -0
  119. package/dist/components/primitives/search-bar.js +81 -0
  120. package/dist/components/primitives/search-panel.js +43 -0
  121. package/dist/components/primitives/section-header.js +148 -0
  122. package/dist/components/primitives/section-nav.js +85 -0
  123. package/dist/components/primitives/section.js +78 -0
  124. package/dist/components/primitives/share-buttons.js +102 -0
  125. package/dist/components/primitives/side-nav.js +98 -0
  126. package/dist/components/primitives/social-login-button.js +53 -0
  127. package/dist/components/primitives/standard-page-shell.js +34 -0
  128. package/dist/components/primitives/status-count-tabs.js +42 -0
  129. package/dist/components/primitives/sticky-action-bar.js +26 -0
  130. package/dist/components/primitives/sub-nav.js +67 -0
  131. package/dist/components/primitives/tag.js +57 -0
  132. package/dist/components/primitives/timeline.js +55 -0
  133. package/dist/components/primitives/workspace-shell.js +57 -0
  134. package/dist/index.css +1 -1
  135. package/dist/index.js +22961 -13130
  136. package/dist/lib/field-labelling.js +29 -0
  137. package/dist/lib/focus-ring.js +6 -0
  138. package/dist/lib/pagination-range.js +42 -0
  139. package/dist/lib/use-value-length.js +63 -0
  140. package/dist/lib/utils.js +33 -0
  141. package/dist/types/components/ec/_mypage-menu-data.d.ts +3 -3
  142. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  143. package/dist/types/components/ec/anniversary-card.d.ts +1 -1
  144. package/dist/types/components/ec/mypage-shell.d.ts +3 -3
  145. package/dist/types/components/ec/product-card.d.ts +1 -1
  146. package/dist/types/components/ec/product-carousel.d.ts +3 -3
  147. package/dist/types/components/ec/stat-card.d.ts +1 -1
  148. package/dist/types/components/foundations/accordion.d.ts +8 -1
  149. package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
  150. package/dist/types/components/foundations/calendar.d.ts +1 -1
  151. package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
  152. package/dist/types/components/foundations/command.d.ts +1 -1
  153. package/dist/types/components/foundations/data-table.d.ts +6 -1
  154. package/dist/types/components/foundations/field.d.ts +2 -2
  155. package/dist/types/components/foundations/file-input.d.ts +1 -1
  156. package/dist/types/components/foundations/pagination.d.ts +1 -1
  157. package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
  158. package/dist/types/components/foundations/skip-link.d.ts +1 -1
  159. package/dist/types/components/foundations/slider.d.ts +13 -1
  160. package/dist/types/components/primitives/admin-header.d.ts +11 -1
  161. package/dist/types/components/primitives/admin-side-nav.d.ts +19 -1
  162. package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
  163. package/dist/types/components/primitives/category-scroll.d.ts +2 -2
  164. package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
  165. package/dist/types/components/primitives/chat-composer.d.ts +1 -1
  166. package/dist/types/components/primitives/chip.d.ts +1 -1
  167. package/dist/types/components/primitives/combobox.d.ts +9 -1
  168. package/dist/types/components/primitives/content-carousel.d.ts +1 -1
  169. package/dist/types/components/primitives/form-field.d.ts +1 -1
  170. package/dist/types/components/primitives/image-input.d.ts +1 -1
  171. package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
  172. package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
  173. package/dist/types/components/primitives/multi-select.d.ts +9 -1
  174. package/dist/types/components/primitives/notification-list.d.ts +1 -1
  175. package/dist/types/components/primitives/search-panel.d.ts +1 -1
  176. package/dist/types/components/primitives/section-nav.d.ts +1 -1
  177. package/dist/types/components/primitives/side-nav.d.ts +1 -1
  178. package/dist/types/components/primitives/social-login-button.d.ts +1 -1
  179. package/dist/types/lib/field-labelling.d.ts +66 -0
  180. package/package.json +2 -2
  181. package/scripts/codemod/README.md +9 -0
@@ -0,0 +1,29 @@
1
+ import * as a from "react";
2
+ const n = a.createContext(null);
3
+ function t() {
4
+ return a.useContext(n);
5
+ }
6
+ function d(r, e) {
7
+ if (!e) return {};
8
+ const i = [e.descriptionId, e.errorId].filter(Boolean).join(" ");
9
+ return {
10
+ id: r.id ?? e.controlId,
11
+ // aria-label が明示されていれば labelledby は当てない(二重命名を避ける)
12
+ "aria-labelledby": r["aria-labelledby"] ?? (r["aria-label"] ? void 0 : e.labelId),
13
+ "aria-describedby": r["aria-describedby"] ?? (i || void 0)
14
+ };
15
+ }
16
+ function o(r, e) {
17
+ if (!e) return {};
18
+ const i = [e.descriptionId, e.errorId].filter(Boolean).join(" ");
19
+ return {
20
+ id: r.id ?? e.controlId,
21
+ "aria-describedby": r["aria-describedby"] ?? (i || void 0)
22
+ };
23
+ }
24
+ export {
25
+ n as FieldLabellingContext,
26
+ d as resolveFieldAria,
27
+ o as resolveNativeFieldAria,
28
+ t as useFieldLabelling
29
+ };
@@ -0,0 +1,6 @@
1
+ const i = "focus-visible:border-[var(--Focus-High-Emphasis)] focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50", s = "focus-within:border-[var(--Focus-High-Emphasis)] focus-within:ring-[3px] focus-within:ring-[var(--Focus-High-Emphasis)]/50", o = "focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-[var(--Focus-High-Emphasis)]/50";
2
+ export {
3
+ i as FOCUS_RING,
4
+ o as FOCUS_RING_INSET,
5
+ s as FOCUS_RING_WITHIN
6
+ };
@@ -0,0 +1,42 @@
1
+ function p({
2
+ currentPage: f,
3
+ totalPages: g,
4
+ siblingCount: c = 1
5
+ }) {
6
+ const t = Math.max(0, Math.floor(g));
7
+ if (t === 0) return [];
8
+ const n = Math.max(0, Math.floor(c)), e = Math.min(t, Math.max(1, Math.floor(f))), m = n * 2 + 5;
9
+ if (t <= m)
10
+ return Array.from({ length: t }, (r, i) => i + 1);
11
+ const s = Math.max(e - n, 1), l = Math.min(e + n, t), a = s > 2, h = l < t - 1, o = n * 2 + 3;
12
+ if (!a && h)
13
+ return [
14
+ ...Array.from({ length: o }, (r, i) => i + 1),
15
+ "ellipsis",
16
+ t
17
+ ];
18
+ if (a && !h) {
19
+ const r = t - o + 1;
20
+ return [
21
+ 1,
22
+ "ellipsis",
23
+ ...Array.from(
24
+ { length: o },
25
+ (i, M) => r + M
26
+ )
27
+ ];
28
+ }
29
+ return [
30
+ 1,
31
+ "ellipsis",
32
+ ...Array.from(
33
+ { length: l - s + 1 },
34
+ (r, i) => s + i
35
+ ),
36
+ "ellipsis",
37
+ t
38
+ ];
39
+ }
40
+ export {
41
+ p as getPaginationRange
42
+ };
@@ -0,0 +1,63 @@
1
+ import * as u from "react";
2
+ function a(e, c) {
3
+ if (typeof e == "function") {
4
+ const r = e(c);
5
+ return typeof r == "function" ? r : void 0;
6
+ }
7
+ e && typeof e == "object" && (e.current = c);
8
+ }
9
+ function y(e, c) {
10
+ const r = Object.getOwnPropertyDescriptor(e, "value"), i = Object.getOwnPropertyDescriptor(
11
+ Object.getPrototypeOf(e),
12
+ "value"
13
+ ), t = r ?? i;
14
+ if (!t?.get || !t.set || t.configurable === !1)
15
+ return;
16
+ const l = function() {
17
+ return t.get.call(this);
18
+ }, s = function(n) {
19
+ t.set.call(this, n), c();
20
+ };
21
+ return Object.defineProperty(e, "value", {
22
+ configurable: !0,
23
+ enumerable: t.enumerable,
24
+ get: l,
25
+ set: s
26
+ }), () => {
27
+ const n = Object.getOwnPropertyDescriptor(e, "value");
28
+ n?.get !== l || n.set !== s || (r ? Object.defineProperty(e, "value", r) : Reflect.deleteProperty(e, "value"));
29
+ };
30
+ }
31
+ function O({
32
+ enabled: e,
33
+ value: c,
34
+ defaultValue: r,
35
+ forwardedRef: i
36
+ }) {
37
+ const t = c !== void 0, l = u.useRef(null), s = u.useRef(void 0), n = u.useRef(void 0), [g, v] = u.useState(
38
+ () => r != null ? String(r).length : 0
39
+ ), f = u.useCallback(() => {
40
+ const o = l.current;
41
+ o && v(o.value.length);
42
+ }, []), b = u.useCallback(
43
+ (o) => {
44
+ if (s.current?.(), s.current = void 0, l.current = o, !o) {
45
+ const p = n.current;
46
+ n.current = void 0, p ? p() : a(i, null);
47
+ return;
48
+ }
49
+ n.current = a(i, o), e && !t && (s.current = y(o, f));
50
+ },
51
+ [e, i, t, f]
52
+ );
53
+ return u.useLayoutEffect(() => {
54
+ !e || t || f();
55
+ }), {
56
+ ref: b,
57
+ length: t ? String(c ?? "").length : g,
58
+ syncFromDom: f
59
+ };
60
+ }
61
+ export {
62
+ O as useValueLength
63
+ };
@@ -0,0 +1,33 @@
1
+ import { clsx as t } from "clsx";
2
+ import { extendTailwindMerge as e } from "tailwind-merge";
3
+ const p = [
4
+ "typo-heading-5xl",
5
+ "typo-heading-4xl",
6
+ "typo-heading-3xl",
7
+ "typo-heading-2xl",
8
+ "typo-heading-xl",
9
+ "typo-heading-lg",
10
+ "typo-heading-md",
11
+ "typo-heading-sm",
12
+ "typo-body-lg",
13
+ "typo-body-md",
14
+ "typo-body-sm",
15
+ "typo-body-xs",
16
+ "typo-label-lg",
17
+ "typo-label-md",
18
+ "typo-label-sm",
19
+ "typo-label-xs"
20
+ ], y = e({
21
+ extend: {
22
+ classGroups: {
23
+ "cake-typography": p
24
+ }
25
+ }
26
+ });
27
+ function n(...o) {
28
+ return y(t(o));
29
+ }
30
+ export {
31
+ p as TYPO_PRESET_CLASS_NAMES,
32
+ n as cn
33
+ };
@@ -1,4 +1,4 @@
1
- import type { SideNavGroup } from "../../components/primitives/side-nav";
1
+ import type { SideNavGroup } from "../../../components/primitives/side-nav";
2
2
  /**
3
3
  * Cake.jp マイページのメニュー定義
4
4
  *
@@ -6,8 +6,8 @@ import type { SideNavGroup } from "../../components/primitives/side-nav";
6
6
  *
7
7
  * ### 使い方
8
8
  * ```tsx
9
- * import { SideNav } from '../../components/primitives/side-nav'
10
- * import { mypageMenuGroups } from '../../components/ec/_mypage-menu-data'
9
+ * import { SideNav } from '../../../components/primitives/side-nav'
10
+ * import { mypageMenuGroups } from '../../../components/ec/_mypage-menu-data'
11
11
  *
12
12
  * <SideNav groups={mypageMenuGroups} activeMenu="news" ariaLabel="マイページメニュー" />
13
13
  * ```
@@ -27,7 +27,7 @@
27
27
  * - CSS: admin_shops/layout/nav_layout.css
28
28
  */
29
29
  import * as React from "react";
30
- import { type AdminNavItem } from "../../components/primitives/admin-side-nav";
30
+ import { type AdminNavItem } from "../../../components/primitives/admin-side-nav";
31
31
  export declare function MissingComponent({ name, children, className, }: {
32
32
  name: string;
33
33
  children: React.ReactNode;
@@ -25,7 +25,7 @@ export interface AnniversaryCardProps extends React.HTMLAttributes<HTMLDivElemen
25
25
  *
26
26
  * ### インポート
27
27
  * ```tsx
28
- * import { AnniversaryCard } from '../../components/ec/anniversary-card'
28
+ * import { AnniversaryCard } from '../../../components/ec/anniversary-card'
29
29
  * ```
30
30
  *
31
31
  * ### Props(主要なもの)
@@ -27,9 +27,9 @@
27
27
  * 「マイページ配下だけ Cake.jp ロゴに割れる」問題を避けられる。
28
28
  */
29
29
  import React from "react";
30
- import { type HeaderAction, type HeaderNavItem } from "../../components/primitives/header";
31
- import { type SideNavGroup, type SideNavItem } from "../../components/primitives/side-nav";
32
- import { type BottomTabBarItem } from "../../components/primitives/bottom-tab-bar";
30
+ import { type HeaderAction, type HeaderNavItem } from "../../../components/primitives/header";
31
+ import { type SideNavGroup, type SideNavItem } from "../../../components/primitives/side-nav";
32
+ import { type BottomTabBarItem } from "../../../components/primitives/bottom-tab-bar";
33
33
  export interface MypageShellBreadcrumb {
34
34
  label: string;
35
35
  href?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { type TagProps } from "../../components/primitives/tag";
2
+ import { type TagProps } from "../../../components/primitives/tag";
3
3
  export interface ProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /** 商品名 */
5
5
  name: string;
@@ -1,5 +1,5 @@
1
- import { type SectionHeaderSize } from "../../components/primitives/section-header";
2
- import { type ProductCardProps } from "../../components/ec/product-card";
1
+ import { type SectionHeaderSize } from "../../../components/primitives/section-header";
2
+ import { type ProductCardProps } from "../../../components/ec/product-card";
3
3
  export interface ProductCarouselProps {
4
4
  /** セクションタイトル */
5
5
  title: string;
@@ -40,7 +40,7 @@ export interface ProductCarouselProps {
40
40
  *
41
41
  * ### インポート
42
42
  * ```tsx
43
- * import { ProductCarousel } from '../../components/ec/product-carousel'
43
+ * import { ProductCarousel } from '../../../components/ec/product-carousel'
44
44
  * ```
45
45
  *
46
46
  * ### AI 向け使用ルール
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { StatCard } from '../../components/ec/stat-card'
9
+ * import { StatCard } from '../../../components/ec/stat-card'
10
10
  * ```
11
11
  *
12
12
  * ### Props
@@ -2,6 +2,13 @@ import * as React from "react";
2
2
  import { Accordion as AccordionPrimitive } from "radix-ui";
3
3
  declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
4
  declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
- declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ interface AccordionTriggerProps extends React.ComponentProps<typeof AccordionPrimitive.Trigger> {
6
+ /**
7
+ * 見出し要素のレベル(既定: 3 = radix Accordion.Header の既定 <h3>)。
8
+ * ページの見出し階層に合わせて変更する(例: サイドバーのカテゴリナビで h2)。
9
+ */
10
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
11
+ }
12
+ declare function AccordionTrigger({ className, children, headingLevel, ...props }: AccordionTriggerProps): import("react/jsx-runtime").JSX.Element;
6
13
  declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
14
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
3
- import { Button } from "../../components/foundations/button";
3
+ import { Button } from "../../../components/foundations/button";
4
4
  declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
6
  declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { DayPicker, type DayButton } from "react-day-picker";
3
- import { Button } from "../../components/foundations/button";
3
+ import { Button } from "../../../components/foundations/button";
4
4
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { CheckboxGroup, CheckboxGroupItem } from "../../components/foundations/checkbox-group"
9
+ * import { CheckboxGroup, CheckboxGroupItem } from "../../../components/foundations/checkbox-group"
10
10
  * ```
11
11
  *
12
12
  * ### Props(CheckboxGroup)
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { Command as CommandPrimitive } from "cmdk";
3
- import { Dialog } from "../../components/foundations/dialog";
3
+ import { Dialog } from "../../../components/foundations/dialog";
4
4
  declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
6
  title?: string;
@@ -91,7 +91,7 @@ declare function DataTableInputCell({ className, value, onChange, placeholder, t
91
91
  type?: string;
92
92
  name?: string;
93
93
  }): import("react/jsx-runtime").JSX.Element;
94
- declare function DataTableSelectCell({ className, value, onValueChange, options, placeholder, ...props }: Omit<React.ComponentProps<"td">, "children" | "width" | "align"> & {
94
+ declare function DataTableSelectCell({ className, value, onValueChange, options, placeholder, "aria-label": ariaLabel, ...props }: Omit<React.ComponentProps<"td">, "children" | "width" | "align"> & {
95
95
  value?: string;
96
96
  onValueChange?: (value: string) => void;
97
97
  options: Array<{
@@ -99,6 +99,11 @@ declare function DataTableSelectCell({ className, value, onValueChange, options,
99
99
  label: string;
100
100
  }>;
101
101
  placeholder?: string;
102
+ /**
103
+ * セレクトのアクセシブルネーム(日本語)。表の見出しに相当する語を渡す。
104
+ * 未指定時は placeholder を名前に使う(`role="combobox"` は内容から名前が付かないため)。
105
+ */
106
+ "aria-label"?: string;
102
107
  }): import("react/jsx-runtime").JSX.Element;
103
108
  declare function DataTableNumberCell({ className, children, ...props }: Omit<React.ComponentProps<"td">, "width" | "align">): import("react/jsx-runtime").JSX.Element;
104
109
  export { DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState, };
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * ### インポート
9
9
  * ```tsx
10
- * import { Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator } from "../../components/foundations/field"
10
+ * import { Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator } from "../../../components/foundations/field"
11
11
  * ```
12
12
  *
13
13
  * ### 構成要素
@@ -32,7 +32,7 @@
32
32
  */
33
33
  import * as React from "react";
34
34
  import { type VariantProps } from "class-variance-authority";
35
- import { Label } from "../../components/foundations/label";
35
+ import { Label } from "../../../components/foundations/label";
36
36
  /**
37
37
  * Field — 1 フィールド分の箱(ラベル + 入力 + 説明/エラー)。
38
38
  * `FieldGroup`(gap-4)の中に並べる**縦リズムの最小単位**。
@@ -63,7 +63,7 @@ export declare function validateFileSize(files: File[], maxSize?: number): {
63
63
  *
64
64
  * ### インポート
65
65
  * ```tsx
66
- * import { FileInput } from '../../components/foundations/file-input'
66
+ * import { FileInput } from '../../../components/foundations/file-input'
67
67
  * ```
68
68
  *
69
69
  * ### AI 向け使用ルール
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { type Button } from "../../components/foundations/button";
2
+ import { type Button } from "../../../components/foundations/button";
3
3
  declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
4
4
  declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
5
5
  declare function PaginationItem({ ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../../components/foundations/dialog";
2
+ import { DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../../../components/foundations/dialog";
3
3
  declare function useIsMobile(breakpoint?: number): boolean;
4
4
  interface ResponsiveDialogProps {
5
5
  children: React.ReactNode;
@@ -19,7 +19,7 @@ export interface SkipLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElem
19
19
  *
20
20
  * ### インポート
21
21
  * ```tsx
22
- * import { SkipLink } from '../../components/foundations/skip-link'
22
+ * import { SkipLink } from '../../../components/foundations/skip-link'
23
23
  * ```
24
24
  *
25
25
  * ### 使い方(シェルを使わず素の DOM に置く場合)
@@ -1,4 +1,16 @@
1
1
  import * as React from "react";
2
2
  import { Slider as SliderPrimitive } from "radix-ui";
3
- declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ export interface SliderProps extends React.ComponentProps<typeof SliderPrimitive.Root> {
4
+ /**
5
+ * つまみ(thumb)ごとのアクセシブルネーム(日本語)。
6
+ *
7
+ * `role="slider"` を持つのは **つまみ側**なので、名前はつまみに付ける必要がある。
8
+ * 未指定のときは次の順で決まる(issue #202):
9
+ * 1. `aria-label` … つまみが 2 つ以上なら「(下限)」「(上限)」を補って区別する
10
+ * 2. `FormField` 配下ならそのラベル
11
+ * 3. `aria-labelledby`
12
+ */
13
+ thumbLabels?: string[];
14
+ }
15
+ declare function Slider({ className, defaultValue, value, min, max, thumbLabels, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
4
16
  export { Slider };
@@ -15,9 +15,19 @@ export interface AdminHeaderProps {
15
15
  * のレール(--Z-Sticky = 30)が始まる=ヘッダーが最前面・全幅で、レールはヘッダー帯に重ならない。
16
16
  * 「{shopName}管理」のような文言合成は行わない(利用側が `brand` に組み立てて渡す)。
17
17
  *
18
+ * ### ページタイトルを複製しない
19
+ *
20
+ * ページ名の正は本文の h1(`AdminShell` の `title`)。ヘッダーにはブランド・パンくず(現在地の文脈)・
21
+ * グローバル操作を置き、同じページ名をヘッダーにも出さない。置くものが無ければヘッダーバー自体を省いてよい。
22
+ *
23
+ * ### 水平 padding は本文コンテナの gutter と揃える
24
+ *
25
+ * `px-4 @md:px-6` は `AdminShell` の `<main>`(`p-4 @md:p-6`)と同値。ヘッダー内要素の左端と
26
+ * 本文 h1 の左端が同じ面に乗る。片方だけ変えるとズレが視認されるので、変更するときは両方揃えて変える。
27
+ *
18
28
  * ### インポート
19
29
  * ```tsx
20
- * import { AdminHeader } from '../../components/primitives/admin-header'
30
+ * import { AdminHeader } from '../../../components/primitives/admin-header'
21
31
  * ```
22
32
  *
23
33
  * ### Props
@@ -48,9 +48,27 @@ export interface AdminSideNavProps {
48
48
  * SP は制御された左スライドドロワー(サブメニューはアコーディオン)で表示する。
49
49
  * メニュー定義・文言・データは全て `items` prop で受け取り、部品側には焼き込まない。
50
50
  *
51
+ * ### サイドバーは 1 枚のパネルとして読ませる
52
+ *
53
+ * ヘッダー行(SP ドロワー上部の見出し + 閉じるボタン)に **border-bottom を引かない**。
54
+ * フッター(ユーザーブロック・ヘルプ導線等)を設ける場合も **上に border-top を引かない**。
55
+ * サイドバー内部を横線で区切るとパネルが分割されて見え、ナビの一体感が失われる。分離は余白が担う。
56
+ * 画面全体で見える横罫線は ①サイドバー右端の縦線 ②コンテンツヘッダー下の横線 の 2 本に絞り、
57
+ * サイドバー内で横線を引くと 2 本が十字に交差して見える(正しくは T 字で突き当たる)。
58
+ *
59
+ * ### 折りたたみトリガーはサイドバー自身に置く
60
+ *
61
+ * サイドバーに開閉(折りたたみ)を持たせる場合、トリガーは **サイドバー内ヘッダー行の右端** に置く。
62
+ * コンテンツヘッダーの左端に置くと、動かす対象と操作する場所が離れて所属が読めなくなる。
63
+ *
64
+ * ### 項目高は 44px を確保する
65
+ *
66
+ * メイン項目・サブメニュー項目とも 44px(WCAG 2.5.5 の最小ターゲット)以上にする。
67
+ * 行高が小さいテキストで縦 padding だけに頼ると割り込むため、`min-h-11` で下限を固定する。
68
+ *
51
69
  * ### インポート
52
70
  * ```tsx
53
- * import { AdminSideNav } from '../../components/primitives/admin-side-nav'
71
+ * import { AdminSideNav } from '../../../components/primitives/admin-side-nav'
54
72
  * ```
55
73
  *
56
74
  * ### Props
@@ -1,4 +1,4 @@
1
- import { type SectionHeaderSize } from "../../components/primitives/section-header";
1
+ import { type SectionHeaderSize } from "../../../components/primitives/section-header";
2
2
  export interface BannerItem {
3
3
  /** バナー画像URL */
4
4
  imageUrl: string;
@@ -40,7 +40,7 @@ export interface BannerCarouselProps {
40
40
  *
41
41
  * ### インポート
42
42
  * ```tsx
43
- * import { BannerCarousel } from '../../components/primitives/banner-carousel'
43
+ * import { BannerCarousel } from '../../../components/primitives/banner-carousel'
44
44
  * ```
45
45
  *
46
46
  * ### AI 向け使用ルール
@@ -1,4 +1,4 @@
1
- import { type SectionHeaderSize } from "../../components/primitives/section-header";
1
+ import { type SectionHeaderSize } from "../../../components/primitives/section-header";
2
2
  export interface CategoryItem {
3
3
  /** カテゴリ名 */
4
4
  name: string;
@@ -47,7 +47,7 @@ export interface CategoryScrollProps {
47
47
  *
48
48
  * ### インポート
49
49
  * ```tsx
50
- * import { CategoryScroll } from '../../components/primitives/category-scroll'
50
+ * import { CategoryScroll } from '../../../components/primitives/category-scroll'
51
51
  * ```
52
52
  *
53
53
  * ### Props(主要なもの)
@@ -31,7 +31,7 @@ export interface CategoryShortcutsProps {
31
31
  *
32
32
  * ### インポート
33
33
  * ```tsx
34
- * import { CategoryShortcuts } from '../../components/primitives/category-shortcuts'
34
+ * import { CategoryShortcuts } from '../../../components/primitives/category-shortcuts'
35
35
  * ```
36
36
  *
37
37
  * ### AI 向け使用ルール
@@ -70,7 +70,7 @@ export interface ChatComposerProps {
70
70
  *
71
71
  * ### インポート
72
72
  * ```tsx
73
- * import { ChatComposer } from "../../components/primitives/chat-composer"
73
+ * import { ChatComposer } from "../../../components/primitives/chat-composer"
74
74
  * ```
75
75
  *
76
76
  * ### 送信キー
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { chipVariants, type ChipVariantProps } from "../../components/foundations/chip-variants";
2
+ import { chipVariants, type ChipVariantProps } from "../../../components/foundations/chip-variants";
3
3
  export interface ChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ChipVariantProps {
4
4
  /** リンクとして使う場合のURL */
5
5
  href?: string;
@@ -19,6 +19,14 @@ export interface ComboboxProps {
19
19
  "aria-invalid"?: boolean;
20
20
  /** FieldError / FieldDescription の id */
21
21
  "aria-describedby"?: string;
22
+ /**
23
+ * トリガーのアクセシブルネーム(日本語)。
24
+ * `role="combobox"` は内容からは名前が付かないため、FormField の外で単体利用する
25
+ * ときはこれか `aria-labelledby` を指定する(未指定時は placeholder を名前に使う)。
26
+ */
27
+ "aria-label"?: string;
28
+ /** ラベル要素の id を直接指定する場合 */
29
+ "aria-labelledby"?: string;
22
30
  }
23
- declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
24
32
  export { Combobox };
@@ -44,7 +44,7 @@ export interface ContentCarouselProps extends Omit<React.HTMLAttributes<HTMLDivE
44
44
  *
45
45
  * ### インポート
46
46
  * ```tsx
47
- * import { ContentCarousel } from '../../components/primitives/content-carousel'
47
+ * import { ContentCarousel } from '../../../components/primitives/content-carousel'
48
48
  * ```
49
49
  *
50
50
  * ### AI 向け使用ルール
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { FormField } from '../../components/primitives/form-field'
9
+ * import { FormField } from '../../../components/primitives/form-field'
10
10
  * ```
11
11
  *
12
12
  * ### Props
@@ -93,7 +93,7 @@ export interface ImageInputProps extends VariantProps<typeof imageInputPreviewVa
93
93
  *
94
94
  * ### インポート
95
95
  * ```tsx
96
- * import { ImageInput } from "../../components/primitives/image-input"
96
+ * import { ImageInput } from "../../../components/primitives/image-input"
97
97
  * ```
98
98
  *
99
99
  * ### 表示サイズ
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * ### インポート
8
8
  * ```tsx
9
- * import { KebabMenu } from '../../components/primitives/kebab-menu'
9
+ * import { KebabMenu } from '../../../components/primitives/kebab-menu'
10
10
  * ```
11
11
  *
12
12
  * ### Props
@@ -55,21 +55,5 @@ export interface MenuDrawerProps extends React.HTMLAttributes<HTMLDivElement> {
55
55
  /** ログインリンクのhref(デフォルト: /security/login_link/) */
56
56
  loginHref?: string;
57
57
  }
58
- /**
59
- * メニュードロワー
60
- *
61
- * ハンバーガーメニューの中身。本番サイドナビと同じ構造。
62
- * Figma: Menu - Contents
63
- *
64
- * ### AI 向け使用ルール
65
- *
66
- * - ログイン時: `<MenuDrawer isLoggedIn userName="田中花子" sections={[...]} />`
67
- * - 未ログイン: `<MenuDrawer isLoggedIn={false} sections={[...]} />`
68
- * - Drawer コンポーネントの中に配置して使用
69
- * - セクションの `border` を true にするとセクション上部に区切り線を表示
70
- * - アイテムの `hasChildren` を true にすると右矢印(ドリルダウン)を表示
71
- * - カテゴリ系アイテムは `thumb` にサムネイル画像URLを指定
72
- * - `itemsExtra` は「すべて表示」で展開されるアイテム群
73
- */
74
58
  declare function MenuDrawer({ userName, isLoggedIn, hideLoginLink, sections, banners, onClose, onLogin, loginHref, className, ...props }: MenuDrawerProps): import("react/jsx-runtime").JSX.Element;
75
59
  export { MenuDrawer };
@@ -19,6 +19,14 @@ export interface MultiSelectProps {
19
19
  "aria-invalid"?: boolean;
20
20
  /** FieldError / FieldDescription の id */
21
21
  "aria-describedby"?: string;
22
+ /**
23
+ * トリガーのアクセシブルネーム(日本語)。
24
+ * `role="combobox"` は内容からは名前が付かないため、FormField の外で単体利用する
25
+ * ときはこれか `aria-labelledby` を指定する(未指定時は placeholder を名前に使う)。
26
+ */
27
+ "aria-label"?: string;
28
+ /** ラベル要素の id を直接指定する場合 */
29
+ "aria-labelledby"?: string;
22
30
  }
23
- declare function MultiSelect({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
31
+ declare function MultiSelect({ options, value, onValueChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
24
32
  export { MultiSelect };