@baton8/general-components 3.1.0-alpha.7 → 3.1.0-alpha.9

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.
@@ -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>>;
@@ -0,0 +1,3 @@
1
+ export * from "./segment";
2
+ export * from "./segmentGroup";
3
+ export * from "./segmentIconContainer";
@@ -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>>;
@@ -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";
@@ -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 {};