@bcrumbs.net/bc-ui 0.0.1
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 +7 -0
- package/index.d.ts +26 -0
- package/index.esm.css +39 -0
- package/index.esm.js +5233 -0
- package/index.umd.css +39 -0
- package/index.umd.js +4756 -0
- package/lib/addButton/bcadd-button.d.ts +11 -0
- package/lib/block/bcblock.d.ts +8 -0
- package/lib/button/bcbutton.d.ts +39 -0
- package/lib/checkbox/bccheckbox.d.ts +9 -0
- package/lib/constants/ButtonSize.d.ts +8 -0
- package/lib/constants/Color.d.ts +32 -0
- package/lib/constants/FontFamily.d.ts +5 -0
- package/lib/constants/IconType.d.ts +187 -0
- package/lib/constants/Key.d.ts +14 -0
- package/lib/constants/KeyCode.d.ts +3 -0
- package/lib/constants/LineHeight.d.ts +10 -0
- package/lib/constants/TextAlign.d.ts +7 -0
- package/lib/constants/TextSize.d.ts +10 -0
- package/lib/constants/TextStyle.d.ts +5 -0
- package/lib/constants/TextWeight.d.ts +7 -0
- package/lib/constants/WhiteSpace.d.ts +12 -0
- package/lib/constants/index.d.ts +10 -0
- package/lib/dropList/bcdrop-list.d.ts +24 -0
- package/lib/dropZone/index.d.ts +11 -0
- package/lib/hooks/useForceUpdate/index.d.ts +2 -0
- package/lib/hooks/useForm/fieldsTypes.d.ts +9 -0
- package/lib/hooks/useForm/index.d.ts +44 -0
- package/lib/hooks/useForm/validationConstant.d.ts +28 -0
- package/lib/hooks/useInterval/index.d.ts +2 -0
- package/lib/hooks/withEnterAnimation/index.d.ts +1 -0
- package/lib/icon/bcicon.d.ts +17 -0
- package/lib/iconButton/index.d.ts +13 -0
- package/lib/loading/loading.d.ts +9 -0
- package/lib/navigation/bcnavigation.d.ts +40 -0
- package/lib/navigation/left-nav/index.d.ts +26 -0
- package/lib/navigation/left-nav/leftNavButton/index.d.ts +13 -0
- package/lib/overlay/index.d.ts +20 -0
- package/lib/popup/index.d.ts +34 -0
- package/lib/progress/index.d.ts +8 -0
- package/lib/scrollArea/index.d.ts +41 -0
- package/lib/searchbox/bcsearchbox.d.ts +9 -0
- package/lib/select/bcselect.d.ts +10 -0
- package/lib/table/bctable.d.ts +60 -0
- package/lib/tagsInput/bctags-input.d.ts +10 -0
- package/lib/text/bctext.d.ts +27 -0
- package/lib/textbox/bctextbox.d.ts +28 -0
- package/lib/toaster/index.d.ts +30 -0
- package/lib/tooltip/TooltipPlacement.d.ts +18 -0
- package/lib/tooltip/TooltipTrigger.d.ts +6 -0
- package/lib/tooltip/index.d.ts +25 -0
- package/package.json +31 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
export interface BCAddButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
btnContent?: string;
|
|
6
|
+
onChange: (ev: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
value?: string;
|
|
8
|
+
onSubmit: () => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const BCAddButton: ({ className, placeholder, value, onSubmit, onChange, }: BCAddButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface BCBlockProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
children?: any;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const BCBlock: ({ className, id, children, height }: BCBlockProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default BCBlock;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LegacyRef, MouseEvent } from 'react';
|
|
2
|
+
import { ButtonSize } from '../constants';
|
|
3
|
+
export interface BCButtonDropListItem {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BCButtonProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
onSubClick?: (key: string) => void;
|
|
11
|
+
text: string;
|
|
12
|
+
text2?: string;
|
|
13
|
+
type?: 'button' | 'submit' | 'reset' | undefined;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
icon?: string;
|
|
17
|
+
hasDropList?: boolean;
|
|
18
|
+
dropListItems?: BCButtonDropListItem[];
|
|
19
|
+
refProp?: LegacyRef<HTMLButtonElement>;
|
|
20
|
+
onClick2?: () => void;
|
|
21
|
+
buttonSize?: ButtonSize;
|
|
22
|
+
buttonType?: string;
|
|
23
|
+
loadingIconPath?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface BCButtonState {
|
|
26
|
+
showDropdown: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const BCButton: {
|
|
29
|
+
({ className, onClick, text, disabled, loading, icon, refProp, hasDropList, onClick2, text2, type, buttonSize, buttonType, loadingIconPath, }: BCButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
30
|
+
defaultProps: {
|
|
31
|
+
className: string;
|
|
32
|
+
text: string;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
hasDropList: boolean;
|
|
36
|
+
dropListItems: undefined;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default BCButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './bccheckbox.scss';
|
|
2
|
+
export interface BCCheckboxProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange?: () => any;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const BCCheckbox: (props: BCCheckboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default BCCheckbox;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare enum Color {
|
|
2
|
+
INHERIT = "inherit",
|
|
3
|
+
PRIMARY = "#2eb582",
|
|
4
|
+
PRIMARY_LIGHTER = "#6fd8ad",
|
|
5
|
+
PRIMARY_DARKER = "#09151e",
|
|
6
|
+
SECONDARY = "#4e4f4f",
|
|
7
|
+
SECONDARY_LIGHT = "#9b9b9b",
|
|
8
|
+
SECONDARY_LIGHT_HOVER = "#191919",
|
|
9
|
+
LIGHT_COLOR = "#ccdbd5",
|
|
10
|
+
DANGER_COLOR = "#b52e2e",
|
|
11
|
+
SUCCESS_COLOR = "#2eb582",
|
|
12
|
+
CONTROLS_COLOR = "#fff",
|
|
13
|
+
PRIMARY90 = "rgba(46, 181, 130, 0.9)",
|
|
14
|
+
PRIMARY80 = "rgba(46, 181, 130, 0.8)",
|
|
15
|
+
PRIMARY60 = "rgba(46, 181, 130, 0.6)",
|
|
16
|
+
PRIMARY40 = "rgba(46, 181, 130, 0.4)",
|
|
17
|
+
PRIMARY30 = "rgba(46, 181, 130, 0.3)",
|
|
18
|
+
PRIMARY20 = "rgba(46, 181, 130, 0.2)",
|
|
19
|
+
PRIMARY10 = "rgba(46, 181, 130, 0.1)",
|
|
20
|
+
PRIMARY05 = "rgba(46, 181, 130, 0.05)",
|
|
21
|
+
SECONDARY90 = "rgb(78, 79, 79, 0.9)",
|
|
22
|
+
SECONDARY80 = "rgb(78, 79, 79, 0.8)",
|
|
23
|
+
SECONDARY60 = "rgb(78, 79, 79, 0.6)",
|
|
24
|
+
SECONDARY50 = "rgb(78, 79, 79, 0.5)",
|
|
25
|
+
SECONDARY40 = "rgb(78, 79, 79, 0.4)",
|
|
26
|
+
SECONDARY30 = "rgb(78, 79, 79, 0.3)",
|
|
27
|
+
SECONDARY20 = "rgb(78, 79, 79, 0.2)",
|
|
28
|
+
SECONDARY10 = "rgb(78, 79, 79, 0.1)",
|
|
29
|
+
SECONDARY05 = "rgb(78, 79, 79, 0.05)",
|
|
30
|
+
PRIMARY_DARKER80 = "rgb(9, 21, 30, 0.8)"
|
|
31
|
+
}
|
|
32
|
+
export default Color;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
export declare enum IconType {
|
|
2
|
+
home = "home",
|
|
3
|
+
color = "color",
|
|
4
|
+
colorPalette = "colorPalette",
|
|
5
|
+
group = "group",
|
|
6
|
+
user = "user",
|
|
7
|
+
users = "users",
|
|
8
|
+
folderMinus = "folderMinus",
|
|
9
|
+
folderPlus = "folderPlus",
|
|
10
|
+
close = "fa fa-times",
|
|
11
|
+
chevronDown = "chevronDown",
|
|
12
|
+
chevronUpSmall = "chevronUpSmall",
|
|
13
|
+
chevronDownSmall = "chevronDownSmall",
|
|
14
|
+
userPlus = "userPlus",
|
|
15
|
+
volume2 = "volume2",
|
|
16
|
+
layout = "layout",
|
|
17
|
+
deleteTrash = "deleteTrash",
|
|
18
|
+
moneySign = "moneySign",
|
|
19
|
+
more = "more",
|
|
20
|
+
moreVertical = "moreVertical",
|
|
21
|
+
circleSlash = "circleSlash",
|
|
22
|
+
checkmarkChecked = "checkmarkChecked",
|
|
23
|
+
checkmarkPartial = "checkmarkPartial",
|
|
24
|
+
checkmarkUnchecked = "checkmarkUnchecked",
|
|
25
|
+
checkmarkUncheckedEmpty = "checkmarkUncheckedEmpty",
|
|
26
|
+
checkmark = "checkmark",
|
|
27
|
+
chevronRightSmall = "chevronRightSmall",
|
|
28
|
+
chevronLeftRight = "chevronLeftRight",
|
|
29
|
+
back = "back",
|
|
30
|
+
name = "name",
|
|
31
|
+
flag = "flag",
|
|
32
|
+
globe = "globe",
|
|
33
|
+
search = "search",
|
|
34
|
+
settings = "settings",
|
|
35
|
+
grid = "grid",
|
|
36
|
+
columns = "columns",
|
|
37
|
+
set = "set",
|
|
38
|
+
setIndividual = "setIndividual",
|
|
39
|
+
star = "star",
|
|
40
|
+
starFull = "starFull",
|
|
41
|
+
edit = "edit",
|
|
42
|
+
edit2 = "edit2",
|
|
43
|
+
edit3 = "edit3",
|
|
44
|
+
info = "fa fa-info",
|
|
45
|
+
visibleNot = "visibleNot",
|
|
46
|
+
pin45 = "pin45",
|
|
47
|
+
pin45Full = "pin45Full",
|
|
48
|
+
share1 = "share1",
|
|
49
|
+
share2 = "share2",
|
|
50
|
+
chevronLeft = "chevronLeft",
|
|
51
|
+
help = "help",
|
|
52
|
+
mail = "mail",
|
|
53
|
+
upload = "upload",
|
|
54
|
+
menu = "menu",
|
|
55
|
+
arrowUp = "arrowUp",
|
|
56
|
+
arrowDown = "arrowDown",
|
|
57
|
+
clock = "clock",
|
|
58
|
+
sortAlphabetical = "sortAlphabetical",
|
|
59
|
+
duplicate = "duplicate",
|
|
60
|
+
userX = "userX",
|
|
61
|
+
forward = "forward",
|
|
62
|
+
save = "save",
|
|
63
|
+
copy = "copy",
|
|
64
|
+
google = "google",
|
|
65
|
+
facebook = "facebook",
|
|
66
|
+
twitter = "twitter",
|
|
67
|
+
youtube = "youtube",
|
|
68
|
+
pinterest = "pinterest",
|
|
69
|
+
instagram = "instagram",
|
|
70
|
+
linkedin = "linkedin",
|
|
71
|
+
yahoo = "yahoo",
|
|
72
|
+
paper = "paper",
|
|
73
|
+
rolesAndRights = "rolesAndRights",
|
|
74
|
+
customBranding = "customBranding",
|
|
75
|
+
brandControl = "brandControl",
|
|
76
|
+
settingsSliders = "settingsSliders",
|
|
77
|
+
minus = "minus",
|
|
78
|
+
download = "download",
|
|
79
|
+
html5 = "html5",
|
|
80
|
+
mp4 = "mp4",
|
|
81
|
+
pdf = "pdf",
|
|
82
|
+
amp = "amp",
|
|
83
|
+
gif = "gif",
|
|
84
|
+
warning = "fa fa-exclamation-triangle",
|
|
85
|
+
visible = "visible",
|
|
86
|
+
lowQuality = "lowQuality",
|
|
87
|
+
mediumQuality = "mediumQuality",
|
|
88
|
+
highQuality = "highQuality",
|
|
89
|
+
maximumQuality = "maximumQuality",
|
|
90
|
+
optimizedQuality = "optimizedQuality",
|
|
91
|
+
layoutVertical = "layoutVertical",
|
|
92
|
+
plusBig = "plusBig",
|
|
93
|
+
brandKit = "brandKit",
|
|
94
|
+
premiumBadge = "premiumBadge",
|
|
95
|
+
premium = "premium",
|
|
96
|
+
creditCard = "creditCard",
|
|
97
|
+
moveToFolder1 = "moveToFolder1",
|
|
98
|
+
loadingSpinner = "loadingSpinner",
|
|
99
|
+
layoutSquare = "layoutSquare",
|
|
100
|
+
layoutHorizontal = "layoutHorizontal",
|
|
101
|
+
lock = "lock",
|
|
102
|
+
smartphone = "smartphone",
|
|
103
|
+
etsy = "etsy",
|
|
104
|
+
soundcloud = "soundcloud",
|
|
105
|
+
twitch = "twitch",
|
|
106
|
+
carousel = "carousel",
|
|
107
|
+
brochure = "brochure",
|
|
108
|
+
businessCard = "businessCard",
|
|
109
|
+
card = "card",
|
|
110
|
+
flyer = "flyer",
|
|
111
|
+
invitation = "invitation",
|
|
112
|
+
letterhead = "letterhead",
|
|
113
|
+
magazineCover = "magazineCover",
|
|
114
|
+
poster = "poster",
|
|
115
|
+
certificate = "certificate",
|
|
116
|
+
resume = "resume",
|
|
117
|
+
logo = "logo",
|
|
118
|
+
bookOpen = "bookOpen",
|
|
119
|
+
book = "book",
|
|
120
|
+
albumCover = "albumCover",
|
|
121
|
+
slideshow = "slideshow",
|
|
122
|
+
fhdSlideshow = "fhdSlideshow",
|
|
123
|
+
video = "video",
|
|
124
|
+
customSize = "customSize",
|
|
125
|
+
zoomToFit = "zoomToFit",
|
|
126
|
+
zoomOneToOne = "zoomOneToOne",
|
|
127
|
+
scaledPreview = "scaledPreview",
|
|
128
|
+
playFull = "playFull",
|
|
129
|
+
play = "play",
|
|
130
|
+
stop = "stop",
|
|
131
|
+
pause = "pause",
|
|
132
|
+
resetPlayPositionSkipBack = "resetPlayPositionSkipBack",
|
|
133
|
+
plusWide = "plusWide",
|
|
134
|
+
exit = "exit",
|
|
135
|
+
resize = "resize",
|
|
136
|
+
vector = "vector",
|
|
137
|
+
unlink = "unlink",
|
|
138
|
+
text = "text",
|
|
139
|
+
target = "target",
|
|
140
|
+
tag = "tag",
|
|
141
|
+
button = "button",
|
|
142
|
+
refresh = "refresh",
|
|
143
|
+
playWithCircle = "playWithCircle",
|
|
144
|
+
pauseWithCircle = "pauseWithCircle",
|
|
145
|
+
replay = "replay",
|
|
146
|
+
chevronRight = "chevronRight",
|
|
147
|
+
feed = "feed",
|
|
148
|
+
list = "list",
|
|
149
|
+
repeat = "repeat",
|
|
150
|
+
refreshccw = "refreshccw",
|
|
151
|
+
penTool = "penTool",
|
|
152
|
+
cornerLeftUpArrowEnabled = "cornerLeftUpArrowEnabled",
|
|
153
|
+
cornerRightBottomArrow = "cornerRightBottomArrow",
|
|
154
|
+
command = "command",
|
|
155
|
+
control = "control",
|
|
156
|
+
letterF = "letterF",
|
|
157
|
+
videoPlay = "videoPlay",
|
|
158
|
+
attachment = "attachment",
|
|
159
|
+
comment = "comment",
|
|
160
|
+
commentPin2 = "commentPin2",
|
|
161
|
+
commentNew = "commentNew",
|
|
162
|
+
adTag = "adTag",
|
|
163
|
+
aA = "aA",
|
|
164
|
+
calendar = "calendar",
|
|
165
|
+
sad = "sad",
|
|
166
|
+
app = "app",
|
|
167
|
+
union = "union",
|
|
168
|
+
bgRemove = "bgRemove",
|
|
169
|
+
thumbsUp = "thumbsUp",
|
|
170
|
+
thumbsDown = "thumbsDown",
|
|
171
|
+
key = "key",
|
|
172
|
+
approval = "approval",
|
|
173
|
+
psdFile = "psdFile",
|
|
174
|
+
letterT = "letterT",
|
|
175
|
+
letterT2 = "letterT2",
|
|
176
|
+
show = "fa fa-eye",
|
|
177
|
+
hide = "fa fa-eye-slash",
|
|
178
|
+
exclamation = "fa fa-exclamation-circle",
|
|
179
|
+
folder = "fa fa-folder-o",
|
|
180
|
+
file = "fa fa-file-o",
|
|
181
|
+
levelUp = "fa fa-level-up",
|
|
182
|
+
plus = "fa fa-plus-square-o",
|
|
183
|
+
image = "fa fa-file-image-o",
|
|
184
|
+
externalLink = "fa fa-external-link",
|
|
185
|
+
link = "fa fa-link"
|
|
186
|
+
}
|
|
187
|
+
export default IconType;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum Key {
|
|
2
|
+
Enter = "Enter",
|
|
3
|
+
NumpadEnter = "NumpadEnter",
|
|
4
|
+
Escape = "Escape",
|
|
5
|
+
ArrowLeft = "ArrowLeft",
|
|
6
|
+
ArrowRight = "ArrowRight",
|
|
7
|
+
ArrowUp = "ArrowUp",
|
|
8
|
+
ArrowDown = "ArrowDown",
|
|
9
|
+
Meta = "Meta",
|
|
10
|
+
Backspace = "Backspace",
|
|
11
|
+
Delete = "Delete",
|
|
12
|
+
Tab = "Tab"
|
|
13
|
+
}
|
|
14
|
+
export default Key;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum WhiteSpace {
|
|
2
|
+
NORMAL = "normal",
|
|
3
|
+
NOWRAP = "nowrap",
|
|
4
|
+
PRE = "pre",
|
|
5
|
+
PRE_WRAP = "pre-wrap",
|
|
6
|
+
PRE_LINE = "pre-line",
|
|
7
|
+
BREAK_SPACES = "break-spaces",
|
|
8
|
+
INHERIT = "inherit",
|
|
9
|
+
INITIAL = "initial",
|
|
10
|
+
UNSET = "unset"
|
|
11
|
+
}
|
|
12
|
+
export default WhiteSpace;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Color';
|
|
2
|
+
export * from './FontFamily';
|
|
3
|
+
export * from './IconType';
|
|
4
|
+
export * from './LineHeight';
|
|
5
|
+
export * from './TextAlign';
|
|
6
|
+
export * from './TextSize';
|
|
7
|
+
export * from './TextStyle';
|
|
8
|
+
export * from './TextWeight';
|
|
9
|
+
export * from './WhiteSpace';
|
|
10
|
+
export * from './ButtonSize';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BCDropListOptionsType {
|
|
2
|
+
icon?: string;
|
|
3
|
+
text: string;
|
|
4
|
+
styleClass?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
note?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BCDropListProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
selected: string;
|
|
11
|
+
options: BCDropListOptionsType[];
|
|
12
|
+
onSelectOption: (value?: string) => void;
|
|
13
|
+
noEmpty?: boolean;
|
|
14
|
+
emptyText?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const BCDropList: {
|
|
18
|
+
({ className, selected, options, onSelectOption, noEmpty, placeholder, emptyText }: BCDropListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
defaultProps: {
|
|
20
|
+
className: string;
|
|
21
|
+
noEmpty: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default BCDropList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export interface BCDropZoneProps {
|
|
3
|
+
onDrop: (acceptedFiles: File[], rejectedFiles: File[]) => void;
|
|
4
|
+
onDragEnter: () => void;
|
|
5
|
+
onDragLeave: () => void;
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
acceptedFileTypes: string[];
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const BCDropZone: ({ children, onDrop, onDragEnter, onDragLeave, multiple, acceptedFileTypes, maxSize, }: PropsWithChildren<BCDropZoneProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default BCDropZone;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BCValidationTypes } from './validationConstant';
|
|
3
|
+
import { BCDropListOptionsType } from '../../dropList/bcdrop-list';
|
|
4
|
+
export declare const FormGroup: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: React.ElementType<any> | undefined;
|
|
7
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
interface FormData {
|
|
9
|
+
value: string;
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
message: string;
|
|
12
|
+
validations?: FormValidation[];
|
|
13
|
+
}
|
|
14
|
+
interface FormField {
|
|
15
|
+
value: string;
|
|
16
|
+
validations?: FormValidation[];
|
|
17
|
+
}
|
|
18
|
+
interface FormValidation {
|
|
19
|
+
validationType: BCValidationTypes;
|
|
20
|
+
additionalParam?: string;
|
|
21
|
+
}
|
|
22
|
+
type FieldType = 'password' | 'text' | 'number' | 'boolean' | 'droplist' | 'file' | 'email';
|
|
23
|
+
interface useBCFormReturnFunctions {
|
|
24
|
+
setFieldValue: (name: string, value: string, validations?: FormValidation[]) => void;
|
|
25
|
+
setFieldError: (name: string, error: string) => void;
|
|
26
|
+
validateField: (key: string, validationType: BCValidationTypes, additionalParam?: string) => boolean;
|
|
27
|
+
validateForm: () => boolean;
|
|
28
|
+
onChange: (targetVal: string, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
29
|
+
resetValidationStates: () => void;
|
|
30
|
+
renderField: (name: string, label: string, type: FieldType, readonly?: boolean, placeholder?: string, tooltip?: string) => JSX.Element;
|
|
31
|
+
_renderFieldInput: (name: string, type: FieldType, readonly: boolean, placeholder: string) => JSX.Element;
|
|
32
|
+
onDroplistSelectionChange: (name: string, selectedKey?: string) => void;
|
|
33
|
+
renderDroplistField: (name: string, label: string, options: BCDropListOptionsType[], placeholder?: string, tooltip?: string) => JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
type useMBFormReturnType = [
|
|
36
|
+
{
|
|
37
|
+
[key: string]: FormData;
|
|
38
|
+
},
|
|
39
|
+
useBCFormReturnFunctions
|
|
40
|
+
];
|
|
41
|
+
export declare const useBCForm: (formInitialValue?: {
|
|
42
|
+
[key: string]: FormField;
|
|
43
|
+
} | undefined, t?: any) => useMBFormReturnType;
|
|
44
|
+
export default useBCForm;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const BCValidations: {
|
|
2
|
+
emailValidation: RegExp;
|
|
3
|
+
passwordValidation: RegExp;
|
|
4
|
+
urlValidation: RegExp;
|
|
5
|
+
phoneNumberValidation: RegExp;
|
|
6
|
+
turkishIdentity: RegExp;
|
|
7
|
+
licencePlate: RegExp;
|
|
8
|
+
domain: RegExp;
|
|
9
|
+
};
|
|
10
|
+
export declare const BCDefaultValidationMessages: {
|
|
11
|
+
emailMessage: string;
|
|
12
|
+
domainMessage: string;
|
|
13
|
+
passwordMessage: string;
|
|
14
|
+
confirmPasswordMessage: string;
|
|
15
|
+
nameMessage: string;
|
|
16
|
+
emptyMessage: string;
|
|
17
|
+
urlMessage: string;
|
|
18
|
+
usernameMessage: string;
|
|
19
|
+
};
|
|
20
|
+
export declare enum BCValidationTypes {
|
|
21
|
+
NOT_EMPTY = "NOT_EMPTY",
|
|
22
|
+
EMAIL = "EMAIL",
|
|
23
|
+
PASSWORD = "PASSWORD",
|
|
24
|
+
CONFIRM_PASSWORD = "CONFIRM_PASSWORD",
|
|
25
|
+
NAME_2_LETTERS = "NAME_2_LETTERS",
|
|
26
|
+
TURKISH_IDENTITY = "TURKISH_IDENTITY",
|
|
27
|
+
DOMAIN = "DOMAIN"
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const withEnterAnimation: () => (BaseComponent: any) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Color from '../constants/Color';
|
|
2
|
+
import IconType from '../constants/IconType';
|
|
3
|
+
export declare enum IconSize {
|
|
4
|
+
XXL = 72,
|
|
5
|
+
XL = 42,
|
|
6
|
+
L = 28,
|
|
7
|
+
M = 18,
|
|
8
|
+
S = 14
|
|
9
|
+
}
|
|
10
|
+
export type IconProps = {
|
|
11
|
+
icon: IconType;
|
|
12
|
+
size?: IconSize;
|
|
13
|
+
color?: Color;
|
|
14
|
+
className?: string;
|
|
15
|
+
dataQA?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function BCIcon({ icon, size, color, className, dataQA, }: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import IconType from '../constants/IconType';
|
|
3
|
+
import { IconSize } from '../icon/bcicon';
|
|
4
|
+
import { Color } from '../constants/Color';
|
|
5
|
+
export type IconButtonProps = {
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
size?: IconSize;
|
|
8
|
+
icon: IconType;
|
|
9
|
+
tooltipContent?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
color?: Color;
|
|
12
|
+
};
|
|
13
|
+
export declare function IconButton({ onClick, icon, size, tooltipContent, className, color, }: PropsWithChildren<IconButtonProps>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'react-loader-spinner/dist/loader/css/react-spinner-loader.css';
|
|
2
|
+
export interface LoadingProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
showBox?: boolean;
|
|
5
|
+
blurContainer?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const BCLoading: ({ className, showBox, blurContainer, color, }: LoadingProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default BCLoading;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface BCNavigationProps {
|
|
2
|
+
brand: string;
|
|
3
|
+
handleLeftNavItemClick: (event: any, viewName: string) => void;
|
|
4
|
+
navModel: {
|
|
5
|
+
brand: string;
|
|
6
|
+
leftLinks: Array<{
|
|
7
|
+
label: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
toolTip?: string;
|
|
10
|
+
activeIcon?: string;
|
|
11
|
+
link: string;
|
|
12
|
+
view: string;
|
|
13
|
+
isRouteBtn: boolean;
|
|
14
|
+
alwaysShows: boolean;
|
|
15
|
+
showWhenUserAuth: boolean;
|
|
16
|
+
hideWhenUserAuth: boolean;
|
|
17
|
+
anotherWebsite?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
}>;
|
|
20
|
+
leftBottomLinks: Array<{
|
|
21
|
+
label: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
toolTip?: string;
|
|
24
|
+
activeIcon?: string;
|
|
25
|
+
link: string;
|
|
26
|
+
view: string;
|
|
27
|
+
isRouteBtn: boolean;
|
|
28
|
+
alwaysShows: boolean;
|
|
29
|
+
showWhenUserAuth: boolean;
|
|
30
|
+
hideWhenUserAuth: boolean;
|
|
31
|
+
anotherWebsite?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
location: any;
|
|
36
|
+
name?: string;
|
|
37
|
+
surname?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const BCNavigation: ({ brand, navModel, handleLeftNavItemClick, name, surname, location, }: BCNavigationProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default BCNavigation;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type NavItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
icon: string;
|
|
4
|
+
toolTip?: string;
|
|
5
|
+
activeIcon?: string;
|
|
6
|
+
link: string;
|
|
7
|
+
view: string;
|
|
8
|
+
isRouteBtn: boolean;
|
|
9
|
+
alwaysShows: boolean;
|
|
10
|
+
showWhenUserAuth?: boolean;
|
|
11
|
+
hideWhenUserAuth?: boolean;
|
|
12
|
+
anotherWebsite?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export type Props = {
|
|
16
|
+
leftLinks: Array<NavItem>;
|
|
17
|
+
onLeftNavButtonClick: (event: any, viewName: string) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
location: any;
|
|
20
|
+
brand: string;
|
|
21
|
+
};
|
|
22
|
+
declare const LeftNav: {
|
|
23
|
+
({ leftLinks, onLeftNavButtonClick, className, location, }: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export default LeftNav;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type Props = {
|
|
2
|
+
link: string;
|
|
3
|
+
label: string;
|
|
4
|
+
viewName: string;
|
|
5
|
+
onClick: (event: any, viewName: string) => void;
|
|
6
|
+
active: boolean;
|
|
7
|
+
activeIcon?: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
anotherWebsite?: boolean;
|
|
10
|
+
toolTip?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const LeftNavButton: ({ link, label, viewName, onClick, active, activeIcon, icon, anotherWebsite, toolTip, }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default LeftNavButton;
|