@croquiscom/pds 0.3.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 CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 0.3.0
4
12
 
5
13
  ### 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';
package/dist/index.d.ts CHANGED
@@ -4,11 +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';
14
15
  export * from './form';