@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
|
@@ -190,16 +190,15 @@ const typography = {
|
|
|
190
190
|
defaultSize: '16px',
|
|
191
191
|
regular: 400,
|
|
192
192
|
medium: 500,
|
|
193
|
-
bold: 700
|
|
194
|
-
letterSpacing: /*#__PURE__*/polished.rem('1px')
|
|
193
|
+
bold: 700
|
|
195
194
|
};
|
|
196
195
|
const button = {
|
|
197
|
-
height: /*#__PURE__*/polished.rem('
|
|
196
|
+
height: /*#__PURE__*/polished.rem('44px'),
|
|
198
197
|
borderWidth: /*#__PURE__*/polished.rem('1px'),
|
|
199
198
|
borderRadius: /*#__PURE__*/polished.rem('8px'),
|
|
200
|
-
padding: /*#__PURE__*/polished.rem('
|
|
201
|
-
iconSpacing: /*#__PURE__*/polished.rem('
|
|
202
|
-
iconSize: /*#__PURE__*/polished.rem('
|
|
199
|
+
padding: /*#__PURE__*/polished.rem('24px'),
|
|
200
|
+
iconSpacing: /*#__PURE__*/polished.rem('14px'),
|
|
201
|
+
iconSize: /*#__PURE__*/polished.rem('20px')
|
|
203
202
|
};
|
|
204
203
|
const misc = {
|
|
205
204
|
transitionDuration: '0.3s'
|
|
@@ -247,16 +246,14 @@ const useColor = value => {
|
|
|
247
246
|
const c = value.split(/([0-9]+)/).filter(Boolean);
|
|
248
247
|
const tint = c[0];
|
|
249
248
|
const hue = parseFloat(c[1]);
|
|
250
|
-
|
|
251
249
|
const getHoverColor = (tint, hue) => {
|
|
252
250
|
const indexCurrentHue = colorHues.indexOf(hue);
|
|
253
251
|
const indexIsLast = indexCurrentHue === colorHues.length - 1;
|
|
254
|
-
const indexHoverHue = indexIsLast ? indexCurrentHue - 1 : indexCurrentHue + 1;
|
|
255
|
-
|
|
252
|
+
const indexHoverHue = indexIsLast ? indexCurrentHue - 1 : indexCurrentHue + 1;
|
|
253
|
+
// @ts-ignore
|
|
256
254
|
const hoverColor = colors == null ? void 0 : colors[indexCurrentHue > -1 ? tint + colorHues[indexHoverHue] : tint];
|
|
257
255
|
return hoverColor != null ? hoverColor : colors.black;
|
|
258
256
|
};
|
|
259
|
-
|
|
260
257
|
const hover = getHoverColor(tint, hue);
|
|
261
258
|
return {
|
|
262
259
|
color,
|
|
@@ -266,20 +263,17 @@ const useColor = value => {
|
|
|
266
263
|
|
|
267
264
|
const ButtonWrapper = /*#__PURE__*/_styled__default.button.withConfig({
|
|
268
265
|
displayName: "styles__ButtonWrapper",
|
|
269
|
-
componentId: "baestp-0"
|
|
270
|
-
})(["--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:", ";
|
|
266
|
+
componentId: "sc-baestp-0"
|
|
267
|
+
})(["--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 => {
|
|
271
268
|
var _props$color;
|
|
272
|
-
|
|
273
269
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
274
270
|
}, props => {
|
|
275
271
|
var _props$txtColor;
|
|
276
|
-
|
|
277
272
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
278
273
|
}, props => {
|
|
279
274
|
var _props$color2;
|
|
280
|
-
|
|
281
275
|
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').hover;
|
|
282
|
-
}, 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 ? polished.rem('80px') : polished.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__*/polished.rem(typography.defaultSize), typography.medium,
|
|
276
|
+
}, 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 ? polished.rem('80px') : polished.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__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.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);
|
|
283
277
|
|
|
284
278
|
const Button = props => {
|
|
285
279
|
const {
|
|
@@ -335,15 +329,12 @@ const ActionsMenuStyle = /*#__PURE__*/_styled__default.div.withConfig({
|
|
|
335
329
|
function useVisible(initialIsVisible) {
|
|
336
330
|
const [isVisible, setIsVisible] = React.useState(initialIsVisible);
|
|
337
331
|
const ref = React.useRef(null);
|
|
338
|
-
|
|
339
332
|
const handleClickOutside = event => {
|
|
340
333
|
if (!ref || !ref.current) return;
|
|
341
|
-
|
|
342
334
|
if (!ref.current.contains(event.target)) {
|
|
343
335
|
setIsVisible(false);
|
|
344
336
|
}
|
|
345
337
|
};
|
|
346
|
-
|
|
347
338
|
React.useEffect(() => {
|
|
348
339
|
document.addEventListener('click', handleClickOutside, false);
|
|
349
340
|
return () => {
|
|
@@ -430,20 +421,17 @@ const ButtonDropdown = props => {
|
|
|
430
421
|
|
|
431
422
|
const ButtonLinkStyle = /*#__PURE__*/_styled__default.a.withConfig({
|
|
432
423
|
displayName: "styles__ButtonLinkStyle",
|
|
433
|
-
componentId: "clge7v-0"
|
|
434
|
-
})(["--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:", ";
|
|
424
|
+
componentId: "sc-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:", ";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 => {
|
|
435
426
|
var _props$color;
|
|
436
|
-
|
|
437
427
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
438
428
|
}, props => {
|
|
439
429
|
var _props$txtColor;
|
|
440
|
-
|
|
441
430
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
442
431
|
}, props => {
|
|
443
432
|
var _props$color2;
|
|
444
|
-
|
|
445
433
|
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').hover;
|
|
446
|
-
}, 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 ? polished.rem('80px') : polished.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__*/polished.rem(typography.defaultSize), typography.medium,
|
|
434
|
+
}, 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 ? polished.rem('80px') : polished.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__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.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);
|
|
447
435
|
|
|
448
436
|
const ButtonLink = props => {
|
|
449
437
|
const {
|
|
@@ -465,12 +453,10 @@ const ButtonLink = props => {
|
|
|
465
453
|
ariaLabel = '',
|
|
466
454
|
ariaHidden = false
|
|
467
455
|
} = props;
|
|
468
|
-
|
|
469
456
|
const getRelationshipAttributes = () => {
|
|
470
457
|
if (rel && rel !== '') return rel;
|
|
471
458
|
return blank ? 'noopener noreferrer' : '';
|
|
472
459
|
};
|
|
473
|
-
|
|
474
460
|
return /*#__PURE__*/React__default.createElement(ButtonLinkStyle, {
|
|
475
461
|
variant: variant,
|
|
476
462
|
rounded: rounded,
|
|
@@ -505,34 +491,53 @@ const {
|
|
|
505
491
|
} = colors;
|
|
506
492
|
const CheckboxWrapper = /*#__PURE__*/_styled__default.label.withConfig({
|
|
507
493
|
displayName: "styles__CheckboxWrapper",
|
|
508
|
-
componentId: "w5t014-0"
|
|
494
|
+
componentId: "sc-w5t014-0"
|
|
509
495
|
})(["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);
|
|
510
496
|
const CheckboxLabel = /*#__PURE__*/_styled__default.span.withConfig({
|
|
511
497
|
displayName: "styles__CheckboxLabel",
|
|
512
|
-
componentId: "w5t014-1"
|
|
498
|
+
componentId: "sc-w5t014-1"
|
|
513
499
|
})(["margin-left:calc(", " + ", ");line-height:", ";"], /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('24px'));
|
|
514
500
|
const CheckboxInput = /*#__PURE__*/_styled__default.input.withConfig({
|
|
515
501
|
displayName: "styles__CheckboxInput",
|
|
516
|
-
componentId: "w5t014-2"
|
|
502
|
+
componentId: "sc-w5t014-2"
|
|
517
503
|
})(["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);
|
|
518
504
|
const Checkmark = /*#__PURE__*/_styled__default.span.withConfig({
|
|
519
505
|
displayName: "styles__Checkmark",
|
|
520
|
-
componentId: "w5t014-3"
|
|
521
|
-
})(["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__*/polished.rem('2px'), props => props.error ? red : grey$1, /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('9px'), light$1, /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('3px'));
|
|
506
|
+
componentId: "sc-w5t014-3"
|
|
507
|
+
})(["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__*/polished.rem('2px'), props => props.error ? red : grey$1, /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('9px'), light$1, /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.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);
|
|
522
508
|
|
|
523
|
-
const Checkbox =
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
509
|
+
const Checkbox = ({
|
|
510
|
+
label,
|
|
511
|
+
value,
|
|
512
|
+
checked = false,
|
|
513
|
+
onChange = () => {},
|
|
514
|
+
error = false,
|
|
515
|
+
disabled = false,
|
|
516
|
+
className = 'checkbox',
|
|
517
|
+
style,
|
|
518
|
+
dataTestId,
|
|
519
|
+
required = false
|
|
520
|
+
}) => {
|
|
521
|
+
const checkedRef = React.useRef(checked);
|
|
522
|
+
const [isChecked, setIsChecked] = React.useState(checked);
|
|
523
|
+
const handleOnChange = event => {
|
|
524
|
+
setIsChecked(prev => !prev);
|
|
525
|
+
onChange(event);
|
|
526
|
+
};
|
|
527
|
+
const checkmarkClassName = React.useMemo(() => {
|
|
528
|
+
let isCheckStr = '';
|
|
529
|
+
let isDisabledStr = '';
|
|
530
|
+
// if they are different
|
|
531
|
+
// use the value coming from the props
|
|
532
|
+
// as it is the source of truth
|
|
533
|
+
if (checked !== checkedRef.current) {
|
|
534
|
+
setIsChecked(checked);
|
|
535
|
+
checkedRef.current = checked;
|
|
536
|
+
isCheckStr = checked ? 'checked' : 'not-checked';
|
|
537
|
+
} else if (isChecked) isCheckStr = 'checked';else isCheckStr = 'not-checked';
|
|
538
|
+
if (disabled) isDisabledStr = 'disabled';else isDisabledStr = 'not-disabled';
|
|
539
|
+
return `${isCheckStr} ${isDisabledStr}`;
|
|
540
|
+
}, [checked, isChecked, disabled]);
|
|
536
541
|
return /*#__PURE__*/React__default.createElement(CheckboxWrapper, {
|
|
537
542
|
style: style,
|
|
538
543
|
className: className,
|
|
@@ -541,14 +546,17 @@ const Checkbox = props => {
|
|
|
541
546
|
}, /*#__PURE__*/React__default.createElement(CheckboxLabel, null, label), /*#__PURE__*/React__default.createElement(CheckboxInput, {
|
|
542
547
|
type: "checkbox",
|
|
543
548
|
name: value,
|
|
544
|
-
defaultChecked:
|
|
545
|
-
"aria-checked":
|
|
546
|
-
onChange:
|
|
549
|
+
defaultChecked: isChecked,
|
|
550
|
+
"aria-checked": isChecked,
|
|
551
|
+
onChange: handleOnChange,
|
|
547
552
|
error: error,
|
|
548
553
|
disabled: disabled,
|
|
549
554
|
"data-testid": dataTestId,
|
|
550
555
|
required: required
|
|
551
|
-
}), /*#__PURE__*/React__default.createElement(Checkmark,
|
|
556
|
+
}), /*#__PURE__*/React__default.createElement(Checkmark, {
|
|
557
|
+
className: checkmarkClassName,
|
|
558
|
+
error: error
|
|
559
|
+
}));
|
|
552
560
|
};
|
|
553
561
|
|
|
554
562
|
const {
|
|
@@ -560,19 +568,19 @@ const {
|
|
|
560
568
|
} = colors;
|
|
561
569
|
const CheckboxWrapper$1 = /*#__PURE__*/_styled__default.label.withConfig({
|
|
562
570
|
displayName: "styles__CheckboxWrapper",
|
|
563
|
-
componentId: "itly0z-0"
|
|
571
|
+
componentId: "sc-itly0z-0"
|
|
564
572
|
})(["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__*/polished.rem('3px'), props => props.disabled ? grey$2 : props.checked ? darkGreen$1 : grey$2, /*#__PURE__*/polished.rem('6px'), props => props.disabled ? lightGrey$2 : props.checked ? green$1 : light$2, /*#__PURE__*/polished.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);
|
|
565
573
|
const CheckboxLabel$1 = /*#__PURE__*/_styled__default.span.withConfig({
|
|
566
574
|
displayName: "styles__CheckboxLabel",
|
|
567
|
-
componentId: "itly0z-1"
|
|
575
|
+
componentId: "sc-itly0z-1"
|
|
568
576
|
})(["margin-left:", ";line-height:", ";"], /*#__PURE__*/polished.rem('40px'), /*#__PURE__*/polished.rem('24px'));
|
|
569
577
|
const CheckboxInput$1 = /*#__PURE__*/_styled__default.input.withConfig({
|
|
570
578
|
displayName: "styles__CheckboxInput",
|
|
571
|
-
componentId: "itly0z-2"
|
|
579
|
+
componentId: "sc-itly0z-2"
|
|
572
580
|
})(["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);
|
|
573
581
|
const Checkmark$1 = /*#__PURE__*/_styled__default.span.withConfig({
|
|
574
582
|
displayName: "styles__Checkmark",
|
|
575
|
-
componentId: "itly0z-3"
|
|
583
|
+
componentId: "sc-itly0z-3"
|
|
576
584
|
})(["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__*/polished.rem('10px'), /*#__PURE__*/polished.rem('2px'), grey$2, light$2, /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('9px'), props => props.disabled ? light$2 : green$1, /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('3px'));
|
|
577
585
|
|
|
578
586
|
const CheckboxButton = props => {
|
|
@@ -987,13 +995,12 @@ const {
|
|
|
987
995
|
} = typography;
|
|
988
996
|
const LabelStyle = /*#__PURE__*/_styled__default.label.withConfig({
|
|
989
997
|
displayName: "styles__LabelStyle",
|
|
990
|
-
componentId: "pbv9we-0"
|
|
998
|
+
componentId: "sc-pbv9we-0"
|
|
991
999
|
})(["display:flex;align-items:center;font-size:0.75rem;font-weight:", ";color:", ";text-transform:uppercase;svg{width:auto;height:", ";}"], bold, grey$6, /*#__PURE__*/polished.rem('15px'));
|
|
992
1000
|
|
|
993
1001
|
const {
|
|
994
1002
|
grey: grey$7
|
|
995
1003
|
} = colors;
|
|
996
|
-
|
|
997
1004
|
const Label = props => {
|
|
998
1005
|
const {
|
|
999
1006
|
value,
|
|
@@ -1023,13 +1030,12 @@ const rotation = _styled.keyframes`
|
|
|
1023
1030
|
`;
|
|
1024
1031
|
const Loading = /*#__PURE__*/_styled__default.div.withConfig({
|
|
1025
1032
|
displayName: "styles__Loading",
|
|
1026
|
-
componentId: "sxnx45-0"
|
|
1033
|
+
componentId: "sc-sxnx45-0"
|
|
1027
1034
|
})(["border:", " solid hsla(0,0%,48%,0.5);border-top-color:", ";border-radius:50%;width:", ";height:", ";animation:", " 0.8s ease infinite;"], /*#__PURE__*/polished.rem('5px'), props => props.fill || light$4, props => props.size || polished.rem('20px'), props => props.size || polished.rem('20px'), rotation);
|
|
1028
1035
|
|
|
1029
1036
|
const {
|
|
1030
1037
|
grey: grey$8
|
|
1031
1038
|
} = colors;
|
|
1032
|
-
|
|
1033
1039
|
const Spinner = props => {
|
|
1034
1040
|
const {
|
|
1035
1041
|
fill = grey$8,
|
|
@@ -1050,11 +1056,9 @@ const TagWrapper = /*#__PURE__*/_styled__default.span.withConfig({
|
|
|
1050
1056
|
componentId: "sc-1ghratr-0"
|
|
1051
1057
|
})(["--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 => {
|
|
1052
1058
|
var _props$color;
|
|
1053
|
-
|
|
1054
1059
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
1055
1060
|
}, props => {
|
|
1056
1061
|
var _props$txtColor;
|
|
1057
|
-
|
|
1058
1062
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
1059
1063
|
}, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), props => props.variant === 'solid' ? 'var(--txt)' : 'var(--bg)');
|
|
1060
1064
|
|
|
@@ -1079,14 +1083,12 @@ const Tag = props => {
|
|
|
1079
1083
|
|
|
1080
1084
|
const TagWrapper$1 = /*#__PURE__*/_styled__default.div.withConfig({
|
|
1081
1085
|
displayName: "styles__TagWrapper",
|
|
1082
|
-
componentId: "db57da-0"
|
|
1086
|
+
componentId: "sc-db57da-0"
|
|
1083
1087
|
})(["--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 => {
|
|
1084
1088
|
var _props$color;
|
|
1085
|
-
|
|
1086
1089
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
1087
1090
|
}, props => {
|
|
1088
1091
|
var _props$valueColor;
|
|
1089
|
-
|
|
1090
1092
|
return useColor((_props$valueColor = props.valueColor) != null ? _props$valueColor : 'black').color;
|
|
1091
1093
|
}, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), /*#__PURE__*/polished.rem('5px'));
|
|
1092
1094
|
|
|
@@ -1266,6 +1268,7 @@ const SelectWrapper = _styled__default.div`
|
|
|
1266
1268
|
}
|
|
1267
1269
|
|
|
1268
1270
|
&__value-container {
|
|
1271
|
+
display: flex;
|
|
1269
1272
|
align-items: center;
|
|
1270
1273
|
padding: 0 ${/*#__PURE__*/polished.rem('15px')};
|
|
1271
1274
|
}
|
|
@@ -1331,6 +1334,10 @@ const SelectWrapper = _styled__default.div`
|
|
|
1331
1334
|
|
|
1332
1335
|
.select__value-container.select__value-container--is-multi > div {
|
|
1333
1336
|
align-items: stretch;
|
|
1337
|
+
|
|
1338
|
+
.select__multi-value__remove {
|
|
1339
|
+
padding-right: 0;
|
|
1340
|
+
}
|
|
1334
1341
|
}
|
|
1335
1342
|
|
|
1336
1343
|
.select__value-container,
|
|
@@ -1376,10 +1383,8 @@ const SelectGroupLabel = _styled__default.span`
|
|
|
1376
1383
|
const {
|
|
1377
1384
|
Option
|
|
1378
1385
|
} = Select$1.components;
|
|
1379
|
-
const FormatGroupLabel =
|
|
1380
|
-
|
|
1381
|
-
options
|
|
1382
|
-
}) => {
|
|
1386
|
+
const FormatGroupLabel = props => {
|
|
1387
|
+
var _props$options;
|
|
1383
1388
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1384
1389
|
style: {
|
|
1385
1390
|
display: 'flex',
|
|
@@ -1388,16 +1393,22 @@ const FormatGroupLabel = ({
|
|
|
1388
1393
|
}
|
|
1389
1394
|
}, /*#__PURE__*/React__default.createElement(SelectGroupLabel, {
|
|
1390
1395
|
className: "selective-options-group-label"
|
|
1391
|
-
}, label), /*#__PURE__*/React__default.createElement(Tag, {
|
|
1392
|
-
value: `${options == null ? void 0 : options.length}`
|
|
1396
|
+
}, props.label), /*#__PURE__*/React__default.createElement(Tag, {
|
|
1397
|
+
value: `${(_props$options = props.options) == null ? void 0 : _props$options.length}`
|
|
1393
1398
|
}));
|
|
1394
1399
|
};
|
|
1395
1400
|
const CustomSelectOption = (props, commonProps) => /*#__PURE__*/React__default.createElement(Option, Object.assign({}, props, commonProps), props.data.icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
1396
1401
|
icon: props.data.icon
|
|
1397
|
-
}) : props.data.customImage ?
|
|
1402
|
+
}) : props.data.customImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
1403
|
+
src: props.data.customImage,
|
|
1404
|
+
alt: props.data.label
|
|
1405
|
+
}) : null, props.data.label);
|
|
1398
1406
|
const CustomSelectValue = props => /*#__PURE__*/React__default.createElement("div", null, props.data.icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
1399
1407
|
icon: props.data.icon
|
|
1400
|
-
}) : props.data.customImage ?
|
|
1408
|
+
}) : props.data.customImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
1409
|
+
src: props.data.customImage,
|
|
1410
|
+
alt: props.data.label
|
|
1411
|
+
}) : null, props.data.label);
|
|
1401
1412
|
|
|
1402
1413
|
const SelectInteractive = ({
|
|
1403
1414
|
name,
|
|
@@ -1945,7 +1956,6 @@ const Slideshow = props => {
|
|
|
1945
1956
|
title: `Slide ${index + 1} selected`
|
|
1946
1957
|
});
|
|
1947
1958
|
}
|
|
1948
|
-
|
|
1949
1959
|
return /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("button", {
|
|
1950
1960
|
onClick: onClickHandler,
|
|
1951
1961
|
onKeyDown: onClickHandler,
|
|
@@ -2147,13 +2157,11 @@ const Toggle = ({
|
|
|
2147
2157
|
// tracks the active state so it's easier to test
|
|
2148
2158
|
const [state, setState] = React.useState(checked);
|
|
2149
2159
|
const [id, setId] = React.useState('');
|
|
2150
|
-
|
|
2151
2160
|
const handleClick = value => {
|
|
2152
2161
|
if (disabled) return;
|
|
2153
2162
|
setState(value);
|
|
2154
2163
|
return onClick(value);
|
|
2155
2164
|
};
|
|
2156
|
-
|
|
2157
2165
|
React.useEffect(() => {
|
|
2158
2166
|
// If the ID stays outside the component
|
|
2159
2167
|
// it will be the same if we instantiate
|
|
@@ -2305,15 +2313,13 @@ const FilePicker = props => {
|
|
|
2305
2313
|
disabled = false
|
|
2306
2314
|
} = props;
|
|
2307
2315
|
const [fileName, setFileName] = React.useState(value ? value : placeholder);
|
|
2308
|
-
|
|
2309
2316
|
const getUploadedFileName = e => {
|
|
2310
2317
|
let files = e.target.files,
|
|
2311
|
-
|
|
2312
|
-
|
|
2318
|
+
value = e.target.value,
|
|
2319
|
+
fileName;
|
|
2313
2320
|
if (files && files.length > 1) fileName = `${files.length} ${pluralText}`;else fileName = value.split('\\').pop();
|
|
2314
2321
|
if (fileName) setFileName(fileName);
|
|
2315
2322
|
};
|
|
2316
|
-
|
|
2317
2323
|
return /*#__PURE__*/React__default.createElement(Wrapper$6, {
|
|
2318
2324
|
disabled: disabled,
|
|
2319
2325
|
minimal: minimal,
|
|
@@ -2395,7 +2401,6 @@ const ActionMenuList = props => {
|
|
|
2395
2401
|
}
|
|
2396
2402
|
}, /*#__PURE__*/React__default.createElement("span", null, value)))));
|
|
2397
2403
|
};
|
|
2398
|
-
|
|
2399
2404
|
const ActionsMenu = props => {
|
|
2400
2405
|
const {
|
|
2401
2406
|
ariaLabel = '',
|
|
@@ -2511,19 +2516,16 @@ const EmptyTable = props => {
|
|
|
2511
2516
|
const headCells = tableHead.map((value, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
2512
2517
|
key: index
|
|
2513
2518
|
}, value));
|
|
2514
|
-
|
|
2515
2519
|
for (let i = 0; i < tableHead.length; i++) {
|
|
2516
2520
|
columns.push( /*#__PURE__*/React__default.createElement("div", {
|
|
2517
2521
|
key: i
|
|
2518
2522
|
}, /*#__PURE__*/React__default.createElement(EmptyTableCellText, null)));
|
|
2519
2523
|
}
|
|
2520
|
-
|
|
2521
2524
|
for (let i = 0; i < 3; i++) {
|
|
2522
2525
|
rows.push( /*#__PURE__*/React__default.createElement(EmptyTableRow, {
|
|
2523
2526
|
key: i
|
|
2524
2527
|
}, columns));
|
|
2525
2528
|
}
|
|
2526
|
-
|
|
2527
2529
|
return /*#__PURE__*/React__default.createElement(EmptyTableWrapper, null, /*#__PURE__*/React__default.createElement(EmptyTableOverlay, null, /*#__PURE__*/React__default.createElement("span", null, value)), /*#__PURE__*/React__default.createElement(EmptyTableHead, {
|
|
2528
2530
|
border: border
|
|
2529
2531
|
}, headCells), /*#__PURE__*/React__default.createElement(EmptyTableBody, {
|
|
@@ -2570,7 +2572,7 @@ const {
|
|
|
2570
2572
|
} = colors;
|
|
2571
2573
|
const Wrapper$7 = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2572
2574
|
displayName: "styles__Wrapper",
|
|
2573
|
-
componentId: "d2fn4g-0"
|
|
2575
|
+
componentId: "sc-d2fn4g-0"
|
|
2574
2576
|
})(["--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' && _styled.css`
|
|
2575
2577
|
--default: ${grey$e};
|
|
2576
2578
|
--light: ${lightGrey$c};
|
|
@@ -2651,15 +2653,15 @@ const {
|
|
|
2651
2653
|
} = typography;
|
|
2652
2654
|
const TableWrapper = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2653
2655
|
displayName: "styles__TableWrapper",
|
|
2654
|
-
componentId: "vmoy3z-0"
|
|
2656
|
+
componentId: "sc-vmoy3z-0"
|
|
2655
2657
|
})(["position:relative;"]);
|
|
2656
2658
|
const OverflowWrapper = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2657
2659
|
displayName: "styles__OverflowWrapper",
|
|
2658
|
-
componentId: "vmoy3z-1"
|
|
2660
|
+
componentId: "sc-vmoy3z-1"
|
|
2659
2661
|
})(["@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__*/polished.rem('6px'), light$c, light$c, /*#__PURE__*/polished.rem('40px'), /*#__PURE__*/polished.rem('40px'), /*#__PURE__*/polished.rem('14px'), /*#__PURE__*/polished.rem('14px'));
|
|
2660
2662
|
const Table = /*#__PURE__*/_styled__default.table.withConfig({
|
|
2661
2663
|
displayName: "styles__Table",
|
|
2662
|
-
componentId: "vmoy3z-2"
|
|
2664
|
+
componentId: "sc-vmoy3z-2"
|
|
2663
2665
|
})(["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__*/polished.rem('6px'), device.s, props => props.border ? polished.rem('1px') : '0', /*#__PURE__*/polished.rem('50px'), /*#__PURE__*/polished.rem('15px'), device.s, /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('1px'), grey$f, /*#__PURE__*/polished.rem('6px'), /*#__PURE__*/polished.rem('15px'), device.s, /*#__PURE__*/polished.rem('1px'), /*#__PURE__*/polished.rem('-1px'), /*#__PURE__*/polished.rem('1px'), device.s, bold$3, grey$f, props => props.loadingState ? 'transparent' : lightGrey$d, device.s, /*#__PURE__*/polished.rem('1px'), grey$f, /*#__PURE__*/polished.rem('50px'), /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('100px'), /*#__PURE__*/polished.rem('30px'), /*#__PURE__*/polished.rem('30px'), normal$7, grey$f, /*#__PURE__*/polished.rem('15px'), bold$3, props => props.loadingState && _styled.css`
|
|
2664
2666
|
width: ${polished.rem('75px')};
|
|
2665
2667
|
height: ${polished.rem('15px')};
|
|
@@ -2681,7 +2683,7 @@ const Table = /*#__PURE__*/_styled__default.table.withConfig({
|
|
|
2681
2683
|
`, /*#__PURE__*/polished.rem('20px'), /*#__PURE__*/polished.rem('20px'), /*#__PURE__*/polished.rem('10px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('36px'), /*#__PURE__*/polished.rem('-170px'), device.s, /*#__PURE__*/polished.rem('50px'), /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('1px'), grey$f, /*#__PURE__*/polished.rem('100px'), /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('40px'));
|
|
2682
2684
|
const SkeletonCell = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2683
2685
|
displayName: "styles__SkeletonCell",
|
|
2684
|
-
componentId: "vmoy3z-3"
|
|
2686
|
+
componentId: "sc-vmoy3z-3"
|
|
2685
2687
|
})(["@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__*/polished.rem('-800px'), /*#__PURE__*/polished.rem('800px'), /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('800px'));
|
|
2686
2688
|
|
|
2687
2689
|
const Table$1 = props => {
|
|
@@ -2718,7 +2720,6 @@ const Table$1 = props => {
|
|
|
2718
2720
|
const headSkeleton = /*#__PURE__*/React__default.createElement("th", null, /*#__PURE__*/React__default.createElement(SkeletonCell, null));
|
|
2719
2721
|
const cellSkeleton = /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(SkeletonCell, null));
|
|
2720
2722
|
const columnsSkeleton = columns.length > 0 ? columns.length : loadingColumns;
|
|
2721
|
-
|
|
2722
2723
|
if (showEmpty && !hasValues) {
|
|
2723
2724
|
const columnHeaders = columns.map(column => column.value);
|
|
2724
2725
|
return /*#__PURE__*/React__default.createElement(EmptyTable, {
|
|
@@ -2727,7 +2728,6 @@ const Table$1 = props => {
|
|
|
2727
2728
|
value: emptyValue
|
|
2728
2729
|
});
|
|
2729
2730
|
}
|
|
2730
|
-
|
|
2731
2731
|
return /*#__PURE__*/React__default.createElement(TableWrapper, null, /*#__PURE__*/React__default.createElement(OverflowWrapper, null, /*#__PURE__*/React__default.createElement(Table, {
|
|
2732
2732
|
border: border,
|
|
2733
2733
|
"data-testid": dataTestId,
|
|
@@ -2814,7 +2814,6 @@ const TableRow = /*#__PURE__*/_styled__default.tr.withConfig({
|
|
|
2814
2814
|
const {
|
|
2815
2815
|
light: light$d
|
|
2816
2816
|
} = colors;
|
|
2817
|
-
|
|
2818
2817
|
const TableDnD = props => {
|
|
2819
2818
|
const {
|
|
2820
2819
|
border = false,
|
|
@@ -2845,7 +2844,6 @@ const TableDnD = props => {
|
|
|
2845
2844
|
const hasActionMenu = actions.length > 0;
|
|
2846
2845
|
const validValues = values.filter(hasValue);
|
|
2847
2846
|
const hasValues = Array.isArray(values) && values.length > 0;
|
|
2848
|
-
|
|
2849
2847
|
if (showEmpty && !hasValues) {
|
|
2850
2848
|
const columnHeaders = columns.map(column => column.value);
|
|
2851
2849
|
return /*#__PURE__*/React__default.createElement(EmptyTable, {
|
|
@@ -2854,7 +2852,6 @@ const TableDnD = props => {
|
|
|
2854
2852
|
value: emptyValue
|
|
2855
2853
|
});
|
|
2856
2854
|
}
|
|
2857
|
-
|
|
2858
2855
|
const reorder = (list, startIndex, endIndex) => {
|
|
2859
2856
|
const result = Array.from(list);
|
|
2860
2857
|
const [removed] = result.splice(startIndex, 1);
|
|
@@ -2864,17 +2861,14 @@ const TableDnD = props => {
|
|
|
2864
2861
|
return dragItem;
|
|
2865
2862
|
});
|
|
2866
2863
|
};
|
|
2867
|
-
|
|
2868
2864
|
const getItemStyle = (isDragging, draggableStyle) => ({
|
|
2869
2865
|
userSelect: 'none',
|
|
2870
2866
|
background: isDragging ? light$d : 'transparent',
|
|
2871
2867
|
...draggableStyle
|
|
2872
2868
|
});
|
|
2873
|
-
|
|
2874
2869
|
const getListStyle = isDraggingOver => ({
|
|
2875
2870
|
background: isDraggingOver ? light$d : 'transparent'
|
|
2876
2871
|
});
|
|
2877
|
-
|
|
2878
2872
|
return (
|
|
2879
2873
|
/*#__PURE__*/
|
|
2880
2874
|
// @ts-ignore
|
|
@@ -2886,7 +2880,6 @@ const TableDnD = props => {
|
|
|
2886
2880
|
if (!result.destination) {
|
|
2887
2881
|
return;
|
|
2888
2882
|
}
|
|
2889
|
-
|
|
2890
2883
|
const newValues = reorder(values, result.source.index, result.destination.index);
|
|
2891
2884
|
onChange(newValues);
|
|
2892
2885
|
setDraggableId('');
|
|
@@ -2977,7 +2970,7 @@ const {
|
|
|
2977
2970
|
} = colors;
|
|
2978
2971
|
const Wrapper$8 = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2979
2972
|
displayName: "styles__Wrapper",
|
|
2980
|
-
componentId: "mbja2a-0"
|
|
2973
|
+
componentId: "sc-mbja2a-0"
|
|
2981
2974
|
})(["display:inline-block;> label{margin-bottom:", ";color:", ";span{color:", ";}}&:not(:last-child){margin-bottom:", ";}"], /*#__PURE__*/polished.rem('5px'), props => props.error ? red$9 : grey$h, props => props.error ? red$9 : normal$9, /*#__PURE__*/polished.rem('15px'));
|
|
2982
2975
|
|
|
2983
2976
|
const FormGroup = props => {
|
|
@@ -3031,18 +3024,14 @@ const NumberInputSpinner = props => {
|
|
|
3031
3024
|
isFirstRender.current = false;
|
|
3032
3025
|
return;
|
|
3033
3026
|
}
|
|
3034
|
-
|
|
3035
3027
|
setNumber(value);
|
|
3036
3028
|
}, [value]);
|
|
3037
|
-
|
|
3038
3029
|
const updateValue = value => {
|
|
3039
3030
|
if (onChange) {
|
|
3040
3031
|
onChange(value);
|
|
3041
3032
|
}
|
|
3042
|
-
|
|
3043
3033
|
setNumber(value);
|
|
3044
3034
|
};
|
|
3045
|
-
|
|
3046
3035
|
return /*#__PURE__*/React__default.createElement(Wrapper$9, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
3047
3036
|
className: "remove-button",
|
|
3048
3037
|
"aria-label": decreaseAriaLabel,
|
|
@@ -3322,9 +3311,7 @@ const PaginationControl = props => {
|
|
|
3322
3311
|
if (window.innerWidth > 700) setPageDisplayed(3);
|
|
3323
3312
|
}
|
|
3324
3313
|
}
|
|
3325
|
-
|
|
3326
3314
|
updateDimensions();
|
|
3327
|
-
|
|
3328
3315
|
if (typeof window !== 'undefined') {
|
|
3329
3316
|
window.addEventListener('resize', updateDimensions);
|
|
3330
3317
|
}
|
|
@@ -5385,20 +5372,16 @@ const DataWarning = props => {
|
|
|
5385
5372
|
type = 'login',
|
|
5386
5373
|
children
|
|
5387
5374
|
} = props;
|
|
5388
|
-
|
|
5389
5375
|
switch (type) {
|
|
5390
5376
|
case 'login':
|
|
5391
5377
|
icon = /*#__PURE__*/React__default.createElement(IconLoginOnly, null);
|
|
5392
5378
|
break;
|
|
5393
|
-
|
|
5394
5379
|
case 'data':
|
|
5395
5380
|
icon = /*#__PURE__*/React__default.createElement(IconEmptyData, null);
|
|
5396
5381
|
break;
|
|
5397
|
-
|
|
5398
5382
|
default:
|
|
5399
5383
|
icon = /*#__PURE__*/React__default.createElement(IconLoginOnly, null);
|
|
5400
5384
|
}
|
|
5401
|
-
|
|
5402
5385
|
return /*#__PURE__*/React__default.createElement(Wrapper$c, {
|
|
5403
5386
|
type: type
|
|
5404
5387
|
}, icon, /*#__PURE__*/React__default.createElement("div", null, children));
|
|
@@ -5618,6 +5601,7 @@ const Field = _styled__default.div`
|
|
|
5618
5601
|
|
|
5619
5602
|
input {
|
|
5620
5603
|
flex: 1;
|
|
5604
|
+
margin-right: 0;
|
|
5621
5605
|
border-radius: ${/*#__PURE__*/polished.rem('6px')} 0 0 ${/*#__PURE__*/polished.rem('6px')};
|
|
5622
5606
|
|
|
5623
5607
|
&:focus {
|
|
@@ -5644,7 +5628,6 @@ const Field = _styled__default.div`
|
|
|
5644
5628
|
justify-content: center;
|
|
5645
5629
|
align-items: center;
|
|
5646
5630
|
padding: 0 ${/*#__PURE__*/polished.rem('20px')};
|
|
5647
|
-
text-transform: uppercase;
|
|
5648
5631
|
white-space: nowrap;
|
|
5649
5632
|
transition-duration: 0.3s;
|
|
5650
5633
|
cursor: pointer;
|
|
@@ -5723,11 +5706,11 @@ const {
|
|
|
5723
5706
|
} = typography;
|
|
5724
5707
|
const Wrapper$g = /*#__PURE__*/_styled__default.div.withConfig({
|
|
5725
5708
|
displayName: "styles__Wrapper",
|
|
5726
|
-
componentId: "znznmm-0"
|
|
5709
|
+
componentId: "sc-znznmm-0"
|
|
5727
5710
|
})(["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__*/polished.rem('10px'), /*#__PURE__*/polished.rem('10px'), normal$e, /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('24px'), /*#__PURE__*/polished.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);
|
|
5728
5711
|
const More = /*#__PURE__*/_styled__default.div.withConfig({
|
|
5729
5712
|
displayName: "styles__More",
|
|
5730
|
-
componentId: "znznmm-1"
|
|
5713
|
+
componentId: "sc-znznmm-1"
|
|
5731
5714
|
})(["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__*/polished.rem('1px'), lightGrey$j, /*#__PURE__*/polished.rem('4px'), light$i, /*#__PURE__*/polished.rem('5px'), /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('15px'), /*#__PURE__*/polished.rem('15px'), lightGrey$j, normal$e, normal$e, /*#__PURE__*/polished.rem('4px'), /*#__PURE__*/polished.rem('4px'), /*#__PURE__*/polished.rem('4px'), /*#__PURE__*/polished.rem('4px'), /*#__PURE__*/polished.rem('15px'));
|
|
5732
5715
|
|
|
5733
5716
|
const HorizontalNav = props => {
|
|
@@ -5749,37 +5732,29 @@ const HorizontalNav = props => {
|
|
|
5749
5732
|
if (!ref || !ref.current) return;
|
|
5750
5733
|
const visible = document.querySelector('ul.menu').getElementsByTagName('li');
|
|
5751
5734
|
const more = document.querySelector('.more').getElementsByTagName('li');
|
|
5752
|
-
|
|
5753
5735
|
const moreVisibility = () => more.length > 0 ? setShowMore(true) : setShowMore(false);
|
|
5754
|
-
|
|
5755
5736
|
const removeItem = () => {
|
|
5756
5737
|
if (visible.length === 1) return;
|
|
5757
5738
|
let last = visible[visible.length - 1];
|
|
5758
5739
|
document.querySelector('ul.more').prepend(last);
|
|
5759
5740
|
};
|
|
5760
|
-
|
|
5761
5741
|
const addItem = () => {
|
|
5762
5742
|
if (more.length === 0) return;
|
|
5763
5743
|
let first = more[0];
|
|
5764
5744
|
document.querySelector('ul.menu').append(first);
|
|
5765
5745
|
};
|
|
5766
|
-
|
|
5767
5746
|
const checkOverflow = () => {
|
|
5768
5747
|
moreVisibility();
|
|
5769
|
-
|
|
5770
5748
|
for (let i = 0; i < visible.length + 20; i++) {
|
|
5771
5749
|
visibleMenuRef.current.scrollWidth + 50 > ref.current.offsetWidth ? removeItem() : addItem();
|
|
5772
5750
|
}
|
|
5773
5751
|
};
|
|
5774
|
-
|
|
5775
5752
|
checkOverflow();
|
|
5776
|
-
|
|
5777
5753
|
if (typeof window !== 'undefined') {
|
|
5778
5754
|
moreVisibility();
|
|
5779
5755
|
window.addEventListener('resize', checkOverflow);
|
|
5780
5756
|
return () => window.removeEventListener('resize', checkOverflow);
|
|
5781
5757
|
}
|
|
5782
|
-
|
|
5783
5758
|
return;
|
|
5784
5759
|
}, [ref]);
|
|
5785
5760
|
return /*#__PURE__*/React__default.createElement(Wrapper$g, {
|
|
@@ -5923,21 +5898,25 @@ const ModalDrawer = props => {
|
|
|
5923
5898
|
footerHidden = false,
|
|
5924
5899
|
zIndex = 10
|
|
5925
5900
|
} = props;
|
|
5901
|
+
React.useEffect(() => {
|
|
5902
|
+
if (isShowing && typeof window !== 'undefined') {
|
|
5903
|
+
document.documentElement.style.overflow = 'hidden';
|
|
5904
|
+
} else {
|
|
5905
|
+
document.documentElement.style.overflow = '';
|
|
5906
|
+
}
|
|
5907
|
+
}, [isShowing]);
|
|
5926
5908
|
React.useEffect(() => {
|
|
5927
5909
|
const fixViewport = () => {
|
|
5928
5910
|
let vh = window.innerHeight * 0.01;
|
|
5929
5911
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
5930
5912
|
};
|
|
5931
|
-
|
|
5932
5913
|
fixViewport();
|
|
5933
|
-
|
|
5934
5914
|
if (typeof window !== 'undefined') {
|
|
5935
5915
|
let vh = window.innerHeight * 0.01;
|
|
5936
5916
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
5937
5917
|
window.addEventListener('resize', fixViewport);
|
|
5938
5918
|
return () => window.removeEventListener('resize', fixViewport);
|
|
5939
5919
|
}
|
|
5940
|
-
|
|
5941
5920
|
return;
|
|
5942
5921
|
}, []);
|
|
5943
5922
|
return isShowing ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ModalOverlay$1, {
|
|
@@ -6071,14 +6050,12 @@ const LoadingState = props => {
|
|
|
6071
6050
|
let paragraphs = [];
|
|
6072
6051
|
let cards = [];
|
|
6073
6052
|
let loadingType;
|
|
6074
|
-
|
|
6075
6053
|
for (let i = 0; i < lines; i++) {
|
|
6076
6054
|
paragraphs.push( /*#__PURE__*/React__default.createElement("div", {
|
|
6077
6055
|
key: i,
|
|
6078
6056
|
className: "paragraph"
|
|
6079
6057
|
}));
|
|
6080
6058
|
}
|
|
6081
|
-
|
|
6082
6059
|
for (let i = 0; i < cardsNumber; i++) {
|
|
6083
6060
|
cards.push( /*#__PURE__*/React__default.createElement("div", {
|
|
6084
6061
|
key: i,
|
|
@@ -6099,7 +6076,6 @@ const LoadingState = props => {
|
|
|
6099
6076
|
className: "paragraph"
|
|
6100
6077
|
})));
|
|
6101
6078
|
}
|
|
6102
|
-
|
|
6103
6079
|
switch (type) {
|
|
6104
6080
|
case 'text':
|
|
6105
6081
|
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6108,19 +6084,16 @@ const LoadingState = props => {
|
|
|
6108
6084
|
className: "subtitle"
|
|
6109
6085
|
}), paragraphs));
|
|
6110
6086
|
break;
|
|
6111
|
-
|
|
6112
6087
|
case 'card':
|
|
6113
6088
|
loadingType = /*#__PURE__*/React__default.createElement(Grid, {
|
|
6114
6089
|
center: center
|
|
6115
6090
|
}, cards);
|
|
6116
6091
|
break;
|
|
6117
|
-
|
|
6118
6092
|
case 'value':
|
|
6119
6093
|
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
6120
6094
|
className: "value"
|
|
6121
6095
|
})));
|
|
6122
6096
|
break;
|
|
6123
|
-
|
|
6124
6097
|
default:
|
|
6125
6098
|
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
6126
6099
|
className: "title"
|
|
@@ -6128,7 +6101,6 @@ const LoadingState = props => {
|
|
|
6128
6101
|
className: "subtitle"
|
|
6129
6102
|
}), paragraphs));
|
|
6130
6103
|
}
|
|
6131
|
-
|
|
6132
6104
|
return /*#__PURE__*/React__default.createElement(Wrapper$h, {
|
|
6133
6105
|
type: type
|
|
6134
6106
|
}, loadingType);
|
|
@@ -6308,7 +6280,6 @@ const TabsPanel = props => {
|
|
|
6308
6280
|
onChange,
|
|
6309
6281
|
tabs
|
|
6310
6282
|
} = props;
|
|
6311
|
-
|
|
6312
6283
|
const getTabs = () => {
|
|
6313
6284
|
return tabs.map((tab, index) => ({
|
|
6314
6285
|
key: index,
|
|
@@ -6318,7 +6289,6 @@ const TabsPanel = props => {
|
|
|
6318
6289
|
getContent: () => tab.renderer
|
|
6319
6290
|
}));
|
|
6320
6291
|
};
|
|
6321
|
-
|
|
6322
6292
|
return /*#__PURE__*/React__default.createElement(Wrapper$i, null, /*#__PURE__*/React__default.createElement(Tabs, {
|
|
6323
6293
|
transform: false,
|
|
6324
6294
|
unmountOnExit: unmountOnExit,
|