@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.
- package/CHANGELOG.md +96 -0
- package/CLAUDE.md +5 -1
- package/MIGRATION.md +43 -0
- package/UPDATING.md +2 -0
- package/bin/check-tokens.mjs +136 -0
- package/bin/init.js +9 -0
- package/contracts/components.json +87 -25
- package/contracts/composition.json +9 -9
- package/contracts/rules.json +1 -1
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/admin-shell.js +7 -7
- package/dist/components/ec/anniversary-card.js +1 -1
- package/dist/components/ec/chart-controls.js +7 -7
- package/dist/components/ec/coupon-card.js +10 -10
- package/dist/components/ec/delivery-calendar.js +1 -1
- package/dist/components/ec/mypage-shell.js +1 -1
- package/dist/components/ec/order-section.js +1 -1
- package/dist/components/ec/order-summary.js +7 -5
- package/dist/components/ec/product-card.js +32 -30
- package/dist/components/ec/product-detail-sidebar.js +1 -1
- package/dist/components/ec/product-list-item.js +57 -56
- package/dist/components/ec/product-option.js +30 -30
- package/dist/components/ec/review-summary.js +1 -1
- package/dist/components/ec/shop-card.js +7 -7
- package/dist/components/foundations/accordion.js +1 -1
- package/dist/components/foundations/alert-dialog.js +65 -43
- package/dist/components/foundations/alert.js +74 -68
- package/dist/components/foundations/badge.js +4 -4
- package/dist/components/foundations/button.js +15 -15
- package/dist/components/foundations/checkbox-card.js +18 -18
- package/dist/components/foundations/checkbox.js +6 -6
- package/dist/components/foundations/chip-variants.js +8 -8
- package/dist/components/foundations/data-table.js +244 -209
- package/dist/components/foundations/dialog.js +84 -60
- package/dist/components/foundations/drawer.js +61 -53
- package/dist/components/foundations/field.js +51 -35
- package/dist/components/foundations/file-input.js +1 -1
- package/dist/components/foundations/input.js +9 -8
- package/dist/components/foundations/popover.js +15 -12
- package/dist/components/foundations/progress.js +19 -18
- package/dist/components/foundations/radio-group.js +26 -23
- package/dist/components/foundations/select.js +9 -8
- package/dist/components/foundations/sheet.js +82 -59
- package/dist/components/foundations/skeleton.js +6 -6
- package/dist/components/foundations/slider.js +7 -7
- package/dist/components/foundations/sonner.js +9 -8
- package/dist/components/foundations/switch.js +3 -2
- package/dist/components/foundations/tabs.js +5 -5
- package/dist/components/foundations/textarea.js +7 -6
- package/dist/components/foundations/toggle-group.js +5 -5
- package/dist/components/primitives/admin-header.js +3 -3
- package/dist/components/primitives/admin-side-nav.js +101 -92
- package/dist/components/primitives/category-shortcuts.js +6 -6
- package/dist/components/primitives/chat-composer.js +1 -1
- package/dist/components/primitives/chip.js +25 -25
- package/dist/components/primitives/combobox.js +74 -63
- package/dist/components/primitives/content-carousel.js +64 -62
- package/dist/components/primitives/date-picker.js +99 -96
- package/dist/components/primitives/error-state.js +9 -9
- package/dist/components/primitives/filter-bar.js +4 -4
- package/dist/components/primitives/footer.js +1 -1
- package/dist/components/primitives/form-field.js +8 -8
- package/dist/components/primitives/funnel-shell.js +5 -5
- package/dist/components/primitives/header.js +16 -16
- package/dist/components/primitives/image-carousel.js +42 -41
- package/dist/components/primitives/image-gallery.js +61 -58
- package/dist/components/primitives/image-input.js +2 -2
- package/dist/components/primitives/image-uploader.js +1 -1
- package/dist/components/primitives/kebab-menu.js +20 -16
- package/dist/components/primitives/list-item.js +17 -17
- package/dist/components/primitives/menu-drawer.js +11 -11
- package/dist/components/primitives/multi-select.js +66 -66
- package/dist/components/primitives/notification-list.js +13 -13
- package/dist/components/primitives/number-input.js +118 -112
- package/dist/components/primitives/progress-steps.js +3 -3
- package/dist/components/primitives/search-bar.js +6 -6
- package/dist/components/primitives/section-nav.js +1 -1
- package/dist/components/primitives/side-nav.js +1 -1
- package/dist/components/primitives/sub-nav.js +12 -12
- package/dist/components/primitives/tag.js +3 -3
- package/dist/components/primitives/workspace-shell.js +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +1479 -704
- package/dist/lib/focus-restore.js +67 -0
- package/dist/lib/focus-ring.js +1 -1
- package/dist/lib/ime.js +17 -0
- package/dist/lib/search-normalize.js +30 -0
- package/dist/types/components/ec/admin-shell.d.ts +1 -1
- package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
- package/dist/types/components/foundations/alert.d.ts +14 -1
- package/dist/types/components/foundations/card.d.ts +3 -3
- package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
- package/dist/types/components/foundations/data-table.d.ts +1 -1
- package/dist/types/components/foundations/dialog.d.ts +2 -2
- package/dist/types/components/foundations/drawer.d.ts +1 -1
- package/dist/types/components/foundations/field.d.ts +23 -3
- package/dist/types/components/foundations/popover.d.ts +1 -1
- package/dist/types/components/foundations/sheet.d.ts +4 -3
- package/dist/types/components/foundations/sonner.d.ts +3 -2
- package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
- package/dist/types/components/primitives/combobox.d.ts +6 -0
- package/dist/types/components/primitives/date-picker.d.ts +8 -3
- package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
- package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
- package/dist/types/components/primitives/number-input.d.ts +20 -1
- package/dist/types/components/primitives/progress-steps.d.ts +1 -1
- package/dist/types/components/primitives/section.d.ts +1 -1
- package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
- package/dist/types/index.d.ts +3 -4
- package/dist/types/lib/focus-restore.d.ts +52 -0
- package/dist/types/lib/focus-ring.d.ts +3 -0
- package/dist/types/lib/ime.d.ts +36 -0
- package/dist/types/lib/search-normalize.d.ts +28 -0
- package/package.json +3 -1
- package/src/components/COMPONENT_LOOKUP.md +12 -12
- package/src/preset-standalone.css +43 -21
- package/src/preset.css +36 -18
- package/src/styles/primitive.css +1 -0
- package/src/styles/semantic.css +12 -2
- package/tokens.json +22 -3
|
@@ -1,34 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
|
-
import { XIcon as
|
|
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 {
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
|
28
|
+
function M({
|
|
13
29
|
...a
|
|
14
30
|
}) {
|
|
15
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "dialog-trigger", ...a });
|
|
16
32
|
}
|
|
17
|
-
function
|
|
33
|
+
function y({
|
|
18
34
|
...a
|
|
19
35
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ e(o.Portal, { "data-slot": "dialog-portal", ...a });
|
|
21
37
|
}
|
|
22
|
-
function
|
|
38
|
+
function R({
|
|
23
39
|
...a
|
|
24
40
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ e(o.Close, { "data-slot": "dialog-close", ...a });
|
|
26
42
|
}
|
|
27
|
-
function
|
|
43
|
+
function C({
|
|
28
44
|
className: a,
|
|
29
|
-
...
|
|
45
|
+
...t
|
|
30
46
|
}) {
|
|
31
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
55
|
+
...t
|
|
40
56
|
}
|
|
41
57
|
);
|
|
42
58
|
}
|
|
43
|
-
const
|
|
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
|
-
},
|
|
49
|
-
function
|
|
64
|
+
}, b = "sm:max-w-lg";
|
|
65
|
+
function P({
|
|
50
66
|
className: a,
|
|
51
|
-
children:
|
|
52
|
-
showCloseButton:
|
|
67
|
+
children: t,
|
|
68
|
+
showCloseButton: l = !0,
|
|
53
69
|
size: s,
|
|
54
|
-
|
|
70
|
+
onOpenAutoFocus: n,
|
|
71
|
+
onCloseAutoFocus: d,
|
|
72
|
+
onEscapeKeyDown: c,
|
|
73
|
+
...u
|
|
55
74
|
}) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
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 &&
|
|
90
|
+
s && w[s] || b,
|
|
67
91
|
a
|
|
68
92
|
),
|
|
69
|
-
...
|
|
93
|
+
...u,
|
|
70
94
|
children: [
|
|
71
|
-
|
|
72
|
-
|
|
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__ */
|
|
79
|
-
/* @__PURE__ */
|
|
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
|
|
89
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
118
|
+
...t
|
|
95
119
|
}
|
|
96
120
|
);
|
|
97
121
|
}
|
|
98
|
-
function
|
|
122
|
+
function B({
|
|
99
123
|
className: a,
|
|
100
|
-
showCloseButton:
|
|
101
|
-
children:
|
|
124
|
+
showCloseButton: t = !1,
|
|
125
|
+
children: l,
|
|
102
126
|
...s
|
|
103
127
|
}) {
|
|
104
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
...
|
|
146
|
+
...t
|
|
123
147
|
}) {
|
|
124
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
153
|
+
...t
|
|
130
154
|
}
|
|
131
155
|
);
|
|
132
156
|
}
|
|
133
|
-
function
|
|
157
|
+
function K({
|
|
134
158
|
className: a,
|
|
135
|
-
...
|
|
159
|
+
...t
|
|
136
160
|
}) {
|
|
137
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
166
|
+
...t
|
|
143
167
|
}
|
|
144
168
|
);
|
|
145
169
|
}
|
|
146
170
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
|
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
|
|
6
|
-
|
|
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__ */
|
|
11
|
+
return /* @__PURE__ */ a(s.Provider, { value: null, children: /* @__PURE__ */ a(e.Root, { "data-slot": "drawer", ...r }) });
|
|
10
12
|
}
|
|
11
|
-
function
|
|
13
|
+
function E({
|
|
12
14
|
...r
|
|
13
15
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ a(e.Trigger, { "data-slot": "drawer-trigger", ...r });
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function v({
|
|
17
19
|
...r
|
|
18
20
|
}) {
|
|
19
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ a(e.Portal, { "data-slot": "drawer-portal", ...r });
|
|
20
22
|
}
|
|
21
|
-
function
|
|
23
|
+
function N({
|
|
22
24
|
...r
|
|
23
25
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ a(e.Close, { "data-slot": "drawer-close", ...r });
|
|
25
27
|
}
|
|
26
|
-
function
|
|
28
|
+
function p({
|
|
27
29
|
className: r,
|
|
28
|
-
...
|
|
30
|
+
...t
|
|
29
31
|
}) {
|
|
30
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ a(
|
|
31
33
|
e.Overlay,
|
|
32
34
|
{
|
|
33
35
|
"data-slot": "drawer-overlay",
|
|
34
|
-
className:
|
|
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
|
-
...
|
|
40
|
+
...t
|
|
39
41
|
}
|
|
40
42
|
);
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function T({
|
|
43
45
|
className: r,
|
|
44
|
-
children:
|
|
45
|
-
|
|
46
|
+
children: t,
|
|
47
|
+
onOpenAutoFocus: i,
|
|
48
|
+
onCloseAutoFocus: n,
|
|
49
|
+
onEscapeKeyDown: l,
|
|
50
|
+
...c
|
|
46
51
|
}) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
...
|
|
69
|
+
...c,
|
|
62
70
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
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
|
|
71
|
-
return /* @__PURE__ */
|
|
78
|
+
function O({ className: r, ...t }) {
|
|
79
|
+
return /* @__PURE__ */ a(
|
|
72
80
|
"div",
|
|
73
81
|
{
|
|
74
82
|
"data-slot": "drawer-header",
|
|
75
|
-
className:
|
|
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
|
-
...
|
|
87
|
+
...t
|
|
80
88
|
}
|
|
81
89
|
);
|
|
82
90
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */
|
|
91
|
+
function C({ className: r, ...t }) {
|
|
92
|
+
return /* @__PURE__ */ a(
|
|
85
93
|
"div",
|
|
86
94
|
{
|
|
87
95
|
"data-slot": "drawer-footer",
|
|
88
|
-
className:
|
|
89
|
-
...
|
|
96
|
+
className: o("mt-auto flex flex-col gap-2 p-4", r),
|
|
97
|
+
...t
|
|
90
98
|
}
|
|
91
99
|
);
|
|
92
100
|
}
|
|
93
|
-
function
|
|
101
|
+
function M({
|
|
94
102
|
className: r,
|
|
95
|
-
...
|
|
103
|
+
...t
|
|
96
104
|
}) {
|
|
97
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ a(
|
|
98
106
|
e.Title,
|
|
99
107
|
{
|
|
100
108
|
"data-slot": "drawer-title",
|
|
101
|
-
className:
|
|
102
|
-
...
|
|
109
|
+
className: o("typo-heading-lg text-[var(--Text-High-Emphasis)]", r),
|
|
110
|
+
...t
|
|
103
111
|
}
|
|
104
112
|
);
|
|
105
113
|
}
|
|
106
|
-
function
|
|
114
|
+
function F({
|
|
107
115
|
className: r,
|
|
108
|
-
...
|
|
116
|
+
...t
|
|
109
117
|
}) {
|
|
110
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ a(
|
|
111
119
|
e.Description,
|
|
112
120
|
{
|
|
113
121
|
"data-slot": "drawer-description",
|
|
114
|
-
className:
|
|
115
|
-
...
|
|
122
|
+
className: o("typo-body-sm text-[var(--Text-Medium-Emphasis)]", r),
|
|
123
|
+
...t
|
|
116
124
|
}
|
|
117
125
|
);
|
|
118
126
|
}
|
|
119
127
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
5
|
-
import { Label as
|
|
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
|
|
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
|
|
20
|
+
function v({
|
|
21
21
|
className: t,
|
|
22
22
|
orientation: e,
|
|
23
|
-
...
|
|
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:
|
|
32
|
-
...
|
|
31
|
+
className: r(n({ orientation: e }), t),
|
|
32
|
+
...l
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function b({
|
|
37
37
|
className: t,
|
|
38
38
|
...e
|
|
39
39
|
}) {
|
|
40
40
|
return /* @__PURE__ */ a(
|
|
41
|
-
|
|
41
|
+
d,
|
|
42
42
|
{
|
|
43
43
|
"data-slot": "field-label",
|
|
44
|
-
className:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
...
|
|
72
|
+
...l
|
|
62
73
|
}
|
|
63
74
|
);
|
|
64
75
|
}
|
|
65
|
-
function
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
...
|
|
90
|
+
...l
|
|
75
91
|
}
|
|
76
92
|
);
|
|
77
93
|
}
|
|
78
|
-
function
|
|
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:
|
|
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:
|
|
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
|
|
118
|
+
function T({
|
|
103
119
|
className: t,
|
|
104
120
|
children: e,
|
|
105
|
-
...
|
|
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:
|
|
128
|
+
className: r(
|
|
113
129
|
"typo-body-xs text-[var(--Text-Caution)]",
|
|
114
130
|
t
|
|
115
131
|
),
|
|
116
|
-
...
|
|
132
|
+
...l,
|
|
117
133
|
children: e
|
|
118
134
|
}
|
|
119
135
|
) : null;
|
|
120
136
|
}
|
|
121
|
-
function
|
|
137
|
+
function h({
|
|
122
138
|
className: t,
|
|
123
139
|
children: e,
|
|
124
|
-
...
|
|
140
|
+
...l
|
|
125
141
|
}) {
|
|
126
142
|
return /* @__PURE__ */ i(
|
|
127
143
|
"div",
|
|
128
144
|
{
|
|
129
145
|
"data-slot": "field-separator",
|
|
130
|
-
className:
|
|
131
|
-
...
|
|
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
|
-
|
|
157
|
+
v as Field,
|
|
142
158
|
F as FieldDescription,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
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" }),
|