luna-components-library 1.1.39 → 1.1.40
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/dist/luna-components-library.js +125 -101
- package/dist/luna-components-library.js.map +1 -1
- package/dist/src/components/Accordion.d.ts +8 -3
- package/dist/src/components/Anchor.d.ts +3 -3
- package/dist/src/components/Button.d.ts +5 -5
- package/dist/src/components/DataTable.d.ts +25 -3
- package/dist/src/components/DropDown.d.ts +16 -5
- package/dist/src/components/Input.d.ts +5 -5
- package/dist/src/components/MultiSelect.d.ts +27 -4
- package/dist/src/components/Popconfirm.d.ts +19 -3
- package/dist/src/components/QRCode.d.ts +10 -3
- package/dist/src/components/Toast.d.ts +18 -3
- package/dist/src/styles.d.ts +5 -4
- package/dist/src/types.d.ts +1 -10
- package/package.json +1 -1
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export type AccordionStyles = {
|
|
3
|
+
container?: React.CSSProperties;
|
|
4
|
+
header?: React.CSSProperties;
|
|
5
|
+
content?: React.CSSProperties;
|
|
6
|
+
innerContent?: React.CSSProperties;
|
|
7
|
+
arrow?: React.CSSProperties;
|
|
8
|
+
};
|
|
4
9
|
export type AccordionProps = {
|
|
5
10
|
title: React.ReactNode;
|
|
6
11
|
children: React.ReactNode;
|
|
7
12
|
defaultActive?: boolean;
|
|
8
13
|
active?: boolean;
|
|
9
14
|
onClick?: () => void;
|
|
10
|
-
styles?:
|
|
15
|
+
styles?: AccordionStyles;
|
|
11
16
|
className?: string;
|
|
12
17
|
};
|
|
13
18
|
declare const Accordion: ({ title, children, defaultActive, active: externalActive, onClick, className, styles, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Size,
|
|
3
|
-
export type { AnchorVariant };
|
|
2
|
+
import { Size, StandardVariant } from '../types';
|
|
3
|
+
export type { StandardVariant as AnchorVariant };
|
|
4
4
|
export type AnchorSize = Size;
|
|
5
5
|
export type AllAnchorProps = React.ComponentPropsWithoutRef<'a'>;
|
|
6
6
|
export type AnchorProps = {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
variant?:
|
|
8
|
+
variant?: StandardVariant;
|
|
9
9
|
size?: AnchorSize;
|
|
10
10
|
href?: string;
|
|
11
11
|
className?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type {
|
|
2
|
+
import { StandardVariant, ButtonSize } from '../types';
|
|
3
|
+
export type { StandardVariant, ButtonSize };
|
|
4
4
|
export type AllButtonProps = React.ComponentPropsWithoutRef<'button'>;
|
|
5
|
-
export type ButtonClassNames =
|
|
6
|
-
export type ButtonStyles =
|
|
5
|
+
export type ButtonClassNames = Partial<Record<'button' | 'container' | 'variant' | 'size', string>>;
|
|
6
|
+
export type ButtonStyles = Partial<Record<'button' | 'container' | 'variant' | 'size', React.CSSProperties>>;
|
|
7
7
|
export type ButtonProps = {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
variant?:
|
|
9
|
+
variant?: StandardVariant;
|
|
10
10
|
size?: ButtonSize;
|
|
11
11
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
12
12
|
disabled?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ClassNames, Styles } from '../types';
|
|
3
2
|
export type DataTableColumn = {
|
|
4
3
|
key: string;
|
|
5
4
|
label: React.ReactNode;
|
|
@@ -19,8 +18,31 @@ export type DataTableTexts = {
|
|
|
19
18
|
noData?: string;
|
|
20
19
|
filterPlaceholder?: string;
|
|
21
20
|
};
|
|
22
|
-
export type DataTableClassNames =
|
|
23
|
-
|
|
21
|
+
export type DataTableClassNames = {
|
|
22
|
+
container?: string;
|
|
23
|
+
table?: string;
|
|
24
|
+
thead?: string;
|
|
25
|
+
tbody?: string;
|
|
26
|
+
tr?: string;
|
|
27
|
+
th?: string;
|
|
28
|
+
td?: string;
|
|
29
|
+
pagination?: string;
|
|
30
|
+
searchContainer?: string;
|
|
31
|
+
};
|
|
32
|
+
export type DataTableStyles = {
|
|
33
|
+
container?: React.CSSProperties;
|
|
34
|
+
searchContainer?: React.CSSProperties;
|
|
35
|
+
table?: React.CSSProperties;
|
|
36
|
+
thead?: React.CSSProperties;
|
|
37
|
+
tbody?: React.CSSProperties;
|
|
38
|
+
th?: React.CSSProperties;
|
|
39
|
+
td?: React.CSSProperties;
|
|
40
|
+
tr?: React.CSSProperties;
|
|
41
|
+
pagination?: React.CSSProperties;
|
|
42
|
+
icon?: React.CSSProperties;
|
|
43
|
+
filterMenu?: React.CSSProperties;
|
|
44
|
+
filterOption?: React.CSSProperties;
|
|
45
|
+
};
|
|
24
46
|
export type DataTableProps = {
|
|
25
47
|
columns: DataTableColumn[];
|
|
26
48
|
data: any[];
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ClassNames, Styles } from '../types';
|
|
3
2
|
export type DropDownOption = {
|
|
4
3
|
value: string | number;
|
|
5
|
-
label
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
text?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type DropDownClassNames = {
|
|
8
|
+
container?: string;
|
|
9
|
+
trigger?: string;
|
|
10
|
+
panel?: string;
|
|
11
|
+
option?: string;
|
|
12
|
+
};
|
|
13
|
+
export type DropDownStyles = {
|
|
14
|
+
container?: React.CSSProperties;
|
|
15
|
+
trigger?: React.CSSProperties;
|
|
16
|
+
panel?: React.CSSProperties;
|
|
17
|
+
option?: React.CSSProperties;
|
|
18
|
+
arrow?: React.CSSProperties;
|
|
6
19
|
};
|
|
7
|
-
export type DropDownClassNames = ClassNames<'container' | 'trigger' | 'panel' | 'option'>;
|
|
8
|
-
export type DropDownStyles = Styles<'container' | 'trigger' | 'panel' | 'option'>;
|
|
9
20
|
export type DropDownProps = {
|
|
10
21
|
options: (string | number | DropDownOption)[];
|
|
11
22
|
value?: string | number | React.ReactNode;
|
|
@@ -17,5 +28,5 @@ export type DropDownProps = {
|
|
|
17
28
|
disabled?: boolean;
|
|
18
29
|
className?: string;
|
|
19
30
|
};
|
|
20
|
-
declare const DropDown: ({ options, value, onChange, placeholder, toggle,
|
|
31
|
+
declare const DropDown: ({ options, value, onChange, placeholder, toggle, className, styles, disabled, }: DropDownProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
32
|
export default DropDown;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type {
|
|
2
|
+
import { InputSize, StandardVariant } from '../types';
|
|
3
|
+
export type { StandardVariant, 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
5
|
export type AllInputProps = Omit<React.ComponentPropsWithoutRef<'input'>, 'onChange' | 'value'>;
|
|
6
|
-
export type InputClassNames =
|
|
7
|
-
export type InputStyles =
|
|
6
|
+
export type InputClassNames = Record<'container' | 'input' | 'label', string>;
|
|
7
|
+
export type InputStyles = Record<'container' | 'input' | 'label', React.CSSProperties>;
|
|
8
8
|
type InputCommonProps = {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
|
-
variant?:
|
|
10
|
+
variant?: StandardVariant;
|
|
11
11
|
inputSize?: InputSize;
|
|
12
12
|
type?: InputType;
|
|
13
13
|
placeholder?: string;
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export type MultiSelectOption = {
|
|
3
3
|
label: string;
|
|
4
4
|
value: any;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export type MultiSelectClassNames =
|
|
8
|
-
|
|
7
|
+
export type MultiSelectClassNames = {
|
|
8
|
+
container?: string;
|
|
9
|
+
trigger?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
panel?: string;
|
|
12
|
+
header?: string;
|
|
13
|
+
filterInput?: string;
|
|
14
|
+
list?: string;
|
|
15
|
+
item?: string;
|
|
16
|
+
chip?: string;
|
|
17
|
+
chipIcon?: string;
|
|
18
|
+
};
|
|
19
|
+
export type MultiSelectStyles = {
|
|
20
|
+
container?: React.CSSProperties;
|
|
21
|
+
trigger?: React.CSSProperties;
|
|
22
|
+
chevron?: React.CSSProperties;
|
|
23
|
+
panel?: React.CSSProperties;
|
|
24
|
+
header?: React.CSSProperties;
|
|
25
|
+
selectAllWrapper?: React.CSSProperties;
|
|
26
|
+
list?: React.CSSProperties;
|
|
27
|
+
item?: React.CSSProperties;
|
|
28
|
+
checkbox?: React.CSSProperties;
|
|
29
|
+
chip?: React.CSSProperties;
|
|
30
|
+
chipIcon?: React.CSSProperties;
|
|
31
|
+
};
|
|
9
32
|
export type MultiSelectProps = {
|
|
10
33
|
options: MultiSelectOption[];
|
|
11
34
|
value: any[];
|
|
@@ -22,5 +45,5 @@ export type MultiSelectProps = {
|
|
|
22
45
|
disabled?: boolean;
|
|
23
46
|
className?: string;
|
|
24
47
|
};
|
|
25
|
-
declare const MultiSelect: ({ options, value, onChange, id, placeholder, display, filter, filterPlaceholder, selectAll, maxSelectedLabels, classNames, styles, disabled,
|
|
48
|
+
declare const MultiSelect: ({ options, value, onChange, id, placeholder, display, filter, filterPlaceholder, selectAll, maxSelectedLabels, classNames, styles, disabled, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
49
|
export default MultiSelect;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type PopconfirmClassNames =
|
|
4
|
-
|
|
2
|
+
import { PopconfirmPosition } from '../types';
|
|
3
|
+
export type PopconfirmClassNames = {
|
|
4
|
+
container?: string;
|
|
5
|
+
popover?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: string;
|
|
9
|
+
okButton?: string;
|
|
10
|
+
cancelButton?: string;
|
|
11
|
+
};
|
|
12
|
+
export type PopconfirmStyles = {
|
|
13
|
+
container?: React.CSSProperties;
|
|
14
|
+
popover?: React.CSSProperties;
|
|
15
|
+
titleWrapper?: React.CSSProperties;
|
|
16
|
+
icon?: React.CSSProperties;
|
|
17
|
+
title?: React.CSSProperties;
|
|
18
|
+
description?: React.CSSProperties;
|
|
19
|
+
actions?: React.CSSProperties;
|
|
20
|
+
};
|
|
5
21
|
export type PopconfirmProps = {
|
|
6
22
|
title: React.ReactNode;
|
|
7
23
|
description?: React.ReactNode;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type QRCodeClassNames =
|
|
3
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type QRCodeClassNames = {
|
|
3
|
+
container?: string;
|
|
4
|
+
image?: string;
|
|
5
|
+
};
|
|
6
|
+
export type QRCodeStyles = {
|
|
7
|
+
container?: React.CSSProperties;
|
|
8
|
+
image?: React.CSSProperties;
|
|
9
|
+
skeleton?: React.CSSProperties;
|
|
10
|
+
};
|
|
4
11
|
export type QRCodeProps = {
|
|
5
12
|
value: string;
|
|
6
13
|
size?: number;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ToastSeverity, ToastPosition } from '../types';
|
|
3
|
+
export type ToastClassNames = {
|
|
4
|
+
container?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
summary?: string;
|
|
8
|
+
detail?: string;
|
|
9
|
+
closeButton?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ToastStyles = {
|
|
12
|
+
container?: React.CSSProperties;
|
|
13
|
+
iconWrapper?: React.CSSProperties;
|
|
14
|
+
content?: React.CSSProperties;
|
|
15
|
+
summary?: React.CSSProperties;
|
|
16
|
+
detail?: React.CSSProperties;
|
|
17
|
+
closeButton?: React.CSSProperties;
|
|
18
|
+
};
|
|
4
19
|
export type ToastProps = {
|
|
5
20
|
visible: boolean;
|
|
6
21
|
severity?: ToastSeverity;
|
package/dist/src/styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Size,
|
|
2
|
+
import { Size, StandardVariant, CardPadding, CardShadow, InputSize, ModalSize, PopconfirmPosition, ProgressBarVariant, ToastSeverity, ToastPosition, CornerPosition } from './types';
|
|
3
3
|
export declare const colors: {
|
|
4
4
|
readonly white: "#ffffff";
|
|
5
5
|
readonly border: "#e5e7eb";
|
|
@@ -67,6 +67,7 @@ export declare const commonStyles: {
|
|
|
67
67
|
filterOption: (active: boolean) => React.CSSProperties;
|
|
68
68
|
pagination: React.CSSProperties;
|
|
69
69
|
buttonBase: React.CSSProperties;
|
|
70
|
+
anchorBase: React.CSSProperties;
|
|
70
71
|
inputWrapper: React.CSSProperties;
|
|
71
72
|
inputLabel: React.CSSProperties;
|
|
72
73
|
inputField: React.CSSProperties;
|
|
@@ -164,7 +165,7 @@ export declare const inputStyles: (styles?: Record<string, React.CSSProperties>,
|
|
|
164
165
|
container: React.CSSProperties;
|
|
165
166
|
label: React.CSSProperties;
|
|
166
167
|
input: React.CSSProperties;
|
|
167
|
-
variants: Record<
|
|
168
|
+
variants: Record<StandardVariant, React.CSSProperties>;
|
|
168
169
|
};
|
|
169
170
|
export declare const multiSelectStyles: (styles?: Record<string, React.CSSProperties>, disabled?: boolean, isOpen?: boolean) => {
|
|
170
171
|
container: React.CSSProperties;
|
|
@@ -248,7 +249,7 @@ export declare const scrollTopStyles: (styles?: React.CSSProperties, position?:
|
|
|
248
249
|
export declare const modalSizeClasses: Record<ModalSize, string>;
|
|
249
250
|
export declare const modalOverlayClasses: (show: boolean, animation: boolean, className: string) => string;
|
|
250
251
|
export declare const modalDialogClasses: (size: ModalSize, centered: boolean, dialogClassName: string) => string;
|
|
251
|
-
export declare const anchorBaseStyles: (variant:
|
|
252
|
+
export declare const anchorBaseStyles: (variant: StandardVariant, isHovered: boolean, size: Size) => React.CSSProperties;
|
|
252
253
|
export declare const accordionStyles: (isActive: boolean, styles?: Record<string, React.CSSProperties>) => {
|
|
253
254
|
container: React.CSSProperties;
|
|
254
255
|
header: React.CSSProperties;
|
|
@@ -256,4 +257,4 @@ export declare const accordionStyles: (isActive: boolean, styles?: Record<string
|
|
|
256
257
|
innerContent: React.CSSProperties;
|
|
257
258
|
arrow: React.CSSProperties;
|
|
258
259
|
};
|
|
259
|
-
export declare const
|
|
260
|
+
export declare const standardVariantStyles: (isHovered: boolean) => Record<StandardVariant, React.CSSProperties>;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type ClassNames<T extends string> = {
|
|
3
|
-
[K in T]?: string;
|
|
4
|
-
};
|
|
5
|
-
export type Styles<T extends string> = {
|
|
6
|
-
[K in T]?: React.CSSProperties;
|
|
7
|
-
};
|
|
8
1
|
export type Size = 'sm' | 'md' | 'lg';
|
|
9
2
|
export type ExtendedSize = Size | 'xl';
|
|
10
3
|
export type OptionalSize = Size | 'none';
|
|
11
|
-
export type
|
|
4
|
+
export type StandardVariant = 'none' | 'primary' | 'secondary' | 'outline' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'link';
|
|
12
5
|
export type ButtonSize = Size;
|
|
13
|
-
export type AnchorVariant = 'none' | 'primary' | 'secondary' | 'outline';
|
|
14
|
-
export type InputVariant = 'none' | 'primary' | 'secondary' | 'outline' | 'danger' | 'success';
|
|
15
6
|
export type ProgressBarVariant = 'primary' | 'success' | 'warning' | 'danger' | 'dark' | 'light';
|
|
16
7
|
export type InputSize = ExtendedSize;
|
|
17
8
|
export type ModalSize = ExtendedSize;
|
package/package.json
CHANGED