acsi-core 0.1.2 → 0.1.3
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/components/CoreButton/index.d.ts +3 -1
- package/dist/components/CoreInput/index.d.ts +6 -0
- package/dist/components/CoreModal/index.d.ts +1 -0
- package/dist/components/CoreRange/index.d.ts +14 -0
- package/dist/components/CoreSelect/index.d.ts +1 -0
- package/dist/components/CoreTextArea/index.d.ts +13 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +82 -43
- package/dist/index.d.ts +3 -3
- package/dist/index.js +133 -34
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +131 -35
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/commons/action.d.ts +1 -0
- package/package.json +2 -1
|
@@ -2,9 +2,11 @@ import React from "react";
|
|
|
2
2
|
interface IProps {
|
|
3
3
|
type?: "primary" | "secondary" | "text";
|
|
4
4
|
children: string | JSX.Element;
|
|
5
|
-
onClick?:
|
|
5
|
+
onClick?: any;
|
|
6
6
|
icon?: JSX.Element | string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
background?: string;
|
|
9
|
+
color?: string;
|
|
8
10
|
}
|
|
9
11
|
declare const CoreButton: (props: IProps) => React.JSX.Element;
|
|
10
12
|
export default CoreButton;
|
|
@@ -2,12 +2,18 @@ import React from "react";
|
|
|
2
2
|
interface IProps {
|
|
3
3
|
name: string;
|
|
4
4
|
value: string;
|
|
5
|
+
type?: "no-outline" | "outline";
|
|
5
6
|
onChange: (name: string, value: string) => void;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
label?: string;
|
|
8
9
|
width?: number;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
error?: boolean;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
fontSize?: string;
|
|
14
|
+
fontWeight?: string;
|
|
15
|
+
onKeyDown?: (e: any) => void;
|
|
16
|
+
ref?: any;
|
|
11
17
|
}
|
|
12
18
|
declare const CoreInput: (props: IProps) => React.JSX.Element;
|
|
13
19
|
export default CoreInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
onChange: (name: string, value: number) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const CoreRange: (props: IProps) => React.JSX.Element;
|
|
14
|
+
export default CoreRange;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (name: string, value: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
cols?: number;
|
|
9
|
+
rows?: number;
|
|
10
|
+
width?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const CoreTextArea: (props: IProps) => React.JSX.Element;
|
|
13
|
+
export default CoreTextArea;
|
|
@@ -5,3 +5,5 @@ export { default as CoreCheckbox } from "./CoreCheckbox";
|
|
|
5
5
|
export { default as CoreRadio } from "./CoreRadio";
|
|
6
6
|
export { default as CoreError } from "./CoreError";
|
|
7
7
|
export { default as CoreModal } from "./CoreModal";
|
|
8
|
+
export { default as CoreRange } from "./CoreRange";
|
|
9
|
+
export { default as CoreTextArea } from "./CoreTextArea";
|
package/dist/index.css
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Nunito+Sans:wght@400;700&display=swap");
|
|
2
1
|
._1KLz9 {
|
|
3
|
-
margin: 40px
|
|
2
|
+
margin: 40px;
|
|
4
3
|
height: 90vh;
|
|
5
4
|
position: fixed;
|
|
6
5
|
top: 0;
|
|
7
6
|
left: 0;
|
|
8
7
|
right: 0;
|
|
9
8
|
bottom: 0;
|
|
10
|
-
font-family:
|
|
9
|
+
font-family: "Nunito", sans-serif; }
|
|
11
10
|
._1KLz9 ._2Jo1o {
|
|
12
11
|
width: 324px;
|
|
13
12
|
text-align: center; }
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
margin-bottom: 19px; }
|
|
39
38
|
._1KLz9 ._2Jo1o ._2e9xO {
|
|
40
39
|
font-size: 13px;
|
|
41
|
-
color: #
|
|
40
|
+
color: #c6c6cc;
|
|
42
41
|
height: 18px;
|
|
43
42
|
width: 100%;
|
|
44
43
|
position: relative;
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
gap: 8px; }
|
|
49
48
|
._1KLz9 ._2Jo1o ._2e9xO::before,
|
|
50
49
|
._1KLz9 ._2Jo1o ._2e9xO::after {
|
|
51
|
-
content:
|
|
50
|
+
content: "";
|
|
52
51
|
display: block;
|
|
53
52
|
width: 144px;
|
|
54
53
|
height: 1px;
|
|
@@ -72,7 +71,7 @@
|
|
|
72
71
|
height: 48px;
|
|
73
72
|
padding: 15px 16px; }
|
|
74
73
|
._1KLz9 ._2Jo1o ._21FPk {
|
|
75
|
-
background-color: #
|
|
74
|
+
background-color: #e5f9ff;
|
|
76
75
|
font-size: 16px;
|
|
77
76
|
font-weight: 600;
|
|
78
77
|
border-radius: 12px;
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
left: 0; }
|
|
104
103
|
._1KLz9 ._3qndF {
|
|
105
104
|
border-radius: 40px;
|
|
106
|
-
background-repeat:
|
|
105
|
+
background-repeat: "no-repeat";
|
|
107
106
|
background-position: center;
|
|
108
107
|
background-size: cover;
|
|
109
108
|
position: relative;
|
|
@@ -111,6 +110,9 @@
|
|
|
111
110
|
._1KLz9 ._3qndF ._JzdCr {
|
|
112
111
|
padding-top: 64px;
|
|
113
112
|
padding-left: 56px; }
|
|
113
|
+
@media (min-width: 1024px) {
|
|
114
|
+
._1KLz9 ._3qndF ._JzdCr {
|
|
115
|
+
padding-right: 21px; } }
|
|
114
116
|
._1KLz9 ._3qndF ._19aCA {
|
|
115
117
|
display: flex;
|
|
116
118
|
position: absolute;
|
|
@@ -125,20 +127,27 @@
|
|
|
125
127
|
border: none;
|
|
126
128
|
line-height: 18px;
|
|
127
129
|
font-weight: 600;
|
|
128
|
-
padding: 7px 12px;
|
|
130
|
+
padding: 7px 12px;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
transition: all .3s; }
|
|
134
|
+
._xvNBN svg {
|
|
135
|
+
margin-right: 4px; }
|
|
129
136
|
._xvNBN:disabled {
|
|
130
|
-
pointer-events: none;
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
pointer-events: none; }
|
|
138
|
+
._xvNBN:disabled path {
|
|
139
|
+
fill: #585869; }
|
|
133
140
|
|
|
134
141
|
._U9Qyp {
|
|
135
142
|
background-color: #025675;
|
|
136
143
|
color: #FFFFFF; }
|
|
144
|
+
._U9Qyp path {
|
|
145
|
+
fill: #FFFFFF; }
|
|
137
146
|
._U9Qyp:hover {
|
|
138
147
|
background-color: #007A99; }
|
|
139
148
|
|
|
140
149
|
._1VzMy {
|
|
141
|
-
background-color: #
|
|
150
|
+
background-color: #F5F9FA;
|
|
142
151
|
color: #101129; }
|
|
143
152
|
._1VzMy:hover {
|
|
144
153
|
background-color: #E6E6EB; }
|
|
@@ -154,31 +163,51 @@
|
|
|
154
163
|
font-size: 13px;
|
|
155
164
|
font-weight: 600;
|
|
156
165
|
margin-bottom: 4px; }
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
|
|
167
|
+
._3X2RJ input {
|
|
168
|
+
border-radius: 8px;
|
|
169
|
+
border: 1px solid #E6E6EB;
|
|
170
|
+
height: 32px;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
padding: 7px 12px; }
|
|
174
|
+
._3X2RJ input:disabled {
|
|
175
|
+
pointer-events: none;
|
|
176
|
+
background-color: #F5F9FA; }
|
|
177
|
+
._3X2RJ input:focus-visible {
|
|
178
|
+
border: 2px solid #00AFDA;
|
|
179
|
+
outline: none; }
|
|
180
|
+
._3X2RJ input::-moz-placeholder {
|
|
181
|
+
color: #A6A6AD; }
|
|
182
|
+
._3X2RJ input::placeholder {
|
|
183
|
+
color: #A6A6AD; }
|
|
184
|
+
._3X2RJ input:hover {
|
|
185
|
+
background-color: #F5F9FA; }
|
|
186
|
+
|
|
187
|
+
._bVYtv input {
|
|
188
|
+
border: none;
|
|
189
|
+
outline: none;
|
|
190
|
+
color: #A6A6AD; }
|
|
191
|
+
._bVYtv input::-moz-placeholder {
|
|
192
|
+
color: #A6A6AD; }
|
|
193
|
+
._bVYtv input::placeholder {
|
|
194
|
+
color: #A6A6AD; }
|
|
176
195
|
|
|
177
196
|
._n7n3Q input {
|
|
178
197
|
border-color: #CE3636; }
|
|
179
198
|
._n7n3Q input:focus-visible {
|
|
180
199
|
border-color: #CE3636; }
|
|
181
200
|
|
|
201
|
+
._1Mmxr {
|
|
202
|
+
display: flex;
|
|
203
|
+
color: #CE3636;
|
|
204
|
+
margin-top: 2px; }
|
|
205
|
+
._1Mmxr p {
|
|
206
|
+
font-size: 13px;
|
|
207
|
+
font-weight: 400;
|
|
208
|
+
margin: 0;
|
|
209
|
+
margin-left: 4px; }
|
|
210
|
+
|
|
182
211
|
._2sg12 {
|
|
183
212
|
display: flex;
|
|
184
213
|
flex-direction: column; }
|
|
@@ -197,7 +226,8 @@
|
|
|
197
226
|
width: 16px;
|
|
198
227
|
height: 16px;
|
|
199
228
|
border-radius: 4px !important;
|
|
200
|
-
border: 1px solid #A6A6AD;
|
|
229
|
+
border: 1px solid #A6A6AD;
|
|
230
|
+
transition: all .3s; }
|
|
201
231
|
._3HY4f input:focus {
|
|
202
232
|
box-shadow: none; }
|
|
203
233
|
._3HY4f input:checked {
|
|
@@ -220,7 +250,8 @@
|
|
|
220
250
|
width: 16px;
|
|
221
251
|
height: 16px;
|
|
222
252
|
border-radius: 4px;
|
|
223
|
-
border: 1px solid #A6A6AD;
|
|
253
|
+
border: 1px solid #A6A6AD;
|
|
254
|
+
transition: all .3s; }
|
|
224
255
|
._kvUpe input:focus {
|
|
225
256
|
box-shadow: none; }
|
|
226
257
|
._kvUpe input:checked {
|
|
@@ -232,18 +263,26 @@
|
|
|
232
263
|
._kvUpe input:not(:checked):not(:disabled):hover {
|
|
233
264
|
background-color: #E6E6EB; }
|
|
234
265
|
|
|
235
|
-
._1Mmxr {
|
|
236
|
-
display: flex;
|
|
237
|
-
color: #CE3636;
|
|
238
|
-
margin-top: 2px; }
|
|
239
|
-
._1Mmxr p {
|
|
240
|
-
font-size: 13px;
|
|
241
|
-
font-weight: 400;
|
|
242
|
-
margin: 0;
|
|
243
|
-
margin-left: 4px; }
|
|
244
|
-
|
|
245
266
|
._2y5ln {
|
|
246
267
|
padding: 16px 24px !important; }
|
|
247
268
|
._2y5ln h5 {
|
|
248
269
|
font-size: 18px;
|
|
249
270
|
font-weight: 700; }
|
|
271
|
+
|
|
272
|
+
._1dzD7 {
|
|
273
|
+
display: flex;
|
|
274
|
+
flex-direction: column; }
|
|
275
|
+
._1dzD7 label {
|
|
276
|
+
font-size: 13px;
|
|
277
|
+
font-weight: 600;
|
|
278
|
+
margin-bottom: 4px; }
|
|
279
|
+
|
|
280
|
+
._1b_C3 textarea {
|
|
281
|
+
border: none;
|
|
282
|
+
outline: none;
|
|
283
|
+
border-radius: 8px;
|
|
284
|
+
border: 1px solid #E6E6EB;
|
|
285
|
+
padding: 8px 12px;
|
|
286
|
+
color: #a6a6ad;
|
|
287
|
+
font-size: 14px;
|
|
288
|
+
font-weight: 400; }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const historyCore: import("history").History<unknown>;
|
|
2
|
-
import { setLoading, setAlert, setUser } from "./redux/commons/action";
|
|
2
|
+
import { setLoading, setAlert, setUser, setMenuCollapse } from "./redux/commons/action";
|
|
3
3
|
import { BASE_URL, ACCESS_TOKEN } from "./utils/constants";
|
|
4
4
|
import Login from "./containers/Login/views/Login";
|
|
5
5
|
import store from "./store";
|
|
@@ -13,10 +13,10 @@ import { ToastContainer, toast } from "react-toastify";
|
|
|
13
13
|
import { Role } from "./containers/Login/configs/constants";
|
|
14
14
|
import CustomPagination from "./components/Paginations/CustomPagination";
|
|
15
15
|
import useGoogleSignOut from "./utils/hooks/useGoogleSignOut";
|
|
16
|
-
import { CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal } from "./components";
|
|
16
|
+
import { CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea } from "./components";
|
|
17
17
|
import { getErrorMessage } from "./utils/getErrorMessage";
|
|
18
18
|
import CustomSelect from "./components/Selects/CustomSelect";
|
|
19
19
|
import CustomAsyncSelect from "./components/Selects/CustomAsyncSelect";
|
|
20
20
|
import CustomCreatable from "./components/Selects/CustomCreatable";
|
|
21
21
|
import CustomSelectOption from "./components/Selects/CustomSelectOption";
|
|
22
|
-
export { setLoading, BASE_URL, ACCESS_TOKEN, Login, store, historyCore, setAlert, setUser, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption };
|
|
22
|
+
export { setLoading, BASE_URL, ACCESS_TOKEN, Login, store, historyCore, setAlert, setUser, setMenuCollapse, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption };
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var setAlert = toolkit.createAction("common/setAlert");
|
|
|
24
24
|
var setUser = toolkit.createAction("common/setUser");
|
|
25
25
|
var setLanguage = toolkit.createAction("common/setLanguage");
|
|
26
26
|
var reset = toolkit.createAction("common/reset");
|
|
27
|
+
var setMenuCollapse = toolkit.createAction("common/setMenuCollapse");
|
|
27
28
|
|
|
28
29
|
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
|
29
30
|
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
|
@@ -529,7 +530,8 @@ var initialState = {
|
|
|
529
530
|
message: ""
|
|
530
531
|
},
|
|
531
532
|
user: null,
|
|
532
|
-
academy: null
|
|
533
|
+
academy: null,
|
|
534
|
+
menuCollapse: false
|
|
533
535
|
};
|
|
534
536
|
var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
535
537
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -542,6 +544,8 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
|
542
544
|
state.language = action.payload;
|
|
543
545
|
}).addCase(reset, function (_state, _action) {
|
|
544
546
|
return initialState;
|
|
547
|
+
}).addCase(setMenuCollapse, function (state, action) {
|
|
548
|
+
state.menuCollapse = action.payload;
|
|
545
549
|
});
|
|
546
550
|
});
|
|
547
551
|
|
|
@@ -950,40 +954,81 @@ var CoreButton = function CoreButton(props) {
|
|
|
950
954
|
onClick = props.onClick,
|
|
951
955
|
icon = props.icon,
|
|
952
956
|
_props$disabled = props.disabled,
|
|
953
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled
|
|
957
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
958
|
+
_props$background = props.background,
|
|
959
|
+
background = _props$background === void 0 ? "#F5F9FA" : _props$background,
|
|
960
|
+
_props$color = props.color,
|
|
961
|
+
color = _props$color === void 0 ? "#585869" : _props$color;
|
|
954
962
|
return React__default.createElement("button", {
|
|
955
963
|
className: styles["core-button"] + " " + styles[type],
|
|
964
|
+
style: {
|
|
965
|
+
"background": background,
|
|
966
|
+
"color": color
|
|
967
|
+
},
|
|
956
968
|
onClick: onClick,
|
|
957
969
|
disabled: disabled
|
|
958
970
|
}, icon && icon, children);
|
|
959
971
|
};
|
|
960
972
|
|
|
961
|
-
var styles$1 = {"core-input":"_1WdX2","error":"_n7n3Q"};
|
|
973
|
+
var styles$1 = {"core-input":"_1WdX2","outline":"_3X2RJ","no-outline":"_bVYtv","error":"_n7n3Q"};
|
|
974
|
+
|
|
975
|
+
var styles$2 = {"core-error":"_1Mmxr"};
|
|
976
|
+
|
|
977
|
+
var icons = {
|
|
978
|
+
ErrorRedIcon: "/images/icons/error_red.svg"
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
var CoreError = function CoreError(props) {
|
|
982
|
+
var message = props.message;
|
|
983
|
+
return React__default.createElement("div", {
|
|
984
|
+
className: "" + styles$2["core-error"]
|
|
985
|
+
}, React__default.createElement("img", {
|
|
986
|
+
src: icons.ErrorRedIcon,
|
|
987
|
+
alt: "error-icon"
|
|
988
|
+
}), React__default.createElement("p", null, message));
|
|
989
|
+
};
|
|
962
990
|
|
|
963
991
|
var CoreInput = function CoreInput(props) {
|
|
964
992
|
var name = props.name,
|
|
965
993
|
value = props.value,
|
|
966
994
|
_onChange = props.onChange,
|
|
995
|
+
_props$type = props.type,
|
|
996
|
+
type = _props$type === void 0 ? "outline" : _props$type,
|
|
967
997
|
_props$disabled = props.disabled,
|
|
968
998
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
969
999
|
label = props.label,
|
|
970
1000
|
width = props.width,
|
|
971
1001
|
_props$placeholder = props.placeholder,
|
|
972
1002
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
973
|
-
error = props.error
|
|
1003
|
+
error = props.error,
|
|
1004
|
+
_props$errorMessage = props.errorMessage,
|
|
1005
|
+
errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage,
|
|
1006
|
+
fontSize = props.fontSize,
|
|
1007
|
+
fontWeight = props.fontWeight,
|
|
1008
|
+
_onKeyDown = props.onKeyDown,
|
|
1009
|
+
ref = props.ref;
|
|
974
1010
|
return React__default.createElement("div", {
|
|
975
|
-
className: styles$1["core-input"] + " " + (error ? styles$1["error"] : ""),
|
|
1011
|
+
className: styles$1["core-input"] + " " + styles$1[type] + " " + (error ? styles$1["error"] : ""),
|
|
976
1012
|
style: {
|
|
977
1013
|
width: width != null ? width : "100%"
|
|
978
1014
|
}
|
|
979
|
-
}, label && React__default.createElement("label", null, label), React__default.createElement("input", {
|
|
1015
|
+
}, label && React__default.createElement("label", null, label), React__default.createElement("input", Object.assign({
|
|
1016
|
+
style: {
|
|
1017
|
+
fontSize: fontSize,
|
|
1018
|
+
fontWeight: fontWeight
|
|
1019
|
+
},
|
|
980
1020
|
name: name,
|
|
981
1021
|
value: value,
|
|
982
1022
|
onChange: function onChange(e) {
|
|
983
1023
|
return _onChange(name, e.target.value);
|
|
984
1024
|
},
|
|
985
1025
|
disabled: disabled,
|
|
986
|
-
placeholder: placeholder
|
|
1026
|
+
placeholder: placeholder,
|
|
1027
|
+
onKeyDown: function onKeyDown(e) {
|
|
1028
|
+
return _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
|
|
1029
|
+
}
|
|
1030
|
+
}, ref)), error && React__default.createElement(CoreError, {
|
|
1031
|
+
message: errorMessage
|
|
987
1032
|
}));
|
|
988
1033
|
};
|
|
989
1034
|
|
|
@@ -1006,7 +1051,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
1006
1051
|
return t;
|
|
1007
1052
|
}
|
|
1008
1053
|
|
|
1009
|
-
var styles$
|
|
1054
|
+
var styles$3 = {"core-select":"_2sg12"};
|
|
1010
1055
|
|
|
1011
1056
|
var CoreSelect = function CoreSelect(props) {
|
|
1012
1057
|
var _options$find;
|
|
@@ -1020,9 +1065,11 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1020
1065
|
width = props.width,
|
|
1021
1066
|
_props$placeholder = props.placeholder,
|
|
1022
1067
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
1023
|
-
error = props.error
|
|
1068
|
+
error = props.error,
|
|
1069
|
+
_props$errorMessage = props.errorMessage,
|
|
1070
|
+
errorMessage = _props$errorMessage === void 0 ? "" : _props$errorMessage;
|
|
1024
1071
|
return React__default.createElement("div", {
|
|
1025
|
-
className: "" + styles$
|
|
1072
|
+
className: "" + styles$3["core-select"],
|
|
1026
1073
|
style: {
|
|
1027
1074
|
width: width != null ? width : "100%"
|
|
1028
1075
|
}
|
|
@@ -1051,7 +1098,9 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1051
1098
|
boxShadow: "none",
|
|
1052
1099
|
"&:hover": {
|
|
1053
1100
|
backgroundColor: "#F5F9FA"
|
|
1054
|
-
}
|
|
1101
|
+
},
|
|
1102
|
+
transition: "all .3s",
|
|
1103
|
+
overflow: "hidden"
|
|
1055
1104
|
});
|
|
1056
1105
|
},
|
|
1057
1106
|
input: function input(base) {
|
|
@@ -1071,7 +1120,8 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1071
1120
|
dropdownIndicator: function dropdownIndicator(base) {
|
|
1072
1121
|
return _extends({}, base, {
|
|
1073
1122
|
position: "relative",
|
|
1074
|
-
top: "-4px"
|
|
1123
|
+
top: "-4px",
|
|
1124
|
+
padding: "8px 0"
|
|
1075
1125
|
});
|
|
1076
1126
|
},
|
|
1077
1127
|
indicatorSeparator: function indicatorSeparator() {
|
|
@@ -1091,10 +1141,12 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1091
1141
|
});
|
|
1092
1142
|
}
|
|
1093
1143
|
}
|
|
1144
|
+
}), error && React__default.createElement(CoreError, {
|
|
1145
|
+
message: errorMessage
|
|
1094
1146
|
}));
|
|
1095
1147
|
};
|
|
1096
1148
|
|
|
1097
|
-
var styles$
|
|
1149
|
+
var styles$4 = {"core-checkbox":"_3HY4f"};
|
|
1098
1150
|
|
|
1099
1151
|
var CoreInput$1 = function CoreInput(props) {
|
|
1100
1152
|
var name = props.name,
|
|
@@ -1104,7 +1156,7 @@ var CoreInput$1 = function CoreInput(props) {
|
|
|
1104
1156
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1105
1157
|
label = props.label;
|
|
1106
1158
|
return React__default.createElement("div", {
|
|
1107
|
-
className: "" + styles$
|
|
1159
|
+
className: "" + styles$4["core-checkbox"]
|
|
1108
1160
|
}, React__default.createElement(reactstrap.FormGroup, {
|
|
1109
1161
|
check: true,
|
|
1110
1162
|
inline: true
|
|
@@ -1123,7 +1175,7 @@ var CoreInput$1 = function CoreInput(props) {
|
|
|
1123
1175
|
}, label)));
|
|
1124
1176
|
};
|
|
1125
1177
|
|
|
1126
|
-
var styles$
|
|
1178
|
+
var styles$5 = {"core-radio":"_kvUpe","form-check":"_3ToPe"};
|
|
1127
1179
|
|
|
1128
1180
|
var CoreRadio = function CoreRadio(props) {
|
|
1129
1181
|
var name = props.name,
|
|
@@ -1133,7 +1185,7 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1133
1185
|
_props$disabled = props.disabled,
|
|
1134
1186
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
1135
1187
|
return React__default.createElement("div", {
|
|
1136
|
-
className: "" + styles$
|
|
1188
|
+
className: "" + styles$5["core-radio"]
|
|
1137
1189
|
}, React__default.createElement(reactstrap.FormGroup, {
|
|
1138
1190
|
check: true
|
|
1139
1191
|
}, options.map(function (i) {
|
|
@@ -1156,29 +1208,14 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1156
1208
|
})));
|
|
1157
1209
|
};
|
|
1158
1210
|
|
|
1159
|
-
var styles$5 = {"core-error":"_1Mmxr"};
|
|
1160
|
-
|
|
1161
|
-
var icons = {
|
|
1162
|
-
ErrorRedIcon: "/images/icons/error_red.svg"
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
|
-
var CoreError = function CoreError(props) {
|
|
1166
|
-
var message = props.message;
|
|
1167
|
-
return React__default.createElement("div", {
|
|
1168
|
-
className: "" + styles$5["core-error"]
|
|
1169
|
-
}, React__default.createElement("img", {
|
|
1170
|
-
src: icons.ErrorRedIcon,
|
|
1171
|
-
alt: "error-icon"
|
|
1172
|
-
}), React__default.createElement("p", null, message));
|
|
1173
|
-
};
|
|
1174
|
-
|
|
1175
1211
|
var styles$6 = {"core-modal-header":"_2y5ln"};
|
|
1176
1212
|
|
|
1177
1213
|
var CoreModal = function CoreModal(props) {
|
|
1178
1214
|
var open = props.open,
|
|
1179
1215
|
onClose = props.onClose,
|
|
1180
1216
|
children = props.children,
|
|
1181
|
-
title = props.title
|
|
1217
|
+
title = props.title,
|
|
1218
|
+
footer = props.footer;
|
|
1182
1219
|
return React__default.createElement(reactstrap.Modal, {
|
|
1183
1220
|
isOpen: open,
|
|
1184
1221
|
toggle: onClose,
|
|
@@ -1187,7 +1224,66 @@ var CoreModal = function CoreModal(props) {
|
|
|
1187
1224
|
}, React__default.createElement(reactstrap.ModalHeader, {
|
|
1188
1225
|
toggle: onClose,
|
|
1189
1226
|
className: styles$6["core-modal-header"]
|
|
1190
|
-
}, title), React__default.createElement(reactstrap.ModalBody, null, children));
|
|
1227
|
+
}, title), React__default.createElement(reactstrap.ModalBody, null, children), footer && React__default.createElement(reactstrap.ModalFooter, null, footer));
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
var styles$7 = {"core-range":"_1dzD7"};
|
|
1231
|
+
|
|
1232
|
+
var CoreRange = function CoreRange(props) {
|
|
1233
|
+
var name = props.name,
|
|
1234
|
+
value = props.value,
|
|
1235
|
+
_onChange = props.onChange,
|
|
1236
|
+
label = props.label,
|
|
1237
|
+
width = props.width,
|
|
1238
|
+
min = props.min,
|
|
1239
|
+
max = props.max,
|
|
1240
|
+
step = props.step;
|
|
1241
|
+
return React__default.createElement("div", {
|
|
1242
|
+
className: "" + styles$7["core-range"],
|
|
1243
|
+
style: {
|
|
1244
|
+
width: width != null ? width : "100%"
|
|
1245
|
+
}
|
|
1246
|
+
}, label && React__default.createElement("label", null, label), React__default.createElement("input", {
|
|
1247
|
+
type: "range",
|
|
1248
|
+
name: name,
|
|
1249
|
+
value: value,
|
|
1250
|
+
onChange: function onChange(e) {
|
|
1251
|
+
return _onChange(name, +e.target.value);
|
|
1252
|
+
},
|
|
1253
|
+
min: min,
|
|
1254
|
+
max: max,
|
|
1255
|
+
step: step
|
|
1256
|
+
}));
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
var styles$8 = {"core-text-area":"_1b_C3"};
|
|
1260
|
+
|
|
1261
|
+
var CoreTextArea = function CoreTextArea(props) {
|
|
1262
|
+
var name = props.name,
|
|
1263
|
+
_onChange = props.onChange,
|
|
1264
|
+
value = props.value,
|
|
1265
|
+
_props$cols = props.cols,
|
|
1266
|
+
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1267
|
+
label = props.label,
|
|
1268
|
+
_props$rows = props.rows,
|
|
1269
|
+
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1270
|
+
_props$placeholder = props.placeholder,
|
|
1271
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
1272
|
+
width = props.width;
|
|
1273
|
+
return React__default.createElement("div", {
|
|
1274
|
+
className: styles$8["core-text-area"]
|
|
1275
|
+
}, label && React__default.createElement("label", null, label), React__default.createElement("textarea", {
|
|
1276
|
+
placeholder: placeholder,
|
|
1277
|
+
value: value,
|
|
1278
|
+
cols: cols,
|
|
1279
|
+
rows: rows,
|
|
1280
|
+
onChange: function onChange(e) {
|
|
1281
|
+
return _onChange(name, e.target.value);
|
|
1282
|
+
},
|
|
1283
|
+
style: {
|
|
1284
|
+
width: width != null ? width : "100%"
|
|
1285
|
+
}
|
|
1286
|
+
}));
|
|
1191
1287
|
};
|
|
1192
1288
|
|
|
1193
1289
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
@@ -1414,7 +1510,9 @@ exports.CoreError = CoreError;
|
|
|
1414
1510
|
exports.CoreInput = CoreInput;
|
|
1415
1511
|
exports.CoreModal = CoreModal;
|
|
1416
1512
|
exports.CoreRadio = CoreRadio;
|
|
1513
|
+
exports.CoreRange = CoreRange;
|
|
1417
1514
|
exports.CoreSelect = CoreSelect;
|
|
1515
|
+
exports.CoreTextArea = CoreTextArea;
|
|
1418
1516
|
exports.CustomAsyncSelect = CustomAsyncSelect;
|
|
1419
1517
|
exports.CustomCreatable = CustomCreatable;
|
|
1420
1518
|
exports.CustomPagination = CustomPagination;
|
|
@@ -1430,6 +1528,7 @@ exports.getErrorMessage = getErrorMessage;
|
|
|
1430
1528
|
exports.historyCore = historyCore;
|
|
1431
1529
|
exports.setAlert = setAlert;
|
|
1432
1530
|
exports.setLoading = setLoading;
|
|
1531
|
+
exports.setMenuCollapse = setMenuCollapse;
|
|
1433
1532
|
exports.setUser = setUser;
|
|
1434
1533
|
exports.store = store;
|
|
1435
1534
|
exports.useGoogleSignOut = useGoogleSignOut;
|