@taikai/rocket-kit 3.0.0-beta.1 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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/molecules/table/index.d.ts +3 -0
- package/dist/molecules/table/stories/table.stories.d.ts +18 -0
- package/dist/molecules/table/styles.d.ts +4 -2
- 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 +1 -5
- package/dist/organisms/loading-state/stories/loading-state.stories.d.ts +0 -3
- package/dist/organisms/loading-state/styles.d.ts +0 -1
- package/dist/rocket-kit.cjs.development.js +132 -106
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +92 -87
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +133 -107
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +5 -6
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';
|
|
@@ -257,8 +257,8 @@ const useColor = value => {
|
|
|
257
257
|
|
|
258
258
|
const ButtonWrapper = /*#__PURE__*/_styled.button.withConfig({
|
|
259
259
|
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:", ";text-transform:uppercase;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{pointer-events:none;}}> *:not(:last-child){margin-left:", ";margin-right:", ";}.spinner{border-top-color:", ";}span{position:relative;font-size:", ";font-weight:", ";letter-spacing:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
260
|
+
componentId: "sc-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:", ";text-transform:uppercase;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:", ";letter-spacing:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
262
262
|
var _props$color;
|
|
263
263
|
|
|
264
264
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
@@ -270,7 +270,7 @@ const ButtonWrapper = /*#__PURE__*/_styled.button.withConfig({
|
|
|
270
270
|
var _props$color2;
|
|
271
271
|
|
|
272
272
|
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.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/rem(typography.defaultSize), typography.medium, typography.letterSpacing, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' ? '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' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
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, typography.letterSpacing, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' ? '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' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
274
274
|
|
|
275
275
|
const Button = props => {
|
|
276
276
|
const {
|
|
@@ -421,7 +421,7 @@ const ButtonDropdown = props => {
|
|
|
421
421
|
|
|
422
422
|
const ButtonLinkStyle = /*#__PURE__*/_styled.a.withConfig({
|
|
423
423
|
displayName: "styles__ButtonLinkStyle",
|
|
424
|
-
componentId: "clge7v-0"
|
|
424
|
+
componentId: "sc-clge7v-0"
|
|
425
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:", ";text-transform:uppercase;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:", ";letter-spacing:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
426
426
|
var _props$color;
|
|
427
427
|
|
|
@@ -449,7 +449,7 @@ const ButtonLink = props => {
|
|
|
449
449
|
blank = false,
|
|
450
450
|
rel = undefined,
|
|
451
451
|
value = '',
|
|
452
|
-
iconPosition = '
|
|
452
|
+
iconPosition = 'left',
|
|
453
453
|
icon = '',
|
|
454
454
|
dataTestId = '',
|
|
455
455
|
eventId = '',
|
|
@@ -496,34 +496,56 @@ const {
|
|
|
496
496
|
} = colors;
|
|
497
497
|
const CheckboxWrapper = /*#__PURE__*/_styled.label.withConfig({
|
|
498
498
|
displayName: "styles__CheckboxWrapper",
|
|
499
|
-
componentId: "w5t014-0"
|
|
499
|
+
componentId: "sc-w5t014-0"
|
|
500
500
|
})(["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
501
|
const CheckboxLabel = /*#__PURE__*/_styled.span.withConfig({
|
|
502
502
|
displayName: "styles__CheckboxLabel",
|
|
503
|
-
componentId: "w5t014-1"
|
|
503
|
+
componentId: "sc-w5t014-1"
|
|
504
504
|
})(["margin-left:calc(", " + ", ");line-height:", ";"], /*#__PURE__*/rem('24px'), /*#__PURE__*/rem('5px'), /*#__PURE__*/rem('24px'));
|
|
505
505
|
const CheckboxInput = /*#__PURE__*/_styled.input.withConfig({
|
|
506
506
|
displayName: "styles__CheckboxInput",
|
|
507
|
-
componentId: "w5t014-2"
|
|
508
|
-
})(["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){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);
|
|
507
|
+
componentId: "sc-w5t014-2"
|
|
508
|
+
})(["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
509
|
const Checkmark = /*#__PURE__*/_styled.span.withConfig({
|
|
510
510
|
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'));
|
|
511
|
+
componentId: "sc-w5t014-3"
|
|
512
|
+
})(["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
513
|
|
|
514
|
-
const Checkbox =
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
514
|
+
const Checkbox = ({
|
|
515
|
+
label,
|
|
516
|
+
value,
|
|
517
|
+
checked = false,
|
|
518
|
+
onChange = () => {},
|
|
519
|
+
error = false,
|
|
520
|
+
disabled = false,
|
|
521
|
+
className = 'checkbox',
|
|
522
|
+
style,
|
|
523
|
+
dataTestId,
|
|
524
|
+
required = false
|
|
525
|
+
}) => {
|
|
526
|
+
const checkedRef = useRef(checked);
|
|
527
|
+
const [isChecked, setIsChecked] = useState(checked);
|
|
528
|
+
|
|
529
|
+
const handleOnChange = event => {
|
|
530
|
+
setIsChecked(prev => !prev);
|
|
531
|
+
onChange(event);
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
const checkmarkClassName = useMemo(() => {
|
|
535
|
+
let isCheckStr = '';
|
|
536
|
+
let isDisabledStr = ''; // if they are different
|
|
537
|
+
// use the value coming from the props
|
|
538
|
+
// as it is the source of truth
|
|
539
|
+
|
|
540
|
+
if (checked !== checkedRef.current) {
|
|
541
|
+
setIsChecked(checked);
|
|
542
|
+
checkedRef.current = checked;
|
|
543
|
+
isCheckStr = checked ? 'checked' : 'not-checked';
|
|
544
|
+
} else if (isChecked) isCheckStr = 'checked';else isCheckStr = 'not-checked';
|
|
545
|
+
|
|
546
|
+
if (disabled) isDisabledStr = 'disabled';else isDisabledStr = 'not-disabled';
|
|
547
|
+
return `${isCheckStr} ${isDisabledStr}`;
|
|
548
|
+
}, [checked, isChecked, disabled]);
|
|
527
549
|
return /*#__PURE__*/React.createElement(CheckboxWrapper, {
|
|
528
550
|
style: style,
|
|
529
551
|
className: className,
|
|
@@ -532,14 +554,17 @@ const Checkbox = props => {
|
|
|
532
554
|
}, /*#__PURE__*/React.createElement(CheckboxLabel, null, label), /*#__PURE__*/React.createElement(CheckboxInput, {
|
|
533
555
|
type: "checkbox",
|
|
534
556
|
name: value,
|
|
535
|
-
defaultChecked:
|
|
536
|
-
"aria-checked":
|
|
537
|
-
onChange:
|
|
557
|
+
defaultChecked: isChecked,
|
|
558
|
+
"aria-checked": isChecked,
|
|
559
|
+
onChange: handleOnChange,
|
|
538
560
|
error: error,
|
|
539
561
|
disabled: disabled,
|
|
540
562
|
"data-testid": dataTestId,
|
|
541
563
|
required: required
|
|
542
|
-
}), /*#__PURE__*/React.createElement(Checkmark,
|
|
564
|
+
}), /*#__PURE__*/React.createElement(Checkmark, {
|
|
565
|
+
className: checkmarkClassName,
|
|
566
|
+
error: error
|
|
567
|
+
}));
|
|
543
568
|
};
|
|
544
569
|
|
|
545
570
|
const {
|
|
@@ -551,19 +576,19 @@ const {
|
|
|
551
576
|
} = colors;
|
|
552
577
|
const CheckboxWrapper$1 = /*#__PURE__*/_styled.label.withConfig({
|
|
553
578
|
displayName: "styles__CheckboxWrapper",
|
|
554
|
-
componentId: "itly0z-0"
|
|
579
|
+
componentId: "sc-itly0z-0"
|
|
555
580
|
})(["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
581
|
const CheckboxLabel$1 = /*#__PURE__*/_styled.span.withConfig({
|
|
557
582
|
displayName: "styles__CheckboxLabel",
|
|
558
|
-
componentId: "itly0z-1"
|
|
583
|
+
componentId: "sc-itly0z-1"
|
|
559
584
|
})(["margin-left:", ";line-height:", ";"], /*#__PURE__*/rem('40px'), /*#__PURE__*/rem('24px'));
|
|
560
585
|
const CheckboxInput$1 = /*#__PURE__*/_styled.input.withConfig({
|
|
561
586
|
displayName: "styles__CheckboxInput",
|
|
562
|
-
componentId: "itly0z-2"
|
|
587
|
+
componentId: "sc-itly0z-2"
|
|
563
588
|
})(["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
589
|
const Checkmark$1 = /*#__PURE__*/_styled.span.withConfig({
|
|
565
590
|
displayName: "styles__Checkmark",
|
|
566
|
-
componentId: "itly0z-3"
|
|
591
|
+
componentId: "sc-itly0z-3"
|
|
567
592
|
})(["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
593
|
|
|
569
594
|
const CheckboxButton = props => {
|
|
@@ -978,7 +1003,7 @@ const {
|
|
|
978
1003
|
} = typography;
|
|
979
1004
|
const LabelStyle = /*#__PURE__*/_styled.label.withConfig({
|
|
980
1005
|
displayName: "styles__LabelStyle",
|
|
981
|
-
componentId: "pbv9we-0"
|
|
1006
|
+
componentId: "sc-pbv9we-0"
|
|
982
1007
|
})(["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
1008
|
|
|
984
1009
|
const {
|
|
@@ -1014,7 +1039,7 @@ const rotation = keyframes`
|
|
|
1014
1039
|
`;
|
|
1015
1040
|
const Loading = /*#__PURE__*/_styled.div.withConfig({
|
|
1016
1041
|
displayName: "styles__Loading",
|
|
1017
|
-
componentId: "sxnx45-0"
|
|
1042
|
+
componentId: "sc-sxnx45-0"
|
|
1018
1043
|
})(["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
1044
|
|
|
1020
1045
|
const {
|
|
@@ -1039,7 +1064,7 @@ const Spinner = props => {
|
|
|
1039
1064
|
const TagWrapper = /*#__PURE__*/_styled.span.withConfig({
|
|
1040
1065
|
displayName: "styles__TagWrapper",
|
|
1041
1066
|
componentId: "sc-1ghratr-0"
|
|
1042
|
-
})(["--bg:", ";--txt:", ";display:inline-block;border:", " solid var(--bg);border-radius:", ";background-color:", ";
|
|
1067
|
+
})(["--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
1068
|
var _props$color;
|
|
1044
1069
|
|
|
1045
1070
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
@@ -1047,7 +1072,7 @@ const TagWrapper = /*#__PURE__*/_styled.span.withConfig({
|
|
|
1047
1072
|
var _props$txtColor;
|
|
1048
1073
|
|
|
1049
1074
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
1050
|
-
}, /*#__PURE__*/rem('2px'), /*#__PURE__*/rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/rem('
|
|
1075
|
+
}, /*#__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
1076
|
|
|
1052
1077
|
const Tag = props => {
|
|
1053
1078
|
const {
|
|
@@ -1070,7 +1095,7 @@ const Tag = props => {
|
|
|
1070
1095
|
|
|
1071
1096
|
const TagWrapper$1 = /*#__PURE__*/_styled.div.withConfig({
|
|
1072
1097
|
displayName: "styles__TagWrapper",
|
|
1073
|
-
componentId: "db57da-0"
|
|
1098
|
+
componentId: "sc-db57da-0"
|
|
1074
1099
|
})(["--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
1100
|
var _props$color;
|
|
1076
1101
|
|
|
@@ -1257,6 +1282,7 @@ const SelectWrapper = _styled.div`
|
|
|
1257
1282
|
}
|
|
1258
1283
|
|
|
1259
1284
|
&__value-container {
|
|
1285
|
+
display: flex;
|
|
1260
1286
|
align-items: center;
|
|
1261
1287
|
padding: 0 ${/*#__PURE__*/rem('15px')};
|
|
1262
1288
|
}
|
|
@@ -1322,6 +1348,10 @@ const SelectWrapper = _styled.div`
|
|
|
1322
1348
|
|
|
1323
1349
|
.select__value-container.select__value-container--is-multi > div {
|
|
1324
1350
|
align-items: stretch;
|
|
1351
|
+
|
|
1352
|
+
.select__multi-value__remove {
|
|
1353
|
+
padding-right: 0;
|
|
1354
|
+
}
|
|
1325
1355
|
}
|
|
1326
1356
|
|
|
1327
1357
|
.select__value-container,
|
|
@@ -1367,10 +1397,9 @@ const SelectGroupLabel = _styled.span`
|
|
|
1367
1397
|
const {
|
|
1368
1398
|
Option
|
|
1369
1399
|
} = components;
|
|
1370
|
-
const FormatGroupLabel =
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
}) => {
|
|
1400
|
+
const FormatGroupLabel = props => {
|
|
1401
|
+
var _props$options;
|
|
1402
|
+
|
|
1374
1403
|
return /*#__PURE__*/React.createElement("div", {
|
|
1375
1404
|
style: {
|
|
1376
1405
|
display: 'flex',
|
|
@@ -1379,16 +1408,22 @@ const FormatGroupLabel = ({
|
|
|
1379
1408
|
}
|
|
1380
1409
|
}, /*#__PURE__*/React.createElement(SelectGroupLabel, {
|
|
1381
1410
|
className: "selective-options-group-label"
|
|
1382
|
-
}, label), /*#__PURE__*/React.createElement(Tag, {
|
|
1383
|
-
value: `${options == null ? void 0 : options.length}`
|
|
1411
|
+
}, props.label), /*#__PURE__*/React.createElement(Tag, {
|
|
1412
|
+
value: `${(_props$options = props.options) == null ? void 0 : _props$options.length}`
|
|
1384
1413
|
}));
|
|
1385
1414
|
};
|
|
1386
1415
|
const CustomSelectOption = (props, commonProps) => /*#__PURE__*/React.createElement(Option, Object.assign({}, props, commonProps), props.data.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
1387
1416
|
icon: props.data.icon
|
|
1388
|
-
}) : props.data.customImage ?
|
|
1417
|
+
}) : props.data.customImage ? /*#__PURE__*/React.createElement("img", {
|
|
1418
|
+
src: props.data.customImage,
|
|
1419
|
+
alt: props.data.label
|
|
1420
|
+
}) : null, props.data.label);
|
|
1389
1421
|
const CustomSelectValue = props => /*#__PURE__*/React.createElement("div", null, props.data.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
1390
1422
|
icon: props.data.icon
|
|
1391
|
-
}) : props.data.customImage ?
|
|
1423
|
+
}) : props.data.customImage ? /*#__PURE__*/React.createElement("img", {
|
|
1424
|
+
src: props.data.customImage,
|
|
1425
|
+
alt: props.data.label
|
|
1426
|
+
}) : null, props.data.label);
|
|
1392
1427
|
|
|
1393
1428
|
const SelectInteractive = ({
|
|
1394
1429
|
name,
|
|
@@ -2561,7 +2596,7 @@ const {
|
|
|
2561
2596
|
} = colors;
|
|
2562
2597
|
const Wrapper$7 = /*#__PURE__*/_styled.div.withConfig({
|
|
2563
2598
|
displayName: "styles__Wrapper",
|
|
2564
|
-
componentId: "d2fn4g-0"
|
|
2599
|
+
componentId: "sc-d2fn4g-0"
|
|
2565
2600
|
})(["--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
2601
|
--default: ${grey$e};
|
|
2567
2602
|
--light: ${lightGrey$c};
|
|
@@ -2642,26 +2677,51 @@ const {
|
|
|
2642
2677
|
} = typography;
|
|
2643
2678
|
const TableWrapper = /*#__PURE__*/_styled.div.withConfig({
|
|
2644
2679
|
displayName: "styles__TableWrapper",
|
|
2645
|
-
componentId: "vmoy3z-0"
|
|
2680
|
+
componentId: "sc-vmoy3z-0"
|
|
2646
2681
|
})(["position:relative;"]);
|
|
2647
2682
|
const OverflowWrapper = /*#__PURE__*/_styled.div.withConfig({
|
|
2648
2683
|
displayName: "styles__OverflowWrapper",
|
|
2649
|
-
componentId: "vmoy3z-1"
|
|
2684
|
+
componentId: "sc-vmoy3z-1"
|
|
2650
2685
|
})(["@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
2686
|
const Table = /*#__PURE__*/_styled.table.withConfig({
|
|
2652
2687
|
displayName: "styles__Table",
|
|
2653
|
-
componentId: "vmoy3z-2"
|
|
2654
|
-
})(["width:100%;border-width:
|
|
2688
|
+
componentId: "sc-vmoy3z-2"
|
|
2689
|
+
})(["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`
|
|
2690
|
+
width: ${rem('75px')};
|
|
2691
|
+
height: ${rem('15px')};
|
|
2692
|
+
background: #f6f7f8;
|
|
2693
|
+
background-image: -webkit-linear-gradient(
|
|
2694
|
+
left,
|
|
2695
|
+
#f6f7f8 0%,
|
|
2696
|
+
#edeef1 20%,
|
|
2697
|
+
#f6f7f8 40%,
|
|
2698
|
+
#f6f7f8 100%
|
|
2699
|
+
);
|
|
2700
|
+
background-repeat: no-repeat;
|
|
2701
|
+
background-size: ${rem('800px')} 100%;
|
|
2702
|
+
animation-fill-mode: forwards;
|
|
2703
|
+
animation-name: placeholderSkeleton;
|
|
2704
|
+
animation-timing-function: linear;
|
|
2705
|
+
animation-iteration-count: infinite;
|
|
2706
|
+
animation-duration: 1.5s;
|
|
2707
|
+
`, /*#__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'));
|
|
2708
|
+
const SkeletonCell = /*#__PURE__*/_styled.div.withConfig({
|
|
2709
|
+
displayName: "styles__SkeletonCell",
|
|
2710
|
+
componentId: "sc-vmoy3z-3"
|
|
2711
|
+
})(["@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'));
|
|
2655
2712
|
|
|
2656
2713
|
const Table$1 = props => {
|
|
2657
2714
|
const {
|
|
2658
|
-
border =
|
|
2715
|
+
border = true,
|
|
2659
2716
|
options,
|
|
2660
2717
|
values = [],
|
|
2661
2718
|
actions = [],
|
|
2662
2719
|
dataTestId = 'table-test-id',
|
|
2663
2720
|
menuDataTestId = 'table-action-menu',
|
|
2664
2721
|
actionMenuTestId = 'icon-button',
|
|
2722
|
+
loading = false,
|
|
2723
|
+
loadingColumns = 4,
|
|
2724
|
+
loadingRows = 20,
|
|
2665
2725
|
showEmpty = false,
|
|
2666
2726
|
emptyValue = 'No Data',
|
|
2667
2727
|
className = 'table',
|
|
@@ -2681,6 +2741,9 @@ const Table$1 = props => {
|
|
|
2681
2741
|
const hasActionMenu = actions.length > 0;
|
|
2682
2742
|
const validValues = values.filter(hasValue);
|
|
2683
2743
|
const hasValues = Array.isArray(values) && values.length > 0;
|
|
2744
|
+
const headSkeleton = /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(SkeletonCell, null));
|
|
2745
|
+
const cellSkeleton = /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(SkeletonCell, null));
|
|
2746
|
+
const columnsSkeleton = columns.length > 0 ? columns.length : loadingColumns;
|
|
2684
2747
|
|
|
2685
2748
|
if (showEmpty && !hasValues) {
|
|
2686
2749
|
const columnHeaders = columns.map(column => column.value);
|
|
@@ -2695,8 +2758,11 @@ const Table$1 = props => {
|
|
|
2695
2758
|
border: border,
|
|
2696
2759
|
"data-testid": dataTestId,
|
|
2697
2760
|
className: className,
|
|
2698
|
-
style: style
|
|
2699
|
-
|
|
2761
|
+
style: style,
|
|
2762
|
+
loadingState: loading
|
|
2763
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, loading && !columns ? Array.from({
|
|
2764
|
+
length: loadingColumns
|
|
2765
|
+
}, () => headSkeleton) : columns.map(({
|
|
2700
2766
|
id = '',
|
|
2701
2767
|
className = '',
|
|
2702
2768
|
value = '',
|
|
@@ -2705,7 +2771,11 @@ const Table$1 = props => {
|
|
|
2705
2771
|
key: id,
|
|
2706
2772
|
className: className,
|
|
2707
2773
|
"data-testid": colDataTestId ? `th-${colDataTestId}` : null
|
|
2708
|
-
}, value)), hasActionMenu && /*#__PURE__*/React.createElement("th", null))), /*#__PURE__*/React.createElement("tbody", null,
|
|
2774
|
+
}, value)), !loading && hasActionMenu && /*#__PURE__*/React.createElement("th", null))), /*#__PURE__*/React.createElement("tbody", null, loading ? Array.from({
|
|
2775
|
+
length: loadingRows
|
|
2776
|
+
}, () => /*#__PURE__*/React.createElement("tr", null, Array.from({
|
|
2777
|
+
length: columnsSkeleton
|
|
2778
|
+
}, () => cellSkeleton))) : validValues.map((row, index) => /*#__PURE__*/React.createElement("tr", {
|
|
2709
2779
|
key: row.id,
|
|
2710
2780
|
"data-testid": `row-${dataTestId}`
|
|
2711
2781
|
}, columns.map(({
|
|
@@ -2933,7 +3003,7 @@ const {
|
|
|
2933
3003
|
} = colors;
|
|
2934
3004
|
const Wrapper$8 = /*#__PURE__*/_styled.div.withConfig({
|
|
2935
3005
|
displayName: "styles__Wrapper",
|
|
2936
|
-
componentId: "mbja2a-0"
|
|
3006
|
+
componentId: "sc-mbja2a-0"
|
|
2937
3007
|
})(["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'));
|
|
2938
3008
|
|
|
2939
3009
|
const FormGroup = props => {
|
|
@@ -5679,11 +5749,11 @@ const {
|
|
|
5679
5749
|
} = typography;
|
|
5680
5750
|
const Wrapper$g = /*#__PURE__*/_styled.div.withConfig({
|
|
5681
5751
|
displayName: "styles__Wrapper",
|
|
5682
|
-
componentId: "znznmm-0"
|
|
5752
|
+
componentId: "sc-znznmm-0"
|
|
5683
5753
|
})(["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);
|
|
5684
5754
|
const More = /*#__PURE__*/_styled.div.withConfig({
|
|
5685
5755
|
displayName: "styles__More",
|
|
5686
|
-
componentId: "znznmm-1"
|
|
5756
|
+
componentId: "sc-znznmm-1"
|
|
5687
5757
|
})(["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'));
|
|
5688
5758
|
|
|
5689
5759
|
const HorizontalNav = props => {
|
|
@@ -5781,7 +5851,7 @@ const ModalContainer = /*#__PURE__*/_styled.div.withConfig({
|
|
|
5781
5851
|
const ModalHeader = /*#__PURE__*/_styled.div.withConfig({
|
|
5782
5852
|
displayName: "styles__ModalHeader",
|
|
5783
5853
|
componentId: "sc-16r6vcc-3"
|
|
5784
|
-
})(["display:flex;h2{margin:0 0 ", " 0;font-size:2rem;font-weight:", ";}button{display:none;position:absolute;top:0;right:0;margin:", " ", " 0 0;
|
|
5854
|
+
})(["display:flex;h2{margin:0 0 ", " 0;font-size:2rem;font-weight:", ";}button{display:none;position:absolute;top:0;right:0;margin:", " ", " 0 0;border:", " solid ", ";min-width:", ";height:", ";z-index:1;@media ", "{display:inherit;}}"], /*#__PURE__*/rem('30px'), bold$9, /*#__PURE__*/rem('-14px'), /*#__PURE__*/rem('-14px'), /*#__PURE__*/rem('2px'), colors.grey200, /*#__PURE__*/rem('28px'), /*#__PURE__*/rem('28px'), device.s);
|
|
5785
5855
|
|
|
5786
5856
|
const Modal = props => {
|
|
5787
5857
|
const {
|
|
@@ -5820,11 +5890,12 @@ const Modal = props => {
|
|
|
5820
5890
|
zIndex: zIndex,
|
|
5821
5891
|
className: "modal"
|
|
5822
5892
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, title && /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement(Button, {
|
|
5823
|
-
|
|
5824
|
-
|
|
5893
|
+
color: "white",
|
|
5894
|
+
txtColor: "grey200",
|
|
5825
5895
|
icon: "cross",
|
|
5826
5896
|
ariaLabel: "Close",
|
|
5827
|
-
action: hide
|
|
5897
|
+
action: hide,
|
|
5898
|
+
rounded: true
|
|
5828
5899
|
})), children, footer && /*#__PURE__*/React.createElement(ModalFooter, {
|
|
5829
5900
|
closeAction: hide,
|
|
5830
5901
|
closeValue: closeValue
|
|
@@ -6009,25 +6080,6 @@ const Wrapper$h = _styled.div`
|
|
|
6009
6080
|
}
|
|
6010
6081
|
}
|
|
6011
6082
|
`;
|
|
6012
|
-
const Table$3 = _styled.div`
|
|
6013
|
-
--columns: ${props => props.columnsNumber};
|
|
6014
|
-
|
|
6015
|
-
display: grid;
|
|
6016
|
-
grid-template-columns: repeat(4, 1fr);
|
|
6017
|
-
grid-template-columns: repeat(var(--columns), 1fr);
|
|
6018
|
-
grid-gap: ${/*#__PURE__*/rem('15px')};
|
|
6019
|
-
padding: ${/*#__PURE__*/rem('15px')};
|
|
6020
|
-
|
|
6021
|
-
.header {
|
|
6022
|
-
width: 50%;
|
|
6023
|
-
height: ${/*#__PURE__*/rem('15px')};
|
|
6024
|
-
}
|
|
6025
|
-
|
|
6026
|
-
.cell {
|
|
6027
|
-
width: 100%;
|
|
6028
|
-
height: ${/*#__PURE__*/rem('15px')};
|
|
6029
|
-
}
|
|
6030
|
-
`;
|
|
6031
6083
|
const Grid = _styled.div`
|
|
6032
6084
|
display: grid;
|
|
6033
6085
|
grid-template-columns: repeat(auto-fill, ${/*#__PURE__*/rem('300px')});
|
|
@@ -6040,15 +6092,10 @@ const LoadingState = props => {
|
|
|
6040
6092
|
type = 'text',
|
|
6041
6093
|
lines = 3,
|
|
6042
6094
|
cardsNumber = 4,
|
|
6043
|
-
header = true,
|
|
6044
|
-
columnsNumber = 4,
|
|
6045
|
-
rowsNumber = 3,
|
|
6046
6095
|
center = true
|
|
6047
6096
|
} = props;
|
|
6048
6097
|
let paragraphs = [];
|
|
6049
6098
|
let cards = [];
|
|
6050
|
-
let tableHeader = [];
|
|
6051
|
-
let columns = [];
|
|
6052
6099
|
let loadingType;
|
|
6053
6100
|
|
|
6054
6101
|
for (let i = 0; i < lines; i++) {
|
|
@@ -6079,20 +6126,6 @@ const LoadingState = props => {
|
|
|
6079
6126
|
})));
|
|
6080
6127
|
}
|
|
6081
6128
|
|
|
6082
|
-
for (let i = 0; i < columnsNumber; i++) {
|
|
6083
|
-
tableHeader.push( /*#__PURE__*/React.createElement("div", {
|
|
6084
|
-
key: i,
|
|
6085
|
-
className: "header"
|
|
6086
|
-
}));
|
|
6087
|
-
}
|
|
6088
|
-
|
|
6089
|
-
for (let i = 0; i < columnsNumber * rowsNumber; i++) {
|
|
6090
|
-
columns.push( /*#__PURE__*/React.createElement("div", {
|
|
6091
|
-
key: i,
|
|
6092
|
-
className: "cell"
|
|
6093
|
-
}));
|
|
6094
|
-
}
|
|
6095
|
-
|
|
6096
6129
|
switch (type) {
|
|
6097
6130
|
case 'text':
|
|
6098
6131
|
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6108,13 +6141,6 @@ const LoadingState = props => {
|
|
|
6108
6141
|
}, cards);
|
|
6109
6142
|
break;
|
|
6110
6143
|
|
|
6111
|
-
case 'table':
|
|
6112
|
-
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table$3, {
|
|
6113
|
-
className: "table",
|
|
6114
|
-
columnsNumber: columnsNumber
|
|
6115
|
-
}, header && tableHeader, columns));
|
|
6116
|
-
break;
|
|
6117
|
-
|
|
6118
6144
|
case 'value':
|
|
6119
6145
|
loadingType = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
6120
6146
|
className: "value"
|