ingred-ui 21.2.0 → 21.3.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/ContextMenu2/context.d.ts +3 -0
- package/dist/components/ContextMenu2/floating-ui-utils.d.ts +2 -0
- package/dist/components/FilterComboBox/FilterComboBox.d.ts +14 -0
- package/dist/components/FilterComboBox/FilterComboBox.stories.d.ts +37 -0
- package/dist/components/FilterComboBox/__tests__/FilterComboBox.test.d.ts +1 -0
- package/dist/components/FilterComboBox/index.d.ts +1 -0
- package/dist/components/FilterComboBox/styled.d.ts +4 -0
- package/dist/components/FilterInputAbstract/FilterInputAbstract.d.ts +5 -0
- package/dist/components/FilterInputAbstract/styled.d.ts +2 -0
- package/dist/components/FilterSelectInput/FilterSelectInput.d.ts +2 -2
- package/dist/components/FilterSelectInput/FilterSelectInput.stories.d.ts +2 -2
- package/dist/components/FilterTagInput/styled.d.ts +0 -2
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles/depth.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
type FilterTagInputProps = {
|
|
3
|
+
values: string[];
|
|
4
|
+
options: (string | string[])[];
|
|
5
|
+
selectedIndex: number;
|
|
6
|
+
selectOptions: {
|
|
7
|
+
icon: ReactElement;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
onChange: (values: string[]) => void;
|
|
11
|
+
onSelectChange: (index: number) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, }: FilterTagInputProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, }: {
|
|
6
|
+
values: string[];
|
|
7
|
+
options: (string | string[])[];
|
|
8
|
+
selectedIndex: number;
|
|
9
|
+
selectOptions: {
|
|
10
|
+
icon: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
onChange: (values: string[]) => void;
|
|
14
|
+
onSelectChange: (index: number) => void;
|
|
15
|
+
}) => JSX.Element;
|
|
16
|
+
argTypes: {};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
/**
|
|
20
|
+
* Storybook の Docs の画面では、エンターキーが吸い取られてしまうようです。<br />
|
|
21
|
+
* **キーボード操作を試す場合は、Docs ではない、個別のページで確認してください**
|
|
22
|
+
*
|
|
23
|
+
* 入力内容をリストから選択させるフィルターの入力です。
|
|
24
|
+
* 利用方法は、FilterTagInput の story 内の説明を参照してください。
|
|
25
|
+
*
|
|
26
|
+
* 自動で横 100% に広がります。必要に応じて、親要素の幅を指定してください。
|
|
27
|
+
*
|
|
28
|
+
* ---
|
|
29
|
+
*
|
|
30
|
+
* 選択リストの形式は (string | string[])[] で、「文字列」と「文字列の配列」を混在させることができます。
|
|
31
|
+
* 選択項目が「文字列」の場合は、入力値に含まれる場合フィルタリングされます。
|
|
32
|
+
* 選択項目が「文字列の配列」の場合は、ラベルとしては「文字列の配列[0]」が表示されますが、フィルタリングされる際は「文字列の配列」全体を使ってフィルタリングされます。
|
|
33
|
+
*
|
|
34
|
+
* 例:
|
|
35
|
+
* options の項目が `[ "イルカ", ["パンダ", "ぱんだ", "熊猫"], "ライオン" ]` の場合、ユーザー入力が "ぱんだ"、"パン"、"猫" と入力したときにどの場合にも「パンダ」がフィルタリングされます。
|
|
36
|
+
*/
|
|
37
|
+
export declare const Default: StoryObj<typeof meta>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterComboBox } from "./FilterComboBox";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SelectContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
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, {}, never>;
|
|
4
|
+
export declare const SelectIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -2,6 +2,11 @@ import React, { type ReactElement, type ReactNode } from "react";
|
|
|
2
2
|
export declare const FilterInputContext: React.Context<{
|
|
3
3
|
isSmall: boolean;
|
|
4
4
|
}>;
|
|
5
|
+
type FilterTagProps = {
|
|
6
|
+
label: string;
|
|
7
|
+
onRemove: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const FilterTag: ({ label, onRemove }: FilterTagProps) => JSX.Element;
|
|
5
10
|
type FilterInputAbstractProps = {
|
|
6
11
|
selectedIndex: number;
|
|
7
12
|
selectOptions: {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export declare const FilterTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const FilterTagButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
1
3
|
export declare const FilterInputAbstract: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
4
|
export declare const DropDownTrigger: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
type FilterTagInputProps = {
|
|
3
3
|
value: string;
|
|
4
|
-
|
|
4
|
+
options: string[];
|
|
5
5
|
selectedIndex: number;
|
|
6
6
|
selectOptions: {
|
|
7
7
|
icon: ReactElement;
|
|
@@ -10,5 +10,5 @@ type FilterTagInputProps = {
|
|
|
10
10
|
onChange: (value: string) => void;
|
|
11
11
|
onSelectChange: (index: number) => void;
|
|
12
12
|
};
|
|
13
|
-
export declare const FilterSelectInput: ({ value, values, selectedIndex, selectOptions, onChange, onSelectChange, }: FilterTagInputProps) => JSX.Element;
|
|
13
|
+
export declare const FilterSelectInput: ({ value, options: values, selectedIndex, selectOptions, onChange, onSelectChange, }: FilterTagInputProps) => JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import { StoryObj } from "@storybook/react";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ value, values, selectedIndex, selectOptions, onChange, onSelectChange, }: {
|
|
5
|
+
component: ({ value, options: values, selectedIndex, selectOptions, onChange, onSelectChange, }: {
|
|
6
6
|
value: string;
|
|
7
|
-
|
|
7
|
+
options: string[];
|
|
8
8
|
selectedIndex: number;
|
|
9
9
|
selectOptions: {
|
|
10
10
|
icon: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -19,5 +19,3 @@ export declare const PanelTagFieldFocusTrigger: import("styled-components").Styl
|
|
|
19
19
|
export declare const PanelInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
20
|
export declare const PanelInputSpacer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
21
21
|
export declare const PanelClearButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
-
export declare const FilterTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
-
export declare const FilterTagButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|