@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,66 +1,66 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as f from "react";
|
|
3
3
|
import { cva as p } from "class-variance-authority";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import x from "iconsax-reactjs/dist/esm/ArrowSwapVertical.js";
|
|
5
|
+
import g from "iconsax-reactjs/dist/esm/ArrowUp.js";
|
|
6
6
|
import v from "iconsax-reactjs/dist/esm/ArrowDown.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { cn as
|
|
12
|
-
import { FOCUS_RING as
|
|
7
|
+
import w from "iconsax-reactjs/dist/esm/ArrowDown2.js";
|
|
8
|
+
import y from "iconsax-reactjs/dist/esm/More.js";
|
|
9
|
+
import N from "iconsax-reactjs/dist/esm/Add.js";
|
|
10
|
+
import T from "iconsax-reactjs/dist/esm/ExportSquare.js";
|
|
11
|
+
import { cn as i } from "../../lib/utils.js";
|
|
12
|
+
import { FOCUS_RING as E } from "../../lib/focus-ring.js";
|
|
13
13
|
import { Checkbox as C } from "./checkbox.js";
|
|
14
|
-
import { Button as
|
|
15
|
-
import { Avatar as S, AvatarImage as
|
|
16
|
-
import { Select as
|
|
17
|
-
import { DropdownMenu as
|
|
18
|
-
function
|
|
14
|
+
import { Button as k } from "./button.js";
|
|
15
|
+
import { Avatar as S, AvatarImage as D, AvatarFallback as A } from "./avatar.js";
|
|
16
|
+
import { Select as L, SelectTrigger as _, SelectValue as B, SelectContent as H, SelectItem as z } from "./select.js";
|
|
17
|
+
import { DropdownMenu as P, DropdownMenuTrigger as I, DropdownMenuContent as M, DropdownMenuSeparator as R, DropdownMenuItem as V } from "./dropdown-menu.js";
|
|
18
|
+
function oe({ className: t, ...a }) {
|
|
19
19
|
return /* @__PURE__ */ e(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
"data-slot": "data-table",
|
|
23
|
-
className:
|
|
23
|
+
className: i("relative w-full overflow-x-auto rounded-lg border border-[var(--Border-Low-Emphasis)]", t),
|
|
24
24
|
...a
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function ne({ className: t, ...a }) {
|
|
29
29
|
return /* @__PURE__ */ e(
|
|
30
30
|
"table",
|
|
31
31
|
{
|
|
32
32
|
"data-slot": "data-table-table",
|
|
33
|
-
className:
|
|
33
|
+
className: i("w-full caption-bottom typo-body-md border-collapse", t),
|
|
34
34
|
...a
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ie({ className: t, ...a }) {
|
|
39
39
|
return /* @__PURE__ */ e(
|
|
40
40
|
"thead",
|
|
41
41
|
{
|
|
42
42
|
"data-slot": "data-table-header",
|
|
43
|
-
className:
|
|
43
|
+
className: i("bg-[var(--Surface-Secondary)] [&_tr]:border-b [&_tr]:border-[var(--Border-Low-Emphasis)]", t),
|
|
44
44
|
...a
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function se({ className: t, ...a }) {
|
|
49
49
|
return /* @__PURE__ */ e(
|
|
50
50
|
"tbody",
|
|
51
51
|
{
|
|
52
52
|
"data-slot": "data-table-body",
|
|
53
|
-
className:
|
|
53
|
+
className: i("[&_tr:last-child]:border-b-0", t),
|
|
54
54
|
...a
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const j = p(
|
|
59
59
|
"group/row border-b border-[var(--Border-Low-Emphasis)] transition-colors",
|
|
60
60
|
{
|
|
61
61
|
variants: {
|
|
62
62
|
state: {
|
|
63
|
-
default: "hover:bg-[var(--Surface-Tertiary)]",
|
|
63
|
+
default: "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
64
64
|
selected: "bg-[var(--Surface-Accent-Primary-Light)] hover:bg-[var(--Surface-Accent-Primary-Light)] border-l-[3px] border-l-[var(--Brand-Cake-Orange)]"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -68,45 +68,80 @@ const V = p(
|
|
|
68
68
|
state: "default"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
), F = [
|
|
72
|
+
"a[href]",
|
|
73
|
+
"button",
|
|
74
|
+
"input",
|
|
75
|
+
"select",
|
|
76
|
+
"textarea",
|
|
77
|
+
"label",
|
|
78
|
+
"[contenteditable]:not([contenteditable='false'])",
|
|
79
|
+
"[role='button']",
|
|
80
|
+
"[role='link']",
|
|
81
|
+
"[role='menuitem']",
|
|
82
|
+
"[role='checkbox']",
|
|
83
|
+
"[role='radio']",
|
|
84
|
+
"[role='switch']",
|
|
85
|
+
"[role='combobox']",
|
|
86
|
+
"[role='option']",
|
|
87
|
+
"[role='listbox']",
|
|
88
|
+
"[role='dialog']",
|
|
89
|
+
"[data-table-ignore-row-click]"
|
|
90
|
+
].join(",");
|
|
91
|
+
function u(t) {
|
|
92
|
+
const a = t.target, r = t.currentTarget;
|
|
93
|
+
if (!(a instanceof Node) || a === r) return !1;
|
|
94
|
+
if (!r.contains(a)) return !0;
|
|
95
|
+
if (!(a instanceof Element)) return !1;
|
|
96
|
+
const l = a.closest(F);
|
|
97
|
+
return !!(l && l !== r && r.contains(l));
|
|
98
|
+
}
|
|
99
|
+
function ce({
|
|
100
|
+
className: t,
|
|
74
101
|
state: a,
|
|
75
|
-
|
|
102
|
+
onClick: r,
|
|
103
|
+
onKeyDown: l,
|
|
104
|
+
...o
|
|
76
105
|
}) {
|
|
77
106
|
return /* @__PURE__ */ e(
|
|
78
107
|
"tr",
|
|
79
108
|
{
|
|
80
109
|
"data-slot": "data-table-row",
|
|
81
|
-
className:
|
|
82
|
-
|
|
110
|
+
className: i(j({ state: a }), t),
|
|
111
|
+
onClick: r ? (n) => {
|
|
112
|
+
n.defaultPrevented || u(n) || r(n);
|
|
113
|
+
} : void 0,
|
|
114
|
+
onKeyDown: l ? (n) => {
|
|
115
|
+
n.defaultPrevented || (n.key === "Enter" || n.key === " ") && u(n) || l(n);
|
|
116
|
+
} : void 0,
|
|
117
|
+
...o
|
|
83
118
|
}
|
|
84
119
|
);
|
|
85
120
|
}
|
|
86
|
-
function
|
|
87
|
-
className:
|
|
121
|
+
function de({
|
|
122
|
+
className: t,
|
|
88
123
|
sortable: a,
|
|
89
|
-
sortDirection:
|
|
90
|
-
onSort:
|
|
91
|
-
width:
|
|
92
|
-
srLabel:
|
|
124
|
+
sortDirection: r,
|
|
125
|
+
onSort: l,
|
|
126
|
+
width: o,
|
|
127
|
+
srLabel: n,
|
|
93
128
|
children: c,
|
|
94
129
|
...d
|
|
95
130
|
}) {
|
|
96
|
-
const h =
|
|
131
|
+
const h = r === "asc" ? g : r === "desc" ? v : x, b = r === "asc" ? "ascending" : r === "desc" ? "descending" : "none";
|
|
97
132
|
return /* @__PURE__ */ s(
|
|
98
133
|
"th",
|
|
99
134
|
{
|
|
100
135
|
"data-slot": "data-table-head",
|
|
101
|
-
className:
|
|
136
|
+
className: i(
|
|
102
137
|
"h-16 px-4 text-left align-middle typo-label-sm whitespace-nowrap text-[var(--Text-Medium-Emphasis)]",
|
|
103
138
|
"[&:has([role=checkbox])]:w-12 [&:has([role=checkbox])]:pr-0",
|
|
104
|
-
a && "hover:bg-[var(--Surface-Tertiary)]",
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
139
|
+
a && "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
140
|
+
o === "max" && "min-w-[320px] max-w-[360px]",
|
|
141
|
+
o === "hug" && "min-w-0 w-0",
|
|
142
|
+
t
|
|
108
143
|
),
|
|
109
|
-
"aria-sort": a ?
|
|
144
|
+
"aria-sort": a ? b : void 0,
|
|
110
145
|
...d,
|
|
111
146
|
children: [
|
|
112
147
|
a ? (
|
|
@@ -116,12 +151,12 @@ function se({
|
|
|
116
151
|
"button",
|
|
117
152
|
{
|
|
118
153
|
type: "button",
|
|
119
|
-
onClick:
|
|
120
|
-
className:
|
|
154
|
+
onClick: l,
|
|
155
|
+
className: i(
|
|
121
156
|
"inline-flex items-center gap-1 rounded-sm outline-none",
|
|
122
157
|
"cursor-pointer select-none",
|
|
123
|
-
|
|
124
|
-
|
|
158
|
+
E,
|
|
159
|
+
r && "typo-label-sm font-bold text-[var(--Text-High-Emphasis)]"
|
|
125
160
|
),
|
|
126
161
|
children: [
|
|
127
162
|
c,
|
|
@@ -130,19 +165,19 @@ function se({
|
|
|
130
165
|
{
|
|
131
166
|
size: 14,
|
|
132
167
|
"aria-hidden": "true",
|
|
133
|
-
className:
|
|
168
|
+
className: i(r ? "text-[var(--Text-High-Emphasis)]" : "text-[var(--Text-Low-Emphasis)]")
|
|
134
169
|
}
|
|
135
170
|
)
|
|
136
171
|
]
|
|
137
172
|
}
|
|
138
173
|
)
|
|
139
174
|
) : c,
|
|
140
|
-
|
|
175
|
+
n && /* @__PURE__ */ e("span", { className: "sr-only", children: n })
|
|
141
176
|
]
|
|
142
177
|
}
|
|
143
178
|
);
|
|
144
179
|
}
|
|
145
|
-
const
|
|
180
|
+
const O = p(
|
|
146
181
|
"px-4 py-4 align-middle whitespace-nowrap typo-body-md text-[var(--Text-High-Emphasis)] [&:has([role=checkbox])]:w-12 [&:has([role=checkbox])]:pr-0",
|
|
147
182
|
{
|
|
148
183
|
variants: {
|
|
@@ -164,237 +199,237 @@ const j = p(
|
|
|
164
199
|
}
|
|
165
200
|
);
|
|
166
201
|
function m({
|
|
167
|
-
className:
|
|
202
|
+
className: t,
|
|
168
203
|
width: a,
|
|
169
|
-
align:
|
|
170
|
-
...
|
|
204
|
+
align: r,
|
|
205
|
+
...l
|
|
171
206
|
}) {
|
|
172
207
|
return /* @__PURE__ */ e(
|
|
173
208
|
"td",
|
|
174
209
|
{
|
|
175
210
|
"data-slot": "data-table-cell",
|
|
176
|
-
className:
|
|
177
|
-
...
|
|
211
|
+
className: i(O({ width: a, align: r }), t),
|
|
212
|
+
...l
|
|
178
213
|
}
|
|
179
214
|
);
|
|
180
215
|
}
|
|
181
|
-
function
|
|
182
|
-
className:
|
|
216
|
+
function me({
|
|
217
|
+
className: t,
|
|
183
218
|
src: a,
|
|
184
|
-
fallback:
|
|
185
|
-
title:
|
|
186
|
-
caption:
|
|
187
|
-
...
|
|
219
|
+
fallback: r,
|
|
220
|
+
title: l,
|
|
221
|
+
caption: o,
|
|
222
|
+
...n
|
|
188
223
|
}) {
|
|
189
|
-
return /* @__PURE__ */ e(m, { className:
|
|
224
|
+
return /* @__PURE__ */ e(m, { className: i("min-w-[200px]", t), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
190
225
|
/* @__PURE__ */ s(S, { children: [
|
|
191
|
-
a && /* @__PURE__ */ e(
|
|
192
|
-
/* @__PURE__ */ e(
|
|
226
|
+
a && /* @__PURE__ */ e(D, { src: a, alt: l }),
|
|
227
|
+
/* @__PURE__ */ e(A, { children: r || l.charAt(0) })
|
|
193
228
|
] }),
|
|
194
229
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
195
|
-
/* @__PURE__ */ e("p", { className: "typo-label-sm text-[var(--Text-High-Emphasis)] truncate", children:
|
|
196
|
-
|
|
230
|
+
/* @__PURE__ */ e("p", { className: "typo-label-sm text-[var(--Text-High-Emphasis)] truncate", children: l }),
|
|
231
|
+
o && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Low-Emphasis)] truncate", children: o })
|
|
197
232
|
] })
|
|
198
233
|
] }) });
|
|
199
234
|
}
|
|
200
|
-
function
|
|
201
|
-
className:
|
|
235
|
+
function ue({
|
|
236
|
+
className: t,
|
|
202
237
|
checked: a,
|
|
203
|
-
onCheckedChange:
|
|
204
|
-
indeterminate:
|
|
205
|
-
"aria-label":
|
|
206
|
-
...
|
|
238
|
+
onCheckedChange: r,
|
|
239
|
+
indeterminate: l,
|
|
240
|
+
"aria-label": o,
|
|
241
|
+
...n
|
|
207
242
|
}) {
|
|
208
243
|
return /* @__PURE__ */ e(
|
|
209
244
|
"td",
|
|
210
245
|
{
|
|
211
246
|
"data-slot": "data-table-checkbox-cell",
|
|
212
|
-
className:
|
|
247
|
+
className: i("w-16 px-4 py-4 align-middle cursor-pointer", t),
|
|
213
248
|
onClick: (c) => {
|
|
214
|
-
c.stopPropagation(),
|
|
249
|
+
c.stopPropagation(), r?.(!(!l && a));
|
|
215
250
|
},
|
|
216
|
-
...
|
|
251
|
+
...n,
|
|
217
252
|
children: /* @__PURE__ */ e(
|
|
218
253
|
C,
|
|
219
254
|
{
|
|
220
|
-
checked:
|
|
221
|
-
onCheckedChange: (c) =>
|
|
255
|
+
checked: l ? "indeterminate" : a,
|
|
256
|
+
onCheckedChange: (c) => r?.(c === !0),
|
|
222
257
|
onClick: (c) => c.stopPropagation(),
|
|
223
|
-
"aria-label":
|
|
258
|
+
"aria-label": o || "行を選択",
|
|
224
259
|
className: "pointer-events-none"
|
|
225
260
|
}
|
|
226
261
|
)
|
|
227
262
|
}
|
|
228
263
|
);
|
|
229
264
|
}
|
|
230
|
-
function
|
|
231
|
-
className:
|
|
265
|
+
function pe({
|
|
266
|
+
className: t,
|
|
232
267
|
actions: a,
|
|
233
|
-
onClick:
|
|
234
|
-
...
|
|
268
|
+
onClick: r,
|
|
269
|
+
...l
|
|
235
270
|
}) {
|
|
236
271
|
return /* @__PURE__ */ e(
|
|
237
272
|
m,
|
|
238
273
|
{
|
|
239
|
-
className:
|
|
240
|
-
onClick: (
|
|
241
|
-
|
|
274
|
+
className: i("w-10", t),
|
|
275
|
+
onClick: (o) => {
|
|
276
|
+
o.stopPropagation(), r?.(o);
|
|
242
277
|
},
|
|
243
|
-
...
|
|
244
|
-
children: /* @__PURE__ */ s(
|
|
245
|
-
/* @__PURE__ */ e(
|
|
246
|
-
/* @__PURE__ */ e(
|
|
247
|
-
|
|
278
|
+
...l,
|
|
279
|
+
children: /* @__PURE__ */ s(P, { children: [
|
|
280
|
+
/* @__PURE__ */ e(I, { asChild: !0, children: /* @__PURE__ */ e(k, { variant: "ghost", size: "sm", className: "size-8 p-0", "aria-label": "アクションメニュー", children: /* @__PURE__ */ e(y, { size: 16 }) }) }),
|
|
281
|
+
/* @__PURE__ */ e(M, { align: "end", children: a.map((o, n) => /* @__PURE__ */ s(f.Fragment, { children: [
|
|
282
|
+
o.separator && /* @__PURE__ */ e(R, {}),
|
|
248
283
|
/* @__PURE__ */ e(
|
|
249
|
-
|
|
284
|
+
V,
|
|
250
285
|
{
|
|
251
|
-
onClick:
|
|
252
|
-
variant:
|
|
253
|
-
children:
|
|
286
|
+
onClick: o.onClick,
|
|
287
|
+
variant: o.destructive ? "destructive" : "default",
|
|
288
|
+
children: o.label
|
|
254
289
|
}
|
|
255
290
|
)
|
|
256
|
-
] },
|
|
291
|
+
] }, n)) })
|
|
257
292
|
] })
|
|
258
293
|
}
|
|
259
294
|
);
|
|
260
295
|
}
|
|
261
|
-
function
|
|
262
|
-
className:
|
|
296
|
+
function he({
|
|
297
|
+
className: t,
|
|
263
298
|
selectedCount: a,
|
|
264
|
-
children:
|
|
265
|
-
...
|
|
299
|
+
children: r,
|
|
300
|
+
...l
|
|
266
301
|
}) {
|
|
267
302
|
return a === 0 ? null : /* @__PURE__ */ s(
|
|
268
303
|
"div",
|
|
269
304
|
{
|
|
270
305
|
"data-slot": "data-table-bulk-actions",
|
|
271
|
-
className:
|
|
306
|
+
className: i(
|
|
272
307
|
"flex items-center gap-3 px-4 py-3 bg-[var(--Surface-Accent-Primary-Light)] border-b border-[var(--Border-Low-Emphasis)]",
|
|
273
|
-
|
|
308
|
+
t
|
|
274
309
|
),
|
|
275
|
-
...
|
|
310
|
+
...l,
|
|
276
311
|
children: [
|
|
277
312
|
/* @__PURE__ */ s("span", { className: "typo-label-sm text-[var(--Text-High-Emphasis)]", children: [
|
|
278
313
|
a,
|
|
279
314
|
"件を選択中"
|
|
280
315
|
] }),
|
|
281
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children:
|
|
316
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: r })
|
|
282
317
|
]
|
|
283
318
|
}
|
|
284
319
|
);
|
|
285
320
|
}
|
|
286
|
-
function
|
|
287
|
-
className:
|
|
321
|
+
function be({
|
|
322
|
+
className: t,
|
|
288
323
|
title: a,
|
|
289
|
-
colSpan:
|
|
290
|
-
expanded:
|
|
291
|
-
onToggle:
|
|
292
|
-
actions:
|
|
324
|
+
colSpan: r,
|
|
325
|
+
expanded: l,
|
|
326
|
+
onToggle: o,
|
|
327
|
+
actions: n,
|
|
293
328
|
...c
|
|
294
329
|
}) {
|
|
295
330
|
return /* @__PURE__ */ e(
|
|
296
331
|
"tr",
|
|
297
332
|
{
|
|
298
333
|
"data-slot": "data-table-section-row",
|
|
299
|
-
className:
|
|
334
|
+
className: i("border-b border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Secondary)]", t),
|
|
300
335
|
...c,
|
|
301
|
-
children: /* @__PURE__ */ e("td", { colSpan:
|
|
336
|
+
children: /* @__PURE__ */ e("td", { colSpan: r, className: "px-4 py-3", children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
302
337
|
/* @__PURE__ */ s(
|
|
303
338
|
"button",
|
|
304
339
|
{
|
|
305
340
|
type: "button",
|
|
306
341
|
className: "flex items-center gap-1.5 typo-label-md text-[var(--Text-High-Emphasis)] cursor-pointer",
|
|
307
|
-
onClick:
|
|
308
|
-
"aria-expanded":
|
|
342
|
+
onClick: o,
|
|
343
|
+
"aria-expanded": l,
|
|
309
344
|
children: [
|
|
310
|
-
/* @__PURE__ */ e(
|
|
345
|
+
/* @__PURE__ */ e(w, { size: 16, className: i("transition-transform", l ? "" : "-rotate-90") }),
|
|
311
346
|
a
|
|
312
347
|
]
|
|
313
348
|
}
|
|
314
349
|
),
|
|
315
|
-
|
|
350
|
+
n && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: n })
|
|
316
351
|
] }) })
|
|
317
352
|
}
|
|
318
353
|
);
|
|
319
354
|
}
|
|
320
|
-
function
|
|
321
|
-
className:
|
|
355
|
+
function fe({
|
|
356
|
+
className: t,
|
|
322
357
|
colSpan: a,
|
|
323
|
-
label:
|
|
324
|
-
onClick:
|
|
325
|
-
...
|
|
358
|
+
label: r = "新しく追加",
|
|
359
|
+
onClick: l,
|
|
360
|
+
...o
|
|
326
361
|
}) {
|
|
327
362
|
return /* @__PURE__ */ e(
|
|
328
363
|
"tr",
|
|
329
364
|
{
|
|
330
365
|
"data-slot": "data-table-add-row",
|
|
331
|
-
className:
|
|
332
|
-
onClick:
|
|
333
|
-
...
|
|
366
|
+
className: i("border-b border-[var(--Border-Low-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] cursor-pointer transition-colors", t),
|
|
367
|
+
onClick: l,
|
|
368
|
+
...o,
|
|
334
369
|
children: /* @__PURE__ */ e("td", { colSpan: a, className: "px-4 py-4", children: /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-2 typo-body-md text-[var(--Text-Medium-Emphasis)]", children: [
|
|
335
|
-
/* @__PURE__ */ e(
|
|
336
|
-
|
|
370
|
+
/* @__PURE__ */ e(N, { size: 16 }),
|
|
371
|
+
r
|
|
337
372
|
] }) })
|
|
338
373
|
}
|
|
339
374
|
);
|
|
340
375
|
}
|
|
341
|
-
function
|
|
342
|
-
className:
|
|
376
|
+
function xe({
|
|
377
|
+
className: t,
|
|
343
378
|
colSpan: a,
|
|
344
|
-
message:
|
|
345
|
-
icon:
|
|
346
|
-
description:
|
|
347
|
-
action:
|
|
379
|
+
message: r = "対象のデータはありません",
|
|
380
|
+
icon: l,
|
|
381
|
+
description: o,
|
|
382
|
+
action: n,
|
|
348
383
|
...c
|
|
349
384
|
}) {
|
|
350
385
|
return /* @__PURE__ */ e(
|
|
351
386
|
"tr",
|
|
352
387
|
{
|
|
353
388
|
"data-slot": "data-table-empty-state",
|
|
354
|
-
className:
|
|
389
|
+
className: i("", t),
|
|
355
390
|
...c,
|
|
356
|
-
children: /* @__PURE__ */ e("td", { colSpan: a, children:
|
|
357
|
-
/* @__PURE__ */ e("div", { className: "text-[var(--Border-Medium-Emphasis)]", children:
|
|
358
|
-
/* @__PURE__ */ e("p", { className: "mt-4 typo-heading-md text-[var(--Text-High-Emphasis)]", children:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
] }) : /* @__PURE__ */ e("p", { className: "py-12 text-center typo-body-md text-[var(--Text-Low-Emphasis)]", children:
|
|
391
|
+
children: /* @__PURE__ */ e("td", { colSpan: a, children: l ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center px-4 py-16", children: [
|
|
392
|
+
/* @__PURE__ */ e("div", { className: "text-[var(--Border-Medium-Emphasis)]", children: l }),
|
|
393
|
+
/* @__PURE__ */ e("p", { className: "mt-4 typo-heading-md text-[var(--Text-High-Emphasis)]", children: r }),
|
|
394
|
+
o && /* @__PURE__ */ e("div", { className: "mt-1 text-center typo-body-md text-[var(--Text-Medium-Emphasis)]", children: o }),
|
|
395
|
+
n && /* @__PURE__ */ e("div", { className: "mt-6", children: n })
|
|
396
|
+
] }) : /* @__PURE__ */ e("p", { className: "py-12 text-center typo-body-md text-[var(--Text-Low-Emphasis)]", children: r }) })
|
|
362
397
|
}
|
|
363
398
|
);
|
|
364
399
|
}
|
|
365
|
-
function
|
|
366
|
-
className:
|
|
400
|
+
function ge({
|
|
401
|
+
className: t,
|
|
367
402
|
src: a,
|
|
368
|
-
alt:
|
|
369
|
-
title:
|
|
370
|
-
caption:
|
|
371
|
-
...
|
|
403
|
+
alt: r,
|
|
404
|
+
title: l,
|
|
405
|
+
caption: o,
|
|
406
|
+
...n
|
|
372
407
|
}) {
|
|
373
|
-
return /* @__PURE__ */ e(m, { className:
|
|
374
|
-
/* @__PURE__ */ e("div", { className: "size-10 rounded-lg bg-[var(--Surface-Tertiary)] overflow-hidden shrink-0", children: a && /* @__PURE__ */ e(
|
|
408
|
+
return /* @__PURE__ */ e(m, { className: i("min-w-[200px]", t), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
409
|
+
/* @__PURE__ */ e("div", { className: "size-10 rounded-lg bg-[var(--Surface-Neutral-Tertiary)] overflow-hidden shrink-0", children: a && /* @__PURE__ */ e(
|
|
375
410
|
"img",
|
|
376
411
|
{
|
|
377
412
|
src: a,
|
|
378
|
-
alt:
|
|
413
|
+
alt: r || l,
|
|
379
414
|
className: "size-full object-cover",
|
|
380
415
|
loading: "lazy"
|
|
381
416
|
}
|
|
382
417
|
) }),
|
|
383
418
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
384
|
-
/* @__PURE__ */ e("p", { className: "typo-body-md text-[var(--Text-High-Emphasis)] line-clamp-2", children:
|
|
385
|
-
|
|
419
|
+
/* @__PURE__ */ e("p", { className: "typo-body-md text-[var(--Text-High-Emphasis)] line-clamp-2", children: l }),
|
|
420
|
+
o && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Low-Emphasis)] truncate", children: o })
|
|
386
421
|
] })
|
|
387
422
|
] }) });
|
|
388
423
|
}
|
|
389
|
-
function
|
|
390
|
-
className:
|
|
424
|
+
function ve({
|
|
425
|
+
className: t,
|
|
391
426
|
...a
|
|
392
427
|
}) {
|
|
393
428
|
return /* @__PURE__ */ e(
|
|
394
429
|
"td",
|
|
395
430
|
{
|
|
396
431
|
"data-slot": "data-table-drag-handle-cell",
|
|
397
|
-
className:
|
|
432
|
+
className: i("w-10 px-2 py-4 align-middle cursor-grab active:cursor-grabbing", t),
|
|
398
433
|
...a,
|
|
399
434
|
children: /* @__PURE__ */ s(
|
|
400
435
|
"svg",
|
|
@@ -419,118 +454,118 @@ function xe({
|
|
|
419
454
|
}
|
|
420
455
|
);
|
|
421
456
|
}
|
|
422
|
-
function
|
|
423
|
-
className:
|
|
457
|
+
function we({
|
|
458
|
+
className: t,
|
|
424
459
|
href: a = "#",
|
|
425
|
-
external:
|
|
426
|
-
linkComponent:
|
|
427
|
-
children:
|
|
428
|
-
...
|
|
460
|
+
external: r,
|
|
461
|
+
linkComponent: l,
|
|
462
|
+
children: o,
|
|
463
|
+
...n
|
|
429
464
|
}) {
|
|
430
|
-
return /* @__PURE__ */ e(m, { className:
|
|
431
|
-
|
|
465
|
+
return /* @__PURE__ */ e(m, { className: t, ...n, children: /* @__PURE__ */ s(
|
|
466
|
+
r ? "a" : l ?? "a",
|
|
432
467
|
{
|
|
433
468
|
href: a,
|
|
434
469
|
className: "inline-flex items-center gap-1 typo-body-md text-[var(--Text-Accent-Primary)] hover:underline",
|
|
435
|
-
...
|
|
470
|
+
...r ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
436
471
|
children: [
|
|
437
|
-
|
|
438
|
-
|
|
472
|
+
o,
|
|
473
|
+
r && /* @__PURE__ */ e(T, { size: 14 })
|
|
439
474
|
]
|
|
440
475
|
}
|
|
441
476
|
) });
|
|
442
477
|
}
|
|
443
|
-
function
|
|
444
|
-
className:
|
|
478
|
+
function ye({
|
|
479
|
+
className: t,
|
|
445
480
|
value: a,
|
|
446
|
-
onChange:
|
|
447
|
-
placeholder:
|
|
448
|
-
type:
|
|
449
|
-
name:
|
|
481
|
+
onChange: r,
|
|
482
|
+
placeholder: l,
|
|
483
|
+
type: o = "text",
|
|
484
|
+
name: n,
|
|
450
485
|
...c
|
|
451
486
|
}) {
|
|
452
487
|
return /* @__PURE__ */ e(
|
|
453
488
|
"td",
|
|
454
489
|
{
|
|
455
490
|
"data-slot": "data-table-input-cell",
|
|
456
|
-
className:
|
|
491
|
+
className: i(
|
|
457
492
|
"px-4 py-4 align-middle whitespace-nowrap",
|
|
458
493
|
"hover:shadow-[inset_0_0_0_2px_var(--Border-Accent-Primary)] hover:rounded",
|
|
459
494
|
"has-[input:focus]:shadow-[inset_0_0_0_2px_var(--Border-Accent-Primary)] has-[input:focus]:rounded",
|
|
460
495
|
// forced-colors では影が描かれず、input は outline-none なので、セル全体に内側の輪郭線を出す
|
|
461
496
|
"forced-colors:has-[input:focus]:outline-solid forced-colors:has-[input:focus]:outline-2 forced-colors:has-[input:focus]:-outline-offset-2 forced-colors:has-[input:focus]:outline-[Highlight]",
|
|
462
|
-
|
|
497
|
+
t
|
|
463
498
|
),
|
|
464
499
|
...c,
|
|
465
500
|
children: /* @__PURE__ */ e(
|
|
466
501
|
"input",
|
|
467
502
|
{
|
|
468
|
-
type:
|
|
469
|
-
name:
|
|
503
|
+
type: o,
|
|
504
|
+
name: n,
|
|
470
505
|
value: a,
|
|
471
|
-
onChange: (d) =>
|
|
472
|
-
placeholder:
|
|
506
|
+
onChange: (d) => r?.(d.target.value),
|
|
507
|
+
placeholder: l,
|
|
473
508
|
className: "w-full bg-transparent outline-none typo-body-md text-[var(--Text-High-Emphasis)] placeholder:text-[var(--Text-Low-Emphasis)]"
|
|
474
509
|
}
|
|
475
510
|
)
|
|
476
511
|
}
|
|
477
512
|
);
|
|
478
513
|
}
|
|
479
|
-
function
|
|
480
|
-
className:
|
|
514
|
+
function Ne({
|
|
515
|
+
className: t,
|
|
481
516
|
value: a,
|
|
482
|
-
onValueChange:
|
|
483
|
-
options:
|
|
484
|
-
placeholder:
|
|
485
|
-
"aria-label":
|
|
517
|
+
onValueChange: r,
|
|
518
|
+
options: l,
|
|
519
|
+
placeholder: o = "選択してください",
|
|
520
|
+
"aria-label": n,
|
|
486
521
|
...c
|
|
487
522
|
}) {
|
|
488
523
|
return /* @__PURE__ */ e(
|
|
489
524
|
m,
|
|
490
525
|
{
|
|
491
|
-
className:
|
|
526
|
+
className: i("hover:bg-[var(--Surface-Neutral-Tertiary)] cursor-pointer p-0", t),
|
|
492
527
|
...c,
|
|
493
|
-
children: /* @__PURE__ */ s(
|
|
528
|
+
children: /* @__PURE__ */ s(L, { value: a, onValueChange: r, children: [
|
|
494
529
|
/* @__PURE__ */ e(
|
|
495
|
-
|
|
530
|
+
_,
|
|
496
531
|
{
|
|
497
532
|
size: "sm",
|
|
498
|
-
"aria-label":
|
|
533
|
+
"aria-label": n ?? o,
|
|
499
534
|
className: "w-full min-w-[160px] border-0 bg-transparent rounded-none px-4 py-4 h-auto hover:bg-transparent focus-visible:ring-0 focus-visible:border-0",
|
|
500
|
-
children: /* @__PURE__ */ e(
|
|
535
|
+
children: /* @__PURE__ */ e(B, { placeholder: o })
|
|
501
536
|
}
|
|
502
537
|
),
|
|
503
|
-
/* @__PURE__ */ e(
|
|
538
|
+
/* @__PURE__ */ e(H, { children: l.map((d) => /* @__PURE__ */ e(z, { value: d.value, children: d.label }, d.value)) })
|
|
504
539
|
] })
|
|
505
540
|
}
|
|
506
541
|
);
|
|
507
542
|
}
|
|
508
|
-
function
|
|
509
|
-
className:
|
|
543
|
+
function Te({
|
|
544
|
+
className: t,
|
|
510
545
|
children: a,
|
|
511
|
-
...
|
|
546
|
+
...r
|
|
512
547
|
}) {
|
|
513
|
-
return /* @__PURE__ */ e(m, { align: "right", className:
|
|
548
|
+
return /* @__PURE__ */ e(m, { align: "right", className: t, ...r, children: a });
|
|
514
549
|
}
|
|
515
550
|
export {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
551
|
+
oe as DataTable,
|
|
552
|
+
pe as DataTableActionCell,
|
|
553
|
+
fe as DataTableAddRow,
|
|
554
|
+
me as DataTableAvatarCell,
|
|
555
|
+
se as DataTableBody,
|
|
556
|
+
he as DataTableBulkActions,
|
|
522
557
|
m as DataTableCell,
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
558
|
+
ue as DataTableCheckboxCell,
|
|
559
|
+
ve as DataTableDragHandleCell,
|
|
560
|
+
xe as DataTableEmptyState,
|
|
561
|
+
de as DataTableHead,
|
|
562
|
+
ie as DataTableHeader,
|
|
563
|
+
ge as DataTableImageCell,
|
|
564
|
+
ye as DataTableInputCell,
|
|
565
|
+
we as DataTableLinkCell,
|
|
566
|
+
Te as DataTableNumberCell,
|
|
567
|
+
ce as DataTableRow,
|
|
568
|
+
be as DataTableSectionRow,
|
|
569
|
+
Ne as DataTableSelectCell,
|
|
570
|
+
ne as DataTableTable
|
|
536
571
|
};
|