@zenkigen-inc/component-ui 1.15.1 → 1.15.2
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/dist/index.d.mts +434 -0
- package/dist/index.d.ts +434 -27
- package/dist/index.js +1602 -1701
- package/dist/index.mjs +1915 -0
- package/package.json +18 -8
- package/tsup.config.ts +13 -0
- package/vitest.config.ts +11 -0
- package/vitest.setup.ts +1 -0
- package/dist/avatar/avatar.d.ts +0 -10
- package/dist/avatar/index.d.ts +0 -1
- package/dist/breadcrumb/breadcrumb-item.d.ts +0 -2
- package/dist/breadcrumb/breadcrumb.d.ts +0 -5
- package/dist/breadcrumb/index.d.ts +0 -1
- package/dist/button/button.d.ts +0 -22
- package/dist/button/index.d.ts +0 -1
- package/dist/checkbox/checkbox.d.ts +0 -14
- package/dist/checkbox/checked-icon.d.ts +0 -1
- package/dist/checkbox/index.d.ts +0 -1
- package/dist/checkbox/minus-icon.d.ts +0 -1
- package/dist/dropdown/dropdown-context.d.ts +0 -14
- package/dist/dropdown/dropdown-item.d.ts +0 -7
- package/dist/dropdown/dropdown-menu.d.ts +0 -10
- package/dist/dropdown/dropdown.d.ts +0 -26
- package/dist/dropdown/index.d.ts +0 -2
- package/dist/dropdown/type.d.ts +0 -9
- package/dist/evaluation-star/evaluation-star.d.ts +0 -8
- package/dist/evaluation-star/index.d.ts +0 -1
- package/dist/heading/heading.d.ts +0 -10
- package/dist/heading/index.d.ts +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-outside-click.d.ts +0 -2
- package/dist/icon/icon.d.ts +0 -13
- package/dist/icon/index.d.ts +0 -1
- package/dist/icon-button/icon-button.d.ts +0 -19
- package/dist/icon-button/index.d.ts +0 -1
- package/dist/index.esm.js +0 -2147
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/loading/index.d.ts +0 -1
- package/dist/loading/loading.d.ts +0 -7
- package/dist/modal/body-scroll-lock.d.ts +0 -27
- package/dist/modal/index.d.ts +0 -1
- package/dist/modal/modal-body.d.ts +0 -2
- package/dist/modal/modal-context.d.ts +0 -5
- package/dist/modal/modal-footer.d.ts +0 -7
- package/dist/modal/modal-header.d.ts +0 -6
- package/dist/modal/modal.d.ts +0 -18
- package/dist/notification-inline/index.d.ts +0 -1
- package/dist/notification-inline/notification-inline.d.ts +0 -13
- package/dist/pagination/index.d.ts +0 -1
- package/dist/pagination/pagination-button.d.ts +0 -6
- package/dist/pagination/pagination-context.d.ts +0 -6
- package/dist/pagination/pagination.d.ts +0 -12
- package/dist/pagination-select/index.d.ts +0 -1
- package/dist/pagination-select/pagination-select.d.ts +0 -22
- package/dist/radio/index.d.ts +0 -1
- package/dist/radio/radio.d.ts +0 -12
- package/dist/search/index.d.ts +0 -1
- package/dist/search/search.d.ts +0 -12
- package/dist/select/index.d.ts +0 -2
- package/dist/select/select-context.d.ts +0 -11
- package/dist/select/select-item.d.ts +0 -6
- package/dist/select/select-list.d.ts +0 -6
- package/dist/select/select.d.ts +0 -22
- package/dist/select/type.d.ts +0 -7
- package/dist/select-sort/index.d.ts +0 -2
- package/dist/select-sort/select-item.d.ts +0 -7
- package/dist/select-sort/select-list.d.ts +0 -10
- package/dist/select-sort/select-sort.d.ts +0 -15
- package/dist/select-sort/type.d.ts +0 -1
- package/dist/tab/index.d.ts +0 -2
- package/dist/tab/tab-item.d.ts +0 -10
- package/dist/tab/tab.d.ts +0 -15
- package/dist/table/index.d.ts +0 -3
- package/dist/table/table-cell.d.ts +0 -8
- package/dist/table/table-row.d.ts +0 -7
- package/dist/table/table.d.ts +0 -16
- package/dist/tag/delete-icon.d.ts +0 -8
- package/dist/tag/index.d.ts +0 -2
- package/dist/tag/tag.d.ts +0 -17
- package/dist/tag/type.d.ts +0 -3
- package/dist/text-area/index.d.ts +0 -1
- package/dist/text-area/text-area.d.ts +0 -8
- package/dist/text-input/index.d.ts +0 -1
- package/dist/text-input/text-input.d.ts +0 -7
- package/dist/toast/index.d.ts +0 -2
- package/dist/toast/toast-provider.d.ts +0 -13
- package/dist/toast/toast.d.ts +0 -12
- package/dist/toast/type.d.ts +0 -1
- package/dist/toggle/index.d.ts +0 -1
- package/dist/toggle/toggle.d.ts +0 -12
- package/dist/tooltip/index.d.ts +0 -1
- package/dist/tooltip/tail-icon.d.ts +0 -8
- package/dist/tooltip/tooltip-content.d.ts +0 -11
- package/dist/tooltip/tooltip.d.ts +0 -13
- package/dist/tooltip/tooltip.hook.d.ts +0 -11
- package/dist/tooltip/type.d.ts +0 -13
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, ReactNode, ChangeEvent, MouseEvent, MutableRefObject, ReactElement, RefObject, FormEvent, TextareaHTMLAttributes, InputHTMLAttributes } from 'react';
|
|
3
|
+
import { IconName } from '@zenkigen-inc/component-icons';
|
|
4
|
+
import { iconColors, tagLightColors } from '@zenkigen-inc/component-theme';
|
|
5
|
+
|
|
6
|
+
type Props$v = {
|
|
7
|
+
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
8
|
+
userId?: number;
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function Avatar({ size, ...props }: Props$v): react.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare function Breadcrumb({ children }: PropsWithChildren): react.JSX.Element;
|
|
16
|
+
declare namespace Breadcrumb {
|
|
17
|
+
var Item: ({ children }: PropsWithChildren) => react.JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type Size$2 = 'small' | 'medium' | 'large';
|
|
21
|
+
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
22
|
+
type JustifyContent = 'start' | 'center';
|
|
23
|
+
type ElementAs = ElementType;
|
|
24
|
+
type AsProp<T extends ElementAs> = {
|
|
25
|
+
elementAs?: T;
|
|
26
|
+
};
|
|
27
|
+
type PolymorphicPropsWithoutRef<T extends ElementAs, P extends object> = PropsWithChildren<P> & ComponentPropsWithoutRef<T> & AsProp<T>;
|
|
28
|
+
type Props$u<T extends ElementAs> = PolymorphicPropsWithoutRef<T, {
|
|
29
|
+
size?: Size$2;
|
|
30
|
+
width?: CSSProperties['width'];
|
|
31
|
+
isSelected?: boolean;
|
|
32
|
+
isDisabled?: boolean;
|
|
33
|
+
variant?: Variant$1;
|
|
34
|
+
before?: ReactNode;
|
|
35
|
+
after?: ReactNode;
|
|
36
|
+
borderRadius?: CSSProperties['borderRadius'];
|
|
37
|
+
justifyContent?: JustifyContent;
|
|
38
|
+
}>;
|
|
39
|
+
declare const Button: <T extends ElementAs = "button">({ size, variant, isDisabled, isSelected, width, borderRadius, justifyContent, before, after, elementAs, children, ...props }: Props$u<T>) => react.JSX.Element;
|
|
40
|
+
|
|
41
|
+
type Props$t = {
|
|
42
|
+
name?: string;
|
|
43
|
+
value?: string;
|
|
44
|
+
id?: string;
|
|
45
|
+
isChecked?: boolean;
|
|
46
|
+
color?: 'default' | 'gray' | 'error';
|
|
47
|
+
isIndeterminate?: boolean;
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
label?: string;
|
|
50
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
51
|
+
};
|
|
52
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$t): react.JSX.Element;
|
|
53
|
+
|
|
54
|
+
type Props$s = {
|
|
55
|
+
color?: 'gray' | 'red';
|
|
56
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
57
|
+
};
|
|
58
|
+
declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props$s>): react.JSX.Element;
|
|
59
|
+
|
|
60
|
+
type DropdownItemType = {
|
|
61
|
+
id: string;
|
|
62
|
+
content: ReactNode;
|
|
63
|
+
color?: 'gray' | 'red';
|
|
64
|
+
onClick?: () => void;
|
|
65
|
+
};
|
|
66
|
+
type DropdownVerticalPosition = 'top' | 'bottom';
|
|
67
|
+
type DropdownHorizontalAlign = 'left' | 'center' | 'right';
|
|
68
|
+
|
|
69
|
+
type Props$r = {
|
|
70
|
+
maxHeight?: CSSProperties['height'];
|
|
71
|
+
isNoPadding?: boolean;
|
|
72
|
+
verticalPosition?: DropdownVerticalPosition;
|
|
73
|
+
horizontalAlign?: DropdownHorizontalAlign;
|
|
74
|
+
};
|
|
75
|
+
declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props$r>): false | react.JSX.Element;
|
|
76
|
+
|
|
77
|
+
type Props$q = {
|
|
78
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
79
|
+
variant?: 'text' | 'outline';
|
|
80
|
+
title?: string;
|
|
81
|
+
isDisabled?: boolean;
|
|
82
|
+
isArrowHidden?: boolean;
|
|
83
|
+
portalTargetRef?: MutableRefObject<HTMLElement | null>;
|
|
84
|
+
} & ({
|
|
85
|
+
target: ReactElement;
|
|
86
|
+
label?: never;
|
|
87
|
+
icon?: never;
|
|
88
|
+
} | {
|
|
89
|
+
target?: undefined;
|
|
90
|
+
label: string;
|
|
91
|
+
icon?: IconName;
|
|
92
|
+
});
|
|
93
|
+
declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props$q>): react.JSX.Element;
|
|
94
|
+
declare namespace Dropdown {
|
|
95
|
+
var Menu: typeof DropdownMenu;
|
|
96
|
+
var Item: typeof DropdownItem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
type Props$p = {
|
|
100
|
+
value: number;
|
|
101
|
+
isEditable?: boolean;
|
|
102
|
+
onChangeRating?: (newRating: number) => void | null;
|
|
103
|
+
size?: 'medium' | 'large';
|
|
104
|
+
};
|
|
105
|
+
declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props$p): react.JSX.Element;
|
|
106
|
+
|
|
107
|
+
type Level = 1 | 2 | 3 | 4 | 5;
|
|
108
|
+
type Props$o = {
|
|
109
|
+
level: Level;
|
|
110
|
+
before?: ReactNode;
|
|
111
|
+
after?: ReactNode;
|
|
112
|
+
children?: ReactNode;
|
|
113
|
+
};
|
|
114
|
+
declare function Heading(props: Props$o): react.JSX.Element;
|
|
115
|
+
|
|
116
|
+
declare const useOutsideClick: <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: Event) => void, enabled?: boolean) => void;
|
|
117
|
+
|
|
118
|
+
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
119
|
+
type Color = keyof typeof iconColors;
|
|
120
|
+
type Props$n = {
|
|
121
|
+
name: IconName;
|
|
122
|
+
size?: Size$1;
|
|
123
|
+
color?: Color;
|
|
124
|
+
isDisabled?: boolean;
|
|
125
|
+
className?: string;
|
|
126
|
+
};
|
|
127
|
+
declare const Icon: ({ size, isDisabled, ...props }: Props$n) => react.JSX.Element;
|
|
128
|
+
|
|
129
|
+
type Size = 'small' | 'medium' | 'large';
|
|
130
|
+
type Variant = 'outline' | 'text';
|
|
131
|
+
type Props$m = {
|
|
132
|
+
icon: IconName;
|
|
133
|
+
size?: Size;
|
|
134
|
+
isDisabled?: boolean;
|
|
135
|
+
isNoPadding?: boolean;
|
|
136
|
+
variant?: Variant;
|
|
137
|
+
} & ({
|
|
138
|
+
isAnchor: true;
|
|
139
|
+
href: string;
|
|
140
|
+
target?: HTMLAnchorElement['target'];
|
|
141
|
+
} | {
|
|
142
|
+
isAnchor?: false;
|
|
143
|
+
onClick?: () => void;
|
|
144
|
+
});
|
|
145
|
+
declare function IconButton({ size, variant, isNoPadding, isDisabled, ...props }: Props$m): react.JSX.Element;
|
|
146
|
+
|
|
147
|
+
type Props$l = {
|
|
148
|
+
size?: 'small' | 'medium' | 'large';
|
|
149
|
+
position?: 'fixed' | 'absolute' | 'static';
|
|
150
|
+
height?: string;
|
|
151
|
+
};
|
|
152
|
+
declare function Loading({ size, position, height }: Props$l): react.JSX.Element;
|
|
153
|
+
|
|
154
|
+
declare function ModalBody({ children }: PropsWithChildren): react.JSX.Element;
|
|
155
|
+
|
|
156
|
+
type Props$k = {
|
|
157
|
+
isNoBorder?: boolean;
|
|
158
|
+
};
|
|
159
|
+
declare function ModalFooter({ children, isNoBorder }: PropsWithChildren<Props$k>): react__default.JSX.Element;
|
|
160
|
+
|
|
161
|
+
type Props$j = {
|
|
162
|
+
isNoBorder?: boolean;
|
|
163
|
+
};
|
|
164
|
+
declare function ModalHeader({ children, isNoBorder }: PropsWithChildren<Props$j>): react.JSX.Element;
|
|
165
|
+
|
|
166
|
+
type Props$i = {
|
|
167
|
+
width?: CSSProperties['width'];
|
|
168
|
+
height?: CSSProperties['height'];
|
|
169
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
170
|
+
isOpen: boolean;
|
|
171
|
+
onClose?: () => void;
|
|
172
|
+
portalTargetRef?: MutableRefObject<HTMLElement | null>;
|
|
173
|
+
};
|
|
174
|
+
declare function Modal({ children, width, height, maxWidth, isOpen, onClose, portalTargetRef, }: PropsWithChildren<Props$i>): react.JSX.Element | null;
|
|
175
|
+
declare namespace Modal {
|
|
176
|
+
var Body: typeof ModalBody;
|
|
177
|
+
var Header: typeof ModalHeader;
|
|
178
|
+
var Footer: typeof ModalFooter;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type Props$h = {
|
|
182
|
+
state?: 'success' | 'warning' | 'information' | 'attention' | 'default';
|
|
183
|
+
size?: 'small' | 'medium';
|
|
184
|
+
children?: ReactNode;
|
|
185
|
+
} & ({
|
|
186
|
+
showClose?: false;
|
|
187
|
+
} | {
|
|
188
|
+
showClose: true;
|
|
189
|
+
onClickClose: () => void;
|
|
190
|
+
});
|
|
191
|
+
declare function NotificationInline({ state, size, ...props }: Props$h): react.JSX.Element;
|
|
192
|
+
|
|
193
|
+
type Props$g = {
|
|
194
|
+
/** 現在のページ番号 */
|
|
195
|
+
currentPage: number;
|
|
196
|
+
/** トータルのページ数 */
|
|
197
|
+
totalPage: number;
|
|
198
|
+
/** 現在のページ番号を中心としたときの、左右のページボタン数 */
|
|
199
|
+
sideNumPagesToShow?: number;
|
|
200
|
+
/** ボタンが押されたときのイベントハンドラ */
|
|
201
|
+
onClick: (value: number) => void;
|
|
202
|
+
};
|
|
203
|
+
declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props$g): react.JSX.Element;
|
|
204
|
+
|
|
205
|
+
type Props$f = {
|
|
206
|
+
/** トータル件数 */
|
|
207
|
+
totalSize: number;
|
|
208
|
+
/** ページあたり件数 */
|
|
209
|
+
sizePerPage: number;
|
|
210
|
+
/** 現在のページ番号 */
|
|
211
|
+
currentPage: number;
|
|
212
|
+
/** 件数表示単位ラベル */
|
|
213
|
+
countLabel?: string;
|
|
214
|
+
/** ページ表示単位ラベル */
|
|
215
|
+
pageLabel?: string;
|
|
216
|
+
/** Selectのリストの最大の高さ */
|
|
217
|
+
optionListMaxHeight?: number;
|
|
218
|
+
/** 戻るボタンクリック時のイベントハンドラ */
|
|
219
|
+
onClickPrevButton: () => void;
|
|
220
|
+
/** 進むボタンクリック時のイベントハンドラ */
|
|
221
|
+
onClickNextButton: () => void;
|
|
222
|
+
/** Selectが切り替わった時のイベントハンドラ */
|
|
223
|
+
onChange: (value: number) => void;
|
|
224
|
+
};
|
|
225
|
+
declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$f): react.JSX.Element;
|
|
226
|
+
|
|
227
|
+
type Props$e = {
|
|
228
|
+
name?: string;
|
|
229
|
+
value?: string;
|
|
230
|
+
id?: string;
|
|
231
|
+
label?: string;
|
|
232
|
+
isChecked?: boolean;
|
|
233
|
+
isDisabled?: boolean;
|
|
234
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
235
|
+
};
|
|
236
|
+
declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$e): react.JSX.Element;
|
|
237
|
+
|
|
238
|
+
type Props$d = {
|
|
239
|
+
size?: 'medium' | 'large';
|
|
240
|
+
placeholder?: string;
|
|
241
|
+
width?: string;
|
|
242
|
+
value: string;
|
|
243
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
244
|
+
onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
|
|
245
|
+
onClickClearButton?: () => void;
|
|
246
|
+
};
|
|
247
|
+
declare const Search: react.ForwardRefExoticComponent<Props$d & react.RefAttributes<HTMLDivElement>>;
|
|
248
|
+
|
|
249
|
+
type SelectOption = {
|
|
250
|
+
id: string;
|
|
251
|
+
value: string;
|
|
252
|
+
label: string;
|
|
253
|
+
icon?: IconName;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
type Props$c = {
|
|
257
|
+
option: SelectOption;
|
|
258
|
+
};
|
|
259
|
+
declare function SelectItem({ option }: Props$c): react.JSX.Element;
|
|
260
|
+
|
|
261
|
+
type Props$b = {
|
|
262
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
263
|
+
variant?: 'outline' | 'text';
|
|
264
|
+
width?: CSSProperties['width'];
|
|
265
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
266
|
+
placeholder?: string;
|
|
267
|
+
placeholderIcon?: IconName;
|
|
268
|
+
selectedOption?: SelectOption | null;
|
|
269
|
+
optionListMaxHeight?: CSSProperties['height'];
|
|
270
|
+
isDisabled?: boolean;
|
|
271
|
+
isOptionSelected?: boolean;
|
|
272
|
+
onChange?: (option: SelectOption | null) => void;
|
|
273
|
+
};
|
|
274
|
+
declare function Select({ children, size, variant, width, maxWidth, placeholder, placeholderIcon, selectedOption, isDisabled, isOptionSelected, onChange, optionListMaxHeight, }: PropsWithChildren<Props$b>): react.JSX.Element;
|
|
275
|
+
declare namespace Select {
|
|
276
|
+
var Option: typeof SelectItem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
type SortOrder = 'ascend' | 'descend' | null;
|
|
280
|
+
|
|
281
|
+
type Props$a = {
|
|
282
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
283
|
+
variant?: 'outline' | 'text';
|
|
284
|
+
width?: CSSProperties['width'];
|
|
285
|
+
label: string;
|
|
286
|
+
sortOrder: SortOrder;
|
|
287
|
+
isDisabled?: boolean;
|
|
288
|
+
isSortKey?: boolean;
|
|
289
|
+
onChange?: (value: SortOrder) => void;
|
|
290
|
+
onClickDeselect?: () => void;
|
|
291
|
+
};
|
|
292
|
+
declare function SelectSort({ size, variant, width, label, sortOrder, isDisabled, isSortKey, onChange, onClickDeselect, }: Props$a): react.JSX.Element;
|
|
293
|
+
|
|
294
|
+
type Props$9 = {
|
|
295
|
+
children?: ReactNode;
|
|
296
|
+
};
|
|
297
|
+
declare function Tab({ children }: Props$9): react.JSX.Element;
|
|
298
|
+
declare namespace Tab {
|
|
299
|
+
var Item: ({ isSelected, ...props }: {
|
|
300
|
+
id: string;
|
|
301
|
+
isSelected?: boolean;
|
|
302
|
+
isDisabled?: boolean;
|
|
303
|
+
children?: ReactNode;
|
|
304
|
+
onClick: (id: string) => void;
|
|
305
|
+
}) => react.JSX.Element;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
type Props$8 = {
|
|
309
|
+
id: string;
|
|
310
|
+
isSelected?: boolean;
|
|
311
|
+
isDisabled?: boolean;
|
|
312
|
+
children?: ReactNode;
|
|
313
|
+
onClick: (id: string) => void;
|
|
314
|
+
};
|
|
315
|
+
declare const TabItem: ({ isSelected, ...props }: Props$8) => react.JSX.Element;
|
|
316
|
+
|
|
317
|
+
type Props$7 = {
|
|
318
|
+
children?: ReactNode;
|
|
319
|
+
className?: string;
|
|
320
|
+
isHeader?: boolean;
|
|
321
|
+
};
|
|
322
|
+
declare function TableCell({ children, className, isHeader }: Props$7): react.JSX.Element;
|
|
323
|
+
|
|
324
|
+
type Props$6 = {
|
|
325
|
+
children?: ReactNode;
|
|
326
|
+
isHoverBackgroundVisible?: boolean;
|
|
327
|
+
};
|
|
328
|
+
declare function TableRow({ children, isHoverBackgroundVisible }: Props$6): react.JSX.Element;
|
|
329
|
+
|
|
330
|
+
type Props$5 = {
|
|
331
|
+
width?: CSSProperties['width'];
|
|
332
|
+
templateRows?: CSSProperties['gridTemplateRows'];
|
|
333
|
+
templateColumns?: CSSProperties['gridTemplateColumns'];
|
|
334
|
+
autoColumns?: CSSProperties['gridAutoColumns'];
|
|
335
|
+
autoRows?: CSSProperties['gridAutoRows'];
|
|
336
|
+
};
|
|
337
|
+
declare function Table({ width, templateRows, templateColumns, autoColumns, autoRows, children, }: PropsWithChildren<Props$5>): react.JSX.Element;
|
|
338
|
+
declare namespace Table {
|
|
339
|
+
var Row: typeof TableRow;
|
|
340
|
+
var Cell: typeof TableCell;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
type TagColor = keyof typeof tagLightColors;
|
|
344
|
+
type ColorVariant = 'normal' | 'light';
|
|
345
|
+
|
|
346
|
+
type Props$4 = {
|
|
347
|
+
id: string;
|
|
348
|
+
children: string;
|
|
349
|
+
color: TagColor;
|
|
350
|
+
variant?: ColorVariant;
|
|
351
|
+
} & ({
|
|
352
|
+
isEditable: true;
|
|
353
|
+
onDelete: (id: string) => void;
|
|
354
|
+
size?: 'medium';
|
|
355
|
+
} | {
|
|
356
|
+
isEditable?: undefined;
|
|
357
|
+
onDelete?: never;
|
|
358
|
+
size?: 'x-small' | 'small' | 'medium';
|
|
359
|
+
});
|
|
360
|
+
declare function Tag({ id, children, color, variant, size, isEditable, onDelete }: Props$4): react.JSX.Element;
|
|
361
|
+
|
|
362
|
+
type Props$3 = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
363
|
+
size?: 'medium' | 'large';
|
|
364
|
+
value: string;
|
|
365
|
+
height?: CSSProperties['height'];
|
|
366
|
+
isError?: boolean;
|
|
367
|
+
} & ({
|
|
368
|
+
autoHeight: true;
|
|
369
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
370
|
+
isResizable?: never;
|
|
371
|
+
} | {
|
|
372
|
+
autoHeight?: false;
|
|
373
|
+
maxHeight?: never;
|
|
374
|
+
isResizable?: boolean;
|
|
375
|
+
});
|
|
376
|
+
declare const TextArea: react.ForwardRefExoticComponent<Props$3 & react.RefAttributes<HTMLTextAreaElement>>;
|
|
377
|
+
|
|
378
|
+
declare const TextInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
379
|
+
size?: "medium" | "large";
|
|
380
|
+
value: string;
|
|
381
|
+
isError?: boolean;
|
|
382
|
+
onClickClearButton?: () => void;
|
|
383
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
384
|
+
|
|
385
|
+
type ToastState = 'success' | 'error' | 'warning' | 'information';
|
|
386
|
+
|
|
387
|
+
type Props$2 = {
|
|
388
|
+
state?: ToastState;
|
|
389
|
+
width?: CSSProperties['width'];
|
|
390
|
+
isAutoClose?: boolean;
|
|
391
|
+
isAnimation?: boolean;
|
|
392
|
+
children?: ReactNode;
|
|
393
|
+
onClickClose: () => void;
|
|
394
|
+
};
|
|
395
|
+
declare function Toast({ state, width, isAutoClose, isAnimation, children, onClickClose, }: Props$2): react.JSX.Element;
|
|
396
|
+
|
|
397
|
+
type AddToastArgs = {
|
|
398
|
+
message: string;
|
|
399
|
+
state: ToastState;
|
|
400
|
+
};
|
|
401
|
+
type ToastProviderProps = {
|
|
402
|
+
addToast: (args: AddToastArgs) => void;
|
|
403
|
+
removeToast: (id: number) => void;
|
|
404
|
+
};
|
|
405
|
+
declare const ToastProvider: ({ children }: PropsWithChildren) => react.JSX.Element;
|
|
406
|
+
declare const useToast: () => ToastProviderProps;
|
|
407
|
+
|
|
408
|
+
type Props$1 = {
|
|
409
|
+
id: string;
|
|
410
|
+
size: 'small' | 'medium' | 'large';
|
|
411
|
+
isChecked: boolean;
|
|
412
|
+
onChange: () => void;
|
|
413
|
+
label?: ReactNode;
|
|
414
|
+
labelPosition?: 'left' | 'right';
|
|
415
|
+
isDisabled?: boolean;
|
|
416
|
+
};
|
|
417
|
+
declare function Toggle({ id, size, isChecked, onChange, label, labelPosition, isDisabled, }: Props$1): react.JSX.Element;
|
|
418
|
+
|
|
419
|
+
type TooltipSize = 'small' | 'medium';
|
|
420
|
+
type TooltipVerticalPosition = 'top' | 'bottom';
|
|
421
|
+
type TooltipHorizontalAlign = 'left' | 'center' | 'right';
|
|
422
|
+
|
|
423
|
+
type Props = {
|
|
424
|
+
content: ReactNode;
|
|
425
|
+
size?: TooltipSize;
|
|
426
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
427
|
+
verticalPosition?: TooltipVerticalPosition;
|
|
428
|
+
horizontalAlign?: TooltipHorizontalAlign;
|
|
429
|
+
isDisabledHover?: boolean;
|
|
430
|
+
portalTarget?: HTMLElement;
|
|
431
|
+
};
|
|
432
|
+
declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: PropsWithChildren<Props>): react.JSX.Element;
|
|
433
|
+
|
|
434
|
+
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, Select, type SelectOption, SelectSort, type SortOrder, Tab, TabItem, Table, TableCell, TableRow, Tag, type TagColor, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, useOutsideClick, useToast };
|