visits-style 1.2.1 → 1.4.0

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.
Files changed (78) hide show
  1. package/README.md +14 -7
  2. package/dist/components/Accordion/index.d.ts +12 -13
  3. package/dist/components/AppBar/index.d.ts +19 -20
  4. package/dist/components/Card/index.d.ts +17 -18
  5. package/dist/components/Modal/index.d.ts +33 -30
  6. package/dist/components/Popover/index.d.ts +38 -40
  7. package/dist/components/Portal/index.d.ts +8 -8
  8. package/dist/components/Spinner/index.d.ts +12 -12
  9. package/dist/components/Toast/ToastItem.d.ts +2 -0
  10. package/dist/components/Toast/index.d.ts +2 -39
  11. package/dist/components/Toast/types.d.ts +38 -0
  12. package/dist/components/Tooltip/index.d.ts +30 -27
  13. package/dist/components/index.d.ts +11 -10
  14. package/dist/elements/Box/index.d.ts +10 -10
  15. package/dist/elements/Button/ButtonGroup.d.ts +2 -2
  16. package/dist/elements/Button/TextButton.d.ts +18 -18
  17. package/dist/elements/Button/index.d.ts +16 -16
  18. package/dist/elements/Content/index.d.ts +2 -2
  19. package/dist/elements/Divider/index.d.ts +2 -2
  20. package/dist/elements/Grid/Col.d.ts +11 -11
  21. package/dist/elements/Grid/Container.d.ts +6 -6
  22. package/dist/elements/Grid/Row.d.ts +3 -3
  23. package/dist/elements/Icons/Approved.d.ts +2 -2
  24. package/dist/elements/Icons/ArrowDown.d.ts +2 -2
  25. package/dist/elements/Icons/ChevronLeftRound.d.ts +2 -2
  26. package/dist/elements/Icons/ChevronRightRound.d.ts +2 -2
  27. package/dist/elements/Icons/Close.d.ts +2 -2
  28. package/dist/elements/Icons/FileRound.d.ts +2 -2
  29. package/dist/elements/Icons/Pencil.d.ts +2 -2
  30. package/dist/elements/Icons/PencilSimple.d.ts +2 -2
  31. package/dist/elements/Icons/Plus.d.ts +2 -2
  32. package/dist/elements/Icons/Refresh.d.ts +2 -2
  33. package/dist/elements/Icons/User.d.ts +2 -2
  34. package/dist/elements/Icons/index.d.ts +11 -11
  35. package/dist/elements/Placeholder/index.d.ts +2 -2
  36. package/dist/elements/Progress/index.d.ts +18 -19
  37. package/dist/elements/Table/index.d.ts +11 -11
  38. package/dist/elements/Tag/index.d.ts +15 -16
  39. package/dist/elements/index.d.ts +14 -15
  40. package/dist/forms/Checkbox/index.d.ts +8 -8
  41. package/dist/forms/Field/index.d.ts +7 -8
  42. package/dist/forms/HelpMessage.d.ts +7 -7
  43. package/dist/forms/Radio/index.d.ts +8 -8
  44. package/dist/forms/Select/index.d.ts +27 -27
  45. package/dist/forms/Switch/index.d.ts +21 -21
  46. package/dist/forms/TextInput/index.d.ts +22 -23
  47. package/dist/forms/Textarea/index.d.ts +11 -11
  48. package/dist/forms/index.d.ts +7 -7
  49. package/dist/hooks/useForceUpdate.d.ts +1 -1
  50. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
  51. package/dist/hooks/useScrollFix.d.ts +1 -1
  52. package/dist/index.cjs.js +2389 -0
  53. package/dist/index.d.ts +7 -7
  54. package/dist/index.es.js +2389 -0
  55. package/dist/styles/normalize.d.ts +3 -3
  56. package/dist/theme.d.ts +3 -3
  57. package/dist/types.d.ts +36 -36
  58. package/dist/utils/arrow.d.ts +1 -1
  59. package/dist/utils/boxShadow.d.ts +1 -1
  60. package/dist/utils/disabledColor.d.ts +2 -2
  61. package/dist/utils/findColorInvert.d.ts +2 -2
  62. package/dist/utils/hambuger.d.ts +1 -1
  63. package/dist/utils/index.d.ts +6 -6
  64. package/dist/utils/isClient.d.ts +2 -2
  65. package/dist/utils/media.d.ts +10 -10
  66. package/dist/utils/setAlign.d.ts +3 -3
  67. package/dist/utils/setSize.d.ts +4 -4
  68. package/dist/utils/wrapEvent.d.ts +2 -2
  69. package/package.json +20 -63
  70. package/dist/hooks/usePopper.d.ts +0 -12
  71. package/dist/index.js +0 -8
  72. package/dist/utils/__test__/findColorInvert.test.d.ts +0 -1
  73. package/dist/visits-style.cjs.development.js +0 -2646
  74. package/dist/visits-style.cjs.development.js.map +0 -1
  75. package/dist/visits-style.cjs.production.min.js +0 -2
  76. package/dist/visits-style.cjs.production.min.js.map +0 -1
  77. package/dist/visits-style.esm.js +0 -2587
  78. package/dist/visits-style.esm.js.map +0 -1
@@ -1,2587 +0,0 @@
1
- import React, { forwardRef, useLayoutEffect, useEffect, useRef, useMemo, useImperativeHandle, useState, useCallback, cloneElement, Children } from 'react';
2
- import styled, { css, keyframes } from 'styled-components';
3
- import { getLuminance, transparentize, darken } from 'polished';
4
- import { createPortal } from 'react-dom';
5
- import { createPopper } from '@popperjs/core';
6
- import { Transition, TransitionGroup } from 'react-transition-group';
7
-
8
- function _defineProperty(obj, key, value) {
9
- if (key in obj) {
10
- Object.defineProperty(obj, key, {
11
- value: value,
12
- enumerable: true,
13
- configurable: true,
14
- writable: true
15
- });
16
- } else {
17
- obj[key] = value;
18
- }
19
-
20
- return obj;
21
- }
22
-
23
- function ownKeys(object, enumerableOnly) {
24
- var keys = Object.keys(object);
25
-
26
- if (Object.getOwnPropertySymbols) {
27
- var symbols = Object.getOwnPropertySymbols(object);
28
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
29
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
30
- });
31
- keys.push.apply(keys, symbols);
32
- }
33
-
34
- return keys;
35
- }
36
-
37
- function _objectSpread2(target) {
38
- for (var i = 1; i < arguments.length; i++) {
39
- var source = arguments[i] != null ? arguments[i] : {};
40
-
41
- if (i % 2) {
42
- ownKeys(source, true).forEach(function (key) {
43
- _defineProperty(target, key, source[key]);
44
- });
45
- } else if (Object.getOwnPropertyDescriptors) {
46
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47
- } else {
48
- ownKeys(source).forEach(function (key) {
49
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50
- });
51
- }
52
- }
53
-
54
- return target;
55
- }
56
-
57
- function _objectWithoutPropertiesLoose(source, excluded) {
58
- if (source == null) return {};
59
- var target = {};
60
- var sourceKeys = Object.keys(source);
61
- var key, i;
62
-
63
- for (i = 0; i < sourceKeys.length; i++) {
64
- key = sourceKeys[i];
65
- if (excluded.indexOf(key) >= 0) continue;
66
- target[key] = source[key];
67
- }
68
-
69
- return target;
70
- }
71
-
72
- function _objectWithoutProperties(source, excluded) {
73
- if (source == null) return {};
74
-
75
- var target = _objectWithoutPropertiesLoose(source, excluded);
76
-
77
- var key, i;
78
-
79
- if (Object.getOwnPropertySymbols) {
80
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
81
-
82
- for (i = 0; i < sourceSymbolKeys.length; i++) {
83
- key = sourceSymbolKeys[i];
84
- if (excluded.indexOf(key) >= 0) continue;
85
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
86
- target[key] = source[key];
87
- }
88
- }
89
-
90
- return target;
91
- }
92
-
93
- function _taggedTemplateLiteralLoose(strings, raw) {
94
- if (!raw) {
95
- raw = strings.slice(0);
96
- }
97
-
98
- strings.raw = raw;
99
- return strings;
100
- }
101
-
102
- function _slicedToArray(arr, i) {
103
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
104
- }
105
-
106
- function _arrayWithHoles(arr) {
107
- if (Array.isArray(arr)) return arr;
108
- }
109
-
110
- function _iterableToArrayLimit(arr, i) {
111
- var _arr = [];
112
- var _n = true;
113
- var _d = false;
114
- var _e = undefined;
115
-
116
- try {
117
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
118
- _arr.push(_s.value);
119
-
120
- if (i && _arr.length === i) break;
121
- }
122
- } catch (err) {
123
- _d = true;
124
- _e = err;
125
- } finally {
126
- try {
127
- if (!_n && _i["return"] != null) _i["return"]();
128
- } finally {
129
- if (_d) throw _e;
130
- }
131
- }
132
-
133
- return _arr;
134
- }
135
-
136
- function _nonIterableRest() {
137
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
138
- }
139
-
140
- var _excluded = ["label", "children", "required"];
141
-
142
- var _templateObject, _templateObject2;
143
- var Wrapper =
144
- /*#__PURE__*/
145
- styled.div(_templateObject || (_templateObject =
146
- /*#__PURE__*/
147
- _taggedTemplateLiteralLoose(["\n display: block;\n margin: 1.5rem 0;\n"])));
148
- var Label =
149
- /*#__PURE__*/
150
- styled.h5(_templateObject2 || (_templateObject2 =
151
- /*#__PURE__*/
152
- _taggedTemplateLiteralLoose(["\n display: block;\n font-size: 1rem;\n font-weight: normal;\n margin-bottom: 0.625rem;\n text-align: left;\n color: ", ";\n\n & > i {\n color: ", ";\n margin-left: 0.325rem;\n }\n"])), function (_ref) {
153
- var theme = _ref.theme;
154
- return theme.textStrong;
155
- }, function (_ref2) {
156
- var theme = _ref2.theme;
157
- return theme.primary;
158
- });
159
- function Field(_ref3) {
160
- var label = _ref3.label,
161
- children = _ref3.children,
162
- required = _ref3.required,
163
- rest = _objectWithoutProperties(_ref3, _excluded);
164
-
165
- return (
166
- /*#__PURE__*/
167
- React.createElement(Wrapper, rest, label &&
168
- /*#__PURE__*/
169
- React.createElement(Label, null, label, required &&
170
- /*#__PURE__*/
171
- React.createElement("i", null, "*")), children)
172
- );
173
- }
174
-
175
- function findColorInvert(_ref, color) {
176
- var black = _ref.black,
177
- white = _ref.white;
178
-
179
- if (!color || getLuminance(color) > 0.55) {
180
- return black;
181
- }
182
-
183
- return white;
184
- }
185
-
186
- var _templateObject$1;
187
- function hamburger(size) {
188
- return css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n\n cursor: pointer;\n span {\n background-color: currentColor;\n display: block;\n height: 1px;\n left: calc(50% - 8px);\n position: absolute;\n transform-origin: center;\n transition-duration: 100ms;\n transition-property: background-color, opacity, transform;\n transition-timing-function: ease-out;\n width: 16px;\n\n &:nth-child(1) {\n top: calc(50% - 6px);\n }\n &:nth-child(2) {\n top: calc(50% - 1px);\n }\n &:nth-child(3) {\n top: calc(50% + 4px);\n }\n\n &:hover {\n background-color: rgba(black, 0.05);\n }\n }\n\n &.active span {\n &:nth-child(1) {\n transform: translateY(5px) rotate(45deg);\n }\n &:nth-child(2) {\n opacity: 0;\n }\n &:nth-child(3) {\n transform: translateY(-5px) rotate(-45deg);\n }\n }\n "])), size, size);
189
- }
190
-
191
- var _templateObject$2;
192
- function boxShadow(size, color, amount) {
193
- var shadowColor = amount ? transparentize(amount, color) : color;
194
- return css(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["box-shadow: 0 0 0 ", " ", ";"])), size, shadowColor);
195
- }
196
-
197
- var _templateObject$3;
198
- function Arrow(color) {
199
- return css(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n border: 3px solid ", ";\n border-radius: 2px;\n border-right: 0;\n border-top: 0;\n content: \" \";\n display: block;\n height: 0.625em;\n margin-top: -0.625em;\n pointer-events: none;\n top: 50%;\n transform: rotate(-45deg);\n transform-origin: center;\n width: 0.625em;\n "])), color);
200
- }
201
-
202
- function setSize(name, size) {
203
- switch (size) {
204
- case 'small':
205
- return name + ": 0.75rem;";
206
-
207
- case 'medium':
208
- return name + ": 1.25rem;";
209
-
210
- case 'large':
211
- return name + ": 1.5rem;";
212
-
213
- default:
214
- return name + ": 1rem;";
215
- }
216
- }
217
-
218
- function mediaMobile(_ref) {
219
- var theme = _ref.theme;
220
- if (!theme.responsive) return '@media (max-width: 0)';
221
- return "@media screen and (max-width: " + theme.media.mobile + ")";
222
- }
223
- function mediaTablet(_ref2) {
224
- var theme = _ref2.theme;
225
- if (!theme.responsive) return '@media (max-width: 0)';
226
- return "@media screen and (max-width: " + theme.media.tablet + ")";
227
- }
228
- function mediaDesktop(_ref3) {
229
- var theme = _ref3.theme;
230
- if (!theme.responsive) return '@media (max-width: 0)';
231
- return "@media screen and (max-width: " + theme.media.desktop + ")";
232
- }
233
- function mediaFullHD(_ref4) {
234
- var theme = _ref4.theme;
235
- if (!theme.responsive) return '@media (max-width: 0)';
236
- return "@media screen and (max-width: " + theme.media.fullhd + ")";
237
- }
238
- function mediaUntilFullHD(_ref5) {
239
- var theme = _ref5.theme;
240
- if (!theme.responsive) return '@media (max-width: 0)';
241
- return "@media screen and (min-width: " + theme.media.fullhd + ")";
242
- }
243
-
244
- var _templateObject$4;
245
- function disabledColor(theme) {
246
- var textColor = transparentize(0.15, theme.textDark);
247
- var backColor = transparentize(0.55, theme.border);
248
- return css(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n pointer-events: none;\n box-shadow: none;\n color: ", ";\n background-color: ", ";\n "])), textColor, backColor);
249
- }
250
-
251
- var _templateObject$5;
252
- var Message =
253
- /*#__PURE__*/
254
- styled.small(_templateObject$5 || (_templateObject$5 =
255
- /*#__PURE__*/
256
- _taggedTemplateLiteralLoose(["\n font-size: 0.8rem;\n color: ", ";\n"])), function (_ref) {
257
- var error = _ref.error,
258
- theme = _ref.theme;
259
- return error ? theme.danger : theme.textLight;
260
- });
261
- function HelpMessage(_ref2) {
262
- var help = _ref2.help,
263
- error = _ref2.error,
264
- noErrorMessage = _ref2.noErrorMessage;
265
- if (error && !noErrorMessage) return (
266
- /*#__PURE__*/
267
- React.createElement(Message, {
268
- error: true
269
- }, error)
270
- );
271
- if (help) return (
272
- /*#__PURE__*/
273
- React.createElement(Message, null, help)
274
- );
275
- return null;
276
- }
277
-
278
- var _templateObject$6, _templateObject2$1, _templateObject3, _templateObject4, _templateObject5;
279
-
280
- var _excluded$1 = ["className", "outline", "error", "style", "help", "leftIcon", "rightIcon", "type", "maxLength", "noErrorMessage", "innerRef"];
281
-
282
- function TextInput(_ref) {
283
- var className = _ref.className,
284
- outline = _ref.outline,
285
- error = _ref.error,
286
- style = _ref.style,
287
- help = _ref.help,
288
- leftIcon = _ref.leftIcon,
289
- rightIcon = _ref.rightIcon,
290
- _ref$type = _ref.type,
291
- type = _ref$type === void 0 ? 'text' : _ref$type,
292
- _ref$maxLength = _ref.maxLength,
293
- maxLength = _ref$maxLength === void 0 ? 255 : _ref$maxLength,
294
- noErrorMessage = _ref.noErrorMessage,
295
- innerRef = _ref.innerRef,
296
- rest = _objectWithoutProperties(_ref, _excluded$1);
297
-
298
- return (
299
- /*#__PURE__*/
300
- React.createElement(Wrapper$1, {
301
- className: className,
302
- outline: outline,
303
- error: error,
304
- style: style,
305
- disabled: rest.disabled
306
- }, leftIcon &&
307
- /*#__PURE__*/
308
- React.createElement(Icon, null, leftIcon), rightIcon &&
309
- /*#__PURE__*/
310
- React.createElement(Icon, {
311
- right: true
312
- }, rightIcon),
313
- /*#__PURE__*/
314
- React.createElement("input", Object.assign({
315
- type: type,
316
- maxLength: maxLength,
317
- ref: innerRef
318
- }, rest)),
319
- /*#__PURE__*/
320
- React.createElement(HelpMessage, {
321
- help: help,
322
- error: error,
323
- noErrorMessage: noErrorMessage
324
- }))
325
- );
326
- }
327
-
328
- var index = /*#__PURE__*/
329
- forwardRef(function (props, ref) {
330
- return (
331
- /*#__PURE__*/
332
- React.createElement(TextInput, Object.assign({}, props, {
333
- innerRef: ref
334
- }))
335
- );
336
- });
337
- var rightIcon =
338
- /*#__PURE__*/
339
- css(_templateObject$6 || (_templateObject$6 =
340
- /*#__PURE__*/
341
- _taggedTemplateLiteralLoose(["\n right: 0.375em;\n & ~ input {\n padding-right: 1.555em !important;\n }\n"])));
342
- var leftIcon =
343
- /*#__PURE__*/
344
- css(_templateObject2$1 || (_templateObject2$1 =
345
- /*#__PURE__*/
346
- _taggedTemplateLiteralLoose(["\n left: 0.375em;\n & ~ input {\n padding-left: 1.55em !important;\n }\n"])));
347
- var Icon =
348
- /*#__PURE__*/
349
- styled.span(_templateObject3 || (_templateObject3 =
350
- /*#__PURE__*/
351
- _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0.375em;\n bottom: 0;\n z-index: 1;\n color: ", ";\n ", "\n\n svg, img {\n height: 1em;\n width: 1em;\n }\n"])), function (_ref2) {
352
- var theme = _ref2.theme;
353
- return theme.border;
354
- }, function (_ref3) {
355
- var right = _ref3.right;
356
- return right ? rightIcon : leftIcon;
357
- });
358
- var Wrapper$1 =
359
- /*#__PURE__*/
360
- styled.span(_templateObject4 || (_templateObject4 =
361
- /*#__PURE__*/
362
- _taggedTemplateLiteralLoose(["\n position: relative;\n display: block;\n\n input {\n max-width: 100%;\n width: 100%;\n height: 100%;\n position: relative;\n display: block;\n outline: none;\n box-shadow: none;\n appearance: none;\n text-align: left;\n color: inherit;\n\n padding: ", ";\n border: 1px solid ", ";\n ", "\n ", "\n\n transition-property: box-shadow;\n transition-duration: 150ms;\n transition-timing-function: ease-in-out;\n\n &:focus {\n border-color: ", ";\n box-shadow: ", ";\n }\n\n &:disabled, [disabled] {\n resize: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &:hover {\n input:not(:disabled):not(:focus):not(:active) {\n border-color: ", ";\n }\n ", " {\n color: ", ";\n }\n }\n\n ", "\n"])), function (_ref4) {
363
- var theme = _ref4.theme;
364
- return theme.formPadding;
365
- }, function (_ref5) {
366
- var error = _ref5.error,
367
- theme = _ref5.theme;
368
- return error ? theme.danger : theme.border;
369
- }, function (_ref6) {
370
- var outline = _ref6.outline,
371
- theme = _ref6.theme;
372
- return outline ? {
373
- borderRadius: theme.radius
374
- } : {
375
- borderRadius: 0,
376
- borderWidth: 0,
377
- borderBottomWidth: '1px'
378
- };
379
- },
380
- /*#__PURE__*/
381
- setSize('font-size'), function (_ref7) {
382
- var error = _ref7.error,
383
- theme = _ref7.theme;
384
- return error ? theme.danger : theme.primary;
385
- }, function (_ref8) {
386
- var theme = _ref8.theme,
387
- outline = _ref8.outline,
388
- error = _ref8.error;
389
- return outline ? "0 0 0 0.1em " + (error ? theme.danger : theme.primary) : "0 0.1em " + (error ? theme.danger : theme.primary);
390
- }, function (_ref9) {
391
- var theme = _ref9.theme;
392
- return theme.placeholder;
393
- }, function (_ref10) {
394
- var theme = _ref10.theme;
395
- return theme.borderHover;
396
- }, Icon, function (_ref11) {
397
- var theme = _ref11.theme;
398
- return theme.borderHover;
399
- }, function (_ref12) {
400
- var disabled = _ref12.disabled,
401
- theme = _ref12.theme;
402
- return disabled ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n input {\n ", "\n border-style: dashed;\n }\n "])), disabledColor(theme)) : undefined;
403
- });
404
-
405
- var _templateObject$7, _templateObject2$2;
406
-
407
- var _excluded$2 = ["className", "help", "error", "style", "innerRef", "noErrorMessage"];
408
-
409
- function Textarea(_ref) {
410
- var className = _ref.className,
411
- help = _ref.help,
412
- error = _ref.error,
413
- style = _ref.style,
414
- innerRef = _ref.innerRef,
415
- noErrorMessage = _ref.noErrorMessage,
416
- rest = _objectWithoutProperties(_ref, _excluded$2);
417
-
418
- return (
419
- /*#__PURE__*/
420
- React.createElement(Wrapper$2, {
421
- className: className,
422
- error: !!error,
423
- style: style,
424
- disabled: rest.disabled
425
- },
426
- /*#__PURE__*/
427
- React.createElement("textarea", Object.assign({}, rest, {
428
- ref: innerRef
429
- })),
430
- /*#__PURE__*/
431
- React.createElement(HelpMessage, {
432
- help: help,
433
- error: error,
434
- noErrorMessage: noErrorMessage
435
- }))
436
- );
437
- }
438
-
439
- var index$1 = /*#__PURE__*/
440
- forwardRef(function (props, ref) {
441
- return (
442
- /*#__PURE__*/
443
- React.createElement(Textarea, Object.assign({}, props, {
444
- innerRef: ref
445
- }))
446
- );
447
- });
448
- var Wrapper$2 =
449
- /*#__PURE__*/
450
- styled.span(_templateObject$7 || (_templateObject$7 =
451
- /*#__PURE__*/
452
- _taggedTemplateLiteralLoose(["\n display: block;\n position: relative;\n\n textarea {\n max-width: 100%;\n width: 100%;\n height: 100%;\n padding: 0.625em;\n resize: vertical;\n appearance: none;\n overflow: auto;\n outline: none;\n text-align: left;\n color: inherit;\n\n border-radius: ", ";\n border: 1px solid ", ";\n\n transition-property: box-shadow;\n transition-duration: 0.15s;\n transition-timing-function: ease-in-out;\n\n ", "\n\n &:focus {\n border-color: ", ";\n ", "\n }\n\n &:disabled, [disabled], &:readonly {\n ", "\n }\n\n &:disabled, [disabled] {\n resize: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &:hover {\n textarea:not(:disabled):not(:focus) {\n border-color: ", ";\n }\n }\n\n", "\n"])), function (_ref2) {
453
- var theme = _ref2.theme;
454
- return theme.radius;
455
- }, function (_ref3) {
456
- var theme = _ref3.theme,
457
- error = _ref3.error;
458
- return error ? theme.danger : theme.border;
459
- },
460
- /*#__PURE__*/
461
- setSize('font-size'), function (_ref4) {
462
- var theme = _ref4.theme,
463
- error = _ref4.error;
464
- return error ? theme.danger : theme.primary;
465
- }, function (_ref5) {
466
- var theme = _ref5.theme,
467
- error = _ref5.error;
468
- return boxShadow('0.1em', error ? theme.danger : theme.primary);
469
- }, function (_ref6) {
470
- var theme = _ref6.theme;
471
- return disabledColor(theme);
472
- }, function (_ref7) {
473
- var theme = _ref7.theme;
474
- return theme.placeholder;
475
- }, function (_ref8) {
476
- var theme = _ref8.theme;
477
- return theme.borderHover;
478
- }, function (_ref9) {
479
- var disabled = _ref9.disabled,
480
- theme = _ref9.theme;
481
- return disabled ? css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteralLoose(["\n textarea {\n ", "\n border-style: dashed;\n }\n "])), disabledColor(theme)) : undefined;
482
- });
483
-
484
- var isClient = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
485
-
486
- var useIsomorphicLayoutEffect = isClient ? useLayoutEffect : useEffect;
487
-
488
- var _templateObject$8, _templateObject2$3;
489
-
490
- var _excluded$3 = ["className", "children", "indeterminate"];
491
-
492
- function Approved() {
493
- return (
494
- /*#__PURE__*/
495
- React.createElement("svg", {
496
- xmlns: "http://www.w3.org/2000/svg",
497
- width: "30",
498
- height: "30",
499
- viewBox: "0 0 30 30"
500
- },
501
- /*#__PURE__*/
502
- React.createElement("path", {
503
- d: "M11.5 18.5l-3.9-4L6 16l5.6 5.6 11.6-11.5-1.7-1.6z",
504
- fill: "currentColor"
505
- }))
506
- );
507
- }
508
-
509
- function Indeterminate() {
510
- return (
511
- /*#__PURE__*/
512
- React.createElement("svg", {
513
- xmlns: "http://www.w3.org/2000/svg",
514
- width: "30",
515
- height: "30",
516
- viewBox: "0 0 30 30"
517
- },
518
- /*#__PURE__*/
519
- React.createElement("rect", {
520
- width: "20",
521
- height: "4",
522
- y: "13",
523
- x: "4.5",
524
- fill: "currentColor",
525
- stroke: "none",
526
- rx: "2"
527
- }))
528
- );
529
- }
530
-
531
- var Checkbox =
532
- /*#__PURE__*/
533
- forwardRef(function (_ref, ref) {
534
- var className = _ref.className,
535
- children = _ref.children,
536
- indeterminate = _ref.indeterminate,
537
- rest = _objectWithoutProperties(_ref, _excluded$3);
538
-
539
- var innerRef = useRef(null);
540
- var id = "checkbox_" + rest.name + "_" + rest.value;
541
- var innerClass = useMemo(function () {
542
- var arr = [];
543
- if (rest.checked || indeterminate) arr.push('checked');
544
- if (rest.disabled) arr.push('disabled');
545
- return arr.join(' ');
546
- }, [rest.checked, rest.disabled, indeterminate]); // @ts-ignore
547
-
548
- useImperativeHandle(ref, function () {
549
- return innerRef.current;
550
- });
551
- useIsomorphicLayoutEffect(function () {
552
- if (innerRef.current) {
553
- // @ts-ignore
554
- innerRef.current.indeterminate = indeterminate;
555
- }
556
- }, [indeterminate]);
557
- return (
558
- /*#__PURE__*/
559
- React.createElement(Wrapper$3, {
560
- className: className
561
- },
562
- /*#__PURE__*/
563
- React.createElement("input", Object.assign({
564
- type: "checkbox",
565
- id: id
566
- }, rest, {
567
- ref: innerRef
568
- })),
569
- /*#__PURE__*/
570
- React.createElement("label", {
571
- htmlFor: id
572
- },
573
- /*#__PURE__*/
574
- React.createElement(Shape, {
575
- className: innerClass
576
- }, indeterminate ?
577
- /*#__PURE__*/
578
- React.createElement(Indeterminate, null) :
579
- /*#__PURE__*/
580
- React.createElement(Approved, null)), children))
581
- );
582
- });
583
- Checkbox.displayName = 'Checkbox';
584
- var Shape =
585
- /*#__PURE__*/
586
- styled.div(_templateObject$8 || (_templateObject$8 =
587
- /*#__PURE__*/
588
- _taggedTemplateLiteralLoose(["\n display: inline-flex;\n margin: 0.5rem;\n width: 1.25em;\n height: 1.25em;\n background: transparent;\n border: 0.1em solid ", ";\n border-radius: ", ";\n justify-content: center;\n align-items: center;\n\n will-change: background-color;\n transition: background-color 150ms ease-out;\n\n svg {\n opacity: 0;\n stroke-width: 0.1em;\n stroke: currentColor;\n }\n\n &.checked {\n border-color: ", ";\n background-color: ", ";\n color: ", ";\n svg {\n opacity: 1;\n }\n\n &.disabled {\n color: ", ";\n }\n }\n\n &.disabled {\n background: ", ";\n border-color: ", ";\n }\n"])), function (_ref2) {
589
- var theme = _ref2.theme;
590
- return theme.border;
591
- }, function (_ref3) {
592
- var theme = _ref3.theme;
593
- return theme.radius;
594
- }, function (_ref4) {
595
- var theme = _ref4.theme;
596
- return theme.primary;
597
- }, function (_ref5) {
598
- var theme = _ref5.theme;
599
- return theme.primary;
600
- }, function (_ref6) {
601
- var theme = _ref6.theme;
602
- return theme.white;
603
- }, function (_ref7) {
604
- var theme = _ref7.theme;
605
- return transparentize(0.15, theme.textDark);
606
- }, function (_ref8) {
607
- var theme = _ref8.theme;
608
- return transparentize(0.55, theme.border);
609
- }, function (_ref9) {
610
- var theme = _ref9.theme;
611
- return theme.border;
612
- });
613
- var Wrapper$3 =
614
- /*#__PURE__*/
615
- styled.span(_templateObject2$3 || (_templateObject2$3 =
616
- /*#__PURE__*/
617
- _taggedTemplateLiteralLoose(["\n display: block;\n position: relative;\n width: auto;\n\n label {\n display: flex;\n align-items: center;\n cursor: pointer;\n padding-left: 0.625em;\n max-width: 100%;\n width: 100%;\n line-height: 1.25;\n margin-right: 0.625rem;\n }\n\n input {\n display: none;\n &:disabled + label {\n color: ", ";\n }\n }\n"])), function (_ref10) {
618
- var theme = _ref10.theme;
619
- return transparentize(0.25, theme.textDark);
620
- });
621
-
622
- function ChevronDown(props) {
623
- return (
624
- /*#__PURE__*/
625
- React.createElement("svg", Object.assign({
626
- width: "12",
627
- height: "8",
628
- viewBox: "0 0 12 8",
629
- fill: "none",
630
- xmlns: "http://www.w3.org/2000/svg"
631
- }, props),
632
- /*#__PURE__*/
633
- React.createElement("path", {
634
- d: "M10.6 0L6 4.6 1.4 0 0 1.4l6 6 6-6L10.6 0z",
635
- fill: "currentColor"
636
- }))
637
- );
638
- }
639
-
640
- var _templateObject$9, _templateObject2$4, _templateObject3$1, _templateObject4$1;
641
-
642
- var _excluded$4 = ["options", "placeholder", "render", "help", "error", "className", "inputSize", "outline", "optional", "noErrorMessage", "innerRef"];
643
-
644
- function Select(_ref) {
645
- var _ref$options = _ref.options,
646
- options = _ref$options === void 0 ? [] : _ref$options,
647
- placeholder = _ref.placeholder,
648
- render = _ref.render,
649
- help = _ref.help,
650
- error = _ref.error,
651
- className = _ref.className,
652
- inputSize = _ref.inputSize,
653
- outline = _ref.outline,
654
- optional = _ref.optional,
655
- noErrorMessage = _ref.noErrorMessage,
656
- innerRef = _ref.innerRef,
657
- rest = _objectWithoutProperties(_ref, _excluded$4);
658
-
659
- var list = useMemo(function () {
660
- return options.map(function (item) {
661
- return typeof item === 'string' ?
662
- /*#__PURE__*/
663
- React.createElement("option", {
664
- key: item,
665
- value: item
666
- }, render ? render(item) : item) :
667
- /*#__PURE__*/
668
- React.createElement("option", {
669
- key: item.id,
670
- value: item.id
671
- }, render ? render(item.name) : item.name);
672
- });
673
- }, [options, render]);
674
- return (
675
- /*#__PURE__*/
676
- React.createElement(InputWrapper, {
677
- className: className,
678
- inputSize: inputSize,
679
- outline: outline,
680
- error: !!error,
681
- disabled: rest.disabled
682
- },
683
- /*#__PURE__*/
684
- React.createElement("select", Object.assign({}, rest, {
685
- ref: innerRef
686
- }), placeholder &&
687
- /*#__PURE__*/
688
- React.createElement("option", {
689
- value: "",
690
- disabled: !optional
691
- }, placeholder), list),
692
- /*#__PURE__*/
693
- React.createElement(ChevronDown, null),
694
- /*#__PURE__*/
695
- React.createElement(HelpMessage, {
696
- help: help,
697
- error: error,
698
- noErrorMessage: noErrorMessage
699
- }))
700
- );
701
- }
702
-
703
- var index$2 = /*#__PURE__*/
704
- forwardRef(function (props, ref) {
705
- return (
706
- /*#__PURE__*/
707
- React.createElement(Select, Object.assign({}, props, {
708
- innerRef: ref
709
- }))
710
- );
711
- });
712
- var InputWrapper =
713
- /*#__PURE__*/
714
- styled.span(_templateObject$9 || (_templateObject$9 =
715
- /*#__PURE__*/
716
- _taggedTemplateLiteralLoose(["\n position: relative;\n display: block;\n\n select {\n display: block;\n cursor: pointer;\n appearance: none;\n outline: none;\n max-width: 100%;\n width: 100%;\n height: 100%;\n background-color: transparent;\n padding: ", ";\n padding-right: 1.85rem;\n text-align: left;\n color: inherit;\n\n ", "\n\n border: 1px solid ", ";\n ", "\n\n will-change: box-shadow;\n transition-property: box-shadow;\n transition-duration: 150ms;\n transition-timing-function: ease-in-out;\n\n &:hover {\n border-color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n box-shadow: ", ";\n }\n\n &::-ms-expand {\n display: none;\n }\n &:-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000;\n }\n\n &:invalid {\n color: ", ";\n }\n }\n\n svg {\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n color: ", ";\n }\n\n select:hover + svg {\n color: ", ";\n }\n\n ", "\n"])), function (_ref2) {
717
- var theme = _ref2.theme;
718
- return theme.formPadding;
719
- }, function (_ref3) {
720
- var inputSize = _ref3.inputSize;
721
- return setSize('font-size', inputSize);
722
- }, function (_ref4) {
723
- var error = _ref4.error,
724
- theme = _ref4.theme;
725
- return error ? theme.danger : theme.border;
726
- }, function (_ref5) {
727
- var outline = _ref5.outline,
728
- theme = _ref5.theme;
729
- return outline ? css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n border-radius: ", ";\n "])), theme.radius) : css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["\n border-width: 0;\n border-radius: 0;\n border-bottom-width: 1px;\n "])));
730
- }, function (_ref6) {
731
- var theme = _ref6.theme;
732
- return theme.borderHover;
733
- }, function (_ref7) {
734
- var error = _ref7.error,
735
- theme = _ref7.theme;
736
- return error ? theme.danger : theme.primary;
737
- }, function (_ref8) {
738
- var theme = _ref8.theme,
739
- outline = _ref8.outline,
740
- error = _ref8.error;
741
- return outline ? "0 0 0 0.1em " + (error ? theme.danger : theme.primary) : "0 0.1em " + (error ? theme.danger : theme.primary);
742
- }, function (_ref9) {
743
- var theme = _ref9.theme;
744
- return theme.placeholder;
745
- }, function (_ref10) {
746
- var theme = _ref10.theme;
747
- return theme.border;
748
- }, function (_ref11) {
749
- var theme = _ref11.theme;
750
- return theme.borderHover;
751
- }, function (_ref12) {
752
- var disabled = _ref12.disabled,
753
- theme = _ref12.theme;
754
- return disabled ? css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n select {\n ", "\n border-style: dashed;\n }\n svg {\n display: none;\n }\n "])), disabledColor(theme)) : undefined;
755
- });
756
-
757
- var _templateObject$a, _templateObject2$5;
758
-
759
- var _excluded$5 = ["className", "style", "children", "innerRef"];
760
-
761
- function Radio(_ref) {
762
- var className = _ref.className,
763
- style = _ref.style,
764
- children = _ref.children,
765
- innerRef = _ref.innerRef,
766
- rest = _objectWithoutProperties(_ref, _excluded$5);
767
-
768
- var id = "radio_" + rest.name + "_" + rest.value;
769
- var innerClass = useMemo(function () {
770
- var arr = [];
771
- if (rest.checked) arr.push('checked');
772
- if (rest.disabled) arr.push('disabled');
773
- return arr.join(' ');
774
- }, [rest.checked, rest.disabled]);
775
- return (
776
- /*#__PURE__*/
777
- React.createElement(Wrapper$4, {
778
- className: className,
779
- style: style
780
- },
781
- /*#__PURE__*/
782
- React.createElement("label", {
783
- htmlFor: id
784
- },
785
- /*#__PURE__*/
786
- React.createElement(Shape$1, {
787
- className: innerClass
788
- },
789
- /*#__PURE__*/
790
- React.createElement("i", null)), children),
791
- /*#__PURE__*/
792
- React.createElement("input", Object.assign({
793
- id: id,
794
- type: "radio"
795
- }, rest, {
796
- ref: innerRef
797
- })))
798
- );
799
- }
800
-
801
- var index$3 = /*#__PURE__*/
802
- forwardRef(function (props, ref) {
803
- return (
804
- /*#__PURE__*/
805
- React.createElement(Radio, Object.assign({}, props, {
806
- innerRef: ref
807
- }))
808
- );
809
- });
810
- var Shape$1 =
811
- /*#__PURE__*/
812
- styled.div(_templateObject$a || (_templateObject$a =
813
- /*#__PURE__*/
814
- _taggedTemplateLiteralLoose(["\n display: inline-flex;\n margin: 0.5rem;\n width: 1.25em;\n height: 1.25em;\n background: transparent;\n border: 0.1em solid ", ";\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n\n will-change: background-color, border-color;\n transition-property: background-color, border-color;\n transition-duration: 150ms;\n transition-timing-function: ease-out;\n\n &.checked {\n border-color: ", ";\n & > i {\n transform: scale(1);\n }\n\n &.disabled > i {\n background-color: ", ";\n }\n }\n\n &.disabled {\n background: ", ";\n border-color: ", ";\n }\n\n & > i {\n display: block;\n width: 0.5em;\n height: 0.5em;\n background: ", ";\n border: none;\n transform: scale(0);\n border-radius: 50%;\n\n will-change: transform;\n transition: transform 150ms ease-out;\n }\n"])), function (_ref2) {
815
- var theme = _ref2.theme;
816
- return theme.border;
817
- }, function (_ref3) {
818
- var theme = _ref3.theme;
819
- return theme.primary;
820
- }, function (_ref4) {
821
- var theme = _ref4.theme;
822
- return transparentize(0.15, theme.textDark);
823
- }, function (_ref5) {
824
- var theme = _ref5.theme;
825
- return transparentize(0.55, theme.border);
826
- }, function (_ref6) {
827
- var theme = _ref6.theme;
828
- return theme.border;
829
- }, function (_ref7) {
830
- var theme = _ref7.theme;
831
- return theme.primary;
832
- });
833
- var Wrapper$4 =
834
- /*#__PURE__*/
835
- styled.span(_templateObject2$5 || (_templateObject2$5 =
836
- /*#__PURE__*/
837
- _taggedTemplateLiteralLoose(["\n display: block;\n width: auto;\n\n label {\n cursor: pointer;\n max-width: 100%;\n width: 100%;\n line-height: 1.25;\n margin-right: 0.625rem;\n display: flex;\n align-items: center;\n\n &:hover > div:not(.checked):not(.disabled) {\n border-color: ", ";\n }\n }\n\n input {\n display: none;\n }\n"])), function (_ref8) {
838
- var theme = _ref8.theme;
839
- return theme.borderHover;
840
- });
841
-
842
- var _templateObject$b, _templateObject2$6, _templateObject3$2;
843
-
844
- var _excluded$6 = ["className", "showLabel", "background", "anchorColor", "onLabel", "offLabel", "innerRef"];
845
-
846
- function Switch(_ref) {
847
- var className = _ref.className,
848
- showLabel = _ref.showLabel,
849
- background = _ref.background,
850
- anchorColor = _ref.anchorColor,
851
- _ref$onLabel = _ref.onLabel,
852
- onLabel = _ref$onLabel === void 0 ? 'ON' : _ref$onLabel,
853
- _ref$offLabel = _ref.offLabel,
854
- offLabel = _ref$offLabel === void 0 ? 'OFF' : _ref$offLabel,
855
- innerRef = _ref.innerRef,
856
- rest = _objectWithoutProperties(_ref, _excluded$6);
857
-
858
- var id = "switch_" + rest.name;
859
- return (
860
- /*#__PURE__*/
861
- React.createElement(Wrapper$5, {
862
- className: className,
863
- showLabel: showLabel,
864
- background: background,
865
- anchorColor: anchorColor,
866
- labelTextOn: onLabel,
867
- labelTextOff: offLabel,
868
- disabled: rest.disabled
869
- },
870
- /*#__PURE__*/
871
- React.createElement("input", Object.assign({
872
- id: id,
873
- type: "checkbox"
874
- }, rest, {
875
- ref: innerRef
876
- })),
877
- /*#__PURE__*/
878
- React.createElement("label", {
879
- htmlFor: id,
880
- "aria-label": id
881
- }))
882
- );
883
- }
884
-
885
- var index$4 = /*#__PURE__*/
886
- forwardRef(function (props, ref) {
887
- return (
888
- /*#__PURE__*/
889
- React.createElement(Switch, Object.assign({}, props, {
890
- innerRef: ref
891
- }))
892
- );
893
- });
894
- var labelStyle =
895
- /*#__PURE__*/
896
- css(_templateObject$b || (_templateObject$b =
897
- /*#__PURE__*/
898
- _taggedTemplateLiteralLoose(["\n label:before {\n position: absolute;\n display: block;\n content: '", "';\n top: 0.5rem;\n right: 0.6875rem;\n font-size: 0.825rem;\n line-height: 0.825rem;\n color: ", ";\n }\n\n input:checked ~ label:before {\n content: '", "';\n right: unset;\n left: 0.6875rem;\n color: ", ";\n }\n"])), function (_ref2) {
899
- var offLabel = _ref2.offLabel;
900
- return offLabel;
901
- }, function (_ref3) {
902
- var theme = _ref3.theme;
903
- return theme.textLight;
904
- }, function (_ref4) {
905
- var onLabel = _ref4.onLabel;
906
- return onLabel;
907
- }, function (_ref5) {
908
- var theme = _ref5.theme;
909
- return findColorInvert(theme, theme.primary);
910
- });
911
- var Wrapper$5 =
912
- /*#__PURE__*/
913
- styled.span(_templateObject2$6 || (_templateObject2$6 =
914
- /*#__PURE__*/
915
- _taggedTemplateLiteralLoose(["\n display: inline-block;\n cursor: pointer;\n line-height: 1.25;\n position: relative;\n\n input {\n display: none;\n }\n\n label {\n position: relative;\n display: block;\n height: 1.875rem;\n min-width: 5rem;\n background: transparent;\n border: 1px solid ", ";\n border-radius: 1.25rem;\n cursor: pointer;\n will-change: background-color;\n transition: background-color 300ms ease;\n box-shadow: inset 0 0.25rem 0.25rem rgba(0,0,0,0.05);\n\n &:after {\n position: absolute;\n display: block;\n left: 0.375rem;\n top: 0.2rem;\n width: 1.375rem;\n height: 1.375rem;\n border-radius: 100%;\n background: ", ";\n content: '';\n text-align: right;\n border: 1px solid ", ";\n will-change: left;\n transition: left 300ms ease;\n box-shadow: 0 0 0.375rem rgba(0,0,0,0.1);\n }\n }\n\n input:checked ~ label {\n background: ", ";\n box-shadow: inset 0 0.25rem 0.25rem rgba(0,0,0,0.15);\n &:after {\n left: calc(100% - 1.75rem);\n box-shadow: 0 0 0.375rem rgba(0,0,0,0.15);\n }\n }\n\n ", "\n ", "\n"])), function (_ref6) {
916
- var theme = _ref6.theme;
917
- return theme.border;
918
- }, function (_ref7) {
919
- var theme = _ref7.theme,
920
- anchorColor = _ref7.anchorColor;
921
- return anchorColor || theme.white;
922
- }, function (_ref8) {
923
- var theme = _ref8.theme;
924
- return theme.border;
925
- }, function (_ref9) {
926
- var theme = _ref9.theme,
927
- background = _ref9.background;
928
- return background || theme.primary;
929
- }, function (_ref10) {
930
- var showLabel = _ref10.showLabel;
931
- return showLabel ? labelStyle : undefined;
932
- }, function (_ref11) {
933
- var disabled = _ref11.disabled,
934
- theme = _ref11.theme;
935
- return disabled ? css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["\n cursor: default;\n\n label {\n ", "\n\n &:after {\n background: ", ";\n }\n }\n\n input:checked ~ label {\n background: ", ";\n }\n "])), disabledColor(theme), theme.disabled, theme.grey) : undefined;
936
- });
937
-
938
- var _templateObject$c;
939
-
940
- var _excluded$7 = ["header", "show", "children", "timeout"];
941
- function Accordion(_ref) {
942
- var header = _ref.header,
943
- show = _ref.show,
944
- children = _ref.children,
945
- _ref$timeout = _ref.timeout,
946
- timeout = _ref$timeout === void 0 ? 300 : _ref$timeout,
947
- rest = _objectWithoutProperties(_ref, _excluded$7);
948
-
949
- var ref = useRef(null);
950
- var prevHeight = useRef(0);
951
- var timeoutRef = useRef(0);
952
- var init = useRef(true);
953
- useEffect(function () {
954
- timeoutRef.current = timeout;
955
- }, [timeout]);
956
- useIsomorphicLayoutEffect(function () {
957
- if (!ref.current) return;
958
- ref.current.style.overflow = 'hidden';
959
- ref.current.style.opacity = '1';
960
-
961
- if (init.current) {
962
- init.current = false;
963
- ref.current.style.height = show ? 'auto' : '0px';
964
-
965
- if (show) {
966
- // cache prev calculated height after 1 frame draw
967
- requestAnimationFrame(function () {
968
- if (ref.current) {
969
- prevHeight.current = ref.current.offsetHeight;
970
- }
971
- });
972
- } else {
973
- // explicitly calculate auto height
974
- requestAnimationFrame(function () {
975
- if (ref.current) {
976
- ref.current.style.height = 'auto';
977
- prevHeight.current = ref.current.offsetHeight;
978
- ref.current.style.height = '0px';
979
- }
980
- });
981
- ref.current.style.opacity = '0';
982
- }
983
-
984
- return;
985
- }
986
-
987
- if (!show) {
988
- ref.current.style.height = prevHeight.current + "px";
989
- }
990
-
991
- var frameIds = [];
992
- frameIds[0] = requestAnimationFrame(function () {
993
- frameIds[1] = requestAnimationFrame(function () {
994
- if (!ref.current) return;
995
- ref.current.style.height = (show ? prevHeight.current : 0) + "px";
996
- ref.current.style.opacity = show ? '1' : '0';
997
- });
998
- });
999
- var timeoutId = setTimeout(function () {
1000
- if (!ref.current) return;
1001
-
1002
- if (show) {
1003
- ref.current.style.height = 'auto';
1004
- ref.current.style.overflow = '';
1005
- ref.current.style.opacity = ''; // cache prev calculated height after 1 frame draw
1006
-
1007
- requestAnimationFrame(function () {
1008
- if (ref.current) {
1009
- prevHeight.current = ref.current.offsetHeight;
1010
- }
1011
- });
1012
- } else {
1013
- ref.current.style.height = '0px';
1014
- }
1015
- }, timeoutRef.current);
1016
- return function () {
1017
- frameIds.forEach(cancelAnimationFrame);
1018
- clearTimeout(timeoutId);
1019
- };
1020
- }, [show]);
1021
- return (
1022
- /*#__PURE__*/
1023
- React.createElement("div", rest, header,
1024
- /*#__PURE__*/
1025
- React.createElement(AnimatedContent, {
1026
- "aria-hidden": !show,
1027
- ref: ref,
1028
- style: {
1029
- transitionDuration: timeout + "ms"
1030
- }
1031
- }, children))
1032
- );
1033
- }
1034
- var AnimatedContent =
1035
- /*#__PURE__*/
1036
- styled.div(_templateObject$c || (_templateObject$c =
1037
- /*#__PURE__*/
1038
- _taggedTemplateLiteralLoose(["\n will-change: opacity, height, transform;\n transition-property: opacity, height, transform;\n transition-timing-function: ease-in-out;\n"])));
1039
-
1040
- function setAlign(_ref) {
1041
- var align = _ref.align;
1042
-
1043
- switch (align) {
1044
- case 'left':
1045
- return 'flex-start';
1046
-
1047
- case 'right':
1048
- return 'flex-end';
1049
-
1050
- case 'center':
1051
- return 'center';
1052
-
1053
- default:
1054
- return 'space-evenly';
1055
- }
1056
- }
1057
-
1058
- var _templateObject$d, _templateObject2$7, _templateObject3$3, _templateObject4$2, _templateObject5$1;
1059
-
1060
- var _excluded$8 = ["children", "align", "brand"];
1061
- function AppBar(_ref) {
1062
- var children = _ref.children,
1063
- align = _ref.align,
1064
- brand = _ref.brand,
1065
- rest = _objectWithoutProperties(_ref, _excluded$8);
1066
-
1067
- var _useState = useState(false),
1068
- _useState2 = _slicedToArray(_useState, 2),
1069
- show = _useState2[0],
1070
- setShow = _useState2[1];
1071
-
1072
- var toggleMenu = function toggleMenu() {
1073
- return setShow(!show);
1074
- };
1075
-
1076
- return (
1077
- /*#__PURE__*/
1078
- React.createElement(NavBar, Object.assign({
1079
- role: "navigation"
1080
- }, rest),
1081
- /*#__PURE__*/
1082
- React.createElement("nav", null, brand, children &&
1083
- /*#__PURE__*/
1084
- React.createElement(Burger, {
1085
- className: show ? 'active' : undefined,
1086
- onClick: toggleMenu
1087
- },
1088
- /*#__PURE__*/
1089
- React.createElement("span", null),
1090
- /*#__PURE__*/
1091
- React.createElement("span", null),
1092
- /*#__PURE__*/
1093
- React.createElement("span", null)),
1094
- /*#__PURE__*/
1095
- React.createElement(NavContent, {
1096
- className: show ? 'active' : undefined,
1097
- align: align
1098
- }, children)))
1099
- );
1100
- }
1101
-
1102
- function setColor(_ref2) {
1103
- var color = _ref2.color,
1104
- theme = _ref2.theme,
1105
- backdrop = _ref2.backdrop;
1106
- var backgroundColor = color ? theme[color] : 'transparent';
1107
- var textColor = findColorInvert(theme, backgroundColor === 'transparent' ? theme.background : backgroundColor);
1108
-
1109
- if (backdrop) {
1110
- var backColor = transparentize(0.2, backgroundColor === 'transparent' ? theme.white : backgroundColor);
1111
- return css(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n color: ", ";\n "])), backColor, textColor);
1112
- }
1113
-
1114
- return css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["background-color: ", "; color: ", ";"])), backgroundColor, textColor);
1115
- }
1116
-
1117
- var NavBar =
1118
- /*#__PURE__*/
1119
- styled.header(_templateObject3$3 || (_templateObject3$3 =
1120
- /*#__PURE__*/
1121
- _taggedTemplateLiteralLoose(["\n position: ", ";\n display: flex;\n top: -1px;\n min-height: 3.25rem;\n width: 100%;\n z-index: 30;\n\n padding: ", ";\n\n & > nav {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n flex: 1 0 auto;\n }\n\n ", "\n\n a { color: inherit; }\n\n ", " {\n padding: ", ";\n }\n"])), function (_ref3) {
1122
- var fixed = _ref3.fixed,
1123
- sticky = _ref3.sticky;
1124
- if (sticky) return 'sticky';
1125
- if (fixed) return 'fixed';
1126
- return 'relative';
1127
- }, function (_ref4) {
1128
- var fluid = _ref4.fluid;
1129
- return fluid ? '0 0.75rem' : '0 5%';
1130
- }, setColor, mediaTablet, function (_ref5) {
1131
- var fluid = _ref5.fluid;
1132
- return fluid ? '0 0.5rem' : '0 3%';
1133
- });
1134
- var Burger =
1135
- /*#__PURE__*/
1136
- styled.button(_templateObject4$2 || (_templateObject4$2 =
1137
- /*#__PURE__*/
1138
- _taggedTemplateLiteralLoose(["\n ", "\n display: none;\n margin-left: auto;\n border: none;\n background-color: transparent;\n color: inherit;\n\n outline: none;\n\n &:hover{\n background-color: rgba(0, 0, 0, .05);\n }\n\n ", " {\n display: block;\n }\n"])),
1139
- /*#__PURE__*/
1140
- hamburger('3.25rem'), mediaMobile);
1141
- var NavContent =
1142
- /*#__PURE__*/
1143
- styled.div(_templateObject5$1 || (_templateObject5$1 =
1144
- /*#__PURE__*/
1145
- _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-basis: auto;\n flex-grow: 1;\n height: 100%;\n\n & > ul {\n display: flex;\n flex-direction: row;\n list-style: none;\n flex-grow: 1;\n flex-basis: 100%;\n height: inherit;\n align-items: center;\n justify-content: ", ";\n\n li {\n padding: 0.85rem;\n }\n }\n\n & > div, & > span, & > form {\n display: flex;\n ", "\n }\n\n ", " {\n width: 100%;\n flex-direction: column;\n align-items: flex-start;\n height: auto;\n\n padding-bottom: 0.5rem;\n\n &:not(.active) {\n display:none;\n }\n\n & > ul {\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n flex-basis: auto;\n li {\n padding: .5rem 0;\n }\n }\n\n & > div, & > span, & > form {\n padding: .5rem 0;\n width: 100%;\n }\n }\n"])), setAlign, function (_ref6) {
1146
- var color = _ref6.color;
1147
- return color ? "color: " + color + ";" : '';
1148
- }, mediaMobile);
1149
-
1150
- var Portal =
1151
- /*#__PURE__*/
1152
- React.forwardRef(function (_ref, ref) {
1153
- var children = _ref.children,
1154
- container = _ref.container,
1155
- disabled = _ref.disabled;
1156
-
1157
- var _useState = useState(null),
1158
- _useState2 = _slicedToArray(_useState, 2),
1159
- mountNode = _useState2[0],
1160
- setMountNode = _useState2[1];
1161
-
1162
- useIsomorphicLayoutEffect(function () {
1163
- if (disabled) {
1164
- setMountNode(null);
1165
- return;
1166
- }
1167
-
1168
- if (!container) {
1169
- var dom = document.getElementById('visits-style-portals');
1170
-
1171
- if (!dom) {
1172
- dom = document.createElement('div');
1173
- dom.id = 'visits-style-portals';
1174
- document.body.appendChild(dom);
1175
- }
1176
-
1177
- setMountNode(dom);
1178
- return;
1179
- }
1180
-
1181
- setMountNode(container);
1182
- }, [container, disabled]);
1183
- return mountNode ?
1184
- /*#__PURE__*/
1185
- createPortal(children, mountNode) : mountNode;
1186
- });
1187
- Portal.displayName = 'Portal';
1188
-
1189
- function usePopper(referenceElement, popperElement, options) {
1190
- if (options === void 0) {
1191
- options = {};
1192
- }
1193
-
1194
- var instance = useRef(null);
1195
- var popperOptions = useMemo(function () {
1196
- return {
1197
- placement: options.placement || 'bottom',
1198
- strategy: options.strategy || 'absolute',
1199
- modifiers: [{
1200
- name: 'preventOverflow',
1201
- enabled: true
1202
- }, options.offset && {
1203
- name: 'offset',
1204
- options: {
1205
- offset: [options.offset.x, options.offset.y]
1206
- }
1207
- }].filter(Boolean)
1208
- };
1209
- }, [options.placement, options.strategy, options.offset]);
1210
- useIsomorphicLayoutEffect(function () {
1211
- if (instance.current) {
1212
- instance.current.setOptions(popperOptions);
1213
- }
1214
- }, [popperOptions]);
1215
- useIsomorphicLayoutEffect(function () {
1216
- return function () {
1217
- if (instance.current) {
1218
- instance.current.destroy();
1219
- instance.current = null;
1220
- }
1221
- };
1222
- }, []);
1223
- var open = useCallback(function () {
1224
- if (instance.current) {
1225
- instance.current.destroy();
1226
- instance.current = null;
1227
- }
1228
-
1229
- if (referenceElement == null || popperElement == null) {
1230
- return;
1231
- }
1232
-
1233
- var refEl = // @ts-ignore
1234
- 'current' in referenceElement ? referenceElement.current : referenceElement; // @ts-ignore
1235
-
1236
- var pEl = 'current' in popperElement ? popperElement.current : popperElement;
1237
- if (refEl === null || pEl === null) return;
1238
- instance.current = createPopper(refEl, pEl, popperOptions); // eslint-disable-next-line react-hooks/exhaustive-deps
1239
- }, [popperOptions]);
1240
- var close = useCallback(function () {
1241
- if (instance.current) {
1242
- instance.current.destroy();
1243
- instance.current = null;
1244
- }
1245
- }, []);
1246
- return [open, close];
1247
- }
1248
-
1249
- function wrapEvent(child, handlerName, ourHandler) {
1250
- return function (event) {
1251
- if (typeof child !== 'string' && child.props[handlerName]) {
1252
- child.props[handlerName](event);
1253
- }
1254
-
1255
- if (!event.defaultPrevented) {
1256
- return ourHandler(event);
1257
- }
1258
- };
1259
- }
1260
-
1261
- var _templateObject$e;
1262
- function Tooltip(_ref) {
1263
- var children = _ref.children,
1264
- _ref$position = _ref.position,
1265
- position = _ref$position === void 0 ? 'bottom' : _ref$position,
1266
- label = _ref.label,
1267
- color = _ref.color,
1268
- _ref$className = _ref.className,
1269
- className = _ref$className === void 0 ? '' : _ref$className,
1270
- _ref$offset = _ref.offset,
1271
- offset = _ref$offset === void 0 ? {
1272
- x: 0,
1273
- y: 6
1274
- } : _ref$offset;
1275
- var parent = useRef(null);
1276
- var tooltip = useRef(null);
1277
-
1278
- var _useState = useState(false),
1279
- _useState2 = _slicedToArray(_useState, 2),
1280
- open = _useState2[0],
1281
- setOpen = _useState2[1];
1282
-
1283
- var _usePopper = usePopper(parent, tooltip, {
1284
- placement: position,
1285
- offset: offset
1286
- }),
1287
- _usePopper2 = _slicedToArray(_usePopper, 2),
1288
- openPopper = _usePopper2[0],
1289
- closePopper = _usePopper2[1];
1290
-
1291
- var handleOpen = function handleOpen() {
1292
- setOpen(true);
1293
- requestAnimationFrame(openPopper);
1294
- };
1295
-
1296
- var handleClose = function handleClose() {
1297
- setOpen(false);
1298
- closePopper();
1299
- };
1300
-
1301
- var child = typeof children === 'string' ?
1302
- /*#__PURE__*/
1303
- React.createElement("span", null, children) : children;
1304
- return (
1305
- /*#__PURE__*/
1306
- React.createElement(React.Fragment, null,
1307
- /*#__PURE__*/
1308
- cloneElement(Children.only(child), {
1309
- ref: parent,
1310
- onMouseEnter: wrapEvent(child, 'onMouseEnter', handleOpen),
1311
- onMouseLeave: wrapEvent(child, 'onMouseLeave', handleClose),
1312
- onFocus: wrapEvent(child, 'onFocus', handleOpen),
1313
- onBlur: wrapEvent(child, 'onBlur', handleClose)
1314
- }), open &&
1315
- /*#__PURE__*/
1316
- React.createElement(Portal, null,
1317
- /*#__PURE__*/
1318
- React.createElement(TooltipWrapper, {
1319
- className: className,
1320
- ref: tooltip,
1321
- role: "tooltip",
1322
- color: color
1323
- }, label)))
1324
- );
1325
- }
1326
- var TooltipWrapper =
1327
- /*#__PURE__*/
1328
- styled.div(_templateObject$e || (_templateObject$e =
1329
- /*#__PURE__*/
1330
- _taggedTemplateLiteralLoose(["\n position: relative;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n z-index: 9999;\n padding: 0.375rem 0.625rem;\n cursor: default;\n white-space: pre;\n font-size: 0.85rem;\n z-index: 9999;\n\n background-color: ", ";\n"])), function (_ref2) {
1331
- var color = _ref2.color,
1332
- theme = _ref2.theme;
1333
- return color ? theme[color] || theme.background : theme.background;
1334
- });
1335
-
1336
- var _templateObject$f;
1337
- var Box = /*#__PURE__*/
1338
- styled.div(_templateObject$f || (_templateObject$f =
1339
- /*#__PURE__*/
1340
- _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n flex-direction: column;\n border: ", ";\n border-radius: ", ";\n width: 100%;\n\n min-width: 0;\n word-wrap: break-word;\n\n ", "\n"])), function (_ref) {
1341
- var borderless = _ref.borderless,
1342
- theme = _ref.theme;
1343
- return borderless ? 'none' : "1px solid " + theme.border;
1344
- }, function (_ref2) {
1345
- var theme = _ref2.theme;
1346
- return theme.radius;
1347
- }, function (_ref3) {
1348
- var color = _ref3.color,
1349
- theme = _ref3.theme;
1350
- if (!color) return undefined;
1351
- var target = theme[color] || color;
1352
- var invertColor = findColorInvert(theme, target);
1353
- return {
1354
- backgroundColor: target,
1355
- color: invertColor
1356
- };
1357
- });
1358
-
1359
- var _excluded$9 = ["image", "title", "children", "horizontal", "footer", "color", "style"];
1360
-
1361
- var _templateObject$g, _templateObject2$8, _templateObject3$4, _templateObject4$3, _templateObject5$2;
1362
- var CardBody =
1363
- /*#__PURE__*/
1364
- styled.div(_templateObject$g || (_templateObject$g =
1365
- /*#__PURE__*/
1366
- _taggedTemplateLiteralLoose(["\n padding: 1.25rem;\n margin: 0;\n"])));
1367
- var CardHeader =
1368
- /*#__PURE__*/
1369
- styled.header(_templateObject2$8 || (_templateObject2$8 =
1370
- /*#__PURE__*/
1371
- _taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0.5rem 1.5rem;\n min-height: 3.5rem;\n border-bottom: 1px solid ", ";\n align-items: center;\n justify-content: space-between;\n"])), function (_ref) {
1372
- var theme = _ref.theme;
1373
- return theme.border;
1374
- });
1375
- var CardFooter =
1376
- /*#__PURE__*/
1377
- styled.footer(_templateObject3$4 || (_templateObject3$4 =
1378
- /*#__PURE__*/
1379
- _taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0.5rem 1.5rem;\n min-height: 3.5rem;\n border-top: 1px solid ", ";\n align-items: center;\n justify-content: space-between;\n"])), function (_ref2) {
1380
- var theme = _ref2.theme;
1381
- return theme.border;
1382
- });
1383
- var CardImage =
1384
- /*#__PURE__*/
1385
- styled.a(_templateObject4$3 || (_templateObject4$3 =
1386
- /*#__PURE__*/
1387
- _taggedTemplateLiteralLoose(["\n width: 100%;\n\n img {\n width: 100%;\n padding: 0;\n margin: 0;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n }\n"])));
1388
- var CardImageHorizontal =
1389
- /*#__PURE__*/
1390
- styled.a(_templateObject5$2 || (_templateObject5$2 =
1391
- /*#__PURE__*/
1392
- _taggedTemplateLiteralLoose(["\n flex: 0 0 30%;\n min-width: 5rem;\n width: 30%;\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n\n background: no-repeat center/cover;\n ", "\n"])), function (_ref3) {
1393
- var url = _ref3.url;
1394
- return url ? {
1395
- backgroundImage: "url(" + url + ")"
1396
- } : undefined;
1397
- });
1398
- function Card(_ref4) {
1399
- var image = _ref4.image,
1400
- title = _ref4.title,
1401
- children = _ref4.children,
1402
- horizontal = _ref4.horizontal,
1403
- footer = _ref4.footer,
1404
- color = _ref4.color,
1405
- _ref4$style = _ref4.style,
1406
- style = _ref4$style === void 0 ? {} : _ref4$style,
1407
- rest = _objectWithoutProperties(_ref4, _excluded$9);
1408
-
1409
- var header = useMemo(function () {
1410
- if (image && !horizontal) return (
1411
- /*#__PURE__*/
1412
- React.createElement(CardImage, null,
1413
- /*#__PURE__*/
1414
- React.createElement("img", {
1415
- src: image,
1416
- alt: ""
1417
- }))
1418
- );
1419
- if (image && horizontal) return (
1420
- /*#__PURE__*/
1421
- React.createElement(CardImageHorizontal, {
1422
- url: image
1423
- })
1424
- );
1425
- if (title && !horizontal) return (
1426
- /*#__PURE__*/
1427
- React.createElement(CardHeader, null,
1428
- /*#__PURE__*/
1429
- React.createElement("h3", null, title))
1430
- );
1431
- return null;
1432
- }, [image, title, horizontal]);
1433
- var styles = useMemo(function () {
1434
- return _objectSpread2({
1435
- flexDirection: horizontal ? 'row' : 'column'
1436
- }, style);
1437
- }, [style, horizontal]);
1438
- return (
1439
- /*#__PURE__*/
1440
- React.createElement(Box, Object.assign({
1441
- color: color
1442
- }, rest, {
1443
- style: styles
1444
- }), header,
1445
- /*#__PURE__*/
1446
- React.createElement(CardBody, null, children), footer &&
1447
- /*#__PURE__*/
1448
- React.createElement(CardFooter, null, React.Children.only(footer)))
1449
- );
1450
- }
1451
-
1452
- var _templateObject$h, _templateObject2$9;
1453
-
1454
- var _excluded$a = ["position", "label", "children", "color", "onOpen", "onClose", "disabled", "className", "offset"];
1455
-
1456
- function stopPropagation(e) {
1457
- if (!e) return;
1458
- e.stopPropagation();
1459
- }
1460
-
1461
- var Popover =
1462
- /*#__PURE__*/
1463
- forwardRef(function (_ref, ref) {
1464
- var position = _ref.position,
1465
- label = _ref.label,
1466
- children = _ref.children,
1467
- _ref$color = _ref.color,
1468
- color = _ref$color === void 0 ? 'background' : _ref$color,
1469
- onOpen = _ref.onOpen,
1470
- onClose = _ref.onClose,
1471
- disabled = _ref.disabled,
1472
- _ref$className = _ref.className,
1473
- className = _ref$className === void 0 ? '' : _ref$className,
1474
- _ref$offset = _ref.offset,
1475
- offset = _ref$offset === void 0 ? {
1476
- x: 0,
1477
- y: 6
1478
- } : _ref$offset,
1479
- rest = _objectWithoutProperties(_ref, _excluded$a);
1480
-
1481
- var parent = useRef(null);
1482
- var popover = useRef(null);
1483
-
1484
- var _useState = useState(false),
1485
- _useState2 = _slicedToArray(_useState, 2),
1486
- open = _useState2[0],
1487
- setOpen = _useState2[1];
1488
-
1489
- var _usePopper = usePopper(parent, popover, {
1490
- placement: position,
1491
- offset: offset
1492
- }),
1493
- _usePopper2 = _slicedToArray(_usePopper, 2),
1494
- openPopper = _usePopper2[0],
1495
- closePopper = _usePopper2[1];
1496
-
1497
- var handleFocus = function handleFocus(e) {
1498
- stopPropagation(e);
1499
- setOpen(true);
1500
- requestAnimationFrame(openPopper);
1501
- if (onOpen) onOpen();
1502
- };
1503
-
1504
- var handleBlur = function handleBlur(e) {
1505
- stopPropagation(e);
1506
- closePopper();
1507
- setOpen(false);
1508
- if (onClose) onClose();
1509
- };
1510
-
1511
- useEffect(function () {
1512
- if (disabled && open) {
1513
- closePopper();
1514
- setOpen(false);
1515
- }
1516
- }, [disabled, open, closePopper]);
1517
- useImperativeHandle(ref, function () {
1518
- return {
1519
- open: handleFocus,
1520
- close: handleBlur
1521
- };
1522
- });
1523
- return (
1524
- /*#__PURE__*/
1525
- React.createElement(React.Fragment, null,
1526
- /*#__PURE__*/
1527
- cloneElement(Children.only(label), {
1528
- ref: parent,
1529
- tabIndex: 0,
1530
- role: 'button',
1531
- onClick: wrapEvent(label, 'onClick', handleFocus),
1532
- disabled: disabled
1533
- }), open &&
1534
- /*#__PURE__*/
1535
- React.createElement(Portal, null,
1536
- /*#__PURE__*/
1537
- React.createElement(Tooltip$1, Object.assign({
1538
- role: "tooltip",
1539
- className: className,
1540
- ref: popover,
1541
- color: color,
1542
- onClick: stopPropagation
1543
- }, rest), children),
1544
- /*#__PURE__*/
1545
- React.createElement(Shadow, {
1546
- onClick: handleBlur,
1547
- "data-testid": "visits-style-shadow"
1548
- })))
1549
- );
1550
- });
1551
- Popover.displayName = 'Popover';
1552
- var Tooltip$1 =
1553
- /*#__PURE__*/
1554
- styled(Box)(_templateObject$h || (_templateObject$h =
1555
- /*#__PURE__*/
1556
- _taggedTemplateLiteralLoose(["\n display: flex;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n padding: 0.5rem 0;\n width: auto;\n height: auto;\n cursor: auto;\n z-index: 40;\n"])));
1557
- var Shadow =
1558
- /*#__PURE__*/
1559
- styled.div(_templateObject2$9 || (_templateObject2$9 =
1560
- /*#__PURE__*/
1561
- _taggedTemplateLiteralLoose(["\n position: fixed;\n z-index: 38;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n"])));
1562
-
1563
- var fixedNum = 0;
1564
- function useScrollFix(show) {
1565
- useIsomorphicLayoutEffect(function () {
1566
- if (show) {
1567
- document.body.style.overflowY = 'hidden';
1568
- fixedNum += 1;
1569
- return function () {
1570
- if (fixedNum <= 1) {
1571
- document.body.style.overflowY = 'auto';
1572
- fixedNum = 0;
1573
- } else {
1574
- fixedNum -= 1;
1575
- }
1576
- };
1577
- }
1578
-
1579
- return undefined;
1580
- }, [show]);
1581
- }
1582
-
1583
- var _excluded$b = ["show", "children", "timeout", "color", "closeModal", "external", "className", "closeOnOverlay", "closeOnEsc", "onExited"];
1584
-
1585
- var _templateObject$i, _templateObject2$a, _templateObject3$5;
1586
-
1587
- var Shadow$1 =
1588
- /*#__PURE__*/
1589
- styled.div(_templateObject$i || (_templateObject$i =
1590
- /*#__PURE__*/
1591
- _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n"])));
1592
- var Wrapper$6 =
1593
- /*#__PURE__*/
1594
- styled(Shadow$1)(_templateObject2$a || (_templateObject2$a =
1595
- /*#__PURE__*/
1596
- _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index: 9997;\n overflow-y: auto;\n overflow-x: hidden;\n background-color: ", ";\n padding: 0.85rem;\n"])), function (_ref) {
1597
- var theme = _ref.theme;
1598
- return theme.backdrop;
1599
- });
1600
- var AnimatedBox =
1601
- /*#__PURE__*/
1602
- styled(Box)(_templateObject3$5 || (_templateObject3$5 =
1603
- /*#__PURE__*/
1604
- _taggedTemplateLiteralLoose(["\n width: auto;\n margin: auto;\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: auto;\n z-index: 100;\n\n will-change: transform, opacity;\n transition-property: transform, opacity;\n transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n transition-duration: 200ms;\n\n opacity: 0;\n transform: scale(0.8);\n\n &.entered {\n opacity: 1;\n transform: scale(1);\n }\n\n &.entering, &.exiting, &.exited {\n opacity: 0;\n transform: scale(0.8);\n }\n"])));
1605
- function Modal(_ref2) {
1606
- var show = _ref2.show,
1607
- children = _ref2.children,
1608
- _ref2$timeout = _ref2.timeout,
1609
- timeout = _ref2$timeout === void 0 ? 200 : _ref2$timeout,
1610
- _ref2$color = _ref2.color,
1611
- color = _ref2$color === void 0 ? 'background' : _ref2$color,
1612
- closeModal = _ref2.closeModal,
1613
- external = _ref2.external,
1614
- className = _ref2.className,
1615
- closeOnOverlay = _ref2.closeOnOverlay,
1616
- onExited = _ref2.onExited,
1617
- rest = _objectWithoutProperties(_ref2, _excluded$b);
1618
-
1619
- useScrollFix(show);
1620
- return (
1621
- /*#__PURE__*/
1622
- React.createElement(Portal, null,
1623
- /*#__PURE__*/
1624
- React.createElement(Transition, {
1625
- "in": show,
1626
- timeout: timeout,
1627
- onExited: onExited,
1628
- unmountOnExit: true,
1629
- mountOnEnter: true
1630
- }, function (state) {
1631
- return (
1632
- /*#__PURE__*/
1633
- React.createElement(Wrapper$6, {
1634
- role: "dialog",
1635
- className: className
1636
- },
1637
- /*#__PURE__*/
1638
- React.createElement(Shadow$1, {
1639
- onClick: closeOnOverlay ? closeModal : undefined,
1640
- "data-testid": "vs-modal-overlay"
1641
- }),
1642
- /*#__PURE__*/
1643
- React.createElement(AnimatedBox, Object.assign({
1644
- className: state,
1645
- color: color,
1646
- borderless: true
1647
- }, rest, {
1648
- role: "document"
1649
- }), children), external)
1650
- );
1651
- }))
1652
- );
1653
- }
1654
-
1655
- /* tslint:disable max-line-length */
1656
- function Close(props) {
1657
- return (
1658
- /*#__PURE__*/
1659
- React.createElement("svg", Object.assign({
1660
- xmlns: "http://www.w3.org/2000/svg",
1661
- width: "30",
1662
- height: "30",
1663
- viewBox: "0 0 30 30"
1664
- }, props),
1665
- /*#__PURE__*/
1666
- React.createElement("g", {
1667
- fill: "none",
1668
- stroke: "currentColor",
1669
- strokeWidth: "2",
1670
- strokeLinecap: "round"
1671
- },
1672
- /*#__PURE__*/
1673
- React.createElement("path", {
1674
- d: "M25.999 26l-12.5-12.5L25.999 1"
1675
- }),
1676
- /*#__PURE__*/
1677
- React.createElement("path", {
1678
- d: "M1 26l12.5-12.5L1 1"
1679
- })))
1680
- );
1681
- }
1682
-
1683
- var _excluded$c = ["color", "message", "duration", "clear", "clearOnClick", "id"],
1684
- _excluded2 = ["toasts", "clear", "fixed", "style", "margin", "position"];
1685
-
1686
- var _templateObject$j, _templateObject2$b, _templateObject3$6;
1687
- var Wrapper$7 =
1688
- /*#__PURE__*/
1689
- styled(Box)(_templateObject$j || (_templateObject$j =
1690
- /*#__PURE__*/
1691
- _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 0.375em 0.75em;\n max-width: 100%;\n margin-bottom: 1rem;\n z-index: 9999;\n width: fit-content;\n\n transition-property: transform, opacity;\n transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n transition-duration: 250ms;\n\n &.entering {\n opacity: 0.01;\n transform: scale(0.8);\n }\n &.entered {\n opacity: 1;\n transform: scale(1);\n }\n &.exiting {\n opacity: 0.01;\n transform: scale(0.8);\n }\n\n ", "\n"])), function (_ref) {
1692
- var clear = _ref.clear;
1693
- return clear ? {
1694
- paddingRight: '2.25rem'
1695
- } : undefined;
1696
- });
1697
- var ClearButton =
1698
- /*#__PURE__*/
1699
- styled.button(_templateObject2$b || (_templateObject2$b =
1700
- /*#__PURE__*/
1701
- _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n width: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n\n &:hover {\n background: rgba(0,0,0,0.15);\n }\n"])));
1702
-
1703
- function ToastItem(_ref2) {
1704
- var color = _ref2.color,
1705
- message = _ref2.message,
1706
- _ref2$duration = _ref2.duration,
1707
- duration = _ref2$duration === void 0 ? 5000 : _ref2$duration,
1708
- clear = _ref2.clear,
1709
- clearOnClick = _ref2.clearOnClick,
1710
- id = _ref2.id,
1711
- rest = _objectWithoutProperties(_ref2, _excluded$c);
1712
-
1713
- var onClear = useCallback(function () {
1714
- return clear(id);
1715
- }, [clear, id]);
1716
- useEffect(function () {
1717
- if (duration) {
1718
- var timeout = setTimeout(onClear, duration);
1719
- return function () {
1720
- return clearTimeout(timeout);
1721
- };
1722
- }
1723
-
1724
- return undefined;
1725
- }, [onClear, duration]);
1726
- return (
1727
- /*#__PURE__*/
1728
- React.createElement(Wrapper$7, Object.assign({
1729
- color: color,
1730
- clear: clearOnClick,
1731
- "data-testid": "toast-item",
1732
- borderless: true
1733
- }, rest), message, clearOnClick &&
1734
- /*#__PURE__*/
1735
- React.createElement(ClearButton, {
1736
- onClick: onClear
1737
- },
1738
- /*#__PURE__*/
1739
- React.createElement(Close, null)))
1740
- );
1741
- }
1742
-
1743
- function Toast(_ref3) {
1744
- var toasts = _ref3.toasts,
1745
- clear = _ref3.clear,
1746
- fixed = _ref3.fixed,
1747
- style = _ref3.style,
1748
- _ref3$margin = _ref3.margin,
1749
- margin = _ref3$margin === void 0 ? '1rem' : _ref3$margin,
1750
- position = _ref3.position,
1751
- rest = _objectWithoutProperties(_ref3, _excluded2);
1752
-
1753
- return (
1754
- /*#__PURE__*/
1755
- React.createElement(Portal, null,
1756
- /*#__PURE__*/
1757
- React.createElement(Container, Object.assign({}, rest, {
1758
- pos: position,
1759
- margin: margin,
1760
- style: _objectSpread2({
1761
- position: fixed ? 'fixed' : 'absolute'
1762
- }, style)
1763
- }),
1764
- /*#__PURE__*/
1765
- React.createElement(TransitionGroup, {
1766
- component: null
1767
- }, toasts.map(function (props) {
1768
- return (
1769
- /*#__PURE__*/
1770
- React.createElement(Transition, {
1771
- key: props.id,
1772
- timeout: 250,
1773
- "in": true,
1774
- unmountOnExit: true
1775
- }, function (state) {
1776
- return (
1777
- /*#__PURE__*/
1778
- React.createElement(ToastItem, Object.assign({}, props, {
1779
- className: state,
1780
- key: props.id,
1781
- clear: clear
1782
- }))
1783
- );
1784
- })
1785
- );
1786
- }))))
1787
- );
1788
- }
1789
- var Container =
1790
- /*#__PURE__*/
1791
- styled.div(_templateObject3$6 || (_templateObject3$6 =
1792
- /*#__PURE__*/
1793
- _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n\n ", "\n"])), function (_ref4) {
1794
- var pos = _ref4.pos,
1795
- margin = _ref4.margin;
1796
-
1797
- switch (pos) {
1798
- case 'bottom':
1799
- {
1800
- return {
1801
- bottom: margin,
1802
- left: '50%',
1803
- alignItems: 'center',
1804
- transform: 'translateX(-50%)'
1805
- };
1806
- }
1807
-
1808
- case 'bottom-left':
1809
- {
1810
- return {
1811
- bottom: margin,
1812
- left: margin,
1813
- alignItems: 'flex-start'
1814
- };
1815
- }
1816
-
1817
- case 'bottom-right':
1818
- {
1819
- return {
1820
- bottom: margin,
1821
- right: margin,
1822
- alignItems: 'flex-end'
1823
- };
1824
- }
1825
-
1826
- case 'top':
1827
- {
1828
- return {
1829
- top: margin,
1830
- left: '50%',
1831
- alignItems: 'center',
1832
- transform: 'translateX(-50%)'
1833
- };
1834
- }
1835
-
1836
- case 'top-right':
1837
- {
1838
- return {
1839
- top: margin,
1840
- right: margin,
1841
- alignItems: 'flex-end'
1842
- };
1843
- }
1844
-
1845
- default:
1846
- {
1847
- return {
1848
- top: margin,
1849
- left: margin,
1850
- alignItems: 'flex-start'
1851
- };
1852
- }
1853
- }
1854
- });
1855
-
1856
- var _templateObject$k, _templateObject2$c, _templateObject3$7;
1857
-
1858
- function getColor(_ref) {
1859
- var theme = _ref.theme,
1860
- color = _ref.color;
1861
- var value = !color || color === 'light' ? theme.background : theme[color];
1862
- return css(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n border-right-color: ", ";\n border-top-color: ", ";\n "])), value, theme.border, theme.border);
1863
- }
1864
-
1865
- var spin =
1866
- /*#__PURE__*/
1867
- keyframes(_templateObject2$c || (_templateObject2$c =
1868
- /*#__PURE__*/
1869
- _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n"])));
1870
- var Spinner =
1871
- /*#__PURE__*/
1872
- styled.div(_templateObject3$7 || (_templateObject3$7 =
1873
- /*#__PURE__*/
1874
- _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: ", ";\n height: ", ";\n margin: 0;\n padding: 0;\n position: relative;\n\n &:after {\n display: block;\n top: 0;\n left: 0;\n animation: ", " 750ms infinite linear;\n border: ", " solid;\n border-radius: 100%;\n ", "\n content: \"\";\n height: 100%;\n width: 100%;\n position: absolute;\n }\n"])), function (_ref2) {
1875
- var size = _ref2.size;
1876
- return size || '100%';
1877
- }, function (_ref3) {
1878
- var size = _ref3.size;
1879
- return size || '100%';
1880
- }, spin, function (_ref4) {
1881
- var borderSize = _ref4.borderSize;
1882
- return borderSize;
1883
- }, getColor);
1884
- Spinner.defaultProps = {
1885
- borderSize: '2px'
1886
- };
1887
-
1888
- var _templateObject$l, _templateObject2$d, _templateObject3$8;
1889
-
1890
- function setGap(width, gap) {
1891
- return parseInt(width.replace('px', ''), 10) - 2 * gap;
1892
- }
1893
-
1894
- function setResponsive(_ref) {
1895
- var fluid = _ref.fluid;
1896
-
1897
- if (fluid) {
1898
- return css(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n padding-right: 0.75rem;\n padding-left: 0.75rem;\n ", " {\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n }\n "])), mediaTablet);
1899
- }
1900
-
1901
- return css(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["\n margin-right: auto;\n margin-left: auto;\n\n ", " {\n max-width: ", "px;\n }\n ", " {\n max-width: ", "px;\n }\n ", " {\n max-width: ", "px;\n }\n ", " {\n max-width: ", "px;\n }\n "])), mediaUntilFullHD, function (_ref2) {
1902
- var theme = _ref2.theme;
1903
- return setGap(theme.media.fullhd, theme.gutter);
1904
- }, mediaDesktop, function (_ref3) {
1905
- var theme = _ref3.theme;
1906
- return setGap(theme.media.desktop, theme.gutter);
1907
- }, mediaTablet, function (_ref4) {
1908
- var theme = _ref4.theme;
1909
- return setGap(theme.media.tablet, theme.smallGutter);
1910
- }, mediaMobile, function (_ref5) {
1911
- var theme = _ref5.theme;
1912
- return setGap(theme.media.mobile, theme.smallGutter);
1913
- });
1914
- }
1915
-
1916
- var Container$1 = /*#__PURE__*/
1917
- styled.div(_templateObject3$8 || (_templateObject3$8 =
1918
- /*#__PURE__*/
1919
- _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n\n ", "\n"])), setResponsive);
1920
-
1921
- var _templateObject$m;
1922
- var Row = /*#__PURE__*/
1923
- styled.div(_templateObject$m || (_templateObject$m =
1924
- /*#__PURE__*/
1925
- _taggedTemplateLiteralLoose(["\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n flex-wrap: wrap;\n margin: -", "px;\n padding: ", "px;\n\n ", " {\n margin: -", "px;\n padding: ", "px;\n }\n"])), function (_ref) {
1926
- var theme = _ref.theme;
1927
- return theme.gutter / 2;
1928
- }, function (_ref2) {
1929
- var theme = _ref2.theme;
1930
- return theme.gutter / 2;
1931
- }, mediaTablet, function (_ref3) {
1932
- var theme = _ref3.theme;
1933
- return theme.smallGutter / 2;
1934
- }, function (_ref4) {
1935
- var theme = _ref4.theme;
1936
- return theme.smallGutter / 2;
1937
- });
1938
-
1939
- var _templateObject$n, _templateObject2$e;
1940
- var sizes = ['auto', '8.3333333%', '16.666667%', '25%', '33.333333%', '41.666667%', '50%', '58.333333%', '66.666667%', '75%', '83.333333%', '91.666667%', '100%'];
1941
-
1942
- function setAutoSize(_ref) {
1943
- var size = _ref.size,
1944
- auto = _ref.auto;
1945
- if (!auto || !size) return undefined;
1946
- var mobileSize = size >= 4 ? sizes[12] : sizes[Math.round(size * 3)];
1947
- var desktopSize = size >= 8 ? sizes[12] : sizes[Math.round(size * 1.5)];
1948
- return css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n ", " {\n flex-basis: ", ";\n max-width: ", ";\n }\n ", " {\n flex-basis: ", ";\n max-width: ", ";\n }\n "])), mediaDesktop, desktopSize, desktopSize, mediaMobile, mobileSize, mobileSize);
1949
- }
1950
-
1951
- var Col =
1952
- /*#__PURE__*/
1953
- styled.div(_templateObject2$e || (_templateObject2$e =
1954
- /*#__PURE__*/
1955
- _taggedTemplateLiteralLoose(["\n display: flex;\n flex: 0 0 auto;\n flex-direction: row;\n flex-wrap: wrap;\n padding: ", "px;\n\n ", "\n\n ", "\n\n ", " {\n padding: ", "px;\n }\n ", "\n"])), function (_ref2) {
1956
- var theme = _ref2.theme;
1957
- return theme.gutter / 2;
1958
- }, function (_ref3) {
1959
- var size = _ref3.size;
1960
- return size ? {
1961
- flexBasis: sizes[size],
1962
- maxWidth: sizes[size]
1963
- } : {
1964
- flexGrow: 1,
1965
- flexBasis: 0,
1966
- maxWidth: '100%'
1967
- };
1968
- }, function (_ref4) {
1969
- var offset = _ref4.offset;
1970
- return offset ? {
1971
- marginLeft: sizes[offset]
1972
- } : undefined;
1973
- }, mediaTablet, function (_ref5) {
1974
- var theme = _ref5.theme;
1975
- return theme.smallGutter / 2;
1976
- }, setAutoSize);
1977
- Col.defaultProps = {
1978
- size: 0,
1979
- offset: 0
1980
- };
1981
-
1982
- var _templateObject$o;
1983
- var index$5 = /*#__PURE__*/
1984
- styled.div(_templateObject$o || (_templateObject$o =
1985
- /*#__PURE__*/
1986
- _taggedTemplateLiteralLoose(["\n color: ", ";\n line-height: 1.5;\n\n li + li {\n margin-top: 0.25em;\n }\n\n p,\n dl,\n ol,\n ul,\n blockquote,\n pre,\n table {\n &:not(:last-child) {\n margin-bottom: 1em;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: 1.125;\n }\n\n h1 {\n font-size: 2rem;\n margin-bottom: 0.5em;\n }\n\n h2 {\n font-size: 1.75em;\n margin-bottom: 0.5714em;\n\n &:not(:first-child) {\n margin-top: 1.1428em;\n }\n }\n\n h3 {\n font-size: 1.5em;\n margin-bottom: 0.6666em;\n\n &:not(:first-child) {\n margin-top: 1.3333em;\n }\n }\n\n h4 {\n font-size: 1.25em;\n margin-bottom: 0.8em;\n }\n\n h5 {\n font-size: 1.125em;\n margin-bottom: 0.8888em;\n }\n\n h6 {\n font-size: 1em;\n margin-bottom: 1em;\n }\n\n ol {\n list-style: decimal outside;\n margin-left: 2em;\n margin-top: 1em;\n }\n\n ul {\n list-style: disc outside;\n margin-left: 2em;\n margin-top: 1em;\n ul {\n list-style-type: circle;\n margin-top: 0.5em;\n ul {\n list-style-type: square;\n }\n }\n }\n\n dd {\n margin-left: 2em;\n }\n\n table {\n width: 100%;\n\n td, th {\n border: 1px solid ", ";\n border-width: 0 0 1px;\n padding: 0.5em 0.75em;\n vertical-align: top;\n }\n\n th {\n color: ", ";\n text-align: left;\n }\n\n thead {\n td, th {\n border-width: 0 0 2px;\n color: ", ";\n }\n }\n\n tfoot {\n td, th {\n border-width: 2px 0 0;\n color: ", ";\n }\n }\n\n tbody > tr:last-child{\n td, th {\n border-bottom-width: 0;\n }\n }\n }\n"])), function (_ref) {
1987
- var theme = _ref.theme;
1988
- return theme.text;
1989
- }, function (_ref2) {
1990
- var theme = _ref2.theme;
1991
- return theme.border;
1992
- }, function (_ref3) {
1993
- var theme = _ref3.theme;
1994
- return theme.text;
1995
- }, function (_ref4) {
1996
- var theme = _ref4.theme;
1997
- return theme.text;
1998
- }, function (_ref5) {
1999
- var theme = _ref5.theme;
2000
- return theme.text;
2001
- });
2002
-
2003
- var _templateObject$p, _templateObject2$f;
2004
-
2005
- var setAnimation = function setAnimation(_ref) {
2006
- var theme = _ref.theme;
2007
- return keyframes(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n 0% { background-color: ", "; }\n 50% { background-color: ", "; }\n 100% { background-color: ", "; }\n"])), theme.greyLighter, theme.grey, theme.greyLighter);
2008
- };
2009
-
2010
- var index$6 = /*#__PURE__*/
2011
- styled.span(_templateObject2$f || (_templateObject2$f =
2012
- /*#__PURE__*/
2013
- _taggedTemplateLiteralLoose(["\n display: inline-block;\n height: 1rem;\n width: 100%;\n animation: ", " 3.5s ease infinite;\n border-radius: ", ";\n opacity: 0.125;\n"])), setAnimation, function (_ref2) {
2014
- var theme = _ref2.theme;
2015
- return theme.radius;
2016
- });
2017
-
2018
- var _templateObject$q, _templateObject2$g, _templateObject3$9, _templateObject4$4;
2019
-
2020
- function setColor$1(_ref) {
2021
- var theme = _ref.theme,
2022
- color = _ref.color,
2023
- outline = _ref.outline,
2024
- disabled = _ref.disabled;
2025
-
2026
- if (disabled) {
2027
- return disabledColor(theme);
2028
- }
2029
-
2030
- if (!color) {
2031
- return css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n border-color: ", ";\n color: ", ";\n\n &:hover {\n border-color: ", ";\n }\n\n &:active {\n border-color: ", ";\n }\n "])), theme.border, theme.text, theme.borderHover, theme.borderActive);
2032
- }
2033
-
2034
- var target = theme[color] || color;
2035
- var invertColor = findColorInvert(theme, target);
2036
-
2037
- if (outline) {
2038
- return css(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n background-color: transparent;\n border-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus:not(:active) {\n ", "\n }\n "])), target, target, target, invertColor, darken(0.1, target), boxShadow('0.1rem', target, 0.5));
2039
- }
2040
-
2041
- return css(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n border-color: transparent;\n color: ", ";\n box-shadow: none;\n\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus:not(:active) {\n ", "\n }\n "])), target, invertColor, invertColor, darken(0.05, target), darken(0.1, target), boxShadow('0.1rem', target, 0.5));
2042
- }
2043
-
2044
- var Button = /*#__PURE__*/
2045
- styled.button(_templateObject4$4 || (_templateObject4$4 =
2046
- /*#__PURE__*/
2047
- _taggedTemplateLiteralLoose(["\n position: relative;\n outline: none;\n appearance: none;\n box-sizing: border-box;\n display: inline-block;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n justify-content: center;\n vertical-align: middle;\n user-select: none;\n background: transparent;\n border: 1px solid transparent;\n border-radius: ", ";\n padding: ", ";\n line-height: ", ";\n\n ", "\n ", "\n"])), function (_ref2) {
2048
- var round = _ref2.round,
2049
- theme = _ref2.theme;
2050
- return round ? '2456189px' : theme.radius;
2051
- }, function (_ref3) {
2052
- var icon = _ref3.icon;
2053
- return icon ? '0.375em' : '0.375em 0.75em';
2054
- }, function (_ref4) {
2055
- var icon = _ref4.icon;
2056
- return icon ? 1 : 1.5;
2057
- }, setColor$1, function (_ref5) {
2058
- var size = _ref5.size;
2059
- return setSize('font-size', size);
2060
- });
2061
-
2062
- var _templateObject$r, _templateObject2$h;
2063
- var TextButton = /*#__PURE__*/
2064
- styled.button(_templateObject$r || (_templateObject$r =
2065
- /*#__PURE__*/
2066
- _taggedTemplateLiteralLoose(["\n background-color: transparent;\n border: none;\n cursor: pointer;\n display: inline;\n margin: 0;\n border-radius: ", ";\n padding: ", ";\n line-height: ", ";\n color: ", ";\n ", "\n\n &:hover, &:focus {\n ", "\n ", "\n }\n\n &:focus, &:active {\n outline: none;\n }\n\n &:active {\n ", "\n }\n\n ", "\n"])), function (_ref) {
2067
- var round = _ref.round,
2068
- theme = _ref.theme;
2069
- return round ? '2456189px' : theme.radius;
2070
- }, function (_ref2) {
2071
- var pure = _ref2.pure,
2072
- icon = _ref2.icon;
2073
- if (pure) return '0';
2074
- if (icon) return '0.375em';
2075
- return '0.375em 0.75em';
2076
- }, function (_ref3) {
2077
- var icon = _ref3.icon;
2078
- return icon ? 1 : 1.5;
2079
- }, function (_ref4) {
2080
- var color = _ref4.color,
2081
- theme = _ref4.theme;
2082
- return color ? theme[color] : theme.text;
2083
- }, function (_ref5) {
2084
- var size = _ref5.size;
2085
- return setSize('font-size', size);
2086
- }, function (_ref6) {
2087
- var underline = _ref6.underline;
2088
- return underline ? {
2089
- textDecoration: 'underline'
2090
- } : undefined;
2091
- }, function (_ref7) {
2092
- var pure = _ref7.pure,
2093
- theme = _ref7.theme,
2094
- color = _ref7.color;
2095
- return pure ? undefined : {
2096
- background: transparentize(0.9, color ? theme[color] || theme.text : theme.text)
2097
- };
2098
- }, function (_ref8) {
2099
- var pure = _ref8.pure,
2100
- theme = _ref8.theme,
2101
- color = _ref8.color;
2102
- return pure ? undefined : {
2103
- background: transparentize(0.8, color ? theme[color] || theme.text : theme.text)
2104
- };
2105
- }, function (_ref9) {
2106
- var disabled = _ref9.disabled,
2107
- theme = _ref9.theme;
2108
- return disabled ? css(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n color: ", ";\n cursor: default;\n &:hover {\n background: transparent;\n text-decoration: none;\n }\n "])), transparentize(0.75, theme.textDark)) : undefined;
2109
- });
2110
-
2111
- var _templateObject$s;
2112
- var ButtonGroup = /*#__PURE__*/
2113
- styled.div(_templateObject$s || (_templateObject$s =
2114
- /*#__PURE__*/
2115
- _taggedTemplateLiteralLoose(["\n display: inline-block;\n\n &:not(:last-child) {\n margin-right: 0.5rem;\n }\n\n ", " {\n margin: 0;\n border-radius: 0;\n\n &:hover {\n z-index: 1;\n }\n\n &:first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n }\n\n &:not(:first-child) {\n margin-left: -1px;\n }\n\n &:last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n }\n }\n"])), Button);
2116
-
2117
- var _templateObject$t, _templateObject2$i, _templateObject3$a, _templateObject4$5, _templateObject5$3, _templateObject6;
2118
- var stripedStyle =
2119
- /*#__PURE__*/
2120
- css(_templateObject$t || (_templateObject$t =
2121
- /*#__PURE__*/
2122
- _taggedTemplateLiteralLoose(["\n tbody > tr:nth-child(odd) {\n background-color: rgba(0, 0, 0, 0.02);\n }\n"])));
2123
- var hoverStyle =
2124
- /*#__PURE__*/
2125
- css(_templateObject2$i || (_templateObject2$i =
2126
- /*#__PURE__*/
2127
- _taggedTemplateLiteralLoose(["\n tbody > tr:hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n"])));
2128
- var index$7 = /*#__PURE__*/
2129
- styled.table(_templateObject3$a || (_templateObject3$a =
2130
- /*#__PURE__*/
2131
- _taggedTemplateLiteralLoose(["\n ", "\n max-width: 100%;\n margin-bottom: 1rem;\n background-color: transparent;\n\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n td, th {\n vertical-align: top;\n padding: 0.75rem;\n ", "\n border-width: 0 0 1px;\n }\n\n th { white-space: nowrap; }\n\n ", "\n ", "\n\n ", "\n"])), function (_ref) {
2132
- var full = _ref.full;
2133
- return full ? css(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["width: 100%;"]))) : undefined;
2134
- }, function (_ref2) {
2135
- var theme = _ref2.theme,
2136
- bordered = _ref2.bordered;
2137
- return bordered ? css(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n border: 1px solid ", ";\n "])), theme.border) : undefined;
2138
- }, function (_ref3) {
2139
- var striped = _ref3.striped;
2140
- return striped ? stripedStyle : undefined;
2141
- }, function (_ref4) {
2142
- var hover = _ref4.hover;
2143
- return hover ? hoverStyle : undefined;
2144
- }, function (_ref5) {
2145
- var headerStyle = _ref5.headerStyle;
2146
- return headerStyle ? css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n th {\n ", "\n }\n "])), headerStyle) : undefined;
2147
- });
2148
-
2149
- var _templateObject$u;
2150
-
2151
- var _excluded$d = ["value", "max", "color"];
2152
- function Progress(_ref) {
2153
- var value = _ref.value,
2154
- max = _ref.max,
2155
- _ref$color = _ref.color,
2156
- color = _ref$color === void 0 ? 'primary' : _ref$color,
2157
- rest = _objectWithoutProperties(_ref, _excluded$d);
2158
-
2159
- var percent = useMemo(function () {
2160
- return value ? Math.round(value / max * 100) : 0;
2161
- }, [value, max]);
2162
- return (
2163
- /*#__PURE__*/
2164
- React.createElement(Wrapper$8, Object.assign({
2165
- color: color
2166
- }, rest),
2167
- /*#__PURE__*/
2168
- React.createElement("div", {
2169
- role: "progressbar",
2170
- "aria-label": "progress",
2171
- className: value !== max ? 'in-progress' : undefined,
2172
- style: {
2173
- width: (percent > 100 ? 100 : percent) + "%"
2174
- }
2175
- }))
2176
- );
2177
- }
2178
- var Wrapper$8 =
2179
- /*#__PURE__*/
2180
- styled.div(_templateObject$u || (_templateObject$u =
2181
- /*#__PURE__*/
2182
- _taggedTemplateLiteralLoose(["\n position: relative;\n display: block;\n width: 100%;\n border-radius: ", ";\n background-color: ", ";\n\n ", "\n\n & > div[role=\"progressbar\"] {\n position: relative;\n height: 100%;\n border-radius: ", ";\n background-color: ", ";\n\n &.in-progress {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n }\n\n will-change: width;\n\n transition-property: width;\n transition-duration: 350ms;\n transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n z-index: 1;\n }\n"])), function (_ref2) {
2183
- var theme = _ref2.theme;
2184
- return theme.radius;
2185
- }, function (_ref3) {
2186
- var theme = _ref3.theme;
2187
- return theme.background;
2188
- }, function (_ref4) {
2189
- var size = _ref4.size,
2190
- height = _ref4.height;
2191
- return height || setSize('height', size);
2192
- }, function (_ref5) {
2193
- var theme = _ref5.theme;
2194
- return theme.radius;
2195
- }, function (_ref6) {
2196
- var color = _ref6.color,
2197
- theme = _ref6.theme;
2198
- return theme[color] || color;
2199
- });
2200
-
2201
- var _templateObject$v;
2202
- var index$8 = /*#__PURE__*/
2203
- styled.hr(_templateObject$v || (_templateObject$v =
2204
- /*#__PURE__*/
2205
- _taggedTemplateLiteralLoose(["\n border: none;\n height: 1px;\n margin: 0;\n flex-shrink: 0;\n background-color: ", ";\n"])), function (_ref) {
2206
- var theme = _ref.theme;
2207
- return theme.border;
2208
- });
2209
-
2210
- var _excluded$e = ["children", "onClose"];
2211
-
2212
- var _templateObject$w, _templateObject2$j, _templateObject3$b;
2213
-
2214
- function getColor$1(theme, color) {
2215
- return !color || color === 'light' ? theme.background : theme[color];
2216
- }
2217
-
2218
- var closeCss =
2219
- /*#__PURE__*/
2220
- css(_templateObject$w || (_templateObject$w =
2221
- /*#__PURE__*/
2222
- _taggedTemplateLiteralLoose(["\n padding-right: 1.625rem;\n\n ", " {\n display: flex;\n position: absolute;\n align-items: center;\n color: inherit;\n top: 0;\n right: 0;\n bottom: 0;\n padding: 0 0.35rem;\n\n svg {\n width: 0.625rem;\n height: 0.625rem;\n }\n\n &:hover {\n background-color: rgba(0,0,0,0.15);\n }\n }\n"])), TextButton);
2223
- var Wrapper$9 =
2224
- /*#__PURE__*/
2225
- styled.div(_templateObject2$j || (_templateObject2$j =
2226
- /*#__PURE__*/
2227
- _taggedTemplateLiteralLoose(["\n display: inline-flex;\n position: relative;\n font-size: 0.75rem;\n cursor: default;\n padding: 0.325rem 0.5rem;\n align-items: center;\n justify-content: center;\n height: 1.5rem;\n border-radius: ", ";\n white-space: nowrap;\n\n ", "\n\n &:not(:last-child) {\n margin-right: 0.5rem;\n }\n\n ", " {\n border-radius: 0;\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n }\n\n ", "\n"])), function (_ref) {
2228
- var theme = _ref.theme,
2229
- round = _ref.round;
2230
- return round ? '50rem' : theme.radius;
2231
- }, function (_ref2) {
2232
- var color = _ref2.color,
2233
- theme = _ref2.theme;
2234
- var target = getColor$1(theme, color);
2235
- var invertColor = findColorInvert(theme, target);
2236
- return css(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n\n a, span {\n color: ", ";\n }\n "])), invertColor, target, invertColor);
2237
- }, TextButton, function (_ref3) {
2238
- var theme = _ref3.theme,
2239
- round = _ref3.round;
2240
- return round ? '50rem' : theme.radius;
2241
- }, function (_ref4) {
2242
- var theme = _ref4.theme,
2243
- round = _ref4.round;
2244
- return round ? '50rem' : theme.radius;
2245
- }, function (_ref5) {
2246
- var close = _ref5.close;
2247
- return close ? closeCss : undefined;
2248
- });
2249
- function Tag(_ref6) {
2250
- var children = _ref6.children,
2251
- onClose = _ref6.onClose,
2252
- rest = _objectWithoutProperties(_ref6, _excluded$e);
2253
-
2254
- return (
2255
- /*#__PURE__*/
2256
- React.createElement(Wrapper$9, Object.assign({
2257
- close: !!onClose
2258
- }, rest), children, onClose &&
2259
- /*#__PURE__*/
2260
- React.createElement(TextButton, {
2261
- onClick: onClose,
2262
- pure: true
2263
- },
2264
- /*#__PURE__*/
2265
- React.createElement(Close, null)))
2266
- );
2267
- }
2268
-
2269
- /* tslint:disable max-line-length */
2270
- function Approved$1(props) {
2271
- return (
2272
- /*#__PURE__*/
2273
- React.createElement("svg", Object.assign({
2274
- xmlns: "http://www.w3.org/2000/svg",
2275
- width: "30",
2276
- height: "30",
2277
- viewBox: "0 0 30 30"
2278
- }, props),
2279
- /*#__PURE__*/
2280
- React.createElement("g", {
2281
- fill: "none"
2282
- },
2283
- /*#__PURE__*/
2284
- React.createElement("path", {
2285
- d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"
2286
- }),
2287
- /*#__PURE__*/
2288
- React.createElement("path", {
2289
- d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",
2290
- fill: "currentColor"
2291
- })),
2292
- /*#__PURE__*/
2293
- React.createElement("path", {
2294
- d: "M11.515 18.466l-3.878-3.985L6 16.005l5.59 5.59 11.562-11.533-1.7-1.595z",
2295
- fill: "currentColor"
2296
- }))
2297
- );
2298
- }
2299
-
2300
- /* tslint:disable max-line-length */
2301
- function ChevronLeftRound(props) {
2302
- return (
2303
- /*#__PURE__*/
2304
- React.createElement("svg", Object.assign({
2305
- xmlns: "http://www.w3.org/2000/svg",
2306
- width: "30",
2307
- height: "30",
2308
- viewBox: "0 0 30 30"
2309
- }, props),
2310
- /*#__PURE__*/
2311
- React.createElement("g", {
2312
- fill: "none"
2313
- },
2314
- /*#__PURE__*/
2315
- React.createElement("path", {
2316
- d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"
2317
- }),
2318
- /*#__PURE__*/
2319
- React.createElement("path", {
2320
- d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",
2321
- fill: "currentColor"
2322
- })),
2323
- /*#__PURE__*/
2324
- React.createElement("path", {
2325
- d: "M18.066 8.5l-7.567 6.731 7.567 6.2",
2326
- fill: "none",
2327
- stroke: "currentColor",
2328
- strokeWidth: "2"
2329
- }))
2330
- );
2331
- }
2332
-
2333
- /* tslint:disable max-line-length */
2334
- function ChevronRightRound(props) {
2335
- return (
2336
- /*#__PURE__*/
2337
- React.createElement("svg", Object.assign({
2338
- xmlns: "http://www.w3.org/2000/svg",
2339
- width: "30",
2340
- height: "30",
2341
- viewBox: "0 0 30 30"
2342
- }, props),
2343
- /*#__PURE__*/
2344
- React.createElement("g", {
2345
- fill: "none"
2346
- },
2347
- /*#__PURE__*/
2348
- React.createElement("path", {
2349
- d: "M15 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1z"
2350
- }),
2351
- /*#__PURE__*/
2352
- React.createElement("path", {
2353
- d: "M15 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28m0 2C6.716 30 0 23.284 0 15 0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15z",
2354
- fill: "currentColor"
2355
- })),
2356
- /*#__PURE__*/
2357
- React.createElement("path", {
2358
- d: "M11.934 21.5l7.567-6.731-7.567-6.2",
2359
- fill: "none",
2360
- stroke: "currentColor",
2361
- strokeWidth: "2"
2362
- }))
2363
- );
2364
- }
2365
-
2366
- /* tslint:disable max-line-length */
2367
- function FileRound(props) {
2368
- return (
2369
- /*#__PURE__*/
2370
- React.createElement("svg", Object.assign({
2371
- xmlns: "http://www.w3.org/2000/svg",
2372
- width: "30",
2373
- height: "30",
2374
- viewBox: "0 0 30 30"
2375
- }, props),
2376
- /*#__PURE__*/
2377
- React.createElement("g", {
2378
- fill: "none"
2379
- },
2380
- /*#__PURE__*/
2381
- React.createElement("path", {
2382
- d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z"
2383
- }),
2384
- /*#__PURE__*/
2385
- React.createElement("path", {
2386
- d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",
2387
- fill: "currentColor"
2388
- })),
2389
- /*#__PURE__*/
2390
- React.createElement("g", {
2391
- transform: "translate(9 7)",
2392
- fill: "none",
2393
- stroke: "currentColor",
2394
- strokeWidth: "2"
2395
- },
2396
- /*#__PURE__*/
2397
- React.createElement("rect", {
2398
- width: "12",
2399
- height: "16",
2400
- rx: "1",
2401
- stroke: "none"
2402
- }),
2403
- /*#__PURE__*/
2404
- React.createElement("path", {
2405
- d: "M1 1h10v14H1z"
2406
- })),
2407
- /*#__PURE__*/
2408
- React.createElement("path", {
2409
- fill: "currentColor",
2410
- d: "M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"
2411
- }))
2412
- );
2413
- }
2414
-
2415
- function Pencil(props) {
2416
- return (
2417
- /*#__PURE__*/
2418
- React.createElement("svg", Object.assign({
2419
- xmlns: "http://www.w3.org/2000/svg",
2420
- width: "17.796",
2421
- height: "17.908",
2422
- viewBox: "0 0 17.796 17.908"
2423
- }, props),
2424
- /*#__PURE__*/
2425
- React.createElement("path", {
2426
- d: "M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801",
2427
- fill: "none",
2428
- stroke: "currentColor"
2429
- }))
2430
- );
2431
- }
2432
-
2433
- function PencilSimple(props) {
2434
- return (
2435
- /*#__PURE__*/
2436
- React.createElement("svg", Object.assign({
2437
- width: "15",
2438
- height: "15",
2439
- viewBox: "0 0 15 15",
2440
- fill: "none",
2441
- xmlns: "http://www.w3.org/2000/svg"
2442
- }, props),
2443
- /*#__PURE__*/
2444
- React.createElement("path", {
2445
- d: "M9.97.22a.75.75 0 011.06 0l3.75 3.75a.75.75 0 010 1.06l-9.75 9.75a.75.75 0 01-.53.22H.75a.75.75 0 01-.75-.75V10.5a.75.75 0 01.22-.53L9.97.22zM1.5 10.81v2.69h2.69l9-9-2.69-2.69-9 9z",
2446
- fill: "currentColor"
2447
- }))
2448
- );
2449
- }
2450
-
2451
- /* tslint:disable max-line-length */
2452
- function User(props) {
2453
- return (
2454
- /*#__PURE__*/
2455
- React.createElement("svg", Object.assign({
2456
- xmlns: "http://www.w3.org/2000/svg",
2457
- width: "30",
2458
- height: "30",
2459
- viewBox: "0 0 30 30"
2460
- }, props),
2461
- /*#__PURE__*/
2462
- React.createElement("g", {
2463
- fill: "none",
2464
- stroke: "currentColor",
2465
- strokeWidth: "2"
2466
- },
2467
- /*#__PURE__*/
2468
- React.createElement("circle", {
2469
- cx: "15",
2470
- cy: "15",
2471
- r: "15",
2472
- stroke: "none"
2473
- }),
2474
- /*#__PURE__*/
2475
- React.createElement("circle", {
2476
- cx: "15",
2477
- cy: "15",
2478
- r: "14"
2479
- })),
2480
- /*#__PURE__*/
2481
- React.createElement("path", {
2482
- d: "M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z",
2483
- fill: "currentColor"
2484
- }))
2485
- );
2486
- }
2487
-
2488
- /* tslint:disable max-line-length */
2489
- function Refresh(props) {
2490
- return (
2491
- /*#__PURE__*/
2492
- React.createElement("svg", Object.assign({
2493
- xmlns: "http://www.w3.org/2000/svg",
2494
- width: "30",
2495
- height: "30",
2496
- viewBox: "0 0 30 30"
2497
- }, props),
2498
- /*#__PURE__*/
2499
- React.createElement("path", {
2500
- d: "M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z",
2501
- fill: "currentColor"
2502
- }))
2503
- );
2504
- }
2505
-
2506
- function Plus(props) {
2507
- return (
2508
- /*#__PURE__*/
2509
- React.createElement("svg", Object.assign({
2510
- width: "21",
2511
- height: "21",
2512
- viewBox: "0 0 21 21",
2513
- fill: "none",
2514
- xmlns: "http://www.w3.org/2000/svg"
2515
- }, props),
2516
- /*#__PURE__*/
2517
- React.createElement("path", {
2518
- d: "M9 0v9H0v3h9v9h3v-9h9V9h-9V0H9z",
2519
- fill: "currentColor"
2520
- }))
2521
- );
2522
- }
2523
-
2524
- var theme = {
2525
- fontFamily: '-apple-system BlinkMacSystemFont, Meiryo, system-ui, sans-serif',
2526
- fontSize: '16px',
2527
- gutter: 24,
2528
- smallGutter: 16,
2529
- media: {
2530
- mobile: '576px',
2531
- tablet: '769px',
2532
- desktop: '960px',
2533
- fullhd: '1344px'
2534
- },
2535
- radius: '4px',
2536
- timeout: 250,
2537
- formPadding: '0.75rem 0.625rem',
2538
- primary: '#37B151',
2539
- link: '#578ba9',
2540
- info: '#209cee',
2541
- success: '#0fa886',
2542
- warning: '#f2b541',
2543
- danger: '#f3575a',
2544
- dark: '#363636',
2545
- light: '#9b9b9b',
2546
- black: '#0a0a0a',
2547
- blackBis: '#121212',
2548
- blackTer: '#242424',
2549
- white: '#ffffff',
2550
- whiteBis: '#fafafa',
2551
- whiteTer: '#f5f5f5',
2552
- grey: '#7a7a7a',
2553
- greyLight: '#9b9b9b',
2554
- greyLighter: '#dbdbdb',
2555
- text: '#4a4a4a',
2556
- textDark: '#4a4a4a',
2557
- textLight: '#7a7a7a',
2558
- textStrong: '#4a4a4a',
2559
- background: '#f5f5f5',
2560
- border: '#dbdbdb',
2561
- borderHover: '#9b9b9b',
2562
- borderActive: '#4a4a4a',
2563
- placeholder: '#7a7a7a',
2564
- backdrop: 'rgba(10,10,10,0.25)',
2565
- responsive: true
2566
- };
2567
-
2568
- var _templateObject$x;
2569
- /*! based on normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
2570
-
2571
- var normalized =
2572
- /*#__PURE__*/
2573
- css(_templateObject$x || (_templateObject$x =
2574
- /*#__PURE__*/
2575
- _taggedTemplateLiteralLoose(["\n *, ::after, ::before {\n box-sizing: border-box;\n }\n\n html {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -ms-overflow-style: scrollbar;\n }\n\n body {\n margin: 0;\n font-family: ", ";\n font-size: ", ";\n text-align: left;\n }\n\n h1 {\n font-size: 2em;\n margin: .67em 0;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n pre {\n font-family: monospace,monospace;\n font-size: 1em;\n }\n\n a {\n background-color: transparent;\n color: ", ";\n }\n\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n }\n\n b,strong {\n font-weight: bolder;\n }\n\n code,kbd,samp {\n font-family: monospace,monospace;\n font-size: 1em;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -.25em;\n }\n\n sup {\n top: -.5em;\n }\n\n img {\n border-style: none;\n }\n\n button,input,optgroup,select,textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n button,input {\n overflow: visible;\n }\n\n button,select {\n text-transform: none;\n }\n\n [type=button],[type=reset],[type=submit],button {\n -webkit-appearance: button;\n }\n\n [type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n [type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring {\n outline: 1px dotted ButtonText;\n }\n\n input[type=date],\n input[type=time],\n input[type=datetime-local],\n input[type=month] {\n -webkit-appearance: listbox;\n }\n\n fieldset {\n padding: .35em .75em .625em;\n }\n\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n resize: vertical;\n }\n\n textarea {\n overflow: auto;\n }\n\n [type=checkbox],[type=radio] {\n box-sizing: border-box;\n padding: 0;\n }\n\n [type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type=search] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n [type=search]::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n details {\n display: block;\n }\n\n summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none;\n }\n\n blockquote, body, dd, dl, dt, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, html, iframe, legend, li, ol, p, pre, textarea, ul {\n margin: 0;\n padding: 0;\n }\n\n button {\n font-size: inherit;\n }\n\n article, aside, figure,\n footer, header, hgroup, section {\n display: block;\n }\n\n input[type=\"checkbox\"], input[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n }\n\n a {\n cursor: pointer;\n text-decoration: none;\n color: #3273dc;\n\n &:hover {\n color: currentColor;\n }\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n small {\n font-size: .875em;\n }\n\n span {\n font-style: inherit;\n font-weight: inherit;\n }\n\n strong {\n color: #363636;\n font-weight: 700;\n }\n\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n th {\n text-align: inherit;\n }\n\n ul {\n list-style-type: none;\n }\n"])), function (_ref) {
2576
- var theme = _ref.theme;
2577
- return theme ? theme.fontFamily : 'sans-serif';
2578
- }, function (_ref2) {
2579
- var theme = _ref2.theme;
2580
- return theme ? theme.fontSize : '16px';
2581
- }, function (_ref3) {
2582
- var theme = _ref3.theme;
2583
- return theme.link;
2584
- });
2585
-
2586
- export { Accordion, AppBar, Box, Button, ButtonGroup, Card, Checkbox, Col, Container$1 as Container, index$5 as Content, index$8 as Divider, Field, Approved$1 as IconApproved, ChevronDown as IconArrowDown, ChevronLeftRound as IconChevronLeftRound, ChevronRightRound as IconChevronRightRound, Close as IconClose, FileRound as IconFileRound, Pencil as IconPencil, PencilSimple as IconPencilSimple, Plus as IconPlus, Refresh as IconRefresh, User as IconUser, Modal, index$6 as Placeholder, Popover, Portal, Progress, index$3 as Radio, Row, index$2 as Select, Spinner, index$4 as Switch, index$7 as Table, Tag, TextButton, index as TextInput, index$1 as Textarea, Toast, Tooltip, Arrow as arrow, boxShadow, theme as defaultTheme, findColorInvert, hamburger as hambuger, mediaDesktop, mediaFullHD, mediaMobile, mediaTablet, mediaUntilFullHD, normalized as normalizeStyle, setSize };
2587
- //# sourceMappingURL=visits-style.esm.js.map