@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,101 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { Slot as f } from "radix-ui";
|
|
4
|
+
import { FormProvider as u, Controller as F, useFormContext as I, useFormState as p } from "react-hook-form";
|
|
5
|
+
import { cn as a } from "../../lib/utils.js";
|
|
6
|
+
import { Label as x } from "./label.js";
|
|
7
|
+
const y = u, c = s.createContext(
|
|
8
|
+
{}
|
|
9
|
+
), S = ({
|
|
10
|
+
...t
|
|
11
|
+
}) => /* @__PURE__ */ m(c.Provider, { value: { name: t.name }, children: /* @__PURE__ */ m(F, { ...t }) }), d = () => {
|
|
12
|
+
const t = s.useContext(c), e = s.useContext(l), { getFieldState: o } = I(), r = p({ name: t.name }), n = o(t.name, r);
|
|
13
|
+
if (!t)
|
|
14
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
15
|
+
const { id: i } = e;
|
|
16
|
+
return {
|
|
17
|
+
id: i,
|
|
18
|
+
name: t.name,
|
|
19
|
+
formItemId: `${i}-form-item`,
|
|
20
|
+
formDescriptionId: `${i}-form-item-description`,
|
|
21
|
+
formMessageId: `${i}-form-item-message`,
|
|
22
|
+
...n
|
|
23
|
+
};
|
|
24
|
+
}, l = s.createContext(
|
|
25
|
+
{}
|
|
26
|
+
);
|
|
27
|
+
function $({ className: t, ...e }) {
|
|
28
|
+
const o = s.useId();
|
|
29
|
+
return /* @__PURE__ */ m(l.Provider, { value: { id: o }, children: /* @__PURE__ */ m(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "form-item",
|
|
33
|
+
className: a("grid gap-2", t),
|
|
34
|
+
...e
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
function D({
|
|
39
|
+
className: t,
|
|
40
|
+
...e
|
|
41
|
+
}) {
|
|
42
|
+
const { error: o, formItemId: r } = d();
|
|
43
|
+
return /* @__PURE__ */ m(
|
|
44
|
+
x,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "form-label",
|
|
47
|
+
"data-error": !!o,
|
|
48
|
+
className: a("data-[error=true]:text-destructive", t),
|
|
49
|
+
htmlFor: r,
|
|
50
|
+
...e
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function M({ ...t }) {
|
|
55
|
+
const { error: e, formItemId: o, formDescriptionId: r, formMessageId: n } = d();
|
|
56
|
+
return /* @__PURE__ */ m(
|
|
57
|
+
f.Root,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "form-control",
|
|
60
|
+
id: o,
|
|
61
|
+
"aria-describedby": e ? `${r} ${n}` : `${r}`,
|
|
62
|
+
"aria-invalid": !!e,
|
|
63
|
+
...t
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function N({ className: t, ...e }) {
|
|
68
|
+
const { formDescriptionId: o } = d();
|
|
69
|
+
return /* @__PURE__ */ m(
|
|
70
|
+
"p",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "form-description",
|
|
73
|
+
id: o,
|
|
74
|
+
className: a("typo-body-sm text-muted-foreground", t),
|
|
75
|
+
...e
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function w({ className: t, ...e }) {
|
|
80
|
+
const { error: o, formMessageId: r } = d(), n = o ? String(o?.message ?? "") : e.children;
|
|
81
|
+
return n ? /* @__PURE__ */ m(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "form-message",
|
|
85
|
+
id: r,
|
|
86
|
+
className: a("typo-body-sm text-destructive", t),
|
|
87
|
+
...e,
|
|
88
|
+
children: n
|
|
89
|
+
}
|
|
90
|
+
) : null;
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
y as Form,
|
|
94
|
+
M as FormControl,
|
|
95
|
+
N as FormDescription,
|
|
96
|
+
S as FormField,
|
|
97
|
+
$ as FormItem,
|
|
98
|
+
D as FormLabel,
|
|
99
|
+
w as FormMessage,
|
|
100
|
+
d as useFormField
|
|
101
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { HoverCard as r } from "radix-ui";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
function p({
|
|
6
|
+
openDelay: o = 200,
|
|
7
|
+
closeDelay: e = 100,
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ t(r.Root, { "data-slot": "hover-card", openDelay: o, closeDelay: e, ...a });
|
|
11
|
+
}
|
|
12
|
+
function c({
|
|
13
|
+
...o
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ t(r.Trigger, { "data-slot": "hover-card-trigger", ...o });
|
|
16
|
+
}
|
|
17
|
+
function f({
|
|
18
|
+
className: o,
|
|
19
|
+
align: e = "center",
|
|
20
|
+
sideOffset: a = 4,
|
|
21
|
+
...d
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ t(r.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ t(
|
|
24
|
+
r.Content,
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "hover-card-content",
|
|
27
|
+
align: e,
|
|
28
|
+
sideOffset: a,
|
|
29
|
+
className: i(
|
|
30
|
+
"z-[var(--Z-Popover)] w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border border-[var(--Border-Medium-Emphasis)] bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
|
|
31
|
+
o
|
|
32
|
+
),
|
|
33
|
+
...d
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
p as HoverCard,
|
|
39
|
+
f as HoverCardContent,
|
|
40
|
+
c as HoverCardTrigger
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
const c = t(
|
|
6
|
+
"grid shrink-0 place-items-center rounded-full bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Object-Accent-Primary)]",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
md: "size-11 [&>svg]:size-5",
|
|
11
|
+
// 44px / アイコン 20px
|
|
12
|
+
ml: "size-12 [&>svg]:size-6",
|
|
13
|
+
// 48px / アイコン 24px
|
|
14
|
+
lg: "size-18 [&>svg]:size-[38px]"
|
|
15
|
+
// 72px / アイコン 38px(実測仕様。4の倍数外のため任意値)
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
size: "md"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
function g({
|
|
24
|
+
className: i,
|
|
25
|
+
size: e,
|
|
26
|
+
...r
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ a(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "icon-badge",
|
|
32
|
+
"data-size": e ?? "md",
|
|
33
|
+
className: s(c({ size: e }), i),
|
|
34
|
+
...r
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
g as IconBadge,
|
|
40
|
+
c as iconBadgeVariants
|
|
41
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as d, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as c } from "../../lib/utils.js";
|
|
4
|
+
import { useValueLength as g } from "../../lib/use-value-length.js";
|
|
5
|
+
import { FOCUS_RING as y } from "../../lib/focus-ring.js";
|
|
6
|
+
import { resolveNativeFieldAria as w, useFieldLabelling as N } from "../../lib/field-labelling.js";
|
|
7
|
+
function R({
|
|
8
|
+
className: p,
|
|
9
|
+
type: u,
|
|
10
|
+
showCount: r,
|
|
11
|
+
maxLength: e,
|
|
12
|
+
value: o,
|
|
13
|
+
defaultValue: t,
|
|
14
|
+
onChange: i,
|
|
15
|
+
ref: f,
|
|
16
|
+
...a
|
|
17
|
+
}) {
|
|
18
|
+
const b = w(a, N()), { ref: m, length: l, syncFromDom: h } = g({
|
|
19
|
+
enabled: r === !0,
|
|
20
|
+
value: o,
|
|
21
|
+
defaultValue: t,
|
|
22
|
+
forwardedRef: f
|
|
23
|
+
}), n = /* @__PURE__ */ d(
|
|
24
|
+
"input",
|
|
25
|
+
{
|
|
26
|
+
type: u,
|
|
27
|
+
"data-slot": "input",
|
|
28
|
+
ref: m,
|
|
29
|
+
value: o,
|
|
30
|
+
defaultValue: t,
|
|
31
|
+
maxLength: e,
|
|
32
|
+
onChange: r ? (x) => {
|
|
33
|
+
h(), i?.(x);
|
|
34
|
+
} : i,
|
|
35
|
+
className: c(
|
|
36
|
+
// h-11(44px)= 入力コントロールの共通高さ。
|
|
37
|
+
// SelectTrigger(default) / DatePicker trigger / Button(default) と同値。
|
|
38
|
+
// tokens.json の touchTarget["text-input"].min = 44px を満たす最小サイズで、
|
|
39
|
+
// 管理画面の情報密度とタッチターゲットのバランスが取れる(iOS HIG の 44pt とも一致)。
|
|
40
|
+
// より大きくしたい場合は consumer が className="h-12" 等で上書きする。
|
|
41
|
+
"h-11 w-full min-w-0 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-1 typo-body-lg md:typo-body-md transition-[color,box-shadow,border-color] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:typo-label-sm file:text-foreground placeholder:text-muted-foreground hover:border-[var(--Focus-High-Emphasis)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-[var(--Border-Low-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:placeholder:text-[var(--Text-Disable)]",
|
|
42
|
+
// フォーカス意匠は DS 共通(FOCUS_RING)。Tailwind の variant 順で
|
|
43
|
+
// focus-visible は hover より後に出力されるため、hover の枠線に必ず勝つ。
|
|
44
|
+
y,
|
|
45
|
+
"aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20",
|
|
46
|
+
p
|
|
47
|
+
),
|
|
48
|
+
...a,
|
|
49
|
+
...b
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
if (!r) return n;
|
|
53
|
+
const v = e != null && l >= e;
|
|
54
|
+
return /* @__PURE__ */ s("div", { "data-slot": "input-with-count", className: "w-full", children: [
|
|
55
|
+
n,
|
|
56
|
+
/* @__PURE__ */ d("div", { className: "mt-1 flex justify-end", children: /* @__PURE__ */ s(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "input-count",
|
|
60
|
+
className: c(
|
|
61
|
+
"typo-body-xs",
|
|
62
|
+
v ? "text-[var(--Text-Caution)]" : "text-[var(--Text-Low-Emphasis)]"
|
|
63
|
+
),
|
|
64
|
+
children: [
|
|
65
|
+
l,
|
|
66
|
+
e != null ? `/${e}` : ""
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
R as Input
|
|
74
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Label as s } from "radix-ui";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
function c({
|
|
6
|
+
className: e,
|
|
7
|
+
required: a,
|
|
8
|
+
children: t,
|
|
9
|
+
...o
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
|
+
s.Root,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "label",
|
|
15
|
+
className: i(
|
|
16
|
+
"flex items-center gap-1.5 typo-label-md select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
17
|
+
e
|
|
18
|
+
),
|
|
19
|
+
...o,
|
|
20
|
+
children: [
|
|
21
|
+
t,
|
|
22
|
+
a && /* @__PURE__ */ l("span", { className: "typo-label-sm text-[var(--Text-Caution)]", children: "必須" })
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
c as Label
|
|
29
|
+
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CheckIcon as u, CircleIcon as c, ChevronRightIcon as l } from "lucide-react";
|
|
4
|
+
import { Menubar as n } from "radix-ui";
|
|
5
|
+
import { cn as o } from "../../lib/utils.js";
|
|
6
|
+
function x({
|
|
7
|
+
className: e,
|
|
8
|
+
...t
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
n.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "menubar",
|
|
14
|
+
className: o(
|
|
15
|
+
"flex h-9 items-center gap-1 rounded-md border border-[var(--Border-Medium-Emphasis)] bg-background p-1 shadow-xs",
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
...t
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function h({
|
|
23
|
+
...e
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ a(n.Menu, { "data-slot": "menubar-menu", ...e });
|
|
26
|
+
}
|
|
27
|
+
function y({
|
|
28
|
+
...e
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ a(n.Group, { "data-slot": "menubar-group", ...e });
|
|
31
|
+
}
|
|
32
|
+
function m({
|
|
33
|
+
...e
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ a(n.Portal, { "data-slot": "menubar-portal", ...e });
|
|
36
|
+
}
|
|
37
|
+
function M({
|
|
38
|
+
...e
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ a(n.RadioGroup, { "data-slot": "menubar-radio-group", ...e });
|
|
41
|
+
}
|
|
42
|
+
function z({
|
|
43
|
+
className: e,
|
|
44
|
+
...t
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ a(
|
|
47
|
+
n.Trigger,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "menubar-trigger",
|
|
50
|
+
className: o(
|
|
51
|
+
"flex items-center rounded-sm px-2 py-1 typo-label-md outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
52
|
+
e
|
|
53
|
+
),
|
|
54
|
+
...t
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function N({
|
|
59
|
+
className: e,
|
|
60
|
+
align: t = "start",
|
|
61
|
+
alignOffset: r = -4,
|
|
62
|
+
sideOffset: s = 8,
|
|
63
|
+
...i
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(
|
|
66
|
+
n.Content,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "menubar-content",
|
|
69
|
+
align: t,
|
|
70
|
+
alignOffset: r,
|
|
71
|
+
sideOffset: s,
|
|
72
|
+
className: o(
|
|
73
|
+
"z-[var(--Z-Popover)] min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden 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]: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",
|
|
74
|
+
e
|
|
75
|
+
),
|
|
76
|
+
...i
|
|
77
|
+
}
|
|
78
|
+
) });
|
|
79
|
+
}
|
|
80
|
+
function I({
|
|
81
|
+
className: e,
|
|
82
|
+
inset: t,
|
|
83
|
+
variant: r = "default",
|
|
84
|
+
...s
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ a(
|
|
87
|
+
n.Item,
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "menubar-item",
|
|
90
|
+
"data-inset": t,
|
|
91
|
+
"data-variant": r,
|
|
92
|
+
className: o(
|
|
93
|
+
"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!",
|
|
94
|
+
e
|
|
95
|
+
),
|
|
96
|
+
...s
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function _({
|
|
101
|
+
className: e,
|
|
102
|
+
children: t,
|
|
103
|
+
checked: r,
|
|
104
|
+
...s
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ d(
|
|
107
|
+
n.CheckboxItem,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "menubar-checkbox-item",
|
|
110
|
+
className: o(
|
|
111
|
+
"relative flex cursor-default items-center gap-2 rounded-xs 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",
|
|
112
|
+
e
|
|
113
|
+
),
|
|
114
|
+
checked: r,
|
|
115
|
+
...s,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(u, { className: "size-4" }) }) }),
|
|
118
|
+
t
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function k({
|
|
124
|
+
className: e,
|
|
125
|
+
children: t,
|
|
126
|
+
...r
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ d(
|
|
129
|
+
n.RadioItem,
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "menubar-radio-item",
|
|
132
|
+
className: o(
|
|
133
|
+
"relative flex cursor-default items-center gap-2 rounded-xs 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",
|
|
134
|
+
e
|
|
135
|
+
),
|
|
136
|
+
...r,
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ a("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a(n.ItemIndicator, { children: /* @__PURE__ */ a(c, { className: "size-2 fill-current" }) }) }),
|
|
139
|
+
t
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function C({
|
|
145
|
+
className: e,
|
|
146
|
+
inset: t,
|
|
147
|
+
...r
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ a(
|
|
150
|
+
n.Label,
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "menubar-label",
|
|
153
|
+
"data-inset": t,
|
|
154
|
+
className: o(
|
|
155
|
+
"px-2 py-1.5 typo-label-md data-[inset]:pl-8",
|
|
156
|
+
e
|
|
157
|
+
),
|
|
158
|
+
...r
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function S({
|
|
163
|
+
className: e,
|
|
164
|
+
...t
|
|
165
|
+
}) {
|
|
166
|
+
return /* @__PURE__ */ a(
|
|
167
|
+
n.Separator,
|
|
168
|
+
{
|
|
169
|
+
"data-slot": "menubar-separator",
|
|
170
|
+
className: o("-mx-1 my-1 h-px bg-border", e),
|
|
171
|
+
...t
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function w({
|
|
176
|
+
className: e,
|
|
177
|
+
...t
|
|
178
|
+
}) {
|
|
179
|
+
return /* @__PURE__ */ a(
|
|
180
|
+
"span",
|
|
181
|
+
{
|
|
182
|
+
"data-slot": "menubar-shortcut",
|
|
183
|
+
className: o(
|
|
184
|
+
"ml-auto typo-body-xs text-muted-foreground",
|
|
185
|
+
e
|
|
186
|
+
),
|
|
187
|
+
...t
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
function R({
|
|
192
|
+
...e
|
|
193
|
+
}) {
|
|
194
|
+
return /* @__PURE__ */ a(n.Sub, { "data-slot": "menubar-sub", ...e });
|
|
195
|
+
}
|
|
196
|
+
function j({
|
|
197
|
+
className: e,
|
|
198
|
+
inset: t,
|
|
199
|
+
children: r,
|
|
200
|
+
...s
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ d(
|
|
203
|
+
n.SubTrigger,
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "menubar-sub-trigger",
|
|
206
|
+
"data-inset": t,
|
|
207
|
+
className: o(
|
|
208
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 typo-body-md outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
209
|
+
e
|
|
210
|
+
),
|
|
211
|
+
...s,
|
|
212
|
+
children: [
|
|
213
|
+
r,
|
|
214
|
+
/* @__PURE__ */ a(l, { className: "ml-auto h-4 w-4" })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function G({
|
|
220
|
+
className: e,
|
|
221
|
+
...t
|
|
222
|
+
}) {
|
|
223
|
+
return /* @__PURE__ */ a(
|
|
224
|
+
n.SubContent,
|
|
225
|
+
{
|
|
226
|
+
"data-slot": "menubar-sub-content",
|
|
227
|
+
className: o(
|
|
228
|
+
"z-[var(--Z-Popover)] min-w-[8rem] origin-(--radix-menubar-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",
|
|
229
|
+
e
|
|
230
|
+
),
|
|
231
|
+
...t
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
export {
|
|
236
|
+
x as Menubar,
|
|
237
|
+
_ as MenubarCheckboxItem,
|
|
238
|
+
N as MenubarContent,
|
|
239
|
+
y as MenubarGroup,
|
|
240
|
+
I as MenubarItem,
|
|
241
|
+
C as MenubarLabel,
|
|
242
|
+
h as MenubarMenu,
|
|
243
|
+
m as MenubarPortal,
|
|
244
|
+
M as MenubarRadioGroup,
|
|
245
|
+
k as MenubarRadioItem,
|
|
246
|
+
S as MenubarSeparator,
|
|
247
|
+
w as MenubarShortcut,
|
|
248
|
+
R as MenubarSub,
|
|
249
|
+
G as MenubarSubContent,
|
|
250
|
+
j as MenubarSubTrigger,
|
|
251
|
+
z as MenubarTrigger
|
|
252
|
+
};
|