@croquiscom/pds 2.5.0 → 2.7.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/CHANGELOG.md +23 -0
- package/dist/components/button/IconButton.d.ts +3 -3
- package/dist/components/button/styles.d.ts +2 -2
- package/dist/components/button/types.d.ts +5 -3
- package/dist/components/date-picker/DatePicker.d.ts +7 -1
- package/dist/components/date-picker/DatePicker.stories.d.ts +4 -2
- package/dist/components/date-picker/DateRangePicker.d.ts +1 -1
- package/dist/components/date-picker/DateRangePicker.stories.d.ts +4 -2
- package/dist/components/date-picker/styles.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +6 -1
- package/dist/components/dropdown/Dropdown.stories.d.ts +4 -1
- package/dist/components/dropdown/DropdownInput.d.ts +1 -1
- package/dist/components/dropdown/DropdownInput.stories.d.ts +4 -1
- package/dist/components/dropdown/DropdownItem.d.ts +2 -0
- package/dist/components/dropdown/DropdownLabel.d.ts +4 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/Input.stories.d.ts +2 -1
- package/dist/components/input/InputAddon.d.ts +6 -3
- package/dist/components/input/InputAffix.d.ts +3 -5
- package/dist/components/input/InputBase.d.ts +5 -3
- package/dist/components/input/NumericInput.d.ts +2 -2
- package/dist/components/input/NumericInput.stories.d.ts +2 -1
- package/dist/components/input/styles.d.ts +5 -1
- package/dist/components/input/types.d.ts +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +4 -1
- package/dist/components/time-picker/TimePicker.stories.d.ts +4 -2
- package/dist/components/time-picker/TimeRangePicker.d.ts +1 -1
- package/dist/components/time-picker/TimeRangePicker.stories.d.ts +4 -2
- package/dist/container/index.d.ts +1 -0
- package/dist/container/state/State.d.ts +10 -0
- package/dist/container/state/State.stories.d.ts +5 -0
- package/dist/container/state/index.d.ts +1 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f38a323: State Container 추가
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f942d65: TopNavigation 샘플 아이콘 크기 변경, Notification IconX 색상 변경
|
|
12
|
+
|
|
13
|
+
## 2.6.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- bf28068: Input, NumericInput, Dropdown, DropdownInput, DatePicker, DaterangePicker, TimePicker, TimeRangePicker size prop 추가
|
|
18
|
+
- 87906e7: Normal Button Outline 타입 추가
|
|
19
|
+
- 32e91b8: Dropdown, DropdownInput에 error status prop 추가
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 87906e7: Border Default 컬러 gray350으로 변경
|
|
24
|
+
- 87906e7: Divider Medium 사이즈의 컬러background.base로 변경
|
|
25
|
+
|
|
3
26
|
## 2.5.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IconButtonShape, IconButtonKind } from './types';
|
|
3
3
|
import { ButtonProps } from './Button';
|
|
4
4
|
import { IconProps } from '../icons/generated';
|
|
5
|
-
export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' | 'startIcon' | 'endIcon' | 'kind'> {
|
|
5
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' | 'startIcon' | 'endIcon' | 'kind' | 'shape'> {
|
|
6
6
|
/**
|
|
7
7
|
* shape 속성이 'circle'의 경우 적용되지 않습니다.
|
|
8
8
|
* @default outlined_secondary
|
|
@@ -15,6 +15,6 @@ export interface IconButtonProps extends Omit<ButtonProps, 'size' | 'loading' |
|
|
|
15
15
|
*/
|
|
16
16
|
icon?: ReactElement<IconProps>;
|
|
17
17
|
/** @default rectangle */
|
|
18
|
-
shape?:
|
|
18
|
+
shape?: IconButtonShape;
|
|
19
19
|
}
|
|
20
20
|
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ButtonSize, ButtonKind,
|
|
1
|
+
import { ButtonSize, ButtonKind, IconButtonShape, TextButtonKind, TextButtonSize, IconButtonKind } from './types';
|
|
2
2
|
export declare const button_base_css: import("@emotion/utils").SerializedStyles;
|
|
3
3
|
export declare const getButtonKind: (kind?: ButtonKind) => import("@emotion/utils").SerializedStyles;
|
|
4
4
|
export declare const getIconButtonKind: (kind?: IconButtonKind) => import("@emotion/utils").SerializedStyles;
|
|
5
5
|
export declare const button_size_css: Record<ButtonSize, string>;
|
|
6
6
|
export declare const button_icon_size_css: Record<ButtonSize, number>;
|
|
7
7
|
export declare const text_button_icon_size_css: Record<TextButtonSize, number>;
|
|
8
|
-
export declare const getIconButtonStyle: (shape?:
|
|
8
|
+
export declare const getIconButtonStyle: (shape?: IconButtonShape) => import("@emotion/utils").SerializedStyles;
|
|
9
9
|
export declare const text_button_text_css: Record<TextButtonSize, string>;
|
|
10
10
|
export declare const text_button_size_css: Record<TextButtonSize, string>;
|
|
11
11
|
export declare const getTextButtonStyle: (kind: TextButtonKind, fixed_color: string) => import("@emotion/utils").SerializedStyles;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type ButtonBaseKind = 'primary' | 'secondary' | 'black' | 'negative';
|
|
2
|
+
export type ButtonOutlinedKind = `outlined_${ButtonBaseKind}`;
|
|
3
|
+
export type ButtonKind = ButtonBaseKind | ButtonOutlinedKind;
|
|
2
4
|
export type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
3
|
-
export type
|
|
4
|
-
export type IconButtonKind =
|
|
5
|
+
export type IconButtonShape = 'rectangle' | 'circle';
|
|
6
|
+
export type IconButtonKind = Exclude<ButtonOutlinedKind, 'outlined_black'>;
|
|
5
7
|
export type TextButtonKind = 'text' | 'link';
|
|
6
8
|
export type TextButtonSize = Exclude<ButtonSize, 'xsmall' | 'xlarge'>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Matcher } from 'react-day-picker';
|
|
3
3
|
import { CSSValueWithLength } from '../../styles';
|
|
4
|
+
import { InputSize } from '../input/types';
|
|
4
5
|
export type DisplayTimeFormat = 'hourMinute' | 'hourMinuteSecond';
|
|
5
6
|
export type DisplayMode = 'popover' | 'bottomSheet';
|
|
6
7
|
export declare const DATE_FORMAT = "yyyy.MM.dd";
|
|
@@ -12,6 +13,11 @@ export interface DatePickerBaseProps {
|
|
|
12
13
|
* @default 100%
|
|
13
14
|
*/
|
|
14
15
|
width?: CSSValueWithLength;
|
|
16
|
+
/**
|
|
17
|
+
* Input size를 지정할 수 있습니다.
|
|
18
|
+
* @default large
|
|
19
|
+
* */
|
|
20
|
+
size?: InputSize;
|
|
15
21
|
error?: boolean;
|
|
16
22
|
disabled?: boolean;
|
|
17
23
|
className?: string;
|
|
@@ -72,4 +78,4 @@ export interface DatePickerProps extends DatePickerBaseProps {
|
|
|
72
78
|
showFooter?: boolean;
|
|
73
79
|
onChange?: (value: Date | null) => void;
|
|
74
80
|
}
|
|
75
|
-
export declare const DatePicker: ({ width, error, disabled, className, placeholder, displayTimeFormat, value, disabledDays, showRemoveButton, showTodayButton, showTimePicker, showFooter, zIndex, displayMode, onChange, opened: openProp, onOpen, onClose, }: DatePickerProps) => JSX.Element;
|
|
81
|
+
export declare const DatePicker: ({ width, error, disabled, className, placeholder, size, displayTimeFormat, value, disabledDays, showRemoveButton, showTodayButton, showTimePicker, showFooter, zIndex, displayMode, onChange, opened: openProp, onOpen, onClose, }: DatePickerProps) => JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { DatePicker } from './DatePicker';
|
|
4
|
+
declare const _default: ComponentMeta<({ width, error, disabled, className, placeholder, size, displayTimeFormat, value, disabledDays, showRemoveButton, showTodayButton, showTimePicker, showFooter, zIndex, displayMode, onChange, opened: openProp, onOpen, onClose, }: import("./DatePicker").DatePickerProps) => JSX.Element>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Base: any;
|
|
6
7
|
export declare const Disabled: any;
|
|
7
8
|
export declare const Error: any;
|
|
9
|
+
export declare const Size: ComponentStory<typeof DatePicker>;
|
|
8
10
|
export declare const ShowRemoveButton: any;
|
|
9
11
|
export declare const ShowFooter: any;
|
|
10
12
|
export declare const ShowTodayButton: any;
|
|
@@ -44,4 +44,4 @@ export interface DateRangePickerProps extends DatePickerBaseProps {
|
|
|
44
44
|
numberOfMonths?: number;
|
|
45
45
|
onChange?: (start: Dates['from'], end: Dates['to']) => void;
|
|
46
46
|
}
|
|
47
|
-
export declare const DateRangePicker: ({ width, error, disabled, className, showDatePreset, showRadioGroupDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths: numberOfMonthsProps, showRemoveButton, opened: openProp, customDatePreset, displayMode, onOpen, onClose, onChange, }: DateRangePickerProps) => JSX.Element;
|
|
47
|
+
export declare const DateRangePicker: ({ width, error, disabled, className, size, showDatePreset, showRadioGroupDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths: numberOfMonthsProps, showRemoveButton, opened: openProp, customDatePreset, displayMode, onOpen, onClose, onChange, }: DateRangePickerProps) => JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { DateRangePicker } from './DateRangePicker';
|
|
4
|
+
declare const _default: ComponentMeta<({ width, error, disabled, className, size, showDatePreset, showRadioGroupDatePreset, dates, maxDate, minDate, maxRange, numberOfMonths: numberOfMonthsProps, showRemoveButton, opened: openProp, customDatePreset, displayMode, onOpen, onClose, onChange, }: import("./DateRangePicker").DateRangePickerProps) => JSX.Element>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Base: any;
|
|
6
7
|
export declare const Disabled: any;
|
|
7
8
|
export declare const Error: any;
|
|
9
|
+
export declare const Size: ComponentStory<typeof DateRangePicker>;
|
|
8
10
|
export declare const ShowRemoveButton: any;
|
|
9
11
|
export declare const NumberOfMonths: any;
|
|
10
12
|
export declare const MinDate: any;
|
|
@@ -3,7 +3,7 @@ export declare const popover_picker_css: import("@emotion/utils").SerializedStyl
|
|
|
3
3
|
export declare const bottom_sheet_picker_css: import("@emotion/utils").SerializedStyles;
|
|
4
4
|
export declare const caption_button_css: import("@emotion/utils").SerializedStyles;
|
|
5
5
|
export declare const range_input_default_style: {
|
|
6
|
-
border:
|
|
6
|
+
border: number;
|
|
7
7
|
borderRadius: number;
|
|
8
8
|
backgroundColor: string;
|
|
9
9
|
padding: number;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { DropdownLabelProps } from './DropdownLabel';
|
|
2
3
|
import { CSSValueWithLength } from '../../styles';
|
|
4
|
+
import { InputSize } from '../input/types';
|
|
3
5
|
export interface DropdownOption<OptionValue> {
|
|
4
6
|
label: ReactNode;
|
|
5
7
|
value: OptionValue;
|
|
@@ -21,9 +23,12 @@ export interface DropdownProps<OptionValue> {
|
|
|
21
23
|
* @default 1030
|
|
22
24
|
*/
|
|
23
25
|
zIndex?: number;
|
|
26
|
+
/** @default large */
|
|
27
|
+
size?: InputSize;
|
|
24
28
|
disabled?: boolean;
|
|
25
29
|
options: Array<DropdownOption<OptionValue>>;
|
|
26
30
|
placeholder?: string;
|
|
31
|
+
status?: DropdownLabelProps['status'];
|
|
27
32
|
value?: OptionValue;
|
|
28
33
|
/**
|
|
29
34
|
* floating 요소가 reference 영역을 넘어갈 경우 자동 위치 처리 사용 유무
|
|
@@ -34,4 +39,4 @@ export interface DropdownProps<OptionValue> {
|
|
|
34
39
|
keyExtractor?: (item: DropdownOption<OptionValue>, index: number) => string | number;
|
|
35
40
|
onChange?: (value: OptionValue) => void;
|
|
36
41
|
}
|
|
37
|
-
export declare const Dropdown: <OptionValue extends string | number>({ className, width, maxHeight, zIndex, disabled, options, placeholder, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: DropdownProps<OptionValue>) => JSX.Element;
|
|
42
|
+
export declare const Dropdown: <OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: DropdownProps<OptionValue>) => JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { Dropdown } from './Dropdown';
|
|
4
|
-
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, maxHeight, zIndex, disabled, options, placeholder, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: import("./Dropdown").DropdownProps<OptionValue>) => JSX.Element)>;
|
|
4
|
+
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: import("./Dropdown").DropdownProps<OptionValue>) => JSX.Element)>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
|
+
export declare const Error: any;
|
|
8
|
+
export declare const WithFormHelperText: ComponentStory<typeof Dropdown>;
|
|
9
|
+
export declare const Size: ComponentStory<typeof Dropdown>;
|
|
7
10
|
export declare const Disabled: any;
|
|
8
11
|
export declare const DisabledOptionItem: any;
|
|
9
12
|
export declare const CustomMaxHeight: any;
|
|
@@ -14,4 +14,4 @@ export interface DropdownInputProps<OptionValue> extends Omit<DropdownProps<Opti
|
|
|
14
14
|
options: Array<DropdownInputOption<OptionValue>>;
|
|
15
15
|
keyExtractor?: (item: DropdownInputOption<OptionValue>, index: number) => string | number;
|
|
16
16
|
}
|
|
17
|
-
export declare const DropdownInput: <OptionValue extends string | number>({ className, width, zIndex, disabled, options, placeholder, value, keyExtractor, onSearch, onChange, }: DropdownInputProps<OptionValue>) => JSX.Element;
|
|
17
|
+
export declare const DropdownInput: <OptionValue extends string | number>({ className, width, zIndex, disabled, options, placeholder, status, value, size: sizeProp, keyExtractor, onSearch, onChange, }: DropdownInputProps<OptionValue>) => JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { DropdownInput } from './DropdownInput';
|
|
4
|
-
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, zIndex, disabled, options, placeholder, value, keyExtractor, onSearch, onChange, }: import("./DropdownInput").DropdownInputProps<OptionValue>) => JSX.Element)>;
|
|
4
|
+
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, zIndex, disabled, options, placeholder, status, value, size: sizeProp, keyExtractor, onSearch, onChange, }: import("./DropdownInput").DropdownInputProps<OptionValue>) => JSX.Element)>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
|
+
export declare const Error: any;
|
|
8
|
+
export declare const WithFormHelperText: ComponentStory<typeof DropdownInput>;
|
|
9
|
+
export declare const Size: ComponentStory<typeof DropdownInput>;
|
|
7
10
|
export declare const Disabled: any;
|
|
8
11
|
export declare const Controlled: ComponentStory<typeof DropdownInput>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { LiHTMLAttributes } from 'react';
|
|
2
|
+
import { InputSize } from '../input/types';
|
|
2
3
|
export interface DropdownItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
3
4
|
disabled?: boolean;
|
|
4
5
|
/**
|
|
@@ -11,5 +12,6 @@ export interface DropdownItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
|
11
12
|
* Option focus 여부
|
|
12
13
|
*/
|
|
13
14
|
focused?: boolean;
|
|
15
|
+
size?: InputSize;
|
|
14
16
|
}
|
|
15
17
|
export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { AllHTMLAttributes } from 'react';
|
|
2
2
|
import { CSSValueWithLength } from '../../styles';
|
|
3
|
-
|
|
3
|
+
import { InputSize, InputStatus } from '../input/types';
|
|
4
|
+
export interface DropdownLabelProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'size'> {
|
|
4
5
|
width?: CSSValueWithLength;
|
|
6
|
+
status?: Extract<InputStatus, 'error'>;
|
|
5
7
|
disabled?: boolean;
|
|
6
8
|
/**
|
|
7
9
|
* @default false
|
|
@@ -13,5 +15,6 @@ export interface DropdownLabelProps extends AllHTMLAttributes<HTMLDivElement> {
|
|
|
13
15
|
* Option 선택 여부
|
|
14
16
|
*/
|
|
15
17
|
selected?: boolean;
|
|
18
|
+
size?: InputSize;
|
|
16
19
|
}
|
|
17
20
|
export declare const DropdownLabel: React.ForwardRefExoticComponent<DropdownLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { InputAffixProps } from './InputAffix';
|
|
3
3
|
import { InputBaseProps } from './InputBase';
|
|
4
4
|
export type InputProps = InputBaseProps & InputAffixProps;
|
|
5
|
-
export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width"> & import("./InputBase").InputBaseType & InputAffixProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width" | "size"> & import("./InputBase").InputBaseType & InputAffixProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width"> & import("./InputBase").InputBaseType & import("./InputAffix").InputAffixProps & React.RefAttributes<HTMLInputElement>>>;
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width" | "size"> & import("./InputBase").InputBaseType & import("./InputAffix").InputAffixProps & React.RefAttributes<HTMLInputElement>>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Error: any;
|
|
7
7
|
export declare const Success: any;
|
|
8
|
+
export declare const Size: () => JSX.Element;
|
|
8
9
|
export declare const Disabled: any;
|
|
9
10
|
export declare const EnteredDisabled: any;
|
|
10
11
|
export declare const RightAlignment: any;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { AllHTMLAttributes } from 'react';
|
|
2
|
-
import { InputStatus } from './types';
|
|
3
|
-
export interface
|
|
2
|
+
import { InputSize, InputStatus } from './types';
|
|
3
|
+
export interface InputAddonOwnProps {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
status?: InputStatus;
|
|
6
6
|
/** @default left */
|
|
7
7
|
position: 'left' | 'right';
|
|
8
|
+
/** @default large */
|
|
9
|
+
size?: InputSize;
|
|
8
10
|
}
|
|
9
|
-
export
|
|
11
|
+
export type InputAddonProps = InputAddonOwnProps & Omit<AllHTMLAttributes<HTMLDivElement>, 'size'>;
|
|
12
|
+
export declare const InputAddon: React.ForwardRefExoticComponent<InputAddonOwnProps & Omit<React.AllHTMLAttributes<HTMLDivElement>, "size"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { InputAddonOwnProps } from './InputAddon';
|
|
3
3
|
import { CSSValueWithLength } from '../../styles';
|
|
4
|
-
export interface InputAffixProps {
|
|
4
|
+
export interface InputAffixProps extends Omit<InputAddonOwnProps, 'position'> {
|
|
5
5
|
className?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
status?: InputStatus;
|
|
8
6
|
width?: CSSValueWithLength;
|
|
9
7
|
/** Input 좌측에 렌더링될 Addon 요소 */
|
|
10
8
|
prefix?: string;
|
|
11
9
|
/** Input 우측에 렌더링될 Addon 요소 */
|
|
12
10
|
suffix?: string;
|
|
13
11
|
}
|
|
14
|
-
export declare const InputAffix: ({ className,
|
|
12
|
+
export declare const InputAffix: ({ className, children, prefix, suffix, width, disabled, status, size, }: PropsWithChildren<InputAffixProps>) => JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { InputAffixProps } from './InputAffix';
|
|
3
|
-
import { InputAlignment, InputStatus } from './types';
|
|
3
|
+
import { InputAlignment, InputSize, InputStatus } from './types';
|
|
4
4
|
import { IconProps } from '../icons/generated';
|
|
5
5
|
import { CSSValueWithLength } from '../../styles';
|
|
6
6
|
export interface InputBaseType {
|
|
7
|
+
/** @default large */
|
|
8
|
+
size?: InputSize;
|
|
7
9
|
alignment?: InputAlignment;
|
|
8
10
|
/** @default info */
|
|
9
11
|
status?: InputStatus;
|
|
@@ -22,6 +24,6 @@ export interface InputBaseType {
|
|
|
22
24
|
*/
|
|
23
25
|
showCounter?: boolean;
|
|
24
26
|
}
|
|
25
|
-
export type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width'> & InputBaseType;
|
|
27
|
+
export type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width' | 'size'> & InputBaseType;
|
|
26
28
|
export declare const controlledInputValue: (value: any) => string;
|
|
27
|
-
export declare const InputBase: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width"> & InputBaseType & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
export declare const InputBase: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width" | "size"> & InputBaseType & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -9,5 +9,5 @@ export interface NumericInputBaseType extends Omit<InputBaseType, 'showCounter'>
|
|
|
9
9
|
decimalScale?: number;
|
|
10
10
|
onChange?: (value: number, event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
}
|
|
12
|
-
export type NumericInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'width'> & NumericInputBaseType;
|
|
13
|
-
export declare const NumericInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export type NumericInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'width' | 'size'> & NumericInputBaseType;
|
|
13
|
+
export declare const NumericInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "size" | "onChange"> & NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { NumericInput } from './NumericInput';
|
|
4
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & import("./NumericInput").NumericInputBaseType & React.RefAttributes<HTMLInputElement>>>;
|
|
4
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "size" | "onChange"> & import("./NumericInput").NumericInputBaseType & React.RefAttributes<HTMLInputElement>>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const Addon: any;
|
|
8
8
|
export declare const Width: any;
|
|
9
9
|
export declare const AddonWithWidth: any;
|
|
10
10
|
export declare const Error: any;
|
|
11
|
+
export declare const Size: () => JSX.Element;
|
|
11
12
|
export declare const Disabled: any;
|
|
12
13
|
export declare const WhetherNegativeNumbersAreAllowed: any;
|
|
13
14
|
export declare const DecimalScale: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputStatus } from './types';
|
|
1
|
+
import { InputSize, InputStatus } from './types';
|
|
2
2
|
export declare const input_status_color_css: Record<InputStatus, string>;
|
|
3
3
|
export declare const input_wrapper_base_css: import("@emotion/utils").SerializedStyles;
|
|
4
4
|
export declare const input_base_css: import("@emotion/utils").SerializedStyles;
|
|
@@ -31,3 +31,7 @@ export declare const input_disabled_style: {
|
|
|
31
31
|
border: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
export declare const getInputPaddingBySize: (size: InputSize) => string;
|
|
35
|
+
export declare const getInputSpacingBySize: (size: InputSize) => 4 | 8;
|
|
36
|
+
export declare const getInputHeightBySize: (size: InputSize) => number;
|
|
37
|
+
export declare const getInputSizeStyle: (size?: InputSize) => import("@emotion/utils").SerializedStyles;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CSSValueWithLength } from '../../styles';
|
|
3
|
+
import { InputSize } from '../input/types';
|
|
3
4
|
export interface TimePickerProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
/**
|
|
@@ -20,6 +21,8 @@ export interface TimePickerProps {
|
|
|
20
21
|
* @default false
|
|
21
22
|
*/
|
|
22
23
|
fill?: boolean;
|
|
24
|
+
/** @default large */
|
|
25
|
+
size?: InputSize;
|
|
23
26
|
value?: Date;
|
|
24
27
|
onClose?: () => void;
|
|
25
28
|
onOpen?: () => void;
|
|
@@ -37,4 +40,4 @@ export interface TimePickerProps {
|
|
|
37
40
|
*/
|
|
38
41
|
showRemoveButton?: boolean;
|
|
39
42
|
}
|
|
40
|
-
export declare const TimePicker: ({ disabled, value, error, width, fill, zIndex, className, onOpen, onClose, onChange, incrementMinute, showRemoveButton, }: TimePickerProps) => JSX.Element;
|
|
43
|
+
export declare const TimePicker: ({ disabled, size, value, error, width, fill, zIndex, className, onOpen, onClose, onChange, incrementMinute, showRemoveButton, }: TimePickerProps) => JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { TimePicker } from './TimePicker';
|
|
4
|
+
declare const _default: ComponentMeta<({ disabled, size, value, error, width, fill, zIndex, className, onOpen, onClose, onChange, incrementMinute, showRemoveButton, }: import("./TimePicker").TimePickerProps) => JSX.Element>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Base: any;
|
|
6
7
|
export declare const Disabled: any;
|
|
7
8
|
export declare const Error: any;
|
|
9
|
+
export declare const Size: ComponentStory<typeof TimePicker>;
|
|
8
10
|
export declare const ShowRemoveButton: any;
|
|
9
11
|
export declare const IncrementMinute: any;
|
|
10
12
|
export declare const FullWidth: any;
|
|
@@ -11,5 +11,5 @@ export interface TimeRangePickerProps extends Omit<TimePickerProps, 'value' | 'o
|
|
|
11
11
|
value?: TimeRange;
|
|
12
12
|
onChange?: (start: TimeRange['from'], end: TimeRange['to']) => void;
|
|
13
13
|
}
|
|
14
|
-
export declare const TimeRangePicker: ({ disabled, value, error, width, className, zIndex, onOpen, onClose, onChange, incrementMinute, fill, showRemoveButton, }: TimeRangePickerProps) => JSX.Element;
|
|
14
|
+
export declare const TimeRangePicker: ({ disabled, size, value, error, width, className, zIndex, onOpen, onClose, onChange, incrementMinute, fill, showRemoveButton, }: TimeRangePickerProps) => JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
3
|
-
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { TimeRangePicker } from './TimeRangePicker';
|
|
4
|
+
declare const _default: ComponentMeta<({ disabled, size, value, error, width, className, zIndex, onOpen, onClose, onChange, incrementMinute, fill, showRemoveButton, }: import("./TimeRangePicker").TimeRangePickerProps) => JSX.Element>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Base: any;
|
|
6
7
|
export declare const Disabled: any;
|
|
7
8
|
export declare const Error: any;
|
|
9
|
+
export declare const Size: ComponentStory<typeof TimeRangePicker>;
|
|
8
10
|
export declare const ShowRemoveButton: any;
|
|
9
11
|
export declare const IncrementMinute: any;
|
|
10
12
|
export declare const FullWidth: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ComponentType } from 'react';
|
|
2
|
+
import { IconProps } from '../../components';
|
|
3
|
+
export type StateKind = 'warning';
|
|
4
|
+
export interface StateProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
kind?: StateKind;
|
|
6
|
+
text?: string;
|
|
7
|
+
subtext?: string;
|
|
8
|
+
icon?: ComponentType<IconProps>;
|
|
9
|
+
}
|
|
10
|
+
export declare const State: ({ kind, text, subtext, icon, className, ...props }: StateProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<({ kind, text, subtext, icon, className, ...props }: import("./State").StateProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const WarningKind: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './State';
|