@cakejp/design-system 0.22.0 → 0.23.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 (120) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/CLAUDE.md +5 -1
  3. package/MIGRATION.md +43 -0
  4. package/UPDATING.md +2 -0
  5. package/bin/check-tokens.mjs +136 -0
  6. package/bin/init.js +9 -0
  7. package/contracts/components.json +87 -25
  8. package/contracts/composition.json +9 -9
  9. package/contracts/rules.json +1 -1
  10. package/contracts/screen-patterns.json +1 -1
  11. package/dist/components/ec/admin-shell.js +7 -7
  12. package/dist/components/ec/anniversary-card.js +1 -1
  13. package/dist/components/ec/chart-controls.js +7 -7
  14. package/dist/components/ec/coupon-card.js +10 -10
  15. package/dist/components/ec/delivery-calendar.js +1 -1
  16. package/dist/components/ec/mypage-shell.js +1 -1
  17. package/dist/components/ec/order-section.js +1 -1
  18. package/dist/components/ec/order-summary.js +7 -5
  19. package/dist/components/ec/product-card.js +32 -30
  20. package/dist/components/ec/product-detail-sidebar.js +1 -1
  21. package/dist/components/ec/product-list-item.js +57 -56
  22. package/dist/components/ec/product-option.js +30 -30
  23. package/dist/components/ec/review-summary.js +1 -1
  24. package/dist/components/ec/shop-card.js +7 -7
  25. package/dist/components/foundations/accordion.js +1 -1
  26. package/dist/components/foundations/alert-dialog.js +65 -43
  27. package/dist/components/foundations/alert.js +74 -68
  28. package/dist/components/foundations/badge.js +4 -4
  29. package/dist/components/foundations/button.js +15 -15
  30. package/dist/components/foundations/checkbox-card.js +18 -18
  31. package/dist/components/foundations/checkbox.js +6 -6
  32. package/dist/components/foundations/chip-variants.js +8 -8
  33. package/dist/components/foundations/data-table.js +244 -209
  34. package/dist/components/foundations/dialog.js +84 -60
  35. package/dist/components/foundations/drawer.js +61 -53
  36. package/dist/components/foundations/field.js +51 -35
  37. package/dist/components/foundations/file-input.js +1 -1
  38. package/dist/components/foundations/input.js +9 -8
  39. package/dist/components/foundations/popover.js +15 -12
  40. package/dist/components/foundations/progress.js +19 -18
  41. package/dist/components/foundations/radio-group.js +26 -23
  42. package/dist/components/foundations/select.js +9 -8
  43. package/dist/components/foundations/sheet.js +82 -59
  44. package/dist/components/foundations/skeleton.js +6 -6
  45. package/dist/components/foundations/slider.js +7 -7
  46. package/dist/components/foundations/sonner.js +9 -8
  47. package/dist/components/foundations/switch.js +3 -2
  48. package/dist/components/foundations/tabs.js +5 -5
  49. package/dist/components/foundations/textarea.js +7 -6
  50. package/dist/components/foundations/toggle-group.js +5 -5
  51. package/dist/components/primitives/admin-header.js +3 -3
  52. package/dist/components/primitives/admin-side-nav.js +101 -92
  53. package/dist/components/primitives/category-shortcuts.js +6 -6
  54. package/dist/components/primitives/chat-composer.js +1 -1
  55. package/dist/components/primitives/chip.js +25 -25
  56. package/dist/components/primitives/combobox.js +74 -63
  57. package/dist/components/primitives/content-carousel.js +64 -62
  58. package/dist/components/primitives/date-picker.js +99 -96
  59. package/dist/components/primitives/error-state.js +9 -9
  60. package/dist/components/primitives/filter-bar.js +4 -4
  61. package/dist/components/primitives/footer.js +1 -1
  62. package/dist/components/primitives/form-field.js +8 -8
  63. package/dist/components/primitives/funnel-shell.js +5 -5
  64. package/dist/components/primitives/header.js +16 -16
  65. package/dist/components/primitives/image-carousel.js +42 -41
  66. package/dist/components/primitives/image-gallery.js +61 -58
  67. package/dist/components/primitives/image-input.js +2 -2
  68. package/dist/components/primitives/image-uploader.js +1 -1
  69. package/dist/components/primitives/kebab-menu.js +20 -16
  70. package/dist/components/primitives/list-item.js +17 -17
  71. package/dist/components/primitives/menu-drawer.js +11 -11
  72. package/dist/components/primitives/multi-select.js +66 -66
  73. package/dist/components/primitives/notification-list.js +13 -13
  74. package/dist/components/primitives/number-input.js +118 -112
  75. package/dist/components/primitives/progress-steps.js +3 -3
  76. package/dist/components/primitives/search-bar.js +6 -6
  77. package/dist/components/primitives/section-nav.js +1 -1
  78. package/dist/components/primitives/side-nav.js +1 -1
  79. package/dist/components/primitives/sub-nav.js +12 -12
  80. package/dist/components/primitives/tag.js +3 -3
  81. package/dist/components/primitives/workspace-shell.js +8 -8
  82. package/dist/index.css +1 -1
  83. package/dist/index.js +1479 -704
  84. package/dist/lib/focus-restore.js +67 -0
  85. package/dist/lib/focus-ring.js +1 -1
  86. package/dist/lib/ime.js +17 -0
  87. package/dist/lib/search-normalize.js +30 -0
  88. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  89. package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
  90. package/dist/types/components/foundations/alert.d.ts +14 -1
  91. package/dist/types/components/foundations/card.d.ts +3 -3
  92. package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
  93. package/dist/types/components/foundations/data-table.d.ts +1 -1
  94. package/dist/types/components/foundations/dialog.d.ts +2 -2
  95. package/dist/types/components/foundations/drawer.d.ts +1 -1
  96. package/dist/types/components/foundations/field.d.ts +23 -3
  97. package/dist/types/components/foundations/popover.d.ts +1 -1
  98. package/dist/types/components/foundations/sheet.d.ts +4 -3
  99. package/dist/types/components/foundations/sonner.d.ts +3 -2
  100. package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
  101. package/dist/types/components/primitives/combobox.d.ts +6 -0
  102. package/dist/types/components/primitives/date-picker.d.ts +8 -3
  103. package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
  104. package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
  105. package/dist/types/components/primitives/number-input.d.ts +20 -1
  106. package/dist/types/components/primitives/progress-steps.d.ts +1 -1
  107. package/dist/types/components/primitives/section.d.ts +1 -1
  108. package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
  109. package/dist/types/index.d.ts +3 -4
  110. package/dist/types/lib/focus-restore.d.ts +52 -0
  111. package/dist/types/lib/focus-ring.d.ts +3 -0
  112. package/dist/types/lib/ime.d.ts +36 -0
  113. package/dist/types/lib/search-normalize.d.ts +28 -0
  114. package/package.json +3 -1
  115. package/src/components/COMPONENT_LOOKUP.md +12 -12
  116. package/src/preset-standalone.css +43 -21
  117. package/src/preset.css +36 -18
  118. package/src/styles/primitive.css +1 -0
  119. package/src/styles/semantic.css +12 -2
  120. package/tokens.json +22 -3
@@ -1,34 +1,50 @@
1
- import { jsx as t, jsxs as l } from "react/jsx-runtime";
1
+ "use client";
2
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
3
  import "react";
3
- import { XIcon as c } from "lucide-react";
4
+ import { XIcon as p } from "lucide-react";
4
5
  import { Dialog as o } from "radix-ui";
5
6
  import { cn as i } from "../../lib/utils.js";
6
- import { Button as g } from "./button.js";
7
- function w({
8
- ...a
7
+ import { useOverlayFocusRoot as f, OverlayFocusRootContext as v, useRestoreFocusToOpener as x } from "../../lib/focus-restore.js";
8
+ import { composeEscapeKeyDownWithImeGuard as h } from "../../lib/ime.js";
9
+ import { Button as D } from "./button.js";
10
+ function j({
11
+ open: a,
12
+ defaultOpen: t,
13
+ onOpenChange: l,
14
+ ...s
9
15
  }) {
10
- return /* @__PURE__ */ t(o.Root, { "data-slot": "dialog", ...a });
16
+ const { root: n, handleOpenChange: d } = f(a, t, l);
17
+ return /* @__PURE__ */ e(v.Provider, { value: n, children: /* @__PURE__ */ e(
18
+ o.Root,
19
+ {
20
+ "data-slot": "dialog",
21
+ open: a,
22
+ defaultOpen: t,
23
+ onOpenChange: d,
24
+ ...s
25
+ }
26
+ ) });
11
27
  }
12
- function C({
28
+ function M({
13
29
  ...a
14
30
  }) {
15
- return /* @__PURE__ */ t(o.Trigger, { "data-slot": "dialog-trigger", ...a });
31
+ return /* @__PURE__ */ e(o.Trigger, { "data-slot": "dialog-trigger", ...a });
16
32
  }
17
- function u({
33
+ function y({
18
34
  ...a
19
35
  }) {
20
- return /* @__PURE__ */ t(o.Portal, { "data-slot": "dialog-portal", ...a });
36
+ return /* @__PURE__ */ e(o.Portal, { "data-slot": "dialog-portal", ...a });
21
37
  }
22
- function N({
38
+ function R({
23
39
  ...a
24
40
  }) {
25
- return /* @__PURE__ */ t(o.Close, { "data-slot": "dialog-close", ...a });
41
+ return /* @__PURE__ */ e(o.Close, { "data-slot": "dialog-close", ...a });
26
42
  }
27
- function m({
43
+ function C({
28
44
  className: a,
29
- ...e
45
+ ...t
30
46
  }) {
31
- return /* @__PURE__ */ t(
47
+ return /* @__PURE__ */ e(
32
48
  o.Overlay,
33
49
  {
34
50
  "data-slot": "dialog-overlay",
@@ -36,47 +52,55 @@ function m({
36
52
  "fixed inset-0 z-[var(--Z-Overlay)] bg-[var(--Overlay-Medium)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
37
53
  a
38
54
  ),
39
- ...e
55
+ ...t
40
56
  }
41
57
  );
42
58
  }
43
- const f = {
59
+ const w = {
44
60
  sm: "sm:max-w-[400px]",
45
61
  md: "sm:max-w-[512px]",
46
62
  lg: "sm:max-w-[640px]",
47
63
  xl: "sm:max-w-[800px]"
48
- }, p = "sm:max-w-lg";
49
- function T({
64
+ }, b = "sm:max-w-lg";
65
+ function P({
50
66
  className: a,
51
- children: e,
52
- showCloseButton: r = !0,
67
+ children: t,
68
+ showCloseButton: l = !0,
53
69
  size: s,
54
- ...n
70
+ onOpenAutoFocus: n,
71
+ onCloseAutoFocus: d,
72
+ onEscapeKeyDown: c,
73
+ ...u
55
74
  }) {
56
- return /* @__PURE__ */ l(u, { "data-slot": "dialog-portal", children: [
57
- /* @__PURE__ */ t(m, {}),
58
- /* @__PURE__ */ l(
75
+ const m = x({
76
+ onOpenAutoFocus: n ?? ((g) => g.preventDefault()),
77
+ onCloseAutoFocus: d
78
+ });
79
+ return /* @__PURE__ */ r(y, { "data-slot": "dialog-portal", children: [
80
+ /* @__PURE__ */ e(C, {}),
81
+ /* @__PURE__ */ r(
59
82
  o.Content,
60
83
  {
61
84
  "data-slot": "dialog-content",
62
- onOpenAutoFocus: (d) => d.preventDefault(),
85
+ ...m,
86
+ onEscapeKeyDown: h(c),
63
87
  className: i(
64
88
  "fixed top-[50%] left-[50%] z-[var(--Z-Modal)] grid w-[calc(100%_-_32px)] max-w-[calc(100%_-_32px)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl bg-[var(--Surface-Elevated)] p-6 shadow-lg duration-[var(--Motion-Duration-Base)] outline-none focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
65
89
  // 型に無い size(AlertDialog の "default" と取り違えた JSX など)でも幅の上限を消さず、未指定と同じにする
66
- s && f[s] || p,
90
+ s && w[s] || b,
67
91
  a
68
92
  ),
69
- ...n,
93
+ ...u,
70
94
  children: [
71
- e,
72
- r && /* @__PURE__ */ l(
95
+ t,
96
+ l && /* @__PURE__ */ r(
73
97
  o.Close,
74
98
  {
75
99
  "data-slot": "dialog-close",
76
- className: "absolute top-2 right-2 flex size-10 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 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
100
+ className: "absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
77
101
  children: [
78
- /* @__PURE__ */ t(c, { className: "size-5" }),
79
- /* @__PURE__ */ t("span", { className: "sr-only", children: "閉じる" })
102
+ /* @__PURE__ */ e(p, { className: "size-5" }),
103
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "閉じる" })
80
104
  ]
81
105
  }
82
106
  )
@@ -85,23 +109,23 @@ function T({
85
109
  )
86
110
  ] });
87
111
  }
88
- function E({ className: a, ...e }) {
89
- return /* @__PURE__ */ t(
112
+ function S({ className: a, ...t }) {
113
+ return /* @__PURE__ */ e(
90
114
  "div",
91
115
  {
92
116
  "data-slot": "dialog-header",
93
117
  className: i("flex flex-col gap-2 text-center sm:text-left", a),
94
- ...e
118
+ ...t
95
119
  }
96
120
  );
97
121
  }
98
- function z({
122
+ function B({
99
123
  className: a,
100
- showCloseButton: e = !1,
101
- children: r,
124
+ showCloseButton: t = !1,
125
+ children: l,
102
126
  ...s
103
127
  }) {
104
- return /* @__PURE__ */ l(
128
+ return /* @__PURE__ */ r(
105
129
  "div",
106
130
  {
107
131
  "data-slot": "dialog-footer",
@@ -111,47 +135,47 @@ function z({
111
135
  ),
112
136
  ...s,
113
137
  children: [
114
- r,
115
- e && /* @__PURE__ */ t(o.Close, { asChild: !0, children: /* @__PURE__ */ t(g, { variant: "tertiary", children: "Close" }) })
138
+ l,
139
+ t && /* @__PURE__ */ e(o.Close, { asChild: !0, children: /* @__PURE__ */ e(D, { variant: "tertiary", children: "Close" }) })
116
140
  ]
117
141
  }
118
142
  );
119
143
  }
120
- function _({
144
+ function I({
121
145
  className: a,
122
- ...e
146
+ ...t
123
147
  }) {
124
- return /* @__PURE__ */ t(
148
+ return /* @__PURE__ */ e(
125
149
  o.Title,
126
150
  {
127
151
  "data-slot": "dialog-title",
128
152
  className: i("typo-heading-lg text-[var(--Text-High-Emphasis)]", a),
129
- ...e
153
+ ...t
130
154
  }
131
155
  );
132
156
  }
133
- function H({
157
+ function K({
134
158
  className: a,
135
- ...e
159
+ ...t
136
160
  }) {
137
- return /* @__PURE__ */ t(
161
+ return /* @__PURE__ */ e(
138
162
  o.Description,
139
163
  {
140
164
  "data-slot": "dialog-description",
141
165
  className: i("typo-body-sm text-[var(--Text-Medium-Emphasis)]", a),
142
- ...e
166
+ ...t
143
167
  }
144
168
  );
145
169
  }
146
170
  export {
147
- w as Dialog,
148
- N as DialogClose,
149
- T as DialogContent,
150
- H as DialogDescription,
151
- z as DialogFooter,
152
- E as DialogHeader,
153
- m as DialogOverlay,
154
- u as DialogPortal,
155
- _ as DialogTitle,
156
- C as DialogTrigger
171
+ j as Dialog,
172
+ R as DialogClose,
173
+ P as DialogContent,
174
+ K as DialogDescription,
175
+ B as DialogFooter,
176
+ S as DialogHeader,
177
+ C as DialogOverlay,
178
+ y as DialogPortal,
179
+ I as DialogTitle,
180
+ M as DialogTrigger
157
181
  };
@@ -1,56 +1,64 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ import { jsx as a, jsxs as d } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import { Drawer as e } from "vaul";
5
- import { cn as d } from "../../lib/utils.js";
6
- function m({
5
+ import { cn as o } from "../../lib/utils.js";
6
+ import { OverlayFocusRootContext as s, useRestoreFocusToOpener as w } from "../../lib/focus-restore.js";
7
+ import { composeEscapeKeyDownWithImeGuard as m } from "../../lib/ime.js";
8
+ function y({
7
9
  ...r
8
10
  }) {
9
- return /* @__PURE__ */ t(e.Root, { "data-slot": "drawer", ...r });
11
+ return /* @__PURE__ */ a(s.Provider, { value: null, children: /* @__PURE__ */ a(e.Root, { "data-slot": "drawer", ...r }) });
10
12
  }
11
- function v({
13
+ function E({
12
14
  ...r
13
15
  }) {
14
- return /* @__PURE__ */ t(e.Trigger, { "data-slot": "drawer-trigger", ...r });
16
+ return /* @__PURE__ */ a(e.Trigger, { "data-slot": "drawer-trigger", ...r });
15
17
  }
16
- function n({
18
+ function v({
17
19
  ...r
18
20
  }) {
19
- return /* @__PURE__ */ t(e.Portal, { "data-slot": "drawer-portal", ...r });
21
+ return /* @__PURE__ */ a(e.Portal, { "data-slot": "drawer-portal", ...r });
20
22
  }
21
- function p({
23
+ function N({
22
24
  ...r
23
25
  }) {
24
- return /* @__PURE__ */ t(e.Close, { "data-slot": "drawer-close", ...r });
26
+ return /* @__PURE__ */ a(e.Close, { "data-slot": "drawer-close", ...r });
25
27
  }
26
- function l({
28
+ function p({
27
29
  className: r,
28
- ...a
30
+ ...t
29
31
  }) {
30
- return /* @__PURE__ */ t(
32
+ return /* @__PURE__ */ a(
31
33
  e.Overlay,
32
34
  {
33
35
  "data-slot": "drawer-overlay",
34
- className: d(
36
+ className: o(
35
37
  "fixed inset-0 z-[var(--Z-Overlay)] bg-[var(--Overlay-Medium)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
36
38
  r
37
39
  ),
38
- ...a
40
+ ...t
39
41
  }
40
42
  );
41
43
  }
42
- function f({
44
+ function T({
43
45
  className: r,
44
- children: a,
45
- ...i
46
+ children: t,
47
+ onOpenAutoFocus: i,
48
+ onCloseAutoFocus: n,
49
+ onEscapeKeyDown: l,
50
+ ...c
46
51
  }) {
47
- return /* @__PURE__ */ o(n, { "data-slot": "drawer-portal", children: [
48
- /* @__PURE__ */ t(l, {}),
49
- /* @__PURE__ */ o(
52
+ const u = w({ onOpenAutoFocus: i, onCloseAutoFocus: n });
53
+ return /* @__PURE__ */ d(v, { "data-slot": "drawer-portal", children: [
54
+ /* @__PURE__ */ a(p, {}),
55
+ /* @__PURE__ */ d(
50
56
  e.Content,
51
57
  {
52
58
  "data-slot": "drawer-content",
53
- className: d(
59
+ ...u,
60
+ onEscapeKeyDown: m(l),
61
+ className: o(
54
62
  "group/drawer-content fixed z-[var(--Z-Modal)] flex h-auto flex-col border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Elevated)]",
55
63
  "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
56
64
  "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
@@ -58,73 +66,73 @@ function f({
58
66
  "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
59
67
  r
60
68
  ),
61
- ...i,
69
+ ...c,
62
70
  children: [
63
- /* @__PURE__ */ t("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-[var(--Border-Medium-Emphasis)] group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
64
- a
71
+ /* @__PURE__ */ a("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-[var(--Border-Medium-Emphasis)] group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
72
+ t
65
73
  ]
66
74
  }
67
75
  )
68
76
  ] });
69
77
  }
70
- function g({ className: r, ...a }) {
71
- return /* @__PURE__ */ t(
78
+ function O({ className: r, ...t }) {
79
+ return /* @__PURE__ */ a(
72
80
  "div",
73
81
  {
74
82
  "data-slot": "drawer-header",
75
- className: d(
83
+ className: o(
76
84
  "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
77
85
  r
78
86
  ),
79
- ...a
87
+ ...t
80
88
  }
81
89
  );
82
90
  }
83
- function x({ className: r, ...a }) {
84
- return /* @__PURE__ */ t(
91
+ function C({ className: r, ...t }) {
92
+ return /* @__PURE__ */ a(
85
93
  "div",
86
94
  {
87
95
  "data-slot": "drawer-footer",
88
- className: d("mt-auto flex flex-col gap-2 p-4", r),
89
- ...a
96
+ className: o("mt-auto flex flex-col gap-2 p-4", r),
97
+ ...t
90
98
  }
91
99
  );
92
100
  }
93
- function h({
101
+ function M({
94
102
  className: r,
95
- ...a
103
+ ...t
96
104
  }) {
97
- return /* @__PURE__ */ t(
105
+ return /* @__PURE__ */ a(
98
106
  e.Title,
99
107
  {
100
108
  "data-slot": "drawer-title",
101
- className: d("typo-heading-lg text-[var(--Text-High-Emphasis)]", r),
102
- ...a
109
+ className: o("typo-heading-lg text-[var(--Text-High-Emphasis)]", r),
110
+ ...t
103
111
  }
104
112
  );
105
113
  }
106
- function b({
114
+ function F({
107
115
  className: r,
108
- ...a
116
+ ...t
109
117
  }) {
110
- return /* @__PURE__ */ t(
118
+ return /* @__PURE__ */ a(
111
119
  e.Description,
112
120
  {
113
121
  "data-slot": "drawer-description",
114
- className: d("typo-body-sm text-[var(--Text-Medium-Emphasis)]", r),
115
- ...a
122
+ className: o("typo-body-sm text-[var(--Text-Medium-Emphasis)]", r),
123
+ ...t
116
124
  }
117
125
  );
118
126
  }
119
127
  export {
120
- m as Drawer,
121
- p as DrawerClose,
122
- f as DrawerContent,
123
- b as DrawerDescription,
124
- x as DrawerFooter,
125
- g as DrawerHeader,
126
- l as DrawerOverlay,
127
- n as DrawerPortal,
128
- h as DrawerTitle,
129
- v as DrawerTrigger
128
+ y as Drawer,
129
+ N as DrawerClose,
130
+ T as DrawerContent,
131
+ F as DrawerDescription,
132
+ C as DrawerFooter,
133
+ O as DrawerHeader,
134
+ p as DrawerOverlay,
135
+ v as DrawerPortal,
136
+ M as DrawerTitle,
137
+ E as DrawerTrigger
130
138
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cva as s } from "class-variance-authority";
4
- import { cn as l } from "../../lib/utils.js";
5
- import { Label as n } from "./label.js";
4
+ import { cn as r } from "../../lib/utils.js";
5
+ import { Label as d } from "./label.js";
6
6
  import { Separator as o } from "./separator.js";
7
- const d = s("group/field flex", {
7
+ const n = s("group/field flex", {
8
8
  variants: {
9
9
  orientation: {
10
10
  /** 既定。ラベルの下に入力を積む */
@@ -17,10 +17,10 @@ const d = s("group/field flex", {
17
17
  },
18
18
  defaultVariants: { orientation: "vertical" }
19
19
  });
20
- function g({
20
+ function v({
21
21
  className: t,
22
22
  orientation: e,
23
- ...r
23
+ ...l
24
24
  }) {
25
25
  return /* @__PURE__ */ a(
26
26
  "div",
@@ -28,20 +28,20 @@ function g({
28
28
  role: "group",
29
29
  "data-slot": "field",
30
30
  "data-orientation": e ?? "vertical",
31
- className: l(d({ orientation: e }), t),
32
- ...r
31
+ className: r(n({ orientation: e }), t),
32
+ ...l
33
33
  }
34
34
  );
35
35
  }
36
- function v({
36
+ function b({
37
37
  className: t,
38
38
  ...e
39
39
  }) {
40
40
  return /* @__PURE__ */ a(
41
- n,
41
+ d,
42
42
  {
43
43
  "data-slot": "field-label",
44
- className: l(
44
+ className: r(
45
45
  "text-[var(--Text-High-Emphasis)] group-data-[disabled=true]/field:text-[var(--Text-Disable)]",
46
46
  t
47
47
  ),
@@ -49,39 +49,55 @@ function v({
49
49
  }
50
50
  );
51
51
  }
52
- function N({ className: t, ...e }) {
52
+ const f = {
53
+ sm: "gap-2 [&>[data-slot=field-legend]]:mb-2",
54
+ md: "gap-4 [&>[data-slot=field-legend]]:mb-4",
55
+ lg: "gap-6 [&>[data-slot=field-legend]]:mb-6"
56
+ };
57
+ function N({
58
+ className: t,
59
+ gap: e,
60
+ ...l
61
+ }) {
53
62
  return /* @__PURE__ */ a(
54
63
  "fieldset",
55
64
  {
56
65
  "data-slot": "field-set",
57
- className: l(
66
+ "data-gap": e,
67
+ className: r(
58
68
  "flex min-w-0 flex-col gap-6 border-0 p-0",
69
+ e && f[e],
59
70
  t
60
71
  ),
61
- ...e
72
+ ...l
62
73
  }
63
74
  );
64
75
  }
65
- function b({ className: t, ...e }) {
76
+ function y({
77
+ className: t,
78
+ size: e,
79
+ ...l
80
+ }) {
66
81
  return /* @__PURE__ */ a(
67
82
  "legend",
68
83
  {
69
84
  "data-slot": "field-legend",
70
- className: l(
71
- "typo-label-lg text-[var(--Text-High-Emphasis)]",
85
+ "data-size": e,
86
+ className: r(
87
+ e === "sm" ? "typo-label-md text-[var(--Text-Medium-Emphasis)]" : "typo-label-lg text-[var(--Text-High-Emphasis)]",
72
88
  t
73
89
  ),
74
- ...e
90
+ ...l
75
91
  }
76
92
  );
77
93
  }
78
- function y({ className: t, ...e }) {
94
+ function E({ className: t, ...e }) {
79
95
  return /* @__PURE__ */ a(
80
96
  "div",
81
97
  {
82
98
  "data-slot": "field-group",
83
99
  role: "group",
84
- className: l("@container/field-group flex min-w-0 flex-col gap-4", t),
100
+ className: r("@container/field-group flex min-w-0 flex-col gap-4", t),
85
101
  ...e
86
102
  }
87
103
  );
@@ -91,7 +107,7 @@ function F({ className: t, ...e }) {
91
107
  "p",
92
108
  {
93
109
  "data-slot": "field-description",
94
- className: l(
110
+ className: r(
95
111
  "typo-body-xs text-[var(--Text-Low-Emphasis)]",
96
112
  t
97
113
  ),
@@ -99,36 +115,36 @@ function F({ className: t, ...e }) {
99
115
  }
100
116
  );
101
117
  }
102
- function h({
118
+ function T({
103
119
  className: t,
104
120
  children: e,
105
- ...r
121
+ ...l
106
122
  }) {
107
123
  return e ? /* @__PURE__ */ a(
108
124
  "p",
109
125
  {
110
126
  "data-slot": "field-error",
111
127
  role: "alert",
112
- className: l(
128
+ className: r(
113
129
  "typo-body-xs text-[var(--Text-Caution)]",
114
130
  t
115
131
  ),
116
- ...r,
132
+ ...l,
117
133
  children: e
118
134
  }
119
135
  ) : null;
120
136
  }
121
- function w({
137
+ function h({
122
138
  className: t,
123
139
  children: e,
124
- ...r
140
+ ...l
125
141
  }) {
126
142
  return /* @__PURE__ */ i(
127
143
  "div",
128
144
  {
129
145
  "data-slot": "field-separator",
130
- className: l("relative flex items-center py-2", t),
131
- ...r,
146
+ className: r("relative flex items-center py-2", t),
147
+ ...l,
132
148
  children: [
133
149
  /* @__PURE__ */ a(o, { className: "flex-1" }),
134
150
  e != null && /* @__PURE__ */ a("span", { className: "mx-3 shrink-0 typo-body-xs text-[var(--Text-Low-Emphasis)]", children: e }),
@@ -138,13 +154,13 @@ function w({
138
154
  );
139
155
  }
140
156
  export {
141
- g as Field,
157
+ v as Field,
142
158
  F as FieldDescription,
143
- h as FieldError,
144
- y as FieldGroup,
145
- v as FieldLabel,
146
- b as FieldLegend,
147
- w as FieldSeparator,
159
+ T as FieldError,
160
+ E as FieldGroup,
161
+ b as FieldLabel,
162
+ y as FieldLegend,
163
+ h as FieldSeparator,
148
164
  N as FieldSet,
149
- d as fieldVariants
165
+ n as fieldVariants
150
166
  };
@@ -88,7 +88,7 @@ function B({
88
88
  // focus-within 中は打ち消す(focus-within は variant 順で hover より先=負ける)。
89
89
  // :hover:focus-within は詳細度が :hover より高いので確実に上書きできる。
90
90
  "[&:hover:focus-within]:border-[var(--Focus-High-Emphasis)] [&:hover:focus-within]:outline-transparent",
91
- y && "pointer-events-none border-transparent bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]"
91
+ y && "pointer-events-none border-transparent bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]"
92
92
  ),
93
93
  children: [
94
94
  /* @__PURE__ */ f(S, { className: "size-4", "aria-hidden": "true" }),