@zenkigen-inc/component-ui 1.22.0 → 2.0.0-rc.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/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
@@ -3630,7 +3630,7 @@ function Radio({
3630
3630
  { "size-5": !isLarge, "size-7": isLarge },
3631
3631
  import_component_theme14.focusVisible.normalPeer,
3632
3632
  {
3633
- "border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
3633
+ "border-disabled01 hover:border-disabled01": isDisabled,
3634
3634
  "border-hoverUiBorder": !isDisabled && isMouseOver,
3635
3635
  "border-uiBorder04": !isDisabled,
3636
3636
  "cursor-not-allowed": isDisabled,
@@ -3889,7 +3889,7 @@ var Search = (0, import_react56.forwardRef)(({ width = "100%", size = "medium",
3889
3889
  { "h-8 px-3": size === "medium" },
3890
3890
  { "h-10 px-4": size === "large" }
3891
3891
  );
3892
- const inputClasses = (0, import_clsx36.clsx)("mx-2 h-full flex-1 text-text01 outline-none placeholder:text-textPlaceholder", {
3892
+ const inputClasses = (0, import_clsx36.clsx)("mx-2 h-full flex-1 text-text01 outline-hidden placeholder:text-textPlaceholder", {
3893
3893
  ["typography-label14regular"]: size === "medium",
3894
3894
  ["typography-label16regular"]: size === "large"
3895
3895
  });
@@ -4828,7 +4828,7 @@ function TextAreaInner({
4828
4828
  // className は variant="outline" のみ受け入れ、後方互換のため wrapper の末尾に合成(@deprecated)
4829
4829
  !isBorderless && className
4830
4830
  );
4831
- const textAreaClassName = (0, import_clsx53.clsx)("w-full border-none bg-uiBackground01 outline-none", {
4831
+ const textAreaClassName = (0, import_clsx53.clsx)("w-full border-none bg-uiBackground01 outline-hidden", {
4832
4832
  // outline: 従来の padding
4833
4833
  "typography-body14regular px-2 py-2": !isBorderless && size === "medium",
4834
4834
  "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
@@ -3555,7 +3555,7 @@ function Radio({
3555
3555
  { "size-5": !isLarge, "size-7": isLarge },
3556
3556
  focusVisible12.normalPeer,
3557
3557
  {
3558
- "border-disabled01 hover:border-disabled01": isDisabled && !isMouseOver,
3558
+ "border-disabled01 hover:border-disabled01": isDisabled,
3559
3559
  "border-hoverUiBorder": !isDisabled && isMouseOver,
3560
3560
  "border-uiBorder04": !isDisabled,
3561
3561
  "cursor-not-allowed": isDisabled,
@@ -3814,7 +3814,7 @@ var Search = forwardRef12(({ width = "100%", size = "medium", ...props }, ref) =
3814
3814
  { "h-8 px-3": size === "medium" },
3815
3815
  { "h-10 px-4": size === "large" }
3816
3816
  );
3817
- const inputClasses = clsx36("mx-2 h-full flex-1 text-text01 outline-none placeholder:text-textPlaceholder", {
3817
+ const inputClasses = clsx36("mx-2 h-full flex-1 text-text01 outline-hidden placeholder:text-textPlaceholder", {
3818
3818
  ["typography-label14regular"]: size === "medium",
3819
3819
  ["typography-label16regular"]: size === "large"
3820
3820
  });
@@ -4753,7 +4753,7 @@ function TextAreaInner({
4753
4753
  // className は variant="outline" のみ受け入れ、後方互換のため wrapper の末尾に合成(@deprecated)
4754
4754
  !isBorderless && className
4755
4755
  );
4756
- const textAreaClassName = clsx53("w-full border-none bg-uiBackground01 outline-none", {
4756
+ const textAreaClassName = clsx53("w-full border-none bg-uiBackground01 outline-hidden", {
4757
4757
  // outline: 従来の padding
4758
4758
  "typography-body14regular px-2 py-2": !isBorderless && size === "medium",
4759
4759
  "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.22.0",
3
+ "version": "2.0.0-rc.0",
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
- "@floating-ui/react": "0.27.19",
41
- "@zenkigen-inc/component-config": "1.22.0",
42
- "@zenkigen-inc/component-icons": "1.22.0",
43
- "@zenkigen-inc/component-theme": "1.22.0",
42
+ "@floating-ui/react": "0.27.20",
43
+ "@zenkigen-inc/component-config": "2.0.0-rc.0",
44
+ "@zenkigen-inc/component-icons": "2.0.0-rc.0",
45
+ "@zenkigen-inc/component-theme": "2.0.0-rc.0",
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';