ingred-ui 22.1.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/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 +572 -451
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +446 -325
- package/dist/index.js.map +1 -1
- package/dist/styles/color.d.ts +2 -0
- package/package.json +2 -2
|
@@ -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 {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
/** @deprecated "arrow_bottom" は "arrow_down" に置き換わりました */
|
|
3
3
|
type DeprecatedArrowBottom = "arrow_bottom";
|
|
4
|
-
export type IconName = "dashboard" | "bar_chart" | "bar_chart_framed" | "line_chart_framed" | "multi_line_chart_framed" | "logout" | "setting" | "arrow_up" | "arrow_down" | "arrow_left" | "arrow_right" | "pencil" | "delete_bin" | "close" | "forbid" | "check" | "eye" | "eye_off" | "exclamation" | "expand_diagonal_s_fill" | "arrow_double_left" | "arrow_double_right" | "question" | "zoom_in" | "sort_up" | "sort_down" | "sort_inactive" | "folder" | "folder_open" | "refresh_line" | "return_line" | "link" | "unlink" | "no_link" | "search" | "import" | "export" | "add_line" | "more" | "more_vert" | "date_range" | "external_link" | "desktop" | "mobile" | "desktop_mobile" | "copy" | "truck" | "camera_movie" | "code_file" | "cart_secure" | "profile" | "auction" | "mail" | "mail_open" | "filter" | "notification" | "user_settings" | "company_settings" | "heart_pulse" | "checkbox_circle" | "alert" | "base_station" | "braille" | "label" | "download_cloud" | "save" | "close_circle" | "bid_strap" | "fluct" | "data_strap" | "company" | "document" | "user" | "information" | "analytics" | "support" | "apps" | "ad_block" | "building" | "image" | "calendar" | "menu" | "file_list" | "draft" | "time" | "stop_circle" | "play_circle" | "sort_asc" | "sort_desc" | "bar_chart_search" | "check_thin" | "image_check" | "group2" | "key" | "operator_match" | "operator_does_not_match" | "operator_contains" | "operator_starts_with" | "operator_ends_with" | "operator_equal" | "operator_not_equal" | "operator_greater_than" | "operator_greater_than_or_equal_to" | "operator_less_than" | "operator_less_than_or_equal_to";
|
|
4
|
+
export type IconName = "dashboard" | "bar_chart" | "bar_chart_framed" | "line_chart_framed" | "multi_line_chart_framed" | "logout" | "setting" | "arrow_up" | "arrow_down" | "arrow_left" | "arrow_right" | "pencil" | "delete_bin" | "close" | "forbid" | "check" | "eye" | "eye_off" | "exclamation" | "expand_diagonal_s_fill" | "arrow_double_left" | "arrow_double_right" | "question" | "zoom_in" | "sort_up" | "sort_down" | "sort_inactive" | "folder" | "folder_open" | "refresh_line" | "return_line" | "link" | "unlink" | "no_link" | "search" | "import" | "export" | "add_line" | "more" | "more_vert" | "date_range" | "external_link" | "desktop" | "mobile" | "desktop_mobile" | "copy" | "truck" | "camera_movie" | "code_file" | "cart_secure" | "profile" | "auction" | "mail" | "mail_open" | "filter" | "notification" | "user_settings" | "company_settings" | "heart_pulse" | "checkbox_circle" | "alert" | "base_station" | "braille" | "label" | "download_cloud" | "save" | "close_circle" | "bid_strap" | "fluct" | "data_strap" | "company" | "document" | "user" | "information" | "analytics" | "support" | "apps" | "ad_block" | "building" | "image" | "calendar" | "menu" | "file_list" | "draft" | "time" | "stop_circle" | "play_circle" | "sort_asc" | "sort_desc" | "bar_chart_search" | "check_thin" | "image_check" | "group2" | "key" | "operator_match" | "operator_does_not_match" | "operator_contains" | "operator_does_not_contains" | "operator_starts_with" | "operator_ends_with" | "operator_equal" | "operator_not_equal" | "operator_greater_than" | "operator_greater_than_or_equal_to" | "operator_less_than" | "operator_less_than_or_equal_to";
|
|
5
5
|
type IconType = "fill" | "line";
|
|
6
6
|
type IconColor = IconType | "active" | string;
|
|
7
7
|
export type IconSize = "sm" | "sm-md" | "md" | "md-lg" | "lg";
|
|
@@ -18,14 +18,14 @@ export declare const icons: {
|
|
|
18
18
|
export type Props = {
|
|
19
19
|
name: IconName;
|
|
20
20
|
type?: IconType;
|
|
21
|
-
size?: IconSize;
|
|
21
|
+
size?: IconSize | number;
|
|
22
22
|
color?: IconColor;
|
|
23
23
|
alt?: string;
|
|
24
24
|
} | {
|
|
25
25
|
/** @deprecated "arrow_bottom" は "arrow_down" に置き換わりました */
|
|
26
26
|
name: DeprecatedArrowBottom;
|
|
27
27
|
type?: IconType;
|
|
28
|
-
size?: IconSize;
|
|
28
|
+
size?: IconSize | number;
|
|
29
29
|
color?: IconColor;
|
|
30
30
|
alt?: string;
|
|
31
31
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ label, size, variant, onRemove, className, disabled, }: import("./types").TagProps) => JSX.Element;
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
options: string[];
|
|
12
|
+
description: string;
|
|
13
|
+
table: {
|
|
14
|
+
type: {
|
|
15
|
+
summary: string;
|
|
16
|
+
};
|
|
17
|
+
defaultValue: {
|
|
18
|
+
summary: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
variant: {
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
options: string[];
|
|
27
|
+
description: string;
|
|
28
|
+
table: {
|
|
29
|
+
type: {
|
|
30
|
+
summary: string;
|
|
31
|
+
};
|
|
32
|
+
defaultValue: {
|
|
33
|
+
summary: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
disabled: {
|
|
38
|
+
control: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
description: string;
|
|
42
|
+
table: {
|
|
43
|
+
type: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
export declare const Default: Story;
|
|
56
|
+
export declare const Sizes: Story;
|
|
57
|
+
export declare const Variants: Story;
|
|
58
|
+
export declare const WithoutRemove: Story;
|
|
59
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TagSize, TagVariant } from "./types";
|
|
2
|
+
type StyledTagProps = {
|
|
3
|
+
$size: TagSize;
|
|
4
|
+
$variant: TagVariant;
|
|
5
|
+
$disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const Tag: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTagProps, never>;
|
|
8
|
+
export declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTagProps, never>;
|
|
9
|
+
export declare const RemoveButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledTagProps, never>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type TagSize = "small" | "medium" | "large";
|
|
2
|
+
export type TagVariant = "light" | "dark";
|
|
3
|
+
export type TagProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
size?: TagSize;
|
|
6
|
+
variant?: TagVariant;
|
|
7
|
+
onRemove?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const TAG_SIZES: {
|
|
12
|
+
readonly small: {
|
|
13
|
+
readonly height: "20px";
|
|
14
|
+
readonly fontSize: "11px";
|
|
15
|
+
readonly padding: "2px 6px";
|
|
16
|
+
readonly iconSize: "14px";
|
|
17
|
+
readonly borderRadius: "2px";
|
|
18
|
+
};
|
|
19
|
+
readonly medium: {
|
|
20
|
+
readonly height: "22px";
|
|
21
|
+
readonly fontSize: "12px";
|
|
22
|
+
readonly padding: "2px 7px";
|
|
23
|
+
readonly iconSize: "16px";
|
|
24
|
+
readonly borderRadius: "4px";
|
|
25
|
+
};
|
|
26
|
+
readonly large: {
|
|
27
|
+
readonly height: "26px";
|
|
28
|
+
readonly fontSize: "13px";
|
|
29
|
+
readonly padding: "3px 8px";
|
|
30
|
+
readonly iconSize: "18px";
|
|
31
|
+
readonly borderRadius: "4px";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const TAG_VARIANTS: {
|
|
35
|
+
readonly light: {
|
|
36
|
+
readonly background: "#FFFFFF";
|
|
37
|
+
readonly border: "#B3BAC1";
|
|
38
|
+
readonly text: "#041C33";
|
|
39
|
+
readonly hoverIcon: "#1F3449";
|
|
40
|
+
};
|
|
41
|
+
readonly dark: {
|
|
42
|
+
readonly background: "#F5F7F8";
|
|
43
|
+
readonly border: "#B3BAC1";
|
|
44
|
+
readonly text: "#041C33";
|
|
45
|
+
readonly hoverIcon: "#1F3449";
|
|
46
|
+
};
|
|
47
|
+
};
|