@baton8/general-components 2.1.0-alpha.6 → 2.1.0-alpha.8
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/dist/components/atoms/button/button.d.ts +0 -1
- package/dist/components/atoms/checkableContainer/checkableContainer.d.ts +10 -0
- package/dist/components/atoms/checkableContainer/checkableLabel.d.ts +4 -9
- package/dist/components/atoms/checkbox/checkbox.d.ts +0 -2
- package/dist/components/atoms/controlContainer/controlContainer.d.ts +10 -0
- package/dist/components/atoms/controlGroup/controlGroup.d.ts +29 -0
- package/dist/components/atoms/controlGroup/index.d.ts +1 -0
- package/dist/components/atoms/fileInput/fileInput.d.ts +0 -2
- package/dist/components/atoms/generalIcon/generalIcon.d.ts +1 -1
- package/dist/components/atoms/iconButton/iconButton.d.ts +0 -1
- package/dist/components/atoms/input/input.d.ts +0 -2
- package/dist/components/atoms/numberInput/numberInput.d.ts +0 -2
- package/dist/components/atoms/passwordInput/passwordInput.d.ts +0 -2
- package/dist/components/atoms/switch/switch.d.ts +0 -2
- package/dist/components/atoms/textarea/textarea.d.ts +2 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/controlState/context.d.ts +8 -0
- package/dist/index.js +174 -151
- package/dist/index.js.map +1 -1
- package/dist/stories/atoms/checkableContainer/checkableContainer.stories.d.ts +1 -0
- package/dist/stories/atoms/controlGroup/controlGroup.stories.d.ts +8 -0
- package/dist/utils/styles.d.ts +2 -0
- package/package.json +1 -1
|
@@ -27,6 +27,16 @@ export declare const CheckableContainer: import("react").ForwardRefExoticCompone
|
|
|
27
27
|
id?: string | undefined;
|
|
28
28
|
style?: import("react").CSSProperties | undefined;
|
|
29
29
|
} & {
|
|
30
|
+
/**
|
|
31
|
+
* バリデーションエラーがあるかどうか。
|
|
32
|
+
* `boolean` 値を設定すると、その値が子要素に伝搬されます。
|
|
33
|
+
*/
|
|
34
|
+
isError?: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 無効にするかどうか。
|
|
37
|
+
* `boolean` 値を設定すると、その値が子要素に伝搬されます。
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean | undefined;
|
|
30
40
|
/**
|
|
31
41
|
* 表示する内容。
|
|
32
42
|
* コントロールと `CheckableLabel` を 1 つずつ置いてください。
|
|
@@ -10,18 +10,13 @@ import { ReactNode } from "react";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const CheckableLabel: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* ### チェック系コントロール用のラベル
|
|
15
|
-
*
|
|
16
|
-
* #### 内部使用のみ
|
|
17
|
-
* このコンポーネントは [`CheckableContainer`](/docs/atoms-CheckableContainer-CheckableContainer--ドキュメント) の子要素に配置することを想定しているため、単独では使わないでください。
|
|
18
|
-
* 詳細は [`CheckableContainer`](/docs/atoms-CheckableContainer-CheckableContainer--ドキュメント) のドキュメントを参照してください。
|
|
19
|
-
* @group React コンポーネント
|
|
20
|
-
* @category React コンポーネント
|
|
21
|
-
*/
|
|
22
13
|
id?: string | undefined;
|
|
23
14
|
style?: import("react").CSSProperties | undefined;
|
|
24
15
|
} & {
|
|
16
|
+
/**
|
|
17
|
+
* 無効にするかどうか。
|
|
18
|
+
*/
|
|
19
|
+
isDisabled?: boolean | undefined;
|
|
25
20
|
/** */
|
|
26
21
|
children: ReactNode;
|
|
27
22
|
/** */
|
|
@@ -37,14 +37,12 @@ export declare const Checkbox: import("react").ForwardRefExoticComponent<import(
|
|
|
37
37
|
/**
|
|
38
38
|
* バリデーションエラーがあるかどうか。
|
|
39
39
|
* これが `true` のときは警告表示になります。
|
|
40
|
-
* @defaultValue `false`
|
|
41
40
|
*/
|
|
42
41
|
isError?: boolean | undefined;
|
|
43
42
|
/** */
|
|
44
43
|
isRequired?: boolean | undefined;
|
|
45
44
|
/**
|
|
46
45
|
* 無効にするかどうか。
|
|
47
|
-
* @defaultValue `false`
|
|
48
46
|
*/
|
|
49
47
|
isDisabled?: boolean | undefined;
|
|
50
48
|
/** */
|
|
@@ -55,6 +55,16 @@ export declare const ControlContainer: import("react").ForwardRefExoticComponent
|
|
|
55
55
|
* @defaultValue `true`
|
|
56
56
|
*/
|
|
57
57
|
isLabel?: boolean | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* バリデーションエラーがあるかどうか。
|
|
60
|
+
* `boolean` 値を設定すると、その値が子要素に伝搬されます。
|
|
61
|
+
*/
|
|
62
|
+
isError?: boolean | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* 無効にするかどうか。
|
|
65
|
+
* `boolean` 値を設定すると、その値が子要素に伝搬されます。
|
|
66
|
+
*/
|
|
67
|
+
isDisabled?: boolean | undefined;
|
|
58
68
|
/** */
|
|
59
69
|
children: ReactNode;
|
|
60
70
|
/** */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ### コントロールグループ
|
|
4
|
+
*
|
|
5
|
+
* #### 説明
|
|
6
|
+
* 複数のコントロールを横並びに隣接して表示します。
|
|
7
|
+
* 関連性の高いコントロールをまとめて 1 つのコントロールのように見せることができます。
|
|
8
|
+
*
|
|
9
|
+
* コントロールグループに対応したコンポーネントを直下に置くと、角丸や境界線の設定が自動で適用されます。
|
|
10
|
+
* 対応しているコンポーネントは以下の通りです。
|
|
11
|
+
* - [`Button`](/docs/atoms-Button-Button--ドキュメント)
|
|
12
|
+
* - [`IconButton`](/docs/atoms-IconButton-IconButton--ドキュメント)
|
|
13
|
+
* - [`Input`](/docs/atoms-Input-Input--ドキュメント)
|
|
14
|
+
* - [`PasswordInput`](/docs/atoms-PasswordInput-PasswordInput--ドキュメント)
|
|
15
|
+
* - [`FileInput`](/docs/atoms-FileInput-FileInput--ドキュメント)
|
|
16
|
+
*
|
|
17
|
+
* @group React コンポーネント
|
|
18
|
+
* @category React コンポーネント
|
|
19
|
+
*/
|
|
20
|
+
export declare const ControlGroup: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
|
|
21
|
+
className?: string | undefined;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
style?: import("react").CSSProperties | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
/** */
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
/** */
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./controlGroup";
|
|
@@ -22,14 +22,12 @@ type FileInputProps<M extends boolean> = CommonProps & AriaAttributes & {
|
|
|
22
22
|
/**
|
|
23
23
|
* バリデーションエラーがあるかどうか。
|
|
24
24
|
* これが `true` のときは警告表示になります。
|
|
25
|
-
* @defaultValue `false`
|
|
26
25
|
*/
|
|
27
26
|
isError?: boolean;
|
|
28
27
|
/** */
|
|
29
28
|
isRequired?: boolean;
|
|
30
29
|
/**
|
|
31
30
|
* 無効にするかどうか。
|
|
32
|
-
* @defaultValue `false`
|
|
33
31
|
*/
|
|
34
32
|
isDisabled?: boolean;
|
|
35
33
|
/** */
|
|
@@ -42,7 +42,7 @@ export declare const GeneralIcon: import("react").ForwardRefExoticComponent<impo
|
|
|
42
42
|
* アイコンの反転。
|
|
43
43
|
* @defaultValue `"none"`
|
|
44
44
|
*/
|
|
45
|
-
flip?: "
|
|
45
|
+
flip?: "none" | "both" | "horizontal" | "vertical" | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* アイコンの回転角度。
|
|
48
48
|
* @defaultValue `0`
|
|
@@ -62,14 +62,12 @@ export declare const Input: import("react").ForwardRefExoticComponent<import("..
|
|
|
62
62
|
/**
|
|
63
63
|
* バリデーションエラーがあるかどうか。
|
|
64
64
|
* これが `true` のときは警告表示になります。
|
|
65
|
-
* @defaultValue `false`
|
|
66
65
|
*/
|
|
67
66
|
isError?: boolean | undefined;
|
|
68
67
|
/** */
|
|
69
68
|
isRequired?: boolean | undefined;
|
|
70
69
|
/**
|
|
71
70
|
* 無効にするかどうか。
|
|
72
|
-
* @defaultValue `false`
|
|
73
71
|
*/
|
|
74
72
|
isDisabled?: boolean | undefined;
|
|
75
73
|
/** */
|
|
@@ -47,14 +47,12 @@ export declare const NumberInput: import("react").ForwardRefExoticComponent<impo
|
|
|
47
47
|
/**
|
|
48
48
|
* バリデーションエラーがあるかどうか。
|
|
49
49
|
* これが `true` のときは警告表示になります。
|
|
50
|
-
* @defaultValue `false`
|
|
51
50
|
*/
|
|
52
51
|
isError?: boolean | undefined;
|
|
53
52
|
/** */
|
|
54
53
|
isRequired?: boolean | undefined;
|
|
55
54
|
/**
|
|
56
55
|
* 無効にするかどうか。
|
|
57
|
-
* @defaultValue `false`
|
|
58
56
|
*/
|
|
59
57
|
isDisabled?: boolean | undefined;
|
|
60
58
|
/** */
|
|
@@ -36,14 +36,12 @@ export declare const PasswordInput: import("react").ForwardRefExoticComponent<im
|
|
|
36
36
|
/**
|
|
37
37
|
* バリデーションエラーがあるかどうか。
|
|
38
38
|
* これが `true` のときは警告表示になります。
|
|
39
|
-
* @defaultValue `false`
|
|
40
39
|
*/
|
|
41
40
|
isError?: boolean | undefined;
|
|
42
41
|
/** */
|
|
43
42
|
isRequired?: boolean | undefined;
|
|
44
43
|
/**
|
|
45
44
|
* 無効にするかどうか。
|
|
46
|
-
* @defaultValue `false`
|
|
47
45
|
*/
|
|
48
46
|
isDisabled?: boolean | undefined;
|
|
49
47
|
/** */
|
|
@@ -34,14 +34,12 @@ export declare const Switch: import("react").ForwardRefExoticComponent<import(".
|
|
|
34
34
|
/**
|
|
35
35
|
* バリデーションエラーがあるかどうか。
|
|
36
36
|
* これが `true` のときは警告表示になります。
|
|
37
|
-
* @defaultValue `false`
|
|
38
37
|
*/
|
|
39
38
|
isError?: boolean | undefined;
|
|
40
39
|
/** */
|
|
41
40
|
isRequired?: boolean | undefined;
|
|
42
41
|
/**
|
|
43
42
|
* 無効にするかどうか。
|
|
44
|
-
* @defaultValue `false`
|
|
45
43
|
*/
|
|
46
44
|
isDisabled?: boolean | undefined;
|
|
47
45
|
/** */
|
|
@@ -7,7 +7,7 @@ import { AriaAttributes, ChangeEvent } from "react";
|
|
|
7
7
|
export declare const Textarea: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
id?: string | undefined;
|
|
10
|
-
style?: import("react").CSSProperties | undefined;
|
|
10
|
+
style?: import("react").CSSProperties | undefined;
|
|
11
11
|
} & AriaAttributes & {
|
|
12
12
|
/** */
|
|
13
13
|
value?: string | undefined;
|
|
@@ -23,7 +23,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<import(
|
|
|
23
23
|
* リサイズ可能な方向。
|
|
24
24
|
* @defaultValue `"vertical"`
|
|
25
25
|
*/
|
|
26
|
-
resize?: "
|
|
26
|
+
resize?: "none" | "both" | "horizontal" | "vertical" | undefined;
|
|
27
27
|
/** */
|
|
28
28
|
inputMode?: "search" | "numeric" | "decimal" | "text" | "none" | "tel" | "url" | "email" | undefined;
|
|
29
29
|
/**
|
|
@@ -42,14 +42,12 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<import(
|
|
|
42
42
|
/**
|
|
43
43
|
* バリデーションエラーがあるかどうか。
|
|
44
44
|
* これが `true` のときは警告表示になります。
|
|
45
|
-
* @defaultValue `false`
|
|
46
45
|
*/
|
|
47
46
|
isError?: boolean | undefined;
|
|
48
47
|
/** */
|
|
49
48
|
isRequired?: boolean | undefined;
|
|
50
49
|
/**
|
|
51
50
|
* 無効にするかどうか。
|
|
52
|
-
* @defaultValue `false`
|
|
53
51
|
*/
|
|
54
52
|
isDisabled?: boolean | undefined;
|
|
55
53
|
/** */
|
|
@@ -7,6 +7,7 @@ export * from "./atoms/button";
|
|
|
7
7
|
export * from "./atoms/checkableContainer";
|
|
8
8
|
export * from "./atoms/checkbox";
|
|
9
9
|
export * from "./atoms/controlContainer";
|
|
10
|
+
export * from "./atoms/controlGroup";
|
|
10
11
|
export * from "./atoms/divider";
|
|
11
12
|
export * from "./atoms/fileInput";
|
|
12
13
|
export * from "./atoms/generalIcon";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ControlStateContextValue = {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isError?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const controlStateContext: import("react").Context<ControlStateContextValue | undefined>;
|
|
7
|
+
export declare const ControlStateProvider: import("react").Provider<ControlStateContextValue | undefined>;
|
|
8
|
+
export {};
|