@zenkigen-inc/component-ui 1.23.1 → 2.0.0-rc.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.
package/README.md CHANGED
@@ -15,20 +15,17 @@
15
15
  yarn add @zenkigen-inc/component-ui @zenkigen-inc/component-config
16
16
  ```
17
17
 
18
- Tailwind CSSの設定に以下を追加する。
19
-
20
- ```diff
21
- {
22
-
23
- content: [
24
- + './node_modules/@zenkigen-inc/**/*.{js,ts,tsx}',
25
- ],
26
- presets: [
27
- + require('@zenkigen-inc/component-config')
28
- ],
29
- }
18
+ **Tailwind CSS v4 が必須です。** CSS エントリ(例: `globals.css`)に以下を追加する。
19
+
20
+ ```css
21
+ @import 'tailwindcss';
22
+ @import '@zenkigen-inc/component-ui/styles';
30
23
  ```
31
24
 
25
+ `@zenkigen-inc/component-ui/styles` は、デザイントークンの読み込み(`@zenkigen-inc/component-config/styles`)と、コンポーネントが実行時に参照する動的クラスの検出(`@source`)をまとめて提供する。`node_modules` への相対パス指定は不要。
26
+
27
+ PostCSS プラグインは `@tailwindcss/postcss` を使用する(`autoprefixer` は不要)。v1.x(Tailwind v3 / JS preset)からの移行手順は [v1 → v2 移行ガイド](https://github.com/zenkigen/zenkigen-component/blob/main/docs/migration-v1-to-v2.md) を参照。
28
+
32
29
  ## 利用方法
33
30
 
34
31
  ```tsx
package/dist/index.js CHANGED
@@ -318,7 +318,7 @@ var CheckedIcon = ({ size = "medium" }) => {
318
318
  {
319
319
  viewBox: "0 0 20 20",
320
320
  xmlns: "http://www.w3.org/2000/svg",
321
- className: (0, import_clsx5.default)("absolute z-10 rounded-sm fill-iconOnColor hover:rounded-sm", {
321
+ className: (0, import_clsx5.default)("absolute z-10 rounded-xs fill-iconOnColor hover:rounded-xs", {
322
322
  "size-5": size === "medium",
323
323
  "size-6": size === "large"
324
324
  }),
@@ -343,7 +343,7 @@ var MinusIcon = ({ size = "medium" }) => {
343
343
  {
344
344
  viewBox: "0 0 20 20",
345
345
  xmlns: "http://www.w3.org/2000/svg",
346
- className: (0, import_clsx6.default)("absolute z-10 rounded-sm fill-iconOnColor hover:rounded-sm", {
346
+ className: (0, import_clsx6.default)("absolute z-10 rounded-xs fill-iconOnColor hover:rounded-xs", {
347
347
  "size-5": size === "medium",
348
348
  "size-6": size === "large"
349
349
  }),
@@ -383,7 +383,7 @@ function Checkbox({
383
383
  "cursor-pointer": !isDisabled
384
384
  });
385
385
  const boxClasses = (0, import_clsx7.default)(
386
- "inline-flex items-center justify-center rounded-sm border bg-white",
386
+ "inline-flex items-center justify-center rounded-xs border bg-white",
387
387
  sizeBox,
388
388
  import_component_theme3.focusVisible.normalPeer,
389
389
  {
@@ -399,7 +399,7 @@ function Checkbox({
399
399
  "bg-disabled01": isDisabled && isChecked,
400
400
  "border-disabled01": isDisabled
401
401
  });
402
- const afterClasses = (0, import_clsx7.default)("absolute inset-0 m-auto block rounded-sm", {
402
+ const afterClasses = (0, import_clsx7.default)("absolute inset-0 m-auto block rounded-xs", {
403
403
  "bg-disabled01": isDisabled && isChecked,
404
404
  "bg-hover01": !(isDisabled && isChecked) && isMouseOver,
405
405
  "bg-interactive01": !(isDisabled && isChecked) && !isMouseOver,
@@ -677,7 +677,7 @@ function TextInputInner({
677
677
  "pr-2": !isBorderless && size === "medium" && hasTrailingElement,
678
678
  "pr-3": !isBorderless && (size === "large" || size === "x-large") && hasTrailingElement
679
679
  });
680
- const inputClasses = (0, import_clsx11.clsx)("flex-1 bg-transparent outline-none", {
680
+ const inputClasses = (0, import_clsx11.clsx)("flex-1 bg-transparent outline-hidden", {
681
681
  "disabled:text-textPlaceholder": !isBorderless,
682
682
  "disabled:text-disabled01": isBorderless,
683
683
  // outline: 従来の padding
@@ -3697,7 +3697,7 @@ function Radio({
3697
3697
  { "size-5": !isLarge, "size-7": isLarge },
3698
3698
  import_component_theme14.focusVisible.normalPeer,
3699
3699
  {
3700
- "border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
3700
+ "border-disabled01 hover:border-disabled01": isDisabled,
3701
3701
  "border-hoverUiBorder": !isDisabled && isMouseOver,
3702
3702
  "border-uiBorder04": !isDisabled,
3703
3703
  "cursor-not-allowed": isDisabled,
@@ -3956,7 +3956,7 @@ var Search = (0, import_react56.forwardRef)(({ width = "100%", size = "medium",
3956
3956
  { "h-8 px-3": size === "medium" },
3957
3957
  { "h-10 px-4": size === "large" }
3958
3958
  );
3959
- const inputClasses = (0, import_clsx36.clsx)("mx-2 h-full flex-1 text-text01 outline-none placeholder:text-textPlaceholder", {
3959
+ const inputClasses = (0, import_clsx36.clsx)("mx-2 h-full flex-1 text-text01 outline-hidden placeholder:text-textPlaceholder", {
3960
3960
  ["typography-label14regular"]: size === "medium",
3961
3961
  ["typography-label16regular"]: size === "large"
3962
3962
  });
@@ -4895,7 +4895,7 @@ function TextAreaInner({
4895
4895
  // className は variant="outline" のみ受け入れ、後方互換のため wrapper の末尾に合成(@deprecated)
4896
4896
  !isBorderless && className
4897
4897
  );
4898
- const textAreaClassName = (0, import_clsx53.clsx)("w-full border-none bg-uiBackground01 outline-none", {
4898
+ const textAreaClassName = (0, import_clsx53.clsx)("w-full border-none bg-uiBackground01 outline-hidden", {
4899
4899
  // outline: 従来の padding
4900
4900
  "typography-body14regular px-2 py-2": !isBorderless && size === "medium",
4901
4901
  "typography-body16regular px-3 py-2": !isBorderless && size === "large",
package/dist/index.mjs CHANGED
@@ -233,7 +233,7 @@ var CheckedIcon = ({ size = "medium" }) => {
233
233
  {
234
234
  viewBox: "0 0 20 20",
235
235
  xmlns: "http://www.w3.org/2000/svg",
236
- className: clsx5("absolute z-10 rounded-sm fill-iconOnColor hover:rounded-sm", {
236
+ className: clsx5("absolute z-10 rounded-xs fill-iconOnColor hover:rounded-xs", {
237
237
  "size-5": size === "medium",
238
238
  "size-6": size === "large"
239
239
  }),
@@ -258,7 +258,7 @@ var MinusIcon = ({ size = "medium" }) => {
258
258
  {
259
259
  viewBox: "0 0 20 20",
260
260
  xmlns: "http://www.w3.org/2000/svg",
261
- className: clsx6("absolute z-10 rounded-sm fill-iconOnColor hover:rounded-sm", {
261
+ className: clsx6("absolute z-10 rounded-xs fill-iconOnColor hover:rounded-xs", {
262
262
  "size-5": size === "medium",
263
263
  "size-6": size === "large"
264
264
  }),
@@ -298,7 +298,7 @@ function Checkbox({
298
298
  "cursor-pointer": !isDisabled
299
299
  });
300
300
  const boxClasses = clsx7(
301
- "inline-flex items-center justify-center rounded-sm border bg-white",
301
+ "inline-flex items-center justify-center rounded-xs border bg-white",
302
302
  sizeBox,
303
303
  focusVisible2.normalPeer,
304
304
  {
@@ -314,7 +314,7 @@ function Checkbox({
314
314
  "bg-disabled01": isDisabled && isChecked,
315
315
  "border-disabled01": isDisabled
316
316
  });
317
- const afterClasses = clsx7("absolute inset-0 m-auto block rounded-sm", {
317
+ const afterClasses = clsx7("absolute inset-0 m-auto block rounded-xs", {
318
318
  "bg-disabled01": isDisabled && isChecked,
319
319
  "bg-hover01": !(isDisabled && isChecked) && isMouseOver,
320
320
  "bg-interactive01": !(isDisabled && isChecked) && !isMouseOver,
@@ -592,7 +592,7 @@ function TextInputInner({
592
592
  "pr-2": !isBorderless && size === "medium" && hasTrailingElement,
593
593
  "pr-3": !isBorderless && (size === "large" || size === "x-large") && hasTrailingElement
594
594
  });
595
- const inputClasses = clsx11("flex-1 bg-transparent outline-none", {
595
+ const inputClasses = clsx11("flex-1 bg-transparent outline-hidden", {
596
596
  "disabled:text-textPlaceholder": !isBorderless,
597
597
  "disabled:text-disabled01": isBorderless,
598
598
  // outline: 従来の padding
@@ -3622,7 +3622,7 @@ function Radio({
3622
3622
  { "size-5": !isLarge, "size-7": isLarge },
3623
3623
  focusVisible12.normalPeer,
3624
3624
  {
3625
- "border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
3625
+ "border-disabled01 hover:border-disabled01": isDisabled,
3626
3626
  "border-hoverUiBorder": !isDisabled && isMouseOver,
3627
3627
  "border-uiBorder04": !isDisabled,
3628
3628
  "cursor-not-allowed": isDisabled,
@@ -3881,7 +3881,7 @@ var Search = forwardRef12(({ width = "100%", size = "medium", ...props }, ref) =
3881
3881
  { "h-8 px-3": size === "medium" },
3882
3882
  { "h-10 px-4": size === "large" }
3883
3883
  );
3884
- const inputClasses = clsx36("mx-2 h-full flex-1 text-text01 outline-none placeholder:text-textPlaceholder", {
3884
+ const inputClasses = clsx36("mx-2 h-full flex-1 text-text01 outline-hidden placeholder:text-textPlaceholder", {
3885
3885
  ["typography-label14regular"]: size === "medium",
3886
3886
  ["typography-label16regular"]: size === "large"
3887
3887
  });
@@ -4820,7 +4820,7 @@ function TextAreaInner({
4820
4820
  // className は variant="outline" のみ受け入れ、後方互換のため wrapper の末尾に合成(@deprecated)
4821
4821
  !isBorderless && className
4822
4822
  );
4823
- const textAreaClassName = clsx53("w-full border-none bg-uiBackground01 outline-none", {
4823
+ const textAreaClassName = clsx53("w-full border-none bg-uiBackground01 outline-hidden", {
4824
4824
  // outline: 従来の padding
4825
4825
  "typography-body14regular px-2 py-2": !isBorderless && size === "medium",
4826
4826
  "typography-body16regular px-3 py-2": !isBorderless && size === "large",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenkigen-inc/component-ui",
3
- "version": "1.23.1",
3
+ "version": "2.0.0-rc.1",
4
4
  "repository": "https://github.com/zenkigen/zenkigen-component",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -14,7 +14,8 @@
14
14
  ".": {
15
15
  "import": "./dist/index.mjs",
16
16
  "require": "./dist/index.js"
17
- }
17
+ },
18
+ "./styles": "./styles.css"
18
19
  },
19
20
  "scripts": {
20
21
  "type-check": "tsc --noEmit",
@@ -34,13 +35,14 @@
34
35
  },
35
36
  "peerDependencies": {
36
37
  "react": "^18.0.0 || ^19.0.0",
37
- "react-dom": "^18.0.0 || ^19.0.0"
38
+ "react-dom": "^18.0.0 || ^19.0.0",
39
+ "tailwindcss": "^4.0.0"
38
40
  },
39
41
  "dependencies": {
40
42
  "@floating-ui/react": "0.27.20",
41
- "@zenkigen-inc/component-config": "1.23.1",
42
- "@zenkigen-inc/component-icons": "1.23.1",
43
- "@zenkigen-inc/component-theme": "1.23.1",
43
+ "@zenkigen-inc/component-config": "2.0.0-rc.1",
44
+ "@zenkigen-inc/component-icons": "2.0.0-rc.1",
45
+ "@zenkigen-inc/component-theme": "2.0.0-rc.1",
44
46
  "clsx": "2.1.1",
45
47
  "react-day-picker": "9.14.0"
46
48
  }
package/styles.css ADDED
@@ -0,0 +1,8 @@
1
+ /* zenkigen-component 利用側のエントリポイント。
2
+ デザイントークン(component-config/styles)の読み込みと、コンポーネントが
3
+ 実行時に参照する動的クラスの検出(@source)をまとめて提供する。
4
+ @source の相対パスはこのファイルの場所基準で解決される。 */
5
+ @import '@zenkigen-inc/component-config/styles';
6
+ @import '@zenkigen-inc/component-theme/source';
7
+
8
+ @source './dist/**/*.mjs';