@baton8/general-components 3.1.0-alpha.0 → 3.1.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.
- package/dist/components/atoms/badge/badge.d.ts +1 -1
- package/dist/components/atoms/generalIcon/generalIcon.d.ts +5 -0
- package/dist/components/atoms/icon/icon.d.ts +5 -0
- package/dist/components/atoms/input/input.d.ts +2 -0
- package/dist/components/atoms/link/link.d.ts +2 -0
- package/dist/components/atoms/segmentGroup/index.d.ts +3 -0
- package/dist/components/atoms/segmentGroup/segment.d.ts +32 -0
- package/dist/components/atoms/segmentGroup/segmentGroup.d.ts +21 -0
- package/dist/components/atoms/segmentGroup/segmentIconContainer.d.ts +15 -0
- package/dist/components/atoms/tag/tag.d.ts +5 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/modules/card/card.d.ts +2 -0
- package/dist/components/modules/card/cardButton.d.ts +6 -0
- package/dist/components/modules/card/cardButtonListColumn.d.ts +15 -0
- package/dist/components/modules/card/cardGrip.d.ts +13 -0
- package/dist/components/modules/card/index.d.ts +2 -0
- package/dist/components/modules/dialog/dialog.d.ts +0 -1
- package/dist/components/modules/drawer/drawer.d.ts +2 -0
- package/dist/components/modules/drawer/drawerCloseButton.d.ts +13 -0
- package/dist/components/modules/drawer/drawerFooter.d.ts +0 -3
- package/dist/components/modules/drawer/index.d.ts +2 -0
- package/dist/components/modules/menu/menu.d.ts +5 -0
- package/dist/components/modules/popover/index.d.ts +1 -0
- package/dist/components/modules/popover/popover.d.ts +38 -0
- package/dist/components/modules/simpleCard/index.d.ts +3 -0
- package/dist/components/modules/simpleCard/simpleCard.d.ts +5 -0
- package/dist/components/modules/simpleCard/simpleCardBody.d.ts +7 -0
- package/dist/components/modules/simpleCard/simpleCardButton.d.ts +5 -0
- package/dist/components/modules/simpleCardList/index.d.ts +4 -0
- package/dist/components/modules/simpleCardList/simpleCardListAuto.d.ts +5 -0
- package/dist/components/modules/simpleCardList/simpleCardListBodyAuto.d.ts +5 -0
- package/dist/components/modules/simpleCardList/simpleCardListFooterAuto.d.ts +5 -0
- package/dist/components/modules/simpleCardList/simpleCardListHeader.d.ts +6 -0
- package/dist/components/modules/stepper/stepperItem.d.ts +5 -1
- package/dist/contexts/dialog/hook.d.ts +4 -1
- package/dist/contexts/segmentGroup/context.d.ts +11 -0
- package/dist/index.js +509 -262
- package/dist/index.js.map +1 -1
- package/dist/stories/atoms/input/input.stories.d.ts +1 -0
- package/dist/stories/atoms/segmentGroup/segmentGroup.stories.d.ts +7 -0
- package/dist/stories/modules/card/card.stories.d.ts +1 -0
- package/dist/stories/modules/drawer/drawer.stories.d.ts +2 -0
- package/dist/stories/modules/popover/popover.stories.d.ts +33 -0
- package/dist/stories/modules/stepper/stepper.stories.d.ts +1 -0
- package/package.json +6 -6
- package/dist/stories/modules/dialog/dialogButton.stories.d.ts +0 -8
- package/dist/stories/modules/drawer/drawerButton.stories.d.ts +0 -7
- package/dist/stories/modules/drawer/drawerFooter.stories.d.ts +0 -7
|
@@ -21,7 +21,7 @@ export declare const Badge: import("react").ForwardRefExoticComponent<import("..
|
|
|
21
21
|
* 見た目のバリアント。
|
|
22
22
|
* @defaultValue `"solid"`
|
|
23
23
|
*/
|
|
24
|
-
variant?: "
|
|
24
|
+
variant?: "outline" | "solid" | "light" | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* サイズ。
|
|
27
27
|
* @defaultValue `"medium"`
|
|
@@ -53,6 +53,11 @@ export declare const GeneralIcon: import("react").ForwardRefExoticComponent<impo
|
|
|
53
53
|
* @defaultValue `false`
|
|
54
54
|
*/
|
|
55
55
|
spin?: boolean | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* アイコンの幅を固定するかどうか。
|
|
58
|
+
* @defaultValue `false`
|
|
59
|
+
*/
|
|
60
|
+
isFixedWidth?: boolean | undefined;
|
|
56
61
|
/** */
|
|
57
62
|
className?: string | undefined;
|
|
58
63
|
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -23,6 +23,11 @@ export declare const Icon: import("react").ForwardRefExoticComponent<import("../
|
|
|
23
23
|
name: keyof typeof BUILTIN_ICONS;
|
|
24
24
|
/** */
|
|
25
25
|
label?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* アイコンの幅を固定するかどうか。
|
|
28
|
+
* @defaultValue `false`
|
|
29
|
+
*/
|
|
30
|
+
isFixedWidth?: boolean | undefined;
|
|
26
31
|
/** */
|
|
27
32
|
className?: string | undefined;
|
|
28
33
|
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -53,6 +53,8 @@ export declare const Input: import("react").ForwardRefExoticComponent<import("..
|
|
|
53
53
|
type?: "date" | "time" | "search" | "month" | "text" | "tel" | "url" | "email" | "datetime-local" | "week" | undefined;
|
|
54
54
|
/** */
|
|
55
55
|
inputMode?: "search" | "numeric" | "decimal" | "text" | "none" | "tel" | "url" | "email" | undefined;
|
|
56
|
+
/** */
|
|
57
|
+
placeholder?: string | undefined;
|
|
56
58
|
/**
|
|
57
59
|
* @defaultValue `"off"`
|
|
58
60
|
*/
|
|
@@ -52,6 +52,8 @@ export declare const Link: import("react").ForwardRefExoticComponent<import("../
|
|
|
52
52
|
* @defaultValue `"medium"`
|
|
53
53
|
*/
|
|
54
54
|
size?: "small" | "medium" | "large" | undefined;
|
|
55
|
+
/** */
|
|
56
|
+
download?: unknown;
|
|
55
57
|
/**
|
|
56
58
|
* 内部の余白を少なくし、全体を少し小さめに表示するかどうか。
|
|
57
59
|
* 基本的には `false` (デフォルト値) で使うことを推奨しますが、フォームの一部として使う場合など、省スペースで表示したいときには `true` にしてください。
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AriaAttributes, ChangeEvent, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @group React コンポーネント
|
|
4
|
+
* @category React コンポーネント
|
|
5
|
+
*/
|
|
6
|
+
export declare const Segment: import("react").ForwardRefExoticComponent<import("../../../modules/data").DataProps<string> & {
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
style?: import("react").CSSProperties | undefined;
|
|
10
|
+
} & AriaAttributes & {
|
|
11
|
+
/** */
|
|
12
|
+
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* `<input>` 要素の `change` イベントのリスナー。
|
|
15
|
+
* 入力された値を取得したいだけの場合は、`onSet` prop を利用する方が便利です。
|
|
16
|
+
*/
|
|
17
|
+
onChange?: ((event: ChangeEvent<HTMLInputElement>) => unknown) | undefined;
|
|
18
|
+
/** */
|
|
19
|
+
onBlur?: ((event: ChangeEvent<HTMLInputElement>) => unknown) | undefined;
|
|
20
|
+
/** */
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
/** */
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* 内部の `<input>` 要素のクラス名。
|
|
26
|
+
*/
|
|
27
|
+
inputClassName?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* 内部の `<input>` 要素の ID。
|
|
30
|
+
*/
|
|
31
|
+
inputId?: string | undefined;
|
|
32
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from "react";
|
|
2
|
+
import { LeveledColorScheme } from "../../../modules/color";
|
|
3
|
+
type SegmentGroupProps = {
|
|
4
|
+
/**
|
|
5
|
+
* カラースキーム。
|
|
6
|
+
* @defaultValue `"primary"`
|
|
7
|
+
*/
|
|
8
|
+
scheme?: LeveledColorScheme;
|
|
9
|
+
/** */
|
|
10
|
+
value: string;
|
|
11
|
+
/** */
|
|
12
|
+
onSet: (value: string) => unknown;
|
|
13
|
+
/** */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @group React コンポーネント
|
|
18
|
+
* @category React コンポーネント
|
|
19
|
+
*/
|
|
20
|
+
export declare const SegmentGroup: FunctionComponent<SegmentGroupProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @group React コンポーネント
|
|
4
|
+
* @category React コンポーネント
|
|
5
|
+
*/
|
|
6
|
+
export declare const SegmentIconContainer: 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?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
13
|
+
/** */
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* ### タグ
|
|
4
|
-
*
|
|
5
|
-
* #### 専用コンポーネント
|
|
6
|
-
* - [GenreTag](/docs/atoms-Tag-GenreTag-ドキュメント)
|
|
7
4
|
* @group React コンポーネント
|
|
8
5
|
* @category React コンポーネント
|
|
9
6
|
*/
|
|
@@ -17,6 +14,11 @@ export declare const Tag: import("react").ForwardRefExoticComponent<import("../.
|
|
|
17
14
|
* @defaultValue `"gray"`
|
|
18
15
|
*/
|
|
19
16
|
scheme?: "primary" | "secondary" | "blue" | "red" | "green" | "pink" | "yellow" | "purple" | "orange" | "gray" | "gold" | "silver" | "bronze" | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* サイズ。
|
|
19
|
+
* @defaultValue `"small"`
|
|
20
|
+
*/
|
|
21
|
+
size?: "small" | "medium" | undefined;
|
|
20
22
|
/** */
|
|
21
23
|
className?: string | undefined;
|
|
22
24
|
/** */
|
|
@@ -25,6 +25,7 @@ export * from "./atoms/radio";
|
|
|
25
25
|
export * from "./atoms/radioGroup";
|
|
26
26
|
export * from "./atoms/root";
|
|
27
27
|
export * from "./atoms/secondaryHeading";
|
|
28
|
+
export * from "./atoms/segmentGroup";
|
|
28
29
|
export * from "./atoms/select";
|
|
29
30
|
export * from "./atoms/singleLineText";
|
|
30
31
|
export * from "./atoms/switch";
|
|
@@ -45,7 +46,10 @@ export * from "./modules/fractionView";
|
|
|
45
46
|
export * from "./modules/header";
|
|
46
47
|
export * from "./modules/menu";
|
|
47
48
|
export * from "./modules/pagination";
|
|
49
|
+
export * from "./modules/popover";
|
|
48
50
|
export * from "./modules/rankView";
|
|
51
|
+
export * from "./modules/simpleCard";
|
|
52
|
+
export * from "./modules/simpleCardList";
|
|
49
53
|
export * from "./modules/stepper";
|
|
50
54
|
export * from "./modules/tabList";
|
|
51
55
|
export * from "./modules/toast";
|
|
@@ -5,6 +5,7 @@ import { MouseEvent, ReactNode } from "react";
|
|
|
5
5
|
* #### 構成
|
|
6
6
|
* 以下のようなコンポーネント構成で利用してください。
|
|
7
7
|
* - **`CardList`**
|
|
8
|
+
* - [`CardGrip`](/docs/atoms-Card-CardGrip--ドキュメント) (任意)
|
|
8
9
|
* - [`CardControlContainer`](/docs/atoms-Card-CardControlContainer--ドキュメント) (任意)
|
|
9
10
|
* - `Checkbox` や `Radio` などのコントロール
|
|
10
11
|
* - [`CardBody`](/docs/atoms-Card-CardBody--ドキュメント) (必須)
|
|
@@ -20,6 +21,7 @@ import { MouseEvent, ReactNode } from "react";
|
|
|
20
21
|
*
|
|
21
22
|
* ```tsx
|
|
22
23
|
* <Card>
|
|
24
|
+
* <CardGrip/>
|
|
23
25
|
* <CardControlContainer>
|
|
24
26
|
* <Checkbox/>
|
|
25
27
|
* </CardControlContainer>
|
|
@@ -27,6 +27,12 @@ export declare const CardButton: import("react").ForwardRefExoticComponent<impor
|
|
|
27
27
|
* @defaultValue `"button"`
|
|
28
28
|
*/
|
|
29
29
|
type?: "button" | "reset" | "submit" | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* ボタンを縦に伸ばすかどうか。
|
|
32
|
+
* 設定ボタン等は伸ばさない方が自然です。
|
|
33
|
+
* @defaultValue `true`
|
|
34
|
+
*/
|
|
35
|
+
isStretched?: boolean | undefined;
|
|
30
36
|
/**
|
|
31
37
|
* 無効にするかどうか。
|
|
32
38
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @group React コンポーネント
|
|
4
|
+
* @category React コンポーネント
|
|
5
|
+
*/
|
|
6
|
+
export declare const CardButtonListColumn: 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
|
+
className?: string | undefined;
|
|
13
|
+
/** */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @group React コンポーネント
|
|
4
|
+
* @category React コンポーネント
|
|
5
|
+
*/
|
|
6
|
+
export declare const CardGrip: 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
|
+
className?: string | undefined;
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -2,6 +2,8 @@ export * from "./card";
|
|
|
2
2
|
export * from "./cardBody";
|
|
3
3
|
export * from "./cardButton";
|
|
4
4
|
export * from "./cardButtonList";
|
|
5
|
+
export * from "./cardButtonListColumn";
|
|
5
6
|
export * from "./cardControlContainer";
|
|
7
|
+
export * from "./cardGrip";
|
|
6
8
|
export * from "./cardHeadnote";
|
|
7
9
|
export * from "./cardTitle";
|
|
@@ -40,7 +40,6 @@ type DialogProps = {
|
|
|
40
40
|
* - [`DialogTitle`](/docs/modules-Dialog-DialogTitle--ドキュメント) (任意)
|
|
41
41
|
* - [`DialogBody`](/docs/modules-Dialog-DialogBody--ドキュメント)
|
|
42
42
|
* - [`DialogFooter`](/docs/modules-Dialog-DialogFooter--ドキュメント) (任意)
|
|
43
|
-
* - [`DialogFooterButton`](/docs/modules-Dialog-DialogFooterButton--ドキュメント) (2 個まで任意)
|
|
44
43
|
*
|
|
45
44
|
* #### 使い方
|
|
46
45
|
* 非制御と制御の 2 種類の使い方があります。
|
|
@@ -30,12 +30,14 @@ type DrawerProps = CommonProps & {
|
|
|
30
30
|
* #### 構成
|
|
31
31
|
* 以下のようなコンポーネント構成で利用してください。
|
|
32
32
|
* - **`Drawer`**
|
|
33
|
+
* - [`DrawerCloseButton`](/docs/modules-Drawer-DrawerCloseButton--ドキュメント)
|
|
33
34
|
* - [`DrawerHeader`](/docs/modules-Drawer-DrawerHeader--ドキュメント) (任意)
|
|
34
35
|
* - [`DrawerHeaderLeft`](/docs/modules-Drawer-DrawerHeaderLeft--ドキュメント)
|
|
35
36
|
* - [`DrawerHeaderTitle`](/docs/modules-Drawer-DrawerHeaderTitle--ドキュメント)
|
|
36
37
|
* - [`DrawerHeaderCaption`](/docs/modules-Drawer-DrawerHeaderCaption--ドキュメント) (任意)
|
|
37
38
|
* - [`DrawerHeaderRight`](/docs/modules-Drawer-DrawerHeaderRight--ドキュメント)
|
|
38
39
|
* - [`DrawerBody`](/docs/modules-Drawer-DrawerBody--ドキュメント)
|
|
40
|
+
* - [`DrawerFooter`](/docs/modules-Drawer-DrawerFooter--ドキュメント) (任意)
|
|
39
41
|
*
|
|
40
42
|
* @group React コンポーネント
|
|
41
43
|
* @category React コンポーネント
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @group React コンポーネント
|
|
4
|
+
* @category React コンポーネント
|
|
5
|
+
*/
|
|
6
|
+
export declare const DrawerCloseButton: 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
|
+
className?: string | undefined;
|
|
13
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -2,6 +2,8 @@ export * from "./drawer";
|
|
|
2
2
|
export * from "./drawerBody";
|
|
3
3
|
export * from "./drawerButton";
|
|
4
4
|
export * from "./drawerCaption";
|
|
5
|
+
export * from "./drawerCloseButton";
|
|
6
|
+
export * from "./drawerFooter";
|
|
5
7
|
export * from "./drawerHeader";
|
|
6
8
|
export * from "./drawerHeaderLeft";
|
|
7
9
|
export * from "./drawerHeaderRight";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./popover";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Placement } from "@floating-ui/react";
|
|
2
|
+
import { FunctionComponent, ReactElement, ReactNode } from "react";
|
|
3
|
+
type PopoverProps = {
|
|
4
|
+
/**
|
|
5
|
+
* トリガーとなる要素。
|
|
6
|
+
* ここに要素を指定すると、そこにインタラクションがあったときにポップオーバーが表示されるようになります。
|
|
7
|
+
*/
|
|
8
|
+
trigger?: ReactElement;
|
|
9
|
+
/**
|
|
10
|
+
* トリガーの種類。
|
|
11
|
+
* @defaultValue `"click"`
|
|
12
|
+
*/
|
|
13
|
+
triggerType?: "click" | "focus" | "hover";
|
|
14
|
+
/**
|
|
15
|
+
* トリガーの持続時間 (ミリ秒単位)。
|
|
16
|
+
* @defaultValue `null`
|
|
17
|
+
*/
|
|
18
|
+
triggerRest?: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue `false`
|
|
21
|
+
*/
|
|
22
|
+
isInline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* ポップオーバーの位置。
|
|
25
|
+
* @defaultValue `"bottom-start"`
|
|
26
|
+
*/
|
|
27
|
+
placement?: Placement;
|
|
28
|
+
/** */
|
|
29
|
+
className?: string;
|
|
30
|
+
/** */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @group React コンポーネント
|
|
35
|
+
* @category React コンポーネント
|
|
36
|
+
*/
|
|
37
|
+
export declare const Popover: FunctionComponent<PopoverProps>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from "react";
|
|
2
|
+
import { CardBody } from "../../../components/modules/card/cardBody";
|
|
3
|
+
type Props = {
|
|
4
|
+
hasButton?: boolean;
|
|
5
|
+
} & ComponentProps<typeof CardBody>;
|
|
6
|
+
export declare const SimpleCardBody: FunctionComponent<Props>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from "react";
|
|
2
|
+
import { CardListAuto } from "../../../components/modules/cardList/cardListAuto";
|
|
3
|
+
type Props = ComponentProps<typeof CardListAuto>;
|
|
4
|
+
export declare const SimpleCardListAuto: FunctionComponent<Props>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from "react";
|
|
2
|
+
import { CardListBodyAuto } from "../../../components/modules/cardList/cardListBodyAuto";
|
|
3
|
+
type Props = ComponentProps<typeof CardListBodyAuto>;
|
|
4
|
+
export declare const SimpleCardListBodyAuto: FunctionComponent<Props>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from "react";
|
|
2
|
+
import { CardListFooterAuto } from "../../../components/modules/cardList/cardListFooterAuto";
|
|
3
|
+
type Props = ComponentProps<typeof CardListFooterAuto>;
|
|
4
|
+
export declare const SimpleCardListFooterAuto: FunctionComponent<Props>;
|
|
5
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { MouseEvent, ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* @group React コンポーネント
|
|
4
4
|
* @category React コンポーネント
|
|
@@ -11,6 +11,10 @@ export declare const StepperItem: import("react").ForwardRefExoticComponent<impo
|
|
|
11
11
|
/** */
|
|
12
12
|
scheme?: "primary" | "secondary" | "blue" | "red" | "green" | "pink" | "yellow" | "purple" | "orange" | "gray" | "gold" | "silver" | "bronze" | undefined;
|
|
13
13
|
/** */
|
|
14
|
+
href?: string | undefined;
|
|
15
|
+
/** */
|
|
16
|
+
onClick?: ((event: MouseEvent<HTMLElement>) => unknown) | undefined;
|
|
17
|
+
/** */
|
|
14
18
|
children?: ReactNode;
|
|
15
19
|
/** */
|
|
16
20
|
className?: string | undefined;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
|
-
export type OpenDialog = (render: (
|
|
2
|
+
export type OpenDialog = (render: (onClose: () => void) => ReactElement) => Promise<void>;
|
|
3
3
|
/**
|
|
4
4
|
* ダイアログを表示する関数 `openDialog` を返します。
|
|
5
5
|
* `openDialog` 関数にダイアログのレンダー関数を渡すと、そのダイアログが表示されます。
|
|
6
6
|
* ダイアログのレンダー関数にはダイアログを閉じるための関数が渡されるので、キャンセルボタン等に利用してください。
|
|
7
7
|
*
|
|
8
|
+
* `openDialog` 関数に渡すレンダー関数が返すコンポーネントには、`isOpen`, `onClose` prop が暗黙的に渡されます。
|
|
9
|
+
* そのため、レンダー関数が独自コンポーネントを返す場合は、そのコンポーネントは `isOpen`, `onClose` prop を受け取って適切に処理しなければなりません。
|
|
10
|
+
*
|
|
8
11
|
* `openDialog` 関数自体は Promise を返します。
|
|
9
12
|
* この Promise は、ダイアログを閉じたときに解決されます。
|
|
10
13
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LeveledColorScheme } from "../../modules/color";
|
|
3
|
+
type SegmentGroupContextValue = {
|
|
4
|
+
scheme: LeveledColorScheme;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onSet: (value: string) => unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare const segmentGroupContext: import("react").Context<SegmentGroupContextValue | undefined>;
|
|
10
|
+
export declare const SegmentGroupProvider: import("react").Provider<SegmentGroupContextValue | undefined>;
|
|
11
|
+
export {};
|