ingred-ui 26.1.0 → 27.0.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.
- package/bin/README.md +16 -3
- package/bin/codemods/palette-v2.mjs +86 -10
- package/dist/components/Accordion/Accordion.stories.d.ts +1 -1
- package/dist/components/ActionButton/ActionButton.stories.d.ts +2 -2
- package/dist/components/AdvancedFilter/AdvancedFilter.stories.d.ts +2 -2
- package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
- package/dist/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/components/Badge/types.d.ts +13 -13
- package/dist/components/Banner/Banner.stories.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +4 -4
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
- package/dist/components/Calendar/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/Calendar/CalendarRange/CalendarRange.stories.d.ts +1 -1
- package/dist/components/Card/Card.stories.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/ClickAwayListener/ClickAwayListener.stories.d.ts +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.stories.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.stories.d.ts +1 -1
- package/dist/components/ContextMenu2/ContextMenu2.stories.d.ts +1 -1
- package/dist/components/DataTable/DataTable.stories.d.ts +1 -1
- package/dist/components/DataTable2/DataTable2.stories.d.ts +5 -5
- package/dist/components/DataTable2/types/tableActions.d.ts +3 -2
- package/dist/components/DateField/DateField/DateField.stories.d.ts +1 -1
- package/dist/components/DateField/DateRangeField/DateRangeField.stories.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.stories.d.ts +1 -1
- package/dist/components/Divider/Divider.stories.d.ts +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/components/DropdownButton/DropdownButton.stories.d.ts +1 -1
- package/dist/components/DualListBox/DualListBox.stories.d.ts +1 -1
- package/dist/components/DualListBox2/DualListBox2.stories.d.ts +1 -1
- package/dist/components/ErrorText/ErrorText.stories.d.ts +1 -1
- package/dist/components/Fade/Fade.stories.d.ts +1 -1
- package/dist/components/FileUploader/FileUploader.stories.d.ts +1 -1
- package/dist/components/FilterComboBox/FilterComboBox.stories.d.ts +11 -10
- package/dist/components/FilterInputAbstract/FilterInputAbstract.stories.d.ts +5 -4
- package/dist/components/FilterSelectInput/FilterSelectInput.stories.d.ts +7 -7
- package/dist/components/FilterTagInput/FilterTagInput.stories.d.ts +6 -6
- package/dist/components/FixedPanel/FixedPanel.stories.d.ts +1 -1
- package/dist/components/Flex/Flex.stories.d.ts +1 -1
- package/dist/components/FullSizeConfirmModal/FullSizeConfirmModal.stories.d.ts +82 -58
- package/dist/components/Grow/Grow.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/ItemEmpty/ItemEmpty.stories.d.ts +1 -1
- package/dist/components/LoadingBar/LoadingBar.stories.d.ts +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.stories.d.ts +1 -1
- package/dist/components/Menu/Menu.stories.d.ts +28 -20
- package/dist/components/MenuList/MenuList.stories.d.ts +29 -21
- package/dist/components/Modal/Modal.stories.d.ts +1 -1
- package/dist/components/MultipleFilter/MultipleFilter.stories.d.ts +1 -1
- package/dist/components/NavigationRail/NavigationRail.stories.d.ts +1 -1
- package/dist/components/NotificationBadge/NotificationBadge.stories.d.ts +1 -1
- package/dist/components/Pager/Pager.stories.d.ts +1 -1
- package/dist/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.stories.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +1 -1
- package/dist/components/Select2/Select2.stories.d.ts +87 -15
- package/dist/components/Slide/Slide.stories.d.ts +1 -1
- package/dist/components/Slider/Slider.stories.d.ts +2 -2
- package/dist/components/Snackbar/Snackbar.stories.d.ts +39 -27
- package/dist/components/Spacer/Spacer.stories.d.ts +1 -1
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/Switch/Switch.stories.d.ts +1 -1
- package/dist/components/Tag/Tag.stories.d.ts +3 -2
- package/dist/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/components/TimeField/TimeField.stories.d.ts +1 -1
- package/dist/components/Toast/Toast.stories.d.ts +52 -36
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/components/WeekTime/WeekTime/WeekTime.stories.d.ts +1 -1
- package/dist/components/WeekTime/WeekTimeSelector/WeekTimeSelector.stories.d.ts +1 -1
- package/dist/index.es.js +11 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +111 -111
- package/dist/index.js.map +1 -1
- package/dist/styles/shadow.d.ts +2 -2
- package/package.json +8 -9
package/bin/README.md
CHANGED
|
@@ -41,14 +41,27 @@ npx ingred-ui-codemod palette-v2 ./src
|
|
|
41
41
|
| `palette.danger.light` | `palette.danger.lighter` |
|
|
42
42
|
| `palette.warning.deepDark` | `palette.warning.ultraDark` |
|
|
43
43
|
| `colors.basic` | `colors.gray` |
|
|
44
|
-
| `color="gray"` | `color="
|
|
44
|
+
| `color="gray"` | `color="secondaryDark"`(Button 等) |
|
|
45
|
+
|
|
46
|
+
後続ステップで **Button / Badge の旧 `color` 文字列**も置換します(`palette-v2` 内の [5/7]〜[7/7])。
|
|
47
|
+
|
|
48
|
+
| 対象(例) | 新 |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `color="gray"`(Button) | `color="secondaryDark"` |
|
|
51
|
+
| `color="primaryPale"` | `color="primarySubtle"` |
|
|
52
|
+
| `color="basicLight"` | `color="secondaryLight"` |
|
|
53
|
+
| `color="neutral"`(Button 等) | `color="secondaryDark"` |
|
|
54
|
+
| `<Badge color="secondary"` | `<Badge color="secondaryDark"` |
|
|
55
|
+
| `<Badge color="basic"` | `<Badge color="inverse"` |
|
|
56
|
+
|
|
57
|
+
**注意:** `color="neutral"` の置換は **Typography の `color` や styled-components の CSS 値**にもマッチする可能性があります。置換後は必ず型チェックと差分確認を行ってください。
|
|
45
58
|
|
|
46
59
|
**手動対応が必要なもの:**
|
|
47
60
|
|
|
48
61
|
以下のパターンは自動置換せず、警告のみ表示します。
|
|
49
62
|
|
|
50
|
-
- `primaryPale
|
|
51
|
-
- `basicDark` —
|
|
63
|
+
- `primaryPale`(palette 等の **パレット参照**)— 廃止。`palette.primary` の適切なスロットに置き換えてください。
|
|
64
|
+
- `basicDark` — 廃止。Button 等は `color="secondaryDark"` に置き換えてください。
|
|
52
65
|
- `colors.blue[40]` — 廃止。`colors.blue[50]` に置き換えてください。
|
|
53
66
|
|
|
54
67
|
## オプション
|
|
@@ -37,7 +37,7 @@ function findFiles(dir) {
|
|
|
37
37
|
|
|
38
38
|
const STEPS = [
|
|
39
39
|
{
|
|
40
|
-
label: "[1/
|
|
40
|
+
label: "[1/7] palette.gray → palette.neutral(段名変更含む)",
|
|
41
41
|
replacements: [
|
|
42
42
|
{
|
|
43
43
|
pattern: /palette\.gray\.deepDark/g,
|
|
@@ -72,7 +72,7 @@ const STEPS = [
|
|
|
72
72
|
],
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
label: "[2/
|
|
75
|
+
label: "[2/7] colors.basic → colors.gray",
|
|
76
76
|
replacements: [
|
|
77
77
|
{
|
|
78
78
|
pattern: /colors\.basic/g,
|
|
@@ -82,7 +82,7 @@ const STEPS = [
|
|
|
82
82
|
],
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
label: "[3/
|
|
85
|
+
label: "[3/7] palette.*.main → palette.*.base",
|
|
86
86
|
replacements: [
|
|
87
87
|
{
|
|
88
88
|
pattern: /palette\.primary\.main/g,
|
|
@@ -112,7 +112,7 @@ const STEPS = [
|
|
|
112
112
|
],
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
label: "[4/
|
|
115
|
+
label: "[4/7] 段名の修正(旧色値を維持するための付け替え)",
|
|
116
116
|
replacements: [
|
|
117
117
|
{
|
|
118
118
|
pattern: /palette\.primary\.light/g,
|
|
@@ -152,17 +152,93 @@ const STEPS = [
|
|
|
152
152
|
],
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
|
-
label: "[5/
|
|
155
|
+
label: "[5/7] Button color(旧 gray)",
|
|
156
156
|
replacements: [
|
|
157
157
|
{
|
|
158
158
|
pattern: /color="gray"/g,
|
|
159
|
-
replacement: 'color="
|
|
160
|
-
description: 'color="gray" → color="
|
|
159
|
+
replacement: 'color="secondaryDark"',
|
|
160
|
+
description: 'color="gray" → color="secondaryDark"',
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
pattern: /color='gray'/g,
|
|
164
|
-
replacement: "color='
|
|
165
|
-
description: "color='gray' → color='
|
|
164
|
+
replacement: "color='secondaryDark'",
|
|
165
|
+
description: "color='gray' → color='secondaryDark'",
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: "[6/7] Button color(primaryPale / basicLight / neutral)",
|
|
171
|
+
replacements: [
|
|
172
|
+
{
|
|
173
|
+
pattern: /color="primaryPale"/g,
|
|
174
|
+
replacement: 'color="primarySubtle"',
|
|
175
|
+
description: 'color="primaryPale" → color="primarySubtle"',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
pattern: /color='primaryPale'/g,
|
|
179
|
+
replacement: "color='primarySubtle'",
|
|
180
|
+
description: "color='primaryPale' → color='primarySubtle'",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
pattern: /color="basicLight"/g,
|
|
184
|
+
replacement: 'color="secondaryLight"',
|
|
185
|
+
description: 'color="basicLight" → color="secondaryLight"',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
pattern: /color='basicLight'/g,
|
|
189
|
+
replacement: "color='secondaryLight'",
|
|
190
|
+
description: "color='basicLight' → color='secondaryLight'",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
pattern: /color="neutral"/g,
|
|
194
|
+
replacement: 'color="secondaryDark"',
|
|
195
|
+
description:
|
|
196
|
+
'color="neutral" → color="secondaryDark"(Button 等の color プロップ向け。palette.neutral や Typography とは別なので要確認)',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
pattern: /color='neutral'/g,
|
|
200
|
+
replacement: "color='secondaryDark'",
|
|
201
|
+
description: "color='neutral' → color='secondaryDark'",
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
pattern: /color: "primaryPale"/g,
|
|
205
|
+
replacement: 'color: "primarySubtle"',
|
|
206
|
+
description: 'color: "primaryPale" → color: "primarySubtle"',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
pattern: /color: "basicLight"/g,
|
|
210
|
+
replacement: 'color: "secondaryLight"',
|
|
211
|
+
description: 'color: "basicLight" → color: "secondaryLight"',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
pattern: /color: "neutral"/g,
|
|
215
|
+
replacement: 'color: "secondaryDark"',
|
|
216
|
+
description: 'color: "neutral" → color: "secondaryDark"',
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "[7/7] Badge color(secondary / basic)",
|
|
222
|
+
replacements: [
|
|
223
|
+
{
|
|
224
|
+
pattern: /<Badge color="secondary"/g,
|
|
225
|
+
replacement: '<Badge color="secondaryDark"',
|
|
226
|
+
description: 'Badge color="secondary" → color="secondaryDark"',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
pattern: /<Badge color='secondary'/g,
|
|
230
|
+
replacement: "<Badge color='secondaryDark'",
|
|
231
|
+
description: "Badge color='secondary' → color='secondaryDark'",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
pattern: /<Badge color="basic"/g,
|
|
235
|
+
replacement: '<Badge color="inverse"',
|
|
236
|
+
description: 'Badge color="basic" → color="inverse"',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
pattern: /<Badge color='basic'/g,
|
|
240
|
+
replacement: "<Badge color='inverse'",
|
|
241
|
+
description: "Badge color='basic' → color='inverse'",
|
|
166
242
|
},
|
|
167
243
|
],
|
|
168
244
|
},
|
|
@@ -177,7 +253,7 @@ const WARNING_PATTERNS = [
|
|
|
177
253
|
{
|
|
178
254
|
pattern: /basicDark/,
|
|
179
255
|
description:
|
|
180
|
-
"basicDark は廃止されました。color=\"
|
|
256
|
+
"basicDark は廃止されました。Button 等の color は color=\"secondaryDark\" に置き換えてください。",
|
|
181
257
|
},
|
|
182
258
|
{
|
|
183
259
|
pattern: /blue\[40\]/,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from "@storybook/react";
|
|
1
|
+
import { StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ActionButtonProps } from "./ActionButton";
|
|
4
4
|
declare const _default: {
|
|
@@ -8,7 +8,7 @@ declare const _default: {
|
|
|
8
8
|
color?: ("primary" | "warning") | undefined;
|
|
9
9
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
args: {
|
|
11
|
-
onClick: import("
|
|
11
|
+
onClick: import("storybook/actions").HandlerFunction;
|
|
12
12
|
icon: string;
|
|
13
13
|
children: string;
|
|
14
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import { AdvancedFilter } from "./AdvancedFilter";
|
|
3
3
|
declare const meta: Meta<typeof AdvancedFilter>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof AdvancedFilter>;
|
|
6
6
|
export declare const Default: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Theme } from "../../themes";
|
|
3
|
-
export type BadgeColor = "primary" | "
|
|
3
|
+
export type BadgeColor = "primary" | "secondaryDark" | "success" | "warning" | "danger" | "inverse";
|
|
4
4
|
export type BadgeType = "normal" | "pill" | "signal";
|
|
5
5
|
export type BadgeSize = "xs" | "small" | "medium";
|
|
6
6
|
export declare const BADGE_SIZE: {
|
|
@@ -41,53 +41,53 @@ export declare const BADGE_SIZE: {
|
|
|
41
41
|
export declare const BACKGROUND_COLOR_MAP: {
|
|
42
42
|
normal: {
|
|
43
43
|
primary: (theme: Theme) => string;
|
|
44
|
-
|
|
44
|
+
secondaryDark: (theme: Theme) => string;
|
|
45
45
|
success: (theme: Theme) => string;
|
|
46
46
|
warning: (theme: Theme) => string;
|
|
47
47
|
danger: (theme: Theme) => string;
|
|
48
|
-
|
|
48
|
+
inverse: (theme: Theme) => string;
|
|
49
49
|
};
|
|
50
50
|
pill: {
|
|
51
51
|
primary: (theme: Theme) => string;
|
|
52
|
-
|
|
52
|
+
secondaryDark: (theme: Theme) => string;
|
|
53
53
|
success: (theme: Theme) => string;
|
|
54
54
|
warning: (theme: Theme) => string;
|
|
55
55
|
danger: (theme: Theme) => string;
|
|
56
|
-
|
|
56
|
+
inverse: (theme: Theme) => string;
|
|
57
57
|
};
|
|
58
58
|
signal: {
|
|
59
59
|
primary: (theme: Theme) => string;
|
|
60
|
-
|
|
60
|
+
secondaryDark: (theme: Theme) => string;
|
|
61
61
|
success: (theme: Theme) => string;
|
|
62
62
|
warning: (theme: Theme) => string;
|
|
63
63
|
danger: (theme: Theme) => string;
|
|
64
|
-
|
|
64
|
+
inverse: (theme: Theme) => string;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
export declare const TEXT_COLOR_MAP: {
|
|
68
68
|
normal: {
|
|
69
69
|
primary: (theme: Theme) => string;
|
|
70
|
-
|
|
70
|
+
secondaryDark: (theme: Theme) => string;
|
|
71
71
|
success: (theme: Theme) => string;
|
|
72
72
|
warning: (theme: Theme) => string;
|
|
73
73
|
danger: (theme: Theme) => string;
|
|
74
|
-
|
|
74
|
+
inverse: (theme: Theme) => string;
|
|
75
75
|
};
|
|
76
76
|
pill: {
|
|
77
77
|
primary: (theme: Theme) => string;
|
|
78
|
-
|
|
78
|
+
secondaryDark: (theme: Theme) => string;
|
|
79
79
|
success: (theme: Theme) => string;
|
|
80
80
|
warning: (theme: Theme) => string;
|
|
81
81
|
danger: (theme: Theme) => string;
|
|
82
|
-
|
|
82
|
+
inverse: (theme: Theme) => string;
|
|
83
83
|
};
|
|
84
84
|
signal: {
|
|
85
85
|
primary: (theme: Theme) => string;
|
|
86
|
-
|
|
86
|
+
secondaryDark: (theme: Theme) => string;
|
|
87
87
|
success: (theme: Theme) => string;
|
|
88
88
|
warning: (theme: Theme) => string;
|
|
89
89
|
danger: (theme: Theme) => string;
|
|
90
|
-
|
|
90
|
+
inverse: (theme: Theme) => string;
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
export declare const getBackgroundColor: (key: BadgeColor, theme: Theme, type: BadgeType) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Theme } from "../../themes";
|
|
3
3
|
export type ButtonSize = "small" | "medium" | "large";
|
|
4
|
-
export type ButtonColor = "primary" | "
|
|
4
|
+
export type ButtonColor = "primary" | "primarySubtle" | "secondaryLight" | "secondaryDark" | "danger" | "clear";
|
|
5
5
|
export type ButtonColorStyle = {
|
|
6
6
|
normal: {
|
|
7
7
|
background: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StoryObj } from "@storybook/react";
|
|
2
|
+
import { StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { ButtonProps } from "./Button";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
components: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
|
|
7
7
|
args: {
|
|
8
|
-
onClick: import("
|
|
8
|
+
onClick: import("storybook/actions").HandlerFunction;
|
|
9
9
|
};
|
|
10
10
|
parameters: {
|
|
11
11
|
docs: {
|
|
@@ -21,8 +21,8 @@ export declare const Primary: StoryObj<ButtonProps>;
|
|
|
21
21
|
export declare const BasicLight: StoryObj<ButtonProps>;
|
|
22
22
|
export declare const Danger: StoryObj<ButtonProps>;
|
|
23
23
|
export declare const Clear: StoryObj<ButtonProps>;
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
24
|
+
export declare const SecondaryDark: StoryObj<ButtonProps>;
|
|
25
|
+
export declare const PrimarySubtle: StoryObj<ButtonProps>;
|
|
26
26
|
export declare const Small: StoryObj<ButtonProps>;
|
|
27
27
|
export declare const Medium: StoryObj<ButtonProps>;
|
|
28
28
|
export declare const Large: StoryObj<ButtonProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DataTableProps } from "./DataTable";
|
|
3
3
|
import { data } from "./mockData";
|
|
4
|
-
import { StoryObj } from "@storybook/react";
|
|
4
|
+
import { StoryObj } from "@storybook/react-vite";
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
7
|
component: <T, K extends keyof T>(props: DataTableProps<T, K> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StoryObj } from "@storybook/react";
|
|
3
|
-
import { type TableColumn, type TableAction } from "./index";
|
|
2
|
+
import { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import { type TableColumn, type TableAction, DataTable2 } from "./index";
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: ({ bordered, currentPage, pageSize, pageSizeOptions, totalCount, columns, onPageChange, onPageSizeChange, onColumnsChange, onCheckedRowsChange, children, tableActions, customTableActionArea, }: {
|
|
@@ -66,8 +66,8 @@ export default meta;
|
|
|
66
66
|
* </DataTable2>
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
export declare const Default: StoryObj<typeof
|
|
70
|
-
export declare const Sample: StoryObj<typeof
|
|
69
|
+
export declare const Default: StoryObj<typeof DataTable2>;
|
|
70
|
+
export declare const Sample: StoryObj<typeof DataTable2>;
|
|
71
71
|
/**
|
|
72
72
|
* 以下のように、セルの loading を true に設定すると、スピナーが表示されます。
|
|
73
73
|
* ```
|
|
@@ -78,4 +78,4 @@ export declare const Sample: StoryObj<typeof meta>;
|
|
|
78
78
|
* また、DataTable2 の props について `rowControls` や `extraButtons` を未指定にすると、該当機能のボタンが表示されません。
|
|
79
79
|
* 「カラム」でフィルターやソートを明示しない場合も、それらの機能は非表示になります。
|
|
80
80
|
*/
|
|
81
|
-
export declare const Loading: StoryObj<typeof
|
|
81
|
+
export declare const Loading: StoryObj<typeof DataTable2>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ButtonColor } from "../../Button/Button";
|
|
2
3
|
/**
|
|
3
4
|
* テーブルアクションボタン群の定義。enabledWhenとdisplayInで表示場所を制御:
|
|
4
5
|
* - enabledWhen: "checked" + displayIn: "toolbar" → デスクトップ時は左側の直接ボタン、モバイル時は「n件を操作」ドロップダウン
|
|
@@ -11,7 +12,7 @@ export type TableAction = {
|
|
|
11
12
|
label: string;
|
|
12
13
|
icon?: React.ReactNode;
|
|
13
14
|
onClick: (selectedRows: string[]) => void;
|
|
14
|
-
color?:
|
|
15
|
+
color?: ButtonColor;
|
|
15
16
|
displayIn?: "toolbar" | "dropdown";
|
|
16
17
|
enabledWhen?: "checked" | "unchecked" | "custom";
|
|
17
18
|
/** 追加の無効化条件。enabledWhenの基本条件に加えて評価される(customの場合はこの関数の結果のみで決定) */
|
|
@@ -28,7 +29,7 @@ export type TableAction = {
|
|
|
28
29
|
label: string;
|
|
29
30
|
icon?: React.ReactNode;
|
|
30
31
|
onClick: (selectedRows: string[]) => void;
|
|
31
|
-
color?:
|
|
32
|
+
color?: ButtonColor;
|
|
32
33
|
enabledWhen?: "checked" | "unchecked" | "custom";
|
|
33
34
|
/** 追加の無効化条件。enabledWhenの基本条件に加えて評価される(customの場合はこの関数の結果のみで決定) */
|
|
34
35
|
disabled?: (checkedRows: string[]) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import Drawer from "./Drawer";
|
|
3
3
|
declare const meta: Meta<typeof Drawer>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof Drawer>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Responsive: Story;
|
|
8
8
|
export declare const WithStickyHeaderFooter: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { DropdownButtonProps } from "./types";
|
|
3
|
-
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import { StoryObj } from "@storybook/react-vite";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: React.FC<DropdownButtonProps>;
|