ksk-design-system 1.57.0 → 1.58.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/AGENTS.md +4 -0
- package/CLAUDE.md +4 -0
- package/DESIGN.md +42 -0
- package/bin/lint.js +58 -3
- package/bin/product-theme-override.js +52 -0
- package/contracts/components.json +1 -1
- package/contracts/product-theme-overrides.json +171 -0
- package/contracts/rules.json +14 -2
- package/contracts/token-hex-cache.json +1 -1
- package/dist/class-names.js +1 -1
- package/dist/index.js +13 -13
- package/dist/{server-variants-usol4GK5.js → server-variants-B3uIQjUG.js} +24 -24
- package/dist/types/components/ui/select.d.ts +3 -0
- package/dist/types/lib/server-variants/button-variants.d.ts +7 -0
- package/package.json +1 -1
- package/src/preset.css +3 -0
- package/src/styles/product-theme.css +90 -0
- package/src/styles/source-safelist.css +30 -2
package/AGENTS.md
CHANGED
|
@@ -38,6 +38,7 @@ UI を書く前に必ず確認すること:
|
|
|
38
38
|
- [ ] CSS でベンダープレフィックス併記する場合、**`-webkit-` を先・標準形を後**に書いたか(消費側の minifier が同一プロパティとして dedupe し後勝ちのみ残すため。逆順だと Firefox で静かに無効化。`node scripts/check-prefix-order.mjs` が CI で検出)
|
|
39
39
|
- [ ] flex 行(flex-col でない flex)で shrink-0 の兄弟と可変テキストを並べるとき、テキスト側に `flex-1`(+ 必要なら `min-w-[...]` 下限)を付けたか(`min-w-0` だけだと 1 文字ずつ折り返すまで潰れる。issue #293。`node scripts/check-flex-shrink.mjs` が CI で検出、例外は `ksk-lint-ignore KFX001 -- 理由`)
|
|
40
40
|
- [ ] クラス名は**完全な文字列**で書いたか(`` `bg-${color}` `` のような動的合成は静的抽出できず消費側で CSS が生成されない。分岐は三項演算子か cva variant で。`scripts/generate-source-safelist.mjs` が検出)
|
|
41
|
+
- [ ] コントロールの寸法(高さ・横 padding・角丸・カード余白)を書くとき、固定の `h-10` / `px-4` / `p-6` ではなく product theme の公開変数(`h-[var(--Control-Height-Md)]` / `p-[var(--Product-Card-Padding)]`)を参照したか(issue #364。許可リストは `contracts/product-theme-overrides.json`。Button 系は `--Control-*`、Input/Textarea/SelectTrigger は `--Field-*` とスケールが別)
|
|
41
42
|
- [ ] `.tsx` 編集後に `bash scripts/lint-scratch.sh`、コンポーネント増減時は `npm run check` を実行したか
|
|
42
43
|
- [ ] `FormField` を import する前にどちらか確認したか(react-hook-form の Controller と統合するなら `RhfFormField`=`ui/form` の `FormField` を index.ts で別名 export したもの。単純な label+error 表示は `patterns/form-field` の `FormField`。迷ったら後者)
|
|
43
44
|
|
|
@@ -77,6 +78,7 @@ tokens.json # カラー・スペーシング・シ
|
|
|
77
78
|
contracts/token-hex-cache.json # semantic トークンのデフォルトテーマ解決済み hex(テーマ依存キーは meta.themeDependentKeys 参照・自動生成)
|
|
78
79
|
src/components/COMPONENT_LOOKUP.md # バリアント・インポートパス一覧(自動生成)
|
|
79
80
|
contracts/screen-patterns.json # 画面実装前にどのシェル/パターンを使うかの decisionTree・crudMatrix
|
|
81
|
+
contracts/product-theme-overrides.json # プロダクト単位で上書きしてよい CSS 変数の許可リスト(寸法・面)
|
|
80
82
|
contracts/composition.json # 選んだパターン内部の並べ方(骨格構造・余白リズム・カード階層・テキスト階層・CTA優先度)
|
|
81
83
|
```
|
|
82
84
|
|
|
@@ -221,6 +223,7 @@ Brand色を差し替え(10行)→ Primitive Layer → Semantic Layer → Bri
|
|
|
221
223
|
| **DESIGN.md** | AI エージェント向け視覚言語サマリ(トークン+意図・voice・motion) |
|
|
222
224
|
| **contracts/screen-patterns.json** | 画面実装前にどのシェル/パターンを使うかを決める decisionTree・crudMatrix |
|
|
223
225
|
| **contracts/deprecations.json** | 非推奨 API の正本台帳(移行先・削除予定。MIGRATION.md の一覧節と check-migration CLI の入力) |
|
|
226
|
+
| **contracts/product-theme-overrides.json** | プロダクト単位で上書きしてよい CSS 変数の許可リスト(寸法・面。既定値は src/styles/product-theme.css・lint は P049) |
|
|
224
227
|
| **contracts/composition.json** | 選んだパターン内部の並べ方(骨格構造・余白リズム・カード階層・テキスト階層・CTA優先度) |
|
|
225
228
|
|
|
226
229
|
---
|
|
@@ -242,6 +245,7 @@ src/
|
|
|
242
245
|
│ ├── semantic.css # Layer 2: 用途別トークン
|
|
243
246
|
│ ├── typography.css # typo-* ユーティリティ
|
|
244
247
|
│ ├── motion.css # duration / easing トークン(--Motion-*)
|
|
248
|
+
│ ├── product-theme.css # プロダクト単位で上書きしてよい寸法・面の公開変数(issue #364)
|
|
245
249
|
│ └── source-safelist.css # @source safelist(自動生成・手で編集しない / issue #258)
|
|
246
250
|
├── themes/ # default / orange / green / violet / blue
|
|
247
251
|
├── preset.css # 外部プロジェクト向けプリセット
|
package/CLAUDE.md
CHANGED
|
@@ -38,6 +38,7 @@ UI を書く前に必ず確認すること:
|
|
|
38
38
|
- [ ] CSS でベンダープレフィックス併記する場合、**`-webkit-` を先・標準形を後**に書いたか(消費側の minifier が同一プロパティとして dedupe し後勝ちのみ残すため。逆順だと Firefox で静かに無効化。`node scripts/check-prefix-order.mjs` が CI で検出)
|
|
39
39
|
- [ ] flex 行(flex-col でない flex)で shrink-0 の兄弟と可変テキストを並べるとき、テキスト側に `flex-1`(+ 必要なら `min-w-[...]` 下限)を付けたか(`min-w-0` だけだと 1 文字ずつ折り返すまで潰れる。issue #293。`node scripts/check-flex-shrink.mjs` が CI で検出、例外は `ksk-lint-ignore KFX001 -- 理由`)
|
|
40
40
|
- [ ] クラス名は**完全な文字列**で書いたか(`` `bg-${color}` `` のような動的合成は静的抽出できず消費側で CSS が生成されない。分岐は三項演算子か cva variant で。`scripts/generate-source-safelist.mjs` が検出)
|
|
41
|
+
- [ ] コントロールの寸法(高さ・横 padding・角丸・カード余白)を書くとき、固定の `h-10` / `px-4` / `p-6` ではなく product theme の公開変数(`h-[var(--Control-Height-Md)]` / `p-[var(--Product-Card-Padding)]`)を参照したか(issue #364。許可リストは `contracts/product-theme-overrides.json`。Button 系は `--Control-*`、Input/Textarea/SelectTrigger は `--Field-*` とスケールが別)
|
|
41
42
|
- [ ] `.tsx` 編集後に `bash scripts/lint-scratch.sh`、コンポーネント増減時は `npm run check` を実行したか
|
|
42
43
|
- [ ] `FormField` を import する前にどちらか確認したか(react-hook-form の Controller と統合するなら `RhfFormField`=`ui/form` の `FormField` を index.ts で別名 export したもの。単純な label+error 表示は `patterns/form-field` の `FormField`。迷ったら後者)
|
|
43
44
|
|
|
@@ -67,6 +68,7 @@ tokens.json # カラー・スペーシング・シ
|
|
|
67
68
|
contracts/token-hex-cache.json # semantic トークンのデフォルトテーマ解決済み hex(テーマ依存キーは meta.themeDependentKeys 参照・自動生成)
|
|
68
69
|
src/components/COMPONENT_LOOKUP.md # バリアント・インポートパス一覧(自動生成)
|
|
69
70
|
contracts/screen-patterns.json # 画面実装前にどのシェル/パターンを使うかの decisionTree・crudMatrix
|
|
71
|
+
contracts/product-theme-overrides.json # プロダクト単位で上書きしてよい CSS 変数の許可リスト(寸法・面)
|
|
70
72
|
contracts/composition.json # 選んだパターン内部の並べ方(骨格構造・余白リズム・カード階層・テキスト階層・CTA優先度)
|
|
71
73
|
```
|
|
72
74
|
|
|
@@ -221,6 +223,7 @@ Brand色を差し替え(10行)→ Primitive Layer → Semantic Layer → Bri
|
|
|
221
223
|
| **DESIGN.md** | AI エージェント向け視覚言語サマリ(トークン+意図・voice・motion) |
|
|
222
224
|
| **contracts/screen-patterns.json** | 画面実装前にどのシェル/パターンを使うかを決める decisionTree・crudMatrix |
|
|
223
225
|
| **contracts/deprecations.json** | 非推奨 API の正本台帳(移行先・削除予定。MIGRATION.md の一覧節と check-migration CLI の入力) |
|
|
226
|
+
| **contracts/product-theme-overrides.json** | プロダクト単位で上書きしてよい CSS 変数の許可リスト(寸法・面。既定値は src/styles/product-theme.css・lint は P049) |
|
|
224
227
|
| **contracts/composition.json** | 選んだパターン内部の並べ方(骨格構造・余白リズム・カード階層・テキスト階層・CTA優先度) |
|
|
225
228
|
|
|
226
229
|
---
|
|
@@ -242,6 +245,7 @@ src/
|
|
|
242
245
|
│ ├── semantic.css # Layer 2: 用途別トークン
|
|
243
246
|
│ ├── typography.css # typo-* ユーティリティ
|
|
244
247
|
│ ├── motion.css # duration / easing トークン(--Motion-*)
|
|
248
|
+
│ ├── product-theme.css # プロダクト単位で上書きしてよい寸法・面の公開変数(issue #364)
|
|
245
249
|
│ └── source-safelist.css # @source safelist(自動生成・手で編集しない / issue #258)
|
|
246
250
|
├── themes/ # default / orange / green / violet / blue
|
|
247
251
|
├── preset.css # 外部プロジェクト向けプリセット
|
package/DESIGN.md
CHANGED
|
@@ -269,6 +269,48 @@ Portal に載る要素(Dialog / Sheet / Popover / Toast 等)は DOM 上の
|
|
|
269
269
|
`z-10` / `z-20` のような小さい素の値は「コンポーネント内部の重なり」用途で、
|
|
270
270
|
このグローバルスケールの対象外。
|
|
271
271
|
|
|
272
|
+
## Product Theme Override(プロダクト単位の寸法調整)
|
|
273
|
+
|
|
274
|
+
マルチテーマ(Brand 10行差し替え)が切り替えるのは**色だけ**。コントロールの高さ・横 padding・
|
|
275
|
+
角丸・カードの余白は、消費プロダクトが CSS 変数を上書きして調整する。className を何十箇所も
|
|
276
|
+
書き換える運用(exam-kit の Card 角丸13箇所 = issue #332)を、変数1行に畳むための層。
|
|
277
|
+
|
|
278
|
+
既定値は `src/styles/product-theme.css`、**上書きしてよい変数の許可リストは
|
|
279
|
+
`contracts/product-theme-overrides.json` が正本**。ここに無い変数(`--Hover-*` / `--Z-*` /
|
|
280
|
+
`--glass-*` など)は内部実装で、上書きすると DS を上げた瞬間に静かに壊れる。
|
|
281
|
+
`npx ksk-ds lint <consumer>/src` の **P049** が消費側 CSS を検査する。
|
|
282
|
+
|
|
283
|
+
| family | 変数 | 既定値 | 使う部品 |
|
|
284
|
+
|---|---|---|---|
|
|
285
|
+
| Control | `--Control-Height-{Xs,Sm,Md,Lg,Xl}` | 24 / 32 / 40 / 48 / 56px | Button の size |
|
|
286
|
+
| Control | `--Control-Padding-X-{Xs,Sm,Md,Lg,Xl}` | 8 / 12 / 16 / 24 / 32px | Button の size |
|
|
287
|
+
| Control | `--Control-Gap` / `--Control-Radius` | 8px / ピル | Button のアイコン間隔・角丸 |
|
|
288
|
+
| Field | `--Field-Height-{Sm,Md,Lg}` | 36 / 48 / 56px | Input / SelectTrigger |
|
|
289
|
+
| Field | `--Field-Padding-X-{Sm,Md,Lg}` / `--Field-Padding-Y` | 10 / 12 / 16px / 8px | Input / Textarea / SelectTrigger |
|
|
290
|
+
| Field | `--Field-Min-Height` / `--Field-Radius` | 80px / 8px | Textarea / フィールド共通の角丸 |
|
|
291
|
+
| Product | `--Product-Card-Padding` / `--Product-Card-Gap` | 24px / 24px | Card(default バリアント) |
|
|
292
|
+
| Product | `--Product-Page-Padding-Y` | 24px | AdminShell の `<main>` 縦 padding |
|
|
293
|
+
| Chip | `--Chip-Radius` | ピル | Chip の pill 角丸 |
|
|
294
|
+
| Tabs | `--Control-Height-Md` / `--Control-Padding-X-{Sm,Md}` / `--Control-Radius` / `--Field-Radius` | 40px / 12・16px / ピル / 8px | TabsList / TabsTrigger(Control・Field を再利用) |
|
|
295
|
+
|
|
296
|
+
- **Control と Field はスケールが別**。ksk のフィールドは元々ボタンより背が高く(Input は 48px、
|
|
297
|
+
Button の既定は 40px)、横 padding も狭い。片方に畳むとどちらかの実寸が変わるので分けている。
|
|
298
|
+
- 参照は arbitrary value(`h-[var(--Control-Height-Md)]`)。Motion / Layering / Radius と同じ
|
|
299
|
+
「semantic 変数を Tailwind の任意値で読む」流儀に揃えてある。`@theme` のユーティリティ化はしない
|
|
300
|
+
(`:root` 以外のスコープに当てた上書きが効かなくなるため)。
|
|
301
|
+
- 上書きは `:root` でも任意の要素でもよい。カスケードだけで解決するので Server Component のまま使える。
|
|
302
|
+
- タップ領域(`Button size="icon-xl"` = 44px)と FAB(58px)は意図的にこのスケールの外に置いている。
|
|
303
|
+
product theme で縮められると HIG の最小タップ領域を割るため。同じ理由で **Chip の高さ・横 padding**
|
|
304
|
+
(sm/md/lg の縦 margin が「44px タッチターゲット - 本体高さ」の手計算値)と **Tabs の pill 高さ
|
|
305
|
+
(44px、Control スケールの 40/48px のどちらとも不一致)** も配線していない。
|
|
306
|
+
- **Checkbox / RadioGroup / Switch**(20px の `size-5` トグル)は「コントロールの高さ」という概念が
|
|
307
|
+
当てはまらないため、この契約の対象外。
|
|
308
|
+
- **AppShell / MarketingShell / MobileAppShell** はページ本文の padding をシェル自身が持たず
|
|
309
|
+
(`Container` の gutter か呼び出し側の `contentClassName` に委ねている)、対象外。
|
|
310
|
+
`AdminShell` の `<main>` だけが `--Product-Page-Padding-Y` を持つ。
|
|
311
|
+
- 色は従来どおり semantic トークン(`--Surface-*` / `--Text-*` / `--Brand-*`)と Brand ランプの
|
|
312
|
+
上書きで調整する。カードの面は `--card-surface`、角丸は `--Radius-Surface` が既存の公開シーム。
|
|
313
|
+
|
|
272
314
|
## Components
|
|
273
315
|
|
|
274
316
|
代表例(トークン参照で構成)。
|
package/bin/lint.js
CHANGED
|
@@ -2,8 +2,14 @@ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs"
|
|
|
2
2
|
import { extname, join, relative, resolve } from "node:path"
|
|
3
3
|
import { spawnSync } from "node:child_process"
|
|
4
4
|
import { inspectCardChildSpacing } from "./card-child-spacing.js"
|
|
5
|
+
import { inspectProductThemeOverrides, loadProductThemeContract } from "./product-theme-override.js"
|
|
5
6
|
|
|
6
7
|
const DEFAULT_EXTENSIONS = new Set([".js", ".jsx", ".ts", ".tsx"])
|
|
8
|
+
/**
|
|
9
|
+
* CSS 専用ルール(P049)の走査対象。TSX 向けの正規表現ルールは CSS には当てず、
|
|
10
|
+
* engine: "product-theme-override" を持つルールだけをここに流す(issue #364)。
|
|
11
|
+
*/
|
|
12
|
+
const CSS_EXTENSIONS = new Set([".css"])
|
|
7
13
|
const DEFAULT_IGNORES = [
|
|
8
14
|
".git",
|
|
9
15
|
".next",
|
|
@@ -23,13 +29,23 @@ export async function runLintCli(argv, { cwd = process.cwd(), pkgRoot = resolve(
|
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
const rules = loadRules(rulesPath)
|
|
32
|
+
const cssRules = rules.filter((rule) => rule.engine === "product-theme-override")
|
|
33
|
+
const sourceRules = rules.filter((rule) => rule.engine !== "product-theme-override")
|
|
34
|
+
const productThemeContract = cssRules.length > 0 ? readProductThemeContract(pkgRoot) : null
|
|
35
|
+
|
|
26
36
|
const files = options.changed
|
|
27
37
|
? getChangedFiles(cwd, options)
|
|
28
38
|
: collectTargetFiles(cwd, options.targets, options)
|
|
29
39
|
const findings = []
|
|
30
40
|
|
|
31
41
|
for (const file of files) {
|
|
32
|
-
|
|
42
|
+
if (CSS_EXTENSIONS.has(extname(file))) {
|
|
43
|
+
if (productThemeContract) {
|
|
44
|
+
findings.push(...lintCssFile(file, cwd, cssRules, productThemeContract))
|
|
45
|
+
}
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
48
|
+
findings.push(...lintFile(file, cwd, sourceRules, options))
|
|
33
49
|
}
|
|
34
50
|
|
|
35
51
|
const summary = summarize(findings)
|
|
@@ -133,7 +149,7 @@ function collect(abs, cwd, options, out) {
|
|
|
133
149
|
}
|
|
134
150
|
return
|
|
135
151
|
}
|
|
136
|
-
if (stat.isFile() &&
|
|
152
|
+
if (stat.isFile() && isLintableFile(abs)) out.push(abs)
|
|
137
153
|
}
|
|
138
154
|
|
|
139
155
|
function getChangedFiles(cwd, options) {
|
|
@@ -153,7 +169,46 @@ function getChangedFiles(cwd, options) {
|
|
|
153
169
|
.map((name) => resolve(cwd, name))
|
|
154
170
|
.filter((abs) => existsSync(abs))
|
|
155
171
|
.filter((abs) => !shouldIgnorePath(normalize(relative(cwd, abs)), options))
|
|
156
|
-
.filter((abs) =>
|
|
172
|
+
.filter((abs) => isLintableFile(abs))
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function isLintableFile(abs) {
|
|
176
|
+
const ext = extname(abs)
|
|
177
|
+
return DEFAULT_EXTENSIONS.has(ext) || CSS_EXTENSIONS.has(ext)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** contracts/product-theme-overrides.json(P049 の許可リスト)を読む */
|
|
181
|
+
function readProductThemeContract(pkgRoot) {
|
|
182
|
+
const path = resolve(pkgRoot, "contracts/product-theme-overrides.json")
|
|
183
|
+
if (!existsSync(path)) return null
|
|
184
|
+
try {
|
|
185
|
+
return loadProductThemeContract(JSON.parse(readFileSync(path, "utf8")))
|
|
186
|
+
} catch {
|
|
187
|
+
return null
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* CSS ファイルには product theme の許可リスト検査(P049)だけを当てる。
|
|
193
|
+
* TSX 向けの正規表現ルールを CSS に流すと誤検知しかしない。
|
|
194
|
+
*/
|
|
195
|
+
function lintCssFile(file, cwd, cssRules, contract) {
|
|
196
|
+
const rel = normalize(relative(cwd, file))
|
|
197
|
+
const source = readFileSync(file, "utf8")
|
|
198
|
+
const escape = findEscape(source, rel)
|
|
199
|
+
if (escape.valid) return []
|
|
200
|
+
|
|
201
|
+
const findings = escape.invalid ? [escape.invalid] : []
|
|
202
|
+
for (const rule of cssRules) {
|
|
203
|
+
for (const violation of inspectProductThemeOverrides(source, contract)) {
|
|
204
|
+
if (matchesRuleExclude(rule, rel, violation.name)) continue
|
|
205
|
+
findings.push({
|
|
206
|
+
...toFinding(rule, rel, violation.line),
|
|
207
|
+
message: `${rule.message ?? "product theme の許可リスト外の変数を上書きしています"}: ${violation.name}`,
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return findings
|
|
157
212
|
}
|
|
158
213
|
|
|
159
214
|
function lintFile(file, cwd, rules) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P049 — product theme の許可リスト外の DS 変数上書きを検出する(issue #364)
|
|
3
|
+
*
|
|
4
|
+
* 消費プロダクトの CSS が `:root { --Surface-Primary: … }` のように DS の
|
|
5
|
+
* CSS 変数を上書きするのは、契約 `contracts/product-theme-overrides.json` の
|
|
6
|
+
* `allowedVariables` に載っているものだけ。載っていない変数(`--Hover-*` /
|
|
7
|
+
* `--Z-*` / `--glass-*` などの内部実装)を上書きすると、DS を上げた瞬間に
|
|
8
|
+
* 静かに壊れる。lint で見えるようにする。
|
|
9
|
+
*
|
|
10
|
+
* 判定:
|
|
11
|
+
* 1. CSS のコメントを落とす
|
|
12
|
+
* 2. カスタムプロパティ宣言(`--Foo: value;`)を行番号付きで拾う
|
|
13
|
+
* 3. `dsVariableNamespaces` のどれかで始まり、`allowedVariables` に無いものを違反とする
|
|
14
|
+
*
|
|
15
|
+
* `var(--Foo)` の**参照**は対象外(読むのは自由)。宣言だけを見る。
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** CSS コメントを、行数を保ったまま空白に置き換える */
|
|
19
|
+
function stripCssComments(source) {
|
|
20
|
+
return source.replace(/\/\*[\s\S]*?\*\//g, (block) => block.replace(/[^\n]/g, " "))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {string} source CSS ソース
|
|
25
|
+
* @param {{ allowed: Set<string>, namespaces: string[] }} contract
|
|
26
|
+
* @returns {Array<{ line: number, name: string }>}
|
|
27
|
+
*/
|
|
28
|
+
export function inspectProductThemeOverrides(source, contract) {
|
|
29
|
+
const stripped = stripCssComments(source)
|
|
30
|
+
const findings = []
|
|
31
|
+
// 宣言のみを拾う。`var(--Foo, …)` の参照はコロンの前に `(` が来るため一致しない。
|
|
32
|
+
const DECLARATION = /(^|[;{}\s])(--[A-Za-z0-9_-]+)\s*:/g
|
|
33
|
+
|
|
34
|
+
for (const match of stripped.matchAll(DECLARATION)) {
|
|
35
|
+
const name = match[2]
|
|
36
|
+
if (contract.allowed.has(name)) continue
|
|
37
|
+
if (!contract.namespaces.some((prefix) => name.startsWith(prefix))) continue
|
|
38
|
+
findings.push({
|
|
39
|
+
line: stripped.slice(0, match.index).split(/\r?\n/).length,
|
|
40
|
+
name,
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
return findings
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** 契約 JSON から判定に使う形へ畳む */
|
|
47
|
+
export function loadProductThemeContract(contract) {
|
|
48
|
+
return {
|
|
49
|
+
allowed: new Set(Object.values(contract.allowedVariables ?? {}).flat()),
|
|
50
|
+
namespaces: Array.isArray(contract.dsVariableNamespaces) ? contract.dsVariableNamespaces : [],
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"name": "KSK Design System — Product Theme Override API",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"issue": 364,
|
|
6
|
+
"description": "消費プロダクトが DS の正本を複製せず、自分のリポジトリの CSS だけで上書きしてよい公開 CSS 変数の契約。既定値の定義は src/styles/product-theme.css、色トークンの定義は src/styles/semantic.css / src/themes/*.css。",
|
|
7
|
+
"sourceOfTruth": [
|
|
8
|
+
"src/styles/product-theme.css",
|
|
9
|
+
"src/styles/semantic.css",
|
|
10
|
+
"src/preset.css"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"consumerContract": {
|
|
14
|
+
"importOrder": [
|
|
15
|
+
"@import \"ksk-design-system/preset\";",
|
|
16
|
+
"@import \"./themes/my-client.css\";",
|
|
17
|
+
"@import \"./product-theme.css\";"
|
|
18
|
+
],
|
|
19
|
+
"scope": ":root(アプリ全体)または任意の要素(その配下だけ)",
|
|
20
|
+
"allowedPattern": "preset の後に、ここで許可された CSS 変数だけを上書きする",
|
|
21
|
+
"forbiddenPattern": "消費プロダクト側に tokens.json / semantic.css / preset.css のコピーや独自 Tailwind preset を作らない。許可リストに無い内部変数を上書きしない",
|
|
22
|
+
"lintRule": "P049(npx ksk-ds lint が消費側 CSS を検査する)"
|
|
23
|
+
},
|
|
24
|
+
"allowedVariables": {
|
|
25
|
+
"brandColor": [
|
|
26
|
+
"--Primitive-Brand-50",
|
|
27
|
+
"--Primitive-Brand-100",
|
|
28
|
+
"--Primitive-Brand-200",
|
|
29
|
+
"--Primitive-Brand-300",
|
|
30
|
+
"--Primitive-Brand-400",
|
|
31
|
+
"--Primitive-Brand-500",
|
|
32
|
+
"--Primitive-Brand-600",
|
|
33
|
+
"--Primitive-Brand-700",
|
|
34
|
+
"--Primitive-Brand-800",
|
|
35
|
+
"--Primitive-Brand-900"
|
|
36
|
+
],
|
|
37
|
+
"semanticColor": [
|
|
38
|
+
"--Surface-Primary",
|
|
39
|
+
"--Surface-Secondary",
|
|
40
|
+
"--Surface-Tertiary",
|
|
41
|
+
"--Surface-Accent-Primary-Light",
|
|
42
|
+
"--Text-High-Emphasis",
|
|
43
|
+
"--Text-Medium-Emphasis",
|
|
44
|
+
"--Text-Low-Emphasis",
|
|
45
|
+
"--Text-Accent-Primary",
|
|
46
|
+
"--Text-on-Inverse",
|
|
47
|
+
"--Border-Low-Emphasis",
|
|
48
|
+
"--Border-Medium-Emphasis",
|
|
49
|
+
"--Border-Accent-Primary",
|
|
50
|
+
"--Brand-Primary",
|
|
51
|
+
"--Brand-Action",
|
|
52
|
+
"--Focus-High-Emphasis",
|
|
53
|
+
"--card-surface"
|
|
54
|
+
],
|
|
55
|
+
"controlSize": [
|
|
56
|
+
"--Control-Height-Xs",
|
|
57
|
+
"--Control-Height-Sm",
|
|
58
|
+
"--Control-Height-Md",
|
|
59
|
+
"--Control-Height-Lg",
|
|
60
|
+
"--Control-Height-Xl",
|
|
61
|
+
"--Control-Padding-X-Xs",
|
|
62
|
+
"--Control-Padding-X-Sm",
|
|
63
|
+
"--Control-Padding-X-Md",
|
|
64
|
+
"--Control-Padding-X-Lg",
|
|
65
|
+
"--Control-Padding-X-Xl",
|
|
66
|
+
"--Control-Gap"
|
|
67
|
+
],
|
|
68
|
+
"fieldSize": [
|
|
69
|
+
"--Field-Height-Sm",
|
|
70
|
+
"--Field-Height-Md",
|
|
71
|
+
"--Field-Height-Lg",
|
|
72
|
+
"--Field-Padding-X-Sm",
|
|
73
|
+
"--Field-Padding-X-Md",
|
|
74
|
+
"--Field-Padding-X-Lg",
|
|
75
|
+
"--Field-Padding-Y",
|
|
76
|
+
"--Field-Min-Height"
|
|
77
|
+
],
|
|
78
|
+
"shape": [
|
|
79
|
+
"--Control-Radius",
|
|
80
|
+
"--Field-Radius",
|
|
81
|
+
"--Radius-Surface",
|
|
82
|
+
"--Radius-Modal",
|
|
83
|
+
"--Radius-Sheet"
|
|
84
|
+
],
|
|
85
|
+
"productSpacing": [
|
|
86
|
+
"--Product-Card-Padding",
|
|
87
|
+
"--Product-Card-Gap",
|
|
88
|
+
"--Product-Page-Padding-Y",
|
|
89
|
+
"--Space-Section-xs",
|
|
90
|
+
"--Space-Section-sm",
|
|
91
|
+
"--Space-Section-md",
|
|
92
|
+
"--Space-Section-lg",
|
|
93
|
+
"--Space-Section-xl",
|
|
94
|
+
"--Space-Section-2xl"
|
|
95
|
+
],
|
|
96
|
+
"chip": [
|
|
97
|
+
"--Chip-Radius"
|
|
98
|
+
],
|
|
99
|
+
"motion": [
|
|
100
|
+
"--Motion-Duration-Fast",
|
|
101
|
+
"--Motion-Duration-Base",
|
|
102
|
+
"--Motion-Duration-Slow",
|
|
103
|
+
"--Motion-Duration-Slower"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"dsVariableNamespaces": [
|
|
107
|
+
"--Primitive-",
|
|
108
|
+
"--Categorical-",
|
|
109
|
+
"--Surface-",
|
|
110
|
+
"--Text-",
|
|
111
|
+
"--Border-",
|
|
112
|
+
"--Brand-",
|
|
113
|
+
"--Object-",
|
|
114
|
+
"--Overlay-",
|
|
115
|
+
"--Focus-",
|
|
116
|
+
"--Caution-",
|
|
117
|
+
"--Success-",
|
|
118
|
+
"--Warning-",
|
|
119
|
+
"--Info-",
|
|
120
|
+
"--Hover-",
|
|
121
|
+
"--Active-",
|
|
122
|
+
"--Disable",
|
|
123
|
+
"--Motion-",
|
|
124
|
+
"--Z-",
|
|
125
|
+
"--Radius-",
|
|
126
|
+
"--Space-Section-",
|
|
127
|
+
"--Control-",
|
|
128
|
+
"--Field-",
|
|
129
|
+
"--Product-",
|
|
130
|
+
"--Chip-",
|
|
131
|
+
"--glass-",
|
|
132
|
+
"--card-surface"
|
|
133
|
+
],
|
|
134
|
+
"namespaceNote": "P049 が「DS の変数を上書きしている」と判定する接頭辞。ここに該当し allowedVariables に無い変数を消費側 CSS が宣言していたら契約違反。shadcn 互換の小文字ブリッジ(--primary / --border 等)は消費側アプリが同名変数を持つことがあるため対象外。",
|
|
135
|
+
"wiredComponents": {
|
|
136
|
+
"Button": [
|
|
137
|
+
"--Control-Height-*",
|
|
138
|
+
"--Control-Padding-X-*",
|
|
139
|
+
"--Control-Gap",
|
|
140
|
+
"--Control-Radius"
|
|
141
|
+
],
|
|
142
|
+
"Input": ["--Field-Height-Md", "--Field-Padding-X-Md", "--Field-Radius"],
|
|
143
|
+
"Textarea": [
|
|
144
|
+
"--Field-Min-Height",
|
|
145
|
+
"--Field-Padding-X-Md",
|
|
146
|
+
"--Field-Padding-Y",
|
|
147
|
+
"--Field-Radius"
|
|
148
|
+
],
|
|
149
|
+
"SelectTrigger": ["--Field-Height-*", "--Field-Padding-X-*", "--Field-Radius"],
|
|
150
|
+
"Card": ["--Product-Card-Padding", "--Product-Card-Gap", "--Radius-Surface", "--card-surface"],
|
|
151
|
+
"Tabs": [
|
|
152
|
+
"--Control-Height-Md",
|
|
153
|
+
"--Control-Padding-X-Sm",
|
|
154
|
+
"--Control-Padding-X-Md",
|
|
155
|
+
"--Control-Radius",
|
|
156
|
+
"--Field-Radius"
|
|
157
|
+
],
|
|
158
|
+
"Chip": ["--Chip-Radius"],
|
|
159
|
+
"AdminShell": ["--Product-Page-Padding-Y"]
|
|
160
|
+
},
|
|
161
|
+
"aiGuidance": [
|
|
162
|
+
"プロダクト差分は、まずこの契約の CSS 変数上書きで表現する。className での個別上書きを何十箇所にも散らさない。",
|
|
163
|
+
"許可リストに無い変数(--Hover-* / --glass-* / --Z-* などの内部変数)は消費側から上書きしない。必要なら DS 側に issue を立てて公開変数を増やす。",
|
|
164
|
+
"DS 側で新しくサイズ・角丸を持つコンポーネントを作るときは、固定の h-* / px-* / rounded-* ではなく Control / Field 変数を arbitrary value(h-[var(--Control-Height-Md)])で参照する。",
|
|
165
|
+
"Control(Button 系)と Field(Input / Textarea / SelectTrigger)はスケールが別。ksk のフィールドは元々ボタンより背が高いため、片方に畳むと実寸が変わる。",
|
|
166
|
+
"色は semantic トークン経由でのみ上書きする。Primitive を直接参照するのは Brand ランプ(--Primitive-Brand-*)だけが例外。",
|
|
167
|
+
"Checkbox / RadioGroup / Switch(20px の size-5 トグル)は意図的にこの契約の対象外。「コントロールの高さ」という概念が当てはまらない固定サイズのため、Control 変数を当てると意味が壊れる。",
|
|
168
|
+
"Chip は角丸(--Chip-Radius)だけを配線し、高さ・横 padding は配線しない。sm/md/lg の縦 margin(my-*)は「44px タッチターゲット - 本体高さ」ちょうどの手計算値で、height を変数化すると当たり判定の math が壊れる。",
|
|
169
|
+
"AppShell / MarketingShell / MobileAppShell はページ本文の padding をシェル自身が持たない(Container の gutter か呼び出し側の contentClassName に委ねている)ため product theme の対象外。AdminShell の <main> だけが --Product-Page-Padding-Y を持つ。"
|
|
170
|
+
]
|
|
171
|
+
}
|
package/contracts/rules.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Rules Contracts",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"description": "禁止パターン・アクセシビリティ要件・ライティングルールの構造化定義。lint-scratch.sh と check-drift.sh で自動検証。禁止パターン
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"description": "禁止パターン・アクセシビリティ要件・ライティングルールの構造化定義。lint-scratch.sh と check-drift.sh で自動検証。禁止パターン49件・AIアンチパターン10件。"
|
|
6
6
|
},
|
|
7
7
|
"prohibited": [
|
|
8
8
|
{
|
|
@@ -441,6 +441,18 @@
|
|
|
441
441
|
"message": "グローバルな重なり層に素の z-index を使わない",
|
|
442
442
|
"fix": "z-[var(--Z-{Sticky,Nav,Overlay,Modal,Popover,Toast,Tooltip,SkipLink})] を使用",
|
|
443
443
|
"note": "z-50 一律だと Portal のマウント順(=開いた順)で勝敗が決まる。z-10 / z-20 のコンポーネント内部の重なりは対象外"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"id": "P049",
|
|
447
|
+
"severity": "error",
|
|
448
|
+
"category": "token",
|
|
449
|
+
"pattern": "product-theme-override",
|
|
450
|
+
"engine": "product-theme-override",
|
|
451
|
+
"appliesTo": ["*.css"],
|
|
452
|
+
"excludes": [],
|
|
453
|
+
"message": "product theme の許可リストに無い DS の CSS 変数を消費側で上書きしている",
|
|
454
|
+
"fix": "contracts/product-theme-overrides.json の allowedVariables にある変数だけを上書きする。足りない場合は DS 側に公開変数の追加を依頼する",
|
|
455
|
+
"note": "対象は .css の宣言のみ(var() での参照は自由)。--Hover-* / --Z-* / --glass-* のような内部変数を上書きすると DS を上げた瞬間に静かに壊れる。shadcn 互換の小文字ブリッジ(--primary 等)は消費側アプリと名前が衝突しうるため対象外(issue #364)"
|
|
444
456
|
}
|
|
445
457
|
],
|
|
446
458
|
"aiPatterns": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Semantic Token Hex Cache",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.58.0",
|
|
5
5
|
"description": "semantic / semanticDark トークン(var(--Primitive-*) 参照)を実 hex に解決したサイドカー生成物。hex はデフォルト(Blue)テーマでの解決値であり、Brand 系(meta.themeDependentKeys に列挙)はテーマ差し替え(orange/green/violet 等)で実色が変わる。テーマ別の完全解決値は `ksk-design-system/native` エクスポート(バンドル済み native トークンモジュール)の themes を参照。tokens.json 本体のスキーマは変更せず、AI がこのファイルだけで実色を把握できるようにし、primitive 値の変更による semantic 実色のドリフトを --check で機械検出する。",
|
|
6
6
|
"generatedBy": "scripts/generate-token-hex-cache.mjs",
|
|
7
7
|
"theme": "default",
|
package/dist/class-names.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./server-variants-
|
|
1
|
+
import { t as e } from "./server-variants-B3uIQjUG.js";
|
|
2
2
|
export { e as buttonVariants };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e, i as t, l as n, n as r, o as i, r as a, s as o, t as s } from "./prompt-coordinator-sBFZKQIX.js";
|
|
3
|
-
import { t as c } from "./server-variants-
|
|
3
|
+
import { t as c } from "./server-variants-B3uIQjUG.js";
|
|
4
4
|
import * as l from "react";
|
|
5
5
|
import u, { createContext as d, useCallback as f, useContext as p, useEffect as m, useLayoutEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
6
6
|
import { Accordion as y, AlertDialog as b, Avatar as x, Checkbox as S, Collapsible as C, Dialog as w, DropdownMenu as T, HoverCard as E, Label as D, Popover as O, Progress as k, RadioGroup as ee, ScrollArea as A, Select as j, Separator as te, Slider as M, Switch as ne, Tabs as N, Tooltip as P } from "radix-ui";
|
|
@@ -640,7 +640,7 @@ function xt({ className: e, ...t }) {
|
|
|
640
640
|
//#region src/components/ui/card.tsx
|
|
641
641
|
var St = B("bg-[var(--card-surface,var(--Surface-Primary))] [&>*]:[--card-surface:initial] text-[var(--Text-High-Emphasis)] flex flex-col rounded-[var(--Radius-Surface)] ksk-squircle border border-[var(--Border-Low-Emphasis)] shadow-[var(--shadow-md)] @container", {
|
|
642
642
|
variants: { variant: {
|
|
643
|
-
default: "gap-
|
|
643
|
+
default: "gap-[var(--Product-Card-Gap)] p-[var(--Product-Card-Padding)]",
|
|
644
644
|
media: "gap-0 p-0 overflow-hidden"
|
|
645
645
|
} },
|
|
646
646
|
defaultVariants: { variant: "default" }
|
|
@@ -1747,7 +1747,7 @@ function xr({ enabled: e, value: t, defaultValue: n, forwardedRef: r }) {
|
|
|
1747
1747
|
//#endregion
|
|
1748
1748
|
//#region src/components/ui/input.tsx
|
|
1749
1749
|
var Sr = [
|
|
1750
|
-
"flex h-
|
|
1750
|
+
"flex h-[var(--Field-Height-Md)] w-full rounded-[var(--Field-Radius)] border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] px-[var(--Field-Padding-X-Md)] typo-body-md text-[var(--Text-High-Emphasis)] transition-colors",
|
|
1751
1751
|
"file:border-0 file:bg-transparent file:typo-body-md",
|
|
1752
1752
|
"placeholder:text-[var(--Text-Low-Emphasis)]",
|
|
1753
1753
|
"focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 focus-visible:border-[var(--Border-Accent-Primary)]",
|
|
@@ -6305,11 +6305,11 @@ function Ec({ className: e, children: t, description: n, id: r, ...i }) {
|
|
|
6305
6305
|
}
|
|
6306
6306
|
//#endregion
|
|
6307
6307
|
//#region src/components/ui/select.tsx
|
|
6308
|
-
var Dc = B("flex w-full items-center justify-between rounded-
|
|
6308
|
+
var Dc = B("flex w-full items-center justify-between rounded-[var(--Field-Radius)] border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] placeholder:text-[var(--Text-Low-Emphasis)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
|
|
6309
6309
|
variants: { size: {
|
|
6310
|
-
sm: "h-
|
|
6311
|
-
default: "h-
|
|
6312
|
-
lg: "h-
|
|
6310
|
+
sm: "h-[var(--Field-Height-Sm)] px-[var(--Field-Padding-X-Sm)] typo-body-sm",
|
|
6311
|
+
default: "h-[var(--Field-Height-Md)] px-[var(--Field-Padding-X-Md)] typo-body-md",
|
|
6312
|
+
lg: "h-[var(--Field-Height-Lg)] px-[var(--Field-Padding-X-Lg)] typo-body-md"
|
|
6313
6313
|
} },
|
|
6314
6314
|
defaultVariants: { size: "default" }
|
|
6315
6315
|
});
|
|
@@ -7364,7 +7364,7 @@ function Ml({ className: e, variant: t = "default", ...n }) {
|
|
|
7364
7364
|
children: /* @__PURE__ */ R(N.List, {
|
|
7365
7365
|
"data-slot": "tabs-list",
|
|
7366
7366
|
"data-variant": t,
|
|
7367
|
-
className: G("inline-flex w-fit max-w-full overflow-x-auto items-center gap-1 bg-[var(--Surface-Tertiary)] p-1 text-[var(--Text-Medium-Emphasis)]", t === "pill" ? "h-11 rounded-
|
|
7367
|
+
className: G("inline-flex w-fit max-w-full overflow-x-auto items-center gap-1 bg-[var(--Surface-Tertiary)] p-1 text-[var(--Text-Medium-Emphasis)]", t === "pill" ? "h-11 rounded-[var(--Control-Radius)]" : "h-[var(--Control-Height-Md)] rounded-[var(--Field-Radius)]", e),
|
|
7368
7368
|
...n
|
|
7369
7369
|
})
|
|
7370
7370
|
});
|
|
@@ -7374,7 +7374,7 @@ function Nl({ className: e, ...t }) {
|
|
|
7374
7374
|
return /* @__PURE__ */ R(N.Trigger, {
|
|
7375
7375
|
"data-slot": "tabs-trigger",
|
|
7376
7376
|
"data-variant": n,
|
|
7377
|
-
className: G("inline-flex items-center justify-center whitespace-nowrap typo-label-sm transition-all", n === "pill" ? "relative rounded-
|
|
7377
|
+
className: G("inline-flex items-center justify-center whitespace-nowrap typo-label-sm transition-all", n === "pill" ? "relative rounded-[var(--Control-Radius)] px-[var(--Control-Padding-X-Md)] py-1.5 gap-1.5" : "rounded-[var(--Field-Radius)] px-[var(--Control-Padding-X-Sm)] py-1.5", n === "pill" && "before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:min-h-11 before:content-['']", "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50", "disabled:pointer-events-none disabled:opacity-50", "data-[state=active]:bg-[var(--Surface-Primary)] data-[state=active]:text-[var(--Text-High-Emphasis)] data-[state=active]:shadow-sm", n === "default" && "hover:text-[var(--Text-High-Emphasis)]", n === "pill" && "data-[state=inactive]:hover:text-[var(--Text-High-Emphasis)]", e),
|
|
7378
7378
|
...t
|
|
7379
7379
|
});
|
|
7380
7380
|
}
|
|
@@ -7419,7 +7419,7 @@ function Fl({ className: e, autoGrow: t, showCount: n, maxLength: r, value: i, d
|
|
|
7419
7419
|
value: i,
|
|
7420
7420
|
defaultValue: a,
|
|
7421
7421
|
maxLength: r,
|
|
7422
|
-
className: G("flex min-h-[
|
|
7422
|
+
className: G("flex min-h-[var(--Field-Min-Height)] w-full rounded-[var(--Field-Radius)] border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] px-[var(--Field-Padding-X-Md)] py-[var(--Field-Padding-Y)] typo-body-md text-[var(--Text-High-Emphasis)] transition-colors", "placeholder:text-[var(--Text-Low-Emphasis)]", "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 focus-visible:border-[var(--Border-Accent-Primary)]", "disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-[var(--Border-Caution)]", t && "resize-none overflow-hidden", e),
|
|
7423
7423
|
onChange: y,
|
|
7424
7424
|
onCompositionStart: (e) => {
|
|
7425
7425
|
g(), s?.(e);
|
|
@@ -12715,7 +12715,7 @@ var Nd = B("inline-flex items-center justify-center gap-1.5 whitespace-nowrap cu
|
|
|
12715
12715
|
tile: "size-12 shrink-0 typo-body-md"
|
|
12716
12716
|
},
|
|
12717
12717
|
shape: {
|
|
12718
|
-
pill: "rounded-
|
|
12718
|
+
pill: "rounded-[var(--Chip-Radius)]",
|
|
12719
12719
|
square: "rounded-sm"
|
|
12720
12720
|
}
|
|
12721
12721
|
},
|
|
@@ -12758,7 +12758,7 @@ function Pd({ className: e, id: t, style: n, title: r, variant: i = "filled", si
|
|
|
12758
12758
|
md: `h-8 w-11 ${E}`,
|
|
12759
12759
|
lg: `h-9 w-11 ${E}`,
|
|
12760
12760
|
tile: "h-12 w-11"
|
|
12761
|
-
}[v], O = y === "square" || v === "tile" ? "rounded-r-sm" : "rounded-r-
|
|
12761
|
+
}[v], O = y === "square" || v === "tile" ? "rounded-r-sm" : "rounded-r-[var(--Chip-Radius)]";
|
|
12762
12762
|
if (u) {
|
|
12763
12763
|
let l = G("relative", Nd({
|
|
12764
12764
|
variant: i,
|
|
@@ -14047,7 +14047,7 @@ function Kf({ className: e, sidebar: t, header: n, children: r, sidebarWidth: i
|
|
|
14047
14047
|
className: "flex-1 overflow-auto",
|
|
14048
14048
|
children: /* @__PURE__ */ R(Uf, {
|
|
14049
14049
|
size: "fluid",
|
|
14050
|
-
className: "py-
|
|
14050
|
+
className: "py-[var(--Product-Page-Padding-Y)]",
|
|
14051
14051
|
children: r
|
|
14052
14052
|
})
|
|
14053
14053
|
})]
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
|
2
2
|
//#region src/lib/server-variants/button-variants.ts
|
|
3
|
-
var t = e("inline-flex items-center justify-center gap-
|
|
3
|
+
var t = e("inline-flex items-center justify-center gap-[var(--Control-Gap)] whitespace-nowrap typo-label-md transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 cursor-pointer", {
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
default: "bg-[var(--Brand-Primary)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] rounded-
|
|
7
|
-
secondary: "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Secondary-Button)] rounded-
|
|
8
|
-
"secondary-switch": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] border border-[var(--Border-Accent-Primary)] hover:bg-[var(--Hover-Secondary-Button)] rounded-
|
|
9
|
-
tertiary: "bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] rounded-
|
|
10
|
-
ghost: "text-[var(--Text-Accent-Primary)] hover:bg-[var(--Hover-Ghost-Button)] rounded-
|
|
11
|
-
destructive: "bg-[var(--Caution-Base)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Destructive-Button)] active:bg-[var(--Active-Destructive-Button)] rounded-
|
|
6
|
+
default: "bg-[var(--Brand-Primary)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] rounded-[var(--Control-Radius)]",
|
|
7
|
+
secondary: "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Secondary-Button)] rounded-[var(--Control-Radius)]",
|
|
8
|
+
"secondary-switch": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] border border-[var(--Border-Accent-Primary)] hover:bg-[var(--Hover-Secondary-Button)] rounded-[var(--Control-Radius)]",
|
|
9
|
+
tertiary: "bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] rounded-[var(--Control-Radius)]",
|
|
10
|
+
ghost: "text-[var(--Text-Accent-Primary)] hover:bg-[var(--Hover-Ghost-Button)] rounded-[var(--Control-Radius)]",
|
|
11
|
+
destructive: "bg-[var(--Caution-Base)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Destructive-Button)] active:bg-[var(--Active-Destructive-Button)] rounded-[var(--Control-Radius)]",
|
|
12
12
|
link: "text-[var(--Text-Accent-Primary)] underline-offset-4 hover:underline",
|
|
13
|
-
glass: "glass glass-specular text-[var(--Text-High-Emphasis)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-
|
|
14
|
-
"glass-inverse": "glass glass-specular glass-inverse text-[var(--glass-button-text)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-
|
|
15
|
-
"glass-accent": "glass glass-specular glass-accent text-[var(--Text-on-Inverse)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-
|
|
16
|
-
accent: "bg-gradient-to-r from-[var(--Brand-Primary)] to-[var(--Brand-Action)] text-[var(--Text-on-Inverse)] border border-transparent hover:opacity-90 rounded-
|
|
17
|
-
inverse: "bg-[var(--Surface-Primary)] text-[var(--Brand-Primary)] hover:bg-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-800)] disabled:bg-[var(--Primitive-White-Alpha-300)] disabled:text-[var(--Text-Disable)] rounded-
|
|
18
|
-
"ghost-inverse": "border border-[var(--Primitive-White-Alpha-300)] bg-transparent text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-White-Alpha-200)] hover:border-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-300)] disabled:border-[var(--Primitive-White-Alpha-200)] disabled:text-[var(--Primitive-White-Alpha-300)] rounded-
|
|
13
|
+
glass: "glass glass-specular text-[var(--Text-High-Emphasis)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-[var(--Control-Radius)]",
|
|
14
|
+
"glass-inverse": "glass glass-specular glass-inverse text-[var(--glass-button-text)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-[var(--Control-Radius)]",
|
|
15
|
+
"glass-accent": "glass glass-specular glass-accent text-[var(--Text-on-Inverse)] transition-all duration-[var(--Motion-Duration-Slow)] ease-[var(--Motion-Easing-Bounce)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-[var(--Control-Radius)]",
|
|
16
|
+
accent: "bg-gradient-to-r from-[var(--Brand-Primary)] to-[var(--Brand-Action)] text-[var(--Text-on-Inverse)] border border-transparent hover:opacity-90 rounded-[var(--Control-Radius)]",
|
|
17
|
+
inverse: "bg-[var(--Surface-Primary)] text-[var(--Brand-Primary)] hover:bg-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-800)] disabled:bg-[var(--Primitive-White-Alpha-300)] disabled:text-[var(--Text-Disable)] rounded-[var(--Control-Radius)]",
|
|
18
|
+
"ghost-inverse": "border border-[var(--Primitive-White-Alpha-300)] bg-transparent text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-White-Alpha-200)] hover:border-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-300)] disabled:border-[var(--Primitive-White-Alpha-200)] disabled:text-[var(--Primitive-White-Alpha-300)] rounded-[var(--Control-Radius)]"
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
|
-
xs: "h-
|
|
22
|
-
sm: "h-
|
|
23
|
-
default: "h-
|
|
24
|
-
lg: "h-
|
|
25
|
-
xl: "h-
|
|
26
|
-
hero: "min-h-
|
|
27
|
-
icon: "size-
|
|
28
|
-
"icon-sm": "size-
|
|
29
|
-
"icon-lg": "size-
|
|
21
|
+
xs: "h-[var(--Control-Height-Xs)] px-[var(--Control-Padding-X-Xs)] typo-label-xs",
|
|
22
|
+
sm: "h-[var(--Control-Height-Sm)] px-[var(--Control-Padding-X-Sm)] typo-label-sm",
|
|
23
|
+
default: "h-[var(--Control-Height-Md)] px-[var(--Control-Padding-X-Md)] typo-label-md",
|
|
24
|
+
lg: "h-[var(--Control-Height-Lg)] px-[var(--Control-Padding-X-Lg)] typo-label-md",
|
|
25
|
+
xl: "h-[var(--Control-Height-Xl)] px-[var(--Control-Padding-X-Xl)] typo-label-lg",
|
|
26
|
+
hero: "min-h-[var(--Control-Height-Xl)] rounded-[var(--Control-Radius)] px-[var(--Control-Padding-X-Lg)] typo-label-lg",
|
|
27
|
+
icon: "size-[var(--Control-Height-Md)]",
|
|
28
|
+
"icon-sm": "size-[var(--Control-Height-Sm)]",
|
|
29
|
+
"icon-lg": "size-[var(--Control-Height-Lg)]",
|
|
30
30
|
"icon-xl": "size-11",
|
|
31
31
|
"icon-fab": "size-[58px]",
|
|
32
|
-
match: "h-
|
|
32
|
+
match: "h-[var(--Control-Height-Lg)] px-[var(--Control-Padding-X-Md)] typo-label-md"
|
|
33
33
|
},
|
|
34
34
|
layout: {
|
|
35
35
|
horizontal: "",
|
|
36
|
-
vertical: "flex-col gap-1 h-
|
|
36
|
+
vertical: "flex-col gap-1 h-[var(--Control-Height-Xl)] rounded-2xl py-2 typo-label-sm"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
defaultVariants: {
|
|
@@ -4,6 +4,9 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
/**
|
|
5
5
|
* SelectTrigger のサイズ規格。Button/Input と揃えて 3 段階を用意。
|
|
6
6
|
* 既定は default (h-12) — 既存挙動と完全互換。
|
|
7
|
+
*
|
|
8
|
+
* 高さ・横 padding・角丸は product theme の公開変数(`--Field-*`)を参照する。
|
|
9
|
+
* 既定値は従来の固定クラスと同値(issue #364)。
|
|
7
10
|
*/
|
|
8
11
|
declare const selectTriggerVariants: (props?: {
|
|
9
12
|
size?: "default" | "sm" | "lg";
|
|
@@ -9,6 +9,13 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
9
9
|
* 定義はここに集約する。
|
|
10
10
|
*
|
|
11
11
|
* 変更時は button.tsx の Button コンポーネントの見た目に直接影響する。
|
|
12
|
+
*
|
|
13
|
+
* 内寸(高さ・横 padding・gap・角丸)は固定の Tailwind クラスではなく
|
|
14
|
+
* product theme の公開変数(`--Control-*`)を arbitrary value で参照する。
|
|
15
|
+
* 既定値は src/styles/product-theme.css にあり、従来の h-10 / px-4 等と同値
|
|
16
|
+
* (issue #364)。消費プロダクトはこの変数を上書きするだけで、className を
|
|
17
|
+
* 何十箇所も書き換えずにボタンの寸法を自分の製品に合わせられる。
|
|
18
|
+
* 許可リストの正本は contracts/product-theme-overrides.json。
|
|
12
19
|
*/
|
|
13
20
|
declare const buttonVariants: (props?: {
|
|
14
21
|
variant?: "accent" | "link" | "default" | "secondary" | "secondary-switch" | "tertiary" | "ghost" | "destructive" | "glass" | "glass-inverse" | "glass-accent" | "inverse" | "ghost-inverse";
|
package/package.json
CHANGED
package/src/preset.css
CHANGED
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
@import "./styles/glass.css";
|
|
22
22
|
@import "./styles/motion.css";
|
|
23
23
|
@import "./styles/sheet-keyboard.css";
|
|
24
|
+
/* プロダクト単位で上書きしてよい寸法・面の公開変数(issue #364)。
|
|
25
|
+
許可リストの正本は contracts/product-theme-overrides.json。 */
|
|
26
|
+
@import "./styles/product-theme.css";
|
|
24
27
|
/* DS 内部ユーティリティの safelist(自動生成 / issue #258)。
|
|
25
28
|
消費側の @source が無い・パスがずれていても DS のクラス CSS が生成される保険。 */
|
|
26
29
|
@import "./styles/source-safelist.css";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Product Theme Override API(issue #364)
|
|
3
|
+
|
|
4
|
+
マルチテーマ(Brand 10行差し替え)が扱うのは「色」だけで、コントロールの
|
|
5
|
+
高さ・横 padding・角丸・カードの余白といった**寸法**をプロダクト単位で
|
|
6
|
+
変える口が無かった。消費側は className で個別に上書きするしかなく、
|
|
7
|
+
同じ上書きが何十箇所にも散る(exam-kit の Card 角丸13箇所 = issue #332)。
|
|
8
|
+
|
|
9
|
+
ここはその「公開して良い CSS 変数」の既定値。消費プロダクトは preset の
|
|
10
|
+
後ろに自分の CSS を1枚置き、この変数だけを上書きする。
|
|
11
|
+
|
|
12
|
+
@import "ksk-design-system/preset";
|
|
13
|
+
@import "./themes/my-client.css"; … Brand 10行(色)
|
|
14
|
+
@import "./product-theme.css"; … ここの変数(寸法・面)
|
|
15
|
+
|
|
16
|
+
機械可読な許可リストは contracts/product-theme-overrides.json が正本。
|
|
17
|
+
**ここに無い変数は公開契約ではない**(内部実装なので予告なく変わる)。
|
|
18
|
+
許可リスト外の上書きは `npx ksk-ds lint` の P049 が検出する。
|
|
19
|
+
|
|
20
|
+
既定値は現行実装の固定 Tailwind クラス(h-10 / px-4 …)と 1px も違わない。
|
|
21
|
+
上書きしない限り見た目は変わらない(__tests__/product-theme-defaults.test.tsx
|
|
22
|
+
が origin/main 相当の実寸で固定している)。
|
|
23
|
+
|
|
24
|
+
スコープ:
|
|
25
|
+
- `:root` に置けばアプリ全体に効く。
|
|
26
|
+
- 任意の要素(`<div style="--Control-Height-Md: 3rem">` や
|
|
27
|
+
`className="[--Control-Height-Md:3rem]"`)に置けばその配下だけに効く。
|
|
28
|
+
コンポーネント側は `h-[var(--Control-Height-Md)]` の形で参照しており、
|
|
29
|
+
CSS カスタムプロパティのカスケードで解決するため、React context も
|
|
30
|
+
prop 追加も要らない(Server Component のまま使える)。
|
|
31
|
+
============================================================= */
|
|
32
|
+
|
|
33
|
+
:root {
|
|
34
|
+
/* ─── Control: Button 系の内寸 ───
|
|
35
|
+
5段スケール。Button の size バリアント xs / sm / default(=Md) / lg / xl と
|
|
36
|
+
1対1で対応する。既定値は h-6/h-8/h-10/h-12/h-14・px-2/px-3/px-4/px-6/px-8。 */
|
|
37
|
+
--Control-Height-Xs: 1.5rem; /* 24px — h-6 */
|
|
38
|
+
--Control-Height-Sm: 2rem; /* 32px — h-8 */
|
|
39
|
+
--Control-Height-Md: 2.5rem; /* 40px — h-10(Button の既定) */
|
|
40
|
+
--Control-Height-Lg: 3rem; /* 48px — h-12 */
|
|
41
|
+
--Control-Height-Xl: 3.5rem; /* 56px — h-14 */
|
|
42
|
+
|
|
43
|
+
--Control-Padding-X-Xs: 0.5rem; /* 8px — px-2 */
|
|
44
|
+
--Control-Padding-X-Sm: 0.75rem; /* 12px — px-3 */
|
|
45
|
+
--Control-Padding-X-Md: 1rem; /* 16px — px-4 */
|
|
46
|
+
--Control-Padding-X-Lg: 1.5rem; /* 24px — px-6 */
|
|
47
|
+
--Control-Padding-X-Xl: 2rem; /* 32px — px-8 */
|
|
48
|
+
|
|
49
|
+
/* アイコンとラベルの間隔(Button のベース gap-2) */
|
|
50
|
+
--Control-Gap: 0.5rem; /* 8px */
|
|
51
|
+
|
|
52
|
+
/* Button の角丸。既定はピル(rounded-full 相当)。
|
|
53
|
+
角ばったボタンにしたいプロダクトはここを 0.5rem 等に落とす。 */
|
|
54
|
+
--Control-Radius: 9999px;
|
|
55
|
+
|
|
56
|
+
/* ─── Field: Input / Textarea / SelectTrigger の内寸 ───
|
|
57
|
+
Control とは別スケール。ksk のフィールドは元々ボタンより背が高く
|
|
58
|
+
(Input は h-12)、横 padding も狭い(px-3)。同じ変数に畳むと
|
|
59
|
+
どちらかの実寸が変わってしまうため、独立した family として持つ。 */
|
|
60
|
+
--Field-Height-Sm: 2.25rem; /* 36px — h-9(SelectTrigger sm) */
|
|
61
|
+
--Field-Height-Md: 3rem; /* 48px — h-12(Input / SelectTrigger の既定) */
|
|
62
|
+
--Field-Height-Lg: 3.5rem; /* 56px — h-14(SelectTrigger lg) */
|
|
63
|
+
|
|
64
|
+
--Field-Padding-X-Sm: 0.625rem; /* 10px — px-2.5 */
|
|
65
|
+
--Field-Padding-X-Md: 0.75rem; /* 12px — px-3(Input / Textarea の既定) */
|
|
66
|
+
--Field-Padding-X-Lg: 1rem; /* 16px — px-4 */
|
|
67
|
+
|
|
68
|
+
--Field-Padding-Y: 0.5rem; /* 8px — Textarea の py-2 */
|
|
69
|
+
--Field-Min-Height: 5rem; /* 80px — Textarea の min-h */
|
|
70
|
+
|
|
71
|
+
/* Input / Textarea / SelectTrigger の角丸(rounded-lg = 8px) */
|
|
72
|
+
--Field-Radius: 0.5rem;
|
|
73
|
+
|
|
74
|
+
/* ─── Product: カードの余白リズム ───
|
|
75
|
+
面の色は `--card-surface`、角丸は `--Radius-Surface` が既に公開契約なので
|
|
76
|
+
ここでは重複させない(許可リストには両方載せている)。 */
|
|
77
|
+
--Product-Card-Padding: 1.5rem; /* 24px — p-6 */
|
|
78
|
+
--Product-Card-Gap: 1.5rem; /* 24px — gap-6 */
|
|
79
|
+
|
|
80
|
+
/* AdminShell の本文(<main>)縦 padding。既定は py-6 と同値。
|
|
81
|
+
AppShell / MarketingShell / MobileAppShell はページ本文の padding を
|
|
82
|
+
シェル自身が持たず(Container の gutter か呼び出し側の contentClassName に
|
|
83
|
+
委ねている)ため、対象外(issue #364 追補)。 */
|
|
84
|
+
--Product-Page-Padding-Y: 1.5rem; /* 24px — py-6 */
|
|
85
|
+
|
|
86
|
+
/* Chip のピル角丸。Button の --Control-Radius とは独立させてある。
|
|
87
|
+
プロダクトによってはボタンを角ばらせつつチップだけピルのまま、といった
|
|
88
|
+
組み合わせがあり得るため(issue #364 追補)。 */
|
|
89
|
+
--Chip-Radius: 9999px; /* rounded-full 相当 */
|
|
90
|
+
}
|
|
@@ -387,6 +387,8 @@
|
|
|
387
387
|
@source inline("gap-4");
|
|
388
388
|
@source inline("gap-6");
|
|
389
389
|
@source inline("gap-8");
|
|
390
|
+
@source inline("gap-[var(--Control-Gap)]");
|
|
391
|
+
@source inline("gap-[var(--Product-Card-Gap)]");
|
|
390
392
|
@source inline("gap-x-2");
|
|
391
393
|
@source inline("gap-x-4");
|
|
392
394
|
@source inline("gap-y-1");
|
|
@@ -440,6 +442,14 @@
|
|
|
440
442
|
@source inline("h-[58px]");
|
|
441
443
|
@source inline("h-[5px]");
|
|
442
444
|
@source inline("h-[60px]");
|
|
445
|
+
@source inline("h-[var(--Control-Height-Lg)]");
|
|
446
|
+
@source inline("h-[var(--Control-Height-Md)]");
|
|
447
|
+
@source inline("h-[var(--Control-Height-Sm)]");
|
|
448
|
+
@source inline("h-[var(--Control-Height-Xl)]");
|
|
449
|
+
@source inline("h-[var(--Control-Height-Xs)]");
|
|
450
|
+
@source inline("h-[var(--Field-Height-Lg)]");
|
|
451
|
+
@source inline("h-[var(--Field-Height-Md)]");
|
|
452
|
+
@source inline("h-[var(--Field-Height-Sm)]");
|
|
443
453
|
@source inline("h-[var(--radix-select-trigger-height)]");
|
|
444
454
|
@source inline("h-auto");
|
|
445
455
|
@source inline("h-full");
|
|
@@ -609,6 +619,8 @@
|
|
|
609
619
|
@source inline("min-h-[66px]");
|
|
610
620
|
@source inline("min-h-[80px]");
|
|
611
621
|
@source inline("min-h-[inherit]");
|
|
622
|
+
@source inline("min-h-[var(--Control-Height-Xl)]");
|
|
623
|
+
@source inline("min-h-[var(--Field-Min-Height)]");
|
|
612
624
|
@source inline("min-h-dvh");
|
|
613
625
|
@source inline("min-h-full");
|
|
614
626
|
@source inline("min-h-screen");
|
|
@@ -687,6 +699,7 @@
|
|
|
687
699
|
@source inline("p-4");
|
|
688
700
|
@source inline("p-6");
|
|
689
701
|
@source inline("p-8");
|
|
702
|
+
@source inline("p-[var(--Product-Card-Padding)]");
|
|
690
703
|
@source inline("p-px");
|
|
691
704
|
@source inline("paused");
|
|
692
705
|
@source inline("pb-0.5");
|
|
@@ -753,7 +766,14 @@
|
|
|
753
766
|
@source inline("px-4!");
|
|
754
767
|
@source inline("px-5");
|
|
755
768
|
@source inline("px-6");
|
|
756
|
-
@source inline("px-
|
|
769
|
+
@source inline("px-[var(--Control-Padding-X-Lg)]");
|
|
770
|
+
@source inline("px-[var(--Control-Padding-X-Md)]");
|
|
771
|
+
@source inline("px-[var(--Control-Padding-X-Sm)]");
|
|
772
|
+
@source inline("px-[var(--Control-Padding-X-Xl)]");
|
|
773
|
+
@source inline("px-[var(--Control-Padding-X-Xs)]");
|
|
774
|
+
@source inline("px-[var(--Field-Padding-X-Lg)]");
|
|
775
|
+
@source inline("px-[var(--Field-Padding-X-Md)]");
|
|
776
|
+
@source inline("px-[var(--Field-Padding-X-Sm)]");
|
|
757
777
|
@source inline("py-0.5");
|
|
758
778
|
@source inline("py-1");
|
|
759
779
|
@source inline("py-1.5");
|
|
@@ -769,6 +789,8 @@
|
|
|
769
789
|
@source inline("py-5");
|
|
770
790
|
@source inline("py-6");
|
|
771
791
|
@source inline("py-8");
|
|
792
|
+
@source inline("py-[var(--Field-Padding-Y)]");
|
|
793
|
+
@source inline("py-[var(--Product-Page-Padding-Y)]");
|
|
772
794
|
@source inline("py-[var(--Space-Section-2xl)]");
|
|
773
795
|
@source inline("py-[var(--Space-Section-md)]");
|
|
774
796
|
@source inline("py-[var(--Space-Section-xl)]");
|
|
@@ -801,6 +823,9 @@
|
|
|
801
823
|
@source inline("rounded-2xl");
|
|
802
824
|
@source inline("rounded-[5px]");
|
|
803
825
|
@source inline("rounded-[inherit]");
|
|
826
|
+
@source inline("rounded-[var(--Chip-Radius)]");
|
|
827
|
+
@source inline("rounded-[var(--Control-Radius)]");
|
|
828
|
+
@source inline("rounded-[var(--Field-Radius)]");
|
|
804
829
|
@source inline("rounded-[var(--Radius-Modal)]");
|
|
805
830
|
@source inline("rounded-[var(--Radius-Sheet)]");
|
|
806
831
|
@source inline("rounded-[var(--Radius-Surface)]");
|
|
@@ -808,7 +833,7 @@
|
|
|
808
833
|
@source inline("rounded-lg");
|
|
809
834
|
@source inline("rounded-md");
|
|
810
835
|
@source inline("rounded-none");
|
|
811
|
-
@source inline("rounded-r-
|
|
836
|
+
@source inline("rounded-r-[var(--Chip-Radius)]");
|
|
812
837
|
@source inline("rounded-r-none");
|
|
813
838
|
@source inline("rounded-r-sm");
|
|
814
839
|
@source inline("rounded-sm");
|
|
@@ -855,6 +880,9 @@
|
|
|
855
880
|
@source inline("size-[120px]");
|
|
856
881
|
@source inline("size-[58px]");
|
|
857
882
|
@source inline("size-[60px]");
|
|
883
|
+
@source inline("size-[var(--Control-Height-Lg)]");
|
|
884
|
+
@source inline("size-[var(--Control-Height-Md)]");
|
|
885
|
+
@source inline("size-[var(--Control-Height-Sm)]");
|
|
858
886
|
@source inline("size-auto");
|
|
859
887
|
@source inline("size-full");
|
|
860
888
|
@source inline("sm:bottom-4");
|