@croquiscom/pds 0.37.0 → 0.38.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 +12 -0
- package/dist/components/form/FormField.d.ts +3 -1
- package/dist/components/form/FormField.stories.d.ts +2 -1
- package/dist/components/form/FormLabel.d.ts +2 -0
- package/dist/components/form/FormLabel.stories.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pagination/Pagination.d.ts +20 -0
- package/dist/components/pagination/Pagination.stories.d.ts +10 -0
- package/dist/components/pagination/PaginationArrow.d.ts +14 -0
- package/dist/components/pagination/PaginationItem.d.ts +10 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/styles.d.ts +39 -0
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
2
2
|
import { HelpTextProps } from '../text';
|
|
3
|
+
import { CSSValueWithLength } from '../../styles';
|
|
3
4
|
export interface FormFieldProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
label?: string;
|
|
6
7
|
rightAddon?: ReactNode;
|
|
7
8
|
required?: boolean;
|
|
8
9
|
helper?: HelpTextProps;
|
|
10
|
+
labelWidth?: CSSValueWithLength;
|
|
9
11
|
}
|
|
10
|
-
export declare const FormField: ({ className, label, rightAddon, required, helper, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
|
|
12
|
+
export declare const FormField: ({ className, label, rightAddon, required, helper, labelWidth, children, }: PropsWithChildren<FormFieldProps>) => JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { FormField } from './FormField';
|
|
4
|
-
declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ className, label, rightAddon, required, helper, labelWidth, children, }: React.PropsWithChildren<import("./FormField").FormFieldProps>) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
|
+
export declare const LabelWith: any;
|
|
7
8
|
export declare const WithRadioGroup: ComponentStory<typeof FormField>;
|
|
8
9
|
export declare const WithCheckboxGroup: ComponentStory<typeof FormField>;
|
|
9
10
|
export declare const WithHelpPopover: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode, LabelHTMLAttributes } from 'react';
|
|
2
2
|
import { HelpTextProps } from '../text';
|
|
3
|
+
import { CSSValueWithLength } from '../../styles';
|
|
3
4
|
export interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
4
5
|
/** @default false */
|
|
5
6
|
required?: boolean;
|
|
@@ -7,5 +8,6 @@ export interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
|
7
8
|
helper?: HelpTextProps;
|
|
8
9
|
/** 라벨 우측 렌더링될 Addon 요소 */
|
|
9
10
|
rightAddon?: ReactNode;
|
|
11
|
+
width?: CSSValueWithLength;
|
|
10
12
|
}
|
|
11
13
|
export declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -4,5 +4,6 @@ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Base: any;
|
|
6
6
|
export declare const Required: any;
|
|
7
|
+
export declare const Width: any;
|
|
7
8
|
export declare const Help: any;
|
|
8
9
|
export declare const HelpWithRequired: any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface PaginationProps extends HTMLAttributes<HTMLUListElement> {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
totalPages: number;
|
|
5
|
+
currentPage: number;
|
|
6
|
+
/**
|
|
7
|
+
* @desc 현재페이지 기준 좌/우 표시할 페이지 버튼 갯수
|
|
8
|
+
* @default 4
|
|
9
|
+
*/
|
|
10
|
+
siblingCount?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @desc 맨처음/맨끝 표시할 페이지 버튼 갯수
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
boundaryCount?: number;
|
|
16
|
+
/** @default true */
|
|
17
|
+
showArrowButton?: boolean;
|
|
18
|
+
onChangePage?: (page: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const Pagination: ({ disabled, totalPages, currentPage, siblingCount, boundaryCount, showArrowButton, onChangePage, }: PaginationProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<({ disabled, totalPages, currentPage, siblingCount, boundaryCount, showArrowButton, onChangePage, }: import("./Pagination").PaginationProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Base: any;
|
|
6
|
+
export declare const Disabled: any;
|
|
7
|
+
export declare const HideArrowButton: any;
|
|
8
|
+
export declare const CustomSiblingCount: any;
|
|
9
|
+
export declare const CustomBoundaryCount: any;
|
|
10
|
+
export declare const MinWidthExample: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type PaginationArrowPosition = 'prev' | 'next';
|
|
3
|
+
export interface PaginationArrowProps {
|
|
4
|
+
/** @default prev */
|
|
5
|
+
position?: PaginationArrowPosition;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const PaginationArrow: ({ position, disabled, onClick }: {
|
|
10
|
+
position?: string;
|
|
11
|
+
disabled: any;
|
|
12
|
+
onClick: any;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { LiHTMLAttributes } from 'react';
|
|
2
|
+
export interface PaginationItemProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'onClick'> {
|
|
3
|
+
label?: string | number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
/** @default false */
|
|
7
|
+
isNumberOutOfRange?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Pagination';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const pagination_base_css: import("@emotion/utils").SerializedStyles;
|
|
2
|
+
export declare const pagination_item_css: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const pagination_button_css: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const pagination_button_default_style: {
|
|
5
|
+
color: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
'&:hover': {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
'&:active': {
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const pagination_button_disabled_style: {
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
color: string;
|
|
19
|
+
'&:hover, &:active': {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const pagination_button_selected_style: {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
color: string;
|
|
27
|
+
'&:hover, &:active': {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const pagination_button_selected_disabled_style: {
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
color: string;
|
|
35
|
+
'&:hover, &:active': {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
color: string;
|
|
38
|
+
};
|
|
39
|
+
};
|