ingred-ui 31.0.4 → 31.0.6

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.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * useConfigPanelTextInputFocus - ConfigPanel 表示時のテキスト入力フォーカス
3
+ *
4
+ * パネルが位置確定したタイミングで、テキスト入力欄にフォーカスを当てます。
5
+ * 同一セッション内のオペレーター変更では再フォーカスしません。
6
+ */
7
+ /// <reference types="react" />
8
+ export type UseConfigPanelTextInputFocusProps = {
9
+ isOpen: boolean;
10
+ isPositioned: boolean;
11
+ focusSessionKey: string;
12
+ shouldFocus: boolean;
13
+ textInputRef: React.RefObject<HTMLInputElement | null>;
14
+ };
15
+ export declare const useConfigPanelTextInputFocus: ({ isOpen, isPositioned, focusSessionKey, shouldFocus, textInputRef, }: UseConfigPanelTextInputFocusProps) => void;
@@ -56,6 +56,8 @@ export type ConfigPanelValueInputProps = {
56
56
  onKeyDown: (event: React.KeyboardEvent) => void;
57
57
  /** 範囲指定オペレーターかどうかを判定する関数 */
58
58
  isRangeOperator: (operator: string) => boolean;
59
+ /** テキスト入力要素への ref(inputType=text 時のみ使用) */
60
+ textInputRef?: React.Ref<HTMLInputElement>;
59
61
  };
60
62
  /**
61
63
  * 値入力統合コンポーネント
@@ -10,5 +10,6 @@ export type MultiConditionInputProps = {
10
10
  filterConfig?: FilterTypeConfig;
11
11
  multiConditionState: UseMultiConditionStateReturn;
12
12
  onKeyDown: (event: React.KeyboardEvent) => void;
13
+ textInputRef?: React.Ref<HTMLInputElement>;
13
14
  };
14
15
  export declare const MultiConditionInput: React.FC<MultiConditionInputProps>;
@@ -37,6 +37,8 @@ export type TextValueInputProps = {
37
37
  onKeyDown?: (event: React.KeyboardEvent) => void;
38
38
  /** 日付の表示フォーマット(inputType=date時、dayjsのformat形式) @default YYYY-MM-DD */
39
39
  format?: string;
40
+ /** テキスト入力要素への ref(inputType=text 時のみ使用) */
41
+ inputRef?: React.Ref<HTMLInputElement>;
40
42
  };
41
43
  /**
42
44
  * テキスト/日付入力コンポーネント
@@ -168,6 +168,7 @@ export type AdvancedFilterConfigPanelProps = {
168
168
  onApply: (config: FilterConfig) => void;
169
169
  onCancel: () => void;
170
170
  editingFilter?: {
171
+ id?: string;
171
172
  operator: string;
172
173
  values: (string | boolean)[];
173
174
  conditions?: FilterCondition[];
@@ -150,3 +150,13 @@ export declare const getConditionPlaceholder: (conditionConfig: MultiFilterCondi
150
150
  * 条件設定の範囲指定オペレーターかどうかを判定
151
151
  */
152
152
  export declare const isConditionRangeOperator: (conditionConfig: MultiFilterConditionConfig, operator: string) => boolean;
153
+ type ConditionForTextFocus = {
154
+ id: string;
155
+ conditionKey: string;
156
+ operator: string;
157
+ };
158
+ /**
159
+ * 複数条件モードで最初のテキスト入力条件の ID を取得する
160
+ */
161
+ export declare const getFirstTextConditionId: (filterConfig: FilterTypeConfig | undefined, conditions: ConditionForTextFocus[]) => string | null;
162
+ export {};
@@ -33,6 +33,7 @@ export declare const useDateField2: ({ date, format, disabled, onDateChange, }:
33
33
  spellCheck?: undefined;
34
34
  autoCorrect?: undefined;
35
35
  style?: undefined;
36
+ "aria-label"?: undefined;
36
37
  onFocus?: undefined;
37
38
  onBlur?: undefined;
38
39
  onKeyDown?: undefined;
@@ -52,6 +53,7 @@ export declare const useDateField2: ({ date, format, disabled, onDateChange, }:
52
53
  style: {
53
54
  caretColor: "transparent";
54
55
  };
56
+ "aria-label": "日" | "月" | "年" | undefined;
55
57
  onFocus: () => void;
56
58
  onBlur: (e: React.FocusEvent) => void;
57
59
  onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
@@ -59,6 +59,16 @@ export type DropdownButtonProps = {
59
59
  * - アイコン + テキスト: スピナー + ローディングテキストを表示(`true`の場合はデフォルトで"Loading...")
60
60
  */
61
61
  loading?: boolean | string;
62
+ /**
63
+ * ドロップダウンメニューを開くトグルボタンに付ける accessible name。
64
+ * - split=true のときの分割トリガー(矢印のみのボタン)
65
+ * - 単一トリガーが children を持たないとき(アイコンのみ/ローディング中)
66
+ * のフォールバックとして使用されます。split モードのメインボタン (左側
67
+ * の onClick 用ボタン) には適用されないので、そちらが icon-only になる
68
+ * 場合は呼び出し側で `children` か aria-label を渡してください。
69
+ * @default "メニューを開く"
70
+ */
71
+ toggleAriaLabel?: string;
62
72
  };
63
73
  export type DropdownButtonSizeConfig = {
64
74
  arrowIconSize: number;
@@ -1,2 +1,2 @@
1
- declare const LoadingBar: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
1
+ declare const LoadingBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<any, "role" | "aria-busy" | "aria-label"> & Partial<Pick<any, "role" | "aria-busy" | "aria-label">>> & string;
2
2
  export default LoadingBar;
@@ -45,6 +45,10 @@ export type SliderProps = {
45
45
  * Additional inline styles.
46
46
  */
47
47
  style?: React.CSSProperties;
48
+ /**
49
+ * Accessible name for the slider. Use this when the slider has no visible label.
50
+ */
51
+ "aria-label"?: string;
48
52
  /**
49
53
  * ID of the element that labels the slider.
50
54
  */
@@ -32,6 +32,7 @@ export declare const useTimeField2: ({ time, disabled, onTimeChange, }: Props) =
32
32
  spellCheck?: undefined;
33
33
  autoCorrect?: undefined;
34
34
  style?: undefined;
35
+ "aria-label"?: undefined;
35
36
  onFocus?: undefined;
36
37
  onBlur?: undefined;
37
38
  onKeyDown?: undefined;
@@ -51,6 +52,7 @@ export declare const useTimeField2: ({ time, disabled, onTimeChange, }: Props) =
51
52
  style: {
52
53
  caretColor: "transparent";
53
54
  };
55
+ "aria-label": string;
54
56
  onFocus: () => void;
55
57
  onBlur: (e: React.FocusEvent) => void;
56
58
  onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
@@ -6,6 +6,13 @@ export type WeekTimeElementProps = {
6
6
  active: boolean;
7
7
  hover: boolean;
8
8
  } & React.HTMLAttributes<HTMLButtonElement | HTMLSpanElement>>;
9
+ /**
10
+ * インタラクティブなセル(button)として描画される場合は true。
11
+ * 読み取り専用(span)として描画される場合は false。
12
+ * span に aria-label / aria-pressed を付与すると axe の aria-prohibited-attr に該当するため、
13
+ * インタラクティブな場合のみ付与する。
14
+ */
15
+ interactive?: boolean;
9
16
  isWithinHoverRange?: (weekIndex: number, timeIndex: number) => boolean;
10
17
  onMouseOver?: (weekIndex: number, timeIndex: number) => void;
11
18
  onMouseDown?: (weekIndex: number, timeIndex: number, time: string) => void;