ingred-ui 23.9.0 → 23.10.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.
@@ -2,8 +2,19 @@ import React from "react";
2
2
  import { Theme } from "../../themes";
3
3
  export type BadgeColor = "primary" | "secondary" | "success" | "warning" | "danger" | "basic";
4
4
  export type BadgeType = "normal" | "pill" | "signal";
5
- export type BadgeSize = "medium" | "small";
5
+ export type BadgeSize = "xs" | "small" | "medium";
6
6
  export declare const BADGE_SIZE: {
7
+ xs: {
8
+ iconSize: number;
9
+ height: string;
10
+ pillHeight: string;
11
+ gap: string;
12
+ padding: (theme: Theme) => string;
13
+ signalPadding: (theme: Theme) => string;
14
+ signalGap: (theme: Theme) => string;
15
+ dotSize: string;
16
+ fontSize: string;
17
+ };
7
18
  small: {
8
19
  iconSize: number;
9
20
  height: string;
@@ -43,6 +43,11 @@ type DataTable2Props = {
43
43
  * - enabledWhen: "checked" + displayIn: "dropdown" → デスクトップ時は左側の3点リーダーボタン、モバイル時は「n件を操作」ドロップダウン
44
44
  * - enabledWhen: "unchecked" + displayIn: "toolbar" → デスクトップ時は右側の直接ボタン、モバイル時は右側の3点リーダーボタン
45
45
  * - enabledWhen: "unchecked" + displayIn: "dropdown" → デスクトップ・モバイル共に右側の3点リーダーボタン
46
+ *
47
+ * disabledプロパティによる追加制御:
48
+ * - enabledWhen: "checked"/"unchecked" と組み合わせて使用可能。基本条件に加えて追加の無効化条件を指定できる
49
+ * - 例: enabledWhen: "checked" + disabled: (rows) => rows.length >= 2 → 1件選択時のみ有効
50
+ * - enabledWhen: "custom" の場合はdisabled関数の結果のみで有効/無効が決定される
46
51
  */
47
52
  tableActions?: TableAction[];
48
53
  /**
@@ -14,6 +14,7 @@ export type TableAction = {
14
14
  color?: "danger" | "primary" | "primaryPale" | "basicLight" | "basicDark" | "clear";
15
15
  displayIn?: "toolbar" | "dropdown";
16
16
  enabledWhen?: "checked" | "unchecked" | "custom";
17
+ /** 追加の無効化条件。enabledWhenの基本条件に加えて評価される(customの場合はこの関数の結果のみで決定) */
17
18
  disabled?: (checkedRows: string[]) => boolean;
18
19
  style?: React.CSSProperties;
19
20
  headingLabel?: string;
@@ -29,6 +30,7 @@ export type TableAction = {
29
30
  onClick: (selectedRows: string[]) => void;
30
31
  color?: "danger" | "primary" | "primaryPale" | "basicLight" | "basicDark" | "clear";
31
32
  enabledWhen?: "checked" | "unchecked" | "custom";
33
+ /** 追加の無効化条件。enabledWhenの基本条件に加えて評価される(customの場合はこの関数の結果のみで決定) */
32
34
  disabled?: (checkedRows: string[]) => boolean;
33
35
  style?: React.CSSProperties;
34
36
  dynamicIconColor?: {