@mw-kit/mw-ui 1.4.0 → 1.6.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/dist/components/AbsoluteContainer/index.d.ts +1 -1
- package/dist/components/AbsoluteContainer/interfaces.d.ts +6 -2
- package/dist/components/Calendar/interfaces.d.ts +2 -2
- package/dist/components/Calendar/styles.d.ts +1 -1
- package/dist/components/CalendarInterval/interfaces.d.ts +7 -7
- package/dist/components/Filters/AppliedFilters/styles.d.ts +1 -1
- package/dist/components/Filters/Filters/components/Submenu/components/Header/interfaces.d.ts +1 -3
- package/dist/components/Filters/Filters/components/Submenu/interfaces.d.ts +1 -1
- package/dist/components/Filters/Filters/interfaces.d.ts +8 -8
- package/dist/components/Grid/components/Col/index.d.ts +4 -0
- package/dist/components/Grid/components/Col/interfaces.d.ts +31 -0
- package/dist/components/Grid/components/Col/styles.d.ts +1 -0
- package/dist/components/{Input/components/Select → Grid/components/Grid}/context.d.ts +0 -0
- package/dist/components/Grid/components/Grid/index.d.ts +4 -0
- package/dist/components/Grid/components/Grid/interfaces.d.ts +17 -0
- package/dist/components/Grid/components/Grid/styles.d.ts +1 -0
- package/dist/components/Grid/components/Row/context.d.ts +5 -0
- package/dist/components/Grid/components/Row/index.d.ts +4 -0
- package/dist/components/Grid/components/Row/interfaces.d.ts +26 -0
- package/dist/components/Grid/components/Row/styles.d.ts +1 -0
- package/dist/components/Grid/index.d.ts +6 -0
- package/dist/components/Grid/interfaces.d.ts +2 -0
- package/dist/components/Input/components/DateIntervalPicker/functions.d.ts +5 -0
- package/dist/components/Input/components/DateIntervalPicker/index.d.ts +4 -0
- package/dist/components/Input/components/DateIntervalPicker/interfaces.d.ts +23 -0
- package/dist/components/Input/components/DateIntervalPicker/styles.d.ts +10 -0
- package/dist/components/Input/components/Input/interfaces.d.ts +2 -0
- package/dist/components/Input/components/Range/interfaces.d.ts +1 -1
- package/dist/components/Input/components/Select/{header.d.ts → hooks/Select/components/Header/index.d.ts} +0 -0
- package/dist/components/Input/components/Select/hooks/Select/components/Header/styles.d.ts +1 -0
- package/dist/components/Input/components/Select/hooks/Select/context.d.ts +5 -0
- package/dist/components/Input/components/Select/hooks/Select/index.d.ts +4 -0
- package/dist/components/Input/components/Select/hooks/Select/interfaces.d.ts +25 -0
- package/dist/components/Input/components/Select/{footer.d.ts → hooks/SelectMultiple/components/Footer/index.d.ts} +0 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/components/Header/index.d.ts +3 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/components/Header/styles.d.ts +2 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/context.d.ts +5 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/index.d.ts +4 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/interfaces.d.ts +19 -0
- package/dist/components/Input/components/Select/hooks/interfaces.d.ts +55 -0
- package/dist/components/Input/components/Select/index.d.ts +4 -1
- package/dist/components/Input/components/Select/interfaces.d.ts +2 -51
- package/dist/components/Input/components/Select/styles.d.ts +0 -2
- package/dist/components/Input/components/Time/interfaces.d.ts +1 -0
- package/dist/components/Input/index.d.ts +4 -3
- package/dist/components/Loader/interfaces.d.ts +2 -1
- package/dist/components/Menu/interfaces.d.ts +12 -28
- package/dist/components/Menu/styles.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +5 -9
- package/dist/components/Transition/components/Transition/index.d.ts +4 -0
- package/dist/components/Transition/components/Transition/interfaces.d.ts +8 -0
- package/dist/components/Transition/hooks/useTransition/index.d.ts +3 -0
- package/dist/components/Transition/index.d.ts +3 -0
- package/dist/components/Transition/interfaces.d.ts +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/functions/common.d.ts +2 -0
- package/dist/functions/formatters.d.ts +9 -3
- package/dist/functions/validators.d.ts +2 -2
- package/dist/index.js +1635 -632
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1634 -634
- package/dist/index.modern.js.map +1 -1
- package/dist/interfaces.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -164,16 +164,58 @@ var stripAccents = function stripAccents(value) {
|
|
|
164
164
|
var isKeyOf = function isKeyOf(object, key) {
|
|
165
165
|
return Object.prototype.hasOwnProperty.call(object, key);
|
|
166
166
|
};
|
|
167
|
+
var isObject = function isObject(value) {
|
|
168
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
169
|
+
};
|
|
170
|
+
var dateToIsoString = function dateToIsoString(date, time, fullYear, pattern) {
|
|
171
|
+
if (time === void 0) {
|
|
172
|
+
time = false;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (fullYear === void 0) {
|
|
176
|
+
fullYear = true;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (pattern === void 0) {
|
|
180
|
+
pattern = 'br';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
var dateData = [date.getDate().toString().padStart(2, '0'), (date.getMonth() + 1).toString().padStart(2, '0'), date.getFullYear().toString().padStart(4, '0')];
|
|
184
|
+
if (fullYear === false) dateData[2] = dateData[2].substring(2, 4);
|
|
185
|
+
|
|
186
|
+
if (pattern === 'us') {
|
|
187
|
+
var tmp = dateData[0];
|
|
188
|
+
dateData[0] = dateData[2];
|
|
189
|
+
dateData[2] = tmp;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
var dateStr = dateData.join('/');
|
|
193
|
+
if (!time) return dateStr;
|
|
194
|
+
var timeStr = [date.getHours().toString().padStart(2, '0'), date.getMinutes().toString().padStart(2, '0'), date.getSeconds().toString().padStart(2, '0')].join(':');
|
|
195
|
+
return [dateStr, timeStr].join(' ');
|
|
196
|
+
};
|
|
167
197
|
|
|
168
198
|
var notEmptyString = function notEmptyString(value) {
|
|
169
199
|
return typeof value === 'string' && value.trim() !== '';
|
|
170
200
|
};
|
|
171
|
-
var
|
|
172
|
-
return
|
|
201
|
+
var isBoolean = function isBoolean(value) {
|
|
202
|
+
return typeof value === 'boolean';
|
|
173
203
|
};
|
|
174
204
|
var isString = function isString(value) {
|
|
175
205
|
return typeof value === 'string';
|
|
176
206
|
};
|
|
207
|
+
var isDateInstance = function isDateInstance(value) {
|
|
208
|
+
return value instanceof Date && !isNaN(value.valueOf());
|
|
209
|
+
};
|
|
210
|
+
var isDateEquals = function isDateEquals(x, y, time) {
|
|
211
|
+
if (time === void 0) {
|
|
212
|
+
time = true;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
var xStr = dateToIsoString(x, time, true, 'us');
|
|
216
|
+
var yStr = dateToIsoString(y, time, true, 'us');
|
|
217
|
+
return xStr === yStr;
|
|
218
|
+
};
|
|
177
219
|
var strCmp = function strCmp(x, y, options) {
|
|
178
220
|
if (options === void 0) {
|
|
179
221
|
options = {};
|
|
@@ -218,13 +260,63 @@ var filterObject = function filterObject(object, keys, inital) {
|
|
|
218
260
|
}, inital);
|
|
219
261
|
return r;
|
|
220
262
|
};
|
|
221
|
-
var dateToIsoString = function dateToIsoString(date) {
|
|
222
|
-
return [date.getDate().toString().padStart(2, '0'), (date.getMonth() + 1).toString().padStart(2, '0'), date.getFullYear().toString().padStart(4, '0')].join('/');
|
|
223
|
-
};
|
|
224
263
|
var isoStringToDate = function isoStringToDate(value) {
|
|
225
264
|
var date = new Date(value.split('/').reverse().join('-') + ' 00:00:00');
|
|
226
265
|
return isNaN(date.getTime()) ? null : date;
|
|
227
266
|
};
|
|
267
|
+
var getWeekNumber = function getWeekNumber(value) {
|
|
268
|
+
var weekSunday = new Date(value);
|
|
269
|
+
weekSunday.setHours(0, 0, 0, 0);
|
|
270
|
+
weekSunday.setDate(weekSunday.getDate() - weekSunday.getUTCDay());
|
|
271
|
+
var yearStart = new Date(Date.UTC(weekSunday.getUTCFullYear(), 0, 1));
|
|
272
|
+
var weekNumber = Math.ceil(((weekSunday.getTime() - yearStart.getTime()) / 86400000 + 1) / 7);
|
|
273
|
+
return [weekNumber, weekSunday.getUTCFullYear()];
|
|
274
|
+
};
|
|
275
|
+
var getMonthName = function getMonthName(value) {
|
|
276
|
+
var months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'];
|
|
277
|
+
var monthName = months[value.getMonth()];
|
|
278
|
+
return monthName;
|
|
279
|
+
};
|
|
280
|
+
var getFirstWeek = function getFirstWeek(year) {
|
|
281
|
+
var today = new Date();
|
|
282
|
+
if (year !== undefined) today.setFullYear(year);else year = today.getFullYear();
|
|
283
|
+
var week = new Date(year + "-01-01 00:00:00");
|
|
284
|
+
week.setDate(week.getDate() - week.getUTCDay() - 7);
|
|
285
|
+
week.setHours(0, 0, 0, 0);
|
|
286
|
+
|
|
287
|
+
var _getWeekNumber = getWeekNumber(week),
|
|
288
|
+
weekYear = _getWeekNumber[1];
|
|
289
|
+
|
|
290
|
+
while (weekYear !== year) {
|
|
291
|
+
week.setDate(week.getDate() + 7);
|
|
292
|
+
|
|
293
|
+
var _getWeekNumber2 = getWeekNumber(week);
|
|
294
|
+
|
|
295
|
+
weekYear = _getWeekNumber2[1];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return week;
|
|
299
|
+
};
|
|
300
|
+
var getLastWeek = function getLastWeek(year) {
|
|
301
|
+
var today = new Date();
|
|
302
|
+
if (year !== undefined) today.setFullYear(year);else year = today.getFullYear();
|
|
303
|
+
var week = new Date(year + "-12-31 00:00:00");
|
|
304
|
+
week.setDate(week.getDate() - week.getUTCDay() + 6);
|
|
305
|
+
week.setHours(23, 59, 59, 0);
|
|
306
|
+
|
|
307
|
+
var _getWeekNumber3 = getWeekNumber(week),
|
|
308
|
+
weekYear = _getWeekNumber3[1];
|
|
309
|
+
|
|
310
|
+
while (weekYear !== year) {
|
|
311
|
+
week.setDate(week.getDate() - 7);
|
|
312
|
+
|
|
313
|
+
var _getWeekNumber4 = getWeekNumber(week);
|
|
314
|
+
|
|
315
|
+
weekYear = _getWeekNumber4[1];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return week;
|
|
319
|
+
};
|
|
228
320
|
var getSpacings = function getSpacings(value, defaults) {
|
|
229
321
|
var d = {
|
|
230
322
|
top: 's1',
|
|
@@ -258,6 +350,9 @@ var getSpacings = function getSpacings(value, defaults) {
|
|
|
258
350
|
};
|
|
259
351
|
return values.top + " " + values.right + " " + values.bottom + " " + values.left;
|
|
260
352
|
};
|
|
353
|
+
var keys = function keys(value) {
|
|
354
|
+
return Object.keys(value);
|
|
355
|
+
};
|
|
261
356
|
|
|
262
357
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
263
358
|
var loader = styled.keyframes(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"])));
|
|
@@ -267,15 +362,19 @@ var Loader = styled__default.div(_templateObject2 || (_templateObject2 = _tagged
|
|
|
267
362
|
bgColor = _ref.bgColor,
|
|
268
363
|
color = _ref.color,
|
|
269
364
|
theme = _ref.theme,
|
|
270
|
-
filled = _ref.filled
|
|
365
|
+
filled = _ref.filled,
|
|
366
|
+
zIndex = _ref.zIndex;
|
|
271
367
|
size = size || theme.spacings.s4;
|
|
272
368
|
borderSize = borderSize || "calc(" + size + " * 0.0757)";
|
|
273
369
|
color = color || 'blue';
|
|
274
370
|
bgColor = bgColor || color;
|
|
275
371
|
var beforeColor = isKeyOf(theme.colors, bgColor) ? theme.getColor(bgColor, 25) : color;
|
|
276
372
|
var afterColor = isKeyOf(theme.colors, color) ? theme.getColor(color) : color;
|
|
277
|
-
var fill = !filled ? styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose([""]))) : styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n top: 0;\n background-color: ", ";\n width: 100%;\n height: 100%;\n "])),
|
|
278
|
-
|
|
373
|
+
var fill = !filled ? styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose([""]))) : styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n top: 0;\n background-color: ", ";\n width: 100%;\n height: 100%;\n "])), function () {
|
|
374
|
+
var fillColor = !isString(filled) ? theme.colors.white : isKeyOf(theme.colors, filled) ? theme.getColor(filled) : filled;
|
|
375
|
+
return fillColor;
|
|
376
|
+
});
|
|
377
|
+
return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n ", "\n\n pointer-events: none;\n\n z-index: ", ";\n\n ::before,\n ::after {\n position: absolute;\n content: '';\n\n top: calc(50% - ", " / 2);\n left: calc(50% - ", " / 2);\n width: ", ";\n height: ", ";\n border-radius: 50%;\n border-width: ", ";\n border-style: solid;\n }\n\n ::before {\n border-color: ", ";\n }\n\n ::after {\n animation: ", " 0.6s linear;\n animation-iteration-count: infinite;\n border-color: ", " transparent transparent;\n }\n "])), fill, zIndex || 1, size, size, size, size, borderSize, beforeColor, loader, afterColor);
|
|
279
378
|
});
|
|
280
379
|
|
|
281
380
|
var sizes = {
|
|
@@ -11913,22 +12012,83 @@ var ScrollContainer = function ScrollContainer(props) {
|
|
|
11913
12012
|
})), after);
|
|
11914
12013
|
};
|
|
11915
12014
|
|
|
11916
|
-
var
|
|
12015
|
+
var Transition = function Transition(props) {
|
|
12016
|
+
var active = props.active,
|
|
12017
|
+
mountDuration = props.mountDuration,
|
|
12018
|
+
element = props.element;
|
|
12019
|
+
|
|
12020
|
+
var _useState = React.useState('first'),
|
|
12021
|
+
render = _useState[0],
|
|
12022
|
+
setRender = _useState[1];
|
|
12023
|
+
|
|
12024
|
+
React.useEffect(function () {
|
|
12025
|
+
setRender(function (prev) {
|
|
12026
|
+
return prev === 'first' && active === false ? 'unmounted' : false;
|
|
12027
|
+
});
|
|
12028
|
+
var timeoutId = active ? setTimeout(function () {
|
|
12029
|
+
return setRender(true);
|
|
12030
|
+
}) : setTimeout(function () {
|
|
12031
|
+
return setRender('unmounted');
|
|
12032
|
+
}, mountDuration);
|
|
12033
|
+
return function () {
|
|
12034
|
+
return clearTimeout(timeoutId);
|
|
12035
|
+
};
|
|
12036
|
+
}, [active]);
|
|
12037
|
+
return isBoolean(render) ? element({
|
|
12038
|
+
active: render,
|
|
12039
|
+
mountDuration: mountDuration
|
|
12040
|
+
}) : null;
|
|
12041
|
+
};
|
|
12042
|
+
|
|
12043
|
+
var _templateObject$6, _templateObject2$4, _templateObject3$4;
|
|
12044
|
+
|
|
12045
|
+
var useTransition = function useTransition(props, values) {
|
|
12046
|
+
var active = props.active,
|
|
12047
|
+
mountDuration = props.mountDuration;
|
|
12048
|
+
var animation = {
|
|
12049
|
+
enabled: styled.css(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose([""]))),
|
|
12050
|
+
disabled: styled.css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose([""])))
|
|
12051
|
+
};
|
|
12052
|
+
var properties = [];
|
|
12053
|
+
var durations = [];
|
|
12054
|
+
var functions = [];
|
|
12055
|
+
keys(props.properties).forEach(function (k) {
|
|
12056
|
+
var config = props.properties[k];
|
|
12057
|
+
if (config === undefined) return;
|
|
12058
|
+
properties.push(k);
|
|
12059
|
+
durations.push(config.duration && config.duration <= mountDuration ? config.duration : mountDuration);
|
|
12060
|
+
functions.push(config.function || 'ease-in-out');
|
|
12061
|
+
|
|
12062
|
+
if (values[k].disabled) {
|
|
12063
|
+
animation.disabled = animation.disabled.concat(k + ": " + values[k].disabled + ";");
|
|
12064
|
+
}
|
|
12065
|
+
|
|
12066
|
+
if (values[k].enabled) {
|
|
12067
|
+
animation.enabled = animation.enabled.concat(k + ": " + values[k].enabled + ";");
|
|
12068
|
+
}
|
|
12069
|
+
});
|
|
12070
|
+
if (properties.length === 0) return;
|
|
12071
|
+
return styled.css(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n transition-property: ", ";\n transition-duration: ", ";\n transition-timing-function: ", ";\n ", "\n "])), properties.join(', '), durations.map(function (d) {
|
|
12072
|
+
return d + "ms";
|
|
12073
|
+
}).join(', '), functions.join(', '), animation[active ? 'enabled' : 'disabled']);
|
|
12074
|
+
};
|
|
12075
|
+
|
|
12076
|
+
var _templateObject$7, _templateObject2$5, _templateObject3$5, _templateObject4$4, _templateObject5$3, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
11917
12077
|
var positions = {
|
|
11918
12078
|
'top right': function topRight(_ref) {
|
|
11919
12079
|
var bottom = _ref.bottom,
|
|
11920
12080
|
left = _ref.left;
|
|
11921
|
-
return styled.css(_templateObject$
|
|
12081
|
+
return styled.css(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: ", ";\n "])), bottom ? "calc(100% - " + bottom + ")" : 0, left || '100%');
|
|
11922
12082
|
},
|
|
11923
12083
|
'top left': function topLeft(_ref2) {
|
|
11924
12084
|
var bottom = _ref2.bottom,
|
|
11925
12085
|
right = _ref2.right;
|
|
11926
|
-
return styled.css(_templateObject2$
|
|
12086
|
+
return styled.css(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n top: ", ";\n right: ", ";\n "])), bottom ? "calc(100% - " + bottom + ")" : 0, right || '100%');
|
|
11927
12087
|
},
|
|
11928
12088
|
'bottom right': function bottomRight(_ref3) {
|
|
11929
12089
|
var top = _ref3.top,
|
|
11930
12090
|
left = _ref3.left;
|
|
11931
|
-
return styled.css(_templateObject3$
|
|
12091
|
+
return styled.css(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["\n bottom: ", ";\n left: ", ";\n "])), top ? "calc(100% - " + top + ")" : 0, left || '100%');
|
|
11932
12092
|
},
|
|
11933
12093
|
'bottom left': function bottomLeft(_ref4) {
|
|
11934
12094
|
var top = _ref4.top,
|
|
@@ -11952,7 +12112,7 @@ var positions = {
|
|
|
11952
12112
|
return styled.css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n top: ", ";\n left: 0;\n "])), top || '100%');
|
|
11953
12113
|
}
|
|
11954
12114
|
};
|
|
11955
|
-
var Container$2 = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n ", ";\n\n > div {\n box-shadow: 0px 3px 6px ", ";\n border: 1px solid ", ";\n }\n\n z-index: ", ";\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n position: absolute;\n\n ", "\n\n ", "
|
|
12115
|
+
var Container$2 = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n ", ";\n display: flex;\n\n > div {\n box-shadow: 0px 3px 6px ", ";\n border: 1px solid ", ";\n overflow: hidden;\n }\n\n z-index: ", ";\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n position: absolute;\n\n ", "\n\n ", ";\n"])), function (_ref9) {
|
|
11956
12116
|
var theme = _ref9.theme;
|
|
11957
12117
|
return theme.useTypography('p');
|
|
11958
12118
|
}, function (_ref10) {
|
|
@@ -11983,39 +12143,45 @@ var Container$2 = styled__default.div(_templateObject9$1 || (_templateObject9$1
|
|
|
11983
12143
|
}, function (_ref17) {
|
|
11984
12144
|
var position = _ref17.position,
|
|
11985
12145
|
references = _ref17.references;
|
|
12146
|
+
|
|
12147
|
+
if (!position) {
|
|
12148
|
+
return styled.css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n visibility: collapse;\n "])));
|
|
12149
|
+
}
|
|
12150
|
+
|
|
11986
12151
|
return positions[position](references || {});
|
|
11987
|
-
}, function (
|
|
11988
|
-
var
|
|
11989
|
-
if (
|
|
11990
|
-
return
|
|
12152
|
+
}, function (props) {
|
|
12153
|
+
var transition = props.transition;
|
|
12154
|
+
if (transition === undefined) return;
|
|
12155
|
+
return useTransition(transition, {
|
|
12156
|
+
'max-width': {
|
|
12157
|
+
disabled: '0px'
|
|
12158
|
+
},
|
|
12159
|
+
'max-height': {
|
|
12160
|
+
disabled: '0px'
|
|
12161
|
+
},
|
|
12162
|
+
width: {
|
|
12163
|
+
disabled: '0px'
|
|
12164
|
+
},
|
|
12165
|
+
height: {
|
|
12166
|
+
disabled: '0px'
|
|
12167
|
+
}
|
|
12168
|
+
});
|
|
11991
12169
|
});
|
|
11992
12170
|
|
|
11993
12171
|
var AbsoluteContainer = React__default.forwardRef(function (props, fowardedRef) {
|
|
12172
|
+
var open = props.open;
|
|
11994
12173
|
var center = props.center || {
|
|
11995
12174
|
x: 50,
|
|
11996
12175
|
y: 75
|
|
11997
12176
|
};
|
|
11998
12177
|
var axis = props.axis || 'y';
|
|
11999
|
-
var defaultPosition = axis === 'y' ? 'right bottom' : 'top right';
|
|
12000
|
-
|
|
12001
|
-
var _useState = React.useState(props.position || defaultPosition),
|
|
12002
|
-
position = _useState[0],
|
|
12003
|
-
setPosition = _useState[1];
|
|
12004
|
-
|
|
12005
|
-
var _useState2 = React.useState(null),
|
|
12006
|
-
ref = _useState2[0],
|
|
12007
|
-
setRef = _useState2[1];
|
|
12008
12178
|
|
|
12009
|
-
var
|
|
12010
|
-
|
|
12011
|
-
|
|
12179
|
+
var _useState = React.useState(null),
|
|
12180
|
+
ref = _useState[0],
|
|
12181
|
+
setRef = _useState[1];
|
|
12012
12182
|
|
|
12013
|
-
|
|
12014
|
-
return
|
|
12015
|
-
});
|
|
12016
|
-
React.useEffect(function () {
|
|
12017
|
-
setFirstRender(false);
|
|
12018
|
-
if (props.position || !ref) return;
|
|
12183
|
+
var getPosition = function getPosition() {
|
|
12184
|
+
if (!ref) return null;
|
|
12019
12185
|
var width = window.innerWidth;
|
|
12020
12186
|
var height = window.innerHeight;
|
|
12021
12187
|
|
|
@@ -12030,7 +12196,7 @@ var AbsoluteContainer = React__default.forwardRef(function (props, fowardedRef)
|
|
|
12030
12196
|
var xDirection = x > center.x ? 'left' : 'right';
|
|
12031
12197
|
var yDirection = y > center.y ? 'top' : 'bottom';
|
|
12032
12198
|
var newPosition = xDirection + " " + yDirection;
|
|
12033
|
-
|
|
12199
|
+
return newPosition;
|
|
12034
12200
|
} else {
|
|
12035
12201
|
var _xDirection = x > center.x ? 'left' : 'right';
|
|
12036
12202
|
|
|
@@ -12038,20 +12204,57 @@ var AbsoluteContainer = React__default.forwardRef(function (props, fowardedRef)
|
|
|
12038
12204
|
|
|
12039
12205
|
var _newPosition = _yDirection + " " + _xDirection;
|
|
12040
12206
|
|
|
12041
|
-
|
|
12207
|
+
return _newPosition;
|
|
12042
12208
|
}
|
|
12209
|
+
};
|
|
12210
|
+
|
|
12211
|
+
var _useState2 = React.useState(props.position || getPosition),
|
|
12212
|
+
position = _useState2[0],
|
|
12213
|
+
setPosition = _useState2[1];
|
|
12214
|
+
|
|
12215
|
+
React.useImperativeHandle(fowardedRef, function () {
|
|
12216
|
+
return ref;
|
|
12217
|
+
});
|
|
12218
|
+
React.useEffect(function () {
|
|
12219
|
+
if (props.position) return;
|
|
12220
|
+
setPosition(getPosition);
|
|
12043
12221
|
}, [ref]);
|
|
12044
12222
|
var htmlProps = filterObject(props, ['center', 'position', 'children']);
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12223
|
+
var cssKeys = {
|
|
12224
|
+
width: 'width',
|
|
12225
|
+
'max-width': 'maxWidth',
|
|
12226
|
+
height: 'height',
|
|
12227
|
+
'max-height': 'maxHeight'
|
|
12228
|
+
};
|
|
12229
|
+
|
|
12230
|
+
var propsTransition = _extends({
|
|
12231
|
+
mountDuration: 500,
|
|
12232
|
+
properties: keys(cssKeys).filter(function (k) {
|
|
12233
|
+
var key = cssKeys[k];
|
|
12234
|
+
return isKeyOf(props, key) && props[key] !== undefined;
|
|
12235
|
+
}).reduce(function (prev, k) {
|
|
12236
|
+
var _extends2;
|
|
12237
|
+
|
|
12238
|
+
return _extends({}, prev, (_extends2 = {}, _extends2[k] = {}, _extends2));
|
|
12239
|
+
}, {})
|
|
12240
|
+
}, props.transition || {});
|
|
12241
|
+
|
|
12242
|
+
return React__default.createElement(Transition, {
|
|
12243
|
+
active: open,
|
|
12244
|
+
mountDuration: propsTransition.mountDuration,
|
|
12245
|
+
element: function element(transition) {
|
|
12246
|
+
return React__default.createElement(Container$2, Object.assign({}, htmlProps, {
|
|
12247
|
+
position: position,
|
|
12248
|
+
ref: setRef,
|
|
12249
|
+
transition: _extends({}, propsTransition, transition)
|
|
12250
|
+
}), React__default.createElement("div", null, props.children));
|
|
12251
|
+
}
|
|
12252
|
+
});
|
|
12050
12253
|
});
|
|
12051
12254
|
AbsoluteContainer.displayName = 'AbsoluteContainer';
|
|
12052
12255
|
|
|
12053
|
-
var _templateObject$
|
|
12054
|
-
var Option = styled__default.div(_templateObject$
|
|
12256
|
+
var _templateObject$8, _templateObject2$6, _templateObject3$6, _templateObject4$5, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$2;
|
|
12257
|
+
var Option = styled__default.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n ", ";\n line-height: ", ";\n display: flex;\n\n > :nth-child(1) {\n flex: 1;\n }\n\n ", ";\n\n :hover {\n background-color: ", ";\n }\n"])), function (_ref) {
|
|
12055
12258
|
var theme = _ref.theme;
|
|
12056
12259
|
return theme.useTypography('p');
|
|
12057
12260
|
}, function (_ref2) {
|
|
@@ -12061,10 +12264,10 @@ var Option = styled__default.div(_templateObject$7 || (_templateObject$7 = _tagg
|
|
|
12061
12264
|
var disabled = _ref3.disabled;
|
|
12062
12265
|
|
|
12063
12266
|
if (!disabled) {
|
|
12064
|
-
return styled.css(_templateObject2$
|
|
12267
|
+
return styled.css(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n "])));
|
|
12065
12268
|
}
|
|
12066
12269
|
|
|
12067
|
-
return styled.css(_templateObject3$
|
|
12270
|
+
return styled.css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n pointer-events: none;\n opacity: 0.3;\n "])));
|
|
12068
12271
|
}, function (_ref4) {
|
|
12069
12272
|
var theme = _ref4.theme;
|
|
12070
12273
|
return theme.colors.iceWhite;
|
|
@@ -12108,51 +12311,19 @@ var Delimiter = styled__default.div(_templateObject9$2 || (_templateObject9$2 =
|
|
|
12108
12311
|
|
|
12109
12312
|
var MenuComponent = function MenuComponent(props, ref) {
|
|
12110
12313
|
var _props = _extends({}, props),
|
|
12111
|
-
open = _props.open,
|
|
12112
12314
|
close = _props.close,
|
|
12113
12315
|
options = _props.options,
|
|
12114
12316
|
onScrollEnd = _props.onScrollEnd,
|
|
12115
12317
|
before = _props.before,
|
|
12116
12318
|
after = _props.after,
|
|
12117
|
-
scrollHeight = _props.scrollHeight,
|
|
12118
12319
|
scrollSpacing = _props.scrollSpacing,
|
|
12119
12320
|
children = _props.children,
|
|
12120
12321
|
loading = _props.loading,
|
|
12121
12322
|
innerContent = _props.innerContent;
|
|
12122
12323
|
|
|
12123
|
-
var
|
|
12124
|
-
activeOption = _useState[0],
|
|
12125
|
-
setActiveOption = _useState[1];
|
|
12126
|
-
|
|
12127
|
-
React.useEffect(function () {
|
|
12128
|
-
setActiveOption(-1);
|
|
12129
|
-
}, [options]);
|
|
12130
|
-
|
|
12131
|
-
var getSubmenu = function getSubmenu(index) {
|
|
12132
|
-
if (index === -1 || options[index] === undefined) {
|
|
12133
|
-
return;
|
|
12134
|
-
}
|
|
12135
|
-
|
|
12136
|
-
var submenuProps = options[index].submenu;
|
|
12137
|
-
|
|
12138
|
-
if (!submenuProps) {
|
|
12139
|
-
return;
|
|
12140
|
-
}
|
|
12141
|
-
|
|
12142
|
-
return React__default.createElement(Menu, Object.assign({}, props, submenuProps, {
|
|
12143
|
-
onScrollEnd: submenuProps.onScrollEnd,
|
|
12144
|
-
axis: 'x',
|
|
12145
|
-
open: true,
|
|
12146
|
-
close: function close() {
|
|
12147
|
-
return setActiveOption(-1);
|
|
12148
|
-
}
|
|
12149
|
-
}));
|
|
12150
|
-
};
|
|
12151
|
-
|
|
12152
|
-
var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'onScrollEnd', 'before', 'after', 'scrollHeight', 'open', 'close', 'options', 'loading', 'children'], {
|
|
12324
|
+
var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children'], {
|
|
12153
12325
|
itemSpacing: 's1'
|
|
12154
12326
|
});
|
|
12155
|
-
if (!open) return React__default.createElement(React__default.Fragment, null);
|
|
12156
12327
|
return React__default.createElement(Container$3, Object.assign({}, absoluteContainerProps, {
|
|
12157
12328
|
ref: ref
|
|
12158
12329
|
}), React__default.createElement(React__default.Fragment, null, React__default.createElement(ScrollContainer, {
|
|
@@ -12160,67 +12331,36 @@ var MenuComponent = function MenuComponent(props, ref) {
|
|
|
12160
12331
|
before: before,
|
|
12161
12332
|
after: after,
|
|
12162
12333
|
inner: innerContent,
|
|
12163
|
-
height: scrollHeight,
|
|
12164
12334
|
spacing: scrollSpacing,
|
|
12165
12335
|
loading: loading
|
|
12166
12336
|
}, options.map(function (option, index) {
|
|
12167
12337
|
var _option = _extends({}, option),
|
|
12168
12338
|
delimiter = _option.delimiter,
|
|
12169
12339
|
keepOpen = _option.keepOpen,
|
|
12170
|
-
submenu = _option.submenu,
|
|
12171
12340
|
caret = _option.caret;
|
|
12172
12341
|
|
|
12173
12342
|
var label = isString(option.label) ? {
|
|
12174
12343
|
text: option.label,
|
|
12175
12344
|
element: option.label
|
|
12176
12345
|
} : option.label;
|
|
12177
|
-
var closeMenu = keepOpen
|
|
12346
|
+
var closeMenu = keepOpen ? function () {} : close;
|
|
12178
12347
|
var onClick;
|
|
12179
12348
|
var disabled;
|
|
12349
|
+
var rules = option.rules || [];
|
|
12350
|
+
var rule = rules.find(function (rule) {
|
|
12351
|
+
return !rule.rule(index);
|
|
12352
|
+
});
|
|
12180
12353
|
|
|
12181
|
-
if (
|
|
12182
|
-
var
|
|
12183
|
-
var rule = rules.find(function (rule) {
|
|
12184
|
-
return !rule.rule(index, option.data);
|
|
12185
|
-
});
|
|
12186
|
-
|
|
12187
|
-
if (rule === undefined) {
|
|
12188
|
-
var _onClick = option.onClick || function () {};
|
|
12189
|
-
|
|
12190
|
-
onClick = function onClick() {
|
|
12191
|
-
setActiveOption(function (prev) {
|
|
12192
|
-
return prev !== index ? index : -1;
|
|
12193
|
-
});
|
|
12354
|
+
if (rule === undefined) {
|
|
12355
|
+
var _onClick = option.onClick || function () {};
|
|
12194
12356
|
|
|
12195
|
-
|
|
12357
|
+
onClick = function onClick() {
|
|
12358
|
+
_onClick(index);
|
|
12196
12359
|
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
} else {
|
|
12200
|
-
disabled = true;
|
|
12201
|
-
}
|
|
12360
|
+
closeMenu();
|
|
12361
|
+
};
|
|
12202
12362
|
} else {
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
var _rule = _rules.find(function (rule) {
|
|
12206
|
-
return !rule.rule(index);
|
|
12207
|
-
});
|
|
12208
|
-
|
|
12209
|
-
if (_rule === undefined) {
|
|
12210
|
-
var _onClick2 = option.onClick || function () {};
|
|
12211
|
-
|
|
12212
|
-
onClick = function onClick() {
|
|
12213
|
-
setActiveOption(function (prev) {
|
|
12214
|
-
return prev !== index ? index : -1;
|
|
12215
|
-
});
|
|
12216
|
-
|
|
12217
|
-
_onClick2(index);
|
|
12218
|
-
|
|
12219
|
-
closeMenu();
|
|
12220
|
-
};
|
|
12221
|
-
} else {
|
|
12222
|
-
disabled = true;
|
|
12223
|
-
}
|
|
12363
|
+
disabled = true;
|
|
12224
12364
|
}
|
|
12225
12365
|
|
|
12226
12366
|
return React__default.createElement(React__default.Fragment, {
|
|
@@ -12228,18 +12368,18 @@ var MenuComponent = function MenuComponent(props, ref) {
|
|
|
12228
12368
|
}, React__default.createElement(Option, {
|
|
12229
12369
|
onClick: onClick,
|
|
12230
12370
|
disabled: disabled
|
|
12231
|
-
}, isString(label.element) ? React__default.createElement(EllipsisContainer$1, null, label.element) : label.element, caret
|
|
12371
|
+
}, isString(label.element) ? React__default.createElement(EllipsisContainer$1, null, label.element) : label.element, caret ? React__default.createElement(Icon, {
|
|
12232
12372
|
type: 'semantic',
|
|
12233
12373
|
icon: 'caret right',
|
|
12234
12374
|
width: '14px'
|
|
12235
12375
|
}) : null), delimiter && React__default.createElement(Delimiter, null));
|
|
12236
|
-
})), children
|
|
12376
|
+
})), children));
|
|
12237
12377
|
};
|
|
12238
12378
|
|
|
12239
12379
|
var Menu = React__default.forwardRef(MenuComponent);
|
|
12240
12380
|
|
|
12241
|
-
var _templateObject$
|
|
12242
|
-
var Container$4 = styled__default.div(_templateObject$
|
|
12381
|
+
var _templateObject$9, _templateObject2$7, _templateObject3$7, _templateObject4$6, _templateObject5$5, _templateObject6$3;
|
|
12382
|
+
var Container$4 = styled__default.div(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n div {\n border-radius: 50%;\n width: ", ";\n height: ", ";\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n }\n\n span {\n display: inline-block;\n margin-left: 8px;\n color: ", ";\n }\n"])), function (_ref) {
|
|
12243
12383
|
var props = _ref.props;
|
|
12244
12384
|
return props.size === 'medium' ? '15px' : '6px';
|
|
12245
12385
|
}, function (_ref2) {
|
|
@@ -12247,13 +12387,13 @@ var Container$4 = styled__default.div(_templateObject$8 || (_templateObject$8 =
|
|
|
12247
12387
|
return props.size === 'medium' ? '15px' : '6px';
|
|
12248
12388
|
}, function (_ref3) {
|
|
12249
12389
|
var props = _ref3.props;
|
|
12250
|
-
return props.type === 'default' && styled.css(_templateObject2$
|
|
12390
|
+
return props.type === 'default' && styled.css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref4) {
|
|
12251
12391
|
var theme = _ref4.theme;
|
|
12252
12392
|
return theme.colors.warningGray;
|
|
12253
12393
|
});
|
|
12254
12394
|
}, function (_ref5) {
|
|
12255
12395
|
var props = _ref5.props;
|
|
12256
|
-
return props.type === 'info' && styled.css(_templateObject3$
|
|
12396
|
+
return props.type === 'info' && styled.css(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref6) {
|
|
12257
12397
|
var theme = _ref6.theme;
|
|
12258
12398
|
return theme.colors.blue;
|
|
12259
12399
|
});
|
|
@@ -12285,12 +12425,12 @@ var Indicator = function Indicator(props) {
|
|
|
12285
12425
|
}, React__default.createElement("div", null), React__default.createElement("span", null, " ", props.description, " "));
|
|
12286
12426
|
};
|
|
12287
12427
|
|
|
12288
|
-
var _templateObject$
|
|
12289
|
-
var Container$5 = styled__default.div(_templateObject$
|
|
12290
|
-
var Progress = styled__default.div(_templateObject2$
|
|
12428
|
+
var _templateObject$a, _templateObject2$8, _templateObject3$8, _templateObject4$7, _templateObject5$6, _templateObject6$4, _templateObject7$3;
|
|
12429
|
+
var Container$5 = styled__default.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n\n span {\n display: inline-block;\n margin-left: 7px;\n color: #000000cc;\n }\n"])));
|
|
12430
|
+
var Progress = styled__default.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n width: 64px;\n height: 12px;\n border: 1px solid #e4e4e4;\n div {\n width: ", ";\n max-width: 64px;\n height: 100%;\n ", "\n\n ", "\n ", "\n ", "\n ", "\n }\n"])), function (props) {
|
|
12291
12431
|
return props.value + "%";
|
|
12292
12432
|
}, function (props) {
|
|
12293
|
-
return props.type === 'default' && styled.css(_templateObject3$
|
|
12433
|
+
return props.type === 'default' && styled.css(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), function (_ref) {
|
|
12294
12434
|
var theme = _ref.theme;
|
|
12295
12435
|
return theme.colors.warningGray;
|
|
12296
12436
|
});
|
|
@@ -12355,13 +12495,13 @@ function SvgClose(props) {
|
|
|
12355
12495
|
})));
|
|
12356
12496
|
}
|
|
12357
12497
|
|
|
12358
|
-
var _templateObject$
|
|
12359
|
-
var Container$6 = styled__default.div(_templateObject$
|
|
12498
|
+
var _templateObject$b, _templateObject2$9, _templateObject3$9, _templateObject4$8, _templateObject5$7, _templateObject6$5;
|
|
12499
|
+
var Container$6 = styled__default.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n display: block;\n border-bottom-style: solid;\n\n ", "\n"])), function (_ref) {
|
|
12360
12500
|
var theme = _ref.theme,
|
|
12361
12501
|
internal = _ref.internal;
|
|
12362
|
-
return styled.css(_templateObject2$
|
|
12502
|
+
return styled.css(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), theme.spacings.s2, internal ? '1px' : '2px', internal ? theme.getColor('lightestGrey', 50) : theme.colors.blue);
|
|
12363
12503
|
});
|
|
12364
|
-
var Tabs = styled__default.ul(_templateObject3$
|
|
12504
|
+
var Tabs = styled__default.ul(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n user-select: none;\n list-style: none;\n display: inline-flex;\n gap: 1px;\n padding: 0;\n margin: 0;\n\n ", "\n"])), function (_ref2) {
|
|
12365
12505
|
var theme = _ref2.theme,
|
|
12366
12506
|
internal = _ref2.internal;
|
|
12367
12507
|
return styled.css(_templateObject4$8 || (_templateObject4$8 = _taggedTemplateLiteralLoose(["\n height: ", ";\n box-shadow: 0 0 10px 0 ", ";\n "])), internal ? '41px' : '49px', theme.getColor('black', 10));
|
|
@@ -12458,17 +12598,17 @@ var getMask = function getMask(mask) {
|
|
|
12458
12598
|
};
|
|
12459
12599
|
};
|
|
12460
12600
|
|
|
12461
|
-
var _templateObject$
|
|
12462
|
-
var IconContainer = styled__default.button(_templateObject$
|
|
12601
|
+
var _templateObject$c, _templateObject2$a, _templateObject3$a, _templateObject4$9, _templateObject5$8, _templateObject6$6, _templateObject7$4, _templateObject8$3, _templateObject9$3, _templateObject10$2, _templateObject11$1, _templateObject12$1;
|
|
12602
|
+
var IconContainer = styled__default.button(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: calc(", " + 1px);\n display: flex;\n justify-content: center;\n align-items: center;\n height: 17px;\n\n background-color: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n\n ", "\n"])), function (_ref) {
|
|
12463
12603
|
var theme = _ref.theme;
|
|
12464
12604
|
return theme.spacings.s2;
|
|
12465
12605
|
}, function (_ref2) {
|
|
12466
12606
|
var onClick = _ref2.onClick,
|
|
12467
12607
|
disabled = _ref2.disabled;
|
|
12468
12608
|
if (!onClick || disabled) return;
|
|
12469
|
-
return styled.css(_templateObject2$
|
|
12609
|
+
return styled.css(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n "])));
|
|
12470
12610
|
});
|
|
12471
|
-
var Input = styled__default.input(_templateObject3$
|
|
12611
|
+
var Input = styled__default.input(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n\n line-height: 17px;\n\n ::placeholder {\n color: ", ";\n\n line-height: 17px;\n\n ", "\n }\n\n width: 100%;\n box-sizing: border-box;\n\n padding: ", ";\n\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: 4px;\n\n background-color: ", ";\n\n box-shadow: none;\n outline: none;\n\n ", "\n\n ", "\n"])), function (_ref3) {
|
|
12472
12612
|
var theme = _ref3.theme;
|
|
12473
12613
|
return theme.useTypography('p');
|
|
12474
12614
|
}, function (_ref4) {
|
|
@@ -12495,7 +12635,9 @@ var Input = styled__default.input(_templateObject3$9 || (_templateObject3$9 = _t
|
|
|
12495
12635
|
return theme.spacings.s2 + " " + theme.spacings.s3;
|
|
12496
12636
|
}, function (_ref9) {
|
|
12497
12637
|
var theme = _ref9.theme,
|
|
12498
|
-
invalid = _ref9.invalid
|
|
12638
|
+
invalid = _ref9.invalid,
|
|
12639
|
+
borderless = _ref9.borderless;
|
|
12640
|
+
if (borderless) return 'transparent';
|
|
12499
12641
|
return invalid ? theme.colors.warningRed : theme.colors.lightGrey;
|
|
12500
12642
|
}, function (_ref10) {
|
|
12501
12643
|
var theme = _ref10.theme,
|
|
@@ -12568,13 +12710,15 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12568
12710
|
onPressEnter = _props.onPressEnter,
|
|
12569
12711
|
htmlDisabled = _props.htmlDisabled,
|
|
12570
12712
|
width = _props.width,
|
|
12571
|
-
arrows = _props.arrows
|
|
12713
|
+
arrows = _props.arrows,
|
|
12714
|
+
borderless = _props.borderless;
|
|
12572
12715
|
|
|
12573
12716
|
var mask = getMask(props.mask);
|
|
12574
12717
|
var intInvalid = invalid ? 1 : 0;
|
|
12575
12718
|
var intRequired = required ? 1 : 0;
|
|
12576
12719
|
var intDisabled = disabled ? 1 : 0;
|
|
12577
12720
|
var intArrows = arrows ? 1 : 0;
|
|
12721
|
+
var intBorderless = borderless ? 1 : 0;
|
|
12578
12722
|
var position;
|
|
12579
12723
|
var iconWidth;
|
|
12580
12724
|
var iconSubmit;
|
|
@@ -12590,10 +12734,11 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12590
12734
|
iconOnClick = props.icon.onClick;
|
|
12591
12735
|
}
|
|
12592
12736
|
|
|
12593
|
-
var inputProps = filterObject(props, ['label', 'invalid', 'required', 'icon', 'mask', 'loading', 'clearable', 'setValue', 'onPressEnter', 'htmlDisabled', 'width', 'arrows'], {
|
|
12737
|
+
var inputProps = filterObject(props, ['label', 'invalid', 'required', 'icon', 'mask', 'loading', 'clearable', 'setValue', 'onPressEnter', 'htmlDisabled', 'width', 'arrows', 'borderless'], {
|
|
12594
12738
|
invalid: intInvalid,
|
|
12595
12739
|
type: 'text',
|
|
12596
|
-
arrows: intArrows
|
|
12740
|
+
arrows: intArrows,
|
|
12741
|
+
borderless: intBorderless
|
|
12597
12742
|
});
|
|
12598
12743
|
|
|
12599
12744
|
var onChange = inputProps.onChange || function () {};
|
|
@@ -12702,9 +12847,9 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12702
12847
|
});
|
|
12703
12848
|
Input$1.displayName = 'Input';
|
|
12704
12849
|
|
|
12705
|
-
var _templateObject$
|
|
12850
|
+
var _templateObject$d, _templateObject2$b, _templateObject3$b, _templateObject4$a, _templateObject5$9, _templateObject6$7, _templateObject7$5;
|
|
12706
12851
|
var width = '17px';
|
|
12707
|
-
var Checkmark = styled__default.span(_templateObject$
|
|
12852
|
+
var Checkmark = styled__default.span(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0px;\n left: 0;\n height: ", ";\n width: ", ";\n background-color: ", ";\n\n border-style: solid;\n border-color: ", ";\n border-width: 1px;\n border-radius: 4px;\n\n transition-property: border-color;\n transition-duration: 0.25s;\n transition-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);\n\n :after {\n content: '';\n position: absolute;\n\n left: 50%;\n top: 50%;\n height: 0;\n width: 0;\n\n border-style: solid;\n border-color: ", ";\n border-width: 0;\n transform: rotate(45deg);\n\n transition-property: width height border-width top left;\n transition-duration: 0.25s;\n transition-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);\n }\n"])), width, width, function (_ref) {
|
|
12708
12853
|
var theme = _ref.theme;
|
|
12709
12854
|
return theme.colors.white;
|
|
12710
12855
|
}, function (_ref2) {
|
|
@@ -12714,7 +12859,7 @@ var Checkmark = styled__default.span(_templateObject$c || (_templateObject$c = _
|
|
|
12714
12859
|
var theme = _ref3.theme;
|
|
12715
12860
|
return theme.colors.blue;
|
|
12716
12861
|
});
|
|
12717
|
-
var Label$1 = styled__default.label(_templateObject2$
|
|
12862
|
+
var Label$1 = styled__default.label(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 14px;\n\n display: block;\n\n ", "\n\n ", "\n\n > div {\n display: flex;\n align-items: center;\n position: relative;\n\n padding-left: calc(", " + ", ");\n user-select: none;\n min-height: 17px;\n\n > div:first-child {\n display: inline-block;\n ", "\n line-height: 14px;\n\n ", "\n }\n\n > input {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n\n :hover ", " {\n background-color: ", ";\n }\n\n > input:checked ~ ", " {\n border-color: ", ";\n\n :after {\n width: 5px;\n height: 9.5px;\n border-width: 0 2px 2px 0;\n left: 5px;\n top: 1px;\n }\n }\n\n ", ";\n }\n"])), function (_ref4) {
|
|
12718
12863
|
var theme = _ref4.theme;
|
|
12719
12864
|
return theme.useTypography('p');
|
|
12720
12865
|
}, function (_ref5) {
|
|
@@ -12760,7 +12905,7 @@ var Label$1 = styled__default.label(_templateObject2$a || (_templateObject2$a =
|
|
|
12760
12905
|
}
|
|
12761
12906
|
}
|
|
12762
12907
|
|
|
12763
|
-
return styled.css(_templateObject3$
|
|
12908
|
+
return styled.css(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n "])), _padding.top, _padding.left, _padding.right, _padding.bottom);
|
|
12764
12909
|
}, function (_ref6) {
|
|
12765
12910
|
var disabled = _ref6.disabled;
|
|
12766
12911
|
|
|
@@ -12867,7 +13012,8 @@ var _mask = function mask(v, seconds) {
|
|
|
12867
13012
|
};
|
|
12868
13013
|
|
|
12869
13014
|
var Time = React__default.forwardRef(function (props, ref) {
|
|
12870
|
-
var
|
|
13015
|
+
var value = props.value,
|
|
13016
|
+
seconds = props.seconds;
|
|
12871
13017
|
|
|
12872
13018
|
var _onKeyDown = props.onKeyDown || function () {};
|
|
12873
13019
|
|
|
@@ -12936,6 +13082,7 @@ var Time = React__default.forwardRef(function (props, ref) {
|
|
|
12936
13082
|
var placeholder = props.placeholder === undefined ? seconds ? '––:––:––' : '––:––' : props.placeholder;
|
|
12937
13083
|
return React__default.createElement(Input$1, Object.assign({}, props, {
|
|
12938
13084
|
type: 'text',
|
|
13085
|
+
value: _mask(value, seconds),
|
|
12939
13086
|
placeholder: placeholder,
|
|
12940
13087
|
mask: function mask(v) {
|
|
12941
13088
|
return _mask(v, seconds);
|
|
@@ -12946,8 +13093,8 @@ var Time = React__default.forwardRef(function (props, ref) {
|
|
|
12946
13093
|
});
|
|
12947
13094
|
Time.displayName = 'Time';
|
|
12948
13095
|
|
|
12949
|
-
var _templateObject$
|
|
12950
|
-
var Container$7 = styled__default.div(_templateObject$
|
|
13096
|
+
var _templateObject$e, _templateObject2$c, _templateObject3$c, _templateObject4$b, _templateObject5$a, _templateObject6$8, _templateObject7$6, _templateObject8$4, _templateObject9$4, _templateObject10$3, _templateObject11$2, _templateObject12$2, _templateObject13$1;
|
|
13097
|
+
var Container$7 = styled__default.div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n display: inline-block;\n background-color: ", ";\n padding: ", ";\n\n > div:nth-child(1) {\n border: 1px solid ", ";\n margin-bottom: ", ";\n }\n"])), function (_ref) {
|
|
12951
13098
|
var theme = _ref.theme;
|
|
12952
13099
|
return theme.colors.white;
|
|
12953
13100
|
}, function (_ref2) {
|
|
@@ -12960,11 +13107,11 @@ var Container$7 = styled__default.div(_templateObject$d || (_templateObject$d =
|
|
|
12960
13107
|
var theme = _ref4.theme;
|
|
12961
13108
|
return theme.spacings.s1;
|
|
12962
13109
|
});
|
|
12963
|
-
var AbsoluteContainer$1 = styled__default(AbsoluteContainer)(_templateObject2$
|
|
13110
|
+
var AbsoluteContainer$1 = styled__default(AbsoluteContainer)(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n > ", " {\n padding: ", ";\n }\n"])), Container$7, function (_ref5) {
|
|
12964
13111
|
var theme = _ref5.theme;
|
|
12965
13112
|
return theme.spacings.s3 + " " + theme.spacings.s3 + " " + theme.spacings.s1 + " " + theme.spacings.s3;
|
|
12966
13113
|
});
|
|
12967
|
-
var Footer = styled__default.div(_templateObject3$
|
|
13114
|
+
var Footer = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
12968
13115
|
var MonthContainer = styled__default.div(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n > div {\n margin: ", " 0;\n }\n"])), function (_ref6) {
|
|
12969
13116
|
var theme = _ref6.theme;
|
|
12970
13117
|
return theme.spacings.s1;
|
|
@@ -13087,8 +13234,7 @@ var Calendar = function Calendar(props) {
|
|
|
13087
13234
|
var overlay = props.overlay,
|
|
13088
13235
|
timeProps = props.time,
|
|
13089
13236
|
notAbsolute = props.notAbsolute,
|
|
13090
|
-
initalValue = props.initalValue
|
|
13091
|
-
references = props.references;
|
|
13237
|
+
initalValue = props.initalValue;
|
|
13092
13238
|
|
|
13093
13239
|
var _ref = props.value || React.useState(initalValue && !isNaN(initalValue.getTime()) ? initalValue : null),
|
|
13094
13240
|
value = _ref[0],
|
|
@@ -13124,7 +13270,9 @@ var Calendar = function Calendar(props) {
|
|
|
13124
13270
|
var h = value.getHours();
|
|
13125
13271
|
var m = value.getMinutes();
|
|
13126
13272
|
var s = value.getSeconds();
|
|
13127
|
-
return [h, m, s].
|
|
13273
|
+
return [h, m, s].map(function (v) {
|
|
13274
|
+
return v.toString().padStart(2, '0');
|
|
13275
|
+
}).join(':');
|
|
13128
13276
|
}),
|
|
13129
13277
|
time = _useState2[0],
|
|
13130
13278
|
setTime = _useState2[1];
|
|
@@ -13276,16 +13424,17 @@ var Calendar = function Calendar(props) {
|
|
|
13276
13424
|
type: 'button',
|
|
13277
13425
|
content: 'Aplicar'
|
|
13278
13426
|
})) : undefined);
|
|
13279
|
-
|
|
13427
|
+
var absoluteContainerProps = filterObject(props, ['value', 'initalValue', 'max', 'min', 'overlay', 'time', 'onSubmit', 'invalid', 'notAbsolute', 'references']);
|
|
13428
|
+
return notAbsolute ? content : React__default.createElement(AbsoluteContainer$1, Object.assign({
|
|
13280
13429
|
axis: 'y',
|
|
13281
|
-
|
|
13282
|
-
}, content);
|
|
13430
|
+
maxHeight: '322px'
|
|
13431
|
+
}, absoluteContainerProps), content);
|
|
13283
13432
|
};
|
|
13284
13433
|
|
|
13285
13434
|
var JSDate = Date;
|
|
13286
13435
|
|
|
13287
|
-
var _templateObject$
|
|
13288
|
-
var RelativeContainer$1 = styled__default.div(_templateObject$
|
|
13436
|
+
var _templateObject$f;
|
|
13437
|
+
var RelativeContainer$1 = styled__default.div(_templateObject$f || (_templateObject$f = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
13289
13438
|
|
|
13290
13439
|
var isLeapYear = function isLeapYear(year) {
|
|
13291
13440
|
if (year % 4 !== 0) return false;else if (year % 100 !== 0) return true;else if (year % 400 !== 0) return false;else return true;
|
|
@@ -13414,7 +13563,8 @@ var Date$1 = React__default.forwardRef(function (props, ref) {
|
|
|
13414
13563
|
onKeyDown: onKeyDown,
|
|
13415
13564
|
icon: icon,
|
|
13416
13565
|
ref: ref
|
|
13417
|
-
})),
|
|
13566
|
+
})), React__default.createElement(Calendar, {
|
|
13567
|
+
open: open,
|
|
13418
13568
|
initalValue: value ? isoStringToDate(value) : undefined,
|
|
13419
13569
|
onSubmit: {
|
|
13420
13570
|
onClick: function onClick(date) {
|
|
@@ -13438,15 +13588,10 @@ var useContext = function useContext() {
|
|
|
13438
13588
|
return React__default.useContext(Provider);
|
|
13439
13589
|
};
|
|
13440
13590
|
|
|
13441
|
-
var _templateObject$
|
|
13442
|
-
var
|
|
13443
|
-
var HeaderContainer = styled__default.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
13591
|
+
var _templateObject$g, _templateObject2$d;
|
|
13592
|
+
var HeaderContainer = styled__default.div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
13444
13593
|
var theme = _ref.theme;
|
|
13445
|
-
return styled.css(
|
|
13446
|
-
});
|
|
13447
|
-
var SelectAllContainer = styled__default.div(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n display: flex;\n justify-content: space-between;\n"])), function (_ref2) {
|
|
13448
|
-
var theme = _ref2.theme;
|
|
13449
|
-
return theme.spacings.s1;
|
|
13594
|
+
return styled.css(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["\n padding: ", " calc(", " * 0.75)\n ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
|
|
13450
13595
|
});
|
|
13451
13596
|
|
|
13452
13597
|
var Header$1 = function Header() {
|
|
@@ -13456,52 +13601,21 @@ var Header$1 = function Header() {
|
|
|
13456
13601
|
return React__default.createElement(React__default.Fragment, null);
|
|
13457
13602
|
}
|
|
13458
13603
|
|
|
13459
|
-
var
|
|
13460
|
-
search =
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
setSearched = _context$search[1],
|
|
13469
|
-
loading = context.loading,
|
|
13470
|
-
options = context.options;
|
|
13471
|
-
React.useEffect(function () {
|
|
13472
|
-
setSearch(searched);
|
|
13473
|
-
}, [searched]);
|
|
13474
|
-
|
|
13475
|
-
var onClick = function onClick() {
|
|
13476
|
-
setChecked(function (prev) {
|
|
13477
|
-
return prev.length === options.length ? [] : options.map(function (option) {
|
|
13478
|
-
return option.value;
|
|
13479
|
-
});
|
|
13480
|
-
});
|
|
13481
|
-
};
|
|
13482
|
-
|
|
13483
|
-
var onSearch = function onSearch() {
|
|
13484
|
-
setSearched(search);
|
|
13485
|
-
};
|
|
13486
|
-
|
|
13487
|
-
var onClear = function onClear() {
|
|
13488
|
-
setSearch('');
|
|
13489
|
-
setSearched('');
|
|
13490
|
-
};
|
|
13491
|
-
|
|
13492
|
-
return React__default.createElement(HeaderContainer, null, context.props.type === 'select-multiple' && context.props.selectAll && React__default.createElement(SelectAllContainer, null, React__default.createElement("b", null, "Selecionados (", checked.length, ")"), React__default.createElement(Button$1, {
|
|
13493
|
-
type: 'button',
|
|
13494
|
-
content: 'Selecionar todos',
|
|
13495
|
-
appearance: 'link',
|
|
13496
|
-
onClick: onClick,
|
|
13497
|
-
color: 'darkBlue'
|
|
13498
|
-
})), React__default.createElement(Input$1, {
|
|
13604
|
+
var _context$search = context.search,
|
|
13605
|
+
search = _context$search[0],
|
|
13606
|
+
_context$searchInput = context.searchInput,
|
|
13607
|
+
searchInput = _context$searchInput[0],
|
|
13608
|
+
setSearchInput = _context$searchInput[1],
|
|
13609
|
+
onClearSearch = context.onClearSearch,
|
|
13610
|
+
onSearch = context.onSearch,
|
|
13611
|
+
loading = context.loading;
|
|
13612
|
+
return React__default.createElement(HeaderContainer, null, React__default.createElement(Input$1, {
|
|
13499
13613
|
type: 'search',
|
|
13500
13614
|
placeholder: 'Pesquisa',
|
|
13501
|
-
setValue:
|
|
13502
|
-
value:
|
|
13615
|
+
setValue: setSearchInput,
|
|
13616
|
+
value: searchInput,
|
|
13503
13617
|
onPressEnter: onSearch,
|
|
13504
|
-
clearable:
|
|
13618
|
+
clearable: searchInput !== '' && searchInput === search ? onClearSearch : undefined,
|
|
13505
13619
|
icon: {
|
|
13506
13620
|
icon: {
|
|
13507
13621
|
type: 'feather',
|
|
@@ -13513,9 +13627,76 @@ var Header$1 = function Header() {
|
|
|
13513
13627
|
}));
|
|
13514
13628
|
};
|
|
13515
13629
|
|
|
13630
|
+
var getOptions = function getOptions(props, options) {
|
|
13631
|
+
return options.map(function (option, index) {
|
|
13632
|
+
var label = isString(option.label) ? {
|
|
13633
|
+
text: option.label,
|
|
13634
|
+
element: option.label
|
|
13635
|
+
} : option.label;
|
|
13636
|
+
var value = option.value,
|
|
13637
|
+
onClick = option.onClick;
|
|
13638
|
+
return {
|
|
13639
|
+
label: label,
|
|
13640
|
+
onClick: onClick ? function () {
|
|
13641
|
+
onClick(index, {
|
|
13642
|
+
label: label,
|
|
13643
|
+
value: value
|
|
13644
|
+
});
|
|
13645
|
+
} : function () {
|
|
13646
|
+
props.setValue(value);
|
|
13647
|
+
}
|
|
13648
|
+
};
|
|
13649
|
+
});
|
|
13650
|
+
};
|
|
13651
|
+
|
|
13652
|
+
var getInputValue = function getInputValue(value, options, parsedOptions) {
|
|
13653
|
+
var selectedIndex = options.findIndex(function (option) {
|
|
13654
|
+
return option.value === value;
|
|
13655
|
+
});
|
|
13656
|
+
var selected = parsedOptions[selectedIndex];
|
|
13657
|
+
return selected ? selected.label.text : '';
|
|
13658
|
+
};
|
|
13659
|
+
|
|
13660
|
+
var useSelect = function useSelect(props) {
|
|
13661
|
+
var _useState = React.useState([]),
|
|
13662
|
+
options = _useState[0],
|
|
13663
|
+
setOptions = _useState[1];
|
|
13664
|
+
|
|
13665
|
+
var parsedOptions = getOptions(props, options);
|
|
13666
|
+
var inputValue = getInputValue(props.value, options, parsedOptions);
|
|
13667
|
+
|
|
13668
|
+
var onReset = function onReset() {};
|
|
13669
|
+
|
|
13670
|
+
return {
|
|
13671
|
+
parsedOptions: parsedOptions,
|
|
13672
|
+
options: [options, setOptions],
|
|
13673
|
+
input: {
|
|
13674
|
+
value: inputValue
|
|
13675
|
+
},
|
|
13676
|
+
onReset: onReset,
|
|
13677
|
+
menu: {
|
|
13678
|
+
itemSpacing: 's3',
|
|
13679
|
+
before: React__default.createElement(Header$1, null),
|
|
13680
|
+
maxHeight: '180px'
|
|
13681
|
+
},
|
|
13682
|
+
getContext: function getContext(base, children) {
|
|
13683
|
+
return React__default.createElement(Provider.Provider, {
|
|
13684
|
+
value: _extends({}, base, {
|
|
13685
|
+
props: props,
|
|
13686
|
+
options: options
|
|
13687
|
+
})
|
|
13688
|
+
}, children);
|
|
13689
|
+
}
|
|
13690
|
+
};
|
|
13691
|
+
};
|
|
13692
|
+
|
|
13693
|
+
var Provider$1 = React__default.createContext({});
|
|
13694
|
+
var useContext$1 = function useContext() {
|
|
13695
|
+
return React__default.useContext(Provider$1);
|
|
13696
|
+
};
|
|
13697
|
+
|
|
13516
13698
|
var Footer$1 = function Footer() {
|
|
13517
|
-
var context = useContext();
|
|
13518
|
-
if (context.props.type !== 'select-multiple') return React__default.createElement(React__default.Fragment, null);
|
|
13699
|
+
var context = useContext$1();
|
|
13519
13700
|
var setValue = context.props.setValue,
|
|
13520
13701
|
_context$checked = context.checked,
|
|
13521
13702
|
checked = _context$checked[0],
|
|
@@ -13536,80 +13717,178 @@ var Footer$1 = function Footer() {
|
|
|
13536
13717
|
});
|
|
13537
13718
|
};
|
|
13538
13719
|
|
|
13539
|
-
var
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
var isChecked = event.target.checked;
|
|
13555
|
-
setChecked(function (prev) {
|
|
13556
|
-
var newState = prev.filter(function (v) {
|
|
13557
|
-
return v !== option.value;
|
|
13558
|
-
});
|
|
13559
|
-
if (isChecked) newState.push(option.value);
|
|
13560
|
-
return newState;
|
|
13561
|
-
});
|
|
13562
|
-
},
|
|
13563
|
-
padding: {
|
|
13564
|
-
top: 's3',
|
|
13565
|
-
left: 's3',
|
|
13566
|
-
right: 's3',
|
|
13567
|
-
bottom: 's3'
|
|
13568
|
-
}
|
|
13569
|
-
})
|
|
13570
|
-
},
|
|
13571
|
-
onClick: function onClick() {},
|
|
13572
|
-
data: {
|
|
13573
|
-
value: option.value
|
|
13574
|
-
},
|
|
13575
|
-
keepOpen: true
|
|
13576
|
-
};
|
|
13577
|
-
});
|
|
13720
|
+
var _templateObject$h, _templateObject2$e, _templateObject3$d;
|
|
13721
|
+
var HeaderContainer$1 = styled__default.div(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
13722
|
+
var theme = _ref.theme;
|
|
13723
|
+
return styled.css(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n padding: ", " calc(", " * 0.75)\n ", " ", ";\n "])), theme.spacings.s3, theme.spacings.s3, theme.spacings.s1, theme.spacings.s3);
|
|
13724
|
+
});
|
|
13725
|
+
var SelectAllContainer = styled__default.div(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n display: flex;\n justify-content: space-between;\n"])), function (_ref2) {
|
|
13726
|
+
var theme = _ref2.theme;
|
|
13727
|
+
return theme.spacings.s1;
|
|
13728
|
+
});
|
|
13729
|
+
|
|
13730
|
+
var Header$2 = function Header() {
|
|
13731
|
+
var context = useContext$1();
|
|
13732
|
+
|
|
13733
|
+
if (!context.props.search) {
|
|
13734
|
+
return React__default.createElement(React__default.Fragment, null);
|
|
13578
13735
|
}
|
|
13579
13736
|
|
|
13737
|
+
var _context$checked = context.checked,
|
|
13738
|
+
checked = _context$checked[0],
|
|
13739
|
+
setChecked = _context$checked[1],
|
|
13740
|
+
_context$search = context.search,
|
|
13741
|
+
search = _context$search[0],
|
|
13742
|
+
_context$searchInput = context.searchInput,
|
|
13743
|
+
searchInput = _context$searchInput[0],
|
|
13744
|
+
setSearchInput = _context$searchInput[1],
|
|
13745
|
+
onSearch = context.onSearch,
|
|
13746
|
+
onClearSearch = context.onClearSearch,
|
|
13747
|
+
loading = context.loading,
|
|
13748
|
+
options = context.options;
|
|
13749
|
+
|
|
13750
|
+
var onClick = function onClick() {
|
|
13751
|
+
setChecked(function (prev) {
|
|
13752
|
+
return prev.length === options.length ? [] : options.map(function (option) {
|
|
13753
|
+
return option.value;
|
|
13754
|
+
});
|
|
13755
|
+
});
|
|
13756
|
+
};
|
|
13757
|
+
|
|
13758
|
+
return React__default.createElement(HeaderContainer$1, null, context.props.selectAll && React__default.createElement(SelectAllContainer, null, React__default.createElement("b", null, "Selecionados (", checked.length, ")"), React__default.createElement(Button$1, {
|
|
13759
|
+
type: 'button',
|
|
13760
|
+
content: 'Selecionar todos',
|
|
13761
|
+
appearance: 'link',
|
|
13762
|
+
onClick: onClick,
|
|
13763
|
+
color: 'darkBlue'
|
|
13764
|
+
})), React__default.createElement(Input$1, {
|
|
13765
|
+
type: 'search',
|
|
13766
|
+
placeholder: 'Pesquisa',
|
|
13767
|
+
setValue: setSearchInput,
|
|
13768
|
+
value: searchInput,
|
|
13769
|
+
onPressEnter: onSearch,
|
|
13770
|
+
clearable: searchInput !== '' && searchInput === search ? onClearSearch : undefined,
|
|
13771
|
+
icon: {
|
|
13772
|
+
icon: {
|
|
13773
|
+
type: 'feather',
|
|
13774
|
+
icon: 'search'
|
|
13775
|
+
},
|
|
13776
|
+
onClick: onSearch
|
|
13777
|
+
},
|
|
13778
|
+
loading: loading
|
|
13779
|
+
}));
|
|
13780
|
+
};
|
|
13781
|
+
|
|
13782
|
+
var getOptions$1 = function getOptions(options, checked, setChecked) {
|
|
13580
13783
|
return options.map(function (option) {
|
|
13581
13784
|
var label = isString(option.label) ? {
|
|
13582
13785
|
text: option.label,
|
|
13583
13786
|
element: option.label
|
|
13584
13787
|
} : option.label;
|
|
13585
13788
|
return {
|
|
13586
|
-
label:
|
|
13587
|
-
|
|
13588
|
-
|
|
13789
|
+
label: {
|
|
13790
|
+
text: label.text,
|
|
13791
|
+
element: React__default.createElement(Checkbox, {
|
|
13792
|
+
type: 'checkbox',
|
|
13793
|
+
checked: checked.includes(option.value),
|
|
13794
|
+
label: label.element,
|
|
13795
|
+
onChange: function onChange(event) {
|
|
13796
|
+
var isChecked = event.target.checked;
|
|
13797
|
+
setChecked(function (prev) {
|
|
13798
|
+
var newState = prev.filter(function (v) {
|
|
13799
|
+
return v !== option.value;
|
|
13800
|
+
});
|
|
13801
|
+
if (isChecked) newState.push(option.value);
|
|
13802
|
+
return newState;
|
|
13803
|
+
});
|
|
13804
|
+
},
|
|
13805
|
+
padding: {
|
|
13806
|
+
top: 's3',
|
|
13807
|
+
left: 's3',
|
|
13808
|
+
right: 's3',
|
|
13809
|
+
bottom: 's3'
|
|
13810
|
+
}
|
|
13811
|
+
})
|
|
13589
13812
|
},
|
|
13590
|
-
|
|
13591
|
-
value: option.value
|
|
13592
|
-
}
|
|
13813
|
+
keepOpen: true
|
|
13593
13814
|
};
|
|
13594
13815
|
});
|
|
13595
13816
|
};
|
|
13596
13817
|
|
|
13597
|
-
var
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13818
|
+
var getInputValue$1 = function getInputValue(value) {
|
|
13819
|
+
if (value.length < 1) return '';
|
|
13820
|
+
return value.length > 1 ? "H\xE1 " + value.length + " sele\xE7\xF5es" : "H\xE1 " + value.length + " sele\xE7\xE3o";
|
|
13821
|
+
};
|
|
13601
13822
|
|
|
13823
|
+
var useSelectMultiple = function useSelectMultiple(props) {
|
|
13602
13824
|
var _useState = React.useState([]),
|
|
13603
13825
|
options = _useState[0],
|
|
13604
13826
|
setOptions = _useState[1];
|
|
13605
13827
|
|
|
13606
|
-
var _useState2 = React.useState(
|
|
13607
|
-
|
|
13608
|
-
|
|
13828
|
+
var _useState2 = React.useState([].concat(props.value)),
|
|
13829
|
+
checked = _useState2[0],
|
|
13830
|
+
setChecked = _useState2[1];
|
|
13831
|
+
|
|
13832
|
+
var parsedOptions = getOptions$1(options, checked, setChecked);
|
|
13833
|
+
var inputValue = getInputValue$1(props.value);
|
|
13834
|
+
|
|
13835
|
+
var onReset = function onReset() {
|
|
13836
|
+
setChecked([].concat(props.value));
|
|
13837
|
+
};
|
|
13838
|
+
|
|
13839
|
+
var returnData = {
|
|
13840
|
+
parsedOptions: parsedOptions,
|
|
13841
|
+
options: [options, setOptions],
|
|
13842
|
+
input: {
|
|
13843
|
+
value: inputValue
|
|
13844
|
+
},
|
|
13845
|
+
onReset: onReset,
|
|
13846
|
+
menu: {
|
|
13847
|
+
itemSpacing: undefined,
|
|
13848
|
+
before: React__default.createElement(Header$2, null),
|
|
13849
|
+
after: React__default.createElement(Footer$1, null),
|
|
13850
|
+
maxHeight: props.selectAll ? '269px' : '224px'
|
|
13851
|
+
},
|
|
13852
|
+
getContext: function getContext(base, children) {
|
|
13853
|
+
return React__default.createElement(Provider$1.Provider, {
|
|
13854
|
+
value: _extends({}, base, {
|
|
13855
|
+
props: props,
|
|
13856
|
+
options: options,
|
|
13857
|
+
checked: [checked, setChecked]
|
|
13858
|
+
})
|
|
13859
|
+
}, children);
|
|
13860
|
+
}
|
|
13861
|
+
};
|
|
13862
|
+
return returnData;
|
|
13863
|
+
};
|
|
13864
|
+
|
|
13865
|
+
var _templateObject$i;
|
|
13866
|
+
var RelativeContainer$2 = styled__default.div(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
13867
|
+
|
|
13868
|
+
var Select = React__default.forwardRef(function (props, ref) {
|
|
13869
|
+
var position = props.position,
|
|
13870
|
+
loader = props.loader;
|
|
13871
|
+
|
|
13872
|
+
var _ref = props.type === 'select-multiple' ? useSelectMultiple(props) : useSelect(props),
|
|
13873
|
+
parsedOptions = _ref.parsedOptions,
|
|
13874
|
+
inputValue = _ref.input.value,
|
|
13875
|
+
_ref$options = _ref.options,
|
|
13876
|
+
setOptions = _ref$options[1],
|
|
13877
|
+
onReset = _ref.onReset,
|
|
13878
|
+
menuProps = _ref.menu,
|
|
13879
|
+
getContext = _ref.getContext;
|
|
13880
|
+
|
|
13881
|
+
var _useState = React.useState(false),
|
|
13882
|
+
_loading = _useState[0],
|
|
13883
|
+
setLoading = _useState[1];
|
|
13884
|
+
|
|
13885
|
+
var _useState2 = React.useState(''),
|
|
13886
|
+
search = _useState2[0],
|
|
13887
|
+
_setSearch = _useState2[1];
|
|
13609
13888
|
|
|
13610
13889
|
var _useState3 = React.useState(''),
|
|
13611
|
-
|
|
13612
|
-
|
|
13890
|
+
searchInput = _useState3[0],
|
|
13891
|
+
setSearchInput = _useState3[1];
|
|
13613
13892
|
|
|
13614
13893
|
var _useState4 = React.useState(1),
|
|
13615
13894
|
page = _useState4[0],
|
|
@@ -13623,10 +13902,6 @@ var Select = React__default.forwardRef(function (props, ref) {
|
|
|
13623
13902
|
open = _useState6[0],
|
|
13624
13903
|
setOpen = _useState6[1];
|
|
13625
13904
|
|
|
13626
|
-
var _useState7 = React.useState(Array.isArray(props.value) ? [].concat(props.value) : []),
|
|
13627
|
-
checked = _useState7[0],
|
|
13628
|
-
setChecked = _useState7[1];
|
|
13629
|
-
|
|
13630
13905
|
var loading = props.loading || _loading;
|
|
13631
13906
|
|
|
13632
13907
|
var setSearch = function setSearch(value) {
|
|
@@ -13635,21 +13910,9 @@ var Select = React__default.forwardRef(function (props, ref) {
|
|
|
13635
13910
|
setPage(1);
|
|
13636
13911
|
};
|
|
13637
13912
|
|
|
13638
|
-
var
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
if (props.type === 'select-multiple') {
|
|
13642
|
-
if (props.value.length > 0) {
|
|
13643
|
-
inputProps.value = props.value.length > 1 ? "H\xE1 " + props.value.length + " sele\xE7\xF5es" : "H\xE1 " + props.value.length + " sele\xE7\xE3o";
|
|
13644
|
-
} else {
|
|
13645
|
-
inputProps.value = '';
|
|
13646
|
-
}
|
|
13647
|
-
} else {
|
|
13648
|
-
var selected = parsedOptions.find(function (option) {
|
|
13649
|
-
return option.data.value === props.value;
|
|
13650
|
-
});
|
|
13651
|
-
inputProps.value = selected ? selected.label.text : '';
|
|
13652
|
-
}
|
|
13913
|
+
var inputProps = filterObject(props, ['type', 'onScrollEnd', 'position', 'value'], {
|
|
13914
|
+
value: inputValue
|
|
13915
|
+
});
|
|
13653
13916
|
|
|
13654
13917
|
var _onScrollEnd = props.onScrollEnd || function () {};
|
|
13655
13918
|
|
|
@@ -13699,17 +13962,28 @@ var Select = React__default.forwardRef(function (props, ref) {
|
|
|
13699
13962
|
React.useEffect(function () {
|
|
13700
13963
|
if (open) return;
|
|
13701
13964
|
setSearch('');
|
|
13702
|
-
|
|
13965
|
+
onReset();
|
|
13703
13966
|
}, [props.value, open]);
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13967
|
+
React.useEffect(function () {
|
|
13968
|
+
setSearchInput(search);
|
|
13969
|
+
}, [search]);
|
|
13970
|
+
|
|
13971
|
+
var onSearch = function onSearch() {
|
|
13972
|
+
setSearch(searchInput);
|
|
13973
|
+
};
|
|
13974
|
+
|
|
13975
|
+
var onClearSearch = function onClearSearch() {
|
|
13976
|
+
setSearchInput('');
|
|
13977
|
+
setSearch('');
|
|
13978
|
+
};
|
|
13979
|
+
|
|
13980
|
+
return getContext({
|
|
13981
|
+
setOpen: setOpen,
|
|
13982
|
+
search: [search, setSearch],
|
|
13983
|
+
searchInput: [searchInput, setSearchInput],
|
|
13984
|
+
onSearch: onSearch,
|
|
13985
|
+
onClearSearch: onClearSearch,
|
|
13986
|
+
loading: loading
|
|
13713
13987
|
}, React__default.createElement(RelativeContainer$2, {
|
|
13714
13988
|
ref: useOnClickOut(function () {
|
|
13715
13989
|
return setOpen(false);
|
|
@@ -13732,7 +14006,7 @@ var Select = React__default.forwardRef(function (props, ref) {
|
|
|
13732
14006
|
}
|
|
13733
14007
|
},
|
|
13734
14008
|
ref: ref
|
|
13735
|
-
})), React__default.createElement(Menu, {
|
|
14009
|
+
})), React__default.createElement(Menu, Object.assign({}, menuProps, {
|
|
13736
14010
|
open: open,
|
|
13737
14011
|
close: function close() {
|
|
13738
14012
|
return setOpen(false);
|
|
@@ -13741,20 +14015,21 @@ var Select = React__default.forwardRef(function (props, ref) {
|
|
|
13741
14015
|
onScrollEnd: onScrollEnd,
|
|
13742
14016
|
width: '100%',
|
|
13743
14017
|
bordered: true,
|
|
13744
|
-
itemSpacing: type === 'select-multiple' ? undefined : 's3',
|
|
13745
14018
|
position: position,
|
|
13746
14019
|
references: {
|
|
13747
14020
|
bottom: '35px'
|
|
13748
14021
|
},
|
|
13749
|
-
before: React__default.createElement(Header$1, null),
|
|
13750
|
-
after: React__default.createElement(Footer$1, null),
|
|
13751
|
-
scrollHeight: props.search ? '135px' : '165px',
|
|
13752
14022
|
loading: loading,
|
|
13753
14023
|
center: props.center || {
|
|
13754
14024
|
x: 50,
|
|
13755
14025
|
y: 50
|
|
14026
|
+
},
|
|
14027
|
+
transition: {
|
|
14028
|
+
properties: {
|
|
14029
|
+
'max-height': {}
|
|
14030
|
+
}
|
|
13756
14031
|
}
|
|
13757
|
-
})));
|
|
14032
|
+
}))));
|
|
13758
14033
|
});
|
|
13759
14034
|
Select.displayName = 'Select';
|
|
13760
14035
|
|
|
@@ -13814,7 +14089,7 @@ Password.displayName = 'Password';
|
|
|
13814
14089
|
|
|
13815
14090
|
var img = "flags~SpNmyrlX.png";
|
|
13816
14091
|
|
|
13817
|
-
var _templateObject$
|
|
14092
|
+
var _templateObject$j, _templateObject2$f;
|
|
13818
14093
|
var coordinates = {
|
|
13819
14094
|
ar: {
|
|
13820
14095
|
s1: '0px 0px',
|
|
@@ -13889,12 +14164,12 @@ var coordinates = {
|
|
|
13889
14164
|
s6: '0px 0px'
|
|
13890
14165
|
}
|
|
13891
14166
|
};
|
|
13892
|
-
var Flag = styled__default.div(_templateObject$
|
|
14167
|
+
var Flag = styled__default.div(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n background-image: url(", ");\n background-size: auto 100%;\n\n ", "\n"])), img, function (_ref) {
|
|
13893
14168
|
var iso = _ref.iso,
|
|
13894
14169
|
width = _ref.width,
|
|
13895
14170
|
theme = _ref.theme;
|
|
13896
14171
|
width = width || 's4';
|
|
13897
|
-
return styled.css(_templateObject2$
|
|
14172
|
+
return styled.css(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n background-position: ", ";\n width: ", ";\n height: calc(", " / 1.4);\n "])), coordinates[iso][width], theme.spacings[width], theme.spacings[width]);
|
|
13898
14173
|
});
|
|
13899
14174
|
|
|
13900
14175
|
var countries = {
|
|
@@ -13998,10 +14273,10 @@ var countries = {
|
|
|
13998
14273
|
}
|
|
13999
14274
|
};
|
|
14000
14275
|
|
|
14001
|
-
var _templateObject$
|
|
14002
|
-
var IconContainer$1 = styled__default.div(_templateObject$
|
|
14003
|
-
var RelativeContainer$3 = styled__default.div(_templateObject2$
|
|
14004
|
-
var Label$2 = styled__default.div(_templateObject3$
|
|
14276
|
+
var _templateObject$k, _templateObject2$g, _templateObject3$e;
|
|
14277
|
+
var IconContainer$1 = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n > i.icon {\n margin-top: -1px;\n }\n"])));
|
|
14278
|
+
var RelativeContainer$3 = styled__default.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
14279
|
+
var Label$2 = styled__default.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n ", "\n\n color: ", ";\n\n display: flex;\n gap: ", ";\n\n > span {\n color: ", ";\n }\n"])), function (_ref) {
|
|
14005
14280
|
var theme = _ref.theme;
|
|
14006
14281
|
return theme.useTypography('p');
|
|
14007
14282
|
}, function (_ref2) {
|
|
@@ -14090,10 +14365,9 @@ var Phone = React__default.forwardRef(function (props, ref) {
|
|
|
14090
14365
|
iso: iso
|
|
14091
14366
|
}), countries[iso].name, React__default.createElement("span", null, "+", countries[iso].ddi))
|
|
14092
14367
|
},
|
|
14093
|
-
onClick: function onClick(
|
|
14094
|
-
setCountry(
|
|
14095
|
-
}
|
|
14096
|
-
data: countries[iso]
|
|
14368
|
+
onClick: function onClick() {
|
|
14369
|
+
setCountry(countries[iso]);
|
|
14370
|
+
}
|
|
14097
14371
|
};
|
|
14098
14372
|
});
|
|
14099
14373
|
|
|
@@ -14153,14 +14427,19 @@ var Phone = React__default.forwardRef(function (props, ref) {
|
|
|
14153
14427
|
width: '100%',
|
|
14154
14428
|
maxHeight: '165px',
|
|
14155
14429
|
bordered: true,
|
|
14156
|
-
itemSpacing: 's3'
|
|
14430
|
+
itemSpacing: 's3',
|
|
14431
|
+
transition: {
|
|
14432
|
+
properties: {
|
|
14433
|
+
'max-height': {}
|
|
14434
|
+
}
|
|
14435
|
+
}
|
|
14157
14436
|
}));
|
|
14158
14437
|
});
|
|
14159
14438
|
Phone.displayName = 'Phone';
|
|
14160
14439
|
|
|
14161
|
-
var _templateObject$
|
|
14162
|
-
var RelativeContainer$4 = styled__default.div(_templateObject$
|
|
14163
|
-
var Container$8 = styled__default.div(_templateObject2$
|
|
14440
|
+
var _templateObject$l, _templateObject2$h, _templateObject3$f, _templateObject4$c, _templateObject5$b, _templateObject6$9;
|
|
14441
|
+
var RelativeContainer$4 = styled__default.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n position: relative;\n\n input {\n color: transparent;\n }\n"])));
|
|
14442
|
+
var Container$8 = styled__default.div(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 1px;\n left: 1px;\n width: calc(100% - 2px - ", ");\n height: 33px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ", ";\n border-radius: 4px;\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
14164
14443
|
var iconWidth = _ref.iconWidth,
|
|
14165
14444
|
theme = _ref.theme;
|
|
14166
14445
|
return iconWidth + " - " + theme.spacings.s3;
|
|
@@ -14171,11 +14450,11 @@ var Container$8 = styled__default.div(_templateObject2$f || (_templateObject2$f
|
|
|
14171
14450
|
var invalid = _ref3.invalid,
|
|
14172
14451
|
theme = _ref3.theme;
|
|
14173
14452
|
if (!invalid) return;
|
|
14174
|
-
return styled.css(_templateObject3$
|
|
14453
|
+
return styled.css(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
|
|
14175
14454
|
}, function (_ref4) {
|
|
14176
14455
|
var disabled = _ref4.disabled;
|
|
14177
14456
|
if (!disabled) return;
|
|
14178
|
-
return styled.css(_templateObject4$
|
|
14457
|
+
return styled.css(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
14179
14458
|
});
|
|
14180
14459
|
var Button$3 = styled__default.button(_templateObject5$b || (_templateObject5$b = _taggedTemplateLiteralLoose(["\n display: flex;\n background-color: transparent;\n border: none;\n padding: 0;\n box-shadow: none;\n\n ", ";\n"])), function (_ref5) {
|
|
14181
14460
|
var onClick = _ref5.onClick;
|
|
@@ -14273,7 +14552,8 @@ var DatePicker = React__default.forwardRef(function (props, ref) {
|
|
|
14273
14552
|
icon: 'chevron_right',
|
|
14274
14553
|
color: props.invalid ? 'warningRed' : 'grey',
|
|
14275
14554
|
strokeWidth: '3px'
|
|
14276
|
-
}))),
|
|
14555
|
+
}))), React__default.createElement(Calendar, {
|
|
14556
|
+
open: open,
|
|
14277
14557
|
initalValue: value ? isoStringToDate(value) : undefined,
|
|
14278
14558
|
onSubmit: {
|
|
14279
14559
|
onClick: function onClick(date) {
|
|
@@ -14291,22 +14571,22 @@ var DatePicker = React__default.forwardRef(function (props, ref) {
|
|
|
14291
14571
|
});
|
|
14292
14572
|
DatePicker.displayName = 'DatePicker';
|
|
14293
14573
|
|
|
14294
|
-
var _templateObject$
|
|
14295
|
-
var LabelContainer = styled__default.div(_templateObject$
|
|
14574
|
+
var _templateObject$m, _templateObject2$i, _templateObject3$g, _templateObject4$d, _templateObject5$c, _templateObject6$a, _templateObject7$7;
|
|
14575
|
+
var LabelContainer = styled__default.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n ", "\n line-height: 14px;\n display: flex;\n align-items: center;\n"])), function (_ref) {
|
|
14296
14576
|
var theme = _ref.theme;
|
|
14297
14577
|
return theme.useTypography('p');
|
|
14298
14578
|
});
|
|
14299
|
-
var Label$3 = styled__default.label(_templateObject2$
|
|
14579
|
+
var Label$3 = styled__default.label(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: ", ";\n position: relative;\n\n ", "\n\n ", "\n\n ", "\n\n > input {\n position: absolute;\n height: 0%;\n width: 0%;\n opacity: 0;\n }\n\n > span {\n position: relative;\n width: 50px;\n height: calc(", " + 1px);\n background-color: ", ";\n border-radius: 20px;\n transition-property: background-color;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n box-sizing: content-box;\n :before {\n content: '';\n transition-property: left;\n transition-duration: 0.4s;\n transition-timing-function: ease-in-out;\n position: absolute;\n border-width: 1px;\n border-style: solid;\n border-radius: 100%;\n left: 0;\n box-shadow: 0px 1px 3px ", ";\n width: calc(", " - 1px);\n height: calc(", " - 1px);\n background-color: ", ";\n }\n }\n\n > input:checked + span {\n :before {\n left: calc(100% - ", " - 1px);\n }\n }\n"])), function (_ref2) {
|
|
14300
14580
|
var theme = _ref2.theme;
|
|
14301
14581
|
return theme.spacings.s1;
|
|
14302
14582
|
}, function (_ref3) {
|
|
14303
14583
|
var disabled = _ref3.disabled;
|
|
14304
14584
|
|
|
14305
14585
|
if (!disabled) {
|
|
14306
|
-
return styled.css(_templateObject3$
|
|
14586
|
+
return styled.css(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["\n > span {\n cursor: pointer;\n }\n "])));
|
|
14307
14587
|
}
|
|
14308
14588
|
|
|
14309
|
-
return styled.css(_templateObject4$
|
|
14589
|
+
return styled.css(_templateObject4$d || (_templateObject4$d = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
14310
14590
|
}, function (_ref4) {
|
|
14311
14591
|
var required = _ref4.required;
|
|
14312
14592
|
if (!required) return;
|
|
@@ -14369,8 +14649,8 @@ var Switch = function Switch(props) {
|
|
|
14369
14649
|
})), React__default.createElement("span", null), label && React__default.createElement(LabelContainer, null, label));
|
|
14370
14650
|
};
|
|
14371
14651
|
|
|
14372
|
-
var _templateObject$
|
|
14373
|
-
var bullet = styled.css(_templateObject$
|
|
14652
|
+
var _templateObject$n, _templateObject2$j, _templateObject3$h, _templateObject4$e, _templateObject5$d, _templateObject6$b, _templateObject7$8, _templateObject8$5, _templateObject9$5, _templateObject10$4, _templateObject11$3, _templateObject12$3, _templateObject13$2, _templateObject14$1, _templateObject15, _templateObject16;
|
|
14653
|
+
var bullet = styled.css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: ", ";\n height: ", ";\n border-radius: 100%;\n border-width: 1px;\n border-style: solid;\n background-color: ", ";\n box-shadow: 0px 1px 3px ", ";\n"])), function (_ref) {
|
|
14374
14654
|
var theme = _ref.theme;
|
|
14375
14655
|
return theme.spacings.s4;
|
|
14376
14656
|
}, function (_ref2) {
|
|
@@ -14383,8 +14663,8 @@ var bullet = styled.css(_templateObject$k || (_templateObject$k = _taggedTemplat
|
|
|
14383
14663
|
var theme = _ref4.theme;
|
|
14384
14664
|
return theme.getColor('black', 10);
|
|
14385
14665
|
});
|
|
14386
|
-
var Input$2 = styled__default.input(_templateObject2$
|
|
14387
|
-
var Label$4 = styled__default.label(_templateObject3$
|
|
14666
|
+
var Input$2 = styled__default.input(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n appearance: none;\n width: 100%;\n height: 10px;\n background-color: transparent;\n outline: none;\n position: relative;\n z-index: 3;\n margin: 0;\n\n :not(:disabled) {\n cursor: pointer;\n }\n\n /** firefox */\n ::-moz-range-thumb {\n ", "\n }\n /** ie */\n ::-ms-thumb {\n ", "\n }\n /** chrome */\n ::-webkit-slider-thumb {\n ", "\n }\n"])), bullet, bullet, bullet);
|
|
14667
|
+
var Label$4 = styled__default.label(_templateObject3$h || (_templateObject3$h = _taggedTemplateLiteralLoose(["\n ", ";\n\n width: ", ";\n box-sizing: border-box;\n display: block;\n position: relative;\n\n ", "\n\n > div:first-child {\n display: inline-block;\n margin-bottom: ", ";\n\n ", "\n }\n"])), function (_ref5) {
|
|
14388
14668
|
var theme = _ref5.theme;
|
|
14389
14669
|
return theme.useTypography('p');
|
|
14390
14670
|
}, function (_ref6) {
|
|
@@ -14393,7 +14673,7 @@ var Label$4 = styled__default.label(_templateObject3$g || (_templateObject3$g =
|
|
|
14393
14673
|
}, function (_ref7) {
|
|
14394
14674
|
var disabled = _ref7.disabled;
|
|
14395
14675
|
if (!disabled) return;
|
|
14396
|
-
return styled.css(_templateObject4$
|
|
14676
|
+
return styled.css(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
14397
14677
|
}, function (_ref8) {
|
|
14398
14678
|
var theme = _ref8.theme;
|
|
14399
14679
|
return theme.spacings.s1;
|
|
@@ -14462,13 +14742,19 @@ var getMarkers = function getMarkers(props) {
|
|
|
14462
14742
|
var _max2 = _markers.length - 1;
|
|
14463
14743
|
|
|
14464
14744
|
var _step2 = 1;
|
|
14745
|
+
|
|
14746
|
+
var value = _markers.findIndex(function (m) {
|
|
14747
|
+
return m.value === props.value;
|
|
14748
|
+
});
|
|
14749
|
+
|
|
14465
14750
|
return {
|
|
14466
14751
|
min: _min2,
|
|
14467
14752
|
max: _max2,
|
|
14468
14753
|
step: _step2,
|
|
14469
14754
|
strict: _strict,
|
|
14470
14755
|
markers: _markers,
|
|
14471
|
-
position: position
|
|
14756
|
+
position: position,
|
|
14757
|
+
value: value
|
|
14472
14758
|
};
|
|
14473
14759
|
}
|
|
14474
14760
|
|
|
@@ -14483,7 +14769,8 @@ var getMarkers = function getMarkers(props) {
|
|
|
14483
14769
|
step: _step,
|
|
14484
14770
|
strict: _strict,
|
|
14485
14771
|
markers: _markers,
|
|
14486
|
-
position: position
|
|
14772
|
+
position: position,
|
|
14773
|
+
value: props.value
|
|
14487
14774
|
};
|
|
14488
14775
|
}
|
|
14489
14776
|
|
|
@@ -14498,7 +14785,8 @@ var getMarkers = function getMarkers(props) {
|
|
|
14498
14785
|
step: step,
|
|
14499
14786
|
strict: strict,
|
|
14500
14787
|
markers: [],
|
|
14501
|
-
position: 'bottom'
|
|
14788
|
+
position: 'bottom',
|
|
14789
|
+
value: props.value
|
|
14502
14790
|
};
|
|
14503
14791
|
};
|
|
14504
14792
|
|
|
@@ -14517,11 +14805,11 @@ var Range = React__default.forwardRef(function (props, ref) {
|
|
|
14517
14805
|
strict = _getMarkers.strict,
|
|
14518
14806
|
markers = _getMarkers.markers,
|
|
14519
14807
|
step = _getMarkers.step,
|
|
14520
|
-
position = _getMarkers.position
|
|
14808
|
+
position = _getMarkers.position,
|
|
14809
|
+
value = _getMarkers.value;
|
|
14521
14810
|
|
|
14522
14811
|
var range = max - min;
|
|
14523
14812
|
var percent = 100 / range;
|
|
14524
|
-
var value = props.value !== undefined ? parseFloat("" + props.value) : min;
|
|
14525
14813
|
var spans = value - min;
|
|
14526
14814
|
|
|
14527
14815
|
if (value < min || value > max) {
|
|
@@ -14540,11 +14828,12 @@ var Range = React__default.forwardRef(function (props, ref) {
|
|
|
14540
14828
|
|
|
14541
14829
|
_onChange(event, value);
|
|
14542
14830
|
};
|
|
14543
|
-
var inputProps = filterObject(props, ['label', 'minLabel', 'maxLabel', 'invalid', 'required', 'width', 'onChange', 'step'], {
|
|
14831
|
+
var inputProps = filterObject(props, ['label', 'minLabel', 'maxLabel', 'invalid', 'required', 'width', 'onChange', 'step', 'value'], {
|
|
14544
14832
|
min: min,
|
|
14545
14833
|
max: max,
|
|
14546
14834
|
step: step,
|
|
14547
|
-
onChange: onChange
|
|
14835
|
+
onChange: onChange,
|
|
14836
|
+
value: value
|
|
14548
14837
|
});
|
|
14549
14838
|
return React__default.createElement(Label$4, {
|
|
14550
14839
|
required: required ? 1 : 0,
|
|
@@ -14579,22 +14868,22 @@ var Range = React__default.forwardRef(function (props, ref) {
|
|
|
14579
14868
|
});
|
|
14580
14869
|
Range.displayName = 'input';
|
|
14581
14870
|
|
|
14582
|
-
var _templateObject$
|
|
14583
|
-
var LabelContainer$1 = styled__default.div(_templateObject$
|
|
14871
|
+
var _templateObject$o, _templateObject2$k, _templateObject3$i, _templateObject4$f, _templateObject5$e, _templateObject6$c, _templateObject7$9;
|
|
14872
|
+
var LabelContainer$1 = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n ", "\n display: flex;\n align-items: center;\n"])), function (_ref) {
|
|
14584
14873
|
var theme = _ref.theme;
|
|
14585
14874
|
return theme.useTypography('p');
|
|
14586
14875
|
});
|
|
14587
|
-
var Label$5 = styled__default.label(_templateObject2$
|
|
14876
|
+
var Label$5 = styled__default.label(_templateObject2$k || (_templateObject2$k = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: ", ";\n\n ", "\n\n ", "\n\n", "\n\n > input {\n height: 0;\n width: 0;\n /* Chrome, Safari, Edge, Opera */\n :-webkit-outer-spin-button,\n :-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n -moz-appearance: none;\n }\n\n > span {\n height: 17px;\n width: 17px;\n border-radius: 100%;\n border-width: 1px;\n border-style: solid;\n background-color: ", ";\n position: relative;\n transition-property: border-color;\n transition-duration: 0.5s;\n transition-timing-function: ease-in-out;\n :before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n height: 0;\n width: 0;\n border-radius: 100%;\n transition-property: top, left, width, height, background-color;\n transition-duration: 0.5s;\n transition-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);\n }\n }\n > input:checked + span {\n :before {\n top: calc(50% - 4.5px);\n left: calc(50% - 4.5px);\n height: 9px;\n width: 9px;\n }\n }\n"])), function (_ref2) {
|
|
14588
14877
|
var theme = _ref2.theme;
|
|
14589
14878
|
return theme.spacings.s1;
|
|
14590
14879
|
}, function (_ref3) {
|
|
14591
14880
|
var disabled = _ref3.disabled;
|
|
14592
14881
|
|
|
14593
14882
|
if (!disabled) {
|
|
14594
|
-
return styled.css(_templateObject3$
|
|
14883
|
+
return styled.css(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteralLoose(["\n > span {\n cursor: pointer;\n }\n "])));
|
|
14595
14884
|
}
|
|
14596
14885
|
|
|
14597
|
-
return styled.css(_templateObject4$
|
|
14886
|
+
return styled.css(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
14598
14887
|
}, function (_ref4) {
|
|
14599
14888
|
var required = _ref4.required;
|
|
14600
14889
|
if (!required) return;
|
|
@@ -14639,6 +14928,503 @@ var RadioButton = function RadioButton(props) {
|
|
|
14639
14928
|
})), React__default.createElement("span", null), label && React__default.createElement(LabelContainer$1, null, label));
|
|
14640
14929
|
};
|
|
14641
14930
|
|
|
14931
|
+
var _templateObject$p;
|
|
14932
|
+
var Container$9 = styled__default.div(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n padding: ", ";\n background-color: ", ";\n display: flex;\n width: min-content;\n"])), function (_ref) {
|
|
14933
|
+
var theme = _ref.theme;
|
|
14934
|
+
return theme.spacings.s1 + " " + theme.spacings.s1 + " 0px " + theme.spacings.s1;
|
|
14935
|
+
}, function (_ref2) {
|
|
14936
|
+
var theme = _ref2.theme;
|
|
14937
|
+
return theme.colors.white;
|
|
14938
|
+
});
|
|
14939
|
+
|
|
14940
|
+
var CalendarInterval = function CalendarInterval(props) {
|
|
14941
|
+
var time = props.time;
|
|
14942
|
+
|
|
14943
|
+
var _ref = props.value && Array.isArray(props.value.start) ? props.value.start : React.useState(null),
|
|
14944
|
+
start = _ref[0],
|
|
14945
|
+
setStart = _ref[1];
|
|
14946
|
+
|
|
14947
|
+
var _ref2 = props.value && Array.isArray(props.value.end) ? props.value.end : React.useState(null),
|
|
14948
|
+
end = _ref2[0],
|
|
14949
|
+
setEnd = _ref2[1];
|
|
14950
|
+
|
|
14951
|
+
React.useEffect(function () {
|
|
14952
|
+
if (!props.value) return;
|
|
14953
|
+
|
|
14954
|
+
if (!Array.isArray(props.value.start)) {
|
|
14955
|
+
setStart(props.value.start);
|
|
14956
|
+
}
|
|
14957
|
+
|
|
14958
|
+
if (!Array.isArray(props.value.end)) {
|
|
14959
|
+
setEnd(props.value.end);
|
|
14960
|
+
}
|
|
14961
|
+
}, [props.value]);
|
|
14962
|
+
|
|
14963
|
+
var _useState = React.useState(false),
|
|
14964
|
+
startInvalid = _useState[0],
|
|
14965
|
+
setStartInvalid = _useState[1];
|
|
14966
|
+
|
|
14967
|
+
var _useState2 = React.useState(false),
|
|
14968
|
+
endInvalid = _useState2[0],
|
|
14969
|
+
setEndInvalid = _useState2[1];
|
|
14970
|
+
|
|
14971
|
+
var min;
|
|
14972
|
+
|
|
14973
|
+
if (props.min) {
|
|
14974
|
+
min = new Date(props.min.getTime());
|
|
14975
|
+
}
|
|
14976
|
+
|
|
14977
|
+
var max;
|
|
14978
|
+
|
|
14979
|
+
if (props.max) {
|
|
14980
|
+
max = new Date(props.max.getTime());
|
|
14981
|
+
}
|
|
14982
|
+
|
|
14983
|
+
var minEnd;
|
|
14984
|
+
|
|
14985
|
+
if (start) {
|
|
14986
|
+
minEnd = start;
|
|
14987
|
+
|
|
14988
|
+
if (min) {
|
|
14989
|
+
minEnd = start >= min ? start : min;
|
|
14990
|
+
}
|
|
14991
|
+
} else if (min) {
|
|
14992
|
+
minEnd = min;
|
|
14993
|
+
}
|
|
14994
|
+
|
|
14995
|
+
var maxStart;
|
|
14996
|
+
|
|
14997
|
+
if (end) {
|
|
14998
|
+
maxStart = end;
|
|
14999
|
+
|
|
15000
|
+
if (max) {
|
|
15001
|
+
maxStart = end <= max ? end : max;
|
|
15002
|
+
}
|
|
15003
|
+
} else if (max) {
|
|
15004
|
+
maxStart = max;
|
|
15005
|
+
}
|
|
15006
|
+
|
|
15007
|
+
var _onSubmit = props.onSubmit || {};
|
|
15008
|
+
|
|
15009
|
+
var onSubmit = _extends({
|
|
15010
|
+
disabled: startInvalid || endInvalid,
|
|
15011
|
+
onClick: function onClick() {}
|
|
15012
|
+
}, _onSubmit);
|
|
15013
|
+
|
|
15014
|
+
var absoluteContainerProps = filterObject(props, ['max', 'min', 'value', 'time', 'onSubmit']);
|
|
15015
|
+
return React__default.createElement(AbsoluteContainer, Object.assign({
|
|
15016
|
+
axis: 'y',
|
|
15017
|
+
maxHeight: '329px'
|
|
15018
|
+
}, absoluteContainerProps), React__default.createElement(Container$9, null, React__default.createElement(Calendar, {
|
|
15019
|
+
open: true,
|
|
15020
|
+
value: [start, setStart],
|
|
15021
|
+
min: min,
|
|
15022
|
+
max: maxStart,
|
|
15023
|
+
overlay: {
|
|
15024
|
+
type: 'after',
|
|
15025
|
+
value: end
|
|
15026
|
+
},
|
|
15027
|
+
time: time,
|
|
15028
|
+
invalid: [startInvalid, setStartInvalid],
|
|
15029
|
+
notAbsolute: true
|
|
15030
|
+
}), React__default.createElement(Calendar, {
|
|
15031
|
+
open: true,
|
|
15032
|
+
value: [end, setEnd],
|
|
15033
|
+
min: minEnd,
|
|
15034
|
+
max: max,
|
|
15035
|
+
overlay: {
|
|
15036
|
+
type: 'before',
|
|
15037
|
+
value: start
|
|
15038
|
+
},
|
|
15039
|
+
time: time,
|
|
15040
|
+
invalid: [endInvalid, setEndInvalid],
|
|
15041
|
+
notAbsolute: true,
|
|
15042
|
+
onSubmit: {
|
|
15043
|
+
onClick: function onClick() {
|
|
15044
|
+
return onSubmit.onClick(start, end);
|
|
15045
|
+
},
|
|
15046
|
+
disabled: onSubmit.disabled
|
|
15047
|
+
}
|
|
15048
|
+
})));
|
|
15049
|
+
};
|
|
15050
|
+
|
|
15051
|
+
var validate = function validate(_ref, min, max) {
|
|
15052
|
+
var start = _ref[0],
|
|
15053
|
+
end = _ref[1];
|
|
15054
|
+
if (min && start < min) return false;
|
|
15055
|
+
if (max && end > max) return false;
|
|
15056
|
+
return true;
|
|
15057
|
+
};
|
|
15058
|
+
var intervalTypes = {
|
|
15059
|
+
day: {
|
|
15060
|
+
label: function label(prev) {
|
|
15061
|
+
var today = new Date();
|
|
15062
|
+
today.setHours(0, 0, 0, 0);
|
|
15063
|
+
if (isDateEquals(today, prev[0])) return 'Hoje';
|
|
15064
|
+
return dateToIsoString(prev[0], false, false);
|
|
15065
|
+
},
|
|
15066
|
+
initial: function initial(base) {
|
|
15067
|
+
if (!base) base = new Date();
|
|
15068
|
+
var start = new Date(base);
|
|
15069
|
+
start.setHours(0, 0, 0, 0);
|
|
15070
|
+
var end = new Date(base);
|
|
15071
|
+
end.setHours(23, 59, 59, 0);
|
|
15072
|
+
return [start, end];
|
|
15073
|
+
},
|
|
15074
|
+
increment: function increment(prev) {
|
|
15075
|
+
return prev.map(function (d) {
|
|
15076
|
+
var tmp = new Date(d);
|
|
15077
|
+
tmp.setDate(tmp.getDate() + 1);
|
|
15078
|
+
return tmp;
|
|
15079
|
+
});
|
|
15080
|
+
},
|
|
15081
|
+
decrement: function decrement(prev) {
|
|
15082
|
+
return prev.map(function (d) {
|
|
15083
|
+
var tmp = new Date(d);
|
|
15084
|
+
tmp.setDate(tmp.getDate() - 1);
|
|
15085
|
+
return tmp;
|
|
15086
|
+
});
|
|
15087
|
+
}
|
|
15088
|
+
},
|
|
15089
|
+
week: {
|
|
15090
|
+
label: function label(prev) {
|
|
15091
|
+
var _getWeekNumber = getWeekNumber(prev[0]),
|
|
15092
|
+
weekNumber = _getWeekNumber[0];
|
|
15093
|
+
|
|
15094
|
+
return weekNumber + "\xAA Semana";
|
|
15095
|
+
},
|
|
15096
|
+
initial: function initial(base) {
|
|
15097
|
+
if (!base) base = new Date();
|
|
15098
|
+
var start = new Date(base);
|
|
15099
|
+
start.setDate(start.getDate() - start.getUTCDay());
|
|
15100
|
+
start.setHours(0, 0, 0, 0);
|
|
15101
|
+
var end = new Date(base);
|
|
15102
|
+
end.setDate(start.getDate() - start.getUTCDay() + 6);
|
|
15103
|
+
end.setHours(23, 59, 59, 0);
|
|
15104
|
+
return [start, end];
|
|
15105
|
+
},
|
|
15106
|
+
increment: function increment(prev) {
|
|
15107
|
+
return prev.map(function (d) {
|
|
15108
|
+
var tmp = new Date(d);
|
|
15109
|
+
tmp.setDate(tmp.getDate() + 7);
|
|
15110
|
+
return tmp;
|
|
15111
|
+
});
|
|
15112
|
+
},
|
|
15113
|
+
decrement: function decrement(prev) {
|
|
15114
|
+
return prev.map(function (d) {
|
|
15115
|
+
var tmp = new Date(d);
|
|
15116
|
+
tmp.setDate(tmp.getDate() - 7);
|
|
15117
|
+
return tmp;
|
|
15118
|
+
});
|
|
15119
|
+
},
|
|
15120
|
+
getMinMax: function getMinMax(min, max) {
|
|
15121
|
+
var firstWeek = getFirstWeek();
|
|
15122
|
+
var lastWeek = getLastWeek();
|
|
15123
|
+
if (!min || min < firstWeek) min = firstWeek;
|
|
15124
|
+
if (!max || max > lastWeek) max = lastWeek;
|
|
15125
|
+
return {
|
|
15126
|
+
min: min,
|
|
15127
|
+
max: max
|
|
15128
|
+
};
|
|
15129
|
+
}
|
|
15130
|
+
},
|
|
15131
|
+
month: {
|
|
15132
|
+
label: function label(prev) {
|
|
15133
|
+
var monthName = getMonthName(prev[0]);
|
|
15134
|
+
var year = prev[0].getFullYear();
|
|
15135
|
+
return monthName + "/" + year;
|
|
15136
|
+
},
|
|
15137
|
+
initial: function initial(base) {
|
|
15138
|
+
if (!base) base = new Date();
|
|
15139
|
+
var start = new Date(base);
|
|
15140
|
+
start.setDate(1);
|
|
15141
|
+
start.setHours(0, 0, 0, 0);
|
|
15142
|
+
var end = new Date(base);
|
|
15143
|
+
end.setMonth(end.getMonth() + 1);
|
|
15144
|
+
end.setDate(0);
|
|
15145
|
+
end.setHours(23, 59, 59, 0);
|
|
15146
|
+
return [start, end];
|
|
15147
|
+
},
|
|
15148
|
+
increment: function increment(prev) {
|
|
15149
|
+
var start = new Date(prev[0]);
|
|
15150
|
+
start.setDate(1);
|
|
15151
|
+
start.setMonth(start.getMonth() + 1);
|
|
15152
|
+
var end = new Date(start);
|
|
15153
|
+
end.setMonth(end.getMonth() + 1);
|
|
15154
|
+
end.setDate(0);
|
|
15155
|
+
end.setHours(23, 59, 59, 0);
|
|
15156
|
+
return [start, end];
|
|
15157
|
+
},
|
|
15158
|
+
decrement: function decrement(prev) {
|
|
15159
|
+
var start = new Date(prev[0]);
|
|
15160
|
+
start.setDate(1);
|
|
15161
|
+
start.setMonth(start.getMonth() - 1);
|
|
15162
|
+
var end = new Date(start);
|
|
15163
|
+
end.setMonth(end.getMonth() - 1);
|
|
15164
|
+
end.setDate(0);
|
|
15165
|
+
end.setHours(23, 59, 59, 0);
|
|
15166
|
+
return [start, end];
|
|
15167
|
+
}
|
|
15168
|
+
},
|
|
15169
|
+
custom: {
|
|
15170
|
+
label: function label(prev) {
|
|
15171
|
+
var start = dateToIsoString(prev[0], false, false);
|
|
15172
|
+
var end = dateToIsoString(prev[1], false, false);
|
|
15173
|
+
return start + " - " + end;
|
|
15174
|
+
},
|
|
15175
|
+
initial: function initial(base) {
|
|
15176
|
+
if (!base) base = new Date();
|
|
15177
|
+
return [base, base];
|
|
15178
|
+
}
|
|
15179
|
+
}
|
|
15180
|
+
};
|
|
15181
|
+
var identify = function identify(value) {
|
|
15182
|
+
var start = value[0],
|
|
15183
|
+
end = value[1];
|
|
15184
|
+
var isoStart = dateToIsoString(start);
|
|
15185
|
+
var isoEnd = dateToIsoString(end);
|
|
15186
|
+
|
|
15187
|
+
if (isoStart === isoEnd) {
|
|
15188
|
+
var _intervalTypes$day$in = intervalTypes.day.initial(start),
|
|
15189
|
+
expectedStart = _intervalTypes$day$in[0],
|
|
15190
|
+
expectedEnd = _intervalTypes$day$in[1];
|
|
15191
|
+
|
|
15192
|
+
if (isDateEquals(start, expectedStart) && isDateEquals(end, expectedEnd)) {
|
|
15193
|
+
return 'day';
|
|
15194
|
+
}
|
|
15195
|
+
}
|
|
15196
|
+
|
|
15197
|
+
if (start.getUTCDay() === 0) {
|
|
15198
|
+
var _intervalTypes$week$i = intervalTypes.week.initial(start),
|
|
15199
|
+
_expectedStart = _intervalTypes$week$i[0],
|
|
15200
|
+
_expectedEnd = _intervalTypes$week$i[1];
|
|
15201
|
+
|
|
15202
|
+
if (isDateEquals(start, _expectedStart) && isDateEquals(end, _expectedEnd)) {
|
|
15203
|
+
return 'week';
|
|
15204
|
+
}
|
|
15205
|
+
}
|
|
15206
|
+
|
|
15207
|
+
if (start.getDate() === 1) {
|
|
15208
|
+
var _intervalTypes$month$ = intervalTypes.month.initial(start),
|
|
15209
|
+
_expectedStart2 = _intervalTypes$month$[0],
|
|
15210
|
+
_expectedEnd2 = _intervalTypes$month$[1];
|
|
15211
|
+
|
|
15212
|
+
if (isDateEquals(start, _expectedStart2) && isDateEquals(end, _expectedEnd2)) {
|
|
15213
|
+
return 'month';
|
|
15214
|
+
}
|
|
15215
|
+
}
|
|
15216
|
+
|
|
15217
|
+
return 'custom';
|
|
15218
|
+
};
|
|
15219
|
+
var parse = function parse(value) {
|
|
15220
|
+
return value.map(function (v) {
|
|
15221
|
+
return new Date(v);
|
|
15222
|
+
});
|
|
15223
|
+
};
|
|
15224
|
+
|
|
15225
|
+
var _templateObject$q, _templateObject2$l, _templateObject3$j, _templateObject4$g, _templateObject5$f, _templateObject6$d;
|
|
15226
|
+
var RelativeContainer$5 = styled__default.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: relative;\n\n > :nth-child(1) input {\n color: transparent;\n }\n"])));
|
|
15227
|
+
var Container$a = styled__default.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 1px;\n left: 1px;\n width: calc(100% - 2px - ", ");\n height: 33px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ", ";\n border-radius: 4px;\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
15228
|
+
var iconWidth = _ref.iconWidth,
|
|
15229
|
+
theme = _ref.theme;
|
|
15230
|
+
return iconWidth + " - " + theme.spacings.s3;
|
|
15231
|
+
}, function (_ref2) {
|
|
15232
|
+
var theme = _ref2.theme;
|
|
15233
|
+
return theme.spacings.s2 + " 0 " + theme.spacings.s2 + " " + theme.spacings.s3;
|
|
15234
|
+
}, function (_ref3) {
|
|
15235
|
+
var invalid = _ref3.invalid,
|
|
15236
|
+
theme = _ref3.theme;
|
|
15237
|
+
if (!invalid) return;
|
|
15238
|
+
return styled.css(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.warningRed);
|
|
15239
|
+
}, function (_ref4) {
|
|
15240
|
+
var disabled = _ref4.disabled;
|
|
15241
|
+
if (!disabled) return;
|
|
15242
|
+
return styled.css(_templateObject4$g || (_templateObject4$g = _taggedTemplateLiteralLoose(["\n opacity: 0.5;\n "])));
|
|
15243
|
+
});
|
|
15244
|
+
var Button$4 = styled__default.button(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteralLoose(["\n display: flex;\n background-color: transparent;\n border: none;\n padding: 0;\n box-shadow: none;\n\n ", ";\n"])), function (_ref5) {
|
|
15245
|
+
var onClick = _ref5.onClick;
|
|
15246
|
+
if (!onClick) return;
|
|
15247
|
+
return styled.css(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n :not(:disabled) {\n cursor: pointer;\n }\n "])));
|
|
15248
|
+
});
|
|
15249
|
+
|
|
15250
|
+
var DatePicker$1 = React__default.forwardRef(function (props, ref) {
|
|
15251
|
+
var value = parse(props.value);
|
|
15252
|
+
var disabled = props.disabled || props.loading;
|
|
15253
|
+
|
|
15254
|
+
var _useState = React.useState(null),
|
|
15255
|
+
open = _useState[0],
|
|
15256
|
+
setOpen = _useState[1];
|
|
15257
|
+
|
|
15258
|
+
var _useState2 = React.useState('day'),
|
|
15259
|
+
intervalType = _useState2[0],
|
|
15260
|
+
setIntervalType = _useState2[1];
|
|
15261
|
+
|
|
15262
|
+
var config = intervalTypes[intervalType];
|
|
15263
|
+
|
|
15264
|
+
var _ref = config.getMinMax ? config.getMinMax(props.min, props.max) : props,
|
|
15265
|
+
min = _ref.min,
|
|
15266
|
+
max = _ref.max;
|
|
15267
|
+
|
|
15268
|
+
var setValue = function setValue(newValue) {
|
|
15269
|
+
var parsed = newValue.map(function (v) {
|
|
15270
|
+
return dateToIsoString(v, true, true, 'us');
|
|
15271
|
+
});
|
|
15272
|
+
props.setValue(parsed);
|
|
15273
|
+
};
|
|
15274
|
+
|
|
15275
|
+
React.useEffect(function () {
|
|
15276
|
+
if (min && max && min > max) {
|
|
15277
|
+
throw Error('Min prop must be less than Max');
|
|
15278
|
+
}
|
|
15279
|
+
|
|
15280
|
+
if (props.value.some(function (v) {
|
|
15281
|
+
return v === '';
|
|
15282
|
+
})) {
|
|
15283
|
+
setValue(intervalTypes.day.initial(min));
|
|
15284
|
+
return;
|
|
15285
|
+
}
|
|
15286
|
+
|
|
15287
|
+
var value = parse(props.value);
|
|
15288
|
+
|
|
15289
|
+
if (value.some(function (v) {
|
|
15290
|
+
return !isDateInstance(v);
|
|
15291
|
+
}) || !validate(value, min, max)) {
|
|
15292
|
+
setValue(intervalTypes.day.initial(min));
|
|
15293
|
+
return;
|
|
15294
|
+
}
|
|
15295
|
+
|
|
15296
|
+
var newIntervalType = identify(value);
|
|
15297
|
+
setIntervalType(newIntervalType);
|
|
15298
|
+
}, [props.value, min, max]);
|
|
15299
|
+
var inputProps = filterObject(props, ['min', 'max']);
|
|
15300
|
+
|
|
15301
|
+
var getArrowProps = function getArrowProps(key) {
|
|
15302
|
+
var func = config[key];
|
|
15303
|
+
|
|
15304
|
+
if (func === undefined) {
|
|
15305
|
+
return {
|
|
15306
|
+
disabled: true
|
|
15307
|
+
};
|
|
15308
|
+
}
|
|
15309
|
+
|
|
15310
|
+
var nextValue = func(value);
|
|
15311
|
+
|
|
15312
|
+
if (!validate(nextValue, min, max)) {
|
|
15313
|
+
return {
|
|
15314
|
+
disabled: true
|
|
15315
|
+
};
|
|
15316
|
+
}
|
|
15317
|
+
|
|
15318
|
+
return {
|
|
15319
|
+
onClick: function onClick() {
|
|
15320
|
+
return setValue(nextValue);
|
|
15321
|
+
}
|
|
15322
|
+
};
|
|
15323
|
+
};
|
|
15324
|
+
|
|
15325
|
+
var incrementProps = getArrowProps('increment');
|
|
15326
|
+
var decrementProps = getArrowProps('decrement');
|
|
15327
|
+
var invalid = props.invalid || !validate(value, min, max);
|
|
15328
|
+
return React__default.createElement(RelativeContainer$5, {
|
|
15329
|
+
ref: useOnClickOut(function () {
|
|
15330
|
+
return setOpen(null);
|
|
15331
|
+
})
|
|
15332
|
+
}, React__default.createElement(Input$1, Object.assign({}, inputProps, {
|
|
15333
|
+
type: 'text',
|
|
15334
|
+
ref: ref,
|
|
15335
|
+
icon: {
|
|
15336
|
+
icon: {
|
|
15337
|
+
type: 'feather',
|
|
15338
|
+
icon: 'calendar',
|
|
15339
|
+
width: '24px'
|
|
15340
|
+
},
|
|
15341
|
+
position: 'right',
|
|
15342
|
+
onClick: function onClick() {
|
|
15343
|
+
return setOpen(function (prev) {
|
|
15344
|
+
return prev === null ? 'menu' : null;
|
|
15345
|
+
});
|
|
15346
|
+
}
|
|
15347
|
+
},
|
|
15348
|
+
invalid: invalid,
|
|
15349
|
+
htmlDisabled: true
|
|
15350
|
+
})), React__default.createElement(Container$a, {
|
|
15351
|
+
iconWidth: '24px',
|
|
15352
|
+
invalid: props.invalid ? 1 : 0,
|
|
15353
|
+
disabled: props.disabled ? 1 : 0
|
|
15354
|
+
}, React__default.createElement(Button$4, Object.assign({
|
|
15355
|
+
type: 'button'
|
|
15356
|
+
}, decrementProps, {
|
|
15357
|
+
disabled: disabled || decrementProps.disabled
|
|
15358
|
+
}), React__default.createElement(Icon, {
|
|
15359
|
+
type: 'feather',
|
|
15360
|
+
icon: 'chevron_left',
|
|
15361
|
+
color: props.invalid ? 'warningRed' : 'grey',
|
|
15362
|
+
strokeWidth: '3px'
|
|
15363
|
+
})), React__default.createElement("div", null, value.some(function (v) {
|
|
15364
|
+
return !isDateInstance(v);
|
|
15365
|
+
}) ? '' : config.label(value)), React__default.createElement(Button$4, Object.assign({
|
|
15366
|
+
type: 'button'
|
|
15367
|
+
}, incrementProps, {
|
|
15368
|
+
disabled: disabled || incrementProps.disabled
|
|
15369
|
+
}), React__default.createElement(Icon, {
|
|
15370
|
+
type: 'feather',
|
|
15371
|
+
icon: 'chevron_right',
|
|
15372
|
+
color: props.invalid ? 'warningRed' : 'grey',
|
|
15373
|
+
strokeWidth: '3px'
|
|
15374
|
+
}))), React__default.createElement(Menu, {
|
|
15375
|
+
open: open === 'menu',
|
|
15376
|
+
close: function close() {
|
|
15377
|
+
return setOpen(null);
|
|
15378
|
+
},
|
|
15379
|
+
options: [{
|
|
15380
|
+
label: 'Hoje',
|
|
15381
|
+
onClick: function onClick() {
|
|
15382
|
+
return setValue(intervalTypes.day.initial(min));
|
|
15383
|
+
}
|
|
15384
|
+
}, {
|
|
15385
|
+
label: 'Semana',
|
|
15386
|
+
onClick: function onClick() {
|
|
15387
|
+
return setValue(intervalTypes.week.initial(min));
|
|
15388
|
+
}
|
|
15389
|
+
}, {
|
|
15390
|
+
label: 'Mês',
|
|
15391
|
+
onClick: function onClick() {
|
|
15392
|
+
return setValue(intervalTypes.month.initial(min));
|
|
15393
|
+
}
|
|
15394
|
+
}, {
|
|
15395
|
+
label: 'Personalizado',
|
|
15396
|
+
onClick: function onClick() {
|
|
15397
|
+
return setOpen('calendar');
|
|
15398
|
+
},
|
|
15399
|
+
keepOpen: true,
|
|
15400
|
+
caret: true
|
|
15401
|
+
}],
|
|
15402
|
+
width: '165px',
|
|
15403
|
+
itemSpacing: 's3',
|
|
15404
|
+
bordered: true
|
|
15405
|
+
}), React__default.createElement(CalendarInterval, {
|
|
15406
|
+
open: open === 'calendar',
|
|
15407
|
+
value: {
|
|
15408
|
+
start: value[0],
|
|
15409
|
+
end: value[1]
|
|
15410
|
+
},
|
|
15411
|
+
onSubmit: {
|
|
15412
|
+
onClick: function onClick(start, end) {
|
|
15413
|
+
if (start === null || end === null) return;
|
|
15414
|
+
setValue([start, end]);
|
|
15415
|
+
setOpen(null);
|
|
15416
|
+
}
|
|
15417
|
+
},
|
|
15418
|
+
min: min,
|
|
15419
|
+
max: max,
|
|
15420
|
+
references: {
|
|
15421
|
+
bottom: '35px'
|
|
15422
|
+
},
|
|
15423
|
+
time: {}
|
|
15424
|
+
}));
|
|
15425
|
+
});
|
|
15426
|
+
DatePicker$1.displayName = 'DatePicker';
|
|
15427
|
+
|
|
14642
15428
|
var Input$3 = React__default.forwardRef(function (props, ref) {
|
|
14643
15429
|
switch (props.type) {
|
|
14644
15430
|
case 'date':
|
|
@@ -14714,6 +15500,13 @@ var Input$3 = React__default.forwardRef(function (props, ref) {
|
|
|
14714
15500
|
return React__default.createElement(RadioButton, Object.assign({}, props));
|
|
14715
15501
|
}
|
|
14716
15502
|
|
|
15503
|
+
case 'date-interval-picker':
|
|
15504
|
+
{
|
|
15505
|
+
return React__default.createElement(DatePicker$1, Object.assign({}, props, {
|
|
15506
|
+
ref: ref
|
|
15507
|
+
}));
|
|
15508
|
+
}
|
|
15509
|
+
|
|
14717
15510
|
default:
|
|
14718
15511
|
{
|
|
14719
15512
|
return React__default.createElement(Input$1, Object.assign({}, props, {
|
|
@@ -14756,24 +15549,24 @@ var widths = {
|
|
|
14756
15549
|
default: '642.5px'
|
|
14757
15550
|
};
|
|
14758
15551
|
|
|
14759
|
-
var _templateObject$
|
|
14760
|
-
var Background = styled__default.div(_templateObject$
|
|
15552
|
+
var _templateObject$r, _templateObject2$m, _templateObject3$k, _templateObject4$h, _templateObject5$g, _templateObject6$e, _templateObject7$a, _templateObject8$6, _templateObject9$6, _templateObject10$5;
|
|
15553
|
+
var Background = styled__default.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n backdrop-filter: blur(3px);\n background-color: ", ";\n"])), function (_ref) {
|
|
14761
15554
|
var theme = _ref.theme;
|
|
14762
15555
|
return theme.getColor('black', 25);
|
|
14763
15556
|
});
|
|
14764
|
-
var Content = styled__default.div(_templateObject2$
|
|
14765
|
-
var Header$
|
|
15557
|
+
var Content = styled__default.div(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n flex: 1;\n position: relative;\n"])));
|
|
15558
|
+
var Header$3 = styled__default.div(_templateObject3$k || (_templateObject3$k = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n ", "\n"])), function (_ref2) {
|
|
14766
15559
|
var _ref2$theme = _ref2.theme,
|
|
14767
15560
|
colors = _ref2$theme.colors,
|
|
14768
15561
|
spacings = _ref2$theme.spacings,
|
|
14769
15562
|
useTypography = _ref2$theme.useTypography;
|
|
14770
15563
|
return styled.css(_templateObject4$h || (_templateObject4$h = _taggedTemplateLiteralLoose(["\n border-bottom: 1px solid ", ";\n padding: ", ";\n\n ", "\n "])), colors.lightestGrey, spacings.s4, useTypography('h1'));
|
|
14771
15564
|
});
|
|
14772
|
-
var Footer$2 = styled__default.div(_templateObject5$
|
|
15565
|
+
var Footer$2 = styled__default.div(_templateObject5$g || (_templateObject5$g = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ", "\n"])), function (_ref3) {
|
|
14773
15566
|
var _ref3$theme = _ref3.theme,
|
|
14774
15567
|
spacings = _ref3$theme.spacings,
|
|
14775
15568
|
colors = _ref3$theme.colors;
|
|
14776
|
-
return styled.css(_templateObject6$
|
|
15569
|
+
return styled.css(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n border-top: 1px solid ", ";\n padding: ", ";\n "])), colors.lightestGrey, spacings.s3);
|
|
14777
15570
|
});
|
|
14778
15571
|
var FooterMessage = styled__default.div(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteralLoose(["\n max-width: 75%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n span {\n font-size: 14px;\n color: ", ";\n }\n"])), function (_ref4) {
|
|
14779
15572
|
var theme = _ref4.theme;
|
|
@@ -14783,13 +15576,13 @@ var FooterButtons = styled__default.div(_templateObject8$6 || (_templateObject8$
|
|
|
14783
15576
|
var theme = _ref5.theme;
|
|
14784
15577
|
return theme.spacings.s3;
|
|
14785
15578
|
});
|
|
14786
|
-
var Container$
|
|
15579
|
+
var Container$b = styled__default.div(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n\n ", "\n"])), function (_ref6) {
|
|
14787
15580
|
var theme = _ref6.theme,
|
|
14788
15581
|
size = _ref6.size,
|
|
14789
15582
|
customSize = _ref6.customSize,
|
|
14790
15583
|
color = _ref6.color,
|
|
14791
15584
|
inverted = _ref6.inverted;
|
|
14792
|
-
return styled.css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n box-shadow: 0 0 21px 7px ", ";\n\n width: ", ";\n\n height: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n "])), theme.colors.white, theme.getColor('black', 15), size === 'custom' && customSize ? customSize.width || 'auto' : widths[size], size === 'custom' && customSize ? customSize.height || 'auto' : heights[size], Header$
|
|
15585
|
+
return styled.css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n box-shadow: 0 0 21px 7px ", ";\n\n width: ", ";\n\n height: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n "])), theme.colors.white, theme.getColor('black', 15), size === 'custom' && customSize ? customSize.width || 'auto' : widths[size], size === 'custom' && customSize ? customSize.height || 'auto' : heights[size], Header$3, inverted ? theme.isDarkColor(color) : theme.colors[color], inverted ? theme.colors[color] : theme.isDarkColor(color));
|
|
14793
15586
|
});
|
|
14794
15587
|
|
|
14795
15588
|
var _excluded$1 = ["children"];
|
|
@@ -14840,12 +15633,12 @@ var Modal = function Modal(props) {
|
|
|
14840
15633
|
id: 'modal'
|
|
14841
15634
|
}, React__default.createElement(Background, {
|
|
14842
15635
|
onClick: onClickOutside
|
|
14843
|
-
}, React__default.createElement(Container$
|
|
15636
|
+
}, React__default.createElement(Container$b, {
|
|
14844
15637
|
size: size || 'small',
|
|
14845
15638
|
color: color || 'blue',
|
|
14846
15639
|
inverted: +(inverted || false),
|
|
14847
15640
|
customSize: customSize
|
|
14848
|
-
}, React__default.createElement(Header$
|
|
15641
|
+
}, React__default.createElement(Header$3, null, title), React__default.createElement(Content, null, loading ? React__default.createElement(Loader, {
|
|
14849
15642
|
color: 'blue',
|
|
14850
15643
|
size: "calc(" + _size + " * 0.1454)",
|
|
14851
15644
|
borderSize: '3px'
|
|
@@ -14865,8 +15658,8 @@ var Modal = function Modal(props) {
|
|
|
14865
15658
|
}))))));
|
|
14866
15659
|
};
|
|
14867
15660
|
|
|
14868
|
-
var _templateObject$
|
|
14869
|
-
var Content$1 = styled__default.div(_templateObject$
|
|
15661
|
+
var _templateObject$s;
|
|
15662
|
+
var Content$1 = styled__default.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n padding: ", ";\n"])), function (_ref) {
|
|
14870
15663
|
var theme = _ref.theme;
|
|
14871
15664
|
return theme.spacings.s5 + " " + theme.spacings.s4;
|
|
14872
15665
|
});
|
|
@@ -14903,8 +15696,8 @@ var ConfirmDelete = function ConfirmDelete(props) {
|
|
|
14903
15696
|
}, React__default.createElement(Content$1, null, children || content));
|
|
14904
15697
|
};
|
|
14905
15698
|
|
|
14906
|
-
var _templateObject$
|
|
14907
|
-
var Content$2 = styled__default.div(_templateObject$
|
|
15699
|
+
var _templateObject$t;
|
|
15700
|
+
var Content$2 = styled__default.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n padding: ", ";\n"])), function (_ref) {
|
|
14908
15701
|
var theme = _ref.theme;
|
|
14909
15702
|
return theme.spacings.s5 + " " + theme.spacings.s4;
|
|
14910
15703
|
});
|
|
@@ -14944,8 +15737,8 @@ var ConfirmSuccess = function ConfirmSuccess(props) {
|
|
|
14944
15737
|
}, React__default.createElement(Content$2, null, children || content));
|
|
14945
15738
|
};
|
|
14946
15739
|
|
|
14947
|
-
var _templateObject$
|
|
14948
|
-
var Content$3 = styled__default.div(_templateObject$
|
|
15740
|
+
var _templateObject$u;
|
|
15741
|
+
var Content$3 = styled__default.div(_templateObject$u || (_templateObject$u = _taggedTemplateLiteralLoose(["\n padding: ", ";\n"])), function (_ref) {
|
|
14949
15742
|
var theme = _ref.theme;
|
|
14950
15743
|
return theme.spacings.s5 + " " + theme.spacings.s4;
|
|
14951
15744
|
});
|
|
@@ -14980,22 +15773,23 @@ var Audit = function Audit(props) {
|
|
|
14980
15773
|
}, React__default.createElement(Content$3, null, children || content));
|
|
14981
15774
|
};
|
|
14982
15775
|
|
|
14983
|
-
var Modal$1 = Modal
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
15776
|
+
var Modal$1 = Object.assign(Modal, {
|
|
15777
|
+
ConfirmDelete: ConfirmDelete,
|
|
15778
|
+
ConfirmEdit: ConfirmSuccess,
|
|
15779
|
+
Audit: Audit
|
|
15780
|
+
});
|
|
14987
15781
|
|
|
14988
|
-
var _templateObject$
|
|
14989
|
-
var Container$
|
|
14990
|
-
return props.size === 'mini' && styled.css(_templateObject2$
|
|
15782
|
+
var _templateObject$v, _templateObject2$n, _templateObject3$l, _templateObject4$i, _templateObject5$h, _templateObject6$f, _templateObject7$b, _templateObject8$7, _templateObject9$7, _templateObject10$6;
|
|
15783
|
+
var Container$c = styled__default.div(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: #fff;\n border: 1px solid #d4d4d5;\n border-radius: 4px;\n border-left-width: 5px;\n padding: 14px;\n ", "\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n"])), function (props) {
|
|
15784
|
+
return props.size === 'mini' && styled.css(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n width: 394px;\n height: 99px;\n "])));
|
|
14991
15785
|
}, function (props) {
|
|
14992
|
-
return props.size === 'small' && styled.css(_templateObject3$
|
|
15786
|
+
return props.size === 'small' && styled.css(_templateObject3$l || (_templateObject3$l = _taggedTemplateLiteralLoose(["\n width: 394px;\n height: 131px;\n "])));
|
|
14993
15787
|
}, function (props) {
|
|
14994
15788
|
return props.size === 'medium' && styled.css(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteralLoose(["\n width: 394px;\n "])));
|
|
14995
15789
|
}, function (props) {
|
|
14996
|
-
return props.size === 'big' && styled.css(_templateObject5$
|
|
15790
|
+
return props.size === 'big' && styled.css(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n width: 414px;\n height: 324px;\n "])));
|
|
14997
15791
|
}, function (props) {
|
|
14998
|
-
return props.borderType === 'info' && styled.css(_templateObject6$
|
|
15792
|
+
return props.borderType === 'info' && styled.css(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n border-left-color: #4d6dbe;\n "])));
|
|
14999
15793
|
}, function (props) {
|
|
15000
15794
|
return props.borderType === 'success' && styled.css(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteralLoose(["\n border-left-color: #66bb6a;\n "])));
|
|
15001
15795
|
}, function (props) {
|
|
@@ -15012,24 +15806,24 @@ var Card = function Card(_ref) {
|
|
|
15012
15806
|
var children = _ref.children,
|
|
15013
15807
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
15014
15808
|
|
|
15015
|
-
return React__default.createElement(Container$
|
|
15809
|
+
return React__default.createElement(Container$c, Object.assign({}, rest), children);
|
|
15016
15810
|
};
|
|
15017
15811
|
|
|
15018
|
-
var _templateObject$
|
|
15019
|
-
var Container$
|
|
15812
|
+
var _templateObject$w, _templateObject2$o, _templateObject3$m, _templateObject4$j, _templateObject5$i, _templateObject6$g;
|
|
15813
|
+
var Container$d = styled__default.div(_templateObject$w || (_templateObject$w = _taggedTemplateLiteralLoose(["\n border-radius: 4px;\n width: ", ";\n height: 88px;\n border: 1px solid transparent;\n position: relative;\n\n ", "\n\n ", "\n\n ", "\n\n svg {\n cursor: pointer;\n position: absolute;\n top: 14px;\n right: 14px;\n width: 13px;\n height: 13px;\n }\n"])), function (props) {
|
|
15020
15814
|
return props.size === 'large' ? '837px' : '460px';
|
|
15021
15815
|
}, function (props) {
|
|
15022
|
-
return props.color === 'success' && styled.css(_templateObject2$
|
|
15816
|
+
return props.color === 'success' && styled.css(_templateObject2$o || (_templateObject2$o = _taggedTemplateLiteralLoose(["\n background-color: #fcfff5;\n opacity: 1;\n border-color: #a8c599;\n h4 {\n color: #1e561f;\n }\n p {\n color: #1e561fcc;\n }\n "])));
|
|
15023
15817
|
}, function (props) {
|
|
15024
|
-
return props.color === 'error' && styled.css(_templateObject3$
|
|
15818
|
+
return props.color === 'error' && styled.css(_templateObject3$m || (_templateObject3$m = _taggedTemplateLiteralLoose(["\n background-color: #fff6f6;\n opacity: 1;\n border-color: #973937;\n h4 {\n color: #973937;\n }\n p {\n color: #973937;\n }\n "])));
|
|
15025
15819
|
}, function (props) {
|
|
15026
15820
|
return props.color === 'warning' && styled.css(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n background-color: #fffaf3;\n opacity: 1;\n border-color: #ccbea0;\n h4 {\n color: #7a4d05;\n }\n p {\n color: #7a4d05cc;\n }\n "])));
|
|
15027
15821
|
});
|
|
15028
|
-
var IconContainer$2 = styled__default.div(_templateObject5$
|
|
15029
|
-
var IconContent = styled__default.div(_templateObject6$
|
|
15822
|
+
var IconContainer$2 = styled__default.div(_templateObject5$i || (_templateObject5$i = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: 14px 14px 0 0;\n margin: 0;\n"])));
|
|
15823
|
+
var IconContent = styled__default.div(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding: 13px 0 21px 28px;\n display: flex;\n flex: 1;\n flex-direction: column;\n\n h4 {\n margin-bottom: 7px;\n font-size: 18p;\n }\n p {\n margin: 0;\n font-size: 14px;\n max-width: 380px;\n }\n"])));
|
|
15030
15824
|
|
|
15031
15825
|
var Toast = function Toast(props) {
|
|
15032
|
-
return React__default.createElement(Container$
|
|
15826
|
+
return React__default.createElement(Container$d, Object.assign({}, props), React__default.createElement(IconContainer$2, null, React__default.createElement(Icon, {
|
|
15033
15827
|
type: 'feather',
|
|
15034
15828
|
icon: 'x',
|
|
15035
15829
|
onClick: function onClick() {
|
|
@@ -15038,119 +15832,13 @@ var Toast = function Toast(props) {
|
|
|
15038
15832
|
})), React__default.createElement(IconContent, null, React__default.createElement("h4", null, props.title), React__default.createElement("p", null, " ", props.description)));
|
|
15039
15833
|
};
|
|
15040
15834
|
|
|
15041
|
-
var _templateObject$
|
|
15042
|
-
var Container$
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
}, function (_ref2) {
|
|
15046
|
-
var theme = _ref2.theme;
|
|
15047
|
-
return theme.colors.white;
|
|
15048
|
-
});
|
|
15049
|
-
|
|
15050
|
-
var CalendarInterval = function CalendarInterval(props) {
|
|
15051
|
-
var time = props.time,
|
|
15052
|
-
references = props.references;
|
|
15053
|
-
|
|
15054
|
-
var _ref = props.value ? props.value.start : React.useState(null),
|
|
15055
|
-
start = _ref[0],
|
|
15056
|
-
setStart = _ref[1];
|
|
15057
|
-
|
|
15058
|
-
var _ref2 = props.value ? props.value.end : React.useState(null),
|
|
15059
|
-
end = _ref2[0],
|
|
15060
|
-
setEnd = _ref2[1];
|
|
15061
|
-
|
|
15062
|
-
var _useState = React.useState(false),
|
|
15063
|
-
startInvalid = _useState[0],
|
|
15064
|
-
setStartInvalid = _useState[1];
|
|
15065
|
-
|
|
15066
|
-
var _useState2 = React.useState(false),
|
|
15067
|
-
endInvalid = _useState2[0],
|
|
15068
|
-
setEndInvalid = _useState2[1];
|
|
15069
|
-
|
|
15070
|
-
var min;
|
|
15071
|
-
|
|
15072
|
-
if (props.min) {
|
|
15073
|
-
min = new Date(props.min.getTime());
|
|
15074
|
-
}
|
|
15075
|
-
|
|
15076
|
-
var max;
|
|
15077
|
-
|
|
15078
|
-
if (props.max) {
|
|
15079
|
-
max = new Date(props.max.getTime());
|
|
15080
|
-
}
|
|
15081
|
-
|
|
15082
|
-
var minEnd;
|
|
15083
|
-
|
|
15084
|
-
if (start) {
|
|
15085
|
-
minEnd = start;
|
|
15086
|
-
|
|
15087
|
-
if (min) {
|
|
15088
|
-
minEnd = start >= min ? start : min;
|
|
15089
|
-
}
|
|
15090
|
-
} else if (min) {
|
|
15091
|
-
minEnd = min;
|
|
15092
|
-
}
|
|
15093
|
-
|
|
15094
|
-
var maxStart;
|
|
15095
|
-
|
|
15096
|
-
if (end) {
|
|
15097
|
-
maxStart = end;
|
|
15098
|
-
|
|
15099
|
-
if (max) {
|
|
15100
|
-
maxStart = end <= max ? end : max;
|
|
15101
|
-
}
|
|
15102
|
-
} else if (max) {
|
|
15103
|
-
maxStart = max;
|
|
15104
|
-
}
|
|
15105
|
-
|
|
15106
|
-
var _onSubmit = props.onSubmit || {};
|
|
15107
|
-
|
|
15108
|
-
var onSubmit = _extends({
|
|
15109
|
-
disabled: startInvalid || endInvalid,
|
|
15110
|
-
onClick: function onClick() {}
|
|
15111
|
-
}, _onSubmit);
|
|
15112
|
-
|
|
15113
|
-
return React__default.createElement(AbsoluteContainer, {
|
|
15114
|
-
axis: 'y',
|
|
15115
|
-
references: references
|
|
15116
|
-
}, React__default.createElement(Container$c, null, React__default.createElement(Calendar, {
|
|
15117
|
-
value: [start, setStart],
|
|
15118
|
-
min: min,
|
|
15119
|
-
max: maxStart,
|
|
15120
|
-
overlay: {
|
|
15121
|
-
type: 'after',
|
|
15122
|
-
value: end
|
|
15123
|
-
},
|
|
15124
|
-
time: time,
|
|
15125
|
-
invalid: [startInvalid, setStartInvalid],
|
|
15126
|
-
notAbsolute: true
|
|
15127
|
-
}), React__default.createElement(Calendar, {
|
|
15128
|
-
value: [end, setEnd],
|
|
15129
|
-
min: minEnd,
|
|
15130
|
-
max: max,
|
|
15131
|
-
overlay: {
|
|
15132
|
-
type: 'before',
|
|
15133
|
-
value: start
|
|
15134
|
-
},
|
|
15135
|
-
time: time,
|
|
15136
|
-
invalid: [endInvalid, setEndInvalid],
|
|
15137
|
-
notAbsolute: true,
|
|
15138
|
-
onSubmit: {
|
|
15139
|
-
onClick: function onClick() {
|
|
15140
|
-
return onSubmit.onClick(start, end);
|
|
15141
|
-
},
|
|
15142
|
-
disabled: onSubmit.disabled
|
|
15143
|
-
}
|
|
15144
|
-
})));
|
|
15145
|
-
};
|
|
15146
|
-
|
|
15147
|
-
var _templateObject$t, _templateObject2$m, _templateObject3$l, _templateObject4$k, _templateObject5$i, _templateObject6$g, _templateObject7$c, _templateObject8$8, _templateObject9$8, _templateObject10$7, _templateObject11$4;
|
|
15148
|
-
var Container$d = styled__default.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 300px;\n position: absolute;\n padding: 14px;\n"])));
|
|
15149
|
-
var Header$3 = styled__default.div(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
15150
|
-
var HeaderImage = styled__default.div(_templateObject3$l || (_templateObject3$l = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
|
|
15835
|
+
var _templateObject$x, _templateObject2$p, _templateObject3$n, _templateObject4$k, _templateObject5$j, _templateObject6$h, _templateObject7$c, _templateObject8$8, _templateObject9$8, _templateObject10$7, _templateObject11$4;
|
|
15836
|
+
var Container$e = styled__default.div(_templateObject$x || (_templateObject$x = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 300px;\n position: absolute;\n padding: 14px;\n"])));
|
|
15837
|
+
var Header$4 = styled__default.div(_templateObject2$p || (_templateObject2$p = _taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
15838
|
+
var HeaderImage = styled__default.div(_templateObject3$n || (_templateObject3$n = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
|
|
15151
15839
|
var HeaderContent = styled__default.div(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
|
|
15152
|
-
var MainContent = styled__default.div(_templateObject5$
|
|
15153
|
-
var HeaderLine = styled__default.div(_templateObject6$
|
|
15840
|
+
var MainContent = styled__default.div(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n"])));
|
|
15841
|
+
var HeaderLine = styled__default.div(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15154
15842
|
return props.height;
|
|
15155
15843
|
}, function (props) {
|
|
15156
15844
|
return props.size === 'mini' && styled.css(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
@@ -15165,7 +15853,7 @@ var MainLine = styled__default(HeaderLine)(_templateObject11$4 || (_templateObje
|
|
|
15165
15853
|
|
|
15166
15854
|
var Template1 = function Template1(props) {
|
|
15167
15855
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15168
|
-
return React__default.createElement(Container$
|
|
15856
|
+
return React__default.createElement(Container$e, null, React__default.createElement(Header$4, null, React__default.createElement(HeaderImage, null), React__default.createElement(HeaderContent, null, React__default.createElement(HeaderLine, {
|
|
15169
15857
|
size: 'medium',
|
|
15170
15858
|
height: '9px',
|
|
15171
15859
|
color: '#E6E6E6'
|
|
@@ -15196,32 +15884,32 @@ var Template1 = function Template1(props) {
|
|
|
15196
15884
|
})));
|
|
15197
15885
|
};
|
|
15198
15886
|
|
|
15199
|
-
var _templateObject$
|
|
15200
|
-
var HeaderLine$1 = styled__default.div(_templateObject$
|
|
15887
|
+
var _templateObject$y, _templateObject2$q, _templateObject3$o, _templateObject4$l, _templateObject5$k;
|
|
15888
|
+
var HeaderLine$1 = styled__default.div(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15201
15889
|
return props.height;
|
|
15202
15890
|
}, function (props) {
|
|
15203
|
-
return props.size === 'mini' && styled.css(_templateObject2$
|
|
15891
|
+
return props.size === 'mini' && styled.css(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15204
15892
|
}, function (props) {
|
|
15205
|
-
return props.size === 'small' && styled.css(_templateObject3$
|
|
15893
|
+
return props.size === 'small' && styled.css(_templateObject3$o || (_templateObject3$o = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15206
15894
|
}, function (props) {
|
|
15207
15895
|
return props.size === 'medium' && styled.css(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15208
15896
|
}, function (props) {
|
|
15209
|
-
return props.size === 'large' && styled.css(_templateObject5$
|
|
15897
|
+
return props.size === 'large' && styled.css(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15210
15898
|
});
|
|
15211
15899
|
|
|
15212
|
-
var _templateObject$
|
|
15213
|
-
var Container$
|
|
15214
|
-
var Template2Container = styled__default(Container$
|
|
15215
|
-
var Header$
|
|
15900
|
+
var _templateObject$z, _templateObject2$r, _templateObject3$p, _templateObject4$m, _templateObject5$l, _templateObject6$i, _templateObject7$d, _templateObject8$9;
|
|
15901
|
+
var Container$f = styled__default.div(_templateObject$z || (_templateObject$z = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-height: 100%;\n position: absolute;\n padding: 14px;\n"])));
|
|
15902
|
+
var Template2Container = styled__default(Container$f)(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["\n background: #fff;\n border: 2px solid #ebebeb;\n"])));
|
|
15903
|
+
var Header$5 = styled__default.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
15216
15904
|
var HeaderImage$1 = styled__default.div(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteralLoose(["\n width: 43px;\n height: 44px;\n background-color: #ebebeb;\n"])));
|
|
15217
|
-
var HeaderContent$1 = styled__default.div(_templateObject5$
|
|
15218
|
-
var MainContent$1 = styled__default.div(_templateObject6$
|
|
15905
|
+
var HeaderContent$1 = styled__default.div(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n"])));
|
|
15906
|
+
var MainContent$1 = styled__default.div(_templateObject6$i || (_templateObject6$i = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n"])));
|
|
15219
15907
|
var MainLine$1 = styled__default(HeaderLine$1)(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n margin-bottom: 14px;\n margin-left: 0;\n"])));
|
|
15220
15908
|
var HeaderLine$2 = styled__default(HeaderLine$1)(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteralLoose([""])));
|
|
15221
15909
|
|
|
15222
15910
|
var Template2 = function Template2(props) {
|
|
15223
15911
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15224
|
-
return React__default.createElement(Template2Container, null, React__default.createElement(Header$
|
|
15912
|
+
return React__default.createElement(Template2Container, null, React__default.createElement(Header$5, null, React__default.createElement(HeaderImage$1, null), React__default.createElement(HeaderContent$1, null, React__default.createElement(HeaderLine$2, {
|
|
15225
15913
|
size: 'mini',
|
|
15226
15914
|
height: '9px',
|
|
15227
15915
|
color: '#E6E6E6'
|
|
@@ -15240,10 +15928,10 @@ var Template2 = function Template2(props) {
|
|
|
15240
15928
|
})));
|
|
15241
15929
|
};
|
|
15242
15930
|
|
|
15243
|
-
var _templateObject$
|
|
15244
|
-
var Container$
|
|
15245
|
-
var Template3Container = styled__default(Container$
|
|
15246
|
-
var Template3Line = styled__default(HeaderLine$1)(_templateObject3$
|
|
15931
|
+
var _templateObject$A, _templateObject2$s, _templateObject3$q;
|
|
15932
|
+
var Container$g = styled__default.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-height: 100%;\n position: absolute;\n padding: 14px;\n"])));
|
|
15933
|
+
var Template3Container = styled__default(Container$g)(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose([""])));
|
|
15934
|
+
var Template3Line = styled__default(HeaderLine$1)(_templateObject3$q || (_templateObject3$q = _taggedTemplateLiteralLoose(["\n background-color: #dadada;\n height: ", ";\n"])), function (props) {
|
|
15247
15935
|
return props.height;
|
|
15248
15936
|
});
|
|
15249
15937
|
|
|
@@ -15272,20 +15960,20 @@ var Template3 = function Template3(props) {
|
|
|
15272
15960
|
}));
|
|
15273
15961
|
};
|
|
15274
15962
|
|
|
15275
|
-
var _templateObject$
|
|
15276
|
-
var Container$
|
|
15277
|
-
var HeaderLine$3 = styled__default.div(_templateObject2$
|
|
15963
|
+
var _templateObject$B, _templateObject2$t, _templateObject3$r, _templateObject4$n, _templateObject5$m, _templateObject6$j, _templateObject7$e, _templateObject8$a;
|
|
15964
|
+
var Container$h = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-height: 100%;\n position: absolute;\n padding: 14px;\n"])));
|
|
15965
|
+
var HeaderLine$3 = styled__default.div(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15278
15966
|
return props.height;
|
|
15279
15967
|
}, function (props) {
|
|
15280
|
-
return props.size === 'mini' && styled.css(_templateObject3$
|
|
15968
|
+
return props.size === 'mini' && styled.css(_templateObject3$r || (_templateObject3$r = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15281
15969
|
}, function (props) {
|
|
15282
15970
|
return props.size === 'small' && styled.css(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15283
15971
|
}, function (props) {
|
|
15284
|
-
return props.size === 'medium' && styled.css(_templateObject5$
|
|
15972
|
+
return props.size === 'medium' && styled.css(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15285
15973
|
}, function (props) {
|
|
15286
|
-
return props.size === 'large' && styled.css(_templateObject6$
|
|
15974
|
+
return props.size === 'large' && styled.css(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15287
15975
|
});
|
|
15288
|
-
var Template4Container = styled__default(Container$
|
|
15976
|
+
var Template4Container = styled__default(Container$h)(_templateObject7$e || (_templateObject7$e = _taggedTemplateLiteralLoose(["\n border: 1px solid #e6e6e7;\n border-radius: 4px;\n"])));
|
|
15289
15977
|
var CustomLine = styled__default(HeaderLine$3)(_templateObject8$a || (_templateObject8$a = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n background-color: ", ";\n"])), function (props) {
|
|
15290
15978
|
return props.width;
|
|
15291
15979
|
}, function (props) {
|
|
@@ -15339,17 +16027,17 @@ var Template4 = function Template4(props) {
|
|
|
15339
16027
|
}));
|
|
15340
16028
|
};
|
|
15341
16029
|
|
|
15342
|
-
var _templateObject$
|
|
15343
|
-
var Container$
|
|
15344
|
-
var Circle = styled__default.div(_templateObject2$
|
|
15345
|
-
var HeaderLine$4 = styled__default.div(_templateObject3$
|
|
16030
|
+
var _templateObject$C, _templateObject2$u, _templateObject3$s, _templateObject4$o, _templateObject5$n, _templateObject6$k, _templateObject7$f, _templateObject8$b, _templateObject9$9;
|
|
16031
|
+
var Container$i = styled__default.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 746px;\n height: 169px;\n border: 1px solid #e6e6e7;\n border-radius: 4px;\n padding: 14px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
16032
|
+
var Circle = styled__default.div(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n width: 141px;\n height: 141px;\n background-color: #dddedf;\n border-radius: 50%;\n"])));
|
|
16033
|
+
var HeaderLine$4 = styled__default.div(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15346
16034
|
return props.height;
|
|
15347
16035
|
}, function (props) {
|
|
15348
16036
|
return props.size === 'mini' && styled.css(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15349
16037
|
}, function (props) {
|
|
15350
|
-
return props.size === 'small' && styled.css(_templateObject5$
|
|
16038
|
+
return props.size === 'small' && styled.css(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15351
16039
|
}, function (props) {
|
|
15352
|
-
return props.size === 'medium' && styled.css(_templateObject6$
|
|
16040
|
+
return props.size === 'medium' && styled.css(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15353
16041
|
}, function (props) {
|
|
15354
16042
|
return props.size === 'large' && styled.css(_templateObject7$f || (_templateObject7$f = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15355
16043
|
});
|
|
@@ -15364,7 +16052,7 @@ var MainContent$2 = styled__default.div(_templateObject9$9 || (_templateObject9$
|
|
|
15364
16052
|
|
|
15365
16053
|
var Template5 = function Template5(props) {
|
|
15366
16054
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15367
|
-
return React__default.createElement(Container$
|
|
16055
|
+
return React__default.createElement(Container$i, null, React__default.createElement(Circle, null), React__default.createElement(MainContent$2, null, React__default.createElement(CustomLine$1, {
|
|
15368
16056
|
width: '406px',
|
|
15369
16057
|
height: '16px',
|
|
15370
16058
|
color: '#DDDEDF',
|
|
@@ -15387,16 +16075,16 @@ var Template5 = function Template5(props) {
|
|
|
15387
16075
|
})));
|
|
15388
16076
|
};
|
|
15389
16077
|
|
|
15390
|
-
var _templateObject$
|
|
15391
|
-
var Container$
|
|
15392
|
-
var Header$
|
|
15393
|
-
var Footer$3 = styled__default.div(_templateObject3$
|
|
16078
|
+
var _templateObject$D, _templateObject2$v, _templateObject3$t, _templateObject4$p, _templateObject5$o, _templateObject6$l, _templateObject7$g, _templateObject8$c, _templateObject9$a;
|
|
16079
|
+
var Container$j = styled__default.div(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n width: 395px;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: #f5f5f5;\n"])));
|
|
16080
|
+
var Header$6 = styled__default.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n"])));
|
|
16081
|
+
var Footer$3 = styled__default.div(_templateObject3$t || (_templateObject3$t = _taggedTemplateLiteralLoose(["\n width: 100%;\n border-top: 1px solid #b1b1b3;\n height: 50px;\n"])));
|
|
15394
16082
|
var HeaderLine$5 = styled__default.div(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15395
16083
|
return props.height;
|
|
15396
16084
|
}, function (props) {
|
|
15397
|
-
return props.size === 'mini' && styled.css(_templateObject5$
|
|
16085
|
+
return props.size === 'mini' && styled.css(_templateObject5$o || (_templateObject5$o = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15398
16086
|
}, function (props) {
|
|
15399
|
-
return props.size === 'small' && styled.css(_templateObject6$
|
|
16087
|
+
return props.size === 'small' && styled.css(_templateObject6$l || (_templateObject6$l = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15400
16088
|
}, function (props) {
|
|
15401
16089
|
return props.size === 'medium' && styled.css(_templateObject7$g || (_templateObject7$g = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15402
16090
|
}, function (props) {
|
|
@@ -15412,7 +16100,7 @@ var CustomLine$2 = styled__default(HeaderLine$5)(_templateObject9$a || (_templat
|
|
|
15412
16100
|
|
|
15413
16101
|
var Template6 = function Template6(props) {
|
|
15414
16102
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15415
|
-
return React__default.createElement(Container$
|
|
16103
|
+
return React__default.createElement(Container$j, null, React__default.createElement(Header$6, null, React__default.createElement(CustomLine$2, {
|
|
15416
16104
|
width: '274px',
|
|
15417
16105
|
height: '10px',
|
|
15418
16106
|
color: '#EBEBEB',
|
|
@@ -15430,17 +16118,17 @@ var Template6 = function Template6(props) {
|
|
|
15430
16118
|
})));
|
|
15431
16119
|
};
|
|
15432
16120
|
|
|
15433
|
-
var _templateObject$
|
|
15434
|
-
var Container$
|
|
15435
|
-
var Header$
|
|
15436
|
-
var HeaderLine$6 = styled__default.div(_templateObject3$
|
|
16121
|
+
var _templateObject$E, _templateObject2$w, _templateObject3$u, _templateObject4$q, _templateObject5$p, _templateObject6$m, _templateObject7$h, _templateObject8$d, _templateObject9$b, _templateObject10$8;
|
|
16122
|
+
var Container$k = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 110px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
|
|
16123
|
+
var Header$7 = styled__default.div(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
|
|
16124
|
+
var HeaderLine$6 = styled__default.div(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15437
16125
|
return props.height;
|
|
15438
16126
|
}, function (props) {
|
|
15439
16127
|
return props.size === 'mini' && styled.css(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15440
16128
|
}, function (props) {
|
|
15441
|
-
return props.size === 'small' && styled.css(_templateObject5$
|
|
16129
|
+
return props.size === 'small' && styled.css(_templateObject5$p || (_templateObject5$p = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15442
16130
|
}, function (props) {
|
|
15443
|
-
return props.size === 'medium' && styled.css(_templateObject6$
|
|
16131
|
+
return props.size === 'medium' && styled.css(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15444
16132
|
}, function (props) {
|
|
15445
16133
|
return props.size === 'large' && styled.css(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15446
16134
|
});
|
|
@@ -15456,7 +16144,7 @@ var Circle$1 = styled__default.div(_templateObject10$8 || (_templateObject10$8 =
|
|
|
15456
16144
|
|
|
15457
16145
|
var Template7 = function Template7(props) {
|
|
15458
16146
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15459
|
-
return React__default.createElement(Container$
|
|
16147
|
+
return React__default.createElement(Container$k, null, React__default.createElement(Header$7, null, React__default.createElement(CustomLine$3, {
|
|
15460
16148
|
width: '89px',
|
|
15461
16149
|
height: '10px',
|
|
15462
16150
|
color: '#EBEBEB',
|
|
@@ -15464,17 +16152,17 @@ var Template7 = function Template7(props) {
|
|
|
15464
16152
|
})), React__default.createElement(Main, null, React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null), React__default.createElement(Circle$1, null)));
|
|
15465
16153
|
};
|
|
15466
16154
|
|
|
15467
|
-
var _templateObject$
|
|
15468
|
-
var Container$
|
|
15469
|
-
var Header$
|
|
15470
|
-
var HeaderLine$7 = styled__default.div(_templateObject3$
|
|
16155
|
+
var _templateObject$F, _templateObject2$x, _templateObject3$v, _templateObject4$r, _templateObject5$q, _templateObject6$n, _templateObject7$i, _templateObject8$e, _templateObject9$c;
|
|
16156
|
+
var Container$l = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 110px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
|
|
16157
|
+
var Header$8 = styled__default.div(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
|
|
16158
|
+
var HeaderLine$7 = styled__default.div(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 14px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15471
16159
|
return props.height;
|
|
15472
16160
|
}, function (props) {
|
|
15473
16161
|
return props.size === 'mini' && styled.css(_templateObject4$r || (_templateObject4$r = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15474
16162
|
}, function (props) {
|
|
15475
|
-
return props.size === 'small' && styled.css(_templateObject5$
|
|
16163
|
+
return props.size === 'small' && styled.css(_templateObject5$q || (_templateObject5$q = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15476
16164
|
}, function (props) {
|
|
15477
|
-
return props.size === 'medium' && styled.css(_templateObject6$
|
|
16165
|
+
return props.size === 'medium' && styled.css(_templateObject6$n || (_templateObject6$n = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15478
16166
|
}, function (props) {
|
|
15479
16167
|
return props.size === 'large' && styled.css(_templateObject7$i || (_templateObject7$i = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15480
16168
|
});
|
|
@@ -15489,7 +16177,7 @@ var Main$1 = styled__default.div(_templateObject9$c || (_templateObject9$c = _ta
|
|
|
15489
16177
|
|
|
15490
16178
|
var Template8 = function Template8(props) {
|
|
15491
16179
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15492
|
-
return React__default.createElement(Container$
|
|
16180
|
+
return React__default.createElement(Container$l, null, React__default.createElement(Header$8, null, React__default.createElement(CustomLine$4, {
|
|
15493
16181
|
width: '89px',
|
|
15494
16182
|
height: '10px',
|
|
15495
16183
|
color: '#EBEBEB',
|
|
@@ -15507,17 +16195,17 @@ var Template8 = function Template8(props) {
|
|
|
15507
16195
|
})));
|
|
15508
16196
|
};
|
|
15509
16197
|
|
|
15510
|
-
var _templateObject$
|
|
15511
|
-
var Container$
|
|
15512
|
-
var Header$
|
|
15513
|
-
var HeaderLine$8 = styled__default.div(_templateObject3$
|
|
16198
|
+
var _templateObject$G, _templateObject2$y, _templateObject3$w, _templateObject4$s, _templateObject5$r, _templateObject6$o, _templateObject7$j, _templateObject8$f, _templateObject9$d, _templateObject10$9;
|
|
16199
|
+
var Container$m = styled__default.div(_templateObject$G || (_templateObject$G = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 245px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
|
|
16200
|
+
var Header$9 = styled__default.div(_templateObject2$y || (_templateObject2$y = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
|
|
16201
|
+
var HeaderLine$8 = styled__default.div(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 7px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15514
16202
|
return props.height;
|
|
15515
16203
|
}, function (props) {
|
|
15516
16204
|
return props.size === 'mini' && styled.css(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15517
16205
|
}, function (props) {
|
|
15518
|
-
return props.size === 'small' && styled.css(_templateObject5$
|
|
16206
|
+
return props.size === 'small' && styled.css(_templateObject5$r || (_templateObject5$r = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15519
16207
|
}, function (props) {
|
|
15520
|
-
return props.size === 'medium' && styled.css(_templateObject6$
|
|
16208
|
+
return props.size === 'medium' && styled.css(_templateObject6$o || (_templateObject6$o = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15521
16209
|
}, function (props) {
|
|
15522
16210
|
return props.size === 'large' && styled.css(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15523
16211
|
});
|
|
@@ -15533,7 +16221,7 @@ var Circle$2 = styled__default.div(_templateObject10$9 || (_templateObject10$9 =
|
|
|
15533
16221
|
|
|
15534
16222
|
var Template8$1 = function Template8(props) {
|
|
15535
16223
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15536
|
-
return React__default.createElement(Container$
|
|
16224
|
+
return React__default.createElement(Container$m, null, React__default.createElement(Header$9, null, React__default.createElement(CustomLine$5, {
|
|
15537
16225
|
width: '89px',
|
|
15538
16226
|
height: '10px',
|
|
15539
16227
|
color: '#EBEBEB',
|
|
@@ -15546,17 +16234,17 @@ var Template8$1 = function Template8(props) {
|
|
|
15546
16234
|
})), React__default.createElement(Main$2, null, React__default.createElement(Circle$2, null)));
|
|
15547
16235
|
};
|
|
15548
16236
|
|
|
15549
|
-
var _templateObject$
|
|
15550
|
-
var Container$
|
|
15551
|
-
var Header$
|
|
15552
|
-
var HeaderLine$9 = styled__default.div(_templateObject3$
|
|
16237
|
+
var _templateObject$H, _templateObject2$z, _templateObject3$x, _templateObject4$t, _templateObject5$s, _templateObject6$p, _templateObject7$k, _templateObject8$g, _templateObject9$e, _templateObject10$a, _templateObject11$5;
|
|
16238
|
+
var Container$n = styled__default.div(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n width: 395px;\n height: 245px;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: #f5f5f5 0% 0% no-repeat padding-box;\n"])));
|
|
16239
|
+
var Header$a = styled__default.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 14px;\n width: 100%;\n"])));
|
|
16240
|
+
var HeaderLine$9 = styled__default.div(_templateObject3$x || (_templateObject3$x = _taggedTemplateLiteralLoose(["\n height: ", ";\n background-color: #ebebeb;\n margin-left: 7px;\n\n & + div {\n margin-top: 7px;\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n"])), function (props) {
|
|
15553
16241
|
return props.height;
|
|
15554
16242
|
}, function (props) {
|
|
15555
16243
|
return props.size === 'mini' && styled.css(_templateObject4$t || (_templateObject4$t = _taggedTemplateLiteralLoose(["\n width: 15%;\n "])));
|
|
15556
16244
|
}, function (props) {
|
|
15557
|
-
return props.size === 'small' && styled.css(_templateObject5$
|
|
16245
|
+
return props.size === 'small' && styled.css(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n width: 25%;\n "])));
|
|
15558
16246
|
}, function (props) {
|
|
15559
|
-
return props.size === 'medium' && styled.css(_templateObject6$
|
|
16247
|
+
return props.size === 'medium' && styled.css(_templateObject6$p || (_templateObject6$p = _taggedTemplateLiteralLoose(["\n width: 45%;\n "])));
|
|
15560
16248
|
}, function (props) {
|
|
15561
16249
|
return props.size === 'large' && styled.css(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose(["\n width: 75%;\n "])));
|
|
15562
16250
|
});
|
|
@@ -15573,7 +16261,7 @@ var Circle$3 = styled__default.div(_templateObject11$5 || (_templateObject11$5 =
|
|
|
15573
16261
|
|
|
15574
16262
|
var Template10 = function Template10(props) {
|
|
15575
16263
|
if (!props.loading) return React__default.createElement(React__default.Fragment, null);
|
|
15576
|
-
return React__default.createElement(Container$
|
|
16264
|
+
return React__default.createElement(Container$n, null, React__default.createElement(Header$a, null, React__default.createElement(CustomLine$6, {
|
|
15577
16265
|
width: '89px',
|
|
15578
16266
|
height: '10px',
|
|
15579
16267
|
color: '#EBEBEB',
|
|
@@ -15690,9 +16378,9 @@ var Placeholder = function Placeholder(props) {
|
|
|
15690
16378
|
}
|
|
15691
16379
|
};
|
|
15692
16380
|
|
|
15693
|
-
var _templateObject$
|
|
15694
|
-
var Image = styled__default.img(_templateObject$
|
|
15695
|
-
var Container$
|
|
16381
|
+
var _templateObject$I, _templateObject2$A, _templateObject3$y, _templateObject4$u, _templateObject5$t;
|
|
16382
|
+
var Image = styled__default.img(_templateObject$I || (_templateObject$I = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n max-height: 100%;\n"])));
|
|
16383
|
+
var Container$o = styled__default.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n\n &,\n ", " {\n width: ", ";\n\n height: ", ";\n }\n"])), Image, function (_ref) {
|
|
15696
16384
|
var width = _ref.width;
|
|
15697
16385
|
|
|
15698
16386
|
switch (typeof width) {
|
|
@@ -15719,15 +16407,15 @@ var Container$n = styled__default.div(_templateObject2$x || (_templateObject2$x
|
|
|
15719
16407
|
return 'auto';
|
|
15720
16408
|
}
|
|
15721
16409
|
});
|
|
15722
|
-
var Dimmer = styled__default.div(_templateObject3$
|
|
16410
|
+
var Dimmer = styled__default.div(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: ", ";\n opacity: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: opacity 0.5s;\n cursor: pointer;\n\n :hover {\n opacity: 1;\n }\n"])), function (_ref3) {
|
|
15723
16411
|
var theme = _ref3.theme;
|
|
15724
16412
|
return theme.getColor('greyishBlue', 50);
|
|
15725
16413
|
});
|
|
15726
|
-
var Button$
|
|
16414
|
+
var Button$5 = styled__default(Button$1)(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n"])), function (_ref4) {
|
|
15727
16415
|
var theme = _ref4.theme;
|
|
15728
16416
|
return theme.getColor('white', 50);
|
|
15729
16417
|
});
|
|
15730
|
-
var ModalContent = styled__default.div(_templateObject5$
|
|
16418
|
+
var ModalContent = styled__default.div(_templateObject5$t || (_templateObject5$t = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n\n img {\n max-height: 100%;\n max-width: 100%;\n }\n"])));
|
|
15731
16419
|
|
|
15732
16420
|
var _excluded$3 = ["src", "defaultClickOptions"];
|
|
15733
16421
|
|
|
@@ -15739,14 +16427,14 @@ var Zoom = function Zoom(props) {
|
|
|
15739
16427
|
modalOpened = _useState[0],
|
|
15740
16428
|
setModalOpened = _useState[1];
|
|
15741
16429
|
|
|
15742
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
16430
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$o, Object.assign({}, imgProps, {
|
|
15743
16431
|
onClick: function onClick() {
|
|
15744
16432
|
return setModalOpened(true);
|
|
15745
16433
|
}
|
|
15746
16434
|
}), React__default.createElement(Image, {
|
|
15747
16435
|
src: src,
|
|
15748
16436
|
alt: 'zoom'
|
|
15749
|
-
}), React__default.createElement(Dimmer, null, React__default.createElement(Button$
|
|
16437
|
+
}), React__default.createElement(Dimmer, null, React__default.createElement(Button$5, {
|
|
15750
16438
|
content: 'Zoom',
|
|
15751
16439
|
color: 'white',
|
|
15752
16440
|
onClick: function onClick() {
|
|
@@ -15763,8 +16451,8 @@ var Zoom = function Zoom(props) {
|
|
|
15763
16451
|
}))));
|
|
15764
16452
|
};
|
|
15765
16453
|
|
|
15766
|
-
var _templateObject$
|
|
15767
|
-
var Container$
|
|
16454
|
+
var _templateObject$J;
|
|
16455
|
+
var Container$p = styled__default.div(_templateObject$J || (_templateObject$J = _taggedTemplateLiteralLoose(["\n padding: ", ";\n\n display: flex;\n flex-direction: column;\n gap: ", ";\n\n > div:nth-child(1) {\n ", "\n color: ", ";\n }\n"])), function (_ref) {
|
|
15768
16456
|
var _ref$theme$spacings = _ref.theme.spacings,
|
|
15769
16457
|
s1 = _ref$theme$spacings.s1,
|
|
15770
16458
|
s3 = _ref$theme$spacings.s3;
|
|
@@ -15780,15 +16468,13 @@ var Container$o = styled__default.div(_templateObject$F || (_templateObject$F =
|
|
|
15780
16468
|
return getColor('greyishBlue', 50);
|
|
15781
16469
|
});
|
|
15782
16470
|
|
|
15783
|
-
var Header$
|
|
16471
|
+
var Header$b = function Header(props) {
|
|
15784
16472
|
var title = props.title,
|
|
15785
16473
|
_props$search = props.search,
|
|
15786
16474
|
searched = _props$search[0],
|
|
15787
16475
|
_setSearched = _props$search[1],
|
|
15788
16476
|
allowEmptySearch = props.allowEmptySearch,
|
|
15789
|
-
withSearch = props.withSearch
|
|
15790
|
-
_props$touched = props.touched,
|
|
15791
|
-
setTouched = _props$touched[1];
|
|
16477
|
+
withSearch = props.withSearch;
|
|
15792
16478
|
|
|
15793
16479
|
var _useState = React.useState(''),
|
|
15794
16480
|
search = _useState[0],
|
|
@@ -15798,8 +16484,6 @@ var Header$a = function Header(props) {
|
|
|
15798
16484
|
if (value === '') return;
|
|
15799
16485
|
|
|
15800
16486
|
_setSearched(value);
|
|
15801
|
-
|
|
15802
|
-
setTouched(true);
|
|
15803
16487
|
};
|
|
15804
16488
|
React.useEffect(function () {
|
|
15805
16489
|
setSearch(searched);
|
|
@@ -15814,7 +16498,7 @@ var Header$a = function Header(props) {
|
|
|
15814
16498
|
setSearched('');
|
|
15815
16499
|
};
|
|
15816
16500
|
|
|
15817
|
-
return React__default.createElement(Container$
|
|
16501
|
+
return React__default.createElement(Container$p, null, React__default.createElement("div", null, isString(title) ? title : title.element), withSearch && React__default.createElement(Input$3, {
|
|
15818
16502
|
type: 'search',
|
|
15819
16503
|
placeholder: 'Pesquisa',
|
|
15820
16504
|
setValue: setSearch,
|
|
@@ -15831,8 +16515,8 @@ var Header$a = function Header(props) {
|
|
|
15831
16515
|
}));
|
|
15832
16516
|
};
|
|
15833
16517
|
|
|
15834
|
-
var _templateObject$
|
|
15835
|
-
var EmptyMessage = styled__default.div(_templateObject$
|
|
16518
|
+
var _templateObject$K;
|
|
16519
|
+
var EmptyMessage = styled__default.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteralLoose(["\n padding: 0 20px;\n color: ", ";\n text-align: center;\n margin: auto;\n width: 100%;\n"])), function (_ref) {
|
|
15836
16520
|
var lightGrey = _ref.theme.colors.lightGrey;
|
|
15837
16521
|
return lightGrey;
|
|
15838
16522
|
});
|
|
@@ -15840,6 +16524,35 @@ var EmptyMessage = styled__default.div(_templateObject$G || (_templateObject$G =
|
|
|
15840
16524
|
var getInstance = function getInstance(props) {
|
|
15841
16525
|
var item = props.item;
|
|
15842
16526
|
|
|
16527
|
+
if (!item) {
|
|
16528
|
+
return {
|
|
16529
|
+
open: false,
|
|
16530
|
+
isDynamic: false,
|
|
16531
|
+
itemSpacing: 's3',
|
|
16532
|
+
label: {
|
|
16533
|
+
element: '',
|
|
16534
|
+
text: ''
|
|
16535
|
+
},
|
|
16536
|
+
getOptions: function () {
|
|
16537
|
+
try {
|
|
16538
|
+
return Promise.resolve({
|
|
16539
|
+
options: [],
|
|
16540
|
+
lastPage: true
|
|
16541
|
+
});
|
|
16542
|
+
} catch (e) {
|
|
16543
|
+
return Promise.reject(e);
|
|
16544
|
+
}
|
|
16545
|
+
}
|
|
16546
|
+
};
|
|
16547
|
+
}
|
|
16548
|
+
|
|
16549
|
+
var open = true;
|
|
16550
|
+
var allowEmptySearch = item.allowEmptySearch;
|
|
16551
|
+
var label = isString(item.label) ? {
|
|
16552
|
+
element: item.label,
|
|
16553
|
+
text: item.label
|
|
16554
|
+
} : item.label;
|
|
16555
|
+
|
|
15843
16556
|
if (Array.isArray(item.options)) {
|
|
15844
16557
|
var intialOptions = [].concat(item.options);
|
|
15845
16558
|
|
|
@@ -15861,6 +16574,11 @@ var getInstance = function getInstance(props) {
|
|
|
15861
16574
|
};
|
|
15862
16575
|
|
|
15863
16576
|
return {
|
|
16577
|
+
open: open,
|
|
16578
|
+
isDynamic: false,
|
|
16579
|
+
itemSpacing: item.optionSpacing || 's1',
|
|
16580
|
+
label: label,
|
|
16581
|
+
allowEmptySearch: allowEmptySearch,
|
|
15864
16582
|
getOptions: _getOptions
|
|
15865
16583
|
};
|
|
15866
16584
|
}
|
|
@@ -15881,6 +16599,11 @@ var getInstance = function getInstance(props) {
|
|
|
15881
16599
|
};
|
|
15882
16600
|
|
|
15883
16601
|
return {
|
|
16602
|
+
open: open,
|
|
16603
|
+
isDynamic: true,
|
|
16604
|
+
itemSpacing: item.optionSpacing || 's3',
|
|
16605
|
+
label: label,
|
|
16606
|
+
allowEmptySearch: allowEmptySearch,
|
|
15884
16607
|
getOptions: getOptions
|
|
15885
16608
|
};
|
|
15886
16609
|
};
|
|
@@ -15889,9 +16612,13 @@ var Submenu = function Submenu(props) {
|
|
|
15889
16612
|
var item = props.item,
|
|
15890
16613
|
close = props.close,
|
|
15891
16614
|
setAppliedFilters = props.setAppliedFilters;
|
|
15892
|
-
var isDynamic = !Array.isArray(item.options);
|
|
15893
16615
|
|
|
15894
16616
|
var _getInstance = getInstance(props),
|
|
16617
|
+
open = _getInstance.open,
|
|
16618
|
+
isDynamic = _getInstance.isDynamic,
|
|
16619
|
+
itemSpacing = _getInstance.itemSpacing,
|
|
16620
|
+
label = _getInstance.label,
|
|
16621
|
+
allowEmptySearch = _getInstance.allowEmptySearch,
|
|
15895
16622
|
getOptions = _getInstance.getOptions;
|
|
15896
16623
|
|
|
15897
16624
|
var _useState = React.useState([]),
|
|
@@ -15914,15 +16641,8 @@ var Submenu = function Submenu(props) {
|
|
|
15914
16641
|
loading = _useState5[0],
|
|
15915
16642
|
setLoading = _useState5[1];
|
|
15916
16643
|
|
|
15917
|
-
var _useState6 = React.useState(
|
|
15918
|
-
|
|
15919
|
-
setTouched = _useState6[1];
|
|
15920
|
-
|
|
15921
|
-
var setSearch = function setSearch(value) {
|
|
15922
|
-
_setSearch(value);
|
|
15923
|
-
|
|
15924
|
-
setPage(1);
|
|
15925
|
-
};
|
|
16644
|
+
var _useState6 = React.useState(true),
|
|
16645
|
+
setFirstRender = _useState6[1];
|
|
15926
16646
|
|
|
15927
16647
|
var onSearch = React.useCallback(function () {
|
|
15928
16648
|
try {
|
|
@@ -15937,27 +16657,38 @@ var Submenu = function Submenu(props) {
|
|
|
15937
16657
|
return Promise.reject(e);
|
|
15938
16658
|
}
|
|
15939
16659
|
}, [item, search, page]);
|
|
16660
|
+
|
|
16661
|
+
var setSearch = function setSearch(value, force) {
|
|
16662
|
+
if (force === void 0) {
|
|
16663
|
+
force = true;
|
|
16664
|
+
}
|
|
16665
|
+
|
|
16666
|
+
var changed = search !== value || page !== 1;
|
|
16667
|
+
|
|
16668
|
+
_setSearch(value);
|
|
16669
|
+
|
|
16670
|
+
setPage(1);
|
|
16671
|
+
if (force && changed === false) onSearch();
|
|
16672
|
+
};
|
|
16673
|
+
|
|
15940
16674
|
React.useEffect(function () {
|
|
15941
16675
|
setOptions([]);
|
|
15942
|
-
setSearch('');
|
|
15943
|
-
|
|
16676
|
+
setSearch('', false);
|
|
16677
|
+
setFirstRender(true);
|
|
15944
16678
|
}, [item]);
|
|
15945
16679
|
React.useEffect(function () {
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
return onSearch();
|
|
15954
|
-
}, 250);
|
|
15955
|
-
return function () {
|
|
15956
|
-
return clearTimeout(timeoutId);
|
|
15957
|
-
};
|
|
15958
|
-
}, [touched, onSearch]);
|
|
16680
|
+
setFirstRender(function (firstRender) {
|
|
16681
|
+
if (!item || isDynamic && firstRender) {
|
|
16682
|
+
setLoading(false);
|
|
16683
|
+
} else {
|
|
16684
|
+
setLoading(true);
|
|
16685
|
+
onSearch();
|
|
16686
|
+
}
|
|
15959
16687
|
|
|
15960
|
-
|
|
16688
|
+
return false;
|
|
16689
|
+
});
|
|
16690
|
+
}, [onSearch]);
|
|
16691
|
+
var onClickOption = item ? function (index) {
|
|
15961
16692
|
var option = options[index];
|
|
15962
16693
|
setAppliedFilters(function (prev) {
|
|
15963
16694
|
var newState = [].concat(prev);
|
|
@@ -15974,10 +16705,7 @@ var Submenu = function Submenu(props) {
|
|
|
15974
16705
|
newState.push({
|
|
15975
16706
|
name: item.name,
|
|
15976
16707
|
labels: {
|
|
15977
|
-
filter:
|
|
15978
|
-
text: item.label,
|
|
15979
|
-
element: item.label
|
|
15980
|
-
} : item.label,
|
|
16708
|
+
filter: label,
|
|
15981
16709
|
option: isString(option.label) ? {
|
|
15982
16710
|
text: option.label,
|
|
15983
16711
|
element: option.label
|
|
@@ -15987,14 +16715,11 @@ var Submenu = function Submenu(props) {
|
|
|
15987
16715
|
});
|
|
15988
16716
|
return newState;
|
|
15989
16717
|
});
|
|
15990
|
-
};
|
|
16718
|
+
} : undefined;
|
|
15991
16719
|
|
|
15992
16720
|
var optionsParser = function optionsParser(option) {
|
|
15993
16721
|
return {
|
|
15994
16722
|
label: option.label,
|
|
15995
|
-
data: {
|
|
15996
|
-
value: option.value
|
|
15997
|
-
},
|
|
15998
16723
|
onClick: onClickOption
|
|
15999
16724
|
};
|
|
16000
16725
|
};
|
|
@@ -16006,9 +16731,8 @@ var Submenu = function Submenu(props) {
|
|
|
16006
16731
|
});
|
|
16007
16732
|
};
|
|
16008
16733
|
|
|
16009
|
-
var itemSpacing = item.optionSpacing || isDynamic ? 's3' : 's1';
|
|
16010
16734
|
return React__default.createElement(Menu, {
|
|
16011
|
-
open:
|
|
16735
|
+
open: open,
|
|
16012
16736
|
axis: 'x',
|
|
16013
16737
|
options: options.map(optionsParser),
|
|
16014
16738
|
close: close,
|
|
@@ -16026,11 +16750,10 @@ var Submenu = function Submenu(props) {
|
|
|
16026
16750
|
bottom: itemSpacing
|
|
16027
16751
|
},
|
|
16028
16752
|
bordered: isDynamic,
|
|
16029
|
-
before: React__default.createElement(Header$
|
|
16030
|
-
title:
|
|
16753
|
+
before: React__default.createElement(Header$b, {
|
|
16754
|
+
title: label,
|
|
16031
16755
|
search: [search, setSearch],
|
|
16032
|
-
|
|
16033
|
-
allowEmptySearch: item.allowEmptySearch,
|
|
16756
|
+
allowEmptySearch: allowEmptySearch,
|
|
16034
16757
|
withSearch: isDynamic
|
|
16035
16758
|
}),
|
|
16036
16759
|
loading: loading,
|
|
@@ -16039,8 +16762,13 @@ var Submenu = function Submenu(props) {
|
|
|
16039
16762
|
return React__default.createElement(React__default.Fragment, null, "Nenhum resultado foi encontrado");
|
|
16040
16763
|
}
|
|
16041
16764
|
|
|
16042
|
-
return React__default.createElement(React__default.Fragment, null, "Utilize a busca para pesquisar por ", React__default.createElement("br", null),
|
|
16043
|
-
}()) : undefined
|
|
16765
|
+
return React__default.createElement(React__default.Fragment, null, "Utilize a busca para pesquisar por ", React__default.createElement("br", null), label.text);
|
|
16766
|
+
}()) : undefined,
|
|
16767
|
+
transition: {
|
|
16768
|
+
properties: {
|
|
16769
|
+
width: {}
|
|
16770
|
+
}
|
|
16771
|
+
}
|
|
16044
16772
|
});
|
|
16045
16773
|
};
|
|
16046
16774
|
|
|
@@ -16065,7 +16793,7 @@ var Filters = function Filters(props) {
|
|
|
16065
16793
|
}
|
|
16066
16794
|
};
|
|
16067
16795
|
});
|
|
16068
|
-
var selected = active >= 0 && active < props.items.length ? props.items[active] :
|
|
16796
|
+
var selected = active >= 0 && active < props.items.length ? props.items[active] : undefined;
|
|
16069
16797
|
React.useEffect(function () {
|
|
16070
16798
|
if (open) return;
|
|
16071
16799
|
setActive(-1);
|
|
@@ -16085,8 +16813,13 @@ var Filters = function Filters(props) {
|
|
|
16085
16813
|
top: 's1',
|
|
16086
16814
|
left: 's1',
|
|
16087
16815
|
bottom: 's1'
|
|
16816
|
+
},
|
|
16817
|
+
transition: {
|
|
16818
|
+
properties: {
|
|
16819
|
+
width: {}
|
|
16820
|
+
}
|
|
16088
16821
|
}
|
|
16089
|
-
},
|
|
16822
|
+
}, React__default.createElement(Submenu, {
|
|
16090
16823
|
item: selected,
|
|
16091
16824
|
close: function close() {
|
|
16092
16825
|
return setActive(-1);
|
|
@@ -16095,19 +16828,19 @@ var Filters = function Filters(props) {
|
|
|
16095
16828
|
}));
|
|
16096
16829
|
};
|
|
16097
16830
|
|
|
16098
|
-
var _templateObject$
|
|
16099
|
-
var Container$
|
|
16831
|
+
var _templateObject$L, _templateObject2$B, _templateObject3$z, _templateObject4$v;
|
|
16832
|
+
var Container$q = styled__default(AbsoluteContainer)(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n > div {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n\n > div {\n padding: ", ";\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n }\n"])), function (_ref) {
|
|
16100
16833
|
var s3 = _ref.theme.spacings.s3;
|
|
16101
16834
|
return s3 + " 0 " + s3 + " " + s3;
|
|
16102
16835
|
});
|
|
16103
|
-
var Header$
|
|
16836
|
+
var Header$c = styled__default.div(_templateObject2$B || (_templateObject2$B = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: ", ";\n padding: ", ";\n > div {\n display: flex;\n justify-content: space-between;\n }\n"])), function (_ref2) {
|
|
16104
16837
|
var s3 = _ref2.theme.spacings.s3;
|
|
16105
16838
|
return s3;
|
|
16106
16839
|
}, function (_ref3) {
|
|
16107
16840
|
var s3 = _ref3.theme.spacings.s3;
|
|
16108
16841
|
return "0 " + s3 + " " + s3 + " 0";
|
|
16109
16842
|
});
|
|
16110
|
-
var Title = styled__default.div(_templateObject3$
|
|
16843
|
+
var Title = styled__default.div(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n ", "\n color: ", ";\n"])), function (_ref4) {
|
|
16111
16844
|
var useTypography = _ref4.theme.useTypography;
|
|
16112
16845
|
return useTypography('p', {
|
|
16113
16846
|
fontWeight: 'bold'
|
|
@@ -16152,7 +16885,6 @@ var AppliedFilters = function AppliedFilters(props) {
|
|
|
16152
16885
|
setSearch('');
|
|
16153
16886
|
setSearched('');
|
|
16154
16887
|
}, [open]);
|
|
16155
|
-
if (!open) return React__default.createElement(React__default.Fragment, null);
|
|
16156
16888
|
|
|
16157
16889
|
var onClear = function onClear() {
|
|
16158
16890
|
setAppliedFilters([]);
|
|
@@ -16176,10 +16908,16 @@ var AppliedFilters = function AppliedFilters(props) {
|
|
|
16176
16908
|
});
|
|
16177
16909
|
};
|
|
16178
16910
|
|
|
16179
|
-
return React__default.createElement(Container$
|
|
16911
|
+
return React__default.createElement(Container$q, {
|
|
16912
|
+
open: open,
|
|
16180
16913
|
width: '275px',
|
|
16181
|
-
height: '261px'
|
|
16182
|
-
|
|
16914
|
+
height: '261px',
|
|
16915
|
+
transition: {
|
|
16916
|
+
properties: {
|
|
16917
|
+
height: {}
|
|
16918
|
+
}
|
|
16919
|
+
}
|
|
16920
|
+
}, React__default.createElement("div", null, React__default.createElement(Header$c, null, React__default.createElement("div", null, React__default.createElement(Title, null, "Filtros Aplicados"), React__default.createElement(Button$1, {
|
|
16183
16921
|
type: 'button',
|
|
16184
16922
|
onClick: onClear,
|
|
16185
16923
|
appearance: 'link'
|
|
@@ -16223,9 +16961,271 @@ var AppliedFilters = function AppliedFilters(props) {
|
|
|
16223
16961
|
return onRemove(name);
|
|
16224
16962
|
}
|
|
16225
16963
|
})));
|
|
16226
|
-
})));
|
|
16964
|
+
}))));
|
|
16965
|
+
};
|
|
16966
|
+
|
|
16967
|
+
var Provider$2 = React__default.createContext({
|
|
16968
|
+
cols: {}
|
|
16969
|
+
});
|
|
16970
|
+
var useContext$2 = function useContext() {
|
|
16971
|
+
return React__default.useContext(Provider$2);
|
|
16972
|
+
};
|
|
16973
|
+
|
|
16974
|
+
var _templateObject$M, _templateObject2$C, _templateObject3$A, _templateObject4$w, _templateObject5$u, _templateObject6$q, _templateObject7$l, _templateObject8$h, _templateObject9$f, _templateObject10$b, _templateObject11$6, _templateObject12$4, _templateObject13$3, _templateObject14$2, _templateObject15$1;
|
|
16975
|
+
var aligns = {
|
|
16976
|
+
self: {
|
|
16977
|
+
horizontal: {
|
|
16978
|
+
center: 'center',
|
|
16979
|
+
left: 'flex-start',
|
|
16980
|
+
right: 'flex-end'
|
|
16981
|
+
},
|
|
16982
|
+
vertical: {
|
|
16983
|
+
center: 'center',
|
|
16984
|
+
top: 'flex-start',
|
|
16985
|
+
bottom: 'flex-end'
|
|
16986
|
+
}
|
|
16987
|
+
},
|
|
16988
|
+
content: {
|
|
16989
|
+
horizontal: {
|
|
16990
|
+
around: 'space-around',
|
|
16991
|
+
between: 'space-between',
|
|
16992
|
+
center: 'center',
|
|
16993
|
+
left: 'flex-start',
|
|
16994
|
+
right: 'flex-end'
|
|
16995
|
+
},
|
|
16996
|
+
vertical: {
|
|
16997
|
+
center: 'center',
|
|
16998
|
+
top: 'flex-start',
|
|
16999
|
+
bottom: 'flex-end'
|
|
17000
|
+
}
|
|
17001
|
+
}
|
|
17002
|
+
};
|
|
17003
|
+
var Col = styled__default.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n ", "\n\n padding: ", ";\n\n ", "\n\n ", "\n\n ", "\n\n ", ";\n\n ", ";\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
17004
|
+
var width = _ref.width;
|
|
17005
|
+
|
|
17006
|
+
if (width === undefined) {
|
|
17007
|
+
return styled.css(_templateObject2$C || (_templateObject2$C = _taggedTemplateLiteralLoose(["\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n width: 100%;\n "])));
|
|
17008
|
+
} else if (width === 'auto') {
|
|
17009
|
+
return styled.css(_templateObject3$A || (_templateObject3$A = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: auto;\n max-width: none;\n "])));
|
|
17010
|
+
}
|
|
17011
|
+
|
|
17012
|
+
var w = parseFloat(width) * 100 / 12;
|
|
17013
|
+
return styled.css(_templateObject4$w || (_templateObject4$w = _taggedTemplateLiteralLoose(["\n flex: 0 0 ", "%;\n max-width: ", "%;\n width: 100%;\n "])), w, w);
|
|
17014
|
+
}, function (_ref2) {
|
|
17015
|
+
var spacing = _ref2.spacing;
|
|
17016
|
+
var padding = getSpacings(spacing === undefined ? 's1' : spacing);
|
|
17017
|
+
return padding;
|
|
17018
|
+
}, function (_ref3) {
|
|
17019
|
+
var spacingAround = _ref3.spacingAround;
|
|
17020
|
+
if (spacingAround) return;
|
|
17021
|
+
return styled.css(_templateObject5$u || (_templateObject5$u = _taggedTemplateLiteralLoose(["\n :first-child {\n padding-left: 0;\n }\n :last-child {\n padding-right: 0;\n }\n "])));
|
|
17022
|
+
}, function (_ref4) {
|
|
17023
|
+
var align = _ref4.align;
|
|
17024
|
+
if (align === undefined) return;
|
|
17025
|
+
var styles = [];
|
|
17026
|
+
|
|
17027
|
+
if (align.self !== undefined) {
|
|
17028
|
+
if (align.self.horizontal !== undefined) {
|
|
17029
|
+
var v = align.self.horizontal;
|
|
17030
|
+
var a = aligns.self.horizontal;
|
|
17031
|
+
styles.push(styled.css(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n justify-self: ", ";\n "])), a[v]));
|
|
17032
|
+
}
|
|
17033
|
+
|
|
17034
|
+
if (align.self.vertical !== undefined) {
|
|
17035
|
+
var _v = align.self.vertical;
|
|
17036
|
+
var _a = aligns.self.vertical;
|
|
17037
|
+
styles.push(styled.css(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n align-self: ", ";\n "])), _a[_v]));
|
|
17038
|
+
}
|
|
17039
|
+
}
|
|
17040
|
+
|
|
17041
|
+
if (align.content !== undefined) {
|
|
17042
|
+
if (align.content.horizontal !== undefined) {
|
|
17043
|
+
var _v2 = align.content.horizontal;
|
|
17044
|
+
var _a2 = aligns.content.horizontal;
|
|
17045
|
+
styles.push(styled.css(_templateObject8$h || (_templateObject8$h = _taggedTemplateLiteralLoose(["\n justify-content: ", ";\n "])), _a2[_v2]));
|
|
17046
|
+
}
|
|
17047
|
+
|
|
17048
|
+
if (align.content.vertical !== undefined) {
|
|
17049
|
+
var _v3 = align.content.vertical;
|
|
17050
|
+
var _a3 = aligns.content.vertical;
|
|
17051
|
+
styles.push(styled.css(_templateObject9$f || (_templateObject9$f = _taggedTemplateLiteralLoose(["\n align-items: ", ";\n "])), _a3[_v3]));
|
|
17052
|
+
}
|
|
17053
|
+
}
|
|
17054
|
+
|
|
17055
|
+
if (align.text !== undefined) {
|
|
17056
|
+
var _v4 = align.text;
|
|
17057
|
+
styles.push(styled.css(_templateObject10$b || (_templateObject10$b = _taggedTemplateLiteralLoose(["\n text-align: ", ";\n "])), _v4));
|
|
17058
|
+
}
|
|
17059
|
+
|
|
17060
|
+
return styles;
|
|
17061
|
+
}, function (_ref5) {
|
|
17062
|
+
var bordered = _ref5.bordered,
|
|
17063
|
+
lightestGrey = _ref5.theme.colors.lightestGrey;
|
|
17064
|
+
if (!bordered) return;
|
|
17065
|
+
return styled.css(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n :not(:last-child) {\n border-right: 1px solid ", ";\n }\n "])), lightestGrey);
|
|
17066
|
+
}, function (_ref6) {
|
|
17067
|
+
var fontColor = _ref6.fontColor,
|
|
17068
|
+
theme = _ref6.theme;
|
|
17069
|
+
if (fontColor === undefined) return;
|
|
17070
|
+
var c = Array.isArray(fontColor) ? theme.getColor.apply(theme, fontColor) : theme.colors[fontColor];
|
|
17071
|
+
return styled.css(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), c);
|
|
17072
|
+
}, function (_ref7) {
|
|
17073
|
+
var backgroundColor = _ref7.backgroundColor,
|
|
17074
|
+
theme = _ref7.theme;
|
|
17075
|
+
if (backgroundColor === undefined) return;
|
|
17076
|
+
var c = Array.isArray(backgroundColor) ? theme.getColor.apply(theme, backgroundColor) : theme.colors[backgroundColor];
|
|
17077
|
+
return styled.css(_templateObject13$3 || (_templateObject13$3 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), c);
|
|
17078
|
+
}, function (_ref8) {
|
|
17079
|
+
var hover = _ref8.hover,
|
|
17080
|
+
theme = _ref8.theme;
|
|
17081
|
+
if (!hover) return;
|
|
17082
|
+
var h = hover === true ? ['lightGrey', 50] : hover;
|
|
17083
|
+
var c = Array.isArray(h) ? theme.getColor.apply(theme, h) : theme.colors[h];
|
|
17084
|
+
return styled.css(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n :hover {\n background-color: ", ";\n }\n "])), c);
|
|
17085
|
+
}, function (_ref9) {
|
|
17086
|
+
var pointer = _ref9.pointer;
|
|
17087
|
+
if (!pointer) return;
|
|
17088
|
+
return styled.css(_templateObject15$1 || (_templateObject15$1 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n "])));
|
|
17089
|
+
});
|
|
17090
|
+
|
|
17091
|
+
var Col$1 = function Col$1(props) {
|
|
17092
|
+
var context = useContext$2();
|
|
17093
|
+
|
|
17094
|
+
var _props = _extends({}, context.cols, props);
|
|
17095
|
+
|
|
17096
|
+
var colProps = filterObject(_props, ['ellipsis', 'children']);
|
|
17097
|
+
return React__default.createElement(Col, Object.assign({}, colProps), _props.ellipsis ? React__default.createElement(EllipsisContainer$1, null, _props.children) : _props.children);
|
|
17098
|
+
};
|
|
17099
|
+
|
|
17100
|
+
var Provider$3 = React__default.createContext({
|
|
17101
|
+
rows: {},
|
|
17102
|
+
cols: {}
|
|
17103
|
+
});
|
|
17104
|
+
var useContext$3 = function useContext() {
|
|
17105
|
+
return React__default.useContext(Provider$3);
|
|
17106
|
+
};
|
|
17107
|
+
|
|
17108
|
+
var _templateObject$N, _templateObject2$D, _templateObject3$B;
|
|
17109
|
+
var Grid = styled__default.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
17110
|
+
var spacing = _ref.spacing;
|
|
17111
|
+
if (spacing === undefined) return;
|
|
17112
|
+
var padding = getSpacings(spacing);
|
|
17113
|
+
return styled.css(_templateObject2$D || (_templateObject2$D = _taggedTemplateLiteralLoose(["\n padding: ", ";\n "])), padding);
|
|
17114
|
+
}, function (_ref2) {
|
|
17115
|
+
var borderless = _ref2.borderless,
|
|
17116
|
+
lightestGrey = _ref2.theme.colors.lightestGrey;
|
|
17117
|
+
if (borderless) return;
|
|
17118
|
+
return styled.css(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n border: 1px solid ", ";\n "])), lightestGrey);
|
|
17119
|
+
});
|
|
17120
|
+
|
|
17121
|
+
var Grid$1 = function Grid$1(props) {
|
|
17122
|
+
var cols = props.cols || {};
|
|
17123
|
+
var rows = props.rows || {};
|
|
17124
|
+
var gridProps = filterObject(props, ['cols', 'rows']);
|
|
17125
|
+
return React__default.createElement(Provider$3.Provider, {
|
|
17126
|
+
value: {
|
|
17127
|
+
rows: rows,
|
|
17128
|
+
cols: cols
|
|
17129
|
+
}
|
|
17130
|
+
}, React__default.createElement(Grid, Object.assign({}, gridProps)));
|
|
17131
|
+
};
|
|
17132
|
+
|
|
17133
|
+
var _templateObject$O, _templateObject2$E, _templateObject3$C, _templateObject4$x, _templateObject5$v, _templateObject6$r, _templateObject7$m, _templateObject8$i, _templateObject9$g, _templateObject10$c;
|
|
17134
|
+
var horizontalAligns = {
|
|
17135
|
+
around: 'space-around',
|
|
17136
|
+
between: 'space-between',
|
|
17137
|
+
center: 'center',
|
|
17138
|
+
left: 'start',
|
|
17139
|
+
right: 'end'
|
|
17140
|
+
};
|
|
17141
|
+
var verticalAligns = {
|
|
17142
|
+
center: 'center',
|
|
17143
|
+
top: 'start',
|
|
17144
|
+
bottom: 'end'
|
|
17145
|
+
};
|
|
17146
|
+
var Row = styled__default.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n color: ", ";\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
17147
|
+
var spacing = _ref.spacing;
|
|
17148
|
+
if (spacing === undefined) return;
|
|
17149
|
+
var padding = getSpacings(spacing);
|
|
17150
|
+
return styled.css(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n padding: ", ";\n "])), padding);
|
|
17151
|
+
}, function (_ref2) {
|
|
17152
|
+
var spacingAround = _ref2.spacingAround;
|
|
17153
|
+
if (spacingAround) return;
|
|
17154
|
+
return styled.css(_templateObject3$C || (_templateObject3$C = _taggedTemplateLiteralLoose(["\n :first-child {\n padding-top: 0;\n }\n :last-child {\n padding-bottom: 0;\n }\n "])));
|
|
17155
|
+
}, function (_ref3) {
|
|
17156
|
+
var horizontalAlign = _ref3.horizontalAlign;
|
|
17157
|
+
if (horizontalAlign === undefined) return;
|
|
17158
|
+
return styled.css(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n justify-content: ", ";\n "])), horizontalAligns[horizontalAlign]);
|
|
17159
|
+
}, function (_ref4) {
|
|
17160
|
+
var verticalAlign = _ref4.verticalAlign;
|
|
17161
|
+
if (verticalAlign === undefined) return;
|
|
17162
|
+
return styled.css(_templateObject5$v || (_templateObject5$v = _taggedTemplateLiteralLoose(["\n align-items: ", ";\n "])), verticalAligns[verticalAlign]);
|
|
17163
|
+
}, function (_ref5) {
|
|
17164
|
+
var striped = _ref5.striped,
|
|
17165
|
+
backgroundColor = _ref5.backgroundColor,
|
|
17166
|
+
theme = _ref5.theme;
|
|
17167
|
+
|
|
17168
|
+
if (backgroundColor !== undefined) {
|
|
17169
|
+
var c = Array.isArray(backgroundColor) ? theme.getColor.apply(theme, backgroundColor) : theme.colors[backgroundColor];
|
|
17170
|
+
return styled.css(_templateObject6$r || (_templateObject6$r = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), c);
|
|
17171
|
+
}
|
|
17172
|
+
|
|
17173
|
+
if (striped === undefined) {
|
|
17174
|
+
return styled.css(_templateObject7$m || (_templateObject7$m = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), theme.colors.white);
|
|
17175
|
+
}
|
|
17176
|
+
|
|
17177
|
+
var config = striped === true ? {
|
|
17178
|
+
even: ['lightestGrey', 50]
|
|
17179
|
+
} : striped;
|
|
17180
|
+
var colors = Object.keys(config).reduce(function (prev, key) {
|
|
17181
|
+
var _extends2;
|
|
17182
|
+
|
|
17183
|
+
var c = config[key];
|
|
17184
|
+
if (c === undefined) return prev;
|
|
17185
|
+
return _extends({}, prev, (_extends2 = {}, _extends2[key] = Array.isArray(c) ? theme.getColor.apply(theme, c) : theme.colors[c], _extends2));
|
|
17186
|
+
}, {
|
|
17187
|
+
even: theme.colors.white,
|
|
17188
|
+
odd: theme.colors.white
|
|
17189
|
+
});
|
|
17190
|
+
return styled.css(_templateObject8$i || (_templateObject8$i = _taggedTemplateLiteralLoose(["\n :nth-child(even) {\n background-color: ", ";\n }\n :nth-child(odd) {\n background-color: ", ";\n }\n "])), colors.even, colors.odd);
|
|
17191
|
+
}, function (_ref6) {
|
|
17192
|
+
var fontColor = _ref6.fontColor,
|
|
17193
|
+
theme = _ref6.theme;
|
|
17194
|
+
if (fontColor === undefined) return theme.getColor('black', 80);
|
|
17195
|
+
var c = Array.isArray(fontColor) ? theme.getColor.apply(theme, fontColor) : theme.colors[fontColor];
|
|
17196
|
+
return c;
|
|
17197
|
+
}, function (_ref7) {
|
|
17198
|
+
var borderless = _ref7.borderless,
|
|
17199
|
+
lightestGrey = _ref7.theme.colors.lightestGrey;
|
|
17200
|
+
if (borderless) return;
|
|
17201
|
+
return styled.css(_templateObject9$g || (_templateObject9$g = _taggedTemplateLiteralLoose(["\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n "])), lightestGrey);
|
|
17202
|
+
}, function (_ref8) {
|
|
17203
|
+
var hover = _ref8.hover,
|
|
17204
|
+
theme = _ref8.theme;
|
|
17205
|
+
if (!hover) return;
|
|
17206
|
+
var h = hover === true ? ['lightGrey', 50] : hover;
|
|
17207
|
+
var c = Array.isArray(h) ? theme.getColor.apply(theme, h) : theme.colors[h];
|
|
17208
|
+
return styled.css(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n :hover {\n background-color: ", ";\n }\n "])), c);
|
|
17209
|
+
});
|
|
17210
|
+
|
|
17211
|
+
var Row$1 = function Row$1(props) {
|
|
17212
|
+
var context = useContext$3();
|
|
17213
|
+
|
|
17214
|
+
var cols = _extends({}, props.cols || {}, context.cols);
|
|
17215
|
+
|
|
17216
|
+
var rowProps = filterObject(props, ['cols'], _extends({}, context.rows));
|
|
17217
|
+
return React__default.createElement(Provider$2.Provider, {
|
|
17218
|
+
value: {
|
|
17219
|
+
cols: cols
|
|
17220
|
+
}
|
|
17221
|
+
}, React__default.createElement(Row, Object.assign({}, rowProps)));
|
|
16227
17222
|
};
|
|
16228
17223
|
|
|
17224
|
+
var Grid$2 = Object.assign(Grid$1, {
|
|
17225
|
+
Row: Row$1,
|
|
17226
|
+
Col: Col$1
|
|
17227
|
+
});
|
|
17228
|
+
|
|
16229
17229
|
var theme = {
|
|
16230
17230
|
sizes: sizes,
|
|
16231
17231
|
fontSizes: fontSizes
|
|
@@ -16235,14 +17235,14 @@ var theme$1 = {
|
|
|
16235
17235
|
button: theme
|
|
16236
17236
|
};
|
|
16237
17237
|
|
|
16238
|
-
var _templateObject$
|
|
16239
|
-
var FontStyles = styled.createGlobalStyle(_templateObject$
|
|
17238
|
+
var _templateObject$P;
|
|
17239
|
+
var FontStyles = styled.createGlobalStyle(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n"])));
|
|
16240
17240
|
|
|
16241
17241
|
var Globals = function Globals() {
|
|
16242
17242
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(FontStyles, null));
|
|
16243
17243
|
};
|
|
16244
17244
|
|
|
16245
|
-
var _templateObject$
|
|
17245
|
+
var _templateObject$Q;
|
|
16246
17246
|
|
|
16247
17247
|
var getColor$1 = function getColor(color, opacity) {
|
|
16248
17248
|
if (opacity === void 0) {
|
|
@@ -16261,7 +17261,7 @@ var useTypography = function useTypography(typography, options) {
|
|
|
16261
17261
|
fontFamily = _typographies$typogra.fontFamily,
|
|
16262
17262
|
fontWeight = _typographies$typogra.fontWeight,
|
|
16263
17263
|
fontSize = _typographies$typogra.fontSize;
|
|
16264
|
-
return styled.css(_templateObject$
|
|
17264
|
+
return styled.css(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n "])), fontFamily, options.fontWeight || fontWeight, fontSize);
|
|
16265
17265
|
};
|
|
16266
17266
|
|
|
16267
17267
|
var isDarkColor = function isDarkColor(color, ifDark, ifLight) {
|
|
@@ -16323,6 +17323,7 @@ exports.MwCard = Card;
|
|
|
16323
17323
|
exports.MwDatePicker = Calendar;
|
|
16324
17324
|
exports.MwEllipsisContainer = EllipsisContainer$1;
|
|
16325
17325
|
exports.MwFilters = Filters;
|
|
17326
|
+
exports.MwGrid = Grid$2;
|
|
16326
17327
|
exports.MwIcon = Icon;
|
|
16327
17328
|
exports.MwIndicator = Indicator;
|
|
16328
17329
|
exports.MwInput = Input$3;
|
|
@@ -16335,6 +17336,8 @@ exports.MwScrollContainer = ScrollContainer;
|
|
|
16335
17336
|
exports.MwTabs = Tabs$1;
|
|
16336
17337
|
exports.MwTextArea = TextArea;
|
|
16337
17338
|
exports.MwToast = Toast;
|
|
17339
|
+
exports.MwTransition = Transition;
|
|
16338
17340
|
exports.MwZoom = Zoom;
|
|
16339
17341
|
exports.ThemeProvider = ThemeProvider;
|
|
17342
|
+
exports.useMwTransition = useTransition;
|
|
16340
17343
|
//# sourceMappingURL=index.js.map
|