@cakejp/design-system 0.22.1 → 0.24.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 +102 -0
- package/CLAUDE.md +4 -2
- package/MIGRATION.md +79 -0
- package/UPDATING.md +1 -1
- package/bin/check-tokens.mjs +20 -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 +75 -69
- package/dist/components/foundations/badge.js +8 -8
- 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 +19 -18
- 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 +8 -8
- package/dist/components/primitives/workspace-shell.js +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +1487 -712
- 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 +50 -24
- package/src/preset.css +36 -18
- package/src/styles/primitive.css +1 -0
- package/src/styles/semantic.css +21 -5
- package/tokens.json +48 -11
|
@@ -10,10 +10,10 @@ import { FOCUS_RING_ONLY as C, FORCED_COLORS_FOCUS as O } from "../../lib/focus-
|
|
|
10
10
|
import { Button as h } from "../foundations/button.js";
|
|
11
11
|
import { Input as B } from "../foundations/input.js";
|
|
12
12
|
import { Label as T } from "../foundations/label.js";
|
|
13
|
-
function
|
|
13
|
+
function R({
|
|
14
14
|
type: r,
|
|
15
|
-
label:
|
|
16
|
-
required:
|
|
15
|
+
label: t,
|
|
16
|
+
required: i = !1,
|
|
17
17
|
price: a,
|
|
18
18
|
helpText: o,
|
|
19
19
|
error: s,
|
|
@@ -37,10 +37,10 @@ function j({
|
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
39
39
|
/* @__PURE__ */ l(T, { id: `${c}-label`, className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: [
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
t,
|
|
41
|
+
i && /* @__PURE__ */ e("span", { className: "ml-1 text-[var(--Text-Caution)]", "aria-hidden": "true", children: "*" })
|
|
42
42
|
] }),
|
|
43
|
-
|
|
43
|
+
i && /* @__PURE__ */ e("span", { className: "sr-only", children: "(必須)" }),
|
|
44
44
|
a && /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)]", children: a })
|
|
45
45
|
] }),
|
|
46
46
|
d.Children.map(n, (m) => d.isValidElement(m) ? d.cloneElement(m, {
|
|
@@ -53,10 +53,10 @@ function j({
|
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function $({
|
|
57
57
|
value: r,
|
|
58
|
-
min:
|
|
59
|
-
max:
|
|
58
|
+
min: t = 0,
|
|
59
|
+
max: i = 99,
|
|
60
60
|
onChange: a,
|
|
61
61
|
...o
|
|
62
62
|
}) {
|
|
@@ -66,8 +66,8 @@ function R({
|
|
|
66
66
|
{
|
|
67
67
|
variant: "tertiary",
|
|
68
68
|
size: "icon-sm",
|
|
69
|
-
onClick: () => a?.(Math.max(
|
|
70
|
-
disabled: r <=
|
|
69
|
+
onClick: () => a?.(Math.max(t, r - 1)),
|
|
70
|
+
disabled: r <= t,
|
|
71
71
|
"aria-label": "減らす",
|
|
72
72
|
children: /* @__PURE__ */ e(N, { size: 16 })
|
|
73
73
|
}
|
|
@@ -78,18 +78,18 @@ function R({
|
|
|
78
78
|
{
|
|
79
79
|
variant: "tertiary",
|
|
80
80
|
size: "icon-sm",
|
|
81
|
-
onClick: () => a?.(Math.min(
|
|
82
|
-
disabled: r >=
|
|
81
|
+
onClick: () => a?.(Math.min(i, r + 1)),
|
|
82
|
+
disabled: r >= i,
|
|
83
83
|
"aria-label": "増やす",
|
|
84
84
|
children: /* @__PURE__ */ e(g, { size: 16 })
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
] });
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function j({
|
|
90
90
|
value: r,
|
|
91
|
-
options:
|
|
92
|
-
onChange:
|
|
91
|
+
options: t,
|
|
92
|
+
onChange: i,
|
|
93
93
|
placeholder: a = "テキスト",
|
|
94
94
|
...o
|
|
95
95
|
}) {
|
|
@@ -100,15 +100,15 @@ function _({
|
|
|
100
100
|
{
|
|
101
101
|
id: s,
|
|
102
102
|
value: r,
|
|
103
|
-
onChange: (n) =>
|
|
103
|
+
onChange: (n) => i?.(n.target.value),
|
|
104
104
|
"aria-label": a,
|
|
105
105
|
className: b(
|
|
106
|
-
"w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[var(--Focus-High-Emphasis)]
|
|
106
|
+
"w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--Focus-High-Emphasis)_50%,transparent))]",
|
|
107
107
|
O
|
|
108
108
|
),
|
|
109
109
|
children: [
|
|
110
110
|
/* @__PURE__ */ e("option", { value: "", disabled: !0, children: a }),
|
|
111
|
-
|
|
111
|
+
t.map((n) => /* @__PURE__ */ e("option", { value: n.value, children: n.label }, n.value))
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
114
|
),
|
|
@@ -117,8 +117,8 @@ function _({
|
|
|
117
117
|
}
|
|
118
118
|
function P({
|
|
119
119
|
value: r,
|
|
120
|
-
onChange:
|
|
121
|
-
placeholder:
|
|
120
|
+
onChange: t,
|
|
121
|
+
placeholder: i = "プレイスホルダー",
|
|
122
122
|
maxLength: a,
|
|
123
123
|
...o
|
|
124
124
|
}) {
|
|
@@ -129,10 +129,10 @@ function P({
|
|
|
129
129
|
{
|
|
130
130
|
id: s,
|
|
131
131
|
value: r,
|
|
132
|
-
onChange: (n) =>
|
|
133
|
-
placeholder:
|
|
132
|
+
onChange: (n) => t?.(n.target.value),
|
|
133
|
+
placeholder: i,
|
|
134
134
|
maxLength: a,
|
|
135
|
-
"aria-label":
|
|
135
|
+
"aria-label": i
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
138
|
a && /* @__PURE__ */ l("p", { className: "text-right typo-body-sm text-[var(--Text-Low-Emphasis)]", "aria-live": "polite", children: [
|
|
@@ -144,7 +144,7 @@ function P({
|
|
|
144
144
|
}
|
|
145
145
|
function U({
|
|
146
146
|
onUpload: r,
|
|
147
|
-
...
|
|
147
|
+
...t
|
|
148
148
|
}) {
|
|
149
149
|
return /* @__PURE__ */ l(
|
|
150
150
|
"button",
|
|
@@ -152,8 +152,8 @@ function U({
|
|
|
152
152
|
type: "button",
|
|
153
153
|
onClick: r,
|
|
154
154
|
"aria-label": "画像をアップロード",
|
|
155
|
-
className: `flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] ${C} focus-visible:outline-none`,
|
|
156
|
-
...
|
|
155
|
+
className: `flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] ${C} focus-visible:outline-none`,
|
|
156
|
+
...t,
|
|
157
157
|
children: [
|
|
158
158
|
/* @__PURE__ */ e(E, { size: 24 }),
|
|
159
159
|
/* @__PURE__ */ e("span", { className: "typo-body-sm", children: "画像を選択" })
|
|
@@ -163,8 +163,8 @@ function U({
|
|
|
163
163
|
}
|
|
164
164
|
export {
|
|
165
165
|
U as OptionImageUpload,
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
$ as OptionQuantity,
|
|
167
|
+
j as OptionSelect,
|
|
168
168
|
P as OptionText,
|
|
169
|
-
|
|
169
|
+
R as ProductOption
|
|
170
170
|
};
|
|
@@ -29,7 +29,7 @@ function g({
|
|
|
29
29
|
] }),
|
|
30
30
|
t && t.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-1", children: t.map((s) => /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
31
31
|
/* @__PURE__ */ e("span", { className: "w-3 shrink-0 text-right typo-label-sm tabular-nums text-[var(--Text-Medium-Emphasis)]", children: s.stars }),
|
|
32
|
-
/* @__PURE__ */ e("div", { className: "h-2.5 flex-1 overflow-hidden rounded-full bg-[var(--Surface-Secondary)]", children: /* @__PURE__ */ e(
|
|
32
|
+
/* @__PURE__ */ e("div", { className: "h-2.5 flex-1 overflow-hidden rounded-full bg-[var(--Surface-Neutral-Secondary)]", children: /* @__PURE__ */ e(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: "h-full rounded-full bg-[var(--Brand-Cake-Orange)] transition-all duration-[var(--Motion-Duration-Base)]",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import y from "iconsax-reactjs/dist/esm/Location.js";
|
|
4
|
-
import
|
|
4
|
+
import u from "iconsax-reactjs/dist/esm/Star1.js";
|
|
5
5
|
import { StarHalf as w } from "lucide-react";
|
|
6
6
|
import { cn as m } from "../../lib/utils.js";
|
|
7
7
|
import { Button as E } from "../foundations/button.js";
|
|
@@ -11,7 +11,7 @@ function z({ rating: r }) {
|
|
|
11
11
|
for (let s = 1; s <= 5; s++)
|
|
12
12
|
s <= t ? i.push(
|
|
13
13
|
/* @__PURE__ */ a(
|
|
14
|
-
|
|
14
|
+
u,
|
|
15
15
|
{
|
|
16
16
|
size: 12,
|
|
17
17
|
className: "fill-[var(--Brand-Cake-Orange)] text-[var(--Brand-Cake-Orange)]",
|
|
@@ -29,7 +29,7 @@ function z({ rating: r }) {
|
|
|
29
29
|
)
|
|
30
30
|
) : i.push(
|
|
31
31
|
/* @__PURE__ */ a(
|
|
32
|
-
|
|
32
|
+
u,
|
|
33
33
|
{
|
|
34
34
|
size: 12,
|
|
35
35
|
className: "text-[var(--Border-Medium-Emphasis)]"
|
|
@@ -51,19 +51,19 @@ function M({
|
|
|
51
51
|
isBookmarked: d = !1,
|
|
52
52
|
onBookmarkToggle: v,
|
|
53
53
|
href: c,
|
|
54
|
-
variant:
|
|
54
|
+
variant: b = "default",
|
|
55
55
|
linkComponent: g,
|
|
56
56
|
className: x,
|
|
57
57
|
...f
|
|
58
58
|
}) {
|
|
59
59
|
const N = g ?? "a";
|
|
60
|
-
return
|
|
60
|
+
return b === "compact" ? /* @__PURE__ */ e(
|
|
61
61
|
c ? N : "div",
|
|
62
62
|
{
|
|
63
63
|
...c ? { href: c } : {},
|
|
64
64
|
"data-slot": "shop-card",
|
|
65
65
|
className: m(
|
|
66
|
-
"flex items-center gap-3 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Secondary)] max-w-[400px]",
|
|
66
|
+
"flex items-center gap-3 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)] max-w-[400px]",
|
|
67
67
|
x
|
|
68
68
|
),
|
|
69
69
|
...f,
|
|
@@ -90,7 +90,7 @@ function M({
|
|
|
90
90
|
{
|
|
91
91
|
"data-slot": "shop-card",
|
|
92
92
|
className: m(
|
|
93
|
-
"relative min-w-[200px] grid grid-rows-[auto_1fr] gap-2 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Secondary)]",
|
|
93
|
+
"relative min-w-[200px] grid grid-rows-[auto_1fr] gap-2 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
94
94
|
x
|
|
95
95
|
),
|
|
96
96
|
...f,
|
|
@@ -35,7 +35,7 @@ function x({
|
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "accordion-trigger",
|
|
37
37
|
className: i(
|
|
38
|
-
"flex w-full flex-1 cursor-pointer items-center justify-between gap-4 py-4 text-left typo-label-md text-[var(--Text-High-Emphasis)] transition-all outline-none hover:bg-[var(--Surface-Tertiary)]/60 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
38
|
+
"flex w-full flex-1 cursor-pointer items-center justify-between gap-4 py-4 text-left typo-label-md text-[var(--Text-High-Emphasis)] transition-all outline-none hover:bg-[var(--Surface-Neutral-Tertiary)]/60 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
39
39
|
l,
|
|
40
40
|
o
|
|
41
41
|
),
|
|
@@ -1,24 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
4
|
import { AlertDialog as o } from "radix-ui";
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { cn as r } from "../../lib/utils.js";
|
|
6
|
+
import { useOverlayFocusRoot as c, OverlayFocusRootContext as m, useRestoreFocusToOpener as f } from "../../lib/focus-restore.js";
|
|
7
|
+
import { composeEscapeKeyDownWithImeGuard as p } from "../../lib/ime.js";
|
|
8
|
+
import { Button as n } from "./button.js";
|
|
9
|
+
function N({
|
|
10
|
+
open: a,
|
|
11
|
+
defaultOpen: t,
|
|
12
|
+
onOpenChange: l,
|
|
13
|
+
...i
|
|
8
14
|
}) {
|
|
9
|
-
|
|
15
|
+
const { root: d, handleOpenChange: s } = c(a, t, l);
|
|
16
|
+
return /* @__PURE__ */ e(m.Provider, { value: d, children: /* @__PURE__ */ e(
|
|
17
|
+
o.Root,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "alert-dialog",
|
|
20
|
+
open: a,
|
|
21
|
+
defaultOpen: t,
|
|
22
|
+
onOpenChange: s,
|
|
23
|
+
...i
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
10
26
|
}
|
|
11
|
-
function
|
|
27
|
+
function O({
|
|
12
28
|
...a
|
|
13
29
|
}) {
|
|
14
30
|
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "alert-dialog-trigger", ...a });
|
|
15
31
|
}
|
|
16
|
-
function
|
|
32
|
+
function x({
|
|
17
33
|
...a
|
|
18
34
|
}) {
|
|
19
35
|
return /* @__PURE__ */ e(o.Portal, { "data-slot": "alert-dialog-portal", ...a });
|
|
20
36
|
}
|
|
21
|
-
function
|
|
37
|
+
function h({
|
|
22
38
|
className: a,
|
|
23
39
|
...t
|
|
24
40
|
}) {
|
|
@@ -26,7 +42,7 @@ function g({
|
|
|
26
42
|
o.Overlay,
|
|
27
43
|
{
|
|
28
44
|
"data-slot": "alert-dialog-overlay",
|
|
29
|
-
className:
|
|
45
|
+
className: r(
|
|
30
46
|
"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",
|
|
31
47
|
a
|
|
32
48
|
),
|
|
@@ -34,31 +50,37 @@ function g({
|
|
|
34
50
|
}
|
|
35
51
|
);
|
|
36
52
|
}
|
|
37
|
-
function
|
|
53
|
+
function T({
|
|
38
54
|
className: a,
|
|
39
55
|
size: t = "default",
|
|
40
|
-
|
|
56
|
+
onOpenAutoFocus: l,
|
|
57
|
+
onCloseAutoFocus: i,
|
|
58
|
+
onEscapeKeyDown: d,
|
|
59
|
+
...s
|
|
41
60
|
}) {
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
const g = f({ onOpenAutoFocus: l, onCloseAutoFocus: i });
|
|
62
|
+
return /* @__PURE__ */ u(x, { children: [
|
|
63
|
+
/* @__PURE__ */ e(h, {}),
|
|
44
64
|
/* @__PURE__ */ e(
|
|
45
65
|
o.Content,
|
|
46
66
|
{
|
|
47
67
|
"data-slot": "alert-dialog-content",
|
|
48
68
|
"data-size": t,
|
|
49
|
-
|
|
69
|
+
...g,
|
|
70
|
+
onEscapeKeyDown: p(d),
|
|
71
|
+
className: r(
|
|
50
72
|
// 画面端との余白は上下左右 40px(calc(100%-5rem))。
|
|
51
73
|
// 幅上限は端末幅に応じて: SP は端末幅-80px に追従 / sm 以上は
|
|
52
74
|
// default=480px(テキスト確認が間延びしない幅)・sm=320px
|
|
53
75
|
"group/alert-dialog-content fixed top-[50%] left-[50%] z-[var(--Z-Modal)] grid w-full max-w-[calc(100%-5rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Elevated)] p-6 shadow-lg duration-[var(--Motion-Duration-Base)] data-[size=sm]:max-w-xs 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 data-[size=default]:sm:max-w-[480px]",
|
|
54
76
|
a
|
|
55
77
|
),
|
|
56
|
-
...
|
|
78
|
+
...s
|
|
57
79
|
}
|
|
58
80
|
)
|
|
59
81
|
] });
|
|
60
82
|
}
|
|
61
|
-
function
|
|
83
|
+
function E({
|
|
62
84
|
className: a,
|
|
63
85
|
...t
|
|
64
86
|
}) {
|
|
@@ -66,7 +88,7 @@ function D({
|
|
|
66
88
|
"div",
|
|
67
89
|
{
|
|
68
90
|
"data-slot": "alert-dialog-header",
|
|
69
|
-
className:
|
|
91
|
+
className: r(
|
|
70
92
|
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
71
93
|
a
|
|
72
94
|
),
|
|
@@ -74,7 +96,7 @@ function D({
|
|
|
74
96
|
}
|
|
75
97
|
);
|
|
76
98
|
}
|
|
77
|
-
function
|
|
99
|
+
function b({
|
|
78
100
|
className: a,
|
|
79
101
|
...t
|
|
80
102
|
}) {
|
|
@@ -82,7 +104,7 @@ function A({
|
|
|
82
104
|
"div",
|
|
83
105
|
{
|
|
84
106
|
"data-slot": "alert-dialog-footer",
|
|
85
|
-
className:
|
|
107
|
+
className: r(
|
|
86
108
|
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
87
109
|
a
|
|
88
110
|
),
|
|
@@ -90,7 +112,7 @@ function A({
|
|
|
90
112
|
}
|
|
91
113
|
);
|
|
92
114
|
}
|
|
93
|
-
function
|
|
115
|
+
function F({
|
|
94
116
|
className: a,
|
|
95
117
|
...t
|
|
96
118
|
}) {
|
|
@@ -98,7 +120,7 @@ function z({
|
|
|
98
120
|
o.Title,
|
|
99
121
|
{
|
|
100
122
|
"data-slot": "alert-dialog-title",
|
|
101
|
-
className:
|
|
123
|
+
className: r(
|
|
102
124
|
"typo-heading-lg text-[var(--Text-High-Emphasis)] sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
103
125
|
a
|
|
104
126
|
),
|
|
@@ -106,7 +128,7 @@ function z({
|
|
|
106
128
|
}
|
|
107
129
|
);
|
|
108
130
|
}
|
|
109
|
-
function
|
|
131
|
+
function M({
|
|
110
132
|
className: a,
|
|
111
133
|
...t
|
|
112
134
|
}) {
|
|
@@ -114,51 +136,51 @@ function y({
|
|
|
114
136
|
o.Description,
|
|
115
137
|
{
|
|
116
138
|
"data-slot": "alert-dialog-description",
|
|
117
|
-
className:
|
|
139
|
+
className: r("typo-body-md text-[var(--Text-Medium-Emphasis)]", a),
|
|
118
140
|
...t
|
|
119
141
|
}
|
|
120
142
|
);
|
|
121
143
|
}
|
|
122
|
-
function
|
|
144
|
+
function R({
|
|
123
145
|
className: a,
|
|
124
146
|
variant: t = "default",
|
|
125
|
-
size:
|
|
147
|
+
size: l = "default",
|
|
126
148
|
...i
|
|
127
149
|
}) {
|
|
128
|
-
return /* @__PURE__ */ e(
|
|
150
|
+
return /* @__PURE__ */ e(n, { variant: t, size: l, asChild: !0, children: /* @__PURE__ */ e(
|
|
129
151
|
o.Action,
|
|
130
152
|
{
|
|
131
153
|
"data-slot": "alert-dialog-action",
|
|
132
|
-
className:
|
|
154
|
+
className: r(a),
|
|
133
155
|
...i
|
|
134
156
|
}
|
|
135
157
|
) });
|
|
136
158
|
}
|
|
137
|
-
function
|
|
159
|
+
function _({
|
|
138
160
|
className: a,
|
|
139
161
|
variant: t = "tertiary",
|
|
140
|
-
size:
|
|
162
|
+
size: l = "default",
|
|
141
163
|
...i
|
|
142
164
|
}) {
|
|
143
|
-
return /* @__PURE__ */ e(
|
|
165
|
+
return /* @__PURE__ */ e(n, { variant: t, size: l, asChild: !0, children: /* @__PURE__ */ e(
|
|
144
166
|
o.Cancel,
|
|
145
167
|
{
|
|
146
168
|
"data-slot": "alert-dialog-cancel",
|
|
147
|
-
className:
|
|
169
|
+
className: r(a),
|
|
148
170
|
...i
|
|
149
171
|
}
|
|
150
172
|
) });
|
|
151
173
|
}
|
|
152
174
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
175
|
+
N as AlertDialog,
|
|
176
|
+
R as AlertDialogAction,
|
|
177
|
+
_ as AlertDialogCancel,
|
|
178
|
+
T as AlertDialogContent,
|
|
179
|
+
M as AlertDialogDescription,
|
|
180
|
+
b as AlertDialogFooter,
|
|
181
|
+
E as AlertDialogHeader,
|
|
182
|
+
h as AlertDialogOverlay,
|
|
183
|
+
x as AlertDialogPortal,
|
|
184
|
+
F as AlertDialogTitle,
|
|
185
|
+
O as AlertDialogTrigger
|
|
164
186
|
};
|