ingred-ui 33.7.0 → 33.9.0-canary.1

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.
@@ -25,6 +25,7 @@ export type CheckboxValueInputProps = {
25
25
  selectedValues: (string | boolean)[];
26
26
  /** チェックボックスの状態が変更されたときのコールバック */
27
27
  onValueToggle: (value: string | boolean, checked: boolean) => void;
28
+ disabled?: boolean;
28
29
  };
29
30
  /**
30
31
  * チェックボックス形式の値入力コンポーネント
@@ -58,6 +58,8 @@ export type ConfigPanelValueInputProps = {
58
58
  isRangeOperator: (operator: string) => boolean;
59
59
  /** テキスト入力要素への ref(inputType=text 時のみ使用) */
60
60
  textInputRef?: React.Ref<HTMLInputElement>;
61
+ /** 入力を無効化する */
62
+ disabled?: boolean;
61
63
  };
62
64
  /**
63
65
  * 値入力統合コンポーネント
@@ -25,6 +25,7 @@ export type RadioValueInputProps = {
25
25
  selectedRadioValue: string | boolean;
26
26
  /** ラジオボタンの選択が変更されたときのコールバック */
27
27
  onRadioChange: (value: string | boolean) => void;
28
+ disabled?: boolean;
28
29
  };
29
30
  /**
30
31
  * ラジオボタン形式の値入力コンポーネント
@@ -39,6 +39,7 @@ export type TextValueInputProps = {
39
39
  format?: string;
40
40
  /** テキスト入力要素への ref(inputType=text 時のみ使用) */
41
41
  inputRef?: React.Ref<HTMLInputElement>;
42
+ disabled?: boolean;
42
43
  };
43
44
  /**
44
45
  * テキスト/日付入力コンポーネント
@@ -104,6 +104,14 @@ export type MultiFilterConditionConfig = {
104
104
  * - false: 任意(空でも適用可能)
105
105
  */
106
106
  required?: boolean;
107
+ /**
108
+ * 他条件の選択値に応じてこの条件を活性化する。
109
+ * 未指定時は常に活性。指定時は参照条件の値が values のいずれかと一致したときのみ活性。
110
+ */
111
+ enabledWhen?: {
112
+ conditionKey: string;
113
+ values: (string | boolean)[];
114
+ };
107
115
  /** カスタムオペレーター関数 */
108
116
  customOperator?: (filterValues: (string | boolean)[], operator?: string, currentValue?: unknown) => boolean;
109
117
  /** カスタムバリデーション関数 */
@@ -137,6 +137,16 @@ export declare const getMultiConditionLogic: (filterConfig?: FilterTypeConfig) =
137
137
  * 条件キーから条件設定を取得する
138
138
  */
139
139
  export declare const getConditionConfigByKey: (filterConfig: FilterTypeConfig | undefined, conditionKey: string) => MultiFilterConditionConfig | undefined;
140
+ /**
141
+ * enabledWhen により条件入力が非活性かどうかを判定する
142
+ */
143
+ export declare const isConditionDisabledByDependency: (conditionConfig: MultiFilterConditionConfig, conditions: Array<{
144
+ conditionKey: string;
145
+ operator: string;
146
+ value: string;
147
+ selectedValues: (string | boolean)[];
148
+ selectedRadioValue: string | boolean;
149
+ }>, filterConfig?: FilterTypeConfig) => boolean;
140
150
  /**
141
151
  * 条件設定のデフォルトオペレーターを取得する
142
152
  * defaultOperatorがoperatorsに存在しない場合はエラーを投げる
@@ -16,6 +16,35 @@ type FilterTagInputProps = {
16
16
  tagVariant?: FilterVariant;
17
17
  searchPlaceholder?: string;
18
18
  noResultsMessage?: string;
19
+ /**
20
+ * 検索語が入力されるまで候補リストを描画しない
21
+ * 候補が大量にある場合に、開いた瞬間の全件描画を避けるためのオプション。
22
+ * @default false
23
+ */
24
+ showOptionsOnlyWhenSearching?: boolean;
25
+ /**
26
+ * showOptionsOnlyWhenSearching=true かつ検索語が空のときに表示する案内文言
27
+ * @default "キーワードを入力してください"
28
+ */
29
+ searchPromptMessage?: string;
30
+ /**
31
+ * 候補の絞り込みをコンポーネント内で行うか。
32
+ * false にすると getFilteredOptions をスキップし、親から渡された options を
33
+ * そのまま描画する(サーバ検索など、親が options を供給するケース向け)。
34
+ * @default true
35
+ */
36
+ filterLocally?: boolean;
37
+ /**
38
+ * 検索語が変わるたびに呼ばれる。サーバ検索する親側で debounce する想定。
39
+ * filterLocally=false と組み合わせて使う。
40
+ */
41
+ onSearchChange?: (searchTerm: string) => void;
42
+ /**
43
+ * 検索結果を取得中かどうか。true の間は候補の代わりにローディングを表示する。
44
+ * サーバ検索(filterLocally=false)と組み合わせて使う。
45
+ * @default false
46
+ */
47
+ isLoading?: boolean;
19
48
  disabled?: boolean;
20
49
  applyButtonText?: string;
21
50
  cancelButtonText?: string;
@@ -31,5 +60,5 @@ type FilterTagInputProps = {
31
60
  */
32
61
  middleware?: Middleware[];
33
62
  };
34
- export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, searchPlaceholder, noResultsMessage, disabled, applyButtonText, cancelButtonText, error, placement, middleware, }: FilterTagInputProps) => React.JSX.Element;
63
+ export declare const FilterComboBox: ({ values, options, selectedIndex, selectOptions, onChange, onSelectChange, size, variant, tagVariant, searchPlaceholder, noResultsMessage, showOptionsOnlyWhenSearching, searchPromptMessage, filterLocally, onSearchChange, isLoading, disabled, applyButtonText, cancelButtonText, error, placement, middleware, }: FilterTagInputProps) => React.JSX.Element;
35
64
  export {};
@@ -47,6 +47,7 @@ export declare const StyledContextMenu2TextInputItem: import("styled-components/
47
47
  as?: import("styled-components").WebTarget | undefined;
48
48
  forwardedAs?: import("styled-components").WebTarget | undefined;
49
49
  }, "$insetFocusRingPadding">>> & string;
50
+ export declare const LoadingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
50
51
  export declare const SearchHeaderContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
51
52
  export declare const SearchInputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
52
53
  export declare const SearchResetButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>> & string;
@@ -106,6 +106,18 @@ export type Select2Props = {
106
106
  * @default "オプションがありません"
107
107
  */
108
108
  noResultsMessage?: string;
109
+ /**
110
+ * 検索語が入力されるまで候補リストを描画しない
111
+ * 候補が大量にある場合に、開いた瞬間の全件描画を避けるためのオプション。
112
+ * searchable=true が前提(検索窓がないと候補を表示できないため)。
113
+ * @default false
114
+ */
115
+ showOptionsOnlyWhenSearching?: boolean;
116
+ /**
117
+ * showOptionsOnlyWhenSearching=true かつ検索語が空のときに表示する案内文言
118
+ * @default "キーワードを入力してください"
119
+ */
120
+ searchPromptMessage?: string;
109
121
  /**
110
122
  * エラー状態
111
123
  * @default false