@cakejp/design-system 0.16.0 → 0.17.1

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.
Files changed (151) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/CLAUDE.md +1 -0
  3. package/bin/init.js +29 -6
  4. package/contracts/components.json +42 -7
  5. package/contracts/composition.json +8 -2
  6. package/contracts/rules.json +5 -1
  7. package/contracts/screen-patterns.json +1 -1
  8. package/dist/components/ec/_mypage-menu-data.js +166 -0
  9. package/dist/components/ec/admin-shell.js +202 -0
  10. package/dist/components/ec/anniversary-card.js +63 -0
  11. package/dist/components/ec/cake-logo.js +38 -0
  12. package/dist/components/ec/chart-controls.js +91 -0
  13. package/dist/components/ec/countdown-timer.js +50 -0
  14. package/dist/components/ec/coupon-card.js +136 -0
  15. package/dist/components/ec/delivery-calendar.js +105 -0
  16. package/dist/components/ec/mypage-shell.js +98 -0
  17. package/dist/components/ec/order-section.js +53 -0
  18. package/dist/components/ec/order-summary.js +78 -0
  19. package/dist/components/ec/payment-method.js +81 -0
  20. package/dist/components/ec/product-card.js +235 -0
  21. package/dist/components/ec/product-carousel.js +106 -0
  22. package/dist/components/ec/product-cta.js +80 -0
  23. package/dist/components/ec/product-detail-bar.js +86 -0
  24. package/dist/components/ec/product-detail-sidebar.js +296 -0
  25. package/dist/components/ec/product-list-item.js +266 -0
  26. package/dist/components/ec/product-option.js +165 -0
  27. package/dist/components/ec/rating-stars.js +74 -0
  28. package/dist/components/ec/review-card.js +126 -0
  29. package/dist/components/ec/review-form.js +181 -0
  30. package/dist/components/ec/review-summary.js +95 -0
  31. package/dist/components/ec/shop-card.js +179 -0
  32. package/dist/components/ec/stat-card.js +50 -0
  33. package/dist/components/foundations/accordion.js +67 -0
  34. package/dist/components/foundations/alert-dialog.js +165 -0
  35. package/dist/components/foundations/alert.js +218 -0
  36. package/dist/components/foundations/aspect-ratio.js +10 -0
  37. package/dist/components/foundations/avatar.js +58 -0
  38. package/dist/components/foundations/badge.js +54 -0
  39. package/dist/components/foundations/breadcrumb.js +104 -0
  40. package/dist/components/foundations/button.js +99 -0
  41. package/dist/components/foundations/calendar.js +173 -0
  42. package/dist/components/foundations/card.js +109 -0
  43. package/dist/components/foundations/checkbox-card.js +111 -0
  44. package/dist/components/foundations/checkbox-group.js +92 -0
  45. package/dist/components/foundations/checkbox.js +90 -0
  46. package/dist/components/foundations/chip-variants.js +41 -0
  47. package/dist/components/foundations/collapsible.js +34 -0
  48. package/dist/components/foundations/command.js +171 -0
  49. package/dist/components/foundations/context-menu.js +225 -0
  50. package/dist/components/foundations/data-table.js +59 -0
  51. package/dist/components/foundations/dialog.js +148 -0
  52. package/dist/components/foundations/drawer.js +129 -0
  53. package/dist/components/foundations/dropdown-menu.js +232 -0
  54. package/dist/components/foundations/field.js +150 -0
  55. package/dist/components/foundations/file-input.js +116 -0
  56. package/dist/components/foundations/form.js +101 -0
  57. package/dist/components/foundations/hover-card.js +41 -0
  58. package/dist/components/foundations/icon-badge.js +41 -0
  59. package/dist/components/foundations/input.js +74 -0
  60. package/dist/components/foundations/label.js +29 -0
  61. package/dist/components/foundations/menubar.js +252 -0
  62. package/dist/components/foundations/navigation-menu.js +171 -0
  63. package/dist/components/foundations/pagination.js +120 -0
  64. package/dist/components/foundations/popover.js +45 -0
  65. package/dist/components/foundations/progress.js +34 -0
  66. package/dist/components/foundations/radio-group.js +134 -0
  67. package/dist/components/foundations/responsive-dialog.js +76 -0
  68. package/dist/components/foundations/scroll-area.js +62 -0
  69. package/dist/components/foundations/select.js +190 -0
  70. package/dist/components/foundations/separator.js +27 -0
  71. package/dist/components/foundations/sheet.js +130 -0
  72. package/dist/components/foundations/skeleton.js +15 -0
  73. package/dist/components/foundations/skip-link.js +27 -0
  74. package/dist/components/foundations/slider.js +81 -0
  75. package/dist/components/foundations/social-icon.js +36 -0
  76. package/dist/components/foundations/sonner.js +49 -0
  77. package/dist/components/foundations/spinner.js +28 -0
  78. package/dist/components/foundations/switch.js +54 -0
  79. package/dist/components/foundations/table.js +115 -0
  80. package/dist/components/foundations/tabs.js +102 -0
  81. package/dist/components/foundations/textarea.js +65 -0
  82. package/dist/components/foundations/toggle-group.js +107 -0
  83. package/dist/components/foundations/toggle.js +44 -0
  84. package/dist/components/foundations/tooltip.js +56 -0
  85. package/dist/components/primitives/admin-header.js +31 -0
  86. package/dist/components/primitives/admin-side-nav.js +135 -0
  87. package/dist/components/primitives/banner-carousel.js +97 -0
  88. package/dist/components/primitives/bottom-tab-bar.js +81 -0
  89. package/dist/components/primitives/bulk-action-bar.js +27 -0
  90. package/dist/components/primitives/category-scroll.js +110 -0
  91. package/dist/components/primitives/category-shortcuts.js +66 -0
  92. package/dist/components/primitives/chat-composer.js +141 -0
  93. package/dist/components/primitives/chip.js +123 -0
  94. package/dist/components/primitives/coach-mark.js +102 -0
  95. package/dist/components/primitives/combobox.js +88 -0
  96. package/dist/components/primitives/container.js +50 -0
  97. package/dist/components/primitives/content-carousel.js +144 -0
  98. package/dist/components/primitives/date-picker.js +175 -0
  99. package/dist/components/primitives/empty-state.js +32 -0
  100. package/dist/components/primitives/error-state.js +115 -0
  101. package/dist/components/primitives/filter-bar.js +144 -0
  102. package/dist/components/primitives/footer.js +247 -0
  103. package/dist/components/primitives/form-field.js +38 -0
  104. package/dist/components/primitives/funnel-shell.js +99 -0
  105. package/dist/components/primitives/header.js +257 -0
  106. package/dist/components/primitives/image-carousel.js +156 -0
  107. package/dist/components/primitives/image-gallery.js +177 -0
  108. package/dist/components/primitives/image-input.js +207 -0
  109. package/dist/components/primitives/image-uploader.js +69 -0
  110. package/dist/components/primitives/kebab-menu.js +40 -0
  111. package/dist/components/primitives/list-item.js +80 -0
  112. package/dist/components/primitives/menu-drawer.js +154 -0
  113. package/dist/components/primitives/multi-select.js +93 -0
  114. package/dist/components/primitives/notification-badge.js +61 -0
  115. package/dist/components/primitives/notification-list.js +72 -0
  116. package/dist/components/primitives/number-input.js +235 -0
  117. package/dist/components/primitives/price-display.js +101 -0
  118. package/dist/components/primitives/progress-steps.js +62 -0
  119. package/dist/components/primitives/search-bar.js +81 -0
  120. package/dist/components/primitives/search-panel.js +43 -0
  121. package/dist/components/primitives/section-header.js +148 -0
  122. package/dist/components/primitives/section-nav.js +85 -0
  123. package/dist/components/primitives/section.js +78 -0
  124. package/dist/components/primitives/share-buttons.js +102 -0
  125. package/dist/components/primitives/side-nav.js +98 -0
  126. package/dist/components/primitives/social-login-button.js +53 -0
  127. package/dist/components/primitives/standard-page-shell.js +34 -0
  128. package/dist/components/primitives/status-count-tabs.js +42 -0
  129. package/dist/components/primitives/sticky-action-bar.js +26 -0
  130. package/dist/components/primitives/sub-nav.js +67 -0
  131. package/dist/components/primitives/tag.js +57 -0
  132. package/dist/components/primitives/timeline.js +55 -0
  133. package/dist/components/primitives/workspace-shell.js +57 -0
  134. package/dist/index.css +1 -1
  135. package/dist/index.js +22961 -13130
  136. package/dist/lib/field-labelling.js +29 -0
  137. package/dist/lib/focus-ring.js +6 -0
  138. package/dist/lib/pagination-range.js +42 -0
  139. package/dist/lib/use-value-length.js +63 -0
  140. package/dist/lib/utils.js +33 -0
  141. package/dist/types/components/foundations/accordion.d.ts +8 -1
  142. package/dist/types/components/foundations/data-table.d.ts +6 -1
  143. package/dist/types/components/foundations/slider.d.ts +13 -1
  144. package/dist/types/components/primitives/admin-header.d.ts +10 -0
  145. package/dist/types/components/primitives/admin-side-nav.d.ts +18 -0
  146. package/dist/types/components/primitives/combobox.d.ts +9 -1
  147. package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
  148. package/dist/types/components/primitives/multi-select.d.ts +9 -1
  149. package/dist/types/lib/field-labelling.d.ts +66 -0
  150. package/package.json +8 -4
  151. package/scripts/codemod/README.md +9 -0
@@ -0,0 +1,165 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import "react";
3
+ import { AlertDialog as o } from "radix-ui";
4
+ import { cn as l } from "../../lib/utils.js";
5
+ import { Button as d } from "./button.js";
6
+ function x({
7
+ ...a
8
+ }) {
9
+ return /* @__PURE__ */ e(o.Root, { "data-slot": "alert-dialog", ...a });
10
+ }
11
+ function D({
12
+ ...a
13
+ }) {
14
+ return /* @__PURE__ */ e(o.Trigger, { "data-slot": "alert-dialog-trigger", ...a });
15
+ }
16
+ function n({
17
+ ...a
18
+ }) {
19
+ return /* @__PURE__ */ e(o.Portal, { "data-slot": "alert-dialog-portal", ...a });
20
+ }
21
+ function g({
22
+ className: a,
23
+ ...t
24
+ }) {
25
+ return /* @__PURE__ */ e(
26
+ o.Overlay,
27
+ {
28
+ "data-slot": "alert-dialog-overlay",
29
+ className: l(
30
+ "fixed inset-0 z-[var(--Z-Overlay)] bg-[var(--Overlay-Medium)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
31
+ a
32
+ ),
33
+ ...t
34
+ }
35
+ );
36
+ }
37
+ function h({
38
+ className: a,
39
+ size: t = "default",
40
+ ...r
41
+ }) {
42
+ return /* @__PURE__ */ s(n, { children: [
43
+ /* @__PURE__ */ e(g, {}),
44
+ /* @__PURE__ */ e(
45
+ o.Content,
46
+ {
47
+ "data-slot": "alert-dialog-content",
48
+ "data-size": t,
49
+ onOpenAutoFocus: (i) => i.preventDefault(),
50
+ className: l(
51
+ // 画面端との余白は上下左右 40px(calc(100%-5rem))。
52
+ // 幅上限は端末幅に応じて: SP は端末幅-80px に追従 / sm 以上は
53
+ // default=480px(テキスト確認が間延びしない幅)・sm=320px
54
+ "group/alert-dialog-content fixed top-[50%] left-[50%] z-[var(--Z-Modal)] grid w-full max-w-[calc(100%-5rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-background p-6 shadow-lg duration-[var(--Motion-Duration-Base)] data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-[480px]",
55
+ a
56
+ ),
57
+ ...r
58
+ }
59
+ )
60
+ ] });
61
+ }
62
+ function v({
63
+ className: a,
64
+ ...t
65
+ }) {
66
+ return /* @__PURE__ */ e(
67
+ "div",
68
+ {
69
+ "data-slot": "alert-dialog-header",
70
+ className: l(
71
+ "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
72
+ a
73
+ ),
74
+ ...t
75
+ }
76
+ );
77
+ }
78
+ function A({
79
+ className: a,
80
+ ...t
81
+ }) {
82
+ return /* @__PURE__ */ e(
83
+ "div",
84
+ {
85
+ "data-slot": "alert-dialog-footer",
86
+ className: l(
87
+ "flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
88
+ a
89
+ ),
90
+ ...t
91
+ }
92
+ );
93
+ }
94
+ function z({
95
+ className: a,
96
+ ...t
97
+ }) {
98
+ return /* @__PURE__ */ e(
99
+ o.Title,
100
+ {
101
+ "data-slot": "alert-dialog-title",
102
+ className: l(
103
+ "typo-heading-lg text-[var(--Text-High-Emphasis)] sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
104
+ a
105
+ ),
106
+ ...t
107
+ }
108
+ );
109
+ }
110
+ function y({
111
+ className: a,
112
+ ...t
113
+ }) {
114
+ return /* @__PURE__ */ e(
115
+ o.Description,
116
+ {
117
+ "data-slot": "alert-dialog-description",
118
+ className: l("typo-body-md text-[var(--Text-Medium-Emphasis)]", a),
119
+ ...t
120
+ }
121
+ );
122
+ }
123
+ function w({
124
+ className: a,
125
+ variant: t = "default",
126
+ size: r = "default",
127
+ ...i
128
+ }) {
129
+ return /* @__PURE__ */ e(d, { variant: t, size: r, asChild: !0, children: /* @__PURE__ */ e(
130
+ o.Action,
131
+ {
132
+ "data-slot": "alert-dialog-action",
133
+ className: l(a),
134
+ ...i
135
+ }
136
+ ) });
137
+ }
138
+ function N({
139
+ className: a,
140
+ variant: t = "tertiary",
141
+ size: r = "default",
142
+ ...i
143
+ }) {
144
+ return /* @__PURE__ */ e(d, { variant: t, size: r, asChild: !0, children: /* @__PURE__ */ e(
145
+ o.Cancel,
146
+ {
147
+ "data-slot": "alert-dialog-cancel",
148
+ className: l(a),
149
+ ...i
150
+ }
151
+ ) });
152
+ }
153
+ export {
154
+ x as AlertDialog,
155
+ w as AlertDialogAction,
156
+ N as AlertDialogCancel,
157
+ h as AlertDialogContent,
158
+ y as AlertDialogDescription,
159
+ A as AlertDialogFooter,
160
+ v as AlertDialogHeader,
161
+ g as AlertDialogOverlay,
162
+ n as AlertDialogPortal,
163
+ z as AlertDialogTitle,
164
+ D as AlertDialogTrigger
165
+ };
@@ -0,0 +1,218 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import { cva as N } from "class-variance-authority";
4
+ import g from "iconsax-reactjs/dist/esm/Warning2.js";
5
+ import _ from "iconsax-reactjs/dist/esm/InfoCircle.js";
6
+ import j from "iconsax-reactjs/dist/esm/TickCircle.js";
7
+ import E from "iconsax-reactjs/dist/esm/CloseCircle.js";
8
+ import { cn as n } from "../../lib/utils.js";
9
+ const p = N(
10
+ "relative w-full",
11
+ {
12
+ variants: {
13
+ variant: {
14
+ /** success — green border, green title, white bg */
15
+ success: [
16
+ "flex flex-col items-start overflow-clip rounded-lg",
17
+ "bg-[var(--Surface-Primary)]",
18
+ "shadow-[0_0_0_5px_rgba(31,204,132,0.2)]"
19
+ ].join(" "),
20
+ /** info — gray border, dark title, white bg */
21
+ info: [
22
+ "flex flex-col items-start overflow-clip rounded-lg",
23
+ "bg-[var(--Surface-Primary)]",
24
+ "shadow-[0_0_0_5px_rgba(216,216,219,0.3)]"
25
+ ].join(" "),
26
+ /** error — red border, red title, white bg */
27
+ error: [
28
+ "flex flex-col items-start overflow-clip rounded-lg",
29
+ "bg-[var(--Surface-Primary)]",
30
+ "shadow-[0_0_0_5px_rgba(236,0,0,0.15)]"
31
+ ].join(" "),
32
+ /** warning — orange/wood border, wood title, white bg */
33
+ warning: [
34
+ "flex flex-col items-start overflow-clip rounded-lg",
35
+ "bg-[var(--Surface-Primary)]",
36
+ "shadow-[0_0_0_5px_rgba(193,104,0,0.2)]"
37
+ ].join(" "),
38
+ /** inline-info — gray bg, no border, compact */
39
+ "inline-info": [
40
+ "flex gap-1 items-start rounded-sm",
41
+ "bg-[var(--Surface-Tertiary)]",
42
+ "px-3 py-2"
43
+ ].join(" "),
44
+ /** inline-caution — pink/red bg, no border, compact */
45
+ "inline-caution": [
46
+ "flex gap-1 items-start rounded-sm",
47
+ "bg-[var(--Surface-Caution-Light)]",
48
+ "px-3 py-2"
49
+ ].join(" "),
50
+ /** inline-warning — wood/yellow bg, no border, compact */
51
+ "inline-warning": [
52
+ "flex gap-1 items-start rounded-sm",
53
+ "bg-[var(--Surface-Warning)]",
54
+ "px-3 py-2"
55
+ ].join(" ")
56
+ }
57
+ },
58
+ defaultVariants: {
59
+ variant: "info"
60
+ }
61
+ }
62
+ ), y = N(
63
+ "flex w-full gap-2 items-start p-4 rounded-lg border",
64
+ {
65
+ variants: {
66
+ variant: {
67
+ success: "border-[var(--Focus-High-Emphasis)]",
68
+ info: "border-[var(--Border-Medium-Emphasis)]",
69
+ error: "border-[var(--Border-Caution)]",
70
+ warning: "border-[var(--Primitive-Wood-800)]",
71
+ "inline-info": "",
72
+ "inline-caution": "",
73
+ "inline-warning": ""
74
+ }
75
+ },
76
+ defaultVariants: {
77
+ variant: "info"
78
+ }
79
+ }
80
+ ), s = b.createContext("info"), V = (i) => i === "success" || i === "info" || i === "error" || i === "warning", M = (i) => i === "inline-info" || i === "inline-caution" || i === "inline-warning", S = {
81
+ success: { Icon: j, color: "text-[var(--Text-Success)]" },
82
+ info: { Icon: _, color: "text-[var(--Text-Medium-Emphasis)]" },
83
+ error: { Icon: E, color: "text-[var(--Text-Caution)]" },
84
+ warning: { Icon: g, color: "text-[var(--Text-Warning)]" }
85
+ }, W = {
86
+ "inline-info": { Icon: _, color: "text-[var(--Text-Medium-Emphasis)]" },
87
+ "inline-caution": { Icon: g, color: "text-[var(--Text-Caution)]" },
88
+ "inline-warning": { Icon: g, color: "text-[var(--Text-Warning)]" }
89
+ };
90
+ function L({
91
+ className: i,
92
+ variant: e = "info",
93
+ children: o,
94
+ title: t,
95
+ description: a,
96
+ icon: C,
97
+ action: l,
98
+ ...d
99
+ }) {
100
+ const m = V(e), T = M(e), w = (m || T) && !o && (t || a);
101
+ if (w && m) {
102
+ const { Icon: x, color: f } = S[e], u = h[e] ?? "", v = C ?? /* @__PURE__ */ r(x, { size: 24, className: n("shrink-0", f) });
103
+ return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ r(
104
+ "div",
105
+ {
106
+ "data-slot": "alert",
107
+ "data-variant": e,
108
+ role: "alert",
109
+ className: n(p({ variant: e }), i),
110
+ ...d,
111
+ children: /* @__PURE__ */ c("div", { className: y({ variant: e }), children: [
112
+ v,
113
+ /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
114
+ t && /* @__PURE__ */ r("div", { className: n("typo-label-md", u), children: t }),
115
+ a && /* @__PURE__ */ r("div", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)] mt-1", children: a })
116
+ ] }),
117
+ l && /* @__PURE__ */ r("div", { className: "shrink-0", children: l })
118
+ ] })
119
+ }
120
+ ) });
121
+ }
122
+ if (w && T) {
123
+ const { Icon: x, color: f } = W[e], u = h[e] ?? "", v = I[e] ?? "", P = C ?? /* @__PURE__ */ r(x, { size: 20, className: n("shrink-0", f) });
124
+ return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ c(
125
+ "div",
126
+ {
127
+ "data-slot": "alert",
128
+ "data-variant": e,
129
+ role: "alert",
130
+ className: n(p({ variant: e }), i),
131
+ ...d,
132
+ children: [
133
+ /* @__PURE__ */ r("div", { className: "flex items-center py-[2.5px] shrink-0", children: P }),
134
+ /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col", children: [
135
+ t && /* @__PURE__ */ r("div", { className: n("typo-label-md", u), children: t }),
136
+ a && /* @__PURE__ */ r(
137
+ "div",
138
+ {
139
+ className: n(
140
+ "typo-body-sm",
141
+ v || "text-[var(--Text-Medium-Emphasis)]"
142
+ ),
143
+ children: a
144
+ }
145
+ )
146
+ ] }),
147
+ l && /* @__PURE__ */ r("div", { className: "shrink-0", children: l })
148
+ ]
149
+ }
150
+ ) });
151
+ }
152
+ return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ r(
153
+ "div",
154
+ {
155
+ "data-slot": "alert",
156
+ "data-variant": e,
157
+ role: "alert",
158
+ className: n(p({ variant: e }), i),
159
+ ...d,
160
+ children: m ? /* @__PURE__ */ r("div", { className: y({ variant: e }), children: o }) : o
161
+ }
162
+ ) });
163
+ }
164
+ const h = {
165
+ success: "text-[var(--Primitive-Forest-800)]",
166
+ info: "text-[var(--Text-High-Emphasis)]",
167
+ error: "text-[var(--Text-Caution)]",
168
+ warning: "text-[var(--Text-Warning)]",
169
+ "inline-info": "text-[var(--Text-High-Emphasis)]",
170
+ "inline-caution": "text-[var(--Text-Caution)]",
171
+ "inline-warning": "text-[var(--Text-Warning)]"
172
+ };
173
+ function R({ className: i, ...e }) {
174
+ const o = b.useContext(s), t = h[o ?? "info"] ?? "";
175
+ return /* @__PURE__ */ r(
176
+ "div",
177
+ {
178
+ "data-slot": "alert-title",
179
+ className: n(
180
+ "typo-label-md",
181
+ t,
182
+ i
183
+ ),
184
+ ...e
185
+ }
186
+ );
187
+ }
188
+ const I = {
189
+ error: "text-[var(--Text-Caution)]",
190
+ "inline-caution": "text-[var(--Text-Caution)]",
191
+ "inline-warning": "text-[var(--Text-Warning)]"
192
+ };
193
+ function q({
194
+ className: i,
195
+ ...e
196
+ }) {
197
+ const o = b.useContext(s), t = I[o ?? ""] ?? "";
198
+ return /* @__PURE__ */ r(
199
+ "div",
200
+ {
201
+ "data-slot": "alert-description",
202
+ className: n(
203
+ "typo-body-sm",
204
+ t || "text-[var(--Text-Medium-Emphasis)]",
205
+ i
206
+ ),
207
+ ...e
208
+ }
209
+ );
210
+ }
211
+ export {
212
+ L as Alert,
213
+ q as AlertDescription,
214
+ R as AlertTitle,
215
+ I as alertDescriptionVariants,
216
+ h as alertTitleVariants,
217
+ p as alertVariants
218
+ };
@@ -0,0 +1,10 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { AspectRatio as a } from "radix-ui";
3
+ function p({
4
+ ...t
5
+ }) {
6
+ return /* @__PURE__ */ o(a.Root, { "data-slot": "aspect-ratio", ...t });
7
+ }
8
+ export {
9
+ p as AspectRatio
10
+ };
@@ -0,0 +1,58 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Avatar as r } from "radix-ui";
4
+ import { cn as o } from "../../lib/utils.js";
5
+ function n({
6
+ className: a,
7
+ size: t = "default",
8
+ ...l
9
+ }) {
10
+ return /* @__PURE__ */ e(
11
+ r.Root,
12
+ {
13
+ "data-slot": "avatar",
14
+ "data-size": t,
15
+ className: o(
16
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
17
+ a
18
+ ),
19
+ ...l
20
+ }
21
+ );
22
+ }
23
+ function m({
24
+ className: a,
25
+ ...t
26
+ }) {
27
+ return /* @__PURE__ */ e(
28
+ r.Image,
29
+ {
30
+ "data-slot": "avatar-image",
31
+ className: o("aspect-square size-full overflow-hidden rounded-full", a),
32
+ ...t
33
+ }
34
+ );
35
+ }
36
+ function f({
37
+ className: a,
38
+ ...t
39
+ }) {
40
+ return /* @__PURE__ */ e(
41
+ r.Fallback,
42
+ {
43
+ "data-slot": "avatar-fallback",
44
+ className: o(
45
+ // イニシャルは円径の 44% 前後を目安にする(小さすぎると字が円の中で泳ぐ)。
46
+ // sm=24px→10px(42%) / default=32px→14px(44%) / lg=40px→16px(40%)
47
+ "flex size-full items-center justify-center rounded-full bg-muted typo-body-md text-muted-foreground group-data-[size=sm]/avatar:typo-body-xs group-data-[size=lg]/avatar:typo-body-lg",
48
+ a
49
+ ),
50
+ ...t
51
+ }
52
+ );
53
+ }
54
+ export {
55
+ n as Avatar,
56
+ f as AvatarFallback,
57
+ m as AvatarImage
58
+ };
@@ -0,0 +1,54 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cva as o } from "class-variance-authority";
4
+ import { Slot as s } from "radix-ui";
5
+ import { cn as v } from "../../lib/utils.js";
6
+ const u = o(
7
+ "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 typo-label-sm whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ // ── 塗りつぶし(濃い背景 + 白文字) ──
12
+ default: "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] [a&]:hover:bg-[var(--Hover-Primary-Button)]",
13
+ destructive: "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] focus-visible:ring-destructive/20 [a&]:hover:bg-destructive/90",
14
+ success: "bg-[var(--Primitive-Forest-600)] text-[var(--Text-on-Inverse)] [a&]:hover:bg-[var(--Primitive-Forest-700)]",
15
+ // ── サブトル(薄い背景 + 色文字)— ステータス表示用 ──
16
+ "info-subtle": "bg-[var(--Primitive-Sea-100)] text-[var(--Primitive-Sea-700)]",
17
+ "success-subtle": "bg-[var(--Primitive-Forest-50)] text-[var(--Text-Success)]",
18
+ "accent-subtle": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
19
+ "caution-subtle": "bg-[var(--Surface-Caution-Light)] text-[var(--Text-Caution)]",
20
+ "warning-subtle": "bg-[var(--Surface-Warning)] text-[var(--Text-Warning)] border-[var(--Primitive-Wood-200)]",
21
+ "muted-subtle": "bg-[var(--Surface-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
22
+ // ── 構造系 ──
23
+ secondary: "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Tertiary)]",
24
+ outline: "border-[var(--Border-Medium-Emphasis)] text-[var(--Text-High-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
25
+ ghost: "text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
26
+ link: "text-[var(--Brand-Cake-Orange)] underline-offset-4 [a&]:hover:underline"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "default"
31
+ }
32
+ }
33
+ );
34
+ function m({
35
+ className: r,
36
+ variant: e = "default",
37
+ asChild: a = !1,
38
+ ...t
39
+ }) {
40
+ const i = a ? s.Root : "span";
41
+ return /* @__PURE__ */ n(
42
+ i,
43
+ {
44
+ "data-slot": "badge",
45
+ "data-variant": e,
46
+ className: v(u({ variant: e }), r),
47
+ ...t
48
+ }
49
+ );
50
+ }
51
+ export {
52
+ m as Badge,
53
+ u as badgeVariants
54
+ };
@@ -0,0 +1,104 @@
1
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
+ import "react";
3
+ import { MoreHorizontal as i, ChevronRight as l } from "lucide-react";
4
+ import { Slot as m } from "radix-ui";
5
+ import { cn as t } from "../../lib/utils.js";
6
+ function f({ ...r }) {
7
+ return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
8
+ }
9
+ function g({ className: r, ...e }) {
10
+ return /* @__PURE__ */ a(
11
+ "ol",
12
+ {
13
+ "data-slot": "breadcrumb-list",
14
+ className: t(
15
+ "flex flex-wrap items-center gap-1.5 typo-body-sm break-words text-muted-foreground sm:gap-2.5",
16
+ r
17
+ ),
18
+ ...e
19
+ }
20
+ );
21
+ }
22
+ function x({ className: r, ...e }) {
23
+ return /* @__PURE__ */ a(
24
+ "li",
25
+ {
26
+ "data-slot": "breadcrumb-item",
27
+ className: t("inline-flex items-center gap-1.5", r),
28
+ ...e
29
+ }
30
+ );
31
+ }
32
+ function h({
33
+ asChild: r,
34
+ className: e,
35
+ ...o
36
+ }) {
37
+ const s = r ? m.Root : "a";
38
+ return /* @__PURE__ */ a(
39
+ s,
40
+ {
41
+ "data-slot": "breadcrumb-link",
42
+ className: t("transition-colors hover:text-foreground", e),
43
+ ...o
44
+ }
45
+ );
46
+ }
47
+ function N({ className: r, ...e }) {
48
+ return /* @__PURE__ */ a(
49
+ "span",
50
+ {
51
+ "data-slot": "breadcrumb-page",
52
+ role: "link",
53
+ "aria-disabled": "true",
54
+ "aria-current": "page",
55
+ className: t("typo-body-sm text-foreground", r),
56
+ ...e
57
+ }
58
+ );
59
+ }
60
+ function B({
61
+ children: r,
62
+ className: e,
63
+ ...o
64
+ }) {
65
+ return /* @__PURE__ */ a(
66
+ "li",
67
+ {
68
+ "data-slot": "breadcrumb-separator",
69
+ role: "presentation",
70
+ "aria-hidden": "true",
71
+ className: t("[&>svg]:size-3.5", e),
72
+ ...o,
73
+ children: r ?? /* @__PURE__ */ a(l, {})
74
+ }
75
+ );
76
+ }
77
+ function y({
78
+ className: r,
79
+ ...e
80
+ }) {
81
+ return /* @__PURE__ */ n(
82
+ "span",
83
+ {
84
+ "data-slot": "breadcrumb-ellipsis",
85
+ role: "presentation",
86
+ "aria-hidden": "true",
87
+ className: t("flex size-9 shrink-0 items-center justify-center", r),
88
+ ...e,
89
+ children: [
90
+ /* @__PURE__ */ a(i, { className: "size-4" }),
91
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
92
+ ]
93
+ }
94
+ );
95
+ }
96
+ export {
97
+ f as Breadcrumb,
98
+ y as BreadcrumbEllipsis,
99
+ x as BreadcrumbItem,
100
+ h as BreadcrumbLink,
101
+ g as BreadcrumbList,
102
+ N as BreadcrumbPage,
103
+ B as BreadcrumbSeparator
104
+ };