@zenkigen-inc/component-ui 1.17.0 → 1.18.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/README.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @zenkigen-inc/component-ui
2
2
 
3
+ ## 目次
4
+
5
+ - [インストール](#インストール)
6
+ - [利用方法](#利用方法)
7
+ - [開発者向け](#開発者向け)
8
+ - [コンポーネントの雛形を生成する](#コンポーネントの雛形を生成する)
9
+ - [実装したコンポーネントを export する](#実装したコンポーネントを-export-する)
10
+ - [ライセンス](#ライセンス)
11
+
3
12
  ## インストール
4
13
 
5
14
  ```bash
package/dist/index.d.mts CHANGED
@@ -1,24 +1,26 @@
1
1
  import * as react from 'react';
2
- import react__default, { PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, ReactNode, ChangeEvent, MouseEvent, MutableRefObject, ReactElement, RefObject, InputHTMLAttributes, FormEvent, ButtonHTMLAttributes, TextareaHTMLAttributes } from 'react';
2
+ import react__default, { PropsWithChildren, ElementType, ComponentPropsWithoutRef, CSSProperties, ReactNode, ChangeEvent, MouseEvent, MutableRefObject, ReactElement, RefObject, HTMLAttributes, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, FormEvent, ButtonHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
+ import * as _zenkigen_inc_component_icons from '@zenkigen-inc/component-icons';
3
4
  import { IconName } from '@zenkigen-inc/component-icons';
4
5
  import { iconColors, tagLightColors } from '@zenkigen-inc/component-theme';
5
6
  import { tokens } from '@zenkigen-inc/component-config';
7
+ import { useFloating } from '@floating-ui/react';
6
8
 
7
- type Props$x = {
9
+ type Props$y = {
8
10
  size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
9
11
  userId?: number;
10
12
  firstName?: string;
11
13
  lastName?: string;
12
14
  isDisabled?: boolean;
13
15
  };
14
- declare function Avatar({ size, ...props }: Props$x): react.JSX.Element;
16
+ declare function Avatar({ size, ...props }: Props$y): react.JSX.Element;
15
17
 
16
18
  declare function Breadcrumb({ children }: PropsWithChildren): react.JSX.Element;
17
19
  declare namespace Breadcrumb {
18
20
  var Item: ({ children }: PropsWithChildren) => react.JSX.Element;
19
21
  }
20
22
 
21
- type Size$2 = 'small' | 'medium' | 'large';
23
+ type Size$3 = 'small' | 'medium' | 'large';
22
24
  type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
23
25
  type JustifyContent = 'start' | 'center';
24
26
  type ElementAs = ElementType;
@@ -26,20 +28,28 @@ type AsProp<T extends ElementAs> = {
26
28
  elementAs?: T;
27
29
  };
28
30
  type PolymorphicPropsWithoutRef<T extends ElementAs, P extends object> = PropsWithChildren<P> & ComponentPropsWithoutRef<T> & AsProp<T>;
29
- type Props$w<T extends ElementAs> = PolymorphicPropsWithoutRef<T, {
30
- size?: Size$2;
31
+ type DeprecatedClassNameProp<T extends ElementAs> = {
32
+ /**
33
+ * @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
34
+ */
35
+ className?: ComponentPropsWithoutRef<T>['className'];
36
+ };
37
+ type BaseProps$1<T extends ElementAs> = PolymorphicPropsWithoutRef<T, {
38
+ size?: Size$3;
31
39
  width?: CSSProperties['width'];
32
40
  isSelected?: boolean;
33
41
  isDisabled?: boolean;
34
- variant?: Variant$1;
35
42
  before?: ReactNode;
36
43
  after?: ReactNode;
37
44
  borderRadius?: CSSProperties['borderRadius'];
38
45
  justifyContent?: JustifyContent;
39
- }>;
40
- declare const Button: <T extends ElementAs = "button">({ size, variant, isDisabled, isSelected, width, borderRadius, justifyContent, before, after, elementAs, children, ...props }: Props$w<T>) => react.JSX.Element;
46
+ }> & DeprecatedClassNameProp<T>;
47
+ type PublicProps<T extends ElementAs> = BaseProps$1<T> & {
48
+ variant?: Variant$1;
49
+ };
50
+ declare const Button: <T extends ElementAs = "button">(props: PublicProps<T>) => react.JSX.Element;
41
51
 
42
- type Props$v = {
52
+ type Props$x = {
43
53
  name?: string;
44
54
  value?: string;
45
55
  id?: string;
@@ -50,13 +60,13 @@ type Props$v = {
50
60
  label?: string;
51
61
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
52
62
  };
53
- declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$v): react.JSX.Element;
63
+ declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$x): react.JSX.Element;
54
64
 
55
- type Props$u = {
65
+ type Props$w = {
56
66
  color?: 'gray' | 'red';
57
67
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
58
68
  };
59
- declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props$u>): react.JSX.Element;
69
+ declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props$w>): react.JSX.Element;
60
70
 
61
71
  type DropdownItemType = {
62
72
  id: string;
@@ -67,15 +77,15 @@ type DropdownItemType = {
67
77
  type DropdownVerticalPosition = 'top' | 'bottom';
68
78
  type DropdownHorizontalAlign = 'left' | 'center' | 'right';
69
79
 
70
- type Props$t = {
80
+ type Props$v = {
71
81
  maxHeight?: CSSProperties['height'];
72
82
  isNoPadding?: boolean;
73
83
  verticalPosition?: DropdownVerticalPosition;
74
84
  horizontalAlign?: DropdownHorizontalAlign;
75
85
  };
76
- declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props$t>): false | react.JSX.Element;
86
+ declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props$v>): false | react.JSX.Element;
77
87
 
78
- type Props$s = {
88
+ type Props$u = {
79
89
  size?: 'x-small' | 'small' | 'medium' | 'large';
80
90
  variant?: 'text' | 'outline';
81
91
  title?: string;
@@ -91,28 +101,73 @@ type Props$s = {
91
101
  label: string;
92
102
  icon?: IconName;
93
103
  });
94
- declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props$s>): react.JSX.Element;
104
+ declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props$u>): react.JSX.Element;
95
105
  declare namespace Dropdown {
96
106
  var Menu: typeof DropdownMenu;
97
107
  var Item: typeof DropdownItem;
98
108
  }
99
109
 
100
- type Props$r = {
110
+ type Props$t = {
101
111
  value: number;
102
112
  isEditable?: boolean;
103
113
  onChangeRating?: (newRating: number) => void | null;
104
114
  size?: 'medium' | 'large';
105
115
  };
106
- declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props$r): react.JSX.Element;
116
+ declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props$t): react.JSX.Element;
117
+
118
+ type Size$2 = 'small' | 'medium' | 'large';
119
+ declare const ERROR_TYPES: {
120
+ readonly SIZE_TOO_LARGE: "SIZE_TOO_LARGE";
121
+ readonly UNSUPPORTED_FORMAT: "UNSUPPORTED_FORMAT";
122
+ };
123
+ type FileInputErrorType = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES];
124
+ type FileInputError = {
125
+ type: FileInputErrorType;
126
+ message: string;
127
+ };
128
+ type BaseFileInputProps = {
129
+ /** input要素のID(外部のlabel要素との連携用) */
130
+ id?: string;
131
+ /** 許可するファイル形式(MIMEタイプ) */
132
+ accept?: string;
133
+ /** 最大ファイルサイズ(バイト単位) */
134
+ maxSize?: number;
135
+ /** 無効化状態 */
136
+ isDisabled?: boolean;
137
+ /** エラー状態 */
138
+ isError?: boolean;
139
+ /** ファイル選択時のコールバック */
140
+ onSelect?: (file: File | null) => void;
141
+ /** エラー時のコールバック */
142
+ onError?: (errors: FileInputError[]) => void;
143
+ /** エラーメッセージリスト */
144
+ errorMessages?: string[];
145
+ };
146
+ type ButtonFileInputProps = BaseFileInputProps & {
147
+ /** コンポーネントのバリエーション */
148
+ variant: 'button';
149
+ /** サイズ */
150
+ size?: Size$2;
151
+ };
152
+ type DropzoneFileInputProps = BaseFileInputProps & {
153
+ /** コンポーネントのバリエーション */
154
+ variant: 'dropzone';
155
+ };
156
+ type FileInputProps = ButtonFileInputProps | DropzoneFileInputProps;
157
+ type FileInputRef = {
158
+ /** ファイル選択状態をリセット */
159
+ reset: () => void;
160
+ };
161
+ declare const FileInput: react.ForwardRefExoticComponent<FileInputProps & react.RefAttributes<FileInputRef>>;
107
162
 
108
163
  type Level = 1 | 2 | 3 | 4 | 5;
109
- type Props$q = {
164
+ type Props$s = {
110
165
  level: Level;
111
166
  before?: ReactNode;
112
167
  after?: ReactNode;
113
168
  children?: ReactNode;
114
169
  };
115
- declare function Heading(props: Props$q): react.JSX.Element;
170
+ declare function Heading(props: Props$s): react.JSX.Element;
116
171
 
117
172
  declare const useOutsideClick: <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: Event) => void, enabled?: boolean) => void;
118
173
 
@@ -183,7 +238,7 @@ type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundC
183
238
 
184
239
  type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
185
240
  type Color = keyof typeof iconColors;
186
- type Props$p = {
241
+ type Props$r = {
187
242
  name: IconName;
188
243
  size?: Size$1;
189
244
  color?: Color;
@@ -191,11 +246,11 @@ type Props$p = {
191
246
  isDisabled?: boolean;
192
247
  className?: string;
193
248
  };
194
- declare const Icon: ({ size, isDisabled, ...props }: Props$p) => react.JSX.Element;
249
+ declare const Icon: ({ size, isDisabled, ...props }: Props$r) => react.JSX.Element;
195
250
 
196
251
  type Size = 'small' | 'medium' | 'large';
197
252
  type Variant = 'outline' | 'text';
198
- type Props$o = {
253
+ type Props$q = {
199
254
  /** 表示するアイコン名 */
200
255
  icon: IconName;
201
256
  /** ボタンのサイズ */
@@ -214,30 +269,29 @@ type Props$o = {
214
269
  target?: HTMLAnchorElement['target'];
215
270
  } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
216
271
  isAnchor?: false;
217
- onClick?: () => void;
218
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled' | 'className'>));
219
- declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, ...props }: Props$o): react.JSX.Element;
272
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
273
+ declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, ...props }: Props$q): react.JSX.Element;
220
274
 
221
- type Props$n = {
275
+ type Props$p = {
222
276
  size?: 'small' | 'medium' | 'large';
223
277
  position?: 'fixed' | 'absolute' | 'static';
224
278
  height?: string;
225
279
  };
226
- declare function Loading({ size, position, height }: Props$n): react.JSX.Element;
280
+ declare function Loading({ size, position, height }: Props$p): react.JSX.Element;
227
281
 
228
282
  declare function ModalBody({ children }: PropsWithChildren): react.JSX.Element;
229
283
 
230
- type Props$m = {
284
+ type Props$o = {
231
285
  isNoBorder?: boolean;
232
286
  };
233
- declare function ModalFooter({ children, isNoBorder }: PropsWithChildren<Props$m>): react__default.JSX.Element;
287
+ declare function ModalFooter({ children, isNoBorder }: PropsWithChildren<Props$o>): react__default.JSX.Element;
234
288
 
235
- type Props$l = {
289
+ type Props$n = {
236
290
  isNoBorder?: boolean;
237
291
  };
238
- declare function ModalHeader({ children, isNoBorder }: PropsWithChildren<Props$l>): react.JSX.Element;
292
+ declare function ModalHeader({ children, isNoBorder }: PropsWithChildren<Props$n>): react.JSX.Element;
239
293
 
240
- type Props$k = {
294
+ type Props$m = {
241
295
  width?: CSSProperties['width'];
242
296
  height?: CSSProperties['height'];
243
297
  maxWidth?: CSSProperties['maxWidth'];
@@ -245,14 +299,14 @@ type Props$k = {
245
299
  onClose?: () => void;
246
300
  portalTargetRef?: MutableRefObject<HTMLElement | null>;
247
301
  };
248
- declare function Modal({ children, width, height, maxWidth, isOpen, onClose, portalTargetRef, }: PropsWithChildren<Props$k>): react.JSX.Element | null;
302
+ declare function Modal({ children, width, height, maxWidth, isOpen, onClose, portalTargetRef, }: PropsWithChildren<Props$m>): react.JSX.Element | null;
249
303
  declare namespace Modal {
250
304
  var Body: typeof ModalBody;
251
305
  var Header: typeof ModalHeader;
252
306
  var Footer: typeof ModalFooter;
253
307
  }
254
308
 
255
- type Props$j = {
309
+ type Props$l = {
256
310
  state?: 'success' | 'warning' | 'information' | 'attention' | 'default';
257
311
  size?: 'small' | 'medium';
258
312
  children?: ReactNode;
@@ -262,9 +316,9 @@ type Props$j = {
262
316
  showClose: true;
263
317
  onClickClose: () => void;
264
318
  });
265
- declare function NotificationInline({ state, size, ...props }: Props$j): react.JSX.Element;
319
+ declare function NotificationInline({ state, size, ...props }: Props$l): react.JSX.Element;
266
320
 
267
- type Props$i = {
321
+ type Props$k = {
268
322
  /** 現在のページ番号 */
269
323
  currentPage: number;
270
324
  /** トータルのページ数 */
@@ -274,9 +328,9 @@ type Props$i = {
274
328
  /** ボタンが押されたときのイベントハンドラ */
275
329
  onClick: (value: number) => void;
276
330
  };
277
- declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props$i): react.JSX.Element;
331
+ declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props$k): react.JSX.Element | null;
278
332
 
279
- type Props$h = {
333
+ type Props$j = {
280
334
  /** トータル件数 */
281
335
  totalSize: number;
282
336
  /** ページあたり件数 */
@@ -296,22 +350,112 @@ type Props$h = {
296
350
  /** Selectが切り替わった時のイベントハンドラ */
297
351
  onChange: (value: number) => void;
298
352
  };
299
- declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$h): react.JSX.Element;
353
+ declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$j): react.JSX.Element;
354
+
355
+ type TextInputErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
356
+ declare const TextInputErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
300
357
 
301
- declare const TextInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
302
- size?: "medium" | "large";
358
+ type TextInputHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
359
+ declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
360
+
361
+ type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> & {
362
+ size?: 'medium' | 'large';
303
363
  value: string;
304
364
  isError?: boolean;
305
365
  onClickClearButton?: () => void;
306
- } & {
307
- /** 入力欄の末尾に表示する要素。例: アイコンやテキスト(内部実装用) */
308
- after?: ReactNode;
309
- } & react.RefAttributes<HTMLInputElement>>;
366
+ };
310
367
 
311
- type Props$g = Omit<ComponentPropsWithoutRef<typeof TextInput>, 'type' | 'onClickClearButton'>;
312
- declare const PasswordInput: react.ForwardRefExoticComponent<Props$g & react.RefAttributes<HTMLInputElement>>;
368
+ type TextInputComponent = ForwardRefExoticComponent<TextInputProps & RefAttributes<HTMLInputElement>> & {
369
+ HelperMessage: typeof TextInputHelperMessage;
370
+ ErrorMessage: typeof TextInputErrorMessage;
371
+ };
372
+ declare const TextInput: TextInputComponent;
373
+
374
+ type Props$i = Omit<ComponentPropsWithoutRef<typeof TextInput>, 'type' | 'onClickClearButton' | 'className'>;
375
+ declare const PasswordInput: ForwardRefExoticComponent<Props$i & RefAttributes<HTMLInputElement>> & {
376
+ HelperMessage: ForwardRefExoticComponent<TextInputHelperMessageProps & RefAttributes<HTMLDivElement>>;
377
+ ErrorMessage: ForwardRefExoticComponent<TextInputErrorMessageProps & RefAttributes<HTMLDivElement>>;
378
+ displayName: string;
379
+ };
380
+
381
+ /**
382
+ * Popoverが閉じられる理由を定義する型
383
+ */
384
+ type CloseReason = 'outside-click' | 'escape-key-down';
385
+ /**
386
+ * Popoverのクローズイベントの型定義
387
+ */
388
+ type PopoverCloseEvent = {
389
+ /** 閉じられた理由 */
390
+ reason: CloseReason;
391
+ };
392
+ /**
393
+ * Popoverの配置位置を定義する型
394
+ */
395
+ type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
396
+ /**
397
+ * Popover Context の値の型定義
398
+ */
399
+ type PopoverContextValue = {
400
+ isOpen: boolean;
401
+ triggerRef: react.RefObject<HTMLElement | null>;
402
+ anchorRef?: react.RefObject<HTMLElement | null>;
403
+ floating: ReturnType<typeof useFloating>;
404
+ contentId: string;
405
+ panelId: string;
406
+ onClose?: (event: PopoverCloseEvent) => void;
407
+ };
408
+
409
+ type Props$h = {
410
+ isOpen: boolean;
411
+ placement?: PopoverPlacement;
412
+ offset?: number;
413
+ onClose?: (event: PopoverCloseEvent) => void;
414
+ anchorRef?: React.RefObject<HTMLElement | null>;
415
+ };
416
+ declare function Popover({ isOpen, children, placement, offset: offsetValue, onClose, anchorRef, }: PropsWithChildren<Props$h>): react.JSX.Element;
417
+ declare namespace Popover {
418
+ var Trigger: react.ForwardRefExoticComponent<{
419
+ children: React.ReactElement;
420
+ } & react.RefAttributes<HTMLElement>>;
421
+ var Content: react.ForwardRefExoticComponent<{
422
+ children?: React.ReactNode;
423
+ } & react.RefAttributes<HTMLDivElement>>;
424
+ }
425
+
426
+ type PopoverContentProps = {
427
+ children?: react.ReactNode;
428
+ };
429
+ declare const PopoverContent: react.ForwardRefExoticComponent<PopoverContentProps & react.RefAttributes<HTMLDivElement>>;
430
+
431
+ type PopoverTriggerProps = {
432
+ children: react.ReactElement;
433
+ };
434
+ declare const PopoverTrigger: react.ForwardRefExoticComponent<PopoverTriggerProps & react.RefAttributes<HTMLElement>>;
435
+
436
+ declare function PopupBody({ children }: PropsWithChildren): react.JSX.Element;
437
+
438
+ declare function PopupFooter({ children }: PropsWithChildren): react__default.JSX.Element;
439
+
440
+ type Props$g = PropsWithChildren<{
441
+ before?: ReactNode;
442
+ }>;
443
+ declare function PopupHeader({ children, before }: Props$g): react.JSX.Element;
313
444
 
314
445
  type Props$f = {
446
+ isOpen?: boolean;
447
+ width?: CSSProperties['width'];
448
+ height?: CSSProperties['height'];
449
+ onClose?: () => void;
450
+ };
451
+ declare function Popup({ children, isOpen: controlledIsOpen, width, height, onClose }: PropsWithChildren<Props$f>): react.JSX.Element | null;
452
+ declare namespace Popup {
453
+ var Body: typeof PopupBody;
454
+ var Header: typeof PopupHeader;
455
+ var Footer: typeof PopupFooter;
456
+ }
457
+
458
+ type Props$e = {
315
459
  name?: string;
316
460
  value?: string;
317
461
  id?: string;
@@ -320,9 +464,9 @@ type Props$f = {
320
464
  isDisabled?: boolean;
321
465
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
322
466
  };
323
- declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$f): react.JSX.Element;
467
+ declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$e): react.JSX.Element;
324
468
 
325
- type Props$e = {
469
+ type Props$d = {
326
470
  size?: 'medium' | 'large';
327
471
  placeholder?: string;
328
472
  width?: string;
@@ -331,7 +475,7 @@ type Props$e = {
331
475
  onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
332
476
  onClickClearButton?: () => void;
333
477
  };
334
- declare const Search: react.ForwardRefExoticComponent<Props$e & react.RefAttributes<HTMLDivElement>>;
478
+ declare const Search: react.ForwardRefExoticComponent<Props$d & react.RefAttributes<HTMLDivElement>>;
335
479
 
336
480
  type BaseProps = Omit<ComponentPropsWithoutRef<'button'>, 'onClick' | 'className'> & {
337
481
  value: string;
@@ -375,12 +519,12 @@ type SelectOption = {
375
519
  icon?: IconName;
376
520
  };
377
521
 
378
- type Props$d = {
522
+ type Props$c = {
379
523
  option: SelectOption;
380
524
  };
381
- declare function SelectItem({ option }: Props$d): react.JSX.Element;
525
+ declare function SelectItem({ option }: Props$c): react.JSX.Element;
382
526
 
383
- type Props$c = {
527
+ type Props$b = {
384
528
  size?: 'x-small' | 'small' | 'medium' | 'large';
385
529
  variant?: 'outline' | 'text';
386
530
  width?: CSSProperties['width'];
@@ -394,14 +538,14 @@ type Props$c = {
394
538
  isOptionSelected?: boolean;
395
539
  onChange?: (option: SelectOption | null) => void;
396
540
  };
397
- declare function Select({ children, size, variant, width, maxWidth, placeholder, placeholderIcon, selectedOption, isDisabled, isError, isOptionSelected, onChange, optionListMaxHeight, }: PropsWithChildren<Props$c>): react.JSX.Element;
541
+ declare function Select({ children, size, variant, width, maxWidth, placeholder, placeholderIcon, selectedOption, isDisabled, isError, isOptionSelected, onChange, optionListMaxHeight, }: PropsWithChildren<Props$b>): react.JSX.Element;
398
542
  declare namespace Select {
399
543
  var Option: typeof SelectItem;
400
544
  }
401
545
 
402
546
  type SortOrder = 'ascend' | 'descend' | null;
403
547
 
404
- type Props$b = {
548
+ type Props$a = {
405
549
  size?: 'x-small' | 'small' | 'medium' | 'large';
406
550
  variant?: 'outline' | 'text';
407
551
  width?: CSSProperties['width'];
@@ -412,9 +556,9 @@ type Props$b = {
412
556
  onChange?: (value: SortOrder) => void;
413
557
  onClickDeselect?: () => void;
414
558
  };
415
- declare function SelectSort({ size, variant, width, label, sortOrder, isDisabled, isSortKey, onChange, onClickDeselect, }: Props$b): react.JSX.Element;
559
+ declare function SelectSort({ size, variant, width, label, sortOrder, isDisabled, isSortKey, onChange, onClickDeselect, }: Props$a): react.JSX.Element;
416
560
 
417
- type Props$a = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'type' | 'disabled' | 'onClick' | 'aria-disabled' | 'aria-label'> & {
561
+ type Props$9 = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'type' | 'disabled' | 'onClick' | 'aria-disabled' | 'aria-label'> & {
418
562
  size?: 'x-small' | 'small' | 'medium' | 'large';
419
563
  width?: CSSProperties['width'];
420
564
  label: string;
@@ -423,54 +567,56 @@ type Props$a = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'type
423
567
  'aria-label': string;
424
568
  onClick?: () => void;
425
569
  };
426
- declare function SortButton({ size, width, label, sortOrder, isDisabled, onClick, 'aria-label': ariaLabel, ...rest }: Props$a): react.JSX.Element;
570
+ declare function SortButton({ size, width, label, sortOrder, isDisabled, onClick, 'aria-label': ariaLabel, ...rest }: Props$9): react.JSX.Element;
427
571
 
428
- type Props$9 = {
572
+ type Props$8 = {
429
573
  children?: ReactNode;
430
574
  /** レイアウトタイプ */
431
575
  layout?: 'auto' | 'equal';
432
576
  };
433
- declare function Tab({ children, layout }: Props$9): react.JSX.Element;
577
+ declare function Tab({ children, layout }: Props$8): react.JSX.Element;
434
578
  declare namespace Tab {
435
- var Item: ({ isSelected, ...props }: {
579
+ var Item: ({ isSelected, isDisabled, icon, ...props }: {
436
580
  id: string;
437
581
  isSelected?: boolean;
438
582
  isDisabled?: boolean;
583
+ icon?: _zenkigen_inc_component_icons.IconName;
439
584
  children?: ReactNode;
440
585
  onClick: (id: string) => void;
441
586
  }) => react.JSX.Element;
442
587
  }
443
588
 
444
- type Props$8 = {
589
+ type Props$7 = {
445
590
  id: string;
446
591
  isSelected?: boolean;
447
592
  isDisabled?: boolean;
593
+ icon?: IconName;
448
594
  children?: ReactNode;
449
595
  onClick: (id: string) => void;
450
596
  };
451
- declare const TabItem: ({ isSelected, ...props }: Props$8) => react.JSX.Element;
597
+ declare const TabItem: ({ isSelected, isDisabled, icon, ...props }: Props$7) => react.JSX.Element;
452
598
 
453
- type Props$7 = {
599
+ type Props$6 = {
454
600
  children?: ReactNode;
455
601
  className?: string;
456
602
  isHeader?: boolean;
457
603
  };
458
- declare function TableCell({ children, className, isHeader }: Props$7): react.JSX.Element;
604
+ declare function TableCell({ children, className, isHeader }: Props$6): react.JSX.Element;
459
605
 
460
- type Props$6 = {
606
+ type Props$5 = {
461
607
  children?: ReactNode;
462
608
  isHoverBackgroundVisible?: boolean;
463
609
  };
464
- declare function TableRow({ children, isHoverBackgroundVisible }: Props$6): react.JSX.Element;
610
+ declare function TableRow({ children, isHoverBackgroundVisible }: Props$5): react.JSX.Element;
465
611
 
466
- type Props$5 = {
612
+ type Props$4 = {
467
613
  width?: CSSProperties['width'];
468
614
  templateRows?: CSSProperties['gridTemplateRows'];
469
615
  templateColumns?: CSSProperties['gridTemplateColumns'];
470
616
  autoColumns?: CSSProperties['gridAutoColumns'];
471
617
  autoRows?: CSSProperties['gridAutoRows'];
472
618
  };
473
- declare function Table({ width, templateRows, templateColumns, autoColumns, autoRows, children, }: PropsWithChildren<Props$5>): react.JSX.Element;
619
+ declare function Table({ width, templateRows, templateColumns, autoColumns, autoRows, children, }: PropsWithChildren<Props$4>): react.JSX.Element;
474
620
  declare namespace Table {
475
621
  var Row: typeof TableRow;
476
622
  var Cell: typeof TableCell;
@@ -479,7 +625,7 @@ declare namespace Table {
479
625
  type TagColor = keyof typeof tagLightColors;
480
626
  type ColorVariant = 'normal' | 'light';
481
627
 
482
- type Props$4 = {
628
+ type Props$3 = {
483
629
  id: string;
484
630
  children: string;
485
631
  color: TagColor;
@@ -493,13 +639,17 @@ type Props$4 = {
493
639
  onDelete?: never;
494
640
  size?: 'x-small' | 'small' | 'medium';
495
641
  });
496
- declare function Tag({ id, children, color, variant, size, isEditable, onDelete }: Props$4): react.JSX.Element;
642
+ declare function Tag({ id, children, color, variant, size, isEditable, onDelete }: Props$3): react.JSX.Element;
497
643
 
498
- type Props$3 = TextareaHTMLAttributes<HTMLTextAreaElement> & {
644
+ type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> & {
499
645
  size?: 'medium' | 'large';
500
646
  value: string;
501
647
  height?: CSSProperties['height'];
502
648
  isError?: boolean;
649
+ /**
650
+ * @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
651
+ */
652
+ className?: string;
503
653
  } & ({
504
654
  autoHeight: true;
505
655
  maxHeight?: CSSProperties['maxHeight'];
@@ -509,7 +659,18 @@ type Props$3 = TextareaHTMLAttributes<HTMLTextAreaElement> & {
509
659
  maxHeight?: never;
510
660
  isResizable?: boolean;
511
661
  });
512
- declare const TextArea: react.ForwardRefExoticComponent<Props$3 & react.RefAttributes<HTMLTextAreaElement>>;
662
+
663
+ type TextAreaErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
664
+ declare const TextAreaErrorMessage: react.ForwardRefExoticComponent<TextAreaErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
665
+
666
+ type TextAreaHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
667
+ declare const TextAreaHelperMessage: react.ForwardRefExoticComponent<TextAreaHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
668
+
669
+ type TextAreaComponent = ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>> & {
670
+ HelperMessage: typeof TextAreaHelperMessage;
671
+ ErrorMessage: typeof TextAreaErrorMessage;
672
+ };
673
+ declare const TextArea: TextAreaComponent;
513
674
 
514
675
  type ToastState = 'success' | 'error' | 'warning' | 'information';
515
676
 
@@ -560,4 +721,4 @@ type Props = {
560
721
  };
561
722
  declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: PropsWithChildren<Props>): react.JSX.Element;
562
723
 
563
- export { Avatar, Breadcrumb, Button, Checkbox, type ColorVariant, Dropdown, type DropdownHorizontalAlign, type DropdownItemType, type DropdownVerticalPosition, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Pagination, PaginationSelect, PasswordInput, 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 };
724
+ 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 };