@cakejp/design-system 0.20.1 → 0.21.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 +172 -0
- package/CLAUDE.md +5 -3
- package/MIGRATION.md +3 -3
- package/README.md +31 -11
- package/contracts/components.json +420 -63
- package/contracts/composition.json +38 -4
- package/contracts/rules.json +27 -5
- package/contracts/screen-patterns.json +6 -4
- package/dist/components/ec/admin-shell.js +62 -60
- package/dist/components/ec/anniversary-card.js +13 -12
- package/dist/components/ec/coupon-card.js +11 -11
- package/dist/components/ec/delivery-calendar.js +51 -45
- package/dist/components/ec/mypage-shell.js +80 -69
- package/dist/components/ec/product-card.js +93 -76
- package/dist/components/ec/product-carousel.js +65 -60
- package/dist/components/ec/product-detail-bar.js +13 -11
- package/dist/components/ec/product-detail-sidebar.js +60 -58
- package/dist/components/ec/product-list-item.js +64 -63
- package/dist/components/ec/product-option.js +30 -26
- package/dist/components/ec/rating-stars.js +27 -27
- package/dist/components/ec/review-card.js +32 -32
- package/dist/components/ec/review-form.js +37 -37
- package/dist/components/ec/shop-card.js +21 -19
- package/dist/components/foundations/accordion.js +33 -31
- package/dist/components/foundations/alert-dialog.js +4 -5
- package/dist/components/foundations/badge.js +5 -5
- package/dist/components/foundations/breadcrumb.js +27 -26
- package/dist/components/foundations/button.js +144 -25
- package/dist/components/foundations/calendar.js +28 -26
- package/dist/components/foundations/checkbox-card.js +71 -47
- package/dist/components/foundations/checkbox-group.js +30 -27
- package/dist/components/foundations/checkbox.js +69 -52
- package/dist/components/foundations/chip-variants.js +13 -0
- package/dist/components/foundations/command.js +81 -79
- package/dist/components/foundations/confirm-dialog.js +136 -0
- package/dist/components/foundations/context-menu.js +43 -38
- package/dist/components/foundations/data-table.js +87 -84
- package/dist/components/foundations/dialog.js +45 -36
- package/dist/components/foundations/dropdown-menu.js +47 -42
- package/dist/components/foundations/file-input.js +97 -67
- package/dist/components/foundations/hover-card.js +21 -21
- package/dist/components/foundations/menubar.js +75 -69
- package/dist/components/foundations/navigation-menu.js +31 -26
- package/dist/components/foundations/pagination.js +54 -50
- package/dist/components/foundations/popover.js +7 -7
- package/dist/components/foundations/progress.js +10 -6
- package/dist/components/foundations/radio-group.js +6 -3
- package/dist/components/foundations/responsive-dialog.js +73 -55
- package/dist/components/foundations/scroll-area.js +18 -14
- package/dist/components/foundations/select.js +44 -39
- package/dist/components/foundations/sheet.js +45 -37
- package/dist/components/foundations/skeleton.js +6 -6
- package/dist/components/foundations/skip-link.js +10 -8
- package/dist/components/foundations/slider.js +73 -48
- package/dist/components/foundations/sonner.js +5 -4
- package/dist/components/foundations/spinner.js +7 -5
- package/dist/components/foundations/switch.js +11 -10
- package/dist/components/foundations/tabs.js +54 -39
- package/dist/components/foundations/toggle-group.js +29 -21
- package/dist/components/foundations/toggle.js +20 -16
- package/dist/components/primitives/admin-side-nav.js +65 -62
- package/dist/components/primitives/banner-carousel.js +32 -29
- package/dist/components/primitives/bottom-tab-bar.js +16 -15
- package/dist/components/primitives/category-scroll.js +39 -29
- package/dist/components/primitives/category-shortcuts.js +9 -9
- package/dist/components/primitives/chat-composer.js +77 -74
- package/dist/components/primitives/chip.js +84 -61
- package/dist/components/primitives/combobox.js +63 -47
- package/dist/components/primitives/container.js +9 -9
- package/dist/components/primitives/content-card.js +15 -17
- package/dist/components/primitives/content-carousel.js +79 -68
- package/dist/components/primitives/date-picker.js +137 -99
- package/dist/components/primitives/footer.js +36 -37
- package/dist/components/primitives/header.js +175 -168
- package/dist/components/primitives/image-carousel.js +107 -87
- package/dist/components/primitives/image-gallery.js +32 -27
- package/dist/components/primitives/image-uploader.js +6 -6
- package/dist/components/primitives/list-item.js +59 -51
- package/dist/components/primitives/menu-drawer.js +36 -38
- package/dist/components/primitives/multi-select.js +89 -58
- package/dist/components/primitives/notification-list.js +10 -9
- package/dist/components/primitives/number-input.js +116 -105
- package/dist/components/primitives/scroll-row.js +21 -0
- package/dist/components/primitives/search-bar.js +31 -28
- package/dist/components/primitives/section-header.js +54 -53
- package/dist/components/primitives/side-nav.js +57 -56
- package/dist/components/primitives/sub-nav.js +13 -14
- package/dist/components/primitives/tag.js +4 -2
- package/dist/index.css +1 -1
- package/dist/index.js +3051 -924
- package/dist/lib/field-labelling.js +31 -21
- package/dist/lib/focus-ring.js +22 -4
- package/dist/lib/high-contrast.js +4 -0
- package/dist/lib/image-index.js +8 -0
- package/dist/lib/use-prefers-reduced-motion.js +21 -0
- package/dist/types/components/ec/admin-shell.d.ts +11 -1
- package/dist/types/components/ec/anniversary-card.d.ts +9 -1
- package/dist/types/components/ec/mypage-shell.d.ts +12 -1
- package/dist/types/components/ec/product-card.d.ts +13 -1
- package/dist/types/components/ec/product-carousel.d.ts +13 -1
- package/dist/types/components/ec/product-detail-bar.d.ts +12 -1
- package/dist/types/components/ec/product-detail-sidebar.d.ts +11 -1
- package/dist/types/components/ec/product-list-item.d.ts +9 -1
- package/dist/types/components/ec/rating-stars.d.ts +2 -0
- package/dist/types/components/ec/review-card.d.ts +1 -1
- package/dist/types/components/ec/shop-card.d.ts +8 -1
- package/dist/types/components/foundations/badge.d.ts +1 -1
- package/dist/types/components/foundations/breadcrumb.d.ts +8 -1
- package/dist/types/components/foundations/button.d.ts +38 -3
- package/dist/types/components/foundations/checkbox-card.d.ts +7 -1
- package/dist/types/components/foundations/checkbox.d.ts +1 -1
- package/dist/types/components/foundations/chip-variants.d.ts +2 -2
- package/dist/types/components/foundations/confirm-dialog.d.ts +61 -0
- package/dist/types/components/foundations/data-table.d.ts +9 -2
- package/dist/types/components/foundations/dialog.d.ts +16 -1
- package/dist/types/components/foundations/pagination.d.ts +1 -1
- package/dist/types/components/foundations/responsive-dialog.d.ts +2 -1
- package/dist/types/components/foundations/sheet.d.ts +12 -1
- package/dist/types/components/foundations/skeleton.d.ts +6 -0
- package/dist/types/components/foundations/slider.d.ts +15 -1
- package/dist/types/components/foundations/tabs.d.ts +7 -0
- package/dist/types/components/primitives/admin-side-nav.d.ts +22 -2
- package/dist/types/components/primitives/banner-carousel.d.ts +9 -1
- package/dist/types/components/primitives/bottom-tab-bar.d.ts +13 -2
- package/dist/types/components/primitives/category-scroll.d.ts +10 -1
- package/dist/types/components/primitives/category-shortcuts.d.ts +11 -2
- package/dist/types/components/primitives/chip.d.ts +22 -3
- package/dist/types/components/primitives/combobox.d.ts +7 -2
- package/dist/types/components/primitives/container.d.ts +3 -0
- package/dist/types/components/primitives/content-card.d.ts +1 -1
- package/dist/types/components/primitives/content-carousel.d.ts +12 -4
- package/dist/types/components/primitives/date-picker.d.ts +10 -3
- package/dist/types/components/primitives/footer.d.ts +1 -1
- package/dist/types/components/primitives/header.d.ts +14 -2
- package/dist/types/components/primitives/image-carousel.d.ts +23 -5
- package/dist/types/components/primitives/list-item.d.ts +10 -1
- package/dist/types/components/primitives/menu-drawer.d.ts +1 -1
- package/dist/types/components/primitives/multi-select.d.ts +7 -2
- package/dist/types/components/primitives/notification-list.d.ts +10 -1
- package/dist/types/components/primitives/number-input.d.ts +18 -5
- package/dist/types/components/primitives/scroll-row.d.ts +43 -0
- package/dist/types/components/primitives/section-header.d.ts +9 -2
- package/dist/types/components/primitives/side-nav.d.ts +13 -1
- package/dist/types/components/primitives/sub-nav.d.ts +1 -1
- package/dist/types/components/primitives/tag.d.ts +1 -1
- package/dist/types/index.d.ts +7 -1
- package/dist/types/lib/field-labelling.d.ts +23 -8
- package/dist/types/lib/focus-ring.d.ts +70 -3
- package/dist/types/lib/high-contrast.d.ts +25 -0
- package/dist/types/lib/image-index.d.ts +2 -0
- package/dist/types/lib/link-component.d.ts +26 -21
- package/dist/types/lib/use-prefers-reduced-motion.d.ts +9 -0
- package/package.json +11 -3
- package/src/components/COMPONENT_LOOKUP.md +18 -16
- package/src/preset-standalone.css +42 -0
- package/src/preset.css +20 -1
- package/src/styles/semantic.css +57 -0
- package/templates/AGENTS.md +5 -1
- package/templates/CLAUDE.md +3 -1
- package/tokens.json +49 -0
- package/dist/lib/link-component.js +0 -6
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { CheckIcon as
|
|
3
|
+
import { CheckIcon as c, CircleIcon as l, ChevronRightIcon as m } from "lucide-react";
|
|
4
4
|
import { Menubar as n } from "radix-ui";
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
5
|
+
import { cn as r } from "../../lib/utils.js";
|
|
6
|
+
import { FORCED_COLORS_MENU_ITEM as d } from "../../lib/focus-ring.js";
|
|
7
|
+
function M({
|
|
7
8
|
className: e,
|
|
8
9
|
...t
|
|
9
10
|
}) {
|
|
@@ -11,7 +12,7 @@ function x({
|
|
|
11
12
|
n.Root,
|
|
12
13
|
{
|
|
13
14
|
"data-slot": "menubar",
|
|
14
|
-
className:
|
|
15
|
+
className: r(
|
|
15
16
|
"flex h-9 items-center gap-1 rounded-md border border-[var(--Border-Medium-Emphasis)] bg-background p-1 shadow-xs",
|
|
16
17
|
e
|
|
17
18
|
),
|
|
@@ -19,27 +20,27 @@ function x({
|
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function y({
|
|
23
24
|
...e
|
|
24
25
|
}) {
|
|
25
26
|
return /* @__PURE__ */ a(n.Menu, { "data-slot": "menubar-menu", ...e });
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function N({
|
|
28
29
|
...e
|
|
29
30
|
}) {
|
|
30
31
|
return /* @__PURE__ */ a(n.Group, { "data-slot": "menubar-group", ...e });
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function b({
|
|
33
34
|
...e
|
|
34
35
|
}) {
|
|
35
36
|
return /* @__PURE__ */ a(n.Portal, { "data-slot": "menubar-portal", ...e });
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function z({
|
|
38
39
|
...e
|
|
39
40
|
}) {
|
|
40
41
|
return /* @__PURE__ */ a(n.RadioGroup, { "data-slot": "menubar-radio-group", ...e });
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function I({
|
|
43
44
|
className: e,
|
|
44
45
|
...t
|
|
45
46
|
}) {
|
|
@@ -47,40 +48,41 @@ function z({
|
|
|
47
48
|
n.Trigger,
|
|
48
49
|
{
|
|
49
50
|
"data-slot": "menubar-trigger",
|
|
50
|
-
className:
|
|
51
|
-
"flex items-center rounded-sm px-2 py-1 typo-label-md outline-
|
|
51
|
+
className: r(
|
|
52
|
+
"flex items-center rounded-sm px-2 py-1 typo-label-md outline-none select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
53
|
+
d,
|
|
52
54
|
e
|
|
53
55
|
),
|
|
54
56
|
...t
|
|
55
57
|
}
|
|
56
58
|
);
|
|
57
59
|
}
|
|
58
|
-
function
|
|
60
|
+
function _({
|
|
59
61
|
className: e,
|
|
60
62
|
align: t = "start",
|
|
61
|
-
alignOffset:
|
|
63
|
+
alignOffset: o = -4,
|
|
62
64
|
sideOffset: s = 8,
|
|
63
|
-
...
|
|
65
|
+
...u
|
|
64
66
|
}) {
|
|
65
|
-
return /* @__PURE__ */ a(
|
|
67
|
+
return /* @__PURE__ */ a(b, { children: /* @__PURE__ */ a(
|
|
66
68
|
n.Content,
|
|
67
69
|
{
|
|
68
70
|
"data-slot": "menubar-content",
|
|
69
71
|
align: t,
|
|
70
|
-
alignOffset:
|
|
72
|
+
alignOffset: o,
|
|
71
73
|
sideOffset: s,
|
|
72
|
-
className:
|
|
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
|
+
className: r(
|
|
75
|
+
"z-[var(--Z-Popover)] min-w-[12rem] max-w-(--radix-menubar-content-available-width) 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
76
|
e
|
|
75
77
|
),
|
|
76
|
-
...
|
|
78
|
+
...u
|
|
77
79
|
}
|
|
78
80
|
) });
|
|
79
81
|
}
|
|
80
|
-
function
|
|
82
|
+
function w({
|
|
81
83
|
className: e,
|
|
82
84
|
inset: t,
|
|
83
|
-
variant:
|
|
85
|
+
variant: o = "default",
|
|
84
86
|
...s
|
|
85
87
|
}) {
|
|
86
88
|
return /* @__PURE__ */ a(
|
|
@@ -88,78 +90,81 @@ function I({
|
|
|
88
90
|
{
|
|
89
91
|
"data-slot": "menubar-item",
|
|
90
92
|
"data-inset": t,
|
|
91
|
-
"data-variant":
|
|
92
|
-
className:
|
|
93
|
-
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-
|
|
93
|
+
"data-variant": o,
|
|
94
|
+
className: r(
|
|
95
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 typo-body-md outline-none 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!",
|
|
96
|
+
d,
|
|
94
97
|
e
|
|
95
98
|
),
|
|
96
99
|
...s
|
|
97
100
|
}
|
|
98
101
|
);
|
|
99
102
|
}
|
|
100
|
-
function
|
|
103
|
+
function C({
|
|
101
104
|
className: e,
|
|
102
105
|
children: t,
|
|
103
|
-
checked:
|
|
106
|
+
checked: o,
|
|
104
107
|
...s
|
|
105
108
|
}) {
|
|
106
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ i(
|
|
107
110
|
n.CheckboxItem,
|
|
108
111
|
{
|
|
109
112
|
"data-slot": "menubar-checkbox-item",
|
|
110
|
-
className:
|
|
111
|
-
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-
|
|
113
|
+
className: r(
|
|
114
|
+
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-none 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",
|
|
115
|
+
d,
|
|
112
116
|
e
|
|
113
117
|
),
|
|
114
|
-
checked:
|
|
118
|
+
checked: o,
|
|
115
119
|
...s,
|
|
116
120
|
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(
|
|
121
|
+
/* @__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-4" }) }) }),
|
|
118
122
|
t
|
|
119
123
|
]
|
|
120
124
|
}
|
|
121
125
|
);
|
|
122
126
|
}
|
|
123
|
-
function
|
|
127
|
+
function S({
|
|
124
128
|
className: e,
|
|
125
129
|
children: t,
|
|
126
|
-
...
|
|
130
|
+
...o
|
|
127
131
|
}) {
|
|
128
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ i(
|
|
129
133
|
n.RadioItem,
|
|
130
134
|
{
|
|
131
135
|
"data-slot": "menubar-radio-item",
|
|
132
|
-
className:
|
|
133
|
-
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-
|
|
136
|
+
className: r(
|
|
137
|
+
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 typo-body-md outline-none 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",
|
|
138
|
+
d,
|
|
134
139
|
e
|
|
135
140
|
),
|
|
136
|
-
...
|
|
141
|
+
...o,
|
|
137
142
|
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(
|
|
143
|
+
/* @__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(l, { className: "size-2 fill-current" }) }) }),
|
|
139
144
|
t
|
|
140
145
|
]
|
|
141
146
|
}
|
|
142
147
|
);
|
|
143
148
|
}
|
|
144
|
-
function
|
|
149
|
+
function k({
|
|
145
150
|
className: e,
|
|
146
151
|
inset: t,
|
|
147
|
-
...
|
|
152
|
+
...o
|
|
148
153
|
}) {
|
|
149
154
|
return /* @__PURE__ */ a(
|
|
150
155
|
n.Label,
|
|
151
156
|
{
|
|
152
157
|
"data-slot": "menubar-label",
|
|
153
158
|
"data-inset": t,
|
|
154
|
-
className:
|
|
159
|
+
className: r(
|
|
155
160
|
"px-2 py-1.5 typo-label-md data-[inset]:pl-8",
|
|
156
161
|
e
|
|
157
162
|
),
|
|
158
|
-
...
|
|
163
|
+
...o
|
|
159
164
|
}
|
|
160
165
|
);
|
|
161
166
|
}
|
|
162
|
-
function
|
|
167
|
+
function R({
|
|
163
168
|
className: e,
|
|
164
169
|
...t
|
|
165
170
|
}) {
|
|
@@ -167,12 +172,12 @@ function S({
|
|
|
167
172
|
n.Separator,
|
|
168
173
|
{
|
|
169
174
|
"data-slot": "menubar-separator",
|
|
170
|
-
className:
|
|
175
|
+
className: r("-mx-1 my-1 h-px bg-border", e),
|
|
171
176
|
...t
|
|
172
177
|
}
|
|
173
178
|
);
|
|
174
179
|
}
|
|
175
|
-
function
|
|
180
|
+
function E({
|
|
176
181
|
className: e,
|
|
177
182
|
...t
|
|
178
183
|
}) {
|
|
@@ -180,7 +185,7 @@ function w({
|
|
|
180
185
|
"span",
|
|
181
186
|
{
|
|
182
187
|
"data-slot": "menubar-shortcut",
|
|
183
|
-
className:
|
|
188
|
+
className: r(
|
|
184
189
|
"ml-auto typo-body-xs text-muted-foreground",
|
|
185
190
|
e
|
|
186
191
|
),
|
|
@@ -188,7 +193,7 @@ function w({
|
|
|
188
193
|
}
|
|
189
194
|
);
|
|
190
195
|
}
|
|
191
|
-
function
|
|
196
|
+
function T({
|
|
192
197
|
...e
|
|
193
198
|
}) {
|
|
194
199
|
return /* @__PURE__ */ a(n.Sub, { "data-slot": "menubar-sub", ...e });
|
|
@@ -196,22 +201,23 @@ function R({
|
|
|
196
201
|
function j({
|
|
197
202
|
className: e,
|
|
198
203
|
inset: t,
|
|
199
|
-
children:
|
|
204
|
+
children: o,
|
|
200
205
|
...s
|
|
201
206
|
}) {
|
|
202
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ i(
|
|
203
208
|
n.SubTrigger,
|
|
204
209
|
{
|
|
205
210
|
"data-slot": "menubar-sub-trigger",
|
|
206
211
|
"data-inset": t,
|
|
207
|
-
className:
|
|
212
|
+
className: r(
|
|
208
213
|
"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",
|
|
214
|
+
d,
|
|
209
215
|
e
|
|
210
216
|
),
|
|
211
217
|
...s,
|
|
212
218
|
children: [
|
|
213
|
-
|
|
214
|
-
/* @__PURE__ */ a(
|
|
219
|
+
o,
|
|
220
|
+
/* @__PURE__ */ a(m, { className: "ml-auto h-4 w-4" })
|
|
215
221
|
]
|
|
216
222
|
}
|
|
217
223
|
);
|
|
@@ -224,8 +230,8 @@ function G({
|
|
|
224
230
|
n.SubContent,
|
|
225
231
|
{
|
|
226
232
|
"data-slot": "menubar-sub-content",
|
|
227
|
-
className:
|
|
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",
|
|
233
|
+
className: r(
|
|
234
|
+
"z-[var(--Z-Popover)] min-w-[8rem] max-w-(--radix-menubar-content-available-width) 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
235
|
e
|
|
230
236
|
),
|
|
231
237
|
...t
|
|
@@ -233,20 +239,20 @@ function G({
|
|
|
233
239
|
);
|
|
234
240
|
}
|
|
235
241
|
export {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
M as Menubar,
|
|
243
|
+
C as MenubarCheckboxItem,
|
|
244
|
+
_ as MenubarContent,
|
|
245
|
+
N as MenubarGroup,
|
|
246
|
+
w as MenubarItem,
|
|
247
|
+
k as MenubarLabel,
|
|
248
|
+
y as MenubarMenu,
|
|
249
|
+
b as MenubarPortal,
|
|
250
|
+
z as MenubarRadioGroup,
|
|
251
|
+
S as MenubarRadioItem,
|
|
252
|
+
R as MenubarSeparator,
|
|
253
|
+
E as MenubarShortcut,
|
|
254
|
+
T as MenubarSub,
|
|
249
255
|
G as MenubarSubContent,
|
|
250
256
|
j as MenubarSubTrigger,
|
|
251
|
-
|
|
257
|
+
I as MenubarTrigger
|
|
252
258
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { cva as u } from "class-variance-authority";
|
|
4
|
-
import { ChevronDownIcon as
|
|
4
|
+
import { ChevronDownIcon as l } from "lucide-react";
|
|
5
5
|
import { NavigationMenu as n } from "radix-ui";
|
|
6
6
|
import { cn as o } from "../../lib/utils.js";
|
|
7
|
-
|
|
7
|
+
import { FORCED_COLORS_FOCUS as d } from "../../lib/focus-ring.js";
|
|
8
|
+
function h({
|
|
8
9
|
className: t,
|
|
9
10
|
children: a,
|
|
10
11
|
viewport: i = !0,
|
|
11
|
-
...
|
|
12
|
+
...s
|
|
12
13
|
}) {
|
|
13
14
|
return /* @__PURE__ */ r(
|
|
14
15
|
n.Root,
|
|
@@ -19,15 +20,15 @@ function b({
|
|
|
19
20
|
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
20
21
|
t
|
|
21
22
|
),
|
|
22
|
-
...
|
|
23
|
+
...s,
|
|
23
24
|
children: [
|
|
24
25
|
a,
|
|
25
|
-
i && /* @__PURE__ */ e(
|
|
26
|
+
i && /* @__PURE__ */ e(m, {})
|
|
26
27
|
]
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function N({
|
|
31
32
|
className: t,
|
|
32
33
|
...a
|
|
33
34
|
}) {
|
|
@@ -43,7 +44,7 @@ function x({
|
|
|
43
44
|
}
|
|
44
45
|
);
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function M({
|
|
47
48
|
className: t,
|
|
48
49
|
...a
|
|
49
50
|
}) {
|
|
@@ -56,10 +57,13 @@ function h({
|
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
-
|
|
60
|
+
const g = u(
|
|
61
|
+
[
|
|
62
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 typo-label-md text-foreground transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent",
|
|
63
|
+
d
|
|
64
|
+
]
|
|
61
65
|
);
|
|
62
|
-
function
|
|
66
|
+
function y({
|
|
63
67
|
className: t,
|
|
64
68
|
children: a,
|
|
65
69
|
...i
|
|
@@ -68,13 +72,13 @@ function N({
|
|
|
68
72
|
n.Trigger,
|
|
69
73
|
{
|
|
70
74
|
"data-slot": "navigation-menu-trigger",
|
|
71
|
-
className: o(
|
|
75
|
+
className: o(g(), "group", t),
|
|
72
76
|
...i,
|
|
73
77
|
children: [
|
|
74
78
|
a,
|
|
75
79
|
" ",
|
|
76
80
|
/* @__PURE__ */ e(
|
|
77
|
-
|
|
81
|
+
l,
|
|
78
82
|
{
|
|
79
83
|
className: "relative top-[1px] ml-1 size-3 transition duration-[var(--Motion-Duration-Slow)] group-data-[state=open]:rotate-180",
|
|
80
84
|
"aria-hidden": "true"
|
|
@@ -84,7 +88,7 @@ function N({
|
|
|
84
88
|
}
|
|
85
89
|
);
|
|
86
90
|
}
|
|
87
|
-
function
|
|
91
|
+
function z({
|
|
88
92
|
className: t,
|
|
89
93
|
...a
|
|
90
94
|
}) {
|
|
@@ -101,7 +105,7 @@ function M({
|
|
|
101
105
|
}
|
|
102
106
|
);
|
|
103
107
|
}
|
|
104
|
-
function
|
|
108
|
+
function m({
|
|
105
109
|
className: t,
|
|
106
110
|
...a
|
|
107
111
|
}) {
|
|
@@ -125,7 +129,7 @@ function g({
|
|
|
125
129
|
}
|
|
126
130
|
);
|
|
127
131
|
}
|
|
128
|
-
function
|
|
132
|
+
function k({
|
|
129
133
|
className: t,
|
|
130
134
|
...a
|
|
131
135
|
}) {
|
|
@@ -134,14 +138,15 @@ function y({
|
|
|
134
138
|
{
|
|
135
139
|
"data-slot": "navigation-menu-link",
|
|
136
140
|
className: o(
|
|
137
|
-
"flex flex-col gap-1 rounded-sm p-2 typo-body-md transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring
|
|
141
|
+
"flex flex-col gap-1 rounded-sm p-2 typo-body-md transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
142
|
+
d,
|
|
138
143
|
t
|
|
139
144
|
),
|
|
140
145
|
...a
|
|
141
146
|
}
|
|
142
147
|
);
|
|
143
148
|
}
|
|
144
|
-
function
|
|
149
|
+
function C({
|
|
145
150
|
className: t,
|
|
146
151
|
...a
|
|
147
152
|
}) {
|
|
@@ -159,13 +164,13 @@ function z({
|
|
|
159
164
|
);
|
|
160
165
|
}
|
|
161
166
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
h as NavigationMenu,
|
|
168
|
+
z as NavigationMenuContent,
|
|
169
|
+
C as NavigationMenuIndicator,
|
|
170
|
+
M as NavigationMenuItem,
|
|
171
|
+
k as NavigationMenuLink,
|
|
172
|
+
N as NavigationMenuList,
|
|
173
|
+
y as NavigationMenuTrigger,
|
|
174
|
+
m as NavigationMenuViewport,
|
|
175
|
+
g as navigationMenuTriggerStyle
|
|
171
176
|
};
|
|
@@ -1,74 +1,78 @@
|
|
|
1
1
|
import { jsx as i, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { MoreHorizontalIcon as c, ChevronRightIcon as
|
|
3
|
+
import { MoreHorizontalIcon as c, ChevronRightIcon as m, ChevronLeftIcon as u } from "lucide-react";
|
|
4
4
|
import { cn as t } from "../../lib/utils.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
function v({ className: n, ...a }) {
|
|
5
|
+
import { buttonVariants as p } from "./button.js";
|
|
6
|
+
function P({ className: a, ...n }) {
|
|
8
7
|
return /* @__PURE__ */ i(
|
|
9
8
|
"nav",
|
|
10
9
|
{
|
|
11
10
|
role: "navigation",
|
|
12
11
|
"aria-label": "pagination",
|
|
13
12
|
"data-slot": "pagination",
|
|
14
|
-
className: t("mx-auto flex w-full justify-center",
|
|
15
|
-
...
|
|
13
|
+
className: t("mx-auto flex w-full justify-center", a),
|
|
14
|
+
...n
|
|
16
15
|
}
|
|
17
16
|
);
|
|
18
17
|
}
|
|
19
|
-
function
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
18
|
+
function k({
|
|
19
|
+
className: a,
|
|
20
|
+
...n
|
|
22
21
|
}) {
|
|
23
22
|
return /* @__PURE__ */ i(
|
|
24
23
|
"ul",
|
|
25
24
|
{
|
|
26
25
|
"data-slot": "pagination-content",
|
|
27
|
-
className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1",
|
|
28
|
-
...
|
|
26
|
+
className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", a),
|
|
27
|
+
...n
|
|
29
28
|
}
|
|
30
29
|
);
|
|
31
30
|
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...
|
|
31
|
+
function b({ ...a }) {
|
|
32
|
+
return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
|
|
34
33
|
}
|
|
35
|
-
function
|
|
36
|
-
className:
|
|
37
|
-
isActive:
|
|
38
|
-
size:
|
|
34
|
+
function r({
|
|
35
|
+
className: a,
|
|
36
|
+
isActive: n,
|
|
37
|
+
size: o = "icon",
|
|
39
38
|
linkComponent: s,
|
|
40
39
|
...l
|
|
41
40
|
}) {
|
|
42
|
-
const m = f(s);
|
|
43
41
|
return /* @__PURE__ */ i(
|
|
44
|
-
|
|
42
|
+
s ?? "a",
|
|
45
43
|
{
|
|
46
|
-
"aria-current":
|
|
44
|
+
"aria-current": n ? "page" : void 0,
|
|
47
45
|
"data-slot": "pagination-link",
|
|
48
|
-
"data-active":
|
|
46
|
+
"data-active": n,
|
|
49
47
|
className: t(
|
|
50
|
-
|
|
51
|
-
variant:
|
|
52
|
-
size:
|
|
48
|
+
p({
|
|
49
|
+
variant: n ? "secondary" : "ghost",
|
|
50
|
+
size: o
|
|
53
51
|
}),
|
|
54
52
|
"min-h-9 min-w-9 sm:min-h-10 sm:min-w-10",
|
|
55
|
-
|
|
53
|
+
// ページ番号(size="icon")は size-9 の固定幅で、桁が多いと文字が枠からはみ出していた
|
|
54
|
+
// (5 桁で中身 43px > 枠 40px、SP の 36px では 4 桁から)。幅を auto にして中身が
|
|
55
|
+
// 最小幅より広いときだけ横に伸ばす。3 桁以下は min-w の正方形(36 / 40px)のまま(実測で差なし)、
|
|
56
|
+
// 4 桁以上は文字幅に合わせて広がる(幅はフォント次第)。
|
|
57
|
+
// min-w-fit は tailwind-merge が上の min-w-9 / sm:min-w-10 を消すため使わない。
|
|
58
|
+
o === "icon" && "w-auto",
|
|
59
|
+
a
|
|
56
60
|
),
|
|
57
61
|
...l
|
|
58
62
|
}
|
|
59
63
|
);
|
|
60
64
|
}
|
|
61
|
-
function
|
|
62
|
-
className:
|
|
63
|
-
...
|
|
65
|
+
function v({
|
|
66
|
+
className: a,
|
|
67
|
+
...n
|
|
64
68
|
}) {
|
|
65
69
|
return /* @__PURE__ */ e(
|
|
66
|
-
|
|
70
|
+
r,
|
|
67
71
|
{
|
|
68
72
|
"aria-label": "前のページへ",
|
|
69
73
|
size: "default",
|
|
70
|
-
className: t("gap-1 px-2.5 sm:pl-2.5",
|
|
71
|
-
...
|
|
74
|
+
className: t("gap-1 px-2.5 sm:pl-2.5", a),
|
|
75
|
+
...n,
|
|
72
76
|
children: [
|
|
73
77
|
/* @__PURE__ */ i(u, {}),
|
|
74
78
|
/* @__PURE__ */ i("span", { className: "hidden sm:block", children: "前へ" })
|
|
@@ -76,35 +80,35 @@ function w({
|
|
|
76
80
|
}
|
|
77
81
|
);
|
|
78
82
|
}
|
|
79
|
-
function
|
|
80
|
-
className:
|
|
81
|
-
...
|
|
83
|
+
function w({
|
|
84
|
+
className: a,
|
|
85
|
+
...n
|
|
82
86
|
}) {
|
|
83
87
|
return /* @__PURE__ */ e(
|
|
84
|
-
|
|
88
|
+
r,
|
|
85
89
|
{
|
|
86
90
|
"aria-label": "次のページへ",
|
|
87
91
|
size: "default",
|
|
88
|
-
className: t("gap-1 px-2.5 sm:pr-2.5",
|
|
89
|
-
...
|
|
92
|
+
className: t("gap-1 px-2.5 sm:pr-2.5", a),
|
|
93
|
+
...n,
|
|
90
94
|
children: [
|
|
91
95
|
/* @__PURE__ */ i("span", { className: "hidden sm:block", children: "次へ" }),
|
|
92
|
-
/* @__PURE__ */ i(
|
|
96
|
+
/* @__PURE__ */ i(m, {})
|
|
93
97
|
]
|
|
94
98
|
}
|
|
95
99
|
);
|
|
96
100
|
}
|
|
97
|
-
function
|
|
98
|
-
className:
|
|
99
|
-
...
|
|
101
|
+
function j({
|
|
102
|
+
className: a,
|
|
103
|
+
...n
|
|
100
104
|
}) {
|
|
101
105
|
return /* @__PURE__ */ e(
|
|
102
106
|
"span",
|
|
103
107
|
{
|
|
104
108
|
"aria-hidden": !0,
|
|
105
109
|
"data-slot": "pagination-ellipsis",
|
|
106
|
-
className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground",
|
|
107
|
-
...
|
|
110
|
+
className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", a),
|
|
111
|
+
...n,
|
|
108
112
|
children: [
|
|
109
113
|
/* @__PURE__ */ i(c, { className: "size-4" }),
|
|
110
114
|
/* @__PURE__ */ i("span", { className: "sr-only", children: "その他のページ" })
|
|
@@ -113,11 +117,11 @@ function z({
|
|
|
113
117
|
);
|
|
114
118
|
}
|
|
115
119
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
P as Pagination,
|
|
121
|
+
k as PaginationContent,
|
|
122
|
+
j as PaginationEllipsis,
|
|
123
|
+
b as PaginationItem,
|
|
124
|
+
r as PaginationLink,
|
|
125
|
+
w as PaginationNext,
|
|
126
|
+
v as PaginationPrevious
|
|
123
127
|
};
|