@taikai/rocket-kit 3.0.0-beta.2 → 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/checkbox/index.d.ts +1 -1
- package/dist/atoms/progress-bar/index.d.ts +0 -1
- package/dist/atoms/select-interactive/components/index.d.ts +6 -3
- package/dist/atoms/select-interactive/index.d.ts +0 -1
- package/dist/atoms/select-interactive/types.d.ts +2 -2
- package/dist/atoms/slideshow/index.d.ts +0 -1
- package/dist/atoms/toggle/index.d.ts +0 -1
- package/dist/atoms/video-player/index.d.ts +0 -1
- package/dist/ions/icon-empty-data.d.ts +0 -1
- package/dist/ions/icon-login-only.d.ts +0 -1
- package/dist/ions/variables.d.ts +0 -1
- package/dist/molecules/actions-menu/index.d.ts +0 -1
- package/dist/molecules/empty-table/index.d.ts +0 -1
- package/dist/molecules/error/index.d.ts +0 -1
- package/dist/molecules/number-input-spinner/index.d.ts +0 -1
- package/dist/organisms/grid-container/grid-row.d.ts +0 -1
- package/dist/organisms/horizontal-nav/index.d.ts +0 -1
- package/dist/organisms/loading-state/index.d.ts +0 -1
- package/dist/rocket-kit.cjs.development.js +99 -129
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +30 -25
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +100 -130
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +2 -3
package/dist/rocket-kit.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useRef, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect, useMemo } from 'react';
|
|
2
2
|
import Avatar from 'boring-avatars';
|
|
3
3
|
import _styled, { css, keyframes } from 'styled-components';
|
|
4
4
|
import { darken, lighten, rem, transparentize, rgba, timingFunctions } from 'polished';
|
|
@@ -181,16 +181,15 @@ const typography = {
|
|
|
181
181
|
defaultSize: '16px',
|
|
182
182
|
regular: 400,
|
|
183
183
|
medium: 500,
|
|
184
|
-
bold: 700
|
|
185
|
-
letterSpacing: /*#__PURE__*/rem('1px')
|
|
184
|
+
bold: 700
|
|
186
185
|
};
|
|
187
186
|
const button = {
|
|
188
|
-
height: /*#__PURE__*/rem('
|
|
187
|
+
height: /*#__PURE__*/rem('44px'),
|
|
189
188
|
borderWidth: /*#__PURE__*/rem('1px'),
|
|
190
189
|
borderRadius: /*#__PURE__*/rem('8px'),
|
|
191
|
-
padding: /*#__PURE__*/rem('
|
|
192
|
-
iconSpacing: /*#__PURE__*/rem('
|
|
193
|
-
iconSize: /*#__PURE__*/rem('
|
|
190
|
+
padding: /*#__PURE__*/rem('24px'),
|
|
191
|
+
iconSpacing: /*#__PURE__*/rem('14px'),
|
|
192
|
+
iconSize: /*#__PURE__*/rem('20px')
|
|
194
193
|
};
|
|
195
194
|
const misc = {
|
|
196
195
|
transitionDuration: '0.3s'
|
|
@@ -238,16 +237,14 @@ const useColor = value => {
|
|
|
238
237
|
const c = value.split(/([0-9]+)/).filter(Boolean);
|
|
239
238
|
const tint = c[0];
|
|
240
239
|
const hue = parseFloat(c[1]);
|
|
241
|
-
|
|
242
240
|
const getHoverColor = (tint, hue) => {
|
|
243
241
|
const indexCurrentHue = colorHues.indexOf(hue);
|
|
244
242
|
const indexIsLast = indexCurrentHue === colorHues.length - 1;
|
|
245
|
-
const indexHoverHue = indexIsLast ? indexCurrentHue - 1 : indexCurrentHue + 1;
|
|
246
|
-
|
|
243
|
+
const indexHoverHue = indexIsLast ? indexCurrentHue - 1 : indexCurrentHue + 1;
|
|
244
|
+
// @ts-ignore
|
|
247
245
|
const hoverColor = colors == null ? void 0 : colors[indexCurrentHue > -1 ? tint + colorHues[indexHoverHue] : tint];
|
|
248
246
|
return hoverColor != null ? hoverColor : colors.black;
|
|
249
247
|
};
|
|
250
|
-
|
|
251
248
|
const hover = getHoverColor(tint, hue);
|
|
252
249
|
return {
|
|
253
250
|
color,
|
|
@@ -257,20 +254,17 @@ const useColor = value => {
|
|
|
257
254
|
|
|
258
255
|
const ButtonWrapper = /*#__PURE__*/_styled.button.withConfig({
|
|
259
256
|
displayName: "styles__ButtonWrapper",
|
|
260
|
-
componentId: "baestp-0"
|
|
261
|
-
})(["--bg:", ";--txt:", ";--hover:", ";margin:0;border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";
|
|
257
|
+
componentId: "sc-baestp-0"
|
|
258
|
+
})(["--bg:", ";--txt:", ";--hover:", ";margin:0;border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}&:disabled{cursor:inherit;opacity:0.5;&:hover{background-color:", ";pointer-events:none;}}> *:not(:last-child){margin-left:", ";margin-right:", ";}.spinner{border-top-color:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
262
259
|
var _props$color;
|
|
263
|
-
|
|
264
260
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
265
261
|
}, props => {
|
|
266
262
|
var _props$txtColor;
|
|
267
|
-
|
|
268
263
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
269
264
|
}, props => {
|
|
270
265
|
var _props$color2;
|
|
271
|
-
|
|
272
266
|
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').hover;
|
|
273
|
-
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/rem(typography.defaultSize), typography.medium,
|
|
267
|
+
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/rem(typography.defaultSize), typography.medium, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
274
268
|
|
|
275
269
|
const Button = props => {
|
|
276
270
|
const {
|
|
@@ -326,15 +320,12 @@ const ActionsMenuStyle = /*#__PURE__*/_styled.div.withConfig({
|
|
|
326
320
|
function useVisible(initialIsVisible) {
|
|
327
321
|
const [isVisible, setIsVisible] = useState(initialIsVisible);
|
|
328
322
|
const ref = useRef(null);
|
|
329
|
-
|
|
330
323
|
const handleClickOutside = event => {
|
|
331
324
|
if (!ref || !ref.current) return;
|
|
332
|
-
|
|
333
325
|
if (!ref.current.contains(event.target)) {
|
|
334
326
|
setIsVisible(false);
|
|
335
327
|
}
|
|
336
328
|
};
|
|
337
|
-
|
|
338
329
|
useEffect(() => {
|
|
339
330
|
document.addEventListener('click', handleClickOutside, false);
|
|
340
331
|
return () => {
|
|
@@ -421,20 +412,17 @@ const ButtonDropdown = props => {
|
|
|
421
412
|
|
|
422
413
|
const ButtonLinkStyle = /*#__PURE__*/_styled.a.withConfig({
|
|
423
414
|
displayName: "styles__ButtonLinkStyle",
|
|
424
|
-
componentId: "clge7v-0"
|
|
425
|
-
})(["--bg:", ";--txt:", ";--hover:", ";border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";
|
|
415
|
+
componentId: "sc-clge7v-0"
|
|
416
|
+
})(["--bg:", ";--txt:", ";--hover:", ";border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}> *:not(:last-child){margin-left:", ";margin-right:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
426
417
|
var _props$color;
|
|
427
|
-
|
|
428
418
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
429
419
|
}, props => {
|
|
430
420
|
var _props$txtColor;
|
|
431
|
-
|
|
432
421
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
433
422
|
}, props => {
|
|
434
423
|
var _props$color2;
|
|
435
|
-
|
|
436
424
|
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').hover;
|
|
437
|
-
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, /*#__PURE__*/rem(typography.defaultSize), typography.medium,
|
|
425
|
+
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, /*#__PURE__*/rem(typography.defaultSize), typography.medium, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
438
426
|
|
|
439
427
|
const ButtonLink = props => {
|
|
440
428
|
const {
|
|
@@ -456,12 +444,10 @@ const ButtonLink = props => {
|
|
|
456
444
|
ariaLabel = '',
|
|
457
445
|
ariaHidden = false
|
|
458
446
|
} = props;
|
|
459
|
-
|
|
460
447
|
const getRelationshipAttributes = () => {
|
|
461
448
|
if (rel && rel !== '') return rel;
|
|
462
449
|
return blank ? 'noopener noreferrer' : '';
|
|
463
450
|
};
|
|
464
|
-
|
|
465
451
|
return /*#__PURE__*/React.createElement(ButtonLinkStyle, {
|
|
466
452
|
variant: variant,
|
|
467
453
|
rounded: rounded,
|
|
@@ -496,34 +482,53 @@ const {
|
|
|
496
482
|
} = colors;
|
|
497
483
|
const CheckboxWrapper = /*#__PURE__*/_styled.label.withConfig({
|
|
498
484
|
displayName: "styles__CheckboxWrapper",
|
|
499
|
-
componentId: "w5t014-0"
|
|
485
|
+
componentId: "sc-w5t014-0"
|
|
500
486
|
})(["display:flex;position:relative;padding-left:0;cursor:", ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;&:hover input:not(:disabled) ~ span{border-color:", ";}span{color:", ";border-color:", ";}"], props => props.disabled ? 'auto' : 'pointer', props => props.error ? darkRed : normal$1, props => props.disabled ? grey$1 : props.error ? red : null, props => props.error ? red : null);
|
|
501
487
|
const CheckboxLabel = /*#__PURE__*/_styled.span.withConfig({
|
|
502
488
|
displayName: "styles__CheckboxLabel",
|
|
503
|
-
componentId: "w5t014-1"
|
|
489
|
+
componentId: "sc-w5t014-1"
|
|
504
490
|
})(["margin-left:calc(", " + ", ");line-height:", ";"], /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('24px'));
|
|
505
491
|
const CheckboxInput = /*#__PURE__*/_styled.input.withConfig({
|
|
506
492
|
displayName: "styles__CheckboxInput",
|
|
507
|
-
componentId: "w5t014-2"
|
|
493
|
+
componentId: "sc-w5t014-2"
|
|
508
494
|
})(["position:absolute;left:0;opacity:0;cursor:pointer;&:checked:not(:disabled)[aria-checked='true'] ~ span{background-color:", ";border-color:", ";&:after{display:block;}}&:checked:disabled[aria-checked='true'] ~ span{border-color:transparent;background-color:", ";color:", ";&:after{display:block;}}&:not(:checked):disabled ~ span{border-color:", ";background-color:", ";}&:hover:not(:disabled){border-color:", ";&:checked ~ span{border-color:", ";}}"], props => props.error ? red : green, props => props.error ? darkRed : darkGreen, lightGrey$1, grey$1, lightGrey$1, light$1, props => props.error ? darkRed : darkGreen, props => props.error ? darkRed : darkGreen);
|
|
509
495
|
const Checkmark = /*#__PURE__*/_styled.span.withConfig({
|
|
510
496
|
displayName: "styles__Checkmark",
|
|
511
|
-
componentId: "w5t014-3"
|
|
512
|
-
})(["position:absolute;top:0;left:0;border:", " solid ", ";border-radius:100%;width:", ";height:", ";transition-duration:0.3s;&:after{content:'';position:absolute;display:none;top:", ";left:", ";width:", ";height:", ";border:solid ", ";border-width:0 ", " ", " 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}"], /*#__PURE__*/rem('2px'), props => props.error ? red : grey$1, /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('9px'), light$1, /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('3px'));
|
|
497
|
+
componentId: "sc-w5t014-3"
|
|
498
|
+
})(["position:absolute;top:0;left:0;border:", " solid ", ";border-radius:100%;width:", ";height:", ";transition-duration:0.3s;&:after{display:block;content:'';position:absolute;display:none;top:", ";left:", ";width:", ";height:", ";border:solid ", ";border-width:0 ", " ", " 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}&.checked.not-disabled{background-color:", ";border-color:", ";&:after{display:block;}}&.checked.disabled{color:", ";border-color:transparent;background-color:", ";&:after{display:block;}}&.not-checked.disabled{border-color:", ";background-color:", ";}&.not-disabled:hover{border-color:", ";&:checked ~ span{border-color:", ";}}"], /*#__PURE__*/rem('2px'), props => props.error ? red : grey$1, /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('9px'), light$1, /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('3px'), props => props.error ? red : green, props => props.error ? darkRed : darkGreen, grey$1, lightGrey$1, lightGrey$1, light$1, props => props.error ? darkRed : darkGreen, props => props.error ? darkRed : darkGreen);
|
|
513
499
|
|
|
514
|
-
const Checkbox =
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
500
|
+
const Checkbox = ({
|
|
501
|
+
label,
|
|
502
|
+
value,
|
|
503
|
+
checked = false,
|
|
504
|
+
onChange = () => {},
|
|
505
|
+
error = false,
|
|
506
|
+
disabled = false,
|
|
507
|
+
className = 'checkbox',
|
|
508
|
+
style,
|
|
509
|
+
dataTestId,
|
|
510
|
+
required = false
|
|
511
|
+
}) => {
|
|
512
|
+
const checkedRef = useRef(checked);
|
|
513
|
+
const [isChecked, setIsChecked] = useState(checked);
|
|
514
|
+
const handleOnChange = event => {
|
|
515
|
+
setIsChecked(prev => !prev);
|
|
516
|
+
onChange(event);
|
|
517
|
+
};
|
|
518
|
+
const checkmarkClassName = useMemo(() => {
|
|
519
|
+
let isCheckStr = '';
|
|
520
|
+
let isDisabledStr = '';
|
|
521
|
+
// if they are different
|
|
522
|
+
// use the value coming from the props
|
|
523
|
+
// as it is the source of truth
|
|
524
|
+
if (checked !== checkedRef.current) {
|
|
525
|
+
setIsChecked(checked);
|
|
526
|
+
checkedRef.current = checked;
|
|
527
|
+
isCheckStr = checked ? 'checked' : 'not-checked';
|
|
528
|
+
} else if (isChecked) isCheckStr = 'checked';else isCheckStr = 'not-checked';
|
|
529
|
+
if (disabled) isDisabledStr = 'disabled';else isDisabledStr = 'not-disabled';
|
|
530
|
+
return `${isCheckStr} ${isDisabledStr}`;
|
|
531
|
+
}, [checked, isChecked, disabled]);
|
|
527
532
|
return /*#__PURE__*/React.createElement(CheckboxWrapper, {
|
|
528
533
|
style: style,
|
|
529
534
|
className: className,
|
|
@@ -532,14 +537,17 @@ const Checkbox = props => {
|
|
|
532
537
|
}, /*#__PURE__*/React.createElement(CheckboxLabel, null, label), /*#__PURE__*/React.createElement(CheckboxInput, {
|
|
533
538
|
type: "checkbox",
|
|
534
539
|
name: value,
|
|
535
|
-
defaultChecked:
|
|
536
|
-
"aria-checked":
|
|
537
|
-
onChange:
|
|
540
|
+
defaultChecked: isChecked,
|
|
541
|
+
"aria-checked": isChecked,
|
|
542
|
+
onChange: handleOnChange,
|
|
538
543
|
error: error,
|
|
539
544
|
disabled: disabled,
|
|
540
545
|
"data-testid": dataTestId,
|
|
541
546
|
required: required
|
|
542
|
-
}), /*#__PURE__*/React.createElement(Checkmark,
|
|
547
|
+
}), /*#__PURE__*/React.createElement(Checkmark, {
|
|
548
|
+
className: checkmarkClassName,
|
|
549
|
+
error: error
|
|
550
|
+
}));
|
|
543
551
|
};
|
|
544
552
|
|
|
545
553
|
const {
|
|
@@ -551,19 +559,19 @@ const {
|
|
|
551
559
|
} = colors;
|
|
552
560
|
const CheckboxWrapper$1 = /*#__PURE__*/_styled.label.withConfig({
|
|
553
561
|
displayName: "styles__CheckboxWrapper",
|
|
554
|
-
componentId: "itly0z-0"
|
|
562
|
+
componentId: "sc-itly0z-0"
|
|
555
563
|
})(["border:", " solid ", ";border-radius:", ";background-color:", ";height:", ";display:flex;align-items:center;position:relative;cursor:", ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-duration:0.3s;&:hover input:not(:disabled) ~ span{border-color:", ";}&:hover{background-color:", ";}span{color:", ";transition-duration:0.3s;}"], /*#__PURE__*/rem('3px'), props => props.disabled ? grey$2 : props.checked ? darkGreen$1 : grey$2, /*#__PURE__*/rem('6px'), props => props.disabled ? lightGrey$2 : props.checked ? green$1 : light$2, /*#__PURE__*/rem('50px'), props => props.disabled ? 'auto' : 'pointer', grey$2, props => props.disabled ? lightGrey$2 : props.checked ? green$1 : lightGrey$2, props => props.disabled ? grey$2 : props.checked ? light$2 : null);
|
|
556
564
|
const CheckboxLabel$1 = /*#__PURE__*/_styled.span.withConfig({
|
|
557
565
|
displayName: "styles__CheckboxLabel",
|
|
558
|
-
componentId: "itly0z-1"
|
|
566
|
+
componentId: "sc-itly0z-1"
|
|
559
567
|
})(["margin-left:", ";line-height:", ";"], /*#__PURE__*/rem('40px'), /*#__PURE__*/rem('24px'));
|
|
560
568
|
const CheckboxInput$1 = /*#__PURE__*/_styled.input.withConfig({
|
|
561
569
|
displayName: "styles__CheckboxInput",
|
|
562
|
-
componentId: "itly0z-2"
|
|
570
|
+
componentId: "sc-itly0z-2"
|
|
563
571
|
})(["position:absolute;left:0;opacity:0;cursor:pointer;&:checked:not(:disabled) ~ span{background-color:", ";border-color:", ";&:after{display:block;}}&:checked:disabled ~ span{border-color:transparent;background-color:", ";color:", ";&:after{display:block;}}&:not(:checked):disabled ~ span{border-color:", ";background-color:", ";}&:hover:not(:disabled){&:checked ~ span{border-color:", ";}}"], light$2, light$2, grey$2, grey$2, grey$2, lightGrey$2, light$2);
|
|
564
572
|
const Checkmark$1 = /*#__PURE__*/_styled.span.withConfig({
|
|
565
573
|
displayName: "styles__Checkmark",
|
|
566
|
-
componentId: "itly0z-3"
|
|
574
|
+
componentId: "sc-itly0z-3"
|
|
567
575
|
})(["position:absolute;left:", ";border:", " solid ", ";border-radius:999px;background-color:", ";width:", ";height:", ";transition-duration:0.3s;&:after{content:'';position:absolute;display:none;top:", ";left:", ";width:", ";height:", ";border:solid ", ";border-width:0 ", " ", " 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}"], /*#__PURE__*/rem('10px'), /*#__PURE__*/rem('2px'), grey$2, light$2, /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('9px'), props => props.disabled ? light$2 : green$1, /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('3px'));
|
|
568
576
|
|
|
569
577
|
const CheckboxButton = props => {
|
|
@@ -978,13 +986,12 @@ const {
|
|
|
978
986
|
} = typography;
|
|
979
987
|
const LabelStyle = /*#__PURE__*/_styled.label.withConfig({
|
|
980
988
|
displayName: "styles__LabelStyle",
|
|
981
|
-
componentId: "pbv9we-0"
|
|
989
|
+
componentId: "sc-pbv9we-0"
|
|
982
990
|
})(["display:flex;align-items:center;font-size:0.75rem;font-weight:", ";color:", ";text-transform:uppercase;svg{width:auto;height:", ";}"], bold, grey$6, /*#__PURE__*/rem('15px'));
|
|
983
991
|
|
|
984
992
|
const {
|
|
985
993
|
grey: grey$7
|
|
986
994
|
} = colors;
|
|
987
|
-
|
|
988
995
|
const Label = props => {
|
|
989
996
|
const {
|
|
990
997
|
value,
|
|
@@ -1014,13 +1021,12 @@ const rotation = keyframes`
|
|
|
1014
1021
|
`;
|
|
1015
1022
|
const Loading = /*#__PURE__*/_styled.div.withConfig({
|
|
1016
1023
|
displayName: "styles__Loading",
|
|
1017
|
-
componentId: "sxnx45-0"
|
|
1024
|
+
componentId: "sc-sxnx45-0"
|
|
1018
1025
|
})(["border:", " solid hsla(0,0%,48%,0.5);border-top-color:", ";border-radius:50%;width:", ";height:", ";animation:", " 0.8s ease infinite;"], /*#__PURE__*/rem('5px'), props => props.fill || light$4, props => props.size || rem('20px'), props => props.size || rem('20px'), rotation);
|
|
1019
1026
|
|
|
1020
1027
|
const {
|
|
1021
1028
|
grey: grey$8
|
|
1022
1029
|
} = colors;
|
|
1023
|
-
|
|
1024
1030
|
const Spinner = props => {
|
|
1025
1031
|
const {
|
|
1026
1032
|
fill = grey$8,
|
|
@@ -1041,11 +1047,9 @@ const TagWrapper = /*#__PURE__*/_styled.span.withConfig({
|
|
|
1041
1047
|
componentId: "sc-1ghratr-0"
|
|
1042
1048
|
})(["--bg:", ";--txt:", ";display:inline-block;border:", " solid var(--bg);border-radius:", ";background-color:", ";padding:", " ", ";font-size:", ";font-weight:", ";text-transform:uppercase;letter-spacing:", ";line-height:1;color:", ";white-space:nowrap;"], props => {
|
|
1043
1049
|
var _props$color;
|
|
1044
|
-
|
|
1045
1050
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
1046
1051
|
}, props => {
|
|
1047
1052
|
var _props$txtColor;
|
|
1048
|
-
|
|
1049
1053
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
1050
1054
|
}, /*#__PURE__*/rem('2px'), /*#__PURE__*/rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('8px'), /*#__PURE__*/rem('12px'), typography.medium, /*#__PURE__*/rem('1px'), props => props.variant === 'solid' ? 'var(--txt)' : 'var(--bg)');
|
|
1051
1055
|
|
|
@@ -1070,14 +1074,12 @@ const Tag = props => {
|
|
|
1070
1074
|
|
|
1071
1075
|
const TagWrapper$1 = /*#__PURE__*/_styled.div.withConfig({
|
|
1072
1076
|
displayName: "styles__TagWrapper",
|
|
1073
|
-
componentId: "db57da-0"
|
|
1077
|
+
componentId: "sc-db57da-0"
|
|
1074
1078
|
})(["--bg:", ";--valueColor:", ";display:flex;border:", " solid var(--bg);border-radius:", ";line-height:1;max-width:100%;width:max-content;overflow:hidden;span{display:inline-block;padding:", " ", ";font-size:", ";font-weight:", ";letter-spacing:", ";&.label{flex:1;color:var(--bg);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;}&.value{background-color:var(--bg);color:var(--valueColor);}}&:not(:first-child){margin-left:", ";}"], props => {
|
|
1075
1079
|
var _props$color;
|
|
1076
|
-
|
|
1077
1080
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
1078
1081
|
}, props => {
|
|
1079
1082
|
var _props$valueColor;
|
|
1080
|
-
|
|
1081
1083
|
return useColor((_props$valueColor = props.valueColor) != null ? _props$valueColor : 'black').color;
|
|
1082
1084
|
}, /*#__PURE__*/rem('2px'), /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('3px'), /*#__PURE__*/rem('8px'), /*#__PURE__*/rem('12px'), typography.medium, /*#__PURE__*/rem('1px'), /*#__PURE__*/rem('5px'));
|
|
1083
1085
|
|
|
@@ -1257,6 +1259,7 @@ const SelectWrapper = _styled.div`
|
|
|
1257
1259
|
}
|
|
1258
1260
|
|
|
1259
1261
|
&__value-container {
|
|
1262
|
+
display: flex;
|
|
1260
1263
|
align-items: center;
|
|
1261
1264
|
padding: 0 ${/*#__PURE__*/rem('15px')};
|
|
1262
1265
|
}
|
|
@@ -1322,6 +1325,10 @@ const SelectWrapper = _styled.div`
|
|
|
1322
1325
|
|
|
1323
1326
|
.select__value-container.select__value-container--is-multi > div {
|
|
1324
1327
|
align-items: stretch;
|
|
1328
|
+
|
|
1329
|
+
.select__multi-value__remove {
|
|
1330
|
+
padding-right: 0;
|
|
1331
|
+
}
|
|
1325
1332
|
}
|
|
1326
1333
|
|
|
1327
1334
|
.select__value-container,
|
|
@@ -1367,10 +1374,8 @@ const SelectGroupLabel = _styled.span`
|
|
|
1367
1374
|
const {
|
|
1368
1375
|
Option
|
|
1369
1376
|
} = components;
|
|
1370
|
-
const FormatGroupLabel =
|
|
1371
|
-
|
|
1372
|
-
options
|
|
1373
|
-
}) => {
|
|
1377
|
+
const FormatGroupLabel = props => {
|
|
1378
|
+
var _props$options;
|
|
1374
1379
|
return /*#__PURE__*/React.createElement("div", {
|
|
1375
1380
|
style: {
|
|
1376
1381
|
display: 'flex',
|
|
@@ -1379,16 +1384,22 @@ const FormatGroupLabel = ({
|
|
|
1379
1384
|
}
|
|
1380
1385
|
}, /*#__PURE__*/React.createElement(SelectGroupLabel, {
|
|
1381
1386
|
className: "selective-options-group-label"
|
|
1382
|
-
}, label), /*#__PURE__*/React.createElement(Tag, {
|
|
1383
|
-
value: `${options == null ? void 0 : options.length}`
|
|
1387
|
+
}, props.label), /*#__PURE__*/React.createElement(Tag, {
|
|
1388
|
+
value: `${(_props$options = props.options) == null ? void 0 : _props$options.length}`
|
|
1384
1389
|
}));
|
|
1385
1390
|
};
|
|
1386
1391
|
const CustomSelectOption = (props, commonProps) => /*#__PURE__*/React.createElement(Option, Object.assign({}, props, commonProps), props.data.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
1387
1392
|
icon: props.data.icon
|
|
1388
|
-
}) : props.data.customImage ?
|
|
1393
|
+
}) : props.data.customImage ? /*#__PURE__*/React.createElement("img", {
|
|
1394
|
+
src: props.data.customImage,
|
|
1395
|
+
alt: props.data.label
|
|
1396
|
+
}) : null, props.data.label);
|
|
1389
1397
|
const CustomSelectValue = props => /*#__PURE__*/React.createElement("div", null, props.data.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
1390
1398
|
icon: props.data.icon
|
|
1391
|
-
}) : props.data.customImage ?
|
|
1399
|
+
}) : props.data.customImage ? /*#__PURE__*/React.createElement("img", {
|
|
1400
|
+
src: props.data.customImage,
|
|
1401
|
+
alt: props.data.label
|
|
1402
|
+
}) : null, props.data.label);
|
|
1392
1403
|
|
|
1393
1404
|
const SelectInteractive = ({
|
|
1394
1405
|
name,
|
|
@@ -1936,7 +1947,6 @@ const Slideshow = props => {
|
|
|
1936
1947
|
title: `Slide ${index + 1} selected`
|
|
1937
1948
|
});
|
|
1938
1949
|
}
|
|
1939
|
-
|
|
1940
1950
|
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("button", {
|
|
1941
1951
|
onClick: onClickHandler,
|
|
1942
1952
|
onKeyDown: onClickHandler,
|
|
@@ -2138,13 +2148,11 @@ const Toggle = ({
|
|
|
2138
2148
|
// tracks the active state so it's easier to test
|
|
2139
2149
|
const [state, setState] = useState(checked);
|
|
2140
2150
|
const [id, setId] = useState('');
|
|
2141
|
-
|
|
2142
2151
|
const handleClick = value => {
|
|
2143
2152
|
if (disabled) return;
|
|
2144
2153
|
setState(value);
|
|
2145
2154
|
return onClick(value);
|
|
2146
2155
|
};
|
|
2147
|
-
|
|
2148
2156
|
useEffect(() => {
|
|
2149
2157
|
// If the ID stays outside the component
|
|
2150
2158
|
// it will be the same if we instantiate
|
|
@@ -2296,15 +2304,13 @@ const FilePicker = props => {
|
|
|
2296
2304
|
disabled = false
|
|
2297
2305
|
} = props;
|
|
2298
2306
|
const [fileName, setFileName] = useState(value ? value : placeholder);
|
|
2299
|
-
|
|
2300
2307
|
const getUploadedFileName = e => {
|
|
2301
2308
|
let files = e.target.files,
|
|
2302
|
-
|
|
2303
|
-
|
|
2309
|
+
value = e.target.value,
|
|
2310
|
+
fileName;
|
|
2304
2311
|
if (files && files.length > 1) fileName = `${files.length} ${pluralText}`;else fileName = value.split('\\').pop();
|
|
2305
2312
|
if (fileName) setFileName(fileName);
|
|
2306
2313
|
};
|
|
2307
|
-
|
|
2308
2314
|
return /*#__PURE__*/React.createElement(Wrapper$6, {
|
|
2309
2315
|
disabled: disabled,
|
|
2310
2316
|
minimal: minimal,
|
|
@@ -2386,7 +2392,6 @@ const ActionMenuList = props => {
|
|
|
2386
2392
|
}
|
|
2387
2393
|
}, /*#__PURE__*/React.createElement("span", null, value)))));
|
|
2388
2394
|
};
|
|
2389
|
-
|
|
2390
2395
|
const ActionsMenu = props => {
|
|
2391
2396
|
const {
|
|
2392
2397
|
ariaLabel = '',
|
|
@@ -2502,19 +2507,16 @@ const EmptyTable = props => {
|
|
|
2502
2507
|
const headCells = tableHead.map((value, index) => /*#__PURE__*/React.createElement("div", {
|
|
2503
2508
|
key: index
|
|
2504
2509
|
}, value));
|
|
2505
|
-
|
|
2506
2510
|
for (let i = 0; i < tableHead.length; i++) {
|
|
2507
2511
|
columns.push( /*#__PURE__*/React.createElement("div", {
|
|
2508
2512
|
key: i
|
|
2509
2513
|
}, /*#__PURE__*/React.createElement(EmptyTableCellText, null)));
|
|
2510
2514
|
}
|
|
2511
|
-
|
|
2512
2515
|
for (let i = 0; i < 3; i++) {
|
|
2513
2516
|
rows.push( /*#__PURE__*/React.createElement(EmptyTableRow, {
|
|
2514
2517
|
key: i
|
|
2515
2518
|
}, columns));
|
|
2516
2519
|
}
|
|
2517
|
-
|
|
2518
2520
|
return /*#__PURE__*/React.createElement(EmptyTableWrapper, null, /*#__PURE__*/React.createElement(EmptyTableOverlay, null, /*#__PURE__*/React.createElement("span", null, value)), /*#__PURE__*/React.createElement(EmptyTableHead, {
|
|
2519
2521
|
border: border
|
|
2520
2522
|
}, headCells), /*#__PURE__*/React.createElement(EmptyTableBody, {
|
|
@@ -2561,7 +2563,7 @@ const {
|
|
|
2561
2563
|
} = colors;
|
|
2562
2564
|
const Wrapper$7 = /*#__PURE__*/_styled.div.withConfig({
|
|
2563
2565
|
displayName: "styles__Wrapper",
|
|
2564
|
-
componentId: "d2fn4g-0"
|
|
2566
|
+
componentId: "sc-d2fn4g-0"
|
|
2565
2567
|
})(["--default:", ";--light:", ";--dark:", ";", " ", " ", " border-width:", ";border-style:solid;border-color:var(--default);border-radius:", ";background-color:var(--light);padding:", ";div{&:first-child{flex:1;}p{margin:0;}}", ""], grey$e, lightGrey$c, darkGrey$1, props => props.color === 'grey' && css`
|
|
2566
2568
|
--default: ${grey$e};
|
|
2567
2569
|
--light: ${lightGrey$c};
|
|
@@ -2642,15 +2644,15 @@ const {
|
|
|
2642
2644
|
} = typography;
|
|
2643
2645
|
const TableWrapper = /*#__PURE__*/_styled.div.withConfig({
|
|
2644
2646
|
displayName: "styles__TableWrapper",
|
|
2645
|
-
componentId: "vmoy3z-0"
|
|
2647
|
+
componentId: "sc-vmoy3z-0"
|
|
2646
2648
|
})(["position:relative;"]);
|
|
2647
2649
|
const OverflowWrapper = /*#__PURE__*/_styled.div.withConfig({
|
|
2648
2650
|
displayName: "styles__OverflowWrapper",
|
|
2649
|
-
componentId: "vmoy3z-1"
|
|
2651
|
+
componentId: "sc-vmoy3z-1"
|
|
2650
2652
|
})(["@media ", "{display:block;border-radius:", ";background:linear-gradient(to right,", " 30%,rgba(255,255,255,0)),linear-gradient(to right,rgba(255,255,255,0),", " 70%) 0 100%,radial-gradient( farthest-side at 0% 50%,rgba(0,0,0,0.2),rgba(0,0,0,0) ),radial-gradient( farthest-side at 100% 50%,rgba(0,0,0,0.2),rgba(0,0,0,0) ) 0 100%;background-repeat:no-repeat;background-color:#fff;background-size:", " 100%,", " 100%,", " 100%,", " 100%;background-position:0 0,100%,0 0,100%;background-attachment:local,local,scroll,scroll;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}"], device.s, /*#__PURE__*/rem('6px'), light$c, light$c, /*#__PURE__*/rem('40px'), /*#__PURE__*/rem('40px'), /*#__PURE__*/rem('14px'), /*#__PURE__*/rem('14px'));
|
|
2651
2653
|
const Table = /*#__PURE__*/_styled.table.withConfig({
|
|
2652
2654
|
displayName: "styles__Table",
|
|
2653
|
-
componentId: "vmoy3z-2"
|
|
2655
|
+
componentId: "sc-vmoy3z-2"
|
|
2654
2656
|
})(["width:100%;border-width:0;border-style:solid;border-color:", ";border-radius:", ";border-spacing:0;white-space:nowrap;@media ", "{border-width:", ";}th,td{height:", ";padding:0 ", ";&.center{text-align:center;> div{justify-content:center;}}&.right{text-align:right;> div{justify-content:flex-end;}}&.thin{@media ", "{max-width:min-content;}}&.kai{text-align:right;> div{justify-content:flex-end;}}&.avatar > div{display:flex;align-items:center;.avatar-img{margin-right:", ";}}}th{font-size:0.85rem;&:first-child{border-top-left-radius:", ";}&:last-child{border-top-right-radius:", ";}}tr{border:", " solid ", ";border-radius:", ";position:relative;&:not(:last-child){margin-bottom:", ";}@media ", "{border:0;}}thead{border:none;clip:rect(0 0 0 0);height:", ";margin:", ";overflow:hidden;padding:0;position:absolute;width:", ";@media ", "{display:contents;font-weight:", ";color:", ";text-transform:uppercase;text-align:left;}}tbody{tr{display:block;transition-duration:0.3s;&:hover{background-color:", ";td.menu{button{opacity:1;}}}@media ", "{display:table-row;}}td{border-top:", " solid ", ";height:inherit;min-height:", ";padding:", ";display:flex;justify-content:flex-end;align-items:center;> div{margin-left:", ";height:100%;display:flex;justify-content:flex-end;align-items:center;flex-wrap:nowrap;text-align:right;> span{display:none;&:first-child,&:last-child{display:inherit;}}}img{min-width:", ";min-height:", ";}a{display:flex;align-items:center;color:", ";text-decoration-color:", ";}&:first-child{border:0;}&:before{position:absolute;left:", ";content:attr(data-label);font-weight:", ";text-transform:capitalize;", "}&.kai{svg{float:right;width:auto;min-width:", ";max-height:", ";}}.avatar-img{display:none;}.tag{margin:0;&:not(:first-child){display:none;}}&.menu{padding:0 ", " 0 0;button{margin-top:", ";transition:0.3s;}ul{top:", ";margin-left:", ";}}@media ", "{display:table-cell;height:", ";padding:0 ", ";> div{position:relative;margin-left:0;display:flex-start;justify-content:flex-start;text-align:left;> span{display:inherit;}}&:first-child{border-top:", " solid ", ";}&:before{content:'';}&.kai{max-width:", ";}.avatar-img{display:inherit;}.tag{&:not(:first-child){display:inherit;}&:not(:last-child){margin-right:", ";}}&.menu{width:", ";button{opacity:0;}}}}}"], grey$f, /*#__PURE__*/rem('6px'), device.s, props => props.border ? rem('1px') : '0', /*#__PURE__*/rem('50px'), /*#__PURE__*/rem('15px'), device.s, /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('1px'), grey$f, /*#__PURE__*/rem('6px'), /*#__PURE__*/rem('15px'), device.s, /*#__PURE__*/rem('1px'), /*#__PURE__*/rem('-1px'), /*#__PURE__*/rem('1px'), device.s, bold$3, grey$f, props => props.loadingState ? 'transparent' : lightGrey$d, device.s, /*#__PURE__*/rem('1px'), grey$f, /*#__PURE__*/rem('50px'), /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('100px'), /*#__PURE__*/rem('30px'), /*#__PURE__*/rem('30px'), normal$7, grey$f, /*#__PURE__*/rem('15px'), bold$3, props => props.loadingState && css`
|
|
2655
2657
|
width: ${rem('75px')};
|
|
2656
2658
|
height: ${rem('15px')};
|
|
@@ -2672,7 +2674,7 @@ const Table = /*#__PURE__*/_styled.table.withConfig({
|
|
|
2672
2674
|
`, /*#__PURE__*/rem('20px'), /*#__PURE__*/rem('20px'), /*#__PURE__*/rem('10px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('36px'), /*#__PURE__*/rem('-170px'), device.s, /*#__PURE__*/rem('50px'), /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('1px'), grey$f, /*#__PURE__*/rem('100px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('40px'));
|
|
2673
2675
|
const SkeletonCell = /*#__PURE__*/_styled.div.withConfig({
|
|
2674
2676
|
displayName: "styles__SkeletonCell",
|
|
2675
|
-
componentId: "vmoy3z-3"
|
|
2677
|
+
componentId: "sc-vmoy3z-3"
|
|
2676
2678
|
})(["@keyframes placeholderSkeleton{0%{background-position:", " 0;}100%{background-position:", " 0;}}width:100%;height:", " !important;background:#f6f7f8;background-image:-webkit-linear-gradient( left,#f6f7f8 0%,#edeef1 20%,#f6f7f8 40%,#f6f7f8 100% );background-repeat:no-repeat;background-size:", " 100%;animation-fill-mode:forwards;animation-name:placeholderSkeleton;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:1.5s;"], /*#__PURE__*/rem('-800px'), /*#__PURE__*/rem('800px'), /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('800px'));
|
|
2677
2679
|
|
|
2678
2680
|
const Table$1 = props => {
|
|
@@ -2709,7 +2711,6 @@ const Table$1 = props => {
|
|
|
2709
2711
|
const headSkeleton = /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(SkeletonCell, null));
|
|
2710
2712
|
const cellSkeleton = /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(SkeletonCell, null));
|
|
2711
2713
|
const columnsSkeleton = columns.length > 0 ? columns.length : loadingColumns;
|
|
2712
|
-
|
|
2713
2714
|
if (showEmpty && !hasValues) {
|
|
2714
2715
|
const columnHeaders = columns.map(column => column.value);
|
|
2715
2716
|
return /*#__PURE__*/React.createElement(EmptyTable, {
|
|
@@ -2718,7 +2719,6 @@ const Table$1 = props => {
|
|
|
2718
2719
|
value: emptyValue
|
|
2719
2720
|
});
|
|
2720
2721
|
}
|
|
2721
|
-
|
|
2722
2722
|
return /*#__PURE__*/React.createElement(TableWrapper, null, /*#__PURE__*/React.createElement(OverflowWrapper, null, /*#__PURE__*/React.createElement(Table, {
|
|
2723
2723
|
border: border,
|
|
2724
2724
|
"data-testid": dataTestId,
|
|
@@ -2805,7 +2805,6 @@ const TableRow = /*#__PURE__*/_styled.tr.withConfig({
|
|
|
2805
2805
|
const {
|
|
2806
2806
|
light: light$d
|
|
2807
2807
|
} = colors;
|
|
2808
|
-
|
|
2809
2808
|
const TableDnD = props => {
|
|
2810
2809
|
const {
|
|
2811
2810
|
border = false,
|
|
@@ -2836,7 +2835,6 @@ const TableDnD = props => {
|
|
|
2836
2835
|
const hasActionMenu = actions.length > 0;
|
|
2837
2836
|
const validValues = values.filter(hasValue);
|
|
2838
2837
|
const hasValues = Array.isArray(values) && values.length > 0;
|
|
2839
|
-
|
|
2840
2838
|
if (showEmpty && !hasValues) {
|
|
2841
2839
|
const columnHeaders = columns.map(column => column.value);
|
|
2842
2840
|
return /*#__PURE__*/React.createElement(EmptyTable, {
|
|
@@ -2845,7 +2843,6 @@ const TableDnD = props => {
|
|
|
2845
2843
|
value: emptyValue
|
|
2846
2844
|
});
|
|
2847
2845
|
}
|
|
2848
|
-
|
|
2849
2846
|
const reorder = (list, startIndex, endIndex) => {
|
|
2850
2847
|
const result = Array.from(list);
|
|
2851
2848
|
const [removed] = result.splice(startIndex, 1);
|
|
@@ -2855,17 +2852,14 @@ const TableDnD = props => {
|
|
|
2855
2852
|
return dragItem;
|
|
2856
2853
|
});
|
|
2857
2854
|
};
|
|
2858
|
-
|
|
2859
2855
|
const getItemStyle = (isDragging, draggableStyle) => ({
|
|
2860
2856
|
userSelect: 'none',
|
|
2861
2857
|
background: isDragging ? light$d : 'transparent',
|
|
2862
2858
|
...draggableStyle
|
|
2863
2859
|
});
|
|
2864
|
-
|
|
2865
2860
|
const getListStyle = isDraggingOver => ({
|
|
2866
2861
|
background: isDraggingOver ? light$d : 'transparent'
|
|
2867
2862
|
});
|
|
2868
|
-
|
|
2869
2863
|
return (
|
|
2870
2864
|
/*#__PURE__*/
|
|
2871
2865
|
// @ts-ignore
|
|
@@ -2877,7 +2871,6 @@ const TableDnD = props => {
|
|
|
2877
2871
|
if (!result.destination) {
|
|
2878
2872
|
return;
|
|
2879
2873
|
}
|
|
2880
|
-
|
|
2881
2874
|
const newValues = reorder(values, result.source.index, result.destination.index);
|
|
2882
2875
|
onChange(newValues);
|
|
2883
2876
|
setDraggableId('');
|
|
@@ -2968,7 +2961,7 @@ const {
|
|
|
2968
2961
|
} = colors;
|
|
2969
2962
|
const Wrapper$8 = /*#__PURE__*/_styled.div.withConfig({
|
|
2970
2963
|
displayName: "styles__Wrapper",
|
|
2971
|
-
componentId: "mbja2a-0"
|
|
2964
|
+
componentId: "sc-mbja2a-0"
|
|
2972
2965
|
})(["display:inline-block;> label{margin-bottom:", ";color:", ";span{color:", ";}}&:not(:last-child){margin-bottom:", ";}"], /*#__PURE__*/rem('5px'), props => props.error ? red$9 : grey$h, props => props.error ? red$9 : normal$9, /*#__PURE__*/rem('15px'));
|
|
2973
2966
|
|
|
2974
2967
|
const FormGroup = props => {
|
|
@@ -3022,18 +3015,14 @@ const NumberInputSpinner = props => {
|
|
|
3022
3015
|
isFirstRender.current = false;
|
|
3023
3016
|
return;
|
|
3024
3017
|
}
|
|
3025
|
-
|
|
3026
3018
|
setNumber(value);
|
|
3027
3019
|
}, [value]);
|
|
3028
|
-
|
|
3029
3020
|
const updateValue = value => {
|
|
3030
3021
|
if (onChange) {
|
|
3031
3022
|
onChange(value);
|
|
3032
3023
|
}
|
|
3033
|
-
|
|
3034
3024
|
setNumber(value);
|
|
3035
3025
|
};
|
|
3036
|
-
|
|
3037
3026
|
return /*#__PURE__*/React.createElement(Wrapper$9, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
3038
3027
|
className: "remove-button",
|
|
3039
3028
|
"aria-label": decreaseAriaLabel,
|
|
@@ -3313,9 +3302,7 @@ const PaginationControl = props => {
|
|
|
3313
3302
|
if (window.innerWidth > 700) setPageDisplayed(3);
|
|
3314
3303
|
}
|
|
3315
3304
|
}
|
|
3316
|
-
|
|
3317
3305
|
updateDimensions();
|
|
3318
|
-
|
|
3319
3306
|
if (typeof window !== 'undefined') {
|
|
3320
3307
|
window.addEventListener('resize', updateDimensions);
|
|
3321
3308
|
}
|
|
@@ -5376,20 +5363,16 @@ const DataWarning = props => {
|
|
|
5376
5363
|
type = 'login',
|
|
5377
5364
|
children
|
|
5378
5365
|
} = props;
|
|
5379
|
-
|
|
5380
5366
|
switch (type) {
|
|
5381
5367
|
case 'login':
|
|
5382
5368
|
icon = /*#__PURE__*/React.createElement(IconLoginOnly, null);
|
|
5383
5369
|
break;
|
|
5384
|
-
|
|
5385
5370
|
case 'data':
|
|
5386
5371
|
icon = /*#__PURE__*/React.createElement(IconEmptyData, null);
|
|
5387
5372
|
break;
|
|
5388
|
-
|
|
5389
5373
|
default:
|
|
5390
5374
|
icon = /*#__PURE__*/React.createElement(IconLoginOnly, null);
|
|
5391
5375
|
}
|
|
5392
|
-
|
|
5393
5376
|
return /*#__PURE__*/React.createElement(Wrapper$c, {
|
|
5394
5377
|
type: type
|
|
5395
5378
|
}, icon, /*#__PURE__*/React.createElement("div", null, children));
|
|
@@ -5609,6 +5592,7 @@ const Field = _styled.div`
|
|
|
5609
5592
|
|
|
5610
5593
|
input {
|
|
5611
5594
|
flex: 1;
|
|
5595
|
+
margin-right: 0;
|
|
5612
5596
|
border-radius: ${/*#__PURE__*/rem('6px')} 0 0 ${/*#__PURE__*/rem('6px')};
|
|
5613
5597
|
|
|
5614
5598
|
&:focus {
|
|
@@ -5635,7 +5619,6 @@ const Field = _styled.div`
|
|
|
5635
5619
|
justify-content: center;
|
|
5636
5620
|
align-items: center;
|
|
5637
5621
|
padding: 0 ${/*#__PURE__*/rem('20px')};
|
|
5638
|
-
text-transform: uppercase;
|
|
5639
5622
|
white-space: nowrap;
|
|
5640
5623
|
transition-duration: 0.3s;
|
|
5641
5624
|
cursor: pointer;
|
|
@@ -5714,11 +5697,11 @@ const {
|
|
|
5714
5697
|
} = typography;
|
|
5715
5698
|
const Wrapper$g = /*#__PURE__*/_styled.div.withConfig({
|
|
5716
5699
|
displayName: "styles__Wrapper",
|
|
5717
|
-
componentId: "znznmm-0"
|
|
5700
|
+
componentId: "sc-znznmm-0"
|
|
5718
5701
|
})(["display:flex;align-items:center;ul.menu{width:0;animation:showAnimation 1s forwards;animation-delay:0.5s;overflow:hidden;}@keyframes showAnimation{0%{width:0%;}100%{width:100%;}}ul{margin:0;max-width:max-content;padding:0;&.menu{display:flex;li:not(:last-child){margin-right:", ";}}li{position:relative;list-style:none;a{display:flex;align-items:center;padding:", ";color:", ";text-transform:capitalize;text-decoration:none;white-space:nowrap;transition-duration:0.3s;svg{margin-right:", ";width:auto;height:", ";min-width:", ";fill:", ";transition-duration:0.3s;}&:hover{color:", ";svg{fill:", ";}}}&.active{font-weight:", ";a{pointer-events:none;svg{fill:", ";}}}}}"], /*#__PURE__*/rem('10px'), /*#__PURE__*/rem('10px'), normal$e, /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('24px'), grey$m, props => props.customColor ? props.customColor : purple500$5, props => props.customColor ? props.customColor : purple500$5, bold$8, props => props.customColor ? props.customColor : purple500$5);
|
|
5719
5702
|
const More = /*#__PURE__*/_styled.div.withConfig({
|
|
5720
5703
|
displayName: "styles__More",
|
|
5721
|
-
componentId: "znznmm-1"
|
|
5704
|
+
componentId: "sc-znznmm-1"
|
|
5722
5705
|
})(["position:relative;display:none;&.hide{display:initial;}ul{position:absolute;right:0;border:", " solid ", ";border-radius:", ";background-color:", ";margin-top:", ";padding:0;-moz-box-shadow:0 0 ", " 0 rgba(40,40,40,0.2);-webkit-box-shadow:0 0 ", " 0 rgba(40,40,40,0.2);box-shadow:0 0 ", " 0 rgba(40,40,40,0.2);z-index:1;overflow-x:hidden;overflow-y:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;&.more{display:none;}&.is-open{display:inherit;}li{list-style:none;transition-duration:0.3s;&:hover{background-color:", ";cursor:pointer;a{color:", ";svg{fill:", ";}}}&:first-child{border-radius:", " ", " 0 0;}&:last-child{border-radius:0 0 ", " ", ";}a{width:100%;height:100%;padding:", ";}}}"], /*#__PURE__*/rem('1px'), lightGrey$j, /*#__PURE__*/rem('4px'), light$i, /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('15px'), /*#__PURE__*/rem('15px'), lightGrey$j, normal$e, normal$e, /*#__PURE__*/rem('4px'), /*#__PURE__*/rem('4px'), /*#__PURE__*/rem('4px'), /*#__PURE__*/rem('4px'), /*#__PURE__*/rem('15px'));
|
|
5723
5706
|
|
|
5724
5707
|
const HorizontalNav = props => {
|
|
@@ -5740,37 +5723,29 @@ const HorizontalNav = props => {
|
|
|
5740
5723
|
if (!ref || !ref.current) return;
|
|
5741
5724
|
const visible = document.querySelector('ul.menu').getElementsByTagName('li');
|
|
5742
5725
|
const more = document.querySelector('.more').getElementsByTagName('li');
|
|
5743
|
-
|
|
5744
5726
|
const moreVisibility = () => more.length > 0 ? setShowMore(true) : setShowMore(false);
|
|
5745
|
-
|
|
5746
5727
|
const removeItem = () => {
|
|
5747
5728
|
if (visible.length === 1) return;
|
|
5748
5729
|
let last = visible[visible.length - 1];
|
|
5749
5730
|
document.querySelector('ul.more').prepend(last);
|
|
5750
5731
|
};
|
|
5751
|
-
|
|
5752
5732
|
const addItem = () => {
|
|
5753
5733
|
if (more.length === 0) return;
|
|
5754
5734
|
let first = more[0];
|
|
5755
5735
|
document.querySelector('ul.menu').append(first);
|
|
5756
5736
|
};
|
|
5757
|
-
|
|
5758
5737
|
const checkOverflow = () => {
|
|
5759
5738
|
moreVisibility();
|
|
5760
|
-
|
|
5761
5739
|
for (let i = 0; i < visible.length + 20; i++) {
|
|
5762
5740
|
visibleMenuRef.current.scrollWidth + 50 > ref.current.offsetWidth ? removeItem() : addItem();
|
|
5763
5741
|
}
|
|
5764
5742
|
};
|
|
5765
|
-
|
|
5766
5743
|
checkOverflow();
|
|
5767
|
-
|
|
5768
5744
|
if (typeof window !== 'undefined') {
|
|
5769
5745
|
moreVisibility();
|
|
5770
5746
|
window.addEventListener('resize', checkOverflow);
|
|
5771
5747
|
return () => window.removeEventListener('resize', checkOverflow);
|
|
5772
5748
|
}
|
|
5773
|
-
|
|
5774
5749
|
return;
|
|
5775
5750
|
}, [ref]);
|
|
5776
5751
|
return /*#__PURE__*/React.createElement(Wrapper$g, {
|
|
@@ -5914,21 +5889,25 @@ const ModalDrawer = props => {
|
|
|
5914
5889
|
footerHidden = false,
|
|
5915
5890
|
zIndex = 10
|
|
5916
5891
|
} = props;
|
|
5892
|
+
useEffect(() => {
|
|
5893
|
+
if (isShowing && typeof window !== 'undefined') {
|
|
5894
|
+
document.documentElement.style.overflow = 'hidden';
|
|
5895
|
+
} else {
|
|
5896
|
+
document.documentElement.style.overflow = '';
|
|
5897
|
+
}
|
|
5898
|
+
}, [isShowing]);
|
|
5917
5899
|
useEffect(() => {
|
|
5918
5900
|
const fixViewport = () => {
|
|
5919
5901
|
let vh = window.innerHeight * 0.01;
|
|
5920
5902
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
5921
5903
|
};
|
|
5922
|
-
|
|
5923
5904
|
fixViewport();
|
|
5924
|
-
|
|
5925
5905
|
if (typeof window !== 'undefined') {
|
|
5926
5906
|
let vh = window.innerHeight * 0.01;
|
|
5927
5907
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
5928
5908
|
window.addEventListener('resize', fixViewport);
|
|
5929
5909
|
return () => window.removeEventListener('resize', fixViewport);
|
|
5930
5910
|
}
|
|
5931
|
-
|
|
5932
5911
|
return;
|
|
5933
5912
|
}, []);
|
|
5934
5913
|
return isShowing ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ModalOverlay$1, {
|
|
@@ -6062,14 +6041,12 @@ const LoadingState = props => {
|
|
|
6062
6041
|
let paragraphs = [];
|
|
6063
6042
|
let cards = [];
|
|
6064
6043
|
let loadingType;
|
|
6065
|
-
|
|
6066
6044
|
for (let i = 0; i < lines; i++) {
|
|
6067
6045
|
paragraphs.push( /*#__PURE__*/React.createElement("div", {
|
|
6068
6046
|
key: i,
|
|
6069
6047
|
className: "paragraph"
|
|
6070
6048
|
}));
|
|
6071
6049
|
}
|
|
6072
|
-
|
|
6073
6050
|
for (let i = 0; i < cardsNumber; i++) {
|
|
6074
6051
|
cards.push( /*#__PURE__*/React.createElement("div", {
|
|
6075
6052
|
key: i,
|
|
@@ -6090,7 +6067,6 @@ const LoadingState = props => {
|
|
|
6090
6067
|
className: "paragraph"
|
|
6091
6068
|
})));
|
|
6092
6069
|
}
|
|
6093
|
-
|
|
6094
6070
|
switch (type) {
|
|
6095
6071
|
case 'text':
|
|
6096
6072
|
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6099,19 +6075,16 @@ const LoadingState = props => {
|
|
|
6099
6075
|
className: "subtitle"
|
|
6100
6076
|
}), paragraphs));
|
|
6101
6077
|
break;
|
|
6102
|
-
|
|
6103
6078
|
case 'card':
|
|
6104
6079
|
loadingType = /*#__PURE__*/React.createElement(Grid, {
|
|
6105
6080
|
center: center
|
|
6106
6081
|
}, cards);
|
|
6107
6082
|
break;
|
|
6108
|
-
|
|
6109
6083
|
case 'value':
|
|
6110
6084
|
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
6111
6085
|
className: "value"
|
|
6112
6086
|
})));
|
|
6113
6087
|
break;
|
|
6114
|
-
|
|
6115
6088
|
default:
|
|
6116
6089
|
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
6117
6090
|
className: "title"
|
|
@@ -6119,7 +6092,6 @@ const LoadingState = props => {
|
|
|
6119
6092
|
className: "subtitle"
|
|
6120
6093
|
}), paragraphs));
|
|
6121
6094
|
}
|
|
6122
|
-
|
|
6123
6095
|
return /*#__PURE__*/React.createElement(Wrapper$h, {
|
|
6124
6096
|
type: type
|
|
6125
6097
|
}, loadingType);
|
|
@@ -6299,7 +6271,6 @@ const TabsPanel = props => {
|
|
|
6299
6271
|
onChange,
|
|
6300
6272
|
tabs
|
|
6301
6273
|
} = props;
|
|
6302
|
-
|
|
6303
6274
|
const getTabs = () => {
|
|
6304
6275
|
return tabs.map((tab, index) => ({
|
|
6305
6276
|
key: index,
|
|
@@ -6309,7 +6280,6 @@ const TabsPanel = props => {
|
|
|
6309
6280
|
getContent: () => tab.renderer
|
|
6310
6281
|
}));
|
|
6311
6282
|
};
|
|
6312
|
-
|
|
6313
6283
|
return /*#__PURE__*/React.createElement(Wrapper$i, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
6314
6284
|
transform: false,
|
|
6315
6285
|
unmountOnExit: unmountOnExit,
|