@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.
Files changed (39) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/button/Button.stories.d.ts +2 -4
  3. package/dist/checkbox/Checkbox.d.ts +7 -0
  4. package/dist/checkbox/Checkbox.stories.d.ts +8 -0
  5. package/dist/checkbox/CheckboxGroup.d.ts +26 -0
  6. package/dist/checkbox/CheckboxGroup.stories.d.ts +9 -0
  7. package/dist/checkbox/index.d.ts +2 -0
  8. package/dist/form/FormHelperText.d.ts +14 -0
  9. package/dist/form/FormHelperText.stories.d.ts +12 -0
  10. package/dist/form/FormLabel.d.ts +10 -0
  11. package/dist/form/FormLabel.stories.d.ts +11 -0
  12. package/dist/form/index.d.ts +2 -0
  13. package/dist/form/styles.d.ts +3 -0
  14. package/dist/index.d.ts +3 -1
  15. package/dist/index.es.js +2 -2
  16. package/dist/index.es.js.map +1 -1
  17. package/dist/index.js +2 -2
  18. package/dist/index.js.map +1 -1
  19. package/dist/input/Input.stories.d.ts +2 -5
  20. package/dist/input/NumericInput.stories.d.ts +2 -4
  21. package/dist/radio/Radio.d.ts +5 -0
  22. package/dist/radio/Radio.stories.d.ts +2 -4
  23. package/dist/radio/RadioGroup.d.ts +8 -1
  24. package/dist/radio/RadioGroup.stories.d.ts +5 -6
  25. package/dist/radio/styles.d.ts +12 -0
  26. package/dist/stack/HStack.stories.d.ts +5 -7
  27. package/dist/stack/VStack.stories.d.ts +5 -7
  28. package/dist/switch/Switch.d.ts +21 -0
  29. package/dist/switch/Switch.stories.d.ts +5 -0
  30. package/dist/switch/index.d.ts +1 -0
  31. package/dist/switch/styles.d.ts +4 -0
  32. package/dist/text/BaseText.stories.d.ts +2 -5
  33. package/dist/textarea/Textarea.stories.d.ts +2 -5
  34. package/dist/utils/shared.d.ts +3 -0
  35. package/package.json +1 -1
  36. package/dist/toggle-switch/ToggleSwitch.d.ts +0 -22
  37. package/dist/toggle-switch/ToggleSwitch.stories.d.ts +0 -8
  38. package/dist/toggle-switch/index.d.ts +0 -1
  39. package/dist/toggle-switch/styles.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2f44078: Control 그룹 컴포넌트 추가
8
+
9
+ - Checkbox, Radio, Switch, CheckboxGroup, BoxRadio
10
+
11
+ ## 0.3.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 7135945: formLabel, formHelperText 컴포넌트 추가
16
+
17
+ - formControl 적용전 미니멈 기능만 제공
18
+
3
19
  ## 0.2.0
4
20
 
5
21
  ### Minor Changes
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: React.ForwardRefExoticComponent<import("./Button").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
5
- };
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Button").ButtonProps & React.RefAttributes<HTMLButtonElement>>>;
6
4
  export default _default;
7
5
  export declare const Brand: any;
8
6
  export declare const Primary: any;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ checked?: boolean;
4
+ disabled?: boolean;
5
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
6
+ }
7
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./Checkbox").CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
4
+ export default _default;
5
+ export declare const Default: any;
6
+ export declare const Checked: any;
7
+ export declare const Disabled: any;
8
+ export declare const CheckedDisabled: any;
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { AlignType } from '../radio';
3
+ interface CheckboxItem<CheckboxValue> {
4
+ label: ReactNode;
5
+ value: CheckboxValue;
6
+ disabled?: boolean;
7
+ }
8
+ export interface CheckboxGroupProps<CheckboxValue> {
9
+ className?: string;
10
+ defaultValue?: CheckboxValue[];
11
+ value?: CheckboxValue[];
12
+ disabled?: boolean;
13
+ name?: string;
14
+ /** @default 24 */
15
+ spacing?: number;
16
+ items: CheckboxItem<CheckboxValue>[];
17
+ align?: AlignType;
18
+ keyExtractor?: (item: CheckboxItem<CheckboxValue>, index: number) => string | number;
19
+ onChange?: (value: CheckboxValue[]) => void;
20
+ }
21
+ export interface CheckboxGroupInstance<CheckboxValue> {
22
+ value?: CheckboxValue[];
23
+ focus: () => void;
24
+ }
25
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps<string | number | boolean> & React.RefAttributes<CheckboxGroupInstance<string | number | boolean>>>;
26
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./CheckboxGroup").CheckboxGroupProps<string | number | boolean> & React.RefAttributes<import("./CheckboxGroup").CheckboxGroupInstance<string | number | boolean>>>>;
4
+ export default _default;
5
+ export declare const Base: any;
6
+ export declare const Spacing: any;
7
+ export declare const Disabled: any;
8
+ export declare const VerticalAlign: any;
9
+ export declare const Controlled: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Checkbox';
2
+ export * from './CheckboxGroup';
@@ -0,0 +1,14 @@
1
+ /// <reference types="@emotion/react/types/css-prop" />
2
+ import React from 'react';
3
+ export declare type FormHelperTextVariant = 'info' | 'confirm' | 'error';
4
+ declare type FormHelperTextElement = keyof Pick<JSX.IntrinsicElements, 'div' | 'p' | 'span'>;
5
+ export interface FormHelperTextProps extends React.Attributes {
6
+ /**
7
+ * @default span
8
+ */
9
+ as?: FormHelperTextElement;
10
+ /** @default info */
11
+ variant?: FormHelperTextVariant;
12
+ }
13
+ export declare const FormHelperText: React.FC<FormHelperTextProps & JSX.IntrinsicElements[FormHelperTextProps['as']]>;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { FormHelperTextProps } from './FormHelperText';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.FC<FormHelperTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)>;
6
+ };
7
+ export default _default;
8
+ export declare const Base: any;
9
+ export declare const Confirm: any;
10
+ export declare const Error: any;
11
+ export declare const WithInput: () => JSX.Element;
12
+ export declare const WithButton: () => JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React, { ReactNode, LabelHTMLAttributes } from 'react';
2
+ export interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
3
+ /** @default false */
4
+ required?: boolean;
5
+ /** help 팝오버 요소 TODO(sally): popover 개발시 외부 ReactNode 주입 제거 및 타입 제한 */
6
+ helper?: ReactNode;
7
+ /** 라벨 우측 렌더링될 Addon 요소 */
8
+ rightAddon?: ReactNode;
9
+ }
10
+ export declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps & React.RefAttributes<HTMLLabelElement>>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { FormLabelProps } from './FormLabel';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<FormLabelProps & React.RefAttributes<HTMLLabelElement>>;
6
+ };
7
+ export default _default;
8
+ export declare const Base: any;
9
+ export declare const Required: any;
10
+ export declare const Help: any;
11
+ export declare const HelpWithRequired: any;
@@ -0,0 +1,2 @@
1
+ export * from './FormLabel';
2
+ export * from './FormHelperText';
@@ -0,0 +1,3 @@
1
+ import { FormHelperTextVariant } from './FormHelperText';
2
+ export declare const label_base_css: import("@emotion/utils").SerializedStyles;
3
+ export declare const getFormHelperTextVariant: (variant: FormHelperTextVariant) => import("@emotion/utils").SerializedStyles;
package/dist/index.d.ts CHANGED
@@ -4,10 +4,12 @@ export * from './global_style';
4
4
  export * from './icons/generated';
5
5
  export * from './images/generated';
6
6
  export * from './input';
7
+ export * from './checkbox';
7
8
  export * from './radio';
8
9
  export * from './stack';
9
10
  export * from './text';
10
11
  export * from './textarea';
11
12
  export * from './foundation';
12
- export * from './toggle-switch';
13
+ export * from './switch';
13
14
  export * from './divider';
15
+ export * from './form';