@zenkigen-inc/component-ui 1.20.3 → 1.21.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/dist/index.d.mts +156 -19
- package/dist/index.d.ts +156 -19
- package/dist/index.js +2312 -970
- package/dist/index.mjs +2306 -967
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -2,18 +2,35 @@ import * as react from 'react';
|
|
|
2
2
|
import react__default, { ReactNode, ElementType, PropsWithChildren, ComponentPropsWithoutRef, CSSProperties, ChangeEvent, HTMLAttributes, ButtonHTMLAttributes, ReactElement, MouseEvent, MutableRefObject, RefObject, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, FormEvent, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import * as _zenkigen_inc_component_icons from '@zenkigen-inc/component-icons';
|
|
4
4
|
import { IconName } from '@zenkigen-inc/component-icons';
|
|
5
|
-
import { iconColors, tagLightColors } from '@zenkigen-inc/component-theme';
|
|
6
5
|
import { tokens } from '@zenkigen-inc/component-config';
|
|
7
6
|
import { useFloating } from '@floating-ui/react';
|
|
7
|
+
import { tagLightColors } from '@zenkigen-inc/component-theme';
|
|
8
|
+
|
|
9
|
+
type AvatarSize = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
8
10
|
|
|
9
11
|
type Props$x = {
|
|
10
|
-
size?:
|
|
12
|
+
size?: AvatarSize;
|
|
11
13
|
userId?: number;
|
|
12
14
|
firstName?: string;
|
|
13
15
|
lastName?: string;
|
|
14
16
|
isDisabled?: boolean;
|
|
15
17
|
};
|
|
16
|
-
declare function Avatar({ size, ...props }: Props$x): react.JSX.Element;
|
|
18
|
+
declare function Avatar({ size: sizeProp, ...props }: Props$x): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
type RenderSurplusContext = {
|
|
21
|
+
remain: number;
|
|
22
|
+
total: number;
|
|
23
|
+
defaultBadge: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
type AvatarGroupProps = {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
size?: AvatarSize;
|
|
28
|
+
max?: number;
|
|
29
|
+
total?: number;
|
|
30
|
+
renderSurplus?: (ctx: RenderSurplusContext) => ReactNode;
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function AvatarGroup({ children, size, max: maxProp, total, renderSurplus, 'aria-label': ariaLabel, }: AvatarGroupProps): react.JSX.Element;
|
|
17
34
|
|
|
18
35
|
type BreadcrumbProps = {
|
|
19
36
|
/** パンくずとして表示する要素。通常は複数の Breadcrumb.Item を渡す。 */
|
|
@@ -26,7 +43,7 @@ declare namespace Breadcrumb {
|
|
|
26
43
|
}) => react.JSX.Element;
|
|
27
44
|
}
|
|
28
45
|
|
|
29
|
-
type Size$3 = 'small' | 'medium' | 'large';
|
|
46
|
+
type Size$3 = 'small' | 'medium' | 'large' | 'x-large';
|
|
30
47
|
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
31
48
|
type JustifyContent = 'start' | 'center';
|
|
32
49
|
type ElementAs = ElementType;
|
|
@@ -66,6 +83,8 @@ type Props$w = {
|
|
|
66
83
|
isChecked?: boolean;
|
|
67
84
|
/** 色バリエーション。default: インタラクティブ色 / gray: グレー系 / error: エラー色 */
|
|
68
85
|
color?: 'default' | 'gray' | 'error';
|
|
86
|
+
/** サイズバリエーション。medium: box 20px / large: box 24px */
|
|
87
|
+
size?: 'medium' | 'large';
|
|
69
88
|
/** インデターミネイト表示を行うか(表示時は isChecked も true を推奨) */
|
|
70
89
|
isIndeterminate?: boolean;
|
|
71
90
|
/** 無効状態にするか */
|
|
@@ -75,7 +94,88 @@ type Props$w = {
|
|
|
75
94
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
76
95
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
77
96
|
};
|
|
78
|
-
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$w): react.JSX.Element;
|
|
97
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, size, }: Props$w): react.JSX.Element;
|
|
98
|
+
|
|
99
|
+
type TextInputErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
100
|
+
declare const TextInputErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
101
|
+
|
|
102
|
+
type TextInputHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
103
|
+
declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
|
|
105
|
+
type ComboboxSize = 'medium' | 'large';
|
|
106
|
+
type ComboboxVariant = 'outline' | 'text';
|
|
107
|
+
type ComboboxChangeMeta = {
|
|
108
|
+
label: string;
|
|
109
|
+
};
|
|
110
|
+
type ComboboxProps = PropsWithChildren<{
|
|
111
|
+
/** 選択値(controlled) */
|
|
112
|
+
value: string | null;
|
|
113
|
+
/** 選択変更時のコールバック */
|
|
114
|
+
onChange: (value: string | null, meta: ComboboxChangeMeta | null) => void;
|
|
115
|
+
/** 入力テキスト(controlled) */
|
|
116
|
+
inputValue: string;
|
|
117
|
+
/** 入力変更時のコールバック */
|
|
118
|
+
onInputChange: (value: string) => void;
|
|
119
|
+
/** popup の開閉状態(任意、controlled) */
|
|
120
|
+
isOpen?: boolean;
|
|
121
|
+
/** 開閉変更時のコールバック */
|
|
122
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
123
|
+
/** サイズ */
|
|
124
|
+
size?: ComboboxSize;
|
|
125
|
+
/** バリアント */
|
|
126
|
+
variant?: ComboboxVariant;
|
|
127
|
+
/** プレースホルダー */
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
/** エラー状態 */
|
|
130
|
+
isError?: boolean;
|
|
131
|
+
/** 無効状態 */
|
|
132
|
+
isDisabled?: boolean;
|
|
133
|
+
/** 幅 */
|
|
134
|
+
width?: CSSProperties['width'];
|
|
135
|
+
/** 最大幅 */
|
|
136
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
137
|
+
/** 候補リストの最大高さ */
|
|
138
|
+
listMaxHeight?: CSSProperties['height'];
|
|
139
|
+
/** true のとき候補リストの幅を input と一致させる。false のときコンテンツに応じて広がる(min: input 幅, max: ビューポート幅) */
|
|
140
|
+
matchListToTrigger?: boolean;
|
|
141
|
+
}>;
|
|
142
|
+
type ComboboxInputProps = PropsWithChildren<{
|
|
143
|
+
/** input の autoFocus */
|
|
144
|
+
autoFocus?: boolean;
|
|
145
|
+
}>;
|
|
146
|
+
type ComboboxListProps = PropsWithChildren<{
|
|
147
|
+
/** 候補リストの最大高さ(Combobox の listMaxHeight を上書き) */
|
|
148
|
+
maxHeight?: CSSProperties['height'];
|
|
149
|
+
}>;
|
|
150
|
+
type ComboboxItemProps = {
|
|
151
|
+
/** 選択値として使う文字列(必須) */
|
|
152
|
+
value: string;
|
|
153
|
+
/** input 表示・選択時の復元用文字列(必須)。1 行 truncate 表示で自動レンダリングされる */
|
|
154
|
+
label: string;
|
|
155
|
+
/** 個別アイテムの無効化 */
|
|
156
|
+
isDisabled?: boolean;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare function ComboboxInput({ autoFocus, children }: ComboboxInputProps): react.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare function ComboboxItem({ value, label, isDisabled }: ComboboxItemProps): react.JSX.Element;
|
|
162
|
+
|
|
163
|
+
declare function ComboboxList({ children, maxHeight: maxHeightProp }: ComboboxListProps): react.JSX.Element;
|
|
164
|
+
|
|
165
|
+
declare function ComboboxLoading(): react.JSX.Element;
|
|
166
|
+
declare function ComboboxEmpty(): react.JSX.Element;
|
|
167
|
+
|
|
168
|
+
declare function ComboboxBase({ children, value, onChange, inputValue, onInputChange, isOpen: isOpenProp, onOpenChange, size, variant, placeholder, isError, isDisabled, width, maxWidth, listMaxHeight, matchListToTrigger, }: ComboboxProps): react.JSX.Element;
|
|
169
|
+
declare const Combobox: typeof ComboboxBase & {
|
|
170
|
+
Input: typeof ComboboxInput;
|
|
171
|
+
List: typeof ComboboxList;
|
|
172
|
+
Item: typeof ComboboxItem;
|
|
173
|
+
Loading: typeof ComboboxLoading;
|
|
174
|
+
Empty: typeof ComboboxEmpty;
|
|
175
|
+
HelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
176
|
+
ErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
177
|
+
displayName: string;
|
|
178
|
+
};
|
|
79
179
|
|
|
80
180
|
/**
|
|
81
181
|
* DatePicker のエラーメッセージを表示するコンポーネントのプロパティ
|
|
@@ -330,11 +430,10 @@ type TailwindColorToken = `${TailwindColorName}-${TailwindColorShade}` | 'transp
|
|
|
330
430
|
type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundColorToken | BorderColorToken | IconColorToken | InteractiveColorToken | FieldColorToken | FocusColorToken | HoverColorToken | ActiveColorToken | SelectedColorToken | DisabledColorToken | SupportColorToken | BaseColorToken | TailwindColorToken;
|
|
331
431
|
|
|
332
432
|
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
333
|
-
type Color = keyof typeof iconColors;
|
|
334
433
|
type Props$q = {
|
|
335
434
|
name: IconName;
|
|
336
435
|
size?: Size$1;
|
|
337
|
-
color?:
|
|
436
|
+
color?: ColorToken;
|
|
338
437
|
accentColor?: ColorToken;
|
|
339
438
|
isDisabled?: boolean;
|
|
340
439
|
className?: string;
|
|
@@ -356,6 +455,8 @@ type Props$p = {
|
|
|
356
455
|
isNoPadding?: boolean;
|
|
357
456
|
/** ボタンのバリアント */
|
|
358
457
|
variant?: Variant;
|
|
458
|
+
/** アイコンのカラー */
|
|
459
|
+
iconColor?: ColorToken;
|
|
359
460
|
/** アイコンのアクセントカラー */
|
|
360
461
|
iconAccentColor?: ColorToken;
|
|
361
462
|
} & (({
|
|
@@ -365,7 +466,7 @@ type Props$p = {
|
|
|
365
466
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
|
|
366
467
|
isAnchor?: false;
|
|
367
468
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
|
|
368
|
-
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
469
|
+
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconColor, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
369
470
|
|
|
370
471
|
type Props$o = {
|
|
371
472
|
/** インジケーターのサイズ。small=16px / medium=32px / large=64px */
|
|
@@ -456,14 +557,9 @@ type Props$i = {
|
|
|
456
557
|
};
|
|
457
558
|
declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$i): react.JSX.Element;
|
|
458
559
|
|
|
459
|
-
type TextInputErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
460
|
-
declare const TextInputErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
461
|
-
|
|
462
|
-
type TextInputHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
463
|
-
declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
464
|
-
|
|
465
560
|
type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> & {
|
|
466
|
-
size?: 'medium' | 'large';
|
|
561
|
+
size?: 'medium' | 'large' | 'x-large';
|
|
562
|
+
variant?: 'outline' | 'text';
|
|
467
563
|
value: string;
|
|
468
564
|
isError?: boolean;
|
|
469
565
|
onClickClearButton?: () => void;
|
|
@@ -485,7 +581,7 @@ declare const PasswordInput: ForwardRefExoticComponent<Props$h & RefAttributes<H
|
|
|
485
581
|
/**
|
|
486
582
|
* Popoverが閉じられる理由を定義する型
|
|
487
583
|
*/
|
|
488
|
-
type CloseReason = 'outside-click' | 'escape-key-down';
|
|
584
|
+
type CloseReason = 'outside-click' | 'escape-key-down' | 'modal-open';
|
|
489
585
|
/**
|
|
490
586
|
* Popoverのクローズイベントの型定義
|
|
491
587
|
*/
|
|
@@ -572,10 +668,12 @@ type Props$d = {
|
|
|
572
668
|
isChecked?: boolean;
|
|
573
669
|
/** 無効状態にするか */
|
|
574
670
|
isDisabled?: boolean;
|
|
671
|
+
/** ラジオボタンのサイズ */
|
|
672
|
+
size?: 'medium' | 'large';
|
|
575
673
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
576
674
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
577
675
|
};
|
|
578
|
-
declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$d): react.JSX.Element;
|
|
676
|
+
declare function Radio({ name, value, id, label, isChecked, isDisabled, size, onChange, }: Props$d): react.JSX.Element;
|
|
579
677
|
|
|
580
678
|
type Props$c = {
|
|
581
679
|
/** サイズ */
|
|
@@ -710,6 +808,40 @@ type Props$8 = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'type
|
|
|
710
808
|
};
|
|
711
809
|
declare function SortButton({ size, width, label, sortOrder, isDisabled, onClick, 'aria-label': ariaLabel, ...rest }: Props$8): react.JSX.Element;
|
|
712
810
|
|
|
811
|
+
type StepsSize = 'small' | 'medium' | 'large';
|
|
812
|
+
type StepsOrientation = 'horizontal' | 'vertical';
|
|
813
|
+
type StepsTextOrientation = 'horizontal' | 'vertical';
|
|
814
|
+
type StepsVariant = 'subtle' | 'solid';
|
|
815
|
+
type StepProgress = 'completed' | 'current' | 'upcoming';
|
|
816
|
+
type StepState = {
|
|
817
|
+
progress: StepProgress;
|
|
818
|
+
};
|
|
819
|
+
type StepsProps = {
|
|
820
|
+
children: ReactNode;
|
|
821
|
+
currentStep?: number;
|
|
822
|
+
defaultCurrentStep?: number;
|
|
823
|
+
size?: StepsSize;
|
|
824
|
+
orientation?: StepsOrientation;
|
|
825
|
+
textOrientation?: StepsTextOrientation;
|
|
826
|
+
variant?: StepsVariant;
|
|
827
|
+
'aria-label'?: string;
|
|
828
|
+
};
|
|
829
|
+
type StepsItemProps = {
|
|
830
|
+
label: ReactNode;
|
|
831
|
+
description?: ReactNode;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
declare function StepsItem({ label, description }: StepsItemProps): react.JSX.Element;
|
|
835
|
+
declare namespace StepsItem {
|
|
836
|
+
var displayName: string;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare function StepsRoot({ children, currentStep, defaultCurrentStep, size, orientation, textOrientation, variant, 'aria-label': ariaLabel, }: StepsProps): react.JSX.Element | null;
|
|
840
|
+
type StepsComponent = typeof StepsRoot & {
|
|
841
|
+
Item: typeof StepsItem;
|
|
842
|
+
};
|
|
843
|
+
declare const Steps: StepsComponent;
|
|
844
|
+
|
|
713
845
|
type Props$7 = {
|
|
714
846
|
children?: ReactNode;
|
|
715
847
|
/** レイアウトタイプ */
|
|
@@ -797,11 +929,16 @@ type TextAreaBaseProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'clas
|
|
|
797
929
|
value: string;
|
|
798
930
|
height?: CSSProperties['height'];
|
|
799
931
|
isError?: boolean;
|
|
932
|
+
} & ({
|
|
933
|
+
variant?: 'outline';
|
|
800
934
|
/**
|
|
801
935
|
* @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
|
|
802
936
|
*/
|
|
803
937
|
className?: string;
|
|
804
|
-
}
|
|
938
|
+
} | {
|
|
939
|
+
variant: 'text';
|
|
940
|
+
className?: never;
|
|
941
|
+
});
|
|
805
942
|
type AutoHeightUnion = {
|
|
806
943
|
autoHeight: true;
|
|
807
944
|
maxHeight?: CSSProperties['maxHeight'];
|
|
@@ -918,4 +1055,4 @@ type TooltipProps = {
|
|
|
918
1055
|
};
|
|
919
1056
|
declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: TooltipProps): react.JSX.Element;
|
|
920
1057
|
|
|
921
|
-
export { Avatar, Breadcrumb, Button, Checkbox, type ColorVariant, DatePicker, type DatePickerProps, type DatePickerTimeZone, Divider, 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 };
|
|
1058
|
+
export { Avatar, AvatarGroup, Breadcrumb, Button, Checkbox, type ColorVariant, Combobox, type ComboboxChangeMeta, type ComboboxInputProps, type ComboboxItemProps, type ComboboxListProps, type ComboboxProps, type ComboboxSize, type ComboboxVariant, DatePicker, type DatePickerProps, type DatePickerTimeZone, Divider, 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, type RenderSurplusContext, Search, SegmentedControl, Select, type SelectOption, SelectSort, SortButton, type SortOrder, type StepProgress, type StepState, Steps, type StepsOrientation, type StepsProps, type StepsSize, type StepsTextOrientation, type StepsVariant, Tab, TabItem, Table, TableCell, TableRow, Tag, type TagColor, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, type UseRovingFocusProps, type UseRovingFocusReturn, useOutsideClick, useRovingFocus, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,35 @@ import * as react from 'react';
|
|
|
2
2
|
import react__default, { ReactNode, ElementType, PropsWithChildren, ComponentPropsWithoutRef, CSSProperties, ChangeEvent, HTMLAttributes, ButtonHTMLAttributes, ReactElement, MouseEvent, MutableRefObject, RefObject, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, FormEvent, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import * as _zenkigen_inc_component_icons from '@zenkigen-inc/component-icons';
|
|
4
4
|
import { IconName } from '@zenkigen-inc/component-icons';
|
|
5
|
-
import { iconColors, tagLightColors } from '@zenkigen-inc/component-theme';
|
|
6
5
|
import { tokens } from '@zenkigen-inc/component-config';
|
|
7
6
|
import { useFloating } from '@floating-ui/react';
|
|
7
|
+
import { tagLightColors } from '@zenkigen-inc/component-theme';
|
|
8
|
+
|
|
9
|
+
type AvatarSize = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
8
10
|
|
|
9
11
|
type Props$x = {
|
|
10
|
-
size?:
|
|
12
|
+
size?: AvatarSize;
|
|
11
13
|
userId?: number;
|
|
12
14
|
firstName?: string;
|
|
13
15
|
lastName?: string;
|
|
14
16
|
isDisabled?: boolean;
|
|
15
17
|
};
|
|
16
|
-
declare function Avatar({ size, ...props }: Props$x): react.JSX.Element;
|
|
18
|
+
declare function Avatar({ size: sizeProp, ...props }: Props$x): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
type RenderSurplusContext = {
|
|
21
|
+
remain: number;
|
|
22
|
+
total: number;
|
|
23
|
+
defaultBadge: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
type AvatarGroupProps = {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
size?: AvatarSize;
|
|
28
|
+
max?: number;
|
|
29
|
+
total?: number;
|
|
30
|
+
renderSurplus?: (ctx: RenderSurplusContext) => ReactNode;
|
|
31
|
+
'aria-label'?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function AvatarGroup({ children, size, max: maxProp, total, renderSurplus, 'aria-label': ariaLabel, }: AvatarGroupProps): react.JSX.Element;
|
|
17
34
|
|
|
18
35
|
type BreadcrumbProps = {
|
|
19
36
|
/** パンくずとして表示する要素。通常は複数の Breadcrumb.Item を渡す。 */
|
|
@@ -26,7 +43,7 @@ declare namespace Breadcrumb {
|
|
|
26
43
|
}) => react.JSX.Element;
|
|
27
44
|
}
|
|
28
45
|
|
|
29
|
-
type Size$3 = 'small' | 'medium' | 'large';
|
|
46
|
+
type Size$3 = 'small' | 'medium' | 'large' | 'x-large';
|
|
30
47
|
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
31
48
|
type JustifyContent = 'start' | 'center';
|
|
32
49
|
type ElementAs = ElementType;
|
|
@@ -66,6 +83,8 @@ type Props$w = {
|
|
|
66
83
|
isChecked?: boolean;
|
|
67
84
|
/** 色バリエーション。default: インタラクティブ色 / gray: グレー系 / error: エラー色 */
|
|
68
85
|
color?: 'default' | 'gray' | 'error';
|
|
86
|
+
/** サイズバリエーション。medium: box 20px / large: box 24px */
|
|
87
|
+
size?: 'medium' | 'large';
|
|
69
88
|
/** インデターミネイト表示を行うか(表示時は isChecked も true を推奨) */
|
|
70
89
|
isIndeterminate?: boolean;
|
|
71
90
|
/** 無効状態にするか */
|
|
@@ -75,7 +94,88 @@ type Props$w = {
|
|
|
75
94
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
76
95
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
77
96
|
};
|
|
78
|
-
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$w): react.JSX.Element;
|
|
97
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, size, }: Props$w): react.JSX.Element;
|
|
98
|
+
|
|
99
|
+
type TextInputErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
100
|
+
declare const TextInputErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
101
|
+
|
|
102
|
+
type TextInputHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
103
|
+
declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
|
|
105
|
+
type ComboboxSize = 'medium' | 'large';
|
|
106
|
+
type ComboboxVariant = 'outline' | 'text';
|
|
107
|
+
type ComboboxChangeMeta = {
|
|
108
|
+
label: string;
|
|
109
|
+
};
|
|
110
|
+
type ComboboxProps = PropsWithChildren<{
|
|
111
|
+
/** 選択値(controlled) */
|
|
112
|
+
value: string | null;
|
|
113
|
+
/** 選択変更時のコールバック */
|
|
114
|
+
onChange: (value: string | null, meta: ComboboxChangeMeta | null) => void;
|
|
115
|
+
/** 入力テキスト(controlled) */
|
|
116
|
+
inputValue: string;
|
|
117
|
+
/** 入力変更時のコールバック */
|
|
118
|
+
onInputChange: (value: string) => void;
|
|
119
|
+
/** popup の開閉状態(任意、controlled) */
|
|
120
|
+
isOpen?: boolean;
|
|
121
|
+
/** 開閉変更時のコールバック */
|
|
122
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
123
|
+
/** サイズ */
|
|
124
|
+
size?: ComboboxSize;
|
|
125
|
+
/** バリアント */
|
|
126
|
+
variant?: ComboboxVariant;
|
|
127
|
+
/** プレースホルダー */
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
/** エラー状態 */
|
|
130
|
+
isError?: boolean;
|
|
131
|
+
/** 無効状態 */
|
|
132
|
+
isDisabled?: boolean;
|
|
133
|
+
/** 幅 */
|
|
134
|
+
width?: CSSProperties['width'];
|
|
135
|
+
/** 最大幅 */
|
|
136
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
137
|
+
/** 候補リストの最大高さ */
|
|
138
|
+
listMaxHeight?: CSSProperties['height'];
|
|
139
|
+
/** true のとき候補リストの幅を input と一致させる。false のときコンテンツに応じて広がる(min: input 幅, max: ビューポート幅) */
|
|
140
|
+
matchListToTrigger?: boolean;
|
|
141
|
+
}>;
|
|
142
|
+
type ComboboxInputProps = PropsWithChildren<{
|
|
143
|
+
/** input の autoFocus */
|
|
144
|
+
autoFocus?: boolean;
|
|
145
|
+
}>;
|
|
146
|
+
type ComboboxListProps = PropsWithChildren<{
|
|
147
|
+
/** 候補リストの最大高さ(Combobox の listMaxHeight を上書き) */
|
|
148
|
+
maxHeight?: CSSProperties['height'];
|
|
149
|
+
}>;
|
|
150
|
+
type ComboboxItemProps = {
|
|
151
|
+
/** 選択値として使う文字列(必須) */
|
|
152
|
+
value: string;
|
|
153
|
+
/** input 表示・選択時の復元用文字列(必須)。1 行 truncate 表示で自動レンダリングされる */
|
|
154
|
+
label: string;
|
|
155
|
+
/** 個別アイテムの無効化 */
|
|
156
|
+
isDisabled?: boolean;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare function ComboboxInput({ autoFocus, children }: ComboboxInputProps): react.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare function ComboboxItem({ value, label, isDisabled }: ComboboxItemProps): react.JSX.Element;
|
|
162
|
+
|
|
163
|
+
declare function ComboboxList({ children, maxHeight: maxHeightProp }: ComboboxListProps): react.JSX.Element;
|
|
164
|
+
|
|
165
|
+
declare function ComboboxLoading(): react.JSX.Element;
|
|
166
|
+
declare function ComboboxEmpty(): react.JSX.Element;
|
|
167
|
+
|
|
168
|
+
declare function ComboboxBase({ children, value, onChange, inputValue, onInputChange, isOpen: isOpenProp, onOpenChange, size, variant, placeholder, isError, isDisabled, width, maxWidth, listMaxHeight, matchListToTrigger, }: ComboboxProps): react.JSX.Element;
|
|
169
|
+
declare const Combobox: typeof ComboboxBase & {
|
|
170
|
+
Input: typeof ComboboxInput;
|
|
171
|
+
List: typeof ComboboxList;
|
|
172
|
+
Item: typeof ComboboxItem;
|
|
173
|
+
Loading: typeof ComboboxLoading;
|
|
174
|
+
Empty: typeof ComboboxEmpty;
|
|
175
|
+
HelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
176
|
+
ErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
177
|
+
displayName: string;
|
|
178
|
+
};
|
|
79
179
|
|
|
80
180
|
/**
|
|
81
181
|
* DatePicker のエラーメッセージを表示するコンポーネントのプロパティ
|
|
@@ -330,11 +430,10 @@ type TailwindColorToken = `${TailwindColorName}-${TailwindColorShade}` | 'transp
|
|
|
330
430
|
type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundColorToken | BorderColorToken | IconColorToken | InteractiveColorToken | FieldColorToken | FocusColorToken | HoverColorToken | ActiveColorToken | SelectedColorToken | DisabledColorToken | SupportColorToken | BaseColorToken | TailwindColorToken;
|
|
331
431
|
|
|
332
432
|
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
333
|
-
type Color = keyof typeof iconColors;
|
|
334
433
|
type Props$q = {
|
|
335
434
|
name: IconName;
|
|
336
435
|
size?: Size$1;
|
|
337
|
-
color?:
|
|
436
|
+
color?: ColorToken;
|
|
338
437
|
accentColor?: ColorToken;
|
|
339
438
|
isDisabled?: boolean;
|
|
340
439
|
className?: string;
|
|
@@ -356,6 +455,8 @@ type Props$p = {
|
|
|
356
455
|
isNoPadding?: boolean;
|
|
357
456
|
/** ボタンのバリアント */
|
|
358
457
|
variant?: Variant;
|
|
458
|
+
/** アイコンのカラー */
|
|
459
|
+
iconColor?: ColorToken;
|
|
359
460
|
/** アイコンのアクセントカラー */
|
|
360
461
|
iconAccentColor?: ColorToken;
|
|
361
462
|
} & (({
|
|
@@ -365,7 +466,7 @@ type Props$p = {
|
|
|
365
466
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
|
|
366
467
|
isAnchor?: false;
|
|
367
468
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
|
|
368
|
-
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
469
|
+
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconColor, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
369
470
|
|
|
370
471
|
type Props$o = {
|
|
371
472
|
/** インジケーターのサイズ。small=16px / medium=32px / large=64px */
|
|
@@ -456,14 +557,9 @@ type Props$i = {
|
|
|
456
557
|
};
|
|
457
558
|
declare function PaginationSelect({ totalSize, currentPage, sizePerPage, countLabel, pageLabel, optionListMaxHeight, onClickPrevButton, onClickNextButton, onChange, }: Props$i): react.JSX.Element;
|
|
458
559
|
|
|
459
|
-
type TextInputErrorMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
460
|
-
declare const TextInputErrorMessage: react.ForwardRefExoticComponent<TextInputErrorMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
461
|
-
|
|
462
|
-
type TextInputHelperMessageProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
463
|
-
declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputHelperMessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
464
|
-
|
|
465
560
|
type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> & {
|
|
466
|
-
size?: 'medium' | 'large';
|
|
561
|
+
size?: 'medium' | 'large' | 'x-large';
|
|
562
|
+
variant?: 'outline' | 'text';
|
|
467
563
|
value: string;
|
|
468
564
|
isError?: boolean;
|
|
469
565
|
onClickClearButton?: () => void;
|
|
@@ -485,7 +581,7 @@ declare const PasswordInput: ForwardRefExoticComponent<Props$h & RefAttributes<H
|
|
|
485
581
|
/**
|
|
486
582
|
* Popoverが閉じられる理由を定義する型
|
|
487
583
|
*/
|
|
488
|
-
type CloseReason = 'outside-click' | 'escape-key-down';
|
|
584
|
+
type CloseReason = 'outside-click' | 'escape-key-down' | 'modal-open';
|
|
489
585
|
/**
|
|
490
586
|
* Popoverのクローズイベントの型定義
|
|
491
587
|
*/
|
|
@@ -572,10 +668,12 @@ type Props$d = {
|
|
|
572
668
|
isChecked?: boolean;
|
|
573
669
|
/** 無効状態にするか */
|
|
574
670
|
isDisabled?: boolean;
|
|
671
|
+
/** ラジオボタンのサイズ */
|
|
672
|
+
size?: 'medium' | 'large';
|
|
575
673
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
576
674
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
577
675
|
};
|
|
578
|
-
declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$d): react.JSX.Element;
|
|
676
|
+
declare function Radio({ name, value, id, label, isChecked, isDisabled, size, onChange, }: Props$d): react.JSX.Element;
|
|
579
677
|
|
|
580
678
|
type Props$c = {
|
|
581
679
|
/** サイズ */
|
|
@@ -710,6 +808,40 @@ type Props$8 = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'type
|
|
|
710
808
|
};
|
|
711
809
|
declare function SortButton({ size, width, label, sortOrder, isDisabled, onClick, 'aria-label': ariaLabel, ...rest }: Props$8): react.JSX.Element;
|
|
712
810
|
|
|
811
|
+
type StepsSize = 'small' | 'medium' | 'large';
|
|
812
|
+
type StepsOrientation = 'horizontal' | 'vertical';
|
|
813
|
+
type StepsTextOrientation = 'horizontal' | 'vertical';
|
|
814
|
+
type StepsVariant = 'subtle' | 'solid';
|
|
815
|
+
type StepProgress = 'completed' | 'current' | 'upcoming';
|
|
816
|
+
type StepState = {
|
|
817
|
+
progress: StepProgress;
|
|
818
|
+
};
|
|
819
|
+
type StepsProps = {
|
|
820
|
+
children: ReactNode;
|
|
821
|
+
currentStep?: number;
|
|
822
|
+
defaultCurrentStep?: number;
|
|
823
|
+
size?: StepsSize;
|
|
824
|
+
orientation?: StepsOrientation;
|
|
825
|
+
textOrientation?: StepsTextOrientation;
|
|
826
|
+
variant?: StepsVariant;
|
|
827
|
+
'aria-label'?: string;
|
|
828
|
+
};
|
|
829
|
+
type StepsItemProps = {
|
|
830
|
+
label: ReactNode;
|
|
831
|
+
description?: ReactNode;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
declare function StepsItem({ label, description }: StepsItemProps): react.JSX.Element;
|
|
835
|
+
declare namespace StepsItem {
|
|
836
|
+
var displayName: string;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare function StepsRoot({ children, currentStep, defaultCurrentStep, size, orientation, textOrientation, variant, 'aria-label': ariaLabel, }: StepsProps): react.JSX.Element | null;
|
|
840
|
+
type StepsComponent = typeof StepsRoot & {
|
|
841
|
+
Item: typeof StepsItem;
|
|
842
|
+
};
|
|
843
|
+
declare const Steps: StepsComponent;
|
|
844
|
+
|
|
713
845
|
type Props$7 = {
|
|
714
846
|
children?: ReactNode;
|
|
715
847
|
/** レイアウトタイプ */
|
|
@@ -797,11 +929,16 @@ type TextAreaBaseProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'clas
|
|
|
797
929
|
value: string;
|
|
798
930
|
height?: CSSProperties['height'];
|
|
799
931
|
isError?: boolean;
|
|
932
|
+
} & ({
|
|
933
|
+
variant?: 'outline';
|
|
800
934
|
/**
|
|
801
935
|
* @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
|
|
802
936
|
*/
|
|
803
937
|
className?: string;
|
|
804
|
-
}
|
|
938
|
+
} | {
|
|
939
|
+
variant: 'text';
|
|
940
|
+
className?: never;
|
|
941
|
+
});
|
|
805
942
|
type AutoHeightUnion = {
|
|
806
943
|
autoHeight: true;
|
|
807
944
|
maxHeight?: CSSProperties['maxHeight'];
|
|
@@ -918,4 +1055,4 @@ type TooltipProps = {
|
|
|
918
1055
|
};
|
|
919
1056
|
declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: TooltipProps): react.JSX.Element;
|
|
920
1057
|
|
|
921
|
-
export { Avatar, Breadcrumb, Button, Checkbox, type ColorVariant, DatePicker, type DatePickerProps, type DatePickerTimeZone, Divider, 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 };
|
|
1058
|
+
export { Avatar, AvatarGroup, Breadcrumb, Button, Checkbox, type ColorVariant, Combobox, type ComboboxChangeMeta, type ComboboxInputProps, type ComboboxItemProps, type ComboboxListProps, type ComboboxProps, type ComboboxSize, type ComboboxVariant, DatePicker, type DatePickerProps, type DatePickerTimeZone, Divider, 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, type RenderSurplusContext, Search, SegmentedControl, Select, type SelectOption, SelectSort, SortButton, type SortOrder, type StepProgress, type StepState, Steps, type StepsOrientation, type StepsProps, type StepsSize, type StepsTextOrientation, type StepsVariant, Tab, TabItem, Table, TableCell, TableRow, Tag, type TagColor, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, type UseRovingFocusProps, type UseRovingFocusReturn, useOutsideClick, useRovingFocus, useToast };
|