@safestrong/ppa-component-library 1.9.4 → 1.9.5
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/index.d.mts +167 -0
- package/dist/index.d.ts +167 -0
- package/dist/index.js +788 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +744 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +1688 -0
- package/package.json +3 -2
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
|
|
4
|
+
type Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: IconProp;
|
|
7
|
+
isnotif?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
btnType?: "primary" | "secondary" | "tertiary";
|
|
10
|
+
};
|
|
11
|
+
declare function Button({ label, icon, isLoading, btnType, className, ...rest }: Readonly<Button>): React.JSX.Element;
|
|
12
|
+
declare namespace Button {
|
|
13
|
+
var IconButton: (props: Readonly<Button>) => React.JSX.Element;
|
|
14
|
+
var IconButtonGroup: ({ list }: {
|
|
15
|
+
list: Button[];
|
|
16
|
+
}) => React.JSX.Element;
|
|
17
|
+
var SSOButton: ({ href, btnclass }: {
|
|
18
|
+
href: string;
|
|
19
|
+
btnclass?: string;
|
|
20
|
+
}) => React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare function TextInput({ label, labelFor, icon, outerclass, isdarkmode, inputclass, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
labelFor?: string;
|
|
26
|
+
icon?: IconProp;
|
|
27
|
+
outerclass?: string;
|
|
28
|
+
isdarkmode?: boolean;
|
|
29
|
+
inputclass?: string;
|
|
30
|
+
}>): React.JSX.Element;
|
|
31
|
+
|
|
32
|
+
declare function Slider(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
33
|
+
|
|
34
|
+
type SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
35
|
+
label?: string;
|
|
36
|
+
labelHtml?: string;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
stateaction?: (param: any) => void;
|
|
39
|
+
outerclass?: string;
|
|
40
|
+
isdarkmode?: boolean;
|
|
41
|
+
options?: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[];
|
|
45
|
+
stringOptions?: string[];
|
|
46
|
+
};
|
|
47
|
+
declare function SingleSelect(attr: Readonly<SingleSelect>): React.JSX.Element;
|
|
48
|
+
declare namespace SingleSelect {
|
|
49
|
+
var autoFill: typeof autoFillInput;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare function autoFillInput(value: string, elName: string, list: {
|
|
53
|
+
label: string;
|
|
54
|
+
value: string;
|
|
55
|
+
}[]): void;
|
|
56
|
+
|
|
57
|
+
type Tooltip = {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
text: string;
|
|
60
|
+
position: "top" | "bottom" | "right" | "left";
|
|
61
|
+
};
|
|
62
|
+
declare function Tooltip({ children, text, position, }: Readonly<Tooltip>): React.JSX.Element;
|
|
63
|
+
|
|
64
|
+
type Option$1 = {
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
};
|
|
68
|
+
declare function NavTabClient({ items, state, }: Readonly<{
|
|
69
|
+
items: Option$1[];
|
|
70
|
+
state: {
|
|
71
|
+
active: string;
|
|
72
|
+
setActive: (val: string) => void;
|
|
73
|
+
};
|
|
74
|
+
}>): React.JSX.Element;
|
|
75
|
+
|
|
76
|
+
type Card = {
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
};
|
|
80
|
+
declare function Card({ children, className }: Readonly<Card>): React.JSX.Element;
|
|
81
|
+
declare namespace Card {
|
|
82
|
+
var Footer: ({ className, children, }: {
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: React.ReactNode;
|
|
85
|
+
}) => React.JSX.Element;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type ToastType = "warning" | "success" | "info" | "danger";
|
|
89
|
+
type Toast = {
|
|
90
|
+
title: string;
|
|
91
|
+
className?: string;
|
|
92
|
+
description: string;
|
|
93
|
+
type: ToastType;
|
|
94
|
+
};
|
|
95
|
+
declare function Toast({ title, description, type, className, }: Readonly<Toast>): React.JSX.Element;
|
|
96
|
+
declare namespace Toast {
|
|
97
|
+
var Inline: ({ className, text, type, }: {
|
|
98
|
+
className?: string;
|
|
99
|
+
text: string;
|
|
100
|
+
type: ToastType;
|
|
101
|
+
}) => React.JSX.Element;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
type Expandable = {
|
|
105
|
+
children: React.ReactNode;
|
|
106
|
+
title: string;
|
|
107
|
+
className?: string;
|
|
108
|
+
isOpen?: boolean;
|
|
109
|
+
};
|
|
110
|
+
declare function Expandable({ children, title, className, isOpen, }: Readonly<Expandable>): React.JSX.Element;
|
|
111
|
+
|
|
112
|
+
type Option = {
|
|
113
|
+
value: string;
|
|
114
|
+
label: string;
|
|
115
|
+
};
|
|
116
|
+
type MultiSelect = {
|
|
117
|
+
label?: string;
|
|
118
|
+
labelHtml?: string;
|
|
119
|
+
outerclass?: string;
|
|
120
|
+
isdarkmode?: boolean;
|
|
121
|
+
options?: Option[];
|
|
122
|
+
stringOptions?: string[];
|
|
123
|
+
state: {
|
|
124
|
+
value: Option[];
|
|
125
|
+
select: (newVal: Option[]) => void;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
declare function MultiSelect({ state, label, labelHtml, ...attr }: Readonly<MultiSelect>): React.JSX.Element;
|
|
129
|
+
|
|
130
|
+
declare function ThemeToggle(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
131
|
+
|
|
132
|
+
declare function Dashboard(): React.JSX.Element;
|
|
133
|
+
|
|
134
|
+
declare function Badge({ text, type, className, }: {
|
|
135
|
+
text: string;
|
|
136
|
+
type: "success" | "danger" | "warning" | "info";
|
|
137
|
+
className?: string;
|
|
138
|
+
}): React.JSX.Element;
|
|
139
|
+
|
|
140
|
+
declare function Skeleton({ className }: {
|
|
141
|
+
className?: string;
|
|
142
|
+
}): React.JSX.Element;
|
|
143
|
+
|
|
144
|
+
declare function Navigation(): React.JSX.Element;
|
|
145
|
+
declare namespace Navigation {
|
|
146
|
+
var URL: (props: {
|
|
147
|
+
list: {
|
|
148
|
+
label: string;
|
|
149
|
+
href: string;
|
|
150
|
+
}[];
|
|
151
|
+
activeUrl: string;
|
|
152
|
+
outerclass?: string;
|
|
153
|
+
CustomComponent?: React.ElementType;
|
|
154
|
+
}) => React.JSX.Element;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare function Confirmation({ type, text, title, secondaryAction, secondaryLabel, mainAction, mainLabel, }: {
|
|
158
|
+
mainAction: () => void;
|
|
159
|
+
secondaryAction?: () => void;
|
|
160
|
+
mainLabel?: string;
|
|
161
|
+
secondaryLabel?: string;
|
|
162
|
+
title: string;
|
|
163
|
+
text: string;
|
|
164
|
+
type?: "info" | "warning" | "danger" | "success";
|
|
165
|
+
}): React.JSX.Element;
|
|
166
|
+
|
|
167
|
+
export { Badge, Button, Card, Confirmation, Dashboard, Expandable, MultiSelect, NavTabClient, Navigation, SingleSelect, Skeleton, Slider, TextInput, ThemeToggle, Toast, Tooltip };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
|
|
4
|
+
type Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: IconProp;
|
|
7
|
+
isnotif?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
btnType?: "primary" | "secondary" | "tertiary";
|
|
10
|
+
};
|
|
11
|
+
declare function Button({ label, icon, isLoading, btnType, className, ...rest }: Readonly<Button>): React.JSX.Element;
|
|
12
|
+
declare namespace Button {
|
|
13
|
+
var IconButton: (props: Readonly<Button>) => React.JSX.Element;
|
|
14
|
+
var IconButtonGroup: ({ list }: {
|
|
15
|
+
list: Button[];
|
|
16
|
+
}) => React.JSX.Element;
|
|
17
|
+
var SSOButton: ({ href, btnclass }: {
|
|
18
|
+
href: string;
|
|
19
|
+
btnclass?: string;
|
|
20
|
+
}) => React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare function TextInput({ label, labelFor, icon, outerclass, isdarkmode, inputclass, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
labelFor?: string;
|
|
26
|
+
icon?: IconProp;
|
|
27
|
+
outerclass?: string;
|
|
28
|
+
isdarkmode?: boolean;
|
|
29
|
+
inputclass?: string;
|
|
30
|
+
}>): React.JSX.Element;
|
|
31
|
+
|
|
32
|
+
declare function Slider(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
33
|
+
|
|
34
|
+
type SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
35
|
+
label?: string;
|
|
36
|
+
labelHtml?: string;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
stateaction?: (param: any) => void;
|
|
39
|
+
outerclass?: string;
|
|
40
|
+
isdarkmode?: boolean;
|
|
41
|
+
options?: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[];
|
|
45
|
+
stringOptions?: string[];
|
|
46
|
+
};
|
|
47
|
+
declare function SingleSelect(attr: Readonly<SingleSelect>): React.JSX.Element;
|
|
48
|
+
declare namespace SingleSelect {
|
|
49
|
+
var autoFill: typeof autoFillInput;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare function autoFillInput(value: string, elName: string, list: {
|
|
53
|
+
label: string;
|
|
54
|
+
value: string;
|
|
55
|
+
}[]): void;
|
|
56
|
+
|
|
57
|
+
type Tooltip = {
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
text: string;
|
|
60
|
+
position: "top" | "bottom" | "right" | "left";
|
|
61
|
+
};
|
|
62
|
+
declare function Tooltip({ children, text, position, }: Readonly<Tooltip>): React.JSX.Element;
|
|
63
|
+
|
|
64
|
+
type Option$1 = {
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
};
|
|
68
|
+
declare function NavTabClient({ items, state, }: Readonly<{
|
|
69
|
+
items: Option$1[];
|
|
70
|
+
state: {
|
|
71
|
+
active: string;
|
|
72
|
+
setActive: (val: string) => void;
|
|
73
|
+
};
|
|
74
|
+
}>): React.JSX.Element;
|
|
75
|
+
|
|
76
|
+
type Card = {
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
};
|
|
80
|
+
declare function Card({ children, className }: Readonly<Card>): React.JSX.Element;
|
|
81
|
+
declare namespace Card {
|
|
82
|
+
var Footer: ({ className, children, }: {
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: React.ReactNode;
|
|
85
|
+
}) => React.JSX.Element;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type ToastType = "warning" | "success" | "info" | "danger";
|
|
89
|
+
type Toast = {
|
|
90
|
+
title: string;
|
|
91
|
+
className?: string;
|
|
92
|
+
description: string;
|
|
93
|
+
type: ToastType;
|
|
94
|
+
};
|
|
95
|
+
declare function Toast({ title, description, type, className, }: Readonly<Toast>): React.JSX.Element;
|
|
96
|
+
declare namespace Toast {
|
|
97
|
+
var Inline: ({ className, text, type, }: {
|
|
98
|
+
className?: string;
|
|
99
|
+
text: string;
|
|
100
|
+
type: ToastType;
|
|
101
|
+
}) => React.JSX.Element;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
type Expandable = {
|
|
105
|
+
children: React.ReactNode;
|
|
106
|
+
title: string;
|
|
107
|
+
className?: string;
|
|
108
|
+
isOpen?: boolean;
|
|
109
|
+
};
|
|
110
|
+
declare function Expandable({ children, title, className, isOpen, }: Readonly<Expandable>): React.JSX.Element;
|
|
111
|
+
|
|
112
|
+
type Option = {
|
|
113
|
+
value: string;
|
|
114
|
+
label: string;
|
|
115
|
+
};
|
|
116
|
+
type MultiSelect = {
|
|
117
|
+
label?: string;
|
|
118
|
+
labelHtml?: string;
|
|
119
|
+
outerclass?: string;
|
|
120
|
+
isdarkmode?: boolean;
|
|
121
|
+
options?: Option[];
|
|
122
|
+
stringOptions?: string[];
|
|
123
|
+
state: {
|
|
124
|
+
value: Option[];
|
|
125
|
+
select: (newVal: Option[]) => void;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
declare function MultiSelect({ state, label, labelHtml, ...attr }: Readonly<MultiSelect>): React.JSX.Element;
|
|
129
|
+
|
|
130
|
+
declare function ThemeToggle(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
131
|
+
|
|
132
|
+
declare function Dashboard(): React.JSX.Element;
|
|
133
|
+
|
|
134
|
+
declare function Badge({ text, type, className, }: {
|
|
135
|
+
text: string;
|
|
136
|
+
type: "success" | "danger" | "warning" | "info";
|
|
137
|
+
className?: string;
|
|
138
|
+
}): React.JSX.Element;
|
|
139
|
+
|
|
140
|
+
declare function Skeleton({ className }: {
|
|
141
|
+
className?: string;
|
|
142
|
+
}): React.JSX.Element;
|
|
143
|
+
|
|
144
|
+
declare function Navigation(): React.JSX.Element;
|
|
145
|
+
declare namespace Navigation {
|
|
146
|
+
var URL: (props: {
|
|
147
|
+
list: {
|
|
148
|
+
label: string;
|
|
149
|
+
href: string;
|
|
150
|
+
}[];
|
|
151
|
+
activeUrl: string;
|
|
152
|
+
outerclass?: string;
|
|
153
|
+
CustomComponent?: React.ElementType;
|
|
154
|
+
}) => React.JSX.Element;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare function Confirmation({ type, text, title, secondaryAction, secondaryLabel, mainAction, mainLabel, }: {
|
|
158
|
+
mainAction: () => void;
|
|
159
|
+
secondaryAction?: () => void;
|
|
160
|
+
mainLabel?: string;
|
|
161
|
+
secondaryLabel?: string;
|
|
162
|
+
title: string;
|
|
163
|
+
text: string;
|
|
164
|
+
type?: "info" | "warning" | "danger" | "success";
|
|
165
|
+
}): React.JSX.Element;
|
|
166
|
+
|
|
167
|
+
export { Badge, Button, Card, Confirmation, Dashboard, Expandable, MultiSelect, NavTabClient, Navigation, SingleSelect, Skeleton, Slider, TextInput, ThemeToggle, Toast, Tooltip };
|