@cakejp/design-system 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/CLAUDE.md +1 -0
- package/bin/init.js +29 -6
- package/contracts/components.json +45 -8
- package/contracts/composition.json +8 -2
- package/contracts/rules.json +14 -2
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/_mypage-menu-data.js +166 -0
- package/dist/components/ec/admin-shell.js +202 -0
- package/dist/components/ec/anniversary-card.js +63 -0
- package/dist/components/ec/cake-logo.js +38 -0
- package/dist/components/ec/chart-controls.js +91 -0
- package/dist/components/ec/countdown-timer.js +50 -0
- package/dist/components/ec/coupon-card.js +136 -0
- package/dist/components/ec/delivery-calendar.js +105 -0
- package/dist/components/ec/mypage-shell.js +98 -0
- package/dist/components/ec/order-section.js +53 -0
- package/dist/components/ec/order-summary.js +78 -0
- package/dist/components/ec/payment-method.js +81 -0
- package/dist/components/ec/product-card.js +235 -0
- package/dist/components/ec/product-carousel.js +106 -0
- package/dist/components/ec/product-cta.js +80 -0
- package/dist/components/ec/product-detail-bar.js +86 -0
- package/dist/components/ec/product-detail-sidebar.js +296 -0
- package/dist/components/ec/product-list-item.js +266 -0
- package/dist/components/ec/product-option.js +165 -0
- package/dist/components/ec/rating-stars.js +74 -0
- package/dist/components/ec/review-card.js +126 -0
- package/dist/components/ec/review-form.js +181 -0
- package/dist/components/ec/review-summary.js +95 -0
- package/dist/components/ec/shop-card.js +179 -0
- package/dist/components/ec/stat-card.js +50 -0
- package/dist/components/foundations/accordion.js +67 -0
- package/dist/components/foundations/alert-dialog.js +165 -0
- package/dist/components/foundations/alert.js +218 -0
- package/dist/components/foundations/aspect-ratio.js +10 -0
- package/dist/components/foundations/avatar.js +58 -0
- package/dist/components/foundations/badge.js +54 -0
- package/dist/components/foundations/breadcrumb.js +104 -0
- package/dist/components/foundations/button.js +99 -0
- package/dist/components/foundations/calendar.js +173 -0
- package/dist/components/foundations/card.js +109 -0
- package/dist/components/foundations/checkbox-card.js +111 -0
- package/dist/components/foundations/checkbox-group.js +92 -0
- package/dist/components/foundations/checkbox.js +90 -0
- package/dist/components/foundations/chip-variants.js +41 -0
- package/dist/components/foundations/collapsible.js +34 -0
- package/dist/components/foundations/command.js +171 -0
- package/dist/components/foundations/context-menu.js +225 -0
- package/dist/components/foundations/data-table.js +59 -0
- package/dist/components/foundations/dialog.js +148 -0
- package/dist/components/foundations/drawer.js +129 -0
- package/dist/components/foundations/dropdown-menu.js +232 -0
- package/dist/components/foundations/field.js +150 -0
- package/dist/components/foundations/file-input.js +116 -0
- package/dist/components/foundations/form.js +101 -0
- package/dist/components/foundations/hover-card.js +41 -0
- package/dist/components/foundations/icon-badge.js +41 -0
- package/dist/components/foundations/input.js +74 -0
- package/dist/components/foundations/label.js +29 -0
- package/dist/components/foundations/menubar.js +252 -0
- package/dist/components/foundations/navigation-menu.js +171 -0
- package/dist/components/foundations/pagination.js +120 -0
- package/dist/components/foundations/popover.js +45 -0
- package/dist/components/foundations/progress.js +34 -0
- package/dist/components/foundations/radio-group.js +134 -0
- package/dist/components/foundations/responsive-dialog.js +76 -0
- package/dist/components/foundations/scroll-area.js +62 -0
- package/dist/components/foundations/select.js +190 -0
- package/dist/components/foundations/separator.js +27 -0
- package/dist/components/foundations/sheet.js +130 -0
- package/dist/components/foundations/skeleton.js +15 -0
- package/dist/components/foundations/skip-link.js +27 -0
- package/dist/components/foundations/slider.js +81 -0
- package/dist/components/foundations/social-icon.js +36 -0
- package/dist/components/foundations/sonner.js +49 -0
- package/dist/components/foundations/spinner.js +28 -0
- package/dist/components/foundations/switch.js +54 -0
- package/dist/components/foundations/table.js +115 -0
- package/dist/components/foundations/tabs.js +102 -0
- package/dist/components/foundations/textarea.js +65 -0
- package/dist/components/foundations/toggle-group.js +107 -0
- package/dist/components/foundations/toggle.js +44 -0
- package/dist/components/foundations/tooltip.js +56 -0
- package/dist/components/primitives/admin-header.js +31 -0
- package/dist/components/primitives/admin-side-nav.js +135 -0
- package/dist/components/primitives/banner-carousel.js +97 -0
- package/dist/components/primitives/bottom-tab-bar.js +81 -0
- package/dist/components/primitives/bulk-action-bar.js +27 -0
- package/dist/components/primitives/category-scroll.js +110 -0
- package/dist/components/primitives/category-shortcuts.js +66 -0
- package/dist/components/primitives/chat-composer.js +141 -0
- package/dist/components/primitives/chip.js +123 -0
- package/dist/components/primitives/coach-mark.js +102 -0
- package/dist/components/primitives/combobox.js +88 -0
- package/dist/components/primitives/container.js +50 -0
- package/dist/components/primitives/content-carousel.js +144 -0
- package/dist/components/primitives/date-picker.js +175 -0
- package/dist/components/primitives/empty-state.js +32 -0
- package/dist/components/primitives/error-state.js +115 -0
- package/dist/components/primitives/filter-bar.js +144 -0
- package/dist/components/primitives/footer.js +247 -0
- package/dist/components/primitives/form-field.js +38 -0
- package/dist/components/primitives/funnel-shell.js +99 -0
- package/dist/components/primitives/header.js +257 -0
- package/dist/components/primitives/image-carousel.js +156 -0
- package/dist/components/primitives/image-gallery.js +177 -0
- package/dist/components/primitives/image-input.js +207 -0
- package/dist/components/primitives/image-uploader.js +69 -0
- package/dist/components/primitives/kebab-menu.js +40 -0
- package/dist/components/primitives/list-item.js +80 -0
- package/dist/components/primitives/menu-drawer.js +154 -0
- package/dist/components/primitives/multi-select.js +93 -0
- package/dist/components/primitives/notification-badge.js +61 -0
- package/dist/components/primitives/notification-list.js +72 -0
- package/dist/components/primitives/number-input.js +235 -0
- package/dist/components/primitives/price-display.js +101 -0
- package/dist/components/primitives/progress-steps.js +62 -0
- package/dist/components/primitives/search-bar.js +81 -0
- package/dist/components/primitives/search-panel.js +43 -0
- package/dist/components/primitives/section-header.js +148 -0
- package/dist/components/primitives/section-nav.js +85 -0
- package/dist/components/primitives/section.js +78 -0
- package/dist/components/primitives/share-buttons.js +102 -0
- package/dist/components/primitives/side-nav.js +98 -0
- package/dist/components/primitives/social-login-button.js +53 -0
- package/dist/components/primitives/standard-page-shell.js +34 -0
- package/dist/components/primitives/status-count-tabs.js +42 -0
- package/dist/components/primitives/sticky-action-bar.js +26 -0
- package/dist/components/primitives/sub-nav.js +67 -0
- package/dist/components/primitives/tag.js +57 -0
- package/dist/components/primitives/timeline.js +55 -0
- package/dist/components/primitives/workspace-shell.js +57 -0
- package/dist/index.css +1 -1
- package/dist/index.js +22961 -13082
- package/dist/lib/field-labelling.js +29 -0
- package/dist/lib/focus-ring.js +6 -0
- package/dist/lib/pagination-range.js +42 -0
- package/dist/lib/use-value-length.js +63 -0
- package/dist/lib/utils.js +33 -0
- package/dist/types/components/ec/_mypage-menu-data.d.ts +3 -3
- package/dist/types/components/ec/admin-shell.d.ts +1 -1
- package/dist/types/components/ec/anniversary-card.d.ts +1 -1
- package/dist/types/components/ec/mypage-shell.d.ts +3 -3
- package/dist/types/components/ec/product-card.d.ts +1 -1
- package/dist/types/components/ec/product-carousel.d.ts +3 -3
- package/dist/types/components/ec/stat-card.d.ts +1 -1
- package/dist/types/components/foundations/accordion.d.ts +8 -1
- package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
- package/dist/types/components/foundations/calendar.d.ts +1 -1
- package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
- package/dist/types/components/foundations/command.d.ts +1 -1
- package/dist/types/components/foundations/data-table.d.ts +6 -1
- package/dist/types/components/foundations/field.d.ts +2 -2
- package/dist/types/components/foundations/file-input.d.ts +1 -1
- package/dist/types/components/foundations/pagination.d.ts +1 -1
- package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
- package/dist/types/components/foundations/skip-link.d.ts +1 -1
- package/dist/types/components/foundations/slider.d.ts +13 -1
- package/dist/types/components/primitives/admin-header.d.ts +11 -1
- package/dist/types/components/primitives/admin-side-nav.d.ts +19 -1
- package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
- package/dist/types/components/primitives/category-scroll.d.ts +2 -2
- package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
- package/dist/types/components/primitives/chat-composer.d.ts +1 -1
- package/dist/types/components/primitives/chip.d.ts +1 -1
- package/dist/types/components/primitives/combobox.d.ts +9 -1
- package/dist/types/components/primitives/content-carousel.d.ts +1 -1
- package/dist/types/components/primitives/form-field.d.ts +1 -1
- package/dist/types/components/primitives/image-input.d.ts +1 -1
- package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
- package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
- package/dist/types/components/primitives/multi-select.d.ts +9 -1
- package/dist/types/components/primitives/notification-list.d.ts +1 -1
- package/dist/types/components/primitives/search-panel.d.ts +1 -1
- package/dist/types/components/primitives/section-nav.d.ts +1 -1
- package/dist/types/components/primitives/side-nav.d.ts +1 -1
- package/dist/types/components/primitives/social-login-button.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/field-labelling.d.ts +66 -0
- package/dist/types/lib/focus-ring.d.ts +42 -0
- package/package.json +2 -2
- package/scripts/codemod/README.md +9 -0
- package/src/components/COMPONENT_LOOKUP.md +1 -1
- package/src/preset-standalone.css +15 -0
- package/src/preset.css +15 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
import { FOCUS_RING as a } from "../../lib/focus-ring.js";
|
|
3
|
+
const t = e(
|
|
4
|
+
`inline-flex items-center justify-center whitespace-nowrap transition-colors focus-visible:outline-none ${a}`,
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
filled: [
|
|
9
|
+
"bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]",
|
|
10
|
+
"hover:bg-[var(--Surface-Tertiary)]",
|
|
11
|
+
"disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)]"
|
|
12
|
+
].join(" "),
|
|
13
|
+
accent: [
|
|
14
|
+
"bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Brand-Cake-Orange)]",
|
|
15
|
+
"hover:bg-[var(--Surface-Accent-Primary)] hover:text-[var(--Text-on-Inverse)]",
|
|
16
|
+
"disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)] disabled:hover:text-[var(--Text-Disable)]"
|
|
17
|
+
].join(" ")
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
sm: "min-h-8 px-3 py-1 typo-body-sm gap-1.5",
|
|
21
|
+
md: "min-h-9 px-3.5 py-1.5 typo-body-md gap-1.5",
|
|
22
|
+
lg: "min-h-11 px-5 py-2.5 typo-label-md gap-1.5",
|
|
23
|
+
// shrink-0 必須: flex row(サイズ選択の並び等)の直接の子になるため、
|
|
24
|
+
// 既定の flex-shrink:1 だと 48px タッチターゲットが min-content 幅まで潰れる
|
|
25
|
+
tile: "size-12 shrink-0 typo-body-md"
|
|
26
|
+
},
|
|
27
|
+
shape: {
|
|
28
|
+
pill: "rounded-full",
|
|
29
|
+
square: "rounded"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "filled",
|
|
34
|
+
size: "md",
|
|
35
|
+
shape: "pill"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
export {
|
|
40
|
+
t as chipVariants
|
|
41
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Collapsible as t } from "radix-ui";
|
|
3
|
+
function a({
|
|
4
|
+
...l
|
|
5
|
+
}) {
|
|
6
|
+
return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
|
|
7
|
+
}
|
|
8
|
+
function r({
|
|
9
|
+
...l
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
12
|
+
t.CollapsibleTrigger,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "collapsible-trigger",
|
|
15
|
+
...l
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function n({
|
|
20
|
+
...l
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ o(
|
|
23
|
+
t.CollapsibleContent,
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "collapsible-content",
|
|
26
|
+
...l
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
a as Collapsible,
|
|
32
|
+
n as CollapsibleContent,
|
|
33
|
+
r as CollapsibleTrigger
|
|
34
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Command as r } from "cmdk";
|
|
4
|
+
import { SearchIcon as i } from "lucide-react";
|
|
5
|
+
import { cn as a } from "../../lib/utils.js";
|
|
6
|
+
import { Dialog as p, DialogHeader as l, DialogTitle as u, DialogDescription as g, DialogContent as h } from "./dialog.js";
|
|
7
|
+
function f({
|
|
8
|
+
className: e,
|
|
9
|
+
...o
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ t(
|
|
12
|
+
r,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "command",
|
|
15
|
+
className: a(
|
|
16
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
17
|
+
e
|
|
18
|
+
),
|
|
19
|
+
...o
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function w({
|
|
24
|
+
title: e = "Command Palette",
|
|
25
|
+
description: o = "Search for a command to run...",
|
|
26
|
+
children: n,
|
|
27
|
+
className: m,
|
|
28
|
+
showCloseButton: s = !0,
|
|
29
|
+
...c
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ d(p, { ...c, children: [
|
|
32
|
+
/* @__PURE__ */ d(l, { className: "sr-only", children: [
|
|
33
|
+
/* @__PURE__ */ t(u, { children: e }),
|
|
34
|
+
/* @__PURE__ */ t(g, { children: o })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ t(
|
|
37
|
+
h,
|
|
38
|
+
{
|
|
39
|
+
className: a("overflow-hidden p-0", m),
|
|
40
|
+
showCloseButton: s,
|
|
41
|
+
children: /* @__PURE__ */ t(f, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:typo-label-sm [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: n })
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
function C({
|
|
47
|
+
className: e,
|
|
48
|
+
...o
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ d(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "command-input-wrapper",
|
|
54
|
+
className: "flex h-9 items-center gap-2 border-b border-[var(--Border-Medium-Emphasis)] px-3 focus-within:border-[var(--Focus-High-Emphasis)]",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ t(i, { className: "size-4 shrink-0 opacity-50" }),
|
|
57
|
+
/* @__PURE__ */ t(
|
|
58
|
+
r.Input,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "command-input",
|
|
61
|
+
className: a(
|
|
62
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 typo-body-md outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
63
|
+
e
|
|
64
|
+
),
|
|
65
|
+
...o
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function N({
|
|
73
|
+
className: e,
|
|
74
|
+
...o
|
|
75
|
+
}) {
|
|
76
|
+
return /* @__PURE__ */ t(
|
|
77
|
+
r.List,
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "command-list",
|
|
80
|
+
className: a(
|
|
81
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
82
|
+
e
|
|
83
|
+
),
|
|
84
|
+
...o
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function D({
|
|
89
|
+
...e
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ t(
|
|
92
|
+
r.Empty,
|
|
93
|
+
{
|
|
94
|
+
"data-slot": "command-empty",
|
|
95
|
+
className: "py-6 text-center typo-body-md",
|
|
96
|
+
...e
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function I({
|
|
101
|
+
className: e,
|
|
102
|
+
...o
|
|
103
|
+
}) {
|
|
104
|
+
return /* @__PURE__ */ t(
|
|
105
|
+
r.Group,
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "command-group",
|
|
108
|
+
className: a(
|
|
109
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:typo-label-sm [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
110
|
+
e
|
|
111
|
+
),
|
|
112
|
+
...o
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function S({
|
|
117
|
+
className: e,
|
|
118
|
+
...o
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ t(
|
|
121
|
+
r.Separator,
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "command-separator",
|
|
124
|
+
className: a("-mx-1 h-px bg-border", e),
|
|
125
|
+
...o
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
function E({
|
|
130
|
+
className: e,
|
|
131
|
+
...o
|
|
132
|
+
}) {
|
|
133
|
+
return /* @__PURE__ */ t(
|
|
134
|
+
r.Item,
|
|
135
|
+
{
|
|
136
|
+
"data-slot": "command-item",
|
|
137
|
+
className: a(
|
|
138
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
139
|
+
e
|
|
140
|
+
),
|
|
141
|
+
...o
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function z({
|
|
146
|
+
className: e,
|
|
147
|
+
...o
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ t(
|
|
150
|
+
"span",
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "command-shortcut",
|
|
153
|
+
className: a(
|
|
154
|
+
"ml-auto typo-body-xs text-muted-foreground",
|
|
155
|
+
e
|
|
156
|
+
),
|
|
157
|
+
...o
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
f as Command,
|
|
163
|
+
w as CommandDialog,
|
|
164
|
+
D as CommandEmpty,
|
|
165
|
+
I as CommandGroup,
|
|
166
|
+
C as CommandInput,
|
|
167
|
+
E as CommandItem,
|
|
168
|
+
N as CommandList,
|
|
169
|
+
S as CommandSeparator,
|
|
170
|
+
z as CommandShortcut
|
|
171
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CheckIcon as i, CircleIcon as u, ChevronRightIcon as c } from "lucide-react";
|
|
4
|
+
import { ContextMenu as o } from "radix-ui";
|
|
5
|
+
import { cn as r } from "../../lib/utils.js";
|
|
6
|
+
function g({
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ e(o.Root, { "data-slot": "context-menu", ...t });
|
|
10
|
+
}
|
|
11
|
+
function v({
|
|
12
|
+
...t
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "context-menu-trigger", ...t });
|
|
15
|
+
}
|
|
16
|
+
function b({
|
|
17
|
+
...t
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ e(o.Group, { "data-slot": "context-menu-group", ...t });
|
|
20
|
+
}
|
|
21
|
+
function h({
|
|
22
|
+
...t
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ e(o.Portal, { "data-slot": "context-menu-portal", ...t });
|
|
25
|
+
}
|
|
26
|
+
function C({
|
|
27
|
+
...t
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ e(o.Sub, { "data-slot": "context-menu-sub", ...t });
|
|
30
|
+
}
|
|
31
|
+
function y({
|
|
32
|
+
...t
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ e(
|
|
35
|
+
o.RadioGroup,
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "context-menu-radio-group",
|
|
38
|
+
...t
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function M({
|
|
43
|
+
className: t,
|
|
44
|
+
inset: n,
|
|
45
|
+
children: a,
|
|
46
|
+
...s
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ d(
|
|
49
|
+
o.SubTrigger,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "context-menu-sub-trigger",
|
|
52
|
+
"data-inset": n,
|
|
53
|
+
className: r(
|
|
54
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
55
|
+
t
|
|
56
|
+
),
|
|
57
|
+
...s,
|
|
58
|
+
children: [
|
|
59
|
+
a,
|
|
60
|
+
/* @__PURE__ */ e(c, { className: "ml-auto" })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function z({
|
|
66
|
+
className: t,
|
|
67
|
+
...n
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */ e(
|
|
70
|
+
o.SubContent,
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "context-menu-sub-content",
|
|
73
|
+
className: r(
|
|
74
|
+
"z-[var(--Z-Popover)] min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
|
|
75
|
+
t
|
|
76
|
+
),
|
|
77
|
+
...n
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function N({
|
|
82
|
+
className: t,
|
|
83
|
+
...n
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ e(
|
|
86
|
+
o.Content,
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "context-menu-content",
|
|
89
|
+
collisionPadding: 8,
|
|
90
|
+
className: r(
|
|
91
|
+
"fixed z-[var(--Z-Popover)] max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
|
|
92
|
+
t
|
|
93
|
+
),
|
|
94
|
+
...n
|
|
95
|
+
}
|
|
96
|
+
) });
|
|
97
|
+
}
|
|
98
|
+
function _({
|
|
99
|
+
className: t,
|
|
100
|
+
inset: n,
|
|
101
|
+
variant: a = "default",
|
|
102
|
+
...s
|
|
103
|
+
}) {
|
|
104
|
+
return /* @__PURE__ */ e(
|
|
105
|
+
o.Item,
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "context-menu-item",
|
|
108
|
+
"data-inset": n,
|
|
109
|
+
"data-variant": a,
|
|
110
|
+
className: r(
|
|
111
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
112
|
+
t
|
|
113
|
+
),
|
|
114
|
+
...s
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
function I({
|
|
119
|
+
className: t,
|
|
120
|
+
children: n,
|
|
121
|
+
checked: a,
|
|
122
|
+
...s
|
|
123
|
+
}) {
|
|
124
|
+
return /* @__PURE__ */ d(
|
|
125
|
+
o.CheckboxItem,
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "context-menu-checkbox-item",
|
|
128
|
+
className: r(
|
|
129
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
130
|
+
t
|
|
131
|
+
),
|
|
132
|
+
checked: a,
|
|
133
|
+
...s,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(i, { className: "size-4" }) }) }),
|
|
136
|
+
n
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function k({
|
|
142
|
+
className: t,
|
|
143
|
+
children: n,
|
|
144
|
+
...a
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ d(
|
|
147
|
+
o.RadioItem,
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "context-menu-radio-item",
|
|
150
|
+
className: r(
|
|
151
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 typo-body-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
152
|
+
t
|
|
153
|
+
),
|
|
154
|
+
...a,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(o.ItemIndicator, { children: /* @__PURE__ */ e(u, { className: "size-2 fill-current" }) }) }),
|
|
157
|
+
n
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function S({
|
|
163
|
+
className: t,
|
|
164
|
+
inset: n,
|
|
165
|
+
...a
|
|
166
|
+
}) {
|
|
167
|
+
return /* @__PURE__ */ e(
|
|
168
|
+
o.Label,
|
|
169
|
+
{
|
|
170
|
+
"data-slot": "context-menu-label",
|
|
171
|
+
"data-inset": n,
|
|
172
|
+
className: r(
|
|
173
|
+
"px-2 py-1.5 typo-label-md text-foreground data-[inset]:pl-8",
|
|
174
|
+
t
|
|
175
|
+
),
|
|
176
|
+
...a
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
function w({
|
|
181
|
+
className: t,
|
|
182
|
+
...n
|
|
183
|
+
}) {
|
|
184
|
+
return /* @__PURE__ */ e(
|
|
185
|
+
o.Separator,
|
|
186
|
+
{
|
|
187
|
+
"data-slot": "context-menu-separator",
|
|
188
|
+
className: r("-mx-1 my-1 h-px bg-border", t),
|
|
189
|
+
...n
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function P({
|
|
194
|
+
className: t,
|
|
195
|
+
...n
|
|
196
|
+
}) {
|
|
197
|
+
return /* @__PURE__ */ e(
|
|
198
|
+
"span",
|
|
199
|
+
{
|
|
200
|
+
"data-slot": "context-menu-shortcut",
|
|
201
|
+
className: r(
|
|
202
|
+
"ml-auto typo-body-xs text-muted-foreground",
|
|
203
|
+
t
|
|
204
|
+
),
|
|
205
|
+
...n
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
export {
|
|
210
|
+
g as ContextMenu,
|
|
211
|
+
I as ContextMenuCheckboxItem,
|
|
212
|
+
N as ContextMenuContent,
|
|
213
|
+
b as ContextMenuGroup,
|
|
214
|
+
_ as ContextMenuItem,
|
|
215
|
+
S as ContextMenuLabel,
|
|
216
|
+
h as ContextMenuPortal,
|
|
217
|
+
y as ContextMenuRadioGroup,
|
|
218
|
+
k as ContextMenuRadioItem,
|
|
219
|
+
w as ContextMenuSeparator,
|
|
220
|
+
P as ContextMenuShortcut,
|
|
221
|
+
C as ContextMenuSub,
|
|
222
|
+
z as ContextMenuSubContent,
|
|
223
|
+
M as ContextMenuSubTrigger,
|
|
224
|
+
v as ContextMenuTrigger
|
|
225
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva as r } from "class-variance-authority";
|
|
4
|
+
import "iconsax-reactjs/dist/esm/ArrowSwapVertical.js";
|
|
5
|
+
import "iconsax-reactjs/dist/esm/ArrowUp.js";
|
|
6
|
+
import "iconsax-reactjs/dist/esm/ArrowDown.js";
|
|
7
|
+
import "iconsax-reactjs/dist/esm/ArrowDown2.js";
|
|
8
|
+
import "iconsax-reactjs/dist/esm/More.js";
|
|
9
|
+
import "iconsax-reactjs/dist/esm/Add.js";
|
|
10
|
+
import "iconsax-reactjs/dist/esm/ExportSquare.js";
|
|
11
|
+
import { cn as o } from "../../lib/utils.js";
|
|
12
|
+
function x({ className: t, ...a }) {
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "data-table",
|
|
17
|
+
className: o("relative w-full overflow-x-auto rounded-lg border border-[var(--Border-Low-Emphasis)]", t),
|
|
18
|
+
...a
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
r(
|
|
23
|
+
"group/row border-b border-[var(--Border-Low-Emphasis)] transition-colors",
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
state: {
|
|
27
|
+
default: "hover:bg-[var(--Surface-Tertiary)]",
|
|
28
|
+
selected: "bg-[var(--Surface-Accent-Primary-Light)] hover:bg-[var(--Surface-Accent-Primary-Light)] border-l-[3px] border-l-[var(--Brand-Cake-Orange)]"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
state: "default"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
r(
|
|
37
|
+
"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",
|
|
38
|
+
{
|
|
39
|
+
variants: {
|
|
40
|
+
width: {
|
|
41
|
+
auto: "",
|
|
42
|
+
max: "min-w-[320px] max-w-[360px]",
|
|
43
|
+
hug: "min-w-0 w-0"
|
|
44
|
+
},
|
|
45
|
+
align: {
|
|
46
|
+
left: "text-left",
|
|
47
|
+
right: "text-right",
|
|
48
|
+
center: "text-center"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
width: "auto",
|
|
53
|
+
align: "left"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
export {
|
|
58
|
+
x as DataTable
|
|
59
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { XIcon as d } from "lucide-react";
|
|
4
|
+
import { Dialog as o } from "radix-ui";
|
|
5
|
+
import { cn as i } from "../../lib/utils.js";
|
|
6
|
+
import { Button as c } from "./button.js";
|
|
7
|
+
function D({
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ t(o.Root, { "data-slot": "dialog", ...a });
|
|
11
|
+
}
|
|
12
|
+
function y({
|
|
13
|
+
...a
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ t(o.Trigger, { "data-slot": "dialog-trigger", ...a });
|
|
16
|
+
}
|
|
17
|
+
function g({
|
|
18
|
+
...a
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ t(o.Portal, { "data-slot": "dialog-portal", ...a });
|
|
21
|
+
}
|
|
22
|
+
function b({
|
|
23
|
+
...a
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ t(o.Close, { "data-slot": "dialog-close", ...a });
|
|
26
|
+
}
|
|
27
|
+
function u({
|
|
28
|
+
className: a,
|
|
29
|
+
...e
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ t(
|
|
32
|
+
o.Overlay,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "dialog-overlay",
|
|
35
|
+
className: i(
|
|
36
|
+
"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
|
+
a
|
|
38
|
+
),
|
|
39
|
+
...e
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function N({
|
|
44
|
+
className: a,
|
|
45
|
+
children: e,
|
|
46
|
+
showCloseButton: l = !0,
|
|
47
|
+
...r
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ s(g, { "data-slot": "dialog-portal", children: [
|
|
50
|
+
/* @__PURE__ */ t(u, {}),
|
|
51
|
+
/* @__PURE__ */ s(
|
|
52
|
+
o.Content,
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "dialog-content",
|
|
55
|
+
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
56
|
+
className: i(
|
|
57
|
+
"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-background dark:bg-[var(--Primitive-Gray-800)] 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 sm:max-w-lg",
|
|
58
|
+
a
|
|
59
|
+
),
|
|
60
|
+
...r,
|
|
61
|
+
children: [
|
|
62
|
+
e,
|
|
63
|
+
l && /* @__PURE__ */ s(
|
|
64
|
+
o.Close,
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "dialog-close",
|
|
67
|
+
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",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ t(d, { className: "size-5" }),
|
|
70
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: "閉じる" })
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
function T({ className: a, ...e }) {
|
|
80
|
+
return /* @__PURE__ */ t(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "dialog-header",
|
|
84
|
+
className: i("flex flex-col gap-2 text-center sm:text-left", a),
|
|
85
|
+
...e
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function C({
|
|
90
|
+
className: a,
|
|
91
|
+
showCloseButton: e = !1,
|
|
92
|
+
children: l,
|
|
93
|
+
...r
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */ s(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
"data-slot": "dialog-footer",
|
|
99
|
+
className: i(
|
|
100
|
+
"flex flex-col gap-2 sm:flex-row sm:justify-end",
|
|
101
|
+
a
|
|
102
|
+
),
|
|
103
|
+
...r,
|
|
104
|
+
children: [
|
|
105
|
+
l,
|
|
106
|
+
e && /* @__PURE__ */ t(o.Close, { asChild: !0, children: /* @__PURE__ */ t(c, { variant: "tertiary", children: "Close" }) })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function w({
|
|
112
|
+
className: a,
|
|
113
|
+
...e
|
|
114
|
+
}) {
|
|
115
|
+
return /* @__PURE__ */ t(
|
|
116
|
+
o.Title,
|
|
117
|
+
{
|
|
118
|
+
"data-slot": "dialog-title",
|
|
119
|
+
className: i("typo-heading-lg text-[var(--Text-High-Emphasis)]", a),
|
|
120
|
+
...e
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function z({
|
|
125
|
+
className: a,
|
|
126
|
+
...e
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ t(
|
|
129
|
+
o.Description,
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "dialog-description",
|
|
132
|
+
className: i("typo-body-sm text-[var(--Text-Medium-Emphasis)]", a),
|
|
133
|
+
...e
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
D as Dialog,
|
|
139
|
+
b as DialogClose,
|
|
140
|
+
N as DialogContent,
|
|
141
|
+
z as DialogDescription,
|
|
142
|
+
C as DialogFooter,
|
|
143
|
+
T as DialogHeader,
|
|
144
|
+
u as DialogOverlay,
|
|
145
|
+
g as DialogPortal,
|
|
146
|
+
w as DialogTitle,
|
|
147
|
+
y as DialogTrigger
|
|
148
|
+
};
|