@zenkigen-inc/component-ui 1.20.3 → 1.20.4
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 +20 -9
- package/dist/index.d.ts +20 -9
- package/dist/index.js +600 -479
- package/dist/index.mjs +359 -238
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -2,9 +2,9 @@ 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
8
|
|
|
9
9
|
type Props$x = {
|
|
10
10
|
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
@@ -26,7 +26,7 @@ declare namespace Breadcrumb {
|
|
|
26
26
|
}) => react.JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
type Size$3 = 'small' | 'medium' | 'large';
|
|
29
|
+
type Size$3 = 'small' | 'medium' | 'large' | 'x-large';
|
|
30
30
|
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
31
31
|
type JustifyContent = 'start' | 'center';
|
|
32
32
|
type ElementAs = ElementType;
|
|
@@ -66,6 +66,8 @@ type Props$w = {
|
|
|
66
66
|
isChecked?: boolean;
|
|
67
67
|
/** 色バリエーション。default: インタラクティブ色 / gray: グレー系 / error: エラー色 */
|
|
68
68
|
color?: 'default' | 'gray' | 'error';
|
|
69
|
+
/** サイズバリエーション。medium: box 20px / large: box 24px */
|
|
70
|
+
size?: 'medium' | 'large';
|
|
69
71
|
/** インデターミネイト表示を行うか(表示時は isChecked も true を推奨) */
|
|
70
72
|
isIndeterminate?: boolean;
|
|
71
73
|
/** 無効状態にするか */
|
|
@@ -75,7 +77,7 @@ type Props$w = {
|
|
|
75
77
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
76
78
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
77
79
|
};
|
|
78
|
-
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$w): react.JSX.Element;
|
|
80
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, size, }: Props$w): react.JSX.Element;
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
83
|
* DatePicker のエラーメッセージを表示するコンポーネントのプロパティ
|
|
@@ -330,11 +332,10 @@ type TailwindColorToken = `${TailwindColorName}-${TailwindColorShade}` | 'transp
|
|
|
330
332
|
type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundColorToken | BorderColorToken | IconColorToken | InteractiveColorToken | FieldColorToken | FocusColorToken | HoverColorToken | ActiveColorToken | SelectedColorToken | DisabledColorToken | SupportColorToken | BaseColorToken | TailwindColorToken;
|
|
331
333
|
|
|
332
334
|
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
333
|
-
type Color = keyof typeof iconColors;
|
|
334
335
|
type Props$q = {
|
|
335
336
|
name: IconName;
|
|
336
337
|
size?: Size$1;
|
|
337
|
-
color?:
|
|
338
|
+
color?: ColorToken;
|
|
338
339
|
accentColor?: ColorToken;
|
|
339
340
|
isDisabled?: boolean;
|
|
340
341
|
className?: string;
|
|
@@ -356,6 +357,8 @@ type Props$p = {
|
|
|
356
357
|
isNoPadding?: boolean;
|
|
357
358
|
/** ボタンのバリアント */
|
|
358
359
|
variant?: Variant;
|
|
360
|
+
/** アイコンのカラー */
|
|
361
|
+
iconColor?: ColorToken;
|
|
359
362
|
/** アイコンのアクセントカラー */
|
|
360
363
|
iconAccentColor?: ColorToken;
|
|
361
364
|
} & (({
|
|
@@ -365,7 +368,7 @@ type Props$p = {
|
|
|
365
368
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
|
|
366
369
|
isAnchor?: false;
|
|
367
370
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
|
|
368
|
-
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
371
|
+
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconColor, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
369
372
|
|
|
370
373
|
type Props$o = {
|
|
371
374
|
/** インジケーターのサイズ。small=16px / medium=32px / large=64px */
|
|
@@ -464,6 +467,7 @@ declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputH
|
|
|
464
467
|
|
|
465
468
|
type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> & {
|
|
466
469
|
size?: 'medium' | 'large';
|
|
470
|
+
variant?: 'outline' | 'text';
|
|
467
471
|
value: string;
|
|
468
472
|
isError?: boolean;
|
|
469
473
|
onClickClearButton?: () => void;
|
|
@@ -485,7 +489,7 @@ declare const PasswordInput: ForwardRefExoticComponent<Props$h & RefAttributes<H
|
|
|
485
489
|
/**
|
|
486
490
|
* Popoverが閉じられる理由を定義する型
|
|
487
491
|
*/
|
|
488
|
-
type CloseReason = 'outside-click' | 'escape-key-down';
|
|
492
|
+
type CloseReason = 'outside-click' | 'escape-key-down' | 'modal-open';
|
|
489
493
|
/**
|
|
490
494
|
* Popoverのクローズイベントの型定義
|
|
491
495
|
*/
|
|
@@ -572,10 +576,12 @@ type Props$d = {
|
|
|
572
576
|
isChecked?: boolean;
|
|
573
577
|
/** 無効状態にするか */
|
|
574
578
|
isDisabled?: boolean;
|
|
579
|
+
/** ラジオボタンのサイズ */
|
|
580
|
+
size?: 'medium' | 'large';
|
|
575
581
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
576
582
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
577
583
|
};
|
|
578
|
-
declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$d): react.JSX.Element;
|
|
584
|
+
declare function Radio({ name, value, id, label, isChecked, isDisabled, size, onChange, }: Props$d): react.JSX.Element;
|
|
579
585
|
|
|
580
586
|
type Props$c = {
|
|
581
587
|
/** サイズ */
|
|
@@ -797,11 +803,16 @@ type TextAreaBaseProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'clas
|
|
|
797
803
|
value: string;
|
|
798
804
|
height?: CSSProperties['height'];
|
|
799
805
|
isError?: boolean;
|
|
806
|
+
} & ({
|
|
807
|
+
variant?: 'outline';
|
|
800
808
|
/**
|
|
801
809
|
* @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
|
|
802
810
|
*/
|
|
803
811
|
className?: string;
|
|
804
|
-
}
|
|
812
|
+
} | {
|
|
813
|
+
variant: 'text';
|
|
814
|
+
className?: never;
|
|
815
|
+
});
|
|
805
816
|
type AutoHeightUnion = {
|
|
806
817
|
autoHeight: true;
|
|
807
818
|
maxHeight?: CSSProperties['maxHeight'];
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ 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
8
|
|
|
9
9
|
type Props$x = {
|
|
10
10
|
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
@@ -26,7 +26,7 @@ declare namespace Breadcrumb {
|
|
|
26
26
|
}) => react.JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
type Size$3 = 'small' | 'medium' | 'large';
|
|
29
|
+
type Size$3 = 'small' | 'medium' | 'large' | 'x-large';
|
|
30
30
|
type Variant$1 = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
31
31
|
type JustifyContent = 'start' | 'center';
|
|
32
32
|
type ElementAs = ElementType;
|
|
@@ -66,6 +66,8 @@ type Props$w = {
|
|
|
66
66
|
isChecked?: boolean;
|
|
67
67
|
/** 色バリエーション。default: インタラクティブ色 / gray: グレー系 / error: エラー色 */
|
|
68
68
|
color?: 'default' | 'gray' | 'error';
|
|
69
|
+
/** サイズバリエーション。medium: box 20px / large: box 24px */
|
|
70
|
+
size?: 'medium' | 'large';
|
|
69
71
|
/** インデターミネイト表示を行うか(表示時は isChecked も true を推奨) */
|
|
70
72
|
isIndeterminate?: boolean;
|
|
71
73
|
/** 無効状態にするか */
|
|
@@ -75,7 +77,7 @@ type Props$w = {
|
|
|
75
77
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
76
78
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
77
79
|
};
|
|
78
|
-
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props$w): react.JSX.Element;
|
|
80
|
+
declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, size, }: Props$w): react.JSX.Element;
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
83
|
* DatePicker のエラーメッセージを表示するコンポーネントのプロパティ
|
|
@@ -330,11 +332,10 @@ type TailwindColorToken = `${TailwindColorName}-${TailwindColorShade}` | 'transp
|
|
|
330
332
|
type ColorToken = UserColorToken | TextColorToken | LinkColorToken | BackgroundColorToken | BorderColorToken | IconColorToken | InteractiveColorToken | FieldColorToken | FocusColorToken | HoverColorToken | ActiveColorToken | SelectedColorToken | DisabledColorToken | SupportColorToken | BaseColorToken | TailwindColorToken;
|
|
331
333
|
|
|
332
334
|
type Size$1 = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
333
|
-
type Color = keyof typeof iconColors;
|
|
334
335
|
type Props$q = {
|
|
335
336
|
name: IconName;
|
|
336
337
|
size?: Size$1;
|
|
337
|
-
color?:
|
|
338
|
+
color?: ColorToken;
|
|
338
339
|
accentColor?: ColorToken;
|
|
339
340
|
isDisabled?: boolean;
|
|
340
341
|
className?: string;
|
|
@@ -356,6 +357,8 @@ type Props$p = {
|
|
|
356
357
|
isNoPadding?: boolean;
|
|
357
358
|
/** ボタンのバリアント */
|
|
358
359
|
variant?: Variant;
|
|
360
|
+
/** アイコンのカラー */
|
|
361
|
+
iconColor?: ColorToken;
|
|
359
362
|
/** アイコンのアクセントカラー */
|
|
360
363
|
iconAccentColor?: ColorToken;
|
|
361
364
|
} & (({
|
|
@@ -365,7 +368,7 @@ type Props$p = {
|
|
|
365
368
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'className'>) | ({
|
|
366
369
|
isAnchor?: false;
|
|
367
370
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'className'>));
|
|
368
|
-
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
371
|
+
declare function IconButton({ icon, size, variant, isNoPadding, isDisabled, isSelected, iconColor, iconAccentColor, ...props }: Props$p): react.JSX.Element;
|
|
369
372
|
|
|
370
373
|
type Props$o = {
|
|
371
374
|
/** インジケーターのサイズ。small=16px / medium=32px / large=64px */
|
|
@@ -464,6 +467,7 @@ declare const TextInputHelperMessage: react.ForwardRefExoticComponent<TextInputH
|
|
|
464
467
|
|
|
465
468
|
type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'className'> & {
|
|
466
469
|
size?: 'medium' | 'large';
|
|
470
|
+
variant?: 'outline' | 'text';
|
|
467
471
|
value: string;
|
|
468
472
|
isError?: boolean;
|
|
469
473
|
onClickClearButton?: () => void;
|
|
@@ -485,7 +489,7 @@ declare const PasswordInput: ForwardRefExoticComponent<Props$h & RefAttributes<H
|
|
|
485
489
|
/**
|
|
486
490
|
* Popoverが閉じられる理由を定義する型
|
|
487
491
|
*/
|
|
488
|
-
type CloseReason = 'outside-click' | 'escape-key-down';
|
|
492
|
+
type CloseReason = 'outside-click' | 'escape-key-down' | 'modal-open';
|
|
489
493
|
/**
|
|
490
494
|
* Popoverのクローズイベントの型定義
|
|
491
495
|
*/
|
|
@@ -572,10 +576,12 @@ type Props$d = {
|
|
|
572
576
|
isChecked?: boolean;
|
|
573
577
|
/** 無効状態にするか */
|
|
574
578
|
isDisabled?: boolean;
|
|
579
|
+
/** ラジオボタンのサイズ */
|
|
580
|
+
size?: 'medium' | 'large';
|
|
575
581
|
/** 状態変化時のハンドラー。isDisabled=true の場合は呼ばれない */
|
|
576
582
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
577
583
|
};
|
|
578
|
-
declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props$d): react.JSX.Element;
|
|
584
|
+
declare function Radio({ name, value, id, label, isChecked, isDisabled, size, onChange, }: Props$d): react.JSX.Element;
|
|
579
585
|
|
|
580
586
|
type Props$c = {
|
|
581
587
|
/** サイズ */
|
|
@@ -797,11 +803,16 @@ type TextAreaBaseProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'clas
|
|
|
797
803
|
value: string;
|
|
798
804
|
height?: CSSProperties['height'];
|
|
799
805
|
isError?: boolean;
|
|
806
|
+
} & ({
|
|
807
|
+
variant?: 'outline';
|
|
800
808
|
/**
|
|
801
809
|
* @deprecated 外部から className を渡してスタイルを上書きすることは非推奨です。
|
|
802
810
|
*/
|
|
803
811
|
className?: string;
|
|
804
|
-
}
|
|
812
|
+
} | {
|
|
813
|
+
variant: 'text';
|
|
814
|
+
className?: never;
|
|
815
|
+
});
|
|
805
816
|
type AutoHeightUnion = {
|
|
806
817
|
autoHeight: true;
|
|
807
818
|
maxHeight?: CSSProperties['maxHeight'];
|