Comparing version 1.0.17 to 1.0.18
182
lib/dd3.d.ts
/// <reference types="react" /> | ||
import * as React$1 from 'react'; | ||
import React__default, { MouseEventHandler, ReactNode, ReactElement, ChangeEvent, FocusEvent } from 'react'; | ||
import React$1, { ReactNode, ChangeEvent, FocusEvent, MouseEventHandler } from 'react'; | ||
import * as HIcons from '@heroicons/react/outline'; | ||
interface IButtonProps { | ||
interface IButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> { | ||
variant?: 'primary' | 'secondary' | 'tertiary' | 'outline' | 'link' | 'ghost' | 'cancel' | 'success' | 'outlineWhite' | 'outlineBlue'; | ||
@@ -10,4 +10,2 @@ size?: 'small' | 'medium' | 'large'; | ||
disabled?: boolean; | ||
onClick?: MouseEventHandler<HTMLButtonElement>; | ||
children?: ReactNode; | ||
isLoading?: boolean; | ||
@@ -18,3 +16,3 @@ className?: string; | ||
role?: string; | ||
loadingComponent?: ReactElement; | ||
loadingComponent?: React$1.ReactElement; | ||
} | ||
@@ -29,8 +27,6 @@ declare const Button: React$1.MemoExoticComponent<({ variant, size, onClick, children, isLoading, className, padding, paddingX, paddingY, loadingComponent, ...props }: IButtonProps) => JSX.Element>; | ||
interface CircleProps { | ||
children?: ReactNode; | ||
interface CircleProps extends React$1.HTMLProps<HTMLDivElement> { | ||
children?: React$1.ReactNode; | ||
backgroundColor?: string; | ||
onClick?: () => void; | ||
className?: string; | ||
onBlur?: () => void; | ||
width?: string; | ||
@@ -44,3 +40,3 @@ height?: string; | ||
interface IProps$3 { | ||
interface IProps$2 extends React$1.HTMLAttributes<HTMLDivElement> { | ||
type: 'error' | 'success'; | ||
@@ -52,3 +48,3 @@ title: string; | ||
} | ||
declare function FeedBackBox({ type, title, description, onClose, textClose }: IProps$3): JSX.Element; | ||
declare function FeedBackBox({ type, title, description, onClose, textClose, ...props }: IProps$2): JSX.Element; | ||
@@ -91,13 +87,4 @@ interface IInputProps { | ||
interface ITextAreaProps { | ||
value?: any; | ||
required?: boolean; | ||
name?: string; | ||
className?: string; | ||
disabled?: boolean; | ||
placeholder?: string; | ||
interface ITextAreaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> { | ||
maxlength?: number; | ||
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void; | ||
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void; | ||
onClick?: MouseEventHandler<HTMLTextAreaElement>; | ||
label?: string; | ||
@@ -108,7 +95,3 @@ classNameLabel?: string; | ||
interface ImageIconProps { | ||
src: string; | ||
className?: string; | ||
alt?: string; | ||
onClick?: (event: MouseEvent) => void; | ||
interface ImageIconProps extends React$1.ImgHTMLAttributes<HTMLImageElement> { | ||
button?: boolean; | ||
@@ -118,11 +101,7 @@ buttonOnClick?: (event: any) => void; | ||
} | ||
declare const ImageIcon: ({ src, className, alt, button, buttonOnClick, classNameButton }: ImageIconProps) => JSX.Element; | ||
declare const ImageIcon: ({ src, className, alt, button, buttonOnClick, classNameButton, ...props }: ImageIconProps) => JSX.Element; | ||
interface ImageProps { | ||
src: string; | ||
alt: string; | ||
className?: string; | ||
interface ImageProps extends React$1.HTMLProps<HTMLImageElement> { | ||
rounded?: 'sm' | 'lg' | 'md'; | ||
circle?: boolean; | ||
onClick?: (event: MouseEvent) => void; | ||
width?: number; | ||
@@ -133,19 +112,14 @@ height?: number; | ||
interface ContainerProps { | ||
children?: React__default.ReactNode; | ||
interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
children?: React$1.ReactNode; | ||
className?: string; | ||
shadow?: 'lg' | 'sm'; | ||
rounded?: 'lg' | 'sm'; | ||
onClick?: (event: React__default.ChangeEvent<any>) => void; | ||
} | ||
declare const Container: ({ children, className, shadow, rounded, ...props }: ContainerProps) => JSX.Element; | ||
interface FlexProps { | ||
className?: string; | ||
children?: React__default.ReactNode; | ||
} | ||
declare const Flex: ({ className, children, ...props }: FlexProps) => JSX.Element; | ||
declare const Flex: ({ className, children, ...props }: React$1.HTMLAttributes<HTMLDivElement>) => JSX.Element; | ||
interface RowProps { | ||
children?: React__default.ReactNode; | ||
interface RowProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
children?: React$1.ReactNode; | ||
className?: string; | ||
@@ -159,13 +133,8 @@ cols: 1 | 2 | 3 | 4; | ||
interface OrderProps { | ||
children: React__default.ReactNode; | ||
className?: string; | ||
interface OrderProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
order: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'first' | 'last' | 'none'; | ||
onClick?: (event: React__default.ChangeEvent<any>) => void; | ||
} | ||
declare const Order: ({ className, children, order, ...props }: OrderProps | any) => JSX.Element; | ||
declare const Order: ({ className, children, order, ...props }: OrderProps) => JSX.Element; | ||
interface OverFlowProps { | ||
children?: React__default.ReactNode; | ||
className?: string; | ||
interface OverFlowProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
overflow?: 'auto' | 'hidden' | 'visible' | 'x-auto' | 'x-hidden' | 'x-visible' | 'scroll' | 'y-auto' | 'y-hidden' | 'y-visible' | 'x-scroll' | 'y-scroll'; | ||
@@ -175,10 +144,2 @@ } | ||
interface Props$3 { | ||
children?: JSX.Element | JSX.Element[] | ReactNode; | ||
to?: string; | ||
className?: string; | ||
LinkComponent?: React__default.ComponentType<any>; | ||
} | ||
declare function Link({ children, to, className, LinkComponent }: Props$3): JSX.Element; | ||
interface Props$2 { | ||
@@ -203,4 +164,4 @@ logoUrl: string; | ||
} | ||
interface IProps$2 { | ||
LinkComponent?: React.ComponentType<any>; | ||
interface IProps$1 { | ||
LinkComponent?: React$1.ComponentType<any>; | ||
logo?: string | any; | ||
@@ -216,5 +177,5 @@ avatarUrl?: string; | ||
links: ILink[]; | ||
Collapse?: ReactNode; | ||
Collapse?: React$1.ReactNode; | ||
} | ||
declare const NavbarAuth: ({ LinkComponent, logo, logoHeight, logoWidth, avatarUrl, userName, nickname, bgColor, callToAction, callToActionName, links, Collapse }: IProps$2) => JSX.Element; | ||
declare const NavbarAuth: ({ LinkComponent, logo, logoHeight, logoWidth, avatarUrl, userName, nickname, bgColor, callToAction, callToActionName, links, Collapse }: IProps$1) => JSX.Element; | ||
@@ -228,3 +189,3 @@ interface Props { | ||
interface ProgressBarProps { | ||
interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement> { | ||
value?: number; | ||
@@ -237,12 +198,8 @@ max?: number; | ||
} | ||
declare const ProgressBar: ({ value, max, backgroundColor, className, label, animated, ...props }: ProgressBarProps) => JSX.Element; | ||
declare function ProgressBar({ value, max, backgroundColor, className, label, animated, ...props }: ProgressBarProps): JSX.Element; | ||
declare type SkeletonProps = { | ||
className?: string; | ||
style?: any; | ||
}; | ||
declare const Skeleton: ({ className, style }: SkeletonProps) => JSX.Element; | ||
declare const Skeleton: ({ className, style }: React.HTMLProps<HTMLDivElement>) => JSX.Element; | ||
interface SpinnerProps { | ||
color?: string; | ||
textColor?: string; | ||
className?: string; | ||
@@ -253,6 +210,5 @@ variant?: 'red' | 'green' | 'blue' | 'black' | 'yellow'; | ||
} | ||
declare const Spinner: ({ color, className, variant, type, pageLoader, ...props }: SpinnerProps) => JSX.Element; | ||
declare const LoaderSpinner: () => void; | ||
declare function Spinner({ textColor, className, variant, type, pageLoader, ...props }: SpinnerProps): JSX.Element; | ||
interface StepperProps { | ||
interface StepperProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
phase: number; | ||
@@ -267,4 +223,6 @@ totalPhases: number; | ||
text?: string; | ||
classNameContainer?: string; | ||
classNameCircularProgress?: string; | ||
} | ||
declare const Stepper: ({ phase, totalPhases, width, height, ...props }: StepperProps) => JSX.Element; | ||
declare function Stepper({ phase, totalPhases, width, height, ...props }: StepperProps): JSX.Element; | ||
@@ -294,3 +252,3 @@ interface IHeaderType { | ||
interface IProps$1 { | ||
interface IProps { | ||
heightColumn?: number; | ||
@@ -303,6 +261,6 @@ hasDetail?: boolean; | ||
} | ||
declare function GeneralTable({ heightColumn, hasDetail, list, Link, paginated, paramPagination }: IProps$1): JSX.Element; | ||
declare function GeneralTable({ heightColumn, hasDetail, list, Link, paginated, paramPagination }: IProps): JSX.Element; | ||
interface TextProps { | ||
children: React__default.ReactNode; | ||
children?: React$1.ReactNode; | ||
className?: string; | ||
@@ -321,3 +279,9 @@ variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'small' | 'label' | 'a'; | ||
interface IProps extends React.HTMLProps<HTMLDivElement> { | ||
interface LinkProps extends React$1.AnchorHTMLAttributes<HTMLAnchorElement> { | ||
to?: string; | ||
LinkComponent?: React$1.ComponentType<any>; | ||
} | ||
declare function Anchor({ children, to, className, LinkComponent }: LinkProps): JSX.Element; | ||
interface WrapperProps extends React.HTMLProps<HTMLDivElement> { | ||
children: React.ReactNode; | ||
@@ -330,33 +294,35 @@ className?: string; | ||
} | ||
declare function Wrapper({ children, className, paddingVertical, paddingHorizontal, maxWidth, hasViewportHeight, style, ...otherProps }: IProps): JSX.Element; | ||
declare function Wrapper({ children, className, paddingVertical, paddingHorizontal, maxWidth, hasViewportHeight, style, ...otherProps }: WrapperProps): JSX.Element; | ||
interface PopUpProps { | ||
interface ModalCustomProps extends React$1.HTMLAttributes<HTMLDivElement> { | ||
active: boolean; | ||
children?: ReactElement; | ||
width?: string; | ||
height?: string; | ||
bgHeight?: string; | ||
setClosePopUp: () => void; | ||
setCloseModal: () => void; | ||
animation?: boolean; | ||
className?: string; | ||
maxHeight?: string; | ||
overlay?: boolean; | ||
} | ||
declare const PopUpCustom: ({ active, children, width, height, setClosePopUp, animation, className, ...props }: PopUpProps) => JSX.Element; | ||
declare function ModalCustom({ active, children, width, height, overlay, setCloseModal, animation, className, ...props }: ModalCustomProps): JSX.Element; | ||
declare const SideBar: ({ sideBarList, sideBarName, sideBarSubTitle, defaultExpand }: { | ||
sideBarList?: { | ||
interface SideBarProps { | ||
sideBarList?: Array<{ | ||
title: string; | ||
active: boolean; | ||
to: () => void; | ||
}[] | undefined; | ||
sideBarName?: string | undefined; | ||
sideBarSubTitle?: ReactElement<any, string | React$1.JSXElementConstructor<any>> | undefined; | ||
defaultExpand?: boolean | undefined; | ||
}) => JSX.Element; | ||
}>; | ||
sideBarName?: string; | ||
sideBarSubTitle?: React$1.ReactElement; | ||
defaultExpand?: boolean; | ||
dangerZone?: { | ||
show: boolean; | ||
text: string; | ||
callBack?: () => void; | ||
}; | ||
} | ||
declare const SideBar: ({ sideBarList, sideBarName, sideBarSubTitle, defaultExpand, ...props }: SideBarProps) => JSX.Element; | ||
declare const toastSuccess: (title: string, subTitle?: string, opt?: any) => void; | ||
declare const toastInfo: (title: string, subTitle?: string) => void; | ||
declare const toastError: (title: string, subTitle?: string, opt?: any) => void; | ||
interface IBadgeProps { | ||
interface IBadgeProps extends React.HTMLProps<HTMLDivElement> { | ||
text?: string; | ||
@@ -368,4 +334,24 @@ className?: string; | ||
} | ||
declare const Badge: ({ text, className, variant, classNameIcon, icon }: IBadgeProps) => JSX.Element; | ||
declare const Badge: ({ text, className, variant, classNameIcon, icon, ...props }: IBadgeProps) => JSX.Element; | ||
declare type IconName = keyof typeof HIcons; | ||
interface DynamicHeroIconProps extends React$1.ComponentProps<'svg'> { | ||
icon: IconName; | ||
} | ||
declare const DynamicHeroIcon: ({ icon, className, ...props }: DynamicHeroIconProps) => JSX.Element; | ||
interface BreadcrumbsProps extends React$1.HTMLProps<HTMLDivElement> { | ||
options: Array<{ | ||
name?: string; | ||
to?: () => void; | ||
}>; | ||
separator?: any; | ||
} | ||
declare function Breadcrumbs({ options, separator, ...props }: BreadcrumbsProps): JSX.Element; | ||
interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement> { | ||
children?: React.ReactNode; | ||
} | ||
declare function Avatar({ src, alt, className, children, ...props }: AvatarProps): JSX.Element; | ||
interface ITopHeader { | ||
@@ -382,2 +368,2 @@ colSpan?: number; | ||
export { ActiveButton, Badge, Button, Circle, Collapse, Container, FeedBackBox, Flex, GeneralTable, IDataTable, IHeader, IHeaderType, IPaginatedData, IParamsPagination, ITopHeader, IType, Image, ImageIcon, Input, Language, Link, LoaderSpinner, Navbar, NavbarAuth, Order, OverFlow, PopUpCustom, ProgressBar, Row, SideBar, Skeleton, Spinner, Stepper, Text, TextArea, Wrapper, toastError, toastInfo, toastSuccess }; | ||
export { ActiveButton, Anchor, Avatar, AvatarProps, Badge, Breadcrumbs, BreadcrumbsProps, Button, Circle, Collapse, Container, ContainerProps, DynamicHeroIcon, DynamicHeroIconProps, FeedBackBox, Flex, GeneralTable, IBadgeProps, IDataTable, IHeader, IHeaderType, IPaginatedData, IParamsPagination, IProps$2 as IProps, ITextAreaProps, ITopHeader, IType, IconName, Image, ImageIcon, ImageIconProps, ImageProps, Input, Language, LinkProps, ModalCustom, ModalCustomProps, Navbar, NavbarAuth, Order, OrderProps, OverFlow, OverFlowProps, ProgressBar, ProgressBarProps, Row, RowProps, SideBar, Skeleton, Spinner, SpinnerProps, Stepper, StepperProps, Text, TextArea, TextProps, Wrapper, WrapperProps }; |
{ | ||
"name": "dd360-ds", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "module": "lib/index.esm.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1498967
13294