ingred-ui 22.0.0 → 22.2.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/dist/components/DualListBox2/DualListBox2.d.ts +22 -14
- package/dist/components/DualListBox2/DualListBox2.stories.d.ts +28 -26
- package/dist/components/DualListBox2/DualListBox2Item.d.ts +5 -7
- package/dist/components/DualListBox2/styled.d.ts +1 -0
- package/dist/components/FilterComboBox/FilterComboBox.d.ts +6 -1
- package/dist/components/FilterComboBox/FilterComboBox.stories.d.ts +85 -2
- package/dist/components/FilterComboBox/styled.d.ts +11 -2
- package/dist/components/FilterInputAbstract/FilterInputAbstract.d.ts +6 -2
- package/dist/components/FilterInputAbstract/FilterInputAbstract.stories.d.ts +23 -2
- package/dist/components/FilterInputAbstract/styled.d.ts +20 -2
- package/dist/components/FilterInputAbstract/types.d.ts +17 -0
- package/dist/components/FilterSelectInput/FilterSelectInput.d.ts +8 -4
- package/dist/components/FilterSelectInput/FilterSelectInput.stories.d.ts +38 -2
- package/dist/components/FilterSelectInput/styled.d.ts +18 -2
- package/dist/components/FilterTagInput/FilterTagInput.d.ts +7 -1
- package/dist/components/FilterTagInput/FilterTagInput.stories.d.ts +27 -2
- package/dist/components/FilterTagInput/styled.d.ts +10 -2
- package/dist/components/Icon/Icon.d.ts +3 -3
- package/dist/components/Icon/internal/OperatorDoesNotContainsIcon/index.d.ts +4 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.stories.d.ts +59 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/styled.d.ts +10 -0
- package/dist/components/Tag/types.d.ts +47 -0
- package/dist/index.es.js +597 -462
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +487 -352
- package/dist/index.js.map +1 -1
- package/dist/styles/color.d.ts +2 -0
- package/package.json +2 -2
|
@@ -2,32 +2,32 @@ import React, { type ReactNode } from "react";
|
|
|
2
2
|
import { type Item } from "./types";
|
|
3
3
|
type DualListBox2Props = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
|
|
5
|
+
* 選択済みの「追加」項目の配列
|
|
6
|
+
*/
|
|
7
7
|
included: Item[];
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
|
|
9
|
+
* 選択済みの「除外」項目の配列
|
|
10
|
+
*/
|
|
11
11
|
excluded: Item[];
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
|
|
13
|
+
* 追加ボタンを非活性にし、「除外のみモード」にするかどうか
|
|
14
|
+
*/
|
|
15
15
|
disableInclude?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
17
|
+
* 除外ボタンを非活性にし、「追加のみモード」にするかどうか
|
|
18
|
+
*/
|
|
19
19
|
disableExclude?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
21
|
+
* メニューに表示するカスタムボタン要素
|
|
22
|
+
*/
|
|
23
23
|
menuButtons?: ReactNode;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
25
|
+
* データ読み込み中かどうかを示すフラグ
|
|
26
|
+
*/
|
|
27
27
|
loading?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* 項目リスト(DualListBox2Item, DualListBox2Accordion, DualListBox2Section
|
|
30
|
-
|
|
29
|
+
* 項目リスト(DualListBox2Item, DualListBox2Accordion, DualListBox2Section のいずれかのコンポーネントのみ許可)
|
|
30
|
+
*/
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
/**
|
|
33
33
|
* 「追加」状態の変更イベントハンドラ
|
|
@@ -57,6 +57,14 @@ type DualListBox2Props = {
|
|
|
57
57
|
* 1ページあたりの表示件数が変更されたときのハンドラ
|
|
58
58
|
**/
|
|
59
59
|
onPageSizeChange?: (pageSize: number) => void;
|
|
60
|
+
/**
|
|
61
|
+
* 検索フィルターの文字列
|
|
62
|
+
**/
|
|
63
|
+
filter?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 検索フィルターが変更されたときのハンドラ
|
|
66
|
+
**/
|
|
67
|
+
onFilterChange?: (filter: string) => void;
|
|
60
68
|
};
|
|
61
69
|
export declare const DualListBox2: React.ForwardRefExoticComponent<DualListBox2Props & React.RefAttributes<HTMLDivElement>>;
|
|
62
70
|
export {};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StoryObj
|
|
3
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import { DualListBox2 } from "./DualListBox2";
|
|
4
|
+
export type Item = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
groupName?: string;
|
|
8
|
+
};
|
|
4
9
|
declare const meta: {
|
|
5
10
|
title: string;
|
|
6
11
|
component: React.ForwardRefExoticComponent<{
|
|
7
|
-
included: Item[];
|
|
8
|
-
excluded: Item[];
|
|
12
|
+
included: import("./types").Item[];
|
|
13
|
+
excluded: import("./types").Item[];
|
|
9
14
|
disableInclude?: boolean | undefined;
|
|
10
15
|
disableExclude?: boolean | undefined;
|
|
11
16
|
menuButtons?: React.ReactNode;
|
|
@@ -18,45 +23,42 @@ declare const meta: {
|
|
|
18
23
|
pageSize?: number | undefined;
|
|
19
24
|
pageSizeOptions?: number[] | undefined;
|
|
20
25
|
onPageSizeChange?: ((pageSize: number) => void) | undefined;
|
|
26
|
+
filter?: string | undefined;
|
|
27
|
+
onFilterChange?: ((filter: string) => void) | undefined;
|
|
21
28
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
|
|
29
|
+
tags: string[];
|
|
30
|
+
parameters: {
|
|
31
|
+
docs: {
|
|
32
|
+
description: {
|
|
33
|
+
component: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
23
37
|
};
|
|
24
38
|
export default meta;
|
|
39
|
+
type Story = StoryObj<typeof DualListBox2>;
|
|
25
40
|
/**
|
|
26
41
|
* #### ベーシックなタイプ
|
|
27
42
|
*
|
|
28
43
|
* 件数の上限が不明で都度サーバへ問い合わせる必要がある場合、上限が決まっている場合いずれにも使えます。
|
|
29
|
-
*
|
|
30
|
-
* ---
|
|
31
|
-
*
|
|
32
|
-
* `included` と `excluded` で選択中の値を指定します。
|
|
33
|
-
* 選択状態変更時は、`onIncludedChange` と `onExcludedChange` で、新しい `included` と `excluded` を受け取れるので、これを使って `included` と `excluded` を更新してください。
|
|
34
|
-
*
|
|
35
|
-
* children には、左パネル用の選択できる項目を渡します。右パネルの内容は状態に応じて自動で表示管理されます。
|
|
36
|
-
*
|
|
37
|
-
* モバイルサイズでは、タブで左右パネルの表示を切り替える
|
|
38
|
-
*
|
|
39
|
-
* included はフラットな配列。アコーディオンやセクションの group ごとに分けて配置する
|
|
40
44
|
*/
|
|
41
|
-
export declare const Default:
|
|
45
|
+
export declare const Default: Story;
|
|
42
46
|
/**
|
|
43
|
-
* ####
|
|
47
|
+
* #### アコーディオンタイプ
|
|
44
48
|
*
|
|
45
|
-
*
|
|
46
|
-
* セクションごとに一括選択もできます。
|
|
49
|
+
* グループ化されたアイテムを表示する場合に使用します。
|
|
47
50
|
*/
|
|
48
|
-
export declare const Accordion:
|
|
51
|
+
export declare const Accordion: Story;
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* #### 「追加」「除外」のいずれかしかできない場合
|
|
54
|
+
*
|
|
51
55
|
* 状況に応じて、`disableExclude`(除外無効)、`disableInclude`(追加無効) に `true` を指定して制御してください。
|
|
52
56
|
*/
|
|
53
|
-
export declare const Either:
|
|
57
|
+
export declare const Either: Story;
|
|
54
58
|
/**
|
|
55
59
|
* #### 選択候補がセクションで分かれているタイプ
|
|
56
60
|
*
|
|
57
61
|
* 件数の上限が不明で都度サーバへ問い合わせる必要がある場合に利用します。
|
|
58
62
|
* 検索は各セクションに移動後に使えます。
|
|
59
|
-
*
|
|
60
|
-
* 任意のセクション選択中は、その他のセクションは非表示となります。
|
|
61
63
|
*/
|
|
62
|
-
export declare const Section:
|
|
64
|
+
export declare const Section: Story;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
type DualListBox2ItemProps = {
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
export type DualListBox2ItemProps = {
|
|
3
3
|
id: string;
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
isIncluded?: boolean;
|
|
6
|
+
isExcluded?: boolean;
|
|
5
7
|
disableInclude?: boolean;
|
|
6
8
|
disableExclude?: boolean;
|
|
7
9
|
};
|
|
8
|
-
export declare const DualListBox2Item:
|
|
9
|
-
({ id, disableInclude, disableExclude, children, }: DualListBox2ItemProps): JSX.Element | null;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
10
|
+
export declare const DualListBox2Item: React.FC<DualListBox2ItemProps>;
|
|
@@ -9,6 +9,7 @@ export declare const LeftPanel: import("styled-components").StyledComponent<"div
|
|
|
9
9
|
export declare const LeftPanelBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
10
|
export declare const LeftPanelHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
11
|
export declare const HeaderSearch: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const HeaderSearchReset: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
12
13
|
export declare const HeaderMenuButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
13
14
|
export declare const HeaderCount: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
15
|
export declare const HeaderButtons: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
|
+
import { FilterSize, FilterVariant } from "../FilterInputAbstract/types";
|
|
2
3
|
type FilterTagInputProps = {
|
|
3
4
|
values: string[];
|
|
4
5
|
options: (string | string[])[];
|
|
@@ -9,6 +10,10 @@ type FilterTagInputProps = {
|
|
|
9
10
|
}[];
|
|
10
11
|
onChange: (values: string[]) => void;
|
|
11
12
|
onSelectChange: (index: number) => void;
|
|
13
|
+
size?: FilterSize;
|
|
14
|
+
variant?: FilterVariant;
|
|
15
|
+
tagVariant?: FilterVariant;
|
|
16
|
+
placeholder?: string;
|
|
12
17
|
};
|
|
13
|
-
export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, }: FilterTagInputProps) => JSX.Element;
|
|
18
|
+
export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, placeholder, }: FilterTagInputProps) => JSX.Element;
|
|
14
19
|
export {};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, }: {
|
|
5
|
+
component: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, placeholder, }: {
|
|
6
6
|
values: string[];
|
|
7
7
|
options: (string | string[])[];
|
|
8
8
|
selectedIndex: number;
|
|
@@ -12,8 +12,72 @@ declare const meta: {
|
|
|
12
12
|
}[];
|
|
13
13
|
onChange: (values: string[]) => void;
|
|
14
14
|
onSelectChange: (index: number) => void;
|
|
15
|
+
size?: import("../FilterInputAbstract/types").FilterSize | undefined;
|
|
16
|
+
variant?: import("../FilterInputAbstract/types").FilterVariant | undefined;
|
|
17
|
+
tagVariant?: import("../FilterInputAbstract/types").FilterVariant | undefined;
|
|
18
|
+
placeholder?: string | undefined;
|
|
15
19
|
}) => JSX.Element;
|
|
16
|
-
argTypes: {
|
|
20
|
+
argTypes: {
|
|
21
|
+
size: {
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
options: string[];
|
|
26
|
+
description: string;
|
|
27
|
+
table: {
|
|
28
|
+
type: {
|
|
29
|
+
summary: string;
|
|
30
|
+
};
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
variant: {
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
options: string[];
|
|
41
|
+
description: string;
|
|
42
|
+
table: {
|
|
43
|
+
type: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
tagVariant: {
|
|
52
|
+
control: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
options: string[];
|
|
56
|
+
description: string;
|
|
57
|
+
table: {
|
|
58
|
+
type: {
|
|
59
|
+
summary: string;
|
|
60
|
+
};
|
|
61
|
+
defaultValue: {
|
|
62
|
+
summary: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
placeholder: {
|
|
67
|
+
control: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
description: string;
|
|
71
|
+
table: {
|
|
72
|
+
type: {
|
|
73
|
+
summary: string;
|
|
74
|
+
};
|
|
75
|
+
defaultValue: {
|
|
76
|
+
summary: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
17
81
|
};
|
|
18
82
|
export default meta;
|
|
19
83
|
/**
|
|
@@ -35,3 +99,22 @@ export default meta;
|
|
|
35
99
|
* options の項目が `[ "イルカ", ["パンダ", "ぱんだ", "熊猫"], "ライオン" ]` の場合、ユーザー入力が "ぱんだ"、"パン"、"猫" と入力したときにどの場合にも「パンダ」がフィルタリングされます。
|
|
36
100
|
*/
|
|
37
101
|
export declare const Default: StoryObj<typeof meta>;
|
|
102
|
+
/**
|
|
103
|
+
* サイズバリエーション
|
|
104
|
+
*
|
|
105
|
+
* - small: 高さ28px
|
|
106
|
+
* - medium: 高さ32px(デフォルト)
|
|
107
|
+
* - large: 高さ40px
|
|
108
|
+
*/
|
|
109
|
+
export declare const Sizes: StoryObj<typeof meta>;
|
|
110
|
+
/**
|
|
111
|
+
* カラーバリエーション
|
|
112
|
+
*
|
|
113
|
+
* - variant: コンポーネント全体の背景色
|
|
114
|
+
* - light: 明るい背景色
|
|
115
|
+
* - dark: 暗い背景色(デフォルト)
|
|
116
|
+
* - tagVariant: タグの背景色
|
|
117
|
+
* - light: 明るい背景色(デフォルト)
|
|
118
|
+
* - dark: 暗い背景色
|
|
119
|
+
*/
|
|
120
|
+
export declare const Variants: StoryObj<typeof meta>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterVariant } from "../FilterInputAbstract/types";
|
|
3
|
+
type StyledProps = {
|
|
4
|
+
$variant: FilterVariant;
|
|
5
|
+
};
|
|
6
|
+
export declare const SelectContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledProps, never>;
|
|
2
7
|
export declare const TagList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const Select: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme,
|
|
8
|
+
export declare const Select: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledProps, never>;
|
|
4
9
|
export declare const SelectIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const StyledContextMenu2TextInputItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
11
|
+
onEnter?: (() => void) | undefined;
|
|
12
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React, { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { FilterSize } from "./types";
|
|
2
3
|
export declare const FilterInputContext: React.Context<{
|
|
3
4
|
isSmall: boolean;
|
|
4
5
|
}>;
|
|
5
6
|
type FilterTagProps = {
|
|
6
7
|
label: string;
|
|
7
8
|
onRemove: () => void;
|
|
9
|
+
size?: FilterSize;
|
|
10
|
+
variant?: "light" | "dark";
|
|
8
11
|
};
|
|
9
|
-
export declare const FilterTag: ({ label, onRemove }: FilterTagProps) => JSX.Element;
|
|
12
|
+
export declare const FilterTag: ({ label, size, variant, onRemove, }: FilterTagProps) => JSX.Element;
|
|
10
13
|
type FilterInputAbstractProps = {
|
|
11
14
|
selectedIndex: number;
|
|
12
15
|
selectOptions: {
|
|
@@ -15,6 +18,7 @@ type FilterInputAbstractProps = {
|
|
|
15
18
|
}[];
|
|
16
19
|
children?: ReactNode;
|
|
17
20
|
onSelectChange: (index: number) => void;
|
|
21
|
+
size?: "small" | "medium" | "large";
|
|
18
22
|
};
|
|
19
|
-
export declare const FilterInputAbstract: ({ selectedIndex, selectOptions, onSelectChange, children, }: FilterInputAbstractProps) => JSX.Element;
|
|
23
|
+
export declare const FilterInputAbstract: ({ selectedIndex, selectOptions, onSelectChange, children, size, }: FilterInputAbstractProps) => JSX.Element;
|
|
20
24
|
export {};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ selectedIndex, selectOptions, onSelectChange, children, }: {
|
|
5
|
+
component: ({ selectedIndex, selectOptions, onSelectChange, children, size, }: {
|
|
6
6
|
selectedIndex: number;
|
|
7
7
|
selectOptions: {
|
|
8
8
|
icon: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -10,8 +10,25 @@ declare const meta: {
|
|
|
10
10
|
}[];
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
onSelectChange: (index: number) => void;
|
|
13
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
13
14
|
}) => JSX.Element;
|
|
14
|
-
argTypes: {
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
defaultValue: {
|
|
27
|
+
summary: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
15
32
|
};
|
|
16
33
|
export default meta;
|
|
17
34
|
/**
|
|
@@ -19,3 +36,7 @@ export default meta;
|
|
|
19
36
|
* このコンポーネントは内部利用専用です。プロダクトには利用しないでください。
|
|
20
37
|
*/
|
|
21
38
|
export declare const Default: StoryObj<typeof meta>;
|
|
39
|
+
/**
|
|
40
|
+
* サイズバリエーション
|
|
41
|
+
*/
|
|
42
|
+
export declare const Sizes: StoryObj<typeof meta>;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterSize } from "./types";
|
|
3
|
+
export declare const filterBaseStyle: import("styled-components").FlattenSimpleInterpolation;
|
|
4
|
+
export declare const getFilterSizeStyle: (size: FilterSize) => import("styled-components").FlattenSimpleInterpolation;
|
|
5
|
+
export declare const getTriggerIconSizeStyle: (size: FilterSize) => import("styled-components").FlattenSimpleInterpolation;
|
|
6
|
+
export type FilterTagProps = {
|
|
7
|
+
$size: FilterSize;
|
|
8
|
+
};
|
|
3
9
|
export declare const FilterInputAbstract: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
10
|
export declare const DropDownTrigger: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const FilterTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, FilterTagProps, never>;
|
|
12
|
+
export declare const FilterTagButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, FilterTagProps, never>;
|
|
13
|
+
export declare const StyledContextMenu2CheckItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
14
|
+
checked?: boolean | undefined;
|
|
15
|
+
closeOnChange?: boolean | undefined;
|
|
16
|
+
prepend?: import("react").ReactNode;
|
|
17
|
+
children: import("react").ReactNode;
|
|
18
|
+
onChange?: ((checked: boolean) => void) | undefined;
|
|
19
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
|
|
20
|
+
checked?: boolean | undefined;
|
|
21
|
+
colors?: "danger" | undefined;
|
|
22
|
+
}, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type FilterSize = "small" | "medium" | "large";
|
|
2
|
+
export type FilterVariant = "light" | "dark";
|
|
3
|
+
export type FilterSizeProps = {
|
|
4
|
+
size?: FilterSize;
|
|
5
|
+
};
|
|
6
|
+
export type FilterSizeConfig = {
|
|
7
|
+
height: string;
|
|
8
|
+
borderRadius: string;
|
|
9
|
+
iconSize: string;
|
|
10
|
+
arrowIconSize: string;
|
|
11
|
+
padding: string;
|
|
12
|
+
};
|
|
13
|
+
export type FilterVariantConfig = {
|
|
14
|
+
background: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const FILTER_SIZES: Record<FilterSize, FilterSizeConfig>;
|
|
17
|
+
export declare const FILTER_VARIANTS: Record<FilterVariant, FilterVariantConfig>;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FilterSize, FilterVariant } from "../FilterInputAbstract/types";
|
|
3
|
+
type FilterSelectInputProps = {
|
|
3
4
|
value: string;
|
|
4
5
|
options: string[];
|
|
5
6
|
selectedIndex: number;
|
|
6
7
|
selectOptions: {
|
|
7
|
-
icon: ReactElement;
|
|
8
|
+
icon: React.ReactElement;
|
|
8
9
|
label: string;
|
|
9
10
|
}[];
|
|
10
11
|
onChange: (value: string) => void;
|
|
11
12
|
onSelectChange: (index: number) => void;
|
|
13
|
+
size?: FilterSize;
|
|
14
|
+
variant?: FilterVariant;
|
|
15
|
+
searchPlaceholder?: string;
|
|
12
16
|
};
|
|
13
|
-
export declare const FilterSelectInput: ({ value, options
|
|
17
|
+
export declare const FilterSelectInput: ({ value, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, searchPlaceholder, }: FilterSelectInputProps) => JSX.Element;
|
|
14
18
|
export {};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ value, options
|
|
5
|
+
component: ({ value, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, searchPlaceholder, }: {
|
|
6
6
|
value: string;
|
|
7
7
|
options: string[];
|
|
8
8
|
selectedIndex: number;
|
|
@@ -12,8 +12,30 @@ declare const meta: {
|
|
|
12
12
|
}[];
|
|
13
13
|
onChange: (value: string) => void;
|
|
14
14
|
onSelectChange: (index: number) => void;
|
|
15
|
+
size?: import("../FilterInputAbstract/types").FilterSize | undefined;
|
|
16
|
+
variant?: import("../FilterInputAbstract/types").FilterVariant | undefined;
|
|
17
|
+
searchPlaceholder?: string | undefined;
|
|
15
18
|
}) => JSX.Element;
|
|
16
|
-
argTypes: {
|
|
19
|
+
argTypes: {
|
|
20
|
+
size: {
|
|
21
|
+
control: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
variant: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
searchPlaceholder: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
17
39
|
};
|
|
18
40
|
export default meta;
|
|
19
41
|
/**
|
|
@@ -23,3 +45,17 @@ export default meta;
|
|
|
23
45
|
* 自動で横 100% に広がります。必要に応じて、親要素の幅を指定してください。
|
|
24
46
|
*/
|
|
25
47
|
export declare const Default: StoryObj<typeof meta>;
|
|
48
|
+
/**
|
|
49
|
+
* サイズバリエーション
|
|
50
|
+
*
|
|
51
|
+
* - small: 高さ28px
|
|
52
|
+
* - medium: 高さ32px(デフォルト)
|
|
53
|
+
* - large: 高さ40px
|
|
54
|
+
*/
|
|
55
|
+
export declare const Sizes: StoryObj<typeof meta>;
|
|
56
|
+
export declare const Variants: StoryObj<typeof meta>;
|
|
57
|
+
/**
|
|
58
|
+
* 検索窓のプレースホルダーをカスタマイズできます。
|
|
59
|
+
* デフォルトは「絞り込む」です。
|
|
60
|
+
*/
|
|
61
|
+
export declare const SearchPlaceholder: StoryObj<typeof meta>;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterSize, FilterVariant } from "../FilterInputAbstract/types";
|
|
3
|
+
type StyledProps = {
|
|
4
|
+
$size: FilterSize;
|
|
5
|
+
$variant: FilterVariant;
|
|
6
|
+
};
|
|
1
7
|
export declare const SelectContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const Select: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme,
|
|
3
|
-
|
|
8
|
+
export declare const Select: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledProps, never>;
|
|
9
|
+
type SelectLabelProps = {
|
|
10
|
+
$size: FilterSize;
|
|
11
|
+
};
|
|
12
|
+
export declare const SelectLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SelectLabelProps, never>;
|
|
4
13
|
export declare const SelectIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
type StyledContextMenu2TextInputItemProps = {
|
|
15
|
+
$placeholderColor?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const StyledContextMenu2TextInputItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
18
|
+
onEnter?: (() => void) | undefined;
|
|
19
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>, import("styled-components").DefaultTheme, StyledContextMenu2TextInputItemProps, never>;
|
|
20
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
|
+
import { IconSize } from "../Icon";
|
|
3
|
+
import { FilterSize } from "../FilterInputAbstract/types";
|
|
2
4
|
type FilterTagInputProps = {
|
|
3
5
|
title: string;
|
|
4
6
|
values: string[];
|
|
@@ -9,6 +11,10 @@ type FilterTagInputProps = {
|
|
|
9
11
|
}[];
|
|
10
12
|
onChange: (values: string[]) => void;
|
|
11
13
|
onSelectChange: (index: number) => void;
|
|
14
|
+
size?: FilterSize;
|
|
15
|
+
variant?: "light" | "dark";
|
|
16
|
+
tagVariant?: "light" | "dark";
|
|
17
|
+
menuIconSize?: IconSize | number;
|
|
12
18
|
};
|
|
13
|
-
export declare const FilterTagInput: ({ title, values, selectedIndex, selectOptions, onChange, onSelectChange, }: FilterTagInputProps) => JSX.Element;
|
|
19
|
+
export declare const FilterTagInput: ({ title, values, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, menuIconSize, }: FilterTagInputProps) => JSX.Element;
|
|
14
20
|
export {};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ title, values, selectedIndex, selectOptions, onChange, onSelectChange, }: {
|
|
5
|
+
component: ({ title, values, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, menuIconSize, }: {
|
|
6
6
|
title: string;
|
|
7
7
|
values: string[];
|
|
8
8
|
selectedIndex: number;
|
|
@@ -12,8 +12,31 @@ declare const meta: {
|
|
|
12
12
|
}[];
|
|
13
13
|
onChange: (values: string[]) => void;
|
|
14
14
|
onSelectChange: (index: number) => void;
|
|
15
|
+
size?: import("../FilterInputAbstract/types").FilterSize | undefined;
|
|
16
|
+
variant?: "dark" | "light" | undefined;
|
|
17
|
+
tagVariant?: "dark" | "light" | undefined;
|
|
18
|
+
menuIconSize?: number | import("../Icon").IconSize | undefined;
|
|
15
19
|
}) => JSX.Element;
|
|
16
|
-
argTypes: {
|
|
20
|
+
argTypes: {
|
|
21
|
+
size: {
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
variant: {
|
|
28
|
+
control: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
options: string[];
|
|
32
|
+
};
|
|
33
|
+
tagVariant: {
|
|
34
|
+
control: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
options: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
17
40
|
};
|
|
18
41
|
export default meta;
|
|
19
42
|
/**
|
|
@@ -55,3 +78,5 @@ export default meta;
|
|
|
55
78
|
*
|
|
56
79
|
*/
|
|
57
80
|
export declare const Default: StoryObj<typeof meta>;
|
|
81
|
+
export declare const Sizes: StoryObj<typeof meta>;
|
|
82
|
+
export declare const Variants: StoryObj<typeof meta>;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { FilterSize, FilterVariant } from "../FilterInputAbstract/types";
|
|
3
|
+
type StyledProps = {
|
|
4
|
+
$size: FilterSize;
|
|
5
|
+
$variant: FilterVariant;
|
|
6
|
+
};
|
|
7
|
+
export declare const InlineField: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledProps, never>;
|
|
3
8
|
export declare const InlineFieldInner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const OverflowIndicator: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
9
|
+
export declare const OverflowIndicator: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
10
|
+
$size?: FilterSize | undefined;
|
|
11
|
+
}, never>;
|
|
5
12
|
export declare const InlineInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
13
|
export declare const InlineInputIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
14
|
export declare const Panel: import("styled-components").StyledComponent<({ className, children }: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -19,3 +26,4 @@ export declare const PanelTagFieldFocusTrigger: import("styled-components").Styl
|
|
|
19
26
|
export declare const PanelInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
27
|
export declare const PanelInputSpacer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
21
28
|
export declare const PanelClearButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
29
|
+
export {};
|