@croquiscom/pds 0.37.1 → 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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 49ea915: Pagination 컴포넌트 추가
8
+
3
9
  ## 0.37.1
4
10
 
5
11
  ### Patch Changes
@@ -24,3 +24,4 @@ export * from './banner';
24
24
  export * from './tabs';
25
25
  export * from './date-picker';
26
26
  export * from './time-picker';
27
+ export * from './pagination';
@@ -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
+ };