@baton8/general-components 1.2.0-alpha.0 → 1.2.0-alpha.10

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.
Files changed (27) hide show
  1. package/dist/components/atoms/checkbox/checkbox.d.ts +8 -0
  2. package/dist/components/atoms/controlContainer/controlContainer.d.ts +7 -1
  3. package/dist/components/atoms/input/input.d.ts +8 -0
  4. package/dist/components/atoms/radio/radio.d.ts +8 -0
  5. package/dist/components/atoms/root/defaultGlobalStyle.d.ts +1 -1
  6. package/dist/components/atoms/root/root.d.ts +2 -0
  7. package/dist/components/atoms/textarea/textarea.d.ts +15 -0
  8. package/dist/components/modules/card/cardTitle.d.ts +2 -2
  9. package/dist/components/modules/contentHeader/contentTitle.d.ts +1 -1
  10. package/dist/components/modules/dialog/dialogButton.d.ts +17 -29
  11. package/dist/components/modules/dialog/dialogFooter.d.ts +1 -1
  12. package/dist/components/modules/drawer/drawer.d.ts +12 -0
  13. package/dist/components/modules/drawer/drawerBody.d.ts +0 -2
  14. package/dist/components/modules/drawer/drawerButton.d.ts +17 -31
  15. package/dist/components/modules/drawer/drawerCaption.d.ts +0 -2
  16. package/dist/components/modules/drawer/drawerFooter.d.ts +3 -2
  17. package/dist/components/modules/drawer/drawerHeader.d.ts +0 -2
  18. package/dist/components/modules/drawer/drawerHeaderLeft.d.ts +13 -0
  19. package/dist/components/modules/drawer/drawerHeaderRight.d.ts +13 -0
  20. package/dist/components/modules/drawer/drawerTitle.d.ts +0 -2
  21. package/dist/components/modules/drawer/index.d.ts +2 -1
  22. package/dist/components/modules/tabList/tab.d.ts +3 -1
  23. package/dist/index.js +78 -99
  24. package/dist/index.js.map +1 -1
  25. package/dist/stories/atoms/multiLineText/multiLineText.stories.d.ts +2 -1
  26. package/dist/stories/modules/drawer/drawer.stories.d.ts +1 -2
  27. package/package.json +1 -3
@@ -53,4 +53,12 @@ export declare const Checkbox: import("react").ForwardRefExoticComponent<import(
53
53
  onBlur?: ((event: ChangeEvent<HTMLInputElement>) => unknown) | undefined;
54
54
  /** */
55
55
  className?: string | undefined;
56
+ /**
57
+ * 内部の `<input>` 要素のクラス名。
58
+ */
59
+ inputClassName?: string | undefined;
60
+ /**
61
+ * 内部の `<input>` 要素の ID。
62
+ */
63
+ inputId?: string | undefined;
56
64
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -49,8 +49,14 @@ export declare const ControlContainer: import("react").ForwardRefExoticComponent
49
49
  id?: string | undefined;
50
50
  style?: import("react").CSSProperties | undefined;
51
51
  } & {
52
+ /**
53
+ * `<label>` 要素で描画するかどうか。
54
+ * これを `true` にすることで、内部に置くラベルを含んだ全体をクリックしたときに、コントロールをトリガーできるようになります。
55
+ * @defaultValue `true`
56
+ */
57
+ isLabel?: boolean | undefined;
52
58
  /** */
53
59
  children: ReactNode;
54
60
  /** */
55
61
  className?: string | undefined;
56
- } & import("react").RefAttributes<HTMLLabelElement>>;
62
+ } & import("react").RefAttributes<HTMLElement>>;
@@ -83,4 +83,12 @@ export declare const Input: import("react").ForwardRefExoticComponent<import("..
83
83
  children?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | [ReactElement<any, string | import("react").JSXElementConstructor<any>>] | [ReactElement<any, string | import("react").JSXElementConstructor<any>>, ReactElement<any, string | import("react").JSXElementConstructor<any>>] | undefined;
84
84
  /** */
85
85
  className?: string | undefined;
86
+ /**
87
+ * 内部の `<input>` 要素のクラス名。
88
+ */
89
+ inputClassName?: string | undefined;
90
+ /**
91
+ * 内部の `<input>` 要素の ID。
92
+ */
93
+ inputId?: string | undefined;
86
94
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -50,4 +50,12 @@ export declare const Radio: import("react").ForwardRefExoticComponent<import("..
50
50
  onBlur?: ((event: ChangeEvent<HTMLInputElement>) => unknown) | undefined;
51
51
  /** */
52
52
  className?: string | undefined;
53
+ /**
54
+ * 内部の `<input>` 要素のクラス名。
55
+ */
56
+ inputClassName?: string | undefined;
57
+ /**
58
+ * 内部の `<input>` 要素の ID。
59
+ */
60
+ inputId?: string | undefined;
53
61
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1 +1 @@
1
- export declare const defaultGlobalStyle: (rootFontSize: string) => import("@emotion/utils").SerializedStyles;
1
+ export declare const defaultGlobalStyle: (rootFontSize: string, resetAll: boolean) => import("@emotion/utils").SerializedStyles;
@@ -39,6 +39,8 @@ type RootProps = {
39
39
  /** */
40
40
  defaultReady?: boolean;
41
41
  /** */
42
+ resetCssAll?: boolean;
43
+ /** */
42
44
  children: ReactNode;
43
45
  };
44
46
  /**
@@ -30,6 +30,13 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<import(
30
30
  autoComplete?: string | undefined;
31
31
  /** */
32
32
  autoFocus?: boolean | undefined;
33
+ /**
34
+ * 右端で入力テキストが折り返されるかどうか。
35
+ * - `true` — 右端でテキストが折り返されます。
36
+ * - `false` — 右端でテキストは折り返されず、水平スクロールバーが表示されます。
37
+ * @defaultValue `true`
38
+ */
39
+ isWrapped?: boolean | undefined;
33
40
  /**
34
41
  * バリデーションエラーがあるかどうか。
35
42
  * これが `true` のときは警告表示になります。
@@ -54,4 +61,12 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<import(
54
61
  onBlur?: ((event: ChangeEvent<HTMLTextAreaElement>) => unknown) | undefined;
55
62
  /** */
56
63
  className?: string | undefined;
64
+ /**
65
+ * 内部の `<textarea>` 要素のクラス名。
66
+ */
67
+ textareaClassName?: string | undefined;
68
+ /**
69
+ * 内部の `<textarea>` 要素の ID。
70
+ */
71
+ textareaId?: string | undefined;
57
72
  } & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -15,9 +15,9 @@ export declare const CardTitle: import("react").ForwardRefExoticComponent<import
15
15
  as?: keyof JSX.IntrinsicElements | undefined;
16
16
  /**
17
17
  * 最大行数。
18
- * @defaultValue `4`
18
+ * @defaultValue `null`
19
19
  */
20
- maxLineHeight?: number | undefined;
20
+ maxLineCount?: number | undefined;
21
21
  /** */
22
22
  className?: string | undefined;
23
23
  /** */
@@ -4,7 +4,7 @@ import { ReactNode } from "react";
4
4
  * @category React コンポーネント
5
5
  */
6
6
  export declare const ContentTitle: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
7
- className?: string | undefined; /** */
7
+ className?: string | undefined;
8
8
  id?: string | undefined;
9
9
  style?: import("react").CSSProperties | undefined;
10
10
  } & {
@@ -1,40 +1,28 @@
1
- import { MouseEvent, ReactNode } from "react";
1
+ /// <reference types="react" />
2
2
  /**
3
+ * @deprecated
4
+ * 代わりに `Button` を利用してください。
5
+ *
3
6
  * @group React コンポーネント
4
7
  * @category React コンポーネント
5
8
  */
6
- export declare const DialogButton: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
9
+ export declare const DialogButton: import("react").ForwardRefExoticComponent<import("../../..").DataProps<string> & {
7
10
  className?: string | undefined;
8
11
  id?: string | undefined;
9
12
  style?: import("react").CSSProperties | undefined;
10
- } & {
11
- /**
12
- * 見た目のバリアント。
13
- * そのダイアログに関するメインの動作を行うボタンには `"submit"` を指定し、それ以外のキャンセルボタンなどには `"cancel"` を指定してください。
14
- * @defaultValue `"submit"`
15
- */
16
- variant?: "submit" | "cancel" | undefined;
17
- /**
18
- * 無効にするかどうか。
19
- *
20
- * `onClick` に文字列値が指定されていてリンクとして表示される際は、これは無視されます。
21
- * @defaultValue `false`
22
- */
13
+ } & import("react").AriaAttributes & {
14
+ scheme?: "primary" | "secondary" | "blue" | "red" | "green" | "pink" | "yellow" | "purple" | "orange" | "gray" | "gold" | "silver" | "bronze" | undefined;
15
+ variant?: "solid" | "light" | "underline" | "simple" | "unstyledUnderline" | "unstyledSimple" | undefined;
16
+ size?: "small" | "medium" | "large" | undefined;
17
+ isCompact?: boolean | undefined;
18
+ type?: "button" | "reset" | "submit" | undefined;
23
19
  isDisabled?: boolean | undefined;
24
- /**
25
- * ローディング中かどうか。
26
- * これが `true` の間は、ボタンがローディング表示され無効になります。
27
- * @defaultValue `false`
28
- */
29
20
  isLoading?: boolean | undefined;
30
- /**
31
- * クリックされたときに実行する関数。
32
- */
33
- onClick?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
34
- /**
35
- * ボタンの内部に表示する内容。
36
- */
37
- children?: ReactNode;
38
- /** */
21
+ onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
22
+ onKeyDown?: ((event: import("react").KeyboardEvent<HTMLButtonElement>) => unknown) | undefined;
23
+ onKeyUp?: ((event: import("react").KeyboardEvent<HTMLButtonElement>) => unknown) | undefined;
24
+ onMouseDown?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
25
+ onPointerDown?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
26
+ children?: import("react").ReactNode;
39
27
  className?: string | undefined;
40
28
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -4,7 +4,7 @@ import { ReactNode } from "react";
4
4
  * @category React コンポーネント
5
5
  */
6
6
  export declare const DialogFooter: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
7
- className?: string | undefined;
7
+ className?: string | undefined; /** */
8
8
  id?: string | undefined;
9
9
  style?: import("react").CSSProperties | undefined;
10
10
  } & {
@@ -25,6 +25,18 @@ type DrawerProps = CommonProps & {
25
25
  children: ReactNode;
26
26
  };
27
27
  /**
28
+ * ### ドロワー
29
+ *
30
+ * #### 構成
31
+ * 以下のようなコンポーネント構成で利用してください。
32
+ * - **`Drawer`**
33
+ * - [`DrawerHeader`](/docs/modules-Drawer-DrawerHeader--ドキュメント) (任意)
34
+ * - [`DrawerHeaderLeft`](/docs/modules-Drawer-DrawerHeaderLeft--ドキュメント)
35
+ * - [`DrawerHeaderTitle`](/docs/modules-Drawer-DrawerHeaderTitle--ドキュメント)
36
+ * - [`DrawerHeaderCaption`](/docs/modules-Drawer-DrawerHeaderCaption--ドキュメント) (任意)
37
+ * - [`DrawerHeaderRight`](/docs/modules-Drawer-DrawerHeaderRight--ドキュメント)
38
+ * - [`DrawerBody`](/docs/modules-Drawer-DrawerBody--ドキュメント)
39
+ *
28
40
  * @group React コンポーネント
29
41
  * @category React コンポーネント
30
42
  */
@@ -10,6 +10,4 @@ export declare const DrawerBody: import("react").ForwardRefExoticComponent<impor
10
10
  } & {
11
11
  /** */
12
12
  children: ReactNode;
13
- /** */
14
- className?: string | undefined;
15
13
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,42 +1,28 @@
1
- import { MouseEvent, ReactNode } from "react";
1
+ /// <reference types="react" />
2
2
  /**
3
+ * @deprecated
4
+ * 代わりに `Button` を利用してください。
5
+ *
3
6
  * @group React コンポーネント
4
7
  * @category React コンポーネント
5
8
  */
6
- export declare const DrawerButton: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
9
+ export declare const DrawerButton: import("react").ForwardRefExoticComponent<import("../../..").DataProps<string> & {
7
10
  className?: string | undefined;
8
11
  id?: string | undefined;
9
12
  style?: import("react").CSSProperties | undefined;
10
- } & {
11
- /**
12
- * 見た目のバリアント。
13
- * そのダイアログに関するメインの動作を行うボタンには `"submit"` を指定し、それ以外のキャンセルボタンなどには `"cancel"` を指定してください。
14
- * @defaultValue `"submit"`
15
- */
16
- variant?: "submit" | "cancel" | undefined;
17
- /**
18
- * 無効にするかどうか。
19
- *
20
- * `onClick` に文字列値が指定されていてリンクとして表示される際は、これは無視されます。
21
- * @defaultValue `false`
22
- */
13
+ } & import("react").AriaAttributes & {
14
+ scheme?: "primary" | "secondary" | "blue" | "red" | "green" | "pink" | "yellow" | "purple" | "orange" | "gray" | "gold" | "silver" | "bronze" | undefined;
15
+ variant?: "solid" | "light" | "underline" | "simple" | "unstyledUnderline" | "unstyledSimple" | undefined;
16
+ size?: "small" | "medium" | "large" | undefined;
17
+ isCompact?: boolean | undefined;
18
+ type?: "button" | "reset" | "submit" | undefined;
23
19
  isDisabled?: boolean | undefined;
24
- /**
25
- * ローディング中かどうか。
26
- * これが `true` の間は、ボタンがローディング表示され無効になります。
27
- * @defaultValue `false`
28
- */
29
20
  isLoading?: boolean | undefined;
30
- /**
31
- * クリックされたときに実行する関数。
32
- * URL 文字列を指定すると、指定された URL に遷移する `<a>` 要素として表示されます。
33
- * 関数を指定すると、その関数を実行する `<button>` 要素として表示されます。
34
- */
35
- onClick?: string | ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
36
- /**
37
- * ボタンの内部に表示する内容。
38
- */
39
- children?: ReactNode;
40
- /** */
21
+ onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
22
+ onKeyDown?: ((event: import("react").KeyboardEvent<HTMLButtonElement>) => unknown) | undefined;
23
+ onKeyUp?: ((event: import("react").KeyboardEvent<HTMLButtonElement>) => unknown) | undefined;
24
+ onMouseDown?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
25
+ onPointerDown?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
26
+ children?: import("react").ReactNode;
41
27
  className?: string | undefined;
42
28
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -10,6 +10,4 @@ export declare const DrawerCaption: import("react").ForwardRefExoticComponent<im
10
10
  } & {
11
11
  /** */
12
12
  children: ReactNode;
13
- /** */
14
- className?: string | undefined;
15
13
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,8 @@
1
1
  import { ReactNode } from "react";
2
2
  /**
3
+ * @deprecated
4
+ * これまでフッターに配置していたボタン等は、ヘッダーの右側に置くようにしてください。
5
+ *
3
6
  * @group React コンポーネント
4
7
  * @category React コンポーネント
5
8
  */
@@ -10,6 +13,4 @@ export declare const DrawerFooter: import("react").ForwardRefExoticComponent<imp
10
13
  } & {
11
14
  /** */
12
15
  children: ReactNode;
13
- /** */
14
- className?: string | undefined;
15
16
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -10,6 +10,4 @@ export declare const DrawerHeader: import("react").ForwardRefExoticComponent<imp
10
10
  } & {
11
11
  /** */
12
12
  children: ReactNode;
13
- /** */
14
- className?: string | undefined;
15
13
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from "react";
2
+ /**
3
+ * @group React コンポーネント
4
+ * @category React コンポーネント
5
+ */
6
+ export declare const DrawerHeaderLeft: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
7
+ className?: string | undefined;
8
+ id?: string | undefined;
9
+ style?: import("react").CSSProperties | undefined;
10
+ } & {
11
+ /** */
12
+ children: ReactNode;
13
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from "react";
2
+ /**
3
+ * @group React コンポーネント
4
+ * @category React コンポーネント
5
+ */
6
+ export declare const DrawerHeaderRight: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
7
+ className?: string | undefined;
8
+ id?: string | undefined;
9
+ style?: import("react").CSSProperties | undefined;
10
+ } & {
11
+ /** */
12
+ children: ReactNode;
13
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -15,6 +15,4 @@ export declare const DrawerTitle: import("react").ForwardRefExoticComponent<impo
15
15
  as?: "div" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
16
16
  /** */
17
17
  children: ReactNode;
18
- /** */
19
- className?: string | undefined;
20
18
  } & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -2,6 +2,7 @@ export * from "./drawer";
2
2
  export * from "./drawerBody";
3
3
  export * from "./drawerButton";
4
4
  export * from "./drawerCaption";
5
- export * from "./drawerFooter";
6
5
  export * from "./drawerHeader";
6
+ export * from "./drawerHeaderLeft";
7
+ export * from "./drawerHeaderRight";
7
8
  export * from "./drawerTitle";
@@ -5,9 +5,11 @@ import { MouseEvent, ReactNode } from "react";
5
5
  */
6
6
  export declare const Tab: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
7
7
  className?: string | undefined;
8
- id?: string | undefined; /** */
8
+ id?: string | undefined;
9
9
  style?: import("react").CSSProperties | undefined;
10
10
  } & {
11
+ /** */
12
+ scheme?: "primary" | "secondary" | "blue" | "red" | "green" | "pink" | "yellow" | "purple" | "orange" | "gray" | "gold" | "silver" | "bronze" | undefined;
11
13
  /** */
12
14
  isActive?: boolean | undefined;
13
15
  /** */