@zenkigen-inc/component-ui 1.16.3 → 1.18.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/README.md +9 -0
- package/dist/index.d.mts +231 -48
- package/dist/index.d.ts +231 -48
- package/dist/index.js +1061 -419
- package/dist/index.mjs +1036 -400
- package/package.json +6 -4
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, ReactNode, ChangeEvent, MouseEvent, MutableRefObject, ReactElement, RefObject, FormEvent, ButtonHTMLAttributes, TextareaHTMLAttributes
|
|
2
|
+
import react__default, { PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, ReactNode, ChangeEvent, MouseEvent, MutableRefObject, ReactElement, RefObject, InputHTMLAttributes, FormEvent, ButtonHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import { IconName } from '@zenkigen-inc/component-icons';
|
|
4
4
|
import { iconColors, tagLightColors } from '@zenkigen-inc/component-theme';
|
|
5
|
+
import { tokens } from '@zenkigen-inc/component-config';
|
|
6
|
+
import { useFloating } from '@floating-ui/react';
|
|
5
7
|
|
|
6
|
-
type Props$
|
|
8
|
+
type Props$z = {
|
|
7
9
|
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
8
10
|
userId?: number;
|
|
9
11
|
firstName?: string;
|
|
10
12
|
lastName?: string;
|
|
11
13
|
isDisabled?: boolean;
|
|
12
14
|
};
|
|
13
|
-
declare function Avatar({ size, ...props }: Props$
|
|
15
|
+
declare function Avatar({ size, ...props }: Props$z): react.JSX.Element;
|
|
14
16
|
|
|
15
17
|
declare function Breadcrumb({ children }: PropsWithChildren): react.JSX.Element;
|
|
16
18
|
declare namespace Breadcrumb {
|
|
17
19
|
var Item: ({ children }: PropsWithChildren) => react.JSX.Element;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
type Size$
|
|
22
|
+
type Size$3 = 'small' | 'medium' | 'large';
|
|
21
23
|
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
22
24
|
type JustifyContent = 'start' | 'center';
|
|
23
25
|
type ElementAs = ElementType;
|
|
@@ -25,20 +27,22 @@ type AsProp<T extends ElementAs> = {
|
|
|
25
27
|
elementAs?: T;
|
|
26
28
|
};
|
|
27
29
|
type PolymorphicPropsWithoutRef<T extends ElementAs, P extends object> = PropsWithChildren<P> & ComponentPropsWithoutRef<T> & AsProp<T>;
|
|
28
|
-
type
|
|
29
|
-
size?: Size$
|
|
30
|
+
type BaseProps$1<T extends ElementAs> = PolymorphicPropsWithoutRef<T, {
|
|
31
|
+
size?: Size$3;
|
|
30
32
|
width?: CSSProperties['width'];
|
|
31
33
|
isSelected?: boolean;
|
|
32
34
|
isDisabled?: boolean;
|
|
33
|
-
variant?: Variant$1;
|
|
34
35
|
before?: ReactNode;
|
|
35
36
|
after?: ReactNode;
|
|
36
37
|
borderRadius?: CSSProperties['borderRadius'];
|
|
37
38
|
justifyContent?: JustifyContent;
|
|
38
39
|
}>;
|
|
39
|
-
|
|
40
|
+
type PublicProps<T extends ElementAs> = BaseProps$1<T> & {
|
|
41
|
+
variant?: Variant$1;
|
|
42
|
+
};
|
|
43
|
+
declare const Button: <T extends ElementAs = "button">(props: PublicProps<T>) => react.JSX.Element;
|
|
40
44
|
|
|
41
|
-
type Props$
|
|
45
|
+
type Props$y = {
|
|
42
46
|
name?: string;
|
|
43
47
|
value?: string;
|
|
44
48
|
id?: string;
|
|
@@ -49,13 +53,13 @@ type Props$u = {
|
|
|
49
53
|
label?: string;
|
|
50
54
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
51
55
|
};
|
|
52
|
-
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$
|
|
56
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$y): react.JSX.Element;
|
|
53
57
|
|
|
54
|
-
type Props$
|
|
58
|
+
type Props$x = {
|
|
55
59
|
color?: 'gray' | 'red';
|
|
56
60
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
57
61
|
};
|
|
58
|
-
declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props$
|
|
62
|
+
declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props$x>): react.JSX.Element;
|
|
59
63
|
|
|
60
64
|
type DropdownItemType = {
|
|
61
65
|
id: string;
|
|
@@ -66,15 +70,15 @@ type DropdownItemType = {
|
|
|
66
70
|
type DropdownVerticalPosition = 'top' | 'bottom';
|
|
67
71
|
type DropdownHorizontalAlign = 'left' | 'center' | 'right';
|
|
68
72
|
|
|
69
|
-
type Props$
|
|
73
|
+
type Props$w = {
|
|
70
74
|
maxHeight?: CSSProperties['height'];
|
|
71
75
|
isNoPadding?: boolean;
|
|
72
76
|
verticalPosition?: DropdownVerticalPosition;
|
|
73
77
|
horizontalAlign?: DropdownHorizontalAlign;
|
|
74
78
|
};
|
|
75
|
-
declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props$
|
|
79
|
+
declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props$w>): false | react.JSX.Element;
|
|
76
80
|
|
|
77
|
-
type Props$
|
|
81
|
+
type Props$v = {
|
|
78
82
|
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
79
83
|
variant?: 'text' | 'outline';
|
|
80
84
|
title?: string;
|
|
@@ -90,28 +94,73 @@ type Props$r = {
|
|
|
90
94
|
label: string;
|
|
91
95
|
icon?: IconName;
|
|
92
96
|
});
|
|
93
|
-
declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props$
|
|
97
|
+
declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props$v>): react.JSX.Element;
|
|
94
98
|
declare namespace Dropdown {
|
|
95
99
|
var Menu: typeof DropdownMenu;
|
|
96
100
|
var Item: typeof DropdownItem;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
type Props$
|
|
103
|
+
type Props$u = {
|
|
100
104
|
value: number;
|
|
101
105
|
isEditable?: boolean;
|
|
102
106
|
onChangeRating?: (newRating: number) => void | null;
|
|
103
107
|
size?: 'medium' | 'large';
|
|
104
108
|
};
|
|
105
|
-
declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props$
|
|
109
|
+
declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props$u): react.JSX.Element;
|
|
110
|
+
|
|
111
|
+
type Size$2 = 'small' | 'medium' | 'large';
|
|
112
|
+
declare const ERROR_TYPES: {
|
|
113
|
+
readonly SIZE_TOO_LARGE: "SIZE_TOO_LARGE";
|
|
114
|
+
readonly UNSUPPORTED_FORMAT: "UNSUPPORTED_FORMAT";
|
|
115
|
+
};
|
|
116
|
+
type FileInputErrorType = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES];
|
|
117
|
+
type FileInputError = {
|
|
118
|
+
type: FileInputErrorType;
|
|
119
|
+
message: string;
|
|
120
|
+
};
|
|
121
|
+
type BaseFileInputProps = {
|
|
122
|
+
/** input要素のID(外部のlabel要素との連携用) */
|
|
123
|
+
id?: string;
|
|
124
|
+
/** 許可するファイル形式(MIMEタイプ) */
|
|
125
|
+
accept?: string;
|
|
126
|
+
/** 最大ファイルサイズ(バイト単位) */
|
|
127
|
+
maxSize?: number;
|
|
128
|
+
/** 無効化状態 */
|
|
129
|
+
isDisabled?: boolean;
|
|
130
|
+
/** エラー状態 */
|
|
131
|
+
isError?: boolean;
|
|
132
|
+
/** ファイル選択時のコールバック */
|
|
133
|
+
onSelect?: (file: File | null) => void;
|
|
134
|
+
/** エラー時のコールバック */
|
|
135
|
+
onError?: (errors: FileInputError[]) => void;
|
|
136
|
+
/** エラーメッセージリスト */
|
|
137
|
+
errorMessages?: string[];
|
|
138
|
+
};
|
|
139
|
+
type ButtonFileInputProps = BaseFileInputProps & {
|
|
140
|
+
/** コンポーネントのバリエーション */
|
|
141
|
+
variant: 'button';
|
|
142
|
+
/** サイズ */
|
|
143
|
+
size?: Size$2;
|
|
144
|
+
};
|
|
145
|
+
type DropzoneFileInputProps = BaseFileInputProps & {
|
|
146
|
+
/** コンポーネントのバリエーション */
|
|
147
|
+
variant: 'dropzone';
|
|
148
|
+
};
|
|
149
|
+
type FileInputProps = ButtonFileInputProps | DropzoneFileInputProps;
|
|
150
|
+
type FileInputRef = {
|
|
151
|
+
/** ファイル選択状態をリセット */
|
|
152
|
+
reset: () => void;
|
|
153
|
+
};
|
|
154
|
+
declare const FileInput: react.ForwardRefExoticComponent<FileInputProps & react.RefAttributes<FileInputRef>>;
|
|
106
155
|
|
|
107
156
|
type Level = 1 | 2 | 3 | 4 | 5;
|
|
108
|
-
type Props$
|
|
157
|
+
type Props$t = {
|
|
109
158
|
level: Level;
|
|
110
159
|
before?: ReactNode;
|
|
111
160
|
after?: ReactNode;
|
|
112
161
|
children?: ReactNode;
|
|
113
162
|
};
|
|
114
|
-
declare function Heading(props: Props$
|
|
163
|
+
declare function Heading(props: Props$t): react.JSX.Element;
|
|
115
164
|
|
|
116
165
|
declare const useOutsideClick: <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: Event) => void, enabled?: boolean) => void;
|
|
117
166
|
|
|
@@ -129,20 +178,72 @@ type UseRovingFocusReturn = {
|
|
|
129
178
|
};
|
|
130
179
|
declare const useRovingFocus: ({ values, defaultFocusedValue, isDisabled, }: UseRovingFocusProps) => UseRovingFocusReturn;
|
|
131
180
|
|
|
181
|
+
type UserColorToken = keyof typeof tokens.user;
|
|
182
|
+
type TextColorToken = keyof typeof tokens.tokens.text;
|
|
183
|
+
type LinkColorToken = keyof typeof tokens.tokens.link;
|
|
184
|
+
type BackgroundColorToken = keyof typeof tokens.tokens.background;
|
|
185
|
+
type BorderColorToken = keyof typeof tokens.tokens.border;
|
|
186
|
+
type IconColorToken = keyof typeof tokens.tokens.icon;
|
|
187
|
+
type InteractiveColorToken = keyof typeof tokens.tokens.interactive;
|
|
188
|
+
type FieldColorToken = keyof typeof tokens.tokens.field;
|
|
189
|
+
type FocusColorToken = keyof typeof tokens.tokens.focus;
|
|
190
|
+
type HoverColorToken = keyof typeof tokens.tokens.hover;
|
|
191
|
+
type ActiveColorToken = keyof typeof tokens.tokens.active;
|
|
192
|
+
type SelectedColorToken = keyof typeof tokens.tokens.selected;
|
|
193
|
+
type DisabledColorToken = keyof typeof tokens.tokens.disabled;
|
|
194
|
+
type SupportColorToken = keyof typeof tokens.tokens.support;
|
|
195
|
+
type BlueColorStep = keyof typeof tokens.colors.blue;
|
|
196
|
+
type GrayColorStep = keyof typeof tokens.colors.gray;
|
|
197
|
+
type RedColorStep = keyof typeof tokens.colors.red;
|
|
198
|
+
type YellowColorStep = keyof typeof tokens.colors.yellow;
|
|
199
|
+
type GreenColorStep = keyof typeof tokens.colors.green;
|
|
200
|
+
type PurpleColorStep = keyof typeof tokens.colors.purple;
|
|
201
|
+
type BlueGreenColorStep = keyof typeof tokens.colors.blueGreen;
|
|
202
|
+
type BaseColorToken = `blue-${BlueColorStep}` | `gray-${GrayColorStep}` | `red-${RedColorStep}` | `yellow-${YellowColorStep}` | `green-${GreenColorStep}` | `purple-${PurpleColorStep}` | `blueGreen-${BlueGreenColorStep}` | 'black' | 'white';
|
|
203
|
+
declare const _tailwindColors: {
|
|
204
|
+
readonly slate: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
205
|
+
readonly gray: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
206
|
+
readonly zinc: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
207
|
+
readonly neutral: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
208
|
+
readonly stone: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
209
|
+
readonly red: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
210
|
+
readonly orange: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
211
|
+
readonly amber: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
212
|
+
readonly yellow: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
213
|
+
readonly lime: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
214
|
+
readonly green: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
215
|
+
readonly emerald: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
216
|
+
readonly teal: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
217
|
+
readonly cyan: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
218
|
+
readonly sky: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
219
|
+
readonly blue: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
220
|
+
readonly indigo: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
221
|
+
readonly violet: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
222
|
+
readonly purple: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
223
|
+
readonly fuchsia: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
224
|
+
readonly pink: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
225
|
+
readonly rose: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
226
|
+
};
|
|
227
|
+
type TailwindColorName = keyof typeof _tailwindColors;
|
|
228
|
+
type TailwindColorShade = (typeof _tailwindColors)[TailwindColorName][number];
|
|
229
|
+
type TailwindColorToken = `${TailwindColorName}-${TailwindColorShade}` | 'transparent' | 'current' | 'inherit';
|
|
230
|
+
type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundColorToken | BorderColorToken | IconColorToken | InteractiveColorToken | FieldColorToken | FocusColorToken | HoverColorToken | ActiveColorToken | SelectedColorToken | DisabledColorToken | SupportColorToken | BaseColorToken | TailwindColorToken;
|
|
231
|
+
|
|
132
232
|
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
133
233
|
type Color = keyof typeof iconColors;
|
|
134
|
-
type Props$
|
|
234
|
+
type Props$s = {
|
|
135
235
|
name: IconName;
|
|
136
236
|
size?: Size$1;
|
|
137
237
|
color?: Color;
|
|
238
|
+
accentColor?: ColorToken;
|
|
138
239
|
isDisabled?: boolean;
|
|
139
240
|
className?: string;
|
|
140
241
|
};
|
|
141
|
-
declare const Icon: ({ size, isDisabled, ...props }: Props$
|
|
242
|
+
declare const Icon: ({ size, isDisabled, ...props }: Props$s) => react.JSX.Element;
|
|
142
243
|
|
|
143
244
|
type Size = 'small' | 'medium' | 'large';
|
|
144
245
|
type Variant = 'outline' | 'text';
|
|
145
|
-
type Props$
|
|
246
|
+
type Props$r = {
|
|
146
247
|
/** 表示するアイコン名 */
|
|
147
248
|
icon: IconName;
|
|
148
249
|
/** ボタンのサイズ */
|
|
@@ -161,30 +262,29 @@ type Props$n = {
|
|
|
161
262
|
target?: HTMLAnchorElement['target'];
|
|
162
263
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
|
|
163
264
|
isAnchor?: false;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, ...props }: Props$n): react.JSX.Element;
|
|
265
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
|
|
266
|
+
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, ...props }: Props$r): react.JSX.Element;
|
|
167
267
|
|
|
168
|
-
type Props$
|
|
268
|
+
type Props$q = {
|
|
169
269
|
size?: 'small' | 'medium' | 'large';
|
|
170
270
|
position?: 'fixed' | 'absolute' | 'static';
|
|
171
271
|
height?: string;
|
|
172
272
|
};
|
|
173
|
-
declare function Loading({ size, position, height }: Props$
|
|
273
|
+
declare function Loading({ size, position, height }: Props$q): react.JSX.Element;
|
|
174
274
|
|
|
175
275
|
declare function ModalBody({ children }: PropsWithChildren): react.JSX.Element;
|
|
176
276
|
|
|
177
|
-
type Props$
|
|
277
|
+
type Props$p = {
|
|
178
278
|
isNoBorder?: boolean;
|
|
179
279
|
};
|
|
180
|
-
declare function ModalFooter({ children, isNoBorder }: PropsWithChildren<Props$
|
|
280
|
+
declare function ModalFooter({ children, isNoBorder }: PropsWithChildren<Props$p>): react__default.JSX.Element;
|
|
181
281
|
|
|
182
|
-
type Props$
|
|
282
|
+
type Props$o = {
|
|
183
283
|
isNoBorder?: boolean;
|
|
184
284
|
};
|
|
185
|
-
declare function ModalHeader({ children, isNoBorder }: PropsWithChildren<Props$
|
|
285
|
+
declare function ModalHeader({ children, isNoBorder }: PropsWithChildren<Props$o>): react.JSX.Element;
|
|
186
286
|
|
|
187
|
-
type Props$
|
|
287
|
+
type Props$n = {
|
|
188
288
|
width?: CSSProperties['width'];
|
|
189
289
|
height?: CSSProperties['height'];
|
|
190
290
|
maxWidth?: CSSProperties['maxWidth'];
|
|
@@ -192,14 +292,14 @@ type Props$j = {
|
|
|
192
292
|
onClose?: () => void;
|
|
193
293
|
portalTargetRef?: MutableRefObject<HTMLElement | null>;
|
|
194
294
|
};
|
|
195
|
-
declare function Modal({ children, width, height, maxWidth, isOpen, onClose, portalTargetRef, }: PropsWithChildren<Props$
|
|
295
|
+
declare function Modal({ children, width, height, maxWidth, isOpen, onClose, portalTargetRef, }: PropsWithChildren<Props$n>): react.JSX.Element | null;
|
|
196
296
|
declare namespace Modal {
|
|
197
297
|
var Body: typeof ModalBody;
|
|
198
298
|
var Header: typeof ModalHeader;
|
|
199
299
|
var Footer: typeof ModalFooter;
|
|
200
300
|
}
|
|
201
301
|
|
|
202
|
-
type Props$
|
|
302
|
+
type Props$m = {
|
|
203
303
|
state?: 'success' | 'warning' | 'information' | 'attention' | 'default';
|
|
204
304
|
size?: 'small' | 'medium';
|
|
205
305
|
children?: ReactNode;
|
|
@@ -209,9 +309,9 @@ type Props$i = {
|
|
|
209
309
|
showClose: true;
|
|
210
310
|
onClickClose: () => void;
|
|
211
311
|
});
|
|
212
|
-
declare function NotificationInline({ state, size, ...props }: Props$
|
|
312
|
+
declare function NotificationInline({ state, size, ...props }: Props$m): react.JSX.Element;
|
|
213
313
|
|
|
214
|
-
type Props$
|
|
314
|
+
type Props$l = {
|
|
215
315
|
/** 現在のページ番号 */
|
|
216
316
|
currentPage: number;
|
|
217
317
|
/** トータルのページ数 */
|
|
@@ -221,9 +321,9 @@ type Props$h = {
|
|
|
221
321
|
/** ボタンが押されたときのイベントハンドラ */
|
|
222
322
|
onClick: (value: number) => void;
|
|
223
323
|
};
|
|
224
|
-
declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props$
|
|
324
|
+
declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props$l): react.JSX.Element;
|
|
225
325
|
|
|
226
|
-
type Props$
|
|
326
|
+
type Props$k = {
|
|
227
327
|
/** トータル件数 */
|
|
228
328
|
totalSize: number;
|
|
229
329
|
/** ページあたり件数 */
|
|
@@ -243,7 +343,97 @@ type Props$g = {
|
|
|
243
343
|
/** Selectが切り替わった時のイベントハンドラ */
|
|
244
344
|
onChange: (value: number) => void;
|
|
245
345
|
};
|
|
246
|
-
declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$
|
|
346
|
+
declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$k): react.JSX.Element;
|
|
347
|
+
|
|
348
|
+
declare const TextInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
349
|
+
size?: "medium" | "large";
|
|
350
|
+
value: string;
|
|
351
|
+
isError?: boolean;
|
|
352
|
+
onClickClearButton?: () => void;
|
|
353
|
+
} & {
|
|
354
|
+
/** 入力欄の末尾に表示する要素。例: アイコンやテキスト(内部実装用) */
|
|
355
|
+
after?: ReactNode;
|
|
356
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
357
|
+
|
|
358
|
+
type Props$j = Omit<ComponentPropsWithoutRef<typeof TextInput>, 'type' | 'onClickClearButton'>;
|
|
359
|
+
declare const PasswordInput: react.ForwardRefExoticComponent<Props$j & react.RefAttributes<HTMLInputElement>>;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Popoverが閉じられる理由を定義する型
|
|
363
|
+
*/
|
|
364
|
+
type CloseReason = 'outside-click' | 'escape-key-down';
|
|
365
|
+
/**
|
|
366
|
+
* Popoverのクローズイベントの型定義
|
|
367
|
+
*/
|
|
368
|
+
type PopoverCloseEvent = {
|
|
369
|
+
/** 閉じられた理由 */
|
|
370
|
+
reason: CloseReason;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Popoverの配置位置を定義する型
|
|
374
|
+
*/
|
|
375
|
+
type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
376
|
+
/**
|
|
377
|
+
* Popover Context の値の型定義
|
|
378
|
+
*/
|
|
379
|
+
type PopoverContextValue = {
|
|
380
|
+
isOpen: boolean;
|
|
381
|
+
triggerRef: react.RefObject<HTMLElement | null>;
|
|
382
|
+
anchorRef?: react.RefObject<HTMLElement | null>;
|
|
383
|
+
floating: ReturnType<typeof useFloating>;
|
|
384
|
+
contentId: string;
|
|
385
|
+
panelId: string;
|
|
386
|
+
onClose?: (event: PopoverCloseEvent) => void;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
type Props$i = {
|
|
390
|
+
isOpen: boolean;
|
|
391
|
+
placement?: PopoverPlacement;
|
|
392
|
+
offset?: number;
|
|
393
|
+
onClose?: (event: PopoverCloseEvent) => void;
|
|
394
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
395
|
+
};
|
|
396
|
+
declare function Popover({ isOpen, children, placement, offset: offsetValue, onClose, anchorRef, }: PropsWithChildren<Props$i>): react.JSX.Element;
|
|
397
|
+
declare namespace Popover {
|
|
398
|
+
var Trigger: react.ForwardRefExoticComponent<{
|
|
399
|
+
children: React.ReactElement;
|
|
400
|
+
} & react.RefAttributes<HTMLElement>>;
|
|
401
|
+
var Content: react.ForwardRefExoticComponent<{
|
|
402
|
+
children?: React.ReactNode;
|
|
403
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
type PopoverContentProps = {
|
|
407
|
+
children?: react.ReactNode;
|
|
408
|
+
};
|
|
409
|
+
declare const PopoverContent: react.ForwardRefExoticComponent<PopoverContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
410
|
+
|
|
411
|
+
type PopoverTriggerProps = {
|
|
412
|
+
children: react.ReactElement;
|
|
413
|
+
};
|
|
414
|
+
declare const PopoverTrigger: react.ForwardRefExoticComponent<PopoverTriggerProps & react.RefAttributes<HTMLElement>>;
|
|
415
|
+
|
|
416
|
+
declare function PopupBody({ children }: PropsWithChildren): react.JSX.Element;
|
|
417
|
+
|
|
418
|
+
declare function PopupFooter({ children }: PropsWithChildren): react__default.JSX.Element;
|
|
419
|
+
|
|
420
|
+
type Props$h = PropsWithChildren<{
|
|
421
|
+
before?: ReactNode;
|
|
422
|
+
}>;
|
|
423
|
+
declare function PopupHeader({ children, before }: Props$h): react.JSX.Element;
|
|
424
|
+
|
|
425
|
+
type Props$g = {
|
|
426
|
+
isOpen?: boolean;
|
|
427
|
+
width?: CSSProperties['width'];
|
|
428
|
+
height?: CSSProperties['height'];
|
|
429
|
+
onClose?: () => void;
|
|
430
|
+
};
|
|
431
|
+
declare function Popup({ children, isOpen: controlledIsOpen, width, height, onClose }: PropsWithChildren<Props$g>): react.JSX.Element | null;
|
|
432
|
+
declare namespace Popup {
|
|
433
|
+
var Body: typeof PopupBody;
|
|
434
|
+
var Header: typeof PopupHeader;
|
|
435
|
+
var Footer: typeof PopupFooter;
|
|
436
|
+
}
|
|
247
437
|
|
|
248
438
|
type Props$f = {
|
|
249
439
|
name?: string;
|
|
@@ -445,13 +635,6 @@ type Props$3 = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
|
445
635
|
});
|
|
446
636
|
declare const TextArea: react.ForwardRefExoticComponent<Props$3 & react.RefAttributes<HTMLTextAreaElement>>;
|
|
447
637
|
|
|
448
|
-
declare const TextInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
449
|
-
size?: "medium" | "large";
|
|
450
|
-
value: string;
|
|
451
|
-
isError?: boolean;
|
|
452
|
-
onClickClearButton?: () => void;
|
|
453
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
454
|
-
|
|
455
638
|
type ToastState = 'success' | 'error' | 'warning' | 'information';
|
|
456
639
|
|
|
457
640
|
type Props$2 = {
|
|
@@ -501,4 +684,4 @@ type Props = {
|
|
|
501
684
|
};
|
|
502
685
|
declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: PropsWithChildren<Props>): react.JSX.Element;
|
|
503
686
|
|
|
504
|
-
export { Avatar, Breadcrumb, Button, Checkbox, type ColorVariant, Dropdown, type DropdownHorizontalAlign, type DropdownItemType, type DropdownVerticalPosition, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Pagination, PaginationSelect, Radio, Search, SegmentedControl, Select, type SelectOption, SelectSort, SortButton, type SortOrder, Tab, TabItem, Table, TableCell, TableRow, Tag, type TagColor, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, type UseRovingFocusProps, type UseRovingFocusReturn, useOutsideClick, useRovingFocus, useToast };
|
|
687
|
+
export { Avatar, Breadcrumb, Button, Checkbox, type ColorVariant, Dropdown, type DropdownHorizontalAlign, type DropdownItemType, type DropdownVerticalPosition, EvaluationStar, FileInput, type FileInputRef, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Pagination, PaginationSelect, PasswordInput, Popover, PopoverContent, type PopoverContextValue, type PopoverPlacement, PopoverTrigger, Popup, Radio, Search, SegmentedControl, Select, type SelectOption, SelectSort, SortButton, type SortOrder, Tab, TabItem, Table, TableCell, TableRow, Tag, type TagColor, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, type UseRovingFocusProps, type UseRovingFocusReturn, useOutsideClick, useRovingFocus, useToast };
|