@cakejp/design-system 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ---
13
13
 
14
+ ## [0.24.0] - 2026-11-06
15
+
16
+ ### ⚠️ Upgrade impact
17
+
18
+ - **light の成功色が緑からミントになる(視覚変更あり)**: `--Surface-Success` / `--Text-Success` は Forest-600(`#259D63`)から `--Primitive-Teal-800`(`#317860`)、`--Object-Success` は `--Primitive-Teal-700`(`#3E987A`)に変わる。これらのトークンを使っている箇所は、そのままでミントになる。`--Primitive-Forest-*` を成功表示に直接使っている自前のコードは追従しないので、`--Surface-Success-Light` / `--Border-Success` / `--Text-Success` に付け替える(手順は MIGRATION.md の「成功・良い状態の色をミントに」)
19
+ - dark の値は変わらない(Forest-600 のまま)。`--Surface-Success-Light` / `--Border-Success` は dark では従来の部品と同じ Forest-50 / Forest-200
20
+ - `--color-green-*`(Tailwind の `green-*`)と `--chart-5` は Forest のパレットのまま変えていない(`text-green-*` / `bg-green-*` を成功表示に使っている箇所はミントにならない)
21
+
22
+ ### 🎨 Changed
23
+
24
+ - **成功・良い状態の色をケーキ配色の「ミント」に合わせる(Cake.jp 本体 www-test-htdocs #22007)**: パレットの色は足さず、既存の意味トークンの値をパレットの Teal に差し替えた(`semantic.css`・`preset-standalone.css`・`tokens.json`)
25
+ - light: `--Text-Success` = Teal-800 `#317860`(白の上で 5.27:1。旧 3.45:1 は文字の基準 4.5:1 に届いていなかった)、`--Surface-Success`(白文字を載せる塗り)= Teal-800(白文字で 5.27:1)、`--Object-Success`(アイコン・ドット)= Teal-700 `#3E987A`(白の上で 3.51:1 ≥ 3:1)
26
+ - 意味トークンを 2 つ追加: `--Surface-Success-Light`(light = Teal-50 `#F0FCF8` / dark = Forest-50)、`--Border-Success`(light = Teal-200 `#ACEED8` / dark = Forest-200)。部品が `Primitive-Forest-50` / `Primitive-Forest-200` を直接参照していて、受け皿の意味トークンが無かったため
27
+ - 部品の付け替え: `Badge` success の塗りは `--Surface-Success`(hover のみ light は `--Primitive-Teal-900`、dark は `--Primitive-Forest-700` を直接参照)、`Badge` success-subtle と `Tag` success の淡い地は `--Surface-Success-Light`、成功トースト(`Sonner`)の地と枠は `--Surface-Success-Light` / `--Border-Success`、`Alert` success の見出しは `--Text-Success`(旧 Forest-800。dark でも Forest-800 → Forest-600 に変わる。コントラストは 3.25 → 5.04:1 に改善)、外枠は `--Object-Success`・外側の光彩は Teal-700 の rgba(dark は従来の緑のまま)
28
+ - 意味トークン経由のため自動でミントになる部品: DeliveryCalendar の「○」、StatCard の上昇、NotificationBadge の green、Alert・Sonner のアイコン
29
+ - stories の `Primitive-Forest-*` 直参照(StatCard のアイコン地、管理画面の成功通知、マイページの注文状態・変更可タグ・完了マーク)も同じトークンに付け替え
30
+ - コントラスト検査: `Text-Success` × `Surface-Success-Light`(light 5.01:1)、`Text-Success` × `Surface-Secondary`(ベージュ。light 5.01:1)、白文字 × `Surface-Success`(light 5.27:1)の組を追加。`Text-Success` × 白の light 例外(#308・3.44:1)と、Badge success-subtle の light 例外(3.06:1)は基準を満たしたので削除。dark は色を変えていないため、Badge success-subtle の文字(3.06:1)と白文字 × `Surface-Success`(3.45:1)が #335 の期限付き例外として残る
31
+
32
+ ---
33
+
14
34
  ## [0.23.0] - 2026-11-06
15
35
 
16
36
  KSK(姉妹 DS)の 2026-10-14〜11-02 の改善を取り込み(見た目の既定値は変えない範囲。見た目が変わる候補は #335 で判断待ち)。
package/CLAUDE.md CHANGED
@@ -107,7 +107,7 @@ PdM や社長が AI(Claude 等)で HTML モックを作る際、このパッ
107
107
  | 浮遊レイヤーの地(メニュー・ポップオーバー・ダイアログ・シート) | `var(--Surface-Elevated)` |
108
108
  | 情報をまとめる押せない面(説明ボックス・フォームのまとまり・表の見出し行。light はベージュ) | `var(--Surface-Secondary)` / `var(--Surface-Tertiary)` |
109
109
  | 押せる部品・hover / 選択 / 無効の地・溝・画像の仮の地・画面全体の地(グレー) | `var(--Surface-Neutral-Secondary)` / `var(--Surface-Neutral-Tertiary)` |
110
- | 成功 | `var(--color-green-500)` |
110
+ | 成功(良い状態・タグ。light はミント) | 文字 `var(--Text-Success)` / 淡い地 `var(--Surface-Success-Light)` / 枠 `var(--Border-Success)` |
111
111
 
112
112
  詳細は `tokens.json` を参照。高コントラスト(OS の「コントラストを上げる」か、`<html data-contrast="more">`。`#root` など Portal の外側の要素に付けると body 直下に描かれる Dialog / Popover / 選択肢の一覧には効かない)のときの枠・溝・フォーカスリングは DS が自動で切り替えるので、`--Border-Control` 等を自分で宣言・上書きしない。
113
113
 
package/MIGRATION.md CHANGED
@@ -7,7 +7,43 @@
7
7
 
8
8
  ---
9
9
 
10
- ## 次期リリース — 面の色をベージュに(`--Surface-Neutral-*` の追加)
10
+ ## 0.24.0 — 成功・良い状態の色をミントに(`--Surface-Success-Light` / `--Border-Success` の追加)
11
+
12
+ ### 概要
13
+
14
+ light の成功色を、緑(Forest)から Cake.jp 本体の「ミント」(Teal)に変えました。
15
+
16
+ | 役割 | トークン | light | dark |
17
+ |---|---|---|---|
18
+ | 成功の文字 | `--Text-Success` | Teal-800 `#317860` | Forest-600(変更なし) |
19
+ | 白文字を載せる塗り | `--Surface-Success` | Teal-800 `#317860` | Forest-600(変更なし) |
20
+ | アイコン・ドット | `--Object-Success` | Teal-700 `#3E987A` | Forest-600(変更なし) |
21
+ | 淡い地(新規) | `--Surface-Success-Light` | Teal-50 `#F0FCF8` | Forest-50 |
22
+ | 枠(新規) | `--Border-Success` | Teal-200 `#ACEED8` | Forest-200 |
23
+
24
+ DS の部品は付け替え済みなので、DS の部品だけで組んだ画面は対応不要です。ミントは「空きあり」などの良い状態・成功・タグ用で、押すもの(CTA)には使いません。
25
+
26
+ ### 各サイトでやること
27
+
28
+ 自前のコードで `--Primitive-Forest-*`(`bg-[var(--Primitive-Forest-50)]` など)を成功表示に直接使っている箇所は、DS に追従しないので付け替えます。
29
+
30
+ - 淡い地(`Forest-50` / `Forest-100`)→ `--Surface-Success-Light`
31
+ - 枠(`Forest-200`)→ `--Border-Success`
32
+ - 文字(`Forest-600` / `Forest-700` / `Forest-800`)→ `--Text-Success`
33
+ - アイコン・ドット(`Forest-500` / `Forest-600`)→ `--Object-Success`
34
+ - 白文字を載せる塗り(`Forest-600`)→ `--Surface-Success`
35
+
36
+ ```bash
37
+ # 付け替え候補を洗い出す
38
+ grep -rnE "Primitive-Forest-" src
39
+ ```
40
+
41
+ - Tailwind の `green-*`(`text-green-600` など)は Forest のパレットのままなので、成功表示に使っているものは上のトークンに付け替える
42
+ - グラフの系列色など、成功の意味でない緑はそのままでよい
43
+
44
+ ---
45
+
46
+ ## 0.23.0 — 面の色をベージュに(`--Surface-Neutral-*` の追加)
11
47
 
12
48
  ### 概要
13
49
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Component Contracts",
4
- "version": "0.23.0",
4
+ "version": "0.24.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "kind": "kind:\"shell\" は複数ページで再利用されるレイアウト枠(AdminShell / WorkspaceShell / MypageShell 等)。無印は部品コンポーネント。固有ページを組むときは該当 shell から始める。src/components/pages/ 配下のストーリーは特定ページ専用・非配布のため contracts の対象外。",
7
7
  "naming": "コンポーネント名は**用途ではなく機能**で付ける。用途名(QuantitySelector = カート数量)にすると、同じ機能を別の文脈で探した人が見つけられず二重実装が生まれる(実例: 用途名だったため NumberInput が別途作られ、意匠の違うステッパーが 2 つになった)。「〜Selector」「〜Picker」等の用途接尾辞を付ける前に、その部品が何をするものかで名前が付けられないかを先に検討する。既存名を機能名へ変える場合は deprecatedAliases に旧名を残す。",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Composition Contracts",
4
- "version": "0.23.0",
4
+ "version": "0.24.0",
5
5
  "description": "ページ骨格・視覚階層・余白リズムの機械可読な正本。画面パターンを選んだ後の「実際の組み方」を規定する。ページの外枠(モバイル/デスクトップ/管理)、商品グリッドの列数、余白の4段リズム、Surface のネスト階層、テキスト階層、CTA の優先順位を構造化する。人間向けの解説は guidelines/composition/layout.md・guidelines/composition/hierarchy.md・guidelines/overview.md。",
6
6
  "source": "guidelines/composition/layout.md, guidelines/composition/hierarchy.md, guidelines/overview.md, guidelines/components/button.md(CTA 密度ルール)を正本化",
7
7
  "roleSeparation": "screen-patterns.json はページ種別(Standard Page / Focused Workspace / ResponsiveDialog / Dialog)を選ぶための契約。composition.json は選んだ後、その骨格をどう組むか(外枠構造・余白リズム・階層)の契約。前者=何を使うか、後者=どう並べるか。",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Rules Contracts",
4
- "version": "0.23.0",
4
+ "version": "0.24.0",
5
5
  "description": "禁止パターン・アクセシビリティ要件・ライティングルールの構造化定義。lint-scratch.sh と check-drift.sh で自動検証。"
6
6
  },
7
7
  "prohibited": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Screen Patterns Contracts",
4
- "version": "0.23.0",
4
+ "version": "0.24.0",
5
5
  "description": "CRUD 機能でどの画面パターンを使うかの機械可読な判断基準。5パターンの定義・CRUD 対応・決定木・編集UIの観点比較を構造化する。人間向けの解説は guidelines/foundations/screen-patterns.md。",
6
6
  "source": "GitHub issue #37 CRUDの画面設計の型化と基本パターンの整備",
7
7
  "relatedContract": "本契約はページ種別の選択(何を使うか)を担う。選んだ後の骨格の組み方(外枠構造・余白リズム・視覚階層)は contracts/composition.json を参照する。",
@@ -1,22 +1,22 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as c } from "react/jsx-runtime";
2
+ import { jsx as n, jsxs as c } from "react/jsx-runtime";
3
3
  import * as w from "react";
4
- import { cva as _ } from "class-variance-authority";
4
+ import { cva as N } from "class-variance-authority";
5
5
  import h from "iconsax-reactjs/dist/esm/Warning2.js";
6
6
  import I from "iconsax-reactjs/dist/esm/InfoCircle.js";
7
- import M from "iconsax-reactjs/dist/esm/TickCircle.js";
8
- import S from "iconsax-reactjs/dist/esm/CloseCircle.js";
7
+ import V from "iconsax-reactjs/dist/esm/TickCircle.js";
8
+ import k from "iconsax-reactjs/dist/esm/CloseCircle.js";
9
9
  import { cn as t } from "../../lib/utils.js";
10
- const p = _(
10
+ const p = N(
11
11
  "relative w-full",
12
12
  {
13
13
  variants: {
14
14
  variant: {
15
- /** success — green border, green title, white bg */
15
+ /** success — mint border, mint title, white bg(dark は従来の緑の枠) */
16
16
  success: [
17
17
  "flex flex-col items-start overflow-clip rounded-lg",
18
18
  "bg-[var(--Surface-Primary)]",
19
- "shadow-[0_0_0_5px_rgba(31,204,132,0.2)]"
19
+ "shadow-[0_0_0_5px_rgba(62,152,122,0.2)] dark:shadow-[0_0_0_5px_rgba(31,204,132,0.2)]"
20
20
  ].join(" "),
21
21
  /** info — gray border, dark title, white bg */
22
22
  info: [
@@ -60,12 +60,12 @@ const p = _(
60
60
  variant: "info"
61
61
  }
62
62
  }
63
- ), N = _(
63
+ ), y = N(
64
64
  "flex w-full gap-2 items-start p-4 rounded-lg border",
65
65
  {
66
66
  variants: {
67
67
  variant: {
68
- success: "border-[var(--Focus-High-Emphasis)]",
68
+ success: "border-[var(--Object-Success)] dark:border-[var(--Focus-High-Emphasis)]",
69
69
  info: "border-[var(--Border-Medium-Emphasis)]",
70
70
  error: "border-[var(--Border-Caution)]",
71
71
  warning: "border-[var(--Primitive-Wood-800)]",
@@ -78,10 +78,10 @@ const p = _(
78
78
  variant: "info"
79
79
  }
80
80
  }
81
- ), s = w.createContext("info"), W = (r) => r === "success" || r === "info" || r === "error" || r === "warning", k = (r) => r === "inline-info" || r === "inline-caution" || r === "inline-warning", A = {
82
- success: { Icon: M, color: "text-[var(--Text-Success)]" },
81
+ ), s = w.createContext("info"), M = (r) => r === "success" || r === "info" || r === "error" || r === "warning", W = (r) => r === "inline-info" || r === "inline-caution" || r === "inline-warning", A = {
82
+ success: { Icon: V, color: "text-[var(--Text-Success)]" },
83
83
  info: { Icon: I, color: "text-[var(--Text-Medium-Emphasis)]" },
84
- error: { Icon: S, color: "text-[var(--Text-Caution)]" },
84
+ error: { Icon: k, color: "text-[var(--Text-Caution)]" },
85
85
  warning: { Icon: h, color: "text-[var(--Text-Warning)]" }
86
86
  }, B = {
87
87
  "inline-info": { Icon: I, color: "text-[var(--Text-Medium-Emphasis)]" },
@@ -89,58 +89,58 @@ const p = _(
89
89
  "inline-warning": { Icon: h, color: "text-[var(--Text-Warning)]" }
90
90
  }, H = (r) => r === "error" || r === "warning" || r === "inline-caution" || r === "inline-warning" ? "alert" : "status", R = (r, e, o) => {
91
91
  if (o !== void 0) return o;
92
- const n = e ?? H(r);
93
- return n === "off" ? void 0 : n;
92
+ const i = e ?? H(r);
93
+ return i === "off" ? void 0 : i;
94
94
  };
95
- function K({
95
+ function J({
96
96
  className: r,
97
97
  variant: e = "info",
98
98
  children: o,
99
- title: n,
99
+ title: i,
100
100
  description: a,
101
- icon: C,
101
+ icon: T,
102
102
  action: l,
103
- live: j,
103
+ live: S,
104
104
  role: E,
105
105
  ...d
106
106
  }) {
107
- const m = R(e, j, E), x = W(e), T = k(e), y = (x || T) && !o && (n || a);
108
- if (y && x) {
109
- const { Icon: f, color: u } = A[e], v = b[e] ?? "", g = C ?? /* @__PURE__ */ i(f, { size: 24, className: t("shrink-0", u) });
110
- return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ i(
107
+ const x = R(e, S, E), m = M(e), C = W(e), _ = (m || C) && !o && (i || a);
108
+ if (_ && m) {
109
+ const { Icon: u, color: f } = A[e], v = b[e] ?? "", g = T ?? /* @__PURE__ */ n(u, { size: 24, className: t("shrink-0", f) });
110
+ return /* @__PURE__ */ n(s.Provider, { value: e, children: /* @__PURE__ */ n(
111
111
  "div",
112
112
  {
113
113
  "data-slot": "alert",
114
114
  "data-variant": e,
115
- role: m,
115
+ role: x,
116
116
  className: t(p({ variant: e }), r),
117
117
  ...d,
118
- children: /* @__PURE__ */ c("div", { className: N({ variant: e }), children: [
118
+ children: /* @__PURE__ */ c("div", { className: y({ variant: e }), children: [
119
119
  g,
120
120
  /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
121
- n && /* @__PURE__ */ i("div", { className: t("typo-label-md", v), children: n }),
122
- a && /* @__PURE__ */ i("div", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)] mt-1", children: a })
121
+ i && /* @__PURE__ */ n("div", { className: t("typo-label-md", v), children: i }),
122
+ a && /* @__PURE__ */ n("div", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)] mt-1", children: a })
123
123
  ] }),
124
- l && /* @__PURE__ */ i("div", { className: "shrink-0", children: l })
124
+ l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
125
125
  ] })
126
126
  }
127
127
  ) });
128
128
  }
129
- if (y && T) {
130
- const { Icon: f, color: u } = B[e], v = b[e] ?? "", g = P[e] ?? "", V = C ?? /* @__PURE__ */ i(f, { size: 20, className: t("shrink-0", u) });
131
- return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ c(
129
+ if (_ && C) {
130
+ const { Icon: u, color: f } = B[e], v = b[e] ?? "", g = j[e] ?? "", P = T ?? /* @__PURE__ */ n(u, { size: 20, className: t("shrink-0", f) });
131
+ return /* @__PURE__ */ n(s.Provider, { value: e, children: /* @__PURE__ */ c(
132
132
  "div",
133
133
  {
134
134
  "data-slot": "alert",
135
135
  "data-variant": e,
136
- role: m,
136
+ role: x,
137
137
  className: t(p({ variant: e }), r),
138
138
  ...d,
139
139
  children: [
140
- /* @__PURE__ */ i("div", { className: "flex items-center py-[2.5px] shrink-0", children: V }),
140
+ /* @__PURE__ */ n("div", { className: "flex items-center py-[2.5px] shrink-0", children: P }),
141
141
  /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col", children: [
142
- n && /* @__PURE__ */ i("div", { className: t("typo-label-md", v), children: n }),
143
- a && /* @__PURE__ */ i(
142
+ i && /* @__PURE__ */ n("div", { className: t("typo-label-md", v), children: i }),
143
+ a && /* @__PURE__ */ n(
144
144
  "div",
145
145
  {
146
146
  className: t(
@@ -151,25 +151,25 @@ function K({
151
151
  }
152
152
  )
153
153
  ] }),
154
- l && /* @__PURE__ */ i("div", { className: "shrink-0", children: l })
154
+ l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
155
155
  ]
156
156
  }
157
157
  ) });
158
158
  }
159
- return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ i(
159
+ return /* @__PURE__ */ n(s.Provider, { value: e, children: /* @__PURE__ */ n(
160
160
  "div",
161
161
  {
162
162
  "data-slot": "alert",
163
163
  "data-variant": e,
164
- role: m,
164
+ role: x,
165
165
  className: t(p({ variant: e }), r),
166
166
  ...d,
167
- children: x ? /* @__PURE__ */ i("div", { className: N({ variant: e }), children: o }) : o
167
+ children: m ? /* @__PURE__ */ n("div", { className: y({ variant: e }), children: o }) : o
168
168
  }
169
169
  ) });
170
170
  }
171
171
  const b = {
172
- success: "text-[var(--Primitive-Forest-800)]",
172
+ success: "text-[var(--Text-Success)]",
173
173
  info: "text-[var(--Text-High-Emphasis)]",
174
174
  error: "text-[var(--Text-Caution)]",
175
175
  warning: "text-[var(--Text-Warning)]",
@@ -177,22 +177,22 @@ const b = {
177
177
  "inline-caution": "text-[var(--Text-Caution)]",
178
178
  "inline-warning": "text-[var(--Text-Warning)]"
179
179
  };
180
- function O({ className: r, ...e }) {
181
- const o = w.useContext(s), n = b[o ?? "info"] ?? "";
182
- return /* @__PURE__ */ i(
180
+ function K({ className: r, ...e }) {
181
+ const o = w.useContext(s), i = b[o ?? "info"] ?? "";
182
+ return /* @__PURE__ */ n(
183
183
  "div",
184
184
  {
185
185
  "data-slot": "alert-title",
186
186
  className: t(
187
187
  "typo-label-md",
188
- n,
188
+ i,
189
189
  r
190
190
  ),
191
191
  ...e
192
192
  }
193
193
  );
194
194
  }
195
- const P = {
195
+ const j = {
196
196
  error: "text-[var(--Text-Caution)]",
197
197
  "inline-caution": "text-[var(--Text-Caution)]",
198
198
  "inline-warning": "text-[var(--Text-Warning)]"
@@ -201,14 +201,14 @@ function Q({
201
201
  className: r,
202
202
  ...e
203
203
  }) {
204
- const o = w.useContext(s), n = P[o ?? ""] ?? "";
205
- return /* @__PURE__ */ i(
204
+ const o = w.useContext(s), i = j[o ?? ""] ?? "";
205
+ return /* @__PURE__ */ n(
206
206
  "div",
207
207
  {
208
208
  "data-slot": "alert-description",
209
209
  className: t(
210
210
  "typo-body-sm",
211
- n || "text-[var(--Text-Medium-Emphasis)]",
211
+ i || "text-[var(--Text-Medium-Emphasis)]",
212
212
  r
213
213
  ),
214
214
  ...e
@@ -216,10 +216,10 @@ function Q({
216
216
  );
217
217
  }
218
218
  export {
219
- K as Alert,
219
+ J as Alert,
220
220
  Q as AlertDescription,
221
- O as AlertTitle,
222
- P as alertDescriptionVariants,
221
+ K as AlertTitle,
222
+ j as alertDescriptionVariants,
223
223
  b as alertTitleVariants,
224
224
  p as alertVariants
225
225
  };
@@ -11,10 +11,10 @@ const u = o(
11
11
  // ── 塗りつぶし(濃い背景 + 白文字) ──
12
12
  default: "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] [a&]:hover:bg-[var(--Hover-Primary-Button)]",
13
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)]",
14
+ success: "bg-[var(--Surface-Success)] text-[var(--Text-on-Inverse)] [a&]:hover:bg-[var(--Primitive-Teal-900)] dark:[a&]:hover:bg-[var(--Primitive-Forest-700)]",
15
15
  // ── サブトル(薄い背景 + 色文字)— ステータス表示用 ──
16
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)]",
17
+ "success-subtle": "bg-[var(--Surface-Success-Light)] text-[var(--Text-Success)]",
18
18
  "accent-subtle": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
19
19
  "caution-subtle": "bg-[var(--Surface-Caution-Light)] text-[var(--Text-Caution)]",
20
20
  "warning-subtle": "bg-[var(--Surface-Warning)] text-[var(--Text-Warning)] border-[var(--Primitive-Wood-200)]",
@@ -31,7 +31,7 @@ const u = o(
31
31
  }
32
32
  }
33
33
  );
34
- function m({
34
+ function f({
35
35
  className: e,
36
36
  variant: r = "default",
37
37
  asChild: a = !1,
@@ -49,6 +49,6 @@ function m({
49
49
  );
50
50
  }
51
51
  export {
52
- m as Badge,
52
+ f as Badge,
53
53
  u as badgeVariants
54
54
  };
@@ -1,22 +1,22 @@
1
1
  "use client";
2
- import { jsx as r } from "react/jsx-runtime";
2
+ import { jsx as a } from "react/jsx-runtime";
3
3
  import { Loader2Icon as t, OctagonXIcon as i, TriangleAlertIcon as o, InfoIcon as s, CircleCheckIcon as n } from "lucide-react";
4
- import { useTheme as v } from "next-themes";
5
- import { toast as c, Toaster as m } from "sonner";
6
- const g = ({ ...a }) => {
7
- const { theme: e = "system" } = v();
8
- return /* @__PURE__ */ r(
4
+ import { useTheme as c } from "next-themes";
5
+ import { toast as v, Toaster as m } from "sonner";
6
+ const g = ({ ...r }) => {
7
+ const { theme: e = "system" } = c();
8
+ return /* @__PURE__ */ a(
9
9
  m,
10
10
  {
11
11
  theme: e,
12
12
  className: "toaster group",
13
13
  icons: {
14
- success: /* @__PURE__ */ r(n, { className: "size-4 text-[var(--Text-Success)]" }),
15
- info: /* @__PURE__ */ r(s, { className: "size-4 text-[var(--Primitive-Sea-600)]" }),
16
- warning: /* @__PURE__ */ r(o, { className: "size-4 text-[var(--Text-Warning)]" }),
17
- error: /* @__PURE__ */ r(i, { className: "size-4 text-[var(--Primitive-Sun-800)]" }),
14
+ success: /* @__PURE__ */ a(n, { className: "size-4 text-[var(--Text-Success)]" }),
15
+ info: /* @__PURE__ */ a(s, { className: "size-4 text-[var(--Primitive-Sea-600)]" }),
16
+ warning: /* @__PURE__ */ a(o, { className: "size-4 text-[var(--Text-Warning)]" }),
17
+ error: /* @__PURE__ */ a(i, { className: "size-4 text-[var(--Primitive-Sun-800)]" }),
18
18
  // 動きを減らす設定では回転を止める(--Motion-* の一括制御は animate-spin に効かない)
19
- loading: /* @__PURE__ */ r(t, { className: "size-4 animate-spin motion-reduce:animate-none text-[var(--Text-Medium-Emphasis)]" })
19
+ loading: /* @__PURE__ */ a(t, { className: "size-4 animate-spin motion-reduce:animate-none text-[var(--Text-Medium-Emphasis)]" })
20
20
  },
21
21
  toastOptions: {
22
22
  classNames: {
@@ -28,7 +28,7 @@ const g = ({ ...a }) => {
28
28
  // 中の description / cancel もモード反転しない primitive に固定する。
29
29
  // semantic(Text-Medium-Emphasis 等)のままだとダークモードで白系に反転し、
30
30
  // 明色背景の上で文字が不可視になる(デフォルトトーストは背景が反転するので semantic のままで正しい)
31
- success: "!bg-[var(--Primitive-Forest-50)] !border-[var(--Primitive-Forest-200)] !text-[var(--Text-Success)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
31
+ success: "!bg-[var(--Surface-Success-Light)] !border-[var(--Border-Success)] !text-[var(--Text-Success)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
32
32
  error: "!bg-[var(--Surface-Caution-Light)] !border-[var(--Border-Caution)] !text-[var(--Primitive-Sun-800)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
33
33
  warning: "!bg-[var(--Surface-Warning)] !border-[var(--Primitive-Wood-200)] !text-[var(--Text-Warning)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
34
34
  info: "!bg-[var(--Primitive-Sea-50)] !border-[var(--Primitive-Sea-200)] !text-[var(--Primitive-Sea-600)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]"
@@ -42,10 +42,10 @@ const g = ({ ...a }) => {
42
42
  },
43
43
  position: "bottom-center",
44
44
  containerAriaLabel: "通知",
45
- ...a
45
+ ...r
46
46
  }
47
47
  );
48
- }, p = c;
48
+ }, p = v;
49
49
  export {
50
50
  g as Toaster,
51
51
  p as toast
@@ -1,8 +1,8 @@
1
1
  import { jsxs as n } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cva as o } from "class-variance-authority";
4
- import { cn as s } from "../../lib/utils.js";
5
- const x = o(
3
+ import { cva as s } from "class-variance-authority";
4
+ import { cn as o } from "../../lib/utils.js";
5
+ const x = s(
6
6
  "inline-flex items-center gap-1 rounded text-nowrap",
7
7
  {
8
8
  variants: {
@@ -15,7 +15,7 @@ const x = o(
15
15
  warning: "bg-[var(--Primitive-Wood-100)] text-[var(--Text-Warning)]",
16
16
  info: "bg-[var(--Primitive-Sea-50)] text-[var(--Primitive-Sea-600)] dark:bg-[var(--Primitive-Sea-600)] dark:text-[var(--Primitive-White-alpha-1000)]",
17
17
  "info-fill": "bg-[var(--Primitive-Sea-600)] text-[var(--Text-on-Inverse)]",
18
- success: "bg-[var(--Primitive-Forest-50)] text-[var(--Text-Success)]",
18
+ success: "bg-[var(--Surface-Success-Light)] text-[var(--Text-Success)]",
19
19
  accent: "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
20
20
  timesale: "bg-[var(--Primitive-Wood-400)] text-[var(--Text-on-Inverse)]",
21
21
  berry: "bg-[var(--Primitive-Berry-700)] text-[var(--Text-on-Inverse)]",
@@ -44,7 +44,7 @@ function d({
44
44
  "span",
45
45
  {
46
46
  "data-slot": "tag",
47
- className: s(x({ variant: r, size: t }), a),
47
+ className: o(x({ variant: r, size: t }), a),
48
48
  ...v,
49
49
  children: [
50
50
  e,