luna-components-library 1.1.34 → 1.1.37
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/README.md +280 -328
- package/dist/luna-components-library.js +2070 -471
- package/dist/luna-components-library.js.map +1 -1
- package/dist/src/components/Accordion.d.ts +9 -9
- package/dist/src/components/Anchor.d.ts +4 -6
- package/dist/src/components/Button.d.ts +8 -7
- package/dist/src/components/Card.d.ts +10 -7
- package/dist/src/components/DataTable.d.ts +40 -0
- package/dist/src/components/DropDown.d.ts +14 -12
- package/dist/src/components/Input.d.ts +20 -11
- package/dist/src/components/Modal.d.ts +1 -1
- package/dist/src/components/MultiSelect.d.ts +26 -0
- package/dist/src/components/Popconfirm.d.ts +20 -0
- package/dist/src/components/Preloader.d.ts +6 -3
- package/dist/src/components/ProgressBar.d.ts +21 -11
- package/dist/src/components/QRCode.d.ts +16 -0
- package/dist/src/components/ScrollTop.d.ts +5 -23
- package/dist/src/components/Spinner.d.ts +4 -5
- package/dist/src/components/Toast.d.ts +17 -0
- package/dist/src/components/Typed.d.ts +2 -4
- package/dist/src/components/WhatsApp.d.ts +9 -9
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/demo.d.ts +1 -2
- package/dist/src/styles.d.ts +259 -0
- package/dist/src/types.d.ts +23 -0
- package/dist/src/utilities/logger.util.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { Styles } from '../types';
|
|
3
|
+
type AccordionElements = 'container' | 'header' | 'content' | 'arrow' | 'innerContent';
|
|
2
4
|
export type AccordionProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
defaultActive?: boolean;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
styles?: Styles<AccordionElements>;
|
|
7
11
|
className?: string;
|
|
8
|
-
containerClassName?: string;
|
|
9
|
-
headerClassName?: string;
|
|
10
|
-
contentClassName?: string;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
12
|
};
|
|
13
|
-
declare const Accordion: ({
|
|
13
|
+
declare const Accordion: ({ title, children, defaultActive, active: externalActive, onClick, className, styles, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default Accordion;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { Size, AnchorVariant } from '../types';
|
|
3
|
+
export type { AnchorVariant };
|
|
4
|
+
export type AnchorSize = Size;
|
|
4
5
|
export type AllAnchorProps = React.ComponentPropsWithoutRef<'a'>;
|
|
5
6
|
export type AnchorProps = {
|
|
6
7
|
children?: React.ReactNode;
|
|
@@ -8,12 +9,9 @@ export type AnchorProps = {
|
|
|
8
9
|
size?: AnchorSize;
|
|
9
10
|
href?: string;
|
|
10
11
|
className?: string;
|
|
11
|
-
containerClassName?: string;
|
|
12
|
-
variantClassName?: string;
|
|
13
|
-
sizeClassName?: string;
|
|
14
12
|
target?: string;
|
|
15
13
|
rel?: string;
|
|
16
14
|
style?: React.CSSProperties;
|
|
17
15
|
};
|
|
18
|
-
declare const Anchor: ({ children, variant, size, href, className,
|
|
16
|
+
declare const Anchor: ({ children, variant, size, href, className, target, rel, style, ...props }: AnchorProps & AllAnchorProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
export default Anchor;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { ClassNames, Styles, ButtonVariant, ButtonSize } from '../types';
|
|
3
|
+
export type { ButtonVariant, ButtonSize };
|
|
4
4
|
export type AllButtonProps = React.ComponentPropsWithoutRef<'button'>;
|
|
5
|
+
export type ButtonClassNames = ClassNames<'button' | 'container' | 'variant' | 'size'>;
|
|
6
|
+
export type ButtonStyles = Styles<'button'>;
|
|
5
7
|
export type ButtonProps = {
|
|
6
8
|
children: React.ReactNode;
|
|
7
9
|
variant?: ButtonVariant;
|
|
8
10
|
size?: ButtonSize;
|
|
9
|
-
onClick?:
|
|
11
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
12
|
disabled?: boolean;
|
|
13
|
+
classNames?: ButtonClassNames;
|
|
14
|
+
styles?: ButtonStyles;
|
|
11
15
|
className?: string;
|
|
12
|
-
containerClassName?: string;
|
|
13
|
-
variantClassName?: string;
|
|
14
|
-
sizeClassName?: string;
|
|
15
16
|
style?: React.CSSProperties;
|
|
16
17
|
};
|
|
17
|
-
declare const Button: ({ children, variant, size, onClick, disabled,
|
|
18
|
+
declare const Button: ({ children, variant, size, onClick, disabled, classNames, styles, className, style: extraStyle, ...props }: AllButtonProps & ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export default Button;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { CardPadding, CardShadow } from '../types';
|
|
3
|
+
export type { CardPadding, CardShadow };
|
|
4
4
|
export type CardProps = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
title?:
|
|
6
|
+
title?: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
-
containerClassName?: string;
|
|
9
|
-
titleClassName?: string;
|
|
10
8
|
padding?: CardPadding;
|
|
11
9
|
shadow?: CardShadow;
|
|
12
|
-
|
|
10
|
+
styles?: {
|
|
11
|
+
container?: React.CSSProperties;
|
|
12
|
+
titleContainer?: React.CSSProperties;
|
|
13
|
+
title?: React.CSSProperties;
|
|
14
|
+
content?: React.CSSProperties;
|
|
15
|
+
};
|
|
13
16
|
};
|
|
14
|
-
declare const Card: ({ children, title, className,
|
|
17
|
+
declare const Card: ({ children, title, className, padding, shadow, styles, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export default Card;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ClassNames, Styles } from '../types';
|
|
3
|
+
export type DataTableColumn = {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
filterable?: boolean;
|
|
8
|
+
filterOptions?: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}[];
|
|
12
|
+
render?: (value: any, row: any) => React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export type DataTableTexts = {
|
|
15
|
+
showing?: string;
|
|
16
|
+
results?: string;
|
|
17
|
+
prev?: string;
|
|
18
|
+
next?: string;
|
|
19
|
+
noData?: string;
|
|
20
|
+
filterPlaceholder?: string;
|
|
21
|
+
};
|
|
22
|
+
export type DataTableClassNames = ClassNames<'container' | 'table' | 'thead' | 'tbody' | 'tr' | 'th' | 'td' | 'pagination' | 'searchContainer'>;
|
|
23
|
+
export type DataTableStyles = Styles<'container' | 'table' | 'thead' | 'tbody' | 'tr' | 'th' | 'td'>;
|
|
24
|
+
export type DataTableProps = {
|
|
25
|
+
columns: DataTableColumn[];
|
|
26
|
+
data: any[];
|
|
27
|
+
pagination?: boolean;
|
|
28
|
+
pageSize?: number;
|
|
29
|
+
selectable?: boolean;
|
|
30
|
+
onSelectionChange?: (selectedRows: any[]) => void;
|
|
31
|
+
onRowClick?: (row: any) => void;
|
|
32
|
+
onRowDoubleClick?: (row: any) => void;
|
|
33
|
+
searchable?: boolean;
|
|
34
|
+
texts?: DataTableTexts;
|
|
35
|
+
classNames?: DataTableClassNames;
|
|
36
|
+
styles?: DataTableStyles;
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
declare const DataTable: ({ columns, data, pagination, pageSize, selectable, onSelectionChange, onRowClick, onRowDoubleClick, searchable, texts, classNames, styles, className, }: DataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default DataTable;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ClassNames, Styles } from '../types';
|
|
3
|
+
export type DropDownOption = {
|
|
4
|
+
value: string | number;
|
|
4
5
|
label: React.ReactNode;
|
|
5
6
|
};
|
|
7
|
+
export type DropDownClassNames = ClassNames<'container' | 'trigger' | 'panel' | 'option'>;
|
|
8
|
+
export type DropDownStyles = Styles<'container' | 'trigger' | 'panel' | 'option'>;
|
|
6
9
|
export type DropDownProps = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
options: (string | number | DropDownOption)[];
|
|
11
|
+
value?: string | number | React.ReactNode;
|
|
12
|
+
onChange: (value: any) => void;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
toggle?: React.ReactNode;
|
|
15
|
+
classNames?: DropDownClassNames;
|
|
16
|
+
styles?: DropDownStyles;
|
|
17
|
+
disabled?: boolean;
|
|
11
18
|
className?: string;
|
|
12
|
-
containerClassName?: string;
|
|
13
|
-
dropdownClassName?: string;
|
|
14
|
-
optionsContainerClassName?: string;
|
|
15
|
-
optionClassName?: string;
|
|
16
|
-
style?: React.CSSProperties;
|
|
17
19
|
};
|
|
18
|
-
declare const DropDown: ({
|
|
20
|
+
declare const DropDown: ({ options, value, onChange, placeholder, toggle, classNames, styles, disabled, className, }: DropDownProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
export default DropDown;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { ClassNames, Styles, InputVariant, InputSize } from '../types';
|
|
3
|
+
export type { InputVariant, InputSize };
|
|
4
4
|
export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local' | 'month' | 'week' | 'color' | 'file' | 'hidden' | 'image' | 'range' | 'reset' | 'submit';
|
|
5
|
-
export type AllInputProps = Omit<React.ComponentPropsWithoutRef<'input'>, 'onChange'>;
|
|
6
|
-
export type
|
|
5
|
+
export type AllInputProps = Omit<React.ComponentPropsWithoutRef<'input'>, 'onChange' | 'value'>;
|
|
6
|
+
export type InputClassNames = ClassNames<'container' | 'input' | 'label'>;
|
|
7
|
+
export type InputStyles = Styles<'container' | 'input' | 'label'>;
|
|
8
|
+
type InputCommonProps = {
|
|
7
9
|
children?: React.ReactNode;
|
|
8
10
|
variant?: InputVariant;
|
|
9
11
|
inputSize?: InputSize;
|
|
@@ -16,15 +18,22 @@ export type InputProps = {
|
|
|
16
18
|
disabled?: boolean;
|
|
17
19
|
required?: boolean;
|
|
18
20
|
readOnly?: boolean;
|
|
21
|
+
mask?: string;
|
|
22
|
+
maskChar?: string;
|
|
23
|
+
useCurrency?: boolean;
|
|
24
|
+
currency?: string;
|
|
25
|
+
locale?: string;
|
|
26
|
+
minFractionDigits?: number;
|
|
27
|
+
maxFractionDigits?: number;
|
|
28
|
+
'aria-label'?: string;
|
|
29
|
+
'aria-labelledby'?: string;
|
|
30
|
+
classNames?: InputClassNames;
|
|
31
|
+
styles?: InputStyles;
|
|
19
32
|
className?: string;
|
|
20
|
-
containerClassName?: string;
|
|
21
|
-
inputClassName?: string;
|
|
22
|
-
variantClassName?: string;
|
|
23
|
-
sizeClassName?: string;
|
|
24
33
|
style?: React.CSSProperties;
|
|
25
34
|
id?: string;
|
|
26
|
-
|
|
27
|
-
'aria-labelledby'?: string;
|
|
35
|
+
name?: string;
|
|
28
36
|
};
|
|
29
|
-
|
|
37
|
+
export type InputProps = InputCommonProps;
|
|
38
|
+
declare const Input: ({ children, variant, type, inputSize, placeholder, value: controlledValue, onChange, onFocus, onBlur, disabled, required, readOnly, id, name, mask, maskChar, useCurrency, currency, locale, minFractionDigits, maxFractionDigits, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, classNames, styles, className: extraClassName, style: extraStyle, ...props }: InputProps & AllInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
39
|
export default Input;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ClassNames, Styles } from '../types';
|
|
2
|
+
export type MultiSelectOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: any;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type MultiSelectClassNames = ClassNames<'container' | 'trigger' | 'label' | 'panel' | 'header' | 'filterInput' | 'list' | 'item' | 'chip' | 'chipIcon'>;
|
|
8
|
+
export type MultiSelectStyles = Styles<'container' | 'trigger' | 'panel' | 'header' | 'item' | 'chip'>;
|
|
9
|
+
export type MultiSelectProps = {
|
|
10
|
+
options: MultiSelectOption[];
|
|
11
|
+
value: any[];
|
|
12
|
+
onChange: (value: any[]) => void;
|
|
13
|
+
id?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
display?: 'comma' | 'chip';
|
|
16
|
+
filter?: boolean;
|
|
17
|
+
filterPlaceholder?: string;
|
|
18
|
+
selectAll?: boolean;
|
|
19
|
+
maxSelectedLabels?: number;
|
|
20
|
+
classNames?: MultiSelectClassNames;
|
|
21
|
+
styles?: MultiSelectStyles;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
declare const MultiSelect: ({ options, value, onChange, id, placeholder, display, filter, filterPlaceholder, selectAll, maxSelectedLabels, classNames, styles, disabled, className, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default MultiSelect;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ClassNames, Styles, PopconfirmPosition } from '../types';
|
|
3
|
+
export type PopconfirmClassNames = ClassNames<'container' | 'popover' | 'title' | 'description' | 'actions' | 'okButton' | 'cancelButton'>;
|
|
4
|
+
export type PopconfirmStyles = Styles<'container' | 'popover' | 'title' | 'description'>;
|
|
5
|
+
export type PopconfirmProps = {
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
okText?: string;
|
|
11
|
+
cancelText?: string;
|
|
12
|
+
position?: PopconfirmPosition;
|
|
13
|
+
children: React.ReactElement;
|
|
14
|
+
classNames?: PopconfirmClassNames;
|
|
15
|
+
styles?: PopconfirmStyles;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const Popconfirm: ({ title, description, onConfirm, onCancel, okText, cancelText, position, children, classNames, styles, disabled, className, }: PopconfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default Popconfirm;
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
export type PreloaderProps = {
|
|
3
3
|
/** Loading state - if true, preloader is shown */
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
-
/** Duration in milliseconds before auto-hide */
|
|
5
|
+
/** Duration in milliseconds before auto-hide (only for internal state) */
|
|
6
6
|
duration?: number;
|
|
7
7
|
/** Background color overlay */
|
|
8
8
|
backgroundColor?: string;
|
|
@@ -21,7 +21,10 @@ export type PreloaderProps = {
|
|
|
21
21
|
/** Callback when preloader finishes */
|
|
22
22
|
onComplete?: () => void;
|
|
23
23
|
/** Custom inline styles */
|
|
24
|
-
|
|
24
|
+
styles?: {
|
|
25
|
+
overlay?: React.CSSProperties;
|
|
26
|
+
spinner?: React.CSSProperties;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
26
|
-
declare const Preloader: ({ isLoading: externalLoading, duration, backgroundColor, accentColor, size, borderWidth, className, spinnerClassName, zIndex, onComplete,
|
|
29
|
+
declare const Preloader: ({ isLoading: externalLoading, duration, backgroundColor, accentColor, size, borderWidth, className, spinnerClassName, zIndex, onComplete, styles }: PreloaderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
30
|
export default Preloader;
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ProgressBarVariant } from '../types';
|
|
3
|
+
export type { ProgressBarVariant };
|
|
3
4
|
export type ProgressBarProps = {
|
|
5
|
+
/** The current progress value */
|
|
4
6
|
progress: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
containerClassName?: string;
|
|
13
|
-
barClassName?: string;
|
|
7
|
+
/** Maximum value (default: 100) */
|
|
8
|
+
max?: number;
|
|
9
|
+
/** Minimum value (default: 0) */
|
|
10
|
+
min?: number;
|
|
11
|
+
/** Accessibility label */
|
|
12
|
+
'aria-label'?: string;
|
|
13
|
+
/** Color variant */
|
|
14
14
|
variant?: ProgressBarVariant;
|
|
15
|
+
/** Whether to show the percentage text */
|
|
16
|
+
showPercentage?: boolean;
|
|
17
|
+
/** Custom className for the container */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Custom styles */
|
|
20
|
+
styles?: {
|
|
21
|
+
container?: React.CSSProperties;
|
|
22
|
+
bar?: React.CSSProperties;
|
|
23
|
+
text?: React.CSSProperties;
|
|
24
|
+
};
|
|
15
25
|
};
|
|
16
|
-
declare const ProgressBar: ({ progress, max, min, "aria-label": ariaLabel,
|
|
26
|
+
declare const ProgressBar: ({ progress, max, min, "aria-label": ariaLabel, variant, showPercentage, className, styles, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
27
|
export default ProgressBar;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClassNames, Styles } from '../types';
|
|
2
|
+
export type QRCodeClassNames = ClassNames<'container' | 'image'>;
|
|
3
|
+
export type QRCodeStyles = Styles<'container' | 'image'>;
|
|
4
|
+
export type QRCodeProps = {
|
|
5
|
+
value: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
bgColor?: string;
|
|
9
|
+
bordered?: boolean;
|
|
10
|
+
classNames?: QRCodeClassNames;
|
|
11
|
+
styles?: QRCodeStyles;
|
|
12
|
+
errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const QRCode: ({ value, size, color, bgColor, bordered, classNames, styles, errorCorrectionLevel, className, }: QRCodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default QRCode;
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { CornerPosition } from '../types';
|
|
2
3
|
export type ScrollTopProps = {
|
|
3
|
-
/** Scroll position threshold to show the button (in pixels) */
|
|
4
4
|
threshold?: number;
|
|
5
|
-
/** Custom className for the button */
|
|
6
5
|
className?: string;
|
|
7
|
-
/** Custom icon/content for the button */
|
|
8
6
|
children?: React.ReactNode;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/** Size of the button */
|
|
12
|
-
size?: 'sm' | 'md' | 'lg';
|
|
13
|
-
/** Shape of the button */
|
|
14
|
-
shape?: 'circle' | 'square' | 'rounded';
|
|
15
|
-
/** Whether to show the button initially */
|
|
16
|
-
showInitially?: boolean;
|
|
17
|
-
/** Custom scroll behavior */
|
|
7
|
+
position?: CornerPosition;
|
|
8
|
+
size?: number;
|
|
18
9
|
scrollBehavior?: 'auto' | 'smooth';
|
|
19
|
-
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
/** Callback when button is clicked */
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
/** Callback when visibility changes */
|
|
24
|
-
onVisibilityChange?: (isVisible: boolean) => void;
|
|
25
|
-
/** Element ID or selector to check visibility for showing the button */
|
|
26
|
-
targetElement?: string;
|
|
27
|
-
/** Percentage of page scroll to show the button (0-100) */
|
|
28
|
-
scrollPercentage?: number;
|
|
10
|
+
styles?: React.CSSProperties;
|
|
29
11
|
};
|
|
30
|
-
declare const ScrollTop: ({ threshold, className, children, position, size,
|
|
12
|
+
declare const ScrollTop: ({ threshold, className, children, position, size, scrollBehavior, styles, }: ScrollTopProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
13
|
export default ScrollTop;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { Size } from '../types';
|
|
3
|
+
export type SpinnerSize = Size;
|
|
3
4
|
export type SpinnerType = 'circle' | 'dots' | 'pulse' | 'bars';
|
|
4
5
|
export type SpinnerProps = {
|
|
5
6
|
className?: string;
|
|
6
|
-
containerClassName?: string;
|
|
7
|
-
dotClassName?: string;
|
|
8
|
-
barClassName?: string;
|
|
9
7
|
size?: SpinnerSize;
|
|
10
8
|
type?: SpinnerType;
|
|
9
|
+
color?: string;
|
|
11
10
|
style?: React.CSSProperties;
|
|
12
11
|
};
|
|
13
|
-
declare const Spinner: ({ className,
|
|
12
|
+
declare const Spinner: ({ className, size, type, color, style, }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default Spinner;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ClassNames, Styles, ToastSeverity, ToastPosition } from '../types';
|
|
2
|
+
export type ToastClassNames = ClassNames<'container' | 'content' | 'icon' | 'summary' | 'detail' | 'closeButton'>;
|
|
3
|
+
export type ToastStyles = Styles<'container' | 'content' | 'summary' | 'detail'>;
|
|
4
|
+
export type ToastProps = {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
severity?: ToastSeverity;
|
|
7
|
+
summary?: string;
|
|
8
|
+
detail?: string;
|
|
9
|
+
life?: number;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
position?: ToastPosition;
|
|
12
|
+
classNames?: ToastClassNames;
|
|
13
|
+
styles?: ToastStyles;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const Toast: ({ visible, severity, summary, detail, life, onClose, position, classNames, styles, className, }: ToastProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export default Toast;
|
|
@@ -12,10 +12,8 @@ type TypedProps = {
|
|
|
12
12
|
loop?: boolean;
|
|
13
13
|
showCursor?: boolean;
|
|
14
14
|
className?: string;
|
|
15
|
-
containerClassName?: string;
|
|
16
|
-
typedClassName?: string;
|
|
17
|
-
cursorClassName?: string;
|
|
18
15
|
style?: TypedStyle;
|
|
16
|
+
cursorStyle?: CSSProperties;
|
|
19
17
|
};
|
|
20
|
-
declare const Typed: ({ strings, typeSpeed, backSpeed, backDelay, startDelay, loop, showCursor, className,
|
|
18
|
+
declare const Typed: ({ strings, typeSpeed, backSpeed, backDelay, startDelay, loop, showCursor, className, style, cursorStyle, }: TypedProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
export default Typed;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { Size, CornerPosition } from '../types';
|
|
2
3
|
export interface WhatsAppProps {
|
|
3
4
|
/** Phone number for WhatsApp (with country code, without + or spaces) */
|
|
4
5
|
phone?: string;
|
|
5
6
|
/** Default message to send */
|
|
6
7
|
message?: string;
|
|
7
8
|
/** Position of the button */
|
|
8
|
-
position?:
|
|
9
|
+
position?: CornerPosition;
|
|
9
10
|
/** Size of the button */
|
|
10
|
-
size?:
|
|
11
|
+
size?: Size;
|
|
11
12
|
/** Show tooltip on hover */
|
|
12
13
|
showTooltip?: boolean;
|
|
13
14
|
/** Tooltip text */
|
|
14
15
|
tooltipText?: string;
|
|
15
|
-
/** Custom className
|
|
16
|
+
/** Custom className */
|
|
16
17
|
className?: string;
|
|
17
|
-
/** Custom className for the tooltip */
|
|
18
|
-
tooltipClassName?: string;
|
|
19
18
|
/** Custom styles */
|
|
20
|
-
|
|
19
|
+
styles?: {
|
|
20
|
+
button?: React.CSSProperties;
|
|
21
|
+
tooltip?: React.CSSProperties;
|
|
22
|
+
};
|
|
21
23
|
/** Callback when button is clicked */
|
|
22
24
|
onClick?: () => void;
|
|
23
25
|
/** Z-index for the button */
|
|
24
26
|
zIndex?: number;
|
|
25
|
-
/** Whether to open in new tab */
|
|
26
|
-
openInNewTab?: boolean;
|
|
27
27
|
}
|
|
28
|
-
declare const WhatsApp: ({ phone, message, position, size, showTooltip, tooltipText, className,
|
|
28
|
+
declare const WhatsApp: ({ phone, message, position, size, showTooltip, tooltipText, className, styles, onClick, zIndex, }: WhatsAppProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
29
|
export default WhatsApp;
|
|
@@ -11,3 +11,8 @@ export { default as ScrollTop } from './ScrollTop';
|
|
|
11
11
|
export { default as WhatsApp } from './WhatsApp';
|
|
12
12
|
export { default as Modal } from './Modal';
|
|
13
13
|
export { default as Input } from './Input';
|
|
14
|
+
export { default as DataTable } from './DataTable';
|
|
15
|
+
export { default as Toast } from './Toast';
|
|
16
|
+
export { default as MultiSelect } from './MultiSelect';
|
|
17
|
+
export { default as Popconfirm } from './Popconfirm';
|
|
18
|
+
export { default as QRCode } from './QRCode';
|
package/dist/src/demo.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default DemoApp;
|
|
1
|
+
export {};
|