@charcoal-ui/react 6.0.0-rc.3 → 6.0.0-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charcoal-ui/react",
3
- "version": "6.0.0-rc.3",
3
+ "version": "6.0.0-rc.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -42,10 +42,10 @@
42
42
  "polished": "^4.1.4",
43
43
  "react-compiler-runtime": "1.0.0",
44
44
  "warning": "^4.0.3",
45
- "@charcoal-ui/theme": "6.0.0-rc.3",
46
- "@charcoal-ui/foundation": "6.0.0-rc.3",
47
- "@charcoal-ui/utils": "6.0.0-rc.3",
48
- "@charcoal-ui/icons": "6.0.0-rc.3"
45
+ "@charcoal-ui/theme": "6.0.0-rc.4",
46
+ "@charcoal-ui/foundation": "6.0.0-rc.4",
47
+ "@charcoal-ui/utils": "6.0.0-rc.4",
48
+ "@charcoal-ui/icons": "6.0.0-rc.4"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=17.0.0",
@@ -5,7 +5,7 @@ import path from 'node:path'
5
5
  const componentsDir = path.resolve(import.meta.dirname, '../components')
6
6
  const unstableCssDir = path.resolve(
7
7
  import.meta.dirname,
8
- '../../../theme/src/unstable-css',
8
+ '../../../theme/src/css/v2',
9
9
  )
10
10
 
11
11
  async function getCssFiles(dir: string): Promise<string[]> {
@@ -6,7 +6,7 @@ import postcss, { type Rule } from 'postcss'
6
6
  // Design Token 1.0互換モードの「見た目の非破壊」を検証する。
7
7
  //
8
8
  // 移行: 旧 `@charcoal-ui/react/dist/index.css` (v1, --charcoal-* を直接使用)
9
- // → 新 コンポーネントCSS (v2, --charcoal-color-* を使用) + `_token_v1.css` remap
9
+ // → 新 コンポーネントCSS (v2, --charcoal-color-* を使用) + `v1/remap.css` remap
10
10
  //
11
11
  // 非破壊であるためには、各 (セレクタ, プロパティ) で新CSSが使う 1つの --charcoal-color-*
12
12
  // が、旧CSSで使われていた「単一の」--charcoal-* に対応していなければならない。同じ新トークンが
@@ -3,9 +3,9 @@ import fs from 'node:fs/promises'
3
3
  import path from 'node:path'
4
4
  import postcss from 'postcss'
5
5
 
6
- // Design Token 1.0互換モード (`@charcoal-ui/theme/css/_token_v1.css`) の remap を検証する。
6
+ // Design Token 1.0互換モード (`@charcoal-ui/theme/css/v1/remap.css`) の remap を検証する。
7
7
  //
8
- // アプリは 1.0互換 (`_token_v1.css`) か 2.0 (`_variables_*.css`) のいずれかで --charcoal-color-*
8
+ // アプリは 1.0互換 (`v1/remap.css`) か 2.0 (`v2/{light,dark}.css`) のいずれかで --charcoal-color-*
9
9
  // を供給し、コンポーネント実装CSS (`@charcoal-ui/react`) がそれを消費する。remap が
10
10
  // 「壊さない・冗長でない・正しい」ことを次で担保する:
11
11
  // 1. 非破壊: コンポーネントが使う --charcoal-color-* は全て remap 経由で解決できる。
@@ -13,8 +13,8 @@ import postcss from 'postcss'
13
13
  // 3. 冗長でない: 2.0 API にも無く・内部参照も無く・コンポーネントも使わないトークンを持たない。
14
14
 
15
15
  const cssDir = path.resolve(import.meta.dirname, '../../../theme/src/css')
16
- const tokenV1Path = path.join(cssDir, '_token_v1.css')
17
- const variables2Path = path.join(cssDir, '_variables_light.css')
16
+ const tokenV1Path = path.join(cssDir, 'v1/remap.css')
17
+ const variables2Path = path.join(cssDir, 'v2/light.css')
18
18
  const componentsDir = path.resolve(import.meta.dirname, '../components')
19
19
 
20
20
  const COLOR_PREFIX = '--charcoal-color-'
@@ -89,7 +89,7 @@ for (const file of componentCssFiles) {
89
89
  componentUsed.add(v)
90
90
  }
91
91
 
92
- describe('Design Token 1.0互換 (_token_v1.css) remap', () => {
92
+ describe('Design Token 1.0互換 (v1/remap.css) remap', () => {
93
93
  it('重複定義がない', () => {
94
94
  expect(duplicates).toEqual([])
95
95
  })
@@ -119,7 +119,7 @@ describe('Design Token 1.0互換 (_token_v1.css) remap', () => {
119
119
  })
120
120
 
121
121
  it.each(componentCssFiles)(
122
- '%s: 使用する --charcoal-color-* は全て _token_v1.css 経由で解決する (非破壊)',
122
+ '%s: 使用する --charcoal-color-* は全て v1/remap.css 経由で解決する (非破壊)',
123
123
  async (file) => {
124
124
  const css = await fs.readFile(file, 'utf-8')
125
125
  const unresolved = [...usedColorVars(css)]