@croquiscom/pds 0.2.0 → 0.4.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 +16 -0
- package/dist/button/Button.stories.d.ts +2 -4
- package/dist/checkbox/Checkbox.d.ts +7 -0
- package/dist/checkbox/Checkbox.stories.d.ts +8 -0
- package/dist/checkbox/CheckboxGroup.d.ts +26 -0
- package/dist/checkbox/CheckboxGroup.stories.d.ts +9 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/form/FormHelperText.d.ts +14 -0
- package/dist/form/FormHelperText.stories.d.ts +12 -0
- package/dist/form/FormLabel.d.ts +10 -0
- package/dist/form/FormLabel.stories.d.ts +11 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/styles.d.ts +3 -0
- package/dist/index.d.ts +3 -1
- 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/dist/input/Input.stories.d.ts +2 -5
- package/dist/input/NumericInput.stories.d.ts +2 -4
- package/dist/radio/Radio.d.ts +5 -0
- package/dist/radio/Radio.stories.d.ts +2 -4
- package/dist/radio/RadioGroup.d.ts +8 -1
- package/dist/radio/RadioGroup.stories.d.ts +5 -6
- package/dist/radio/styles.d.ts +12 -0
- package/dist/stack/HStack.stories.d.ts +5 -7
- package/dist/stack/VStack.stories.d.ts +5 -7
- package/dist/switch/Switch.d.ts +21 -0
- package/dist/switch/Switch.stories.d.ts +5 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/styles.d.ts +4 -0
- package/dist/text/BaseText.stories.d.ts +2 -5
- package/dist/textarea/Textarea.stories.d.ts +2 -5
- package/dist/utils/shared.d.ts +3 -0
- package/package.json +1 -1
- package/dist/toggle-switch/ToggleSwitch.d.ts +0 -22
- package/dist/toggle-switch/ToggleSwitch.stories.d.ts +0 -8
- package/dist/toggle-switch/index.d.ts +0 -1
- package/dist/toggle-switch/styles.d.ts +0 -4
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default:
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Input").InputProps & React.RefAttributes<HTMLInputElement>>>;
|
|
7
4
|
export default _default;
|
|
8
5
|
export declare const Base: any;
|
|
9
6
|
export declare const Error: any;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
2
3
|
import { NumericInputProps } from './NumericInput';
|
|
3
|
-
declare const _default:
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & import("./NumericInput").NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
-
};
|
|
4
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & import("./NumericInput").NumericInputBaseType & React.RefAttributes<HTMLInputElement>>>;
|
|
7
5
|
export default _default;
|
|
8
6
|
export declare const Base: any;
|
|
9
7
|
export declare const Addon: any;
|
package/dist/radio/Radio.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { RadioItemType } from './RadioGroup';
|
|
2
3
|
export interface RadioProps extends Exclude<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
4
|
/**
|
|
4
5
|
* @default false
|
|
5
6
|
*/
|
|
6
7
|
fill?: boolean;
|
|
7
8
|
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default default
|
|
11
|
+
*/
|
|
12
|
+
radioItemType?: RadioItemType;
|
|
8
13
|
}
|
|
9
14
|
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./Radio").RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Radio").RadioProps & React.RefAttributes<HTMLInputElement>>>;
|
|
6
4
|
export default _default;
|
|
7
5
|
export declare const Base: any;
|
|
8
6
|
export declare const Checked: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type AlignType = 'horizontal' | 'vertical';
|
|
2
|
+
export declare type AlignType = 'horizontal' | 'vertical';
|
|
3
|
+
export declare type RadioItemType = 'default' | 'box';
|
|
3
4
|
interface RadioItem<RadioValue> {
|
|
4
5
|
label: React.ReactNode;
|
|
5
6
|
value: RadioValue;
|
|
@@ -11,9 +12,15 @@ export interface RadioGroupProps<RadioValue> {
|
|
|
11
12
|
value?: RadioValue;
|
|
12
13
|
name?: string;
|
|
13
14
|
items: RadioItem<RadioValue>[];
|
|
15
|
+
/**
|
|
16
|
+
* @default 24
|
|
17
|
+
* radioItmType - 'box': spacing 속성 미적용
|
|
18
|
+
*/
|
|
14
19
|
spacing?: number;
|
|
15
20
|
disabled?: boolean;
|
|
16
21
|
align?: AlignType;
|
|
22
|
+
radioItemType?: RadioItemType;
|
|
23
|
+
keyExtractor?: (item: RadioItem<RadioValue>, index: number) => string | number;
|
|
17
24
|
onChange?: (value: RadioValue) => void;
|
|
18
25
|
}
|
|
19
26
|
export interface RadioGroupInstance<RadioValue> {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<(<RadioValue>(props: import("./RadioGroup").RadioGroupProps<RadioValue> & {
|
|
4
|
+
ref?: React.Ref<import("./RadioGroup").RadioGroupInstance<RadioValue>>;
|
|
5
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>)>;
|
|
8
6
|
export default _default;
|
|
9
7
|
export declare const Base: any;
|
|
10
8
|
export declare const Spacing: any;
|
|
11
9
|
export declare const Disabled: any;
|
|
12
10
|
export declare const VerticalAlign: any;
|
|
13
11
|
export declare const Controlled: () => JSX.Element;
|
|
12
|
+
export declare const BoxRadio: () => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RadioItemType, AlignType } from './RadioGroup';
|
|
2
|
+
export declare const getRadioGroupStyleByProps: ({ radio_item_type, align, spacing, }: {
|
|
3
|
+
radio_item_type?: RadioItemType;
|
|
4
|
+
align?: AlignType;
|
|
5
|
+
spacing?: Number;
|
|
6
|
+
}) => import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare const getRadioStyleByProps: ({ radio_item_type, fill, disabled, checked, }: {
|
|
8
|
+
radio_item_type?: RadioItemType;
|
|
9
|
+
fill?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
}) => import("@emotion/utils").SerializedStyles;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} & import("./HStack").HStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType<any>;
|
|
6
|
+
} & import("./HStack").HStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>>;
|
|
9
7
|
export default _default;
|
|
10
8
|
export declare const Base: any;
|
|
11
9
|
export declare const Spacing: any;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} & import("./VStack").VStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType<any>;
|
|
6
|
+
} & import("./VStack").VStackProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>>;
|
|
9
7
|
export default _default;
|
|
10
8
|
export declare const Base: any;
|
|
11
9
|
export declare const Spacing: any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export declare type SwitchSize = 'small' | 'large';
|
|
3
|
+
export interface SwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/**
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
isOn?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @default small
|
|
10
|
+
*/
|
|
11
|
+
size?: SwitchSize;
|
|
12
|
+
/**
|
|
13
|
+
* @default ON
|
|
14
|
+
*/
|
|
15
|
+
onText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @default OFF
|
|
18
|
+
*/
|
|
19
|
+
offText?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Switch").SwitchProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Base: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SwitchSize } from './Switch';
|
|
2
|
+
export declare const switch_base_css: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const getStylesByActive: (isOn: boolean) => import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const getStyleByProps: (size: SwitchSize, isOn: boolean) => import("@emotion/utils").SerializedStyles;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default:
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.FC<BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)>;
|
|
6
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FC<import("./BaseText").BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)>>;
|
|
7
4
|
export default _default;
|
|
8
5
|
export declare const Base: any;
|
|
9
6
|
export declare const Alignment: any;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default:
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
6
|
-
};
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Textarea").TextareaProps & React.RefAttributes<HTMLTextAreaElement>>>;
|
|
7
4
|
export default _default;
|
|
8
5
|
export declare const Base: any;
|
|
9
6
|
export declare const Error: any;
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
export declare type ToggleSwitchSize = 'small' | 'large';
|
|
3
|
-
export interface ToggleSwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
/**
|
|
5
|
-
* @default true
|
|
6
|
-
*/
|
|
7
|
-
isOn?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* @default small
|
|
10
|
-
*/
|
|
11
|
-
size?: ToggleSwitchSize;
|
|
12
|
-
/**
|
|
13
|
-
* @default ON
|
|
14
|
-
*/
|
|
15
|
-
onText?: string;
|
|
16
|
-
/**
|
|
17
|
-
* @default OFF
|
|
18
|
-
*/
|
|
19
|
-
offText?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
-
export default ToggleSwitch;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ToggleSwitchProps } from './ToggleSwitch';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const Base: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToggleSwitch';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ToggleSwitchSize } from './ToggleSwitch';
|
|
2
|
-
export declare const toggle_switch_base_css: import("@emotion/utils").SerializedStyles;
|
|
3
|
-
export declare const getStylesByActive: (isOn: boolean) => import("@emotion/utils").SerializedStyles;
|
|
4
|
-
export declare const getStyleByProps: (size: ToggleSwitchSize, isOn: boolean) => import("@emotion/utils").SerializedStyles;
|