@taikai/rocket-kit 3.0.0-beta.1 → 3.0.0-beta.2
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/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/loading-state/index.d.ts +1 -4
- 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 +51 -60
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +281 -281
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +51 -60
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +4 -4
|
@@ -19,6 +19,9 @@ export interface TableProps<CellDataType> {
|
|
|
19
19
|
dataTestId?: string;
|
|
20
20
|
menuDataTestId?: string;
|
|
21
21
|
actionMenuTestId?: string;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
loadingColumns?: number;
|
|
24
|
+
loadingRows?: number;
|
|
22
25
|
showEmpty?: boolean;
|
|
23
26
|
emptyValue?: string;
|
|
24
27
|
className?: string;
|
|
@@ -11,6 +11,21 @@ declare const _default: {
|
|
|
11
11
|
type: string;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
+
loading: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
loadingColumns: {
|
|
20
|
+
control: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
loadingRows: {
|
|
25
|
+
control: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
14
29
|
};
|
|
15
30
|
};
|
|
16
31
|
export default _default;
|
|
@@ -19,6 +34,9 @@ export declare const TableComponent: {
|
|
|
19
34
|
storyName: string;
|
|
20
35
|
args: {
|
|
21
36
|
border: boolean;
|
|
37
|
+
loading: boolean;
|
|
38
|
+
loadingColumns: number;
|
|
39
|
+
loadingRows: number;
|
|
22
40
|
};
|
|
23
41
|
};
|
|
24
42
|
export declare const TableEmptyComponent: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface TableProps {
|
|
2
2
|
border?: boolean;
|
|
3
|
+
loadingState?: boolean;
|
|
3
4
|
}
|
|
4
5
|
export declare const TableWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
6
|
export declare const OverflowWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
export declare const Table: import("styled-components").StyledComponent<"table", any,
|
|
7
|
+
export declare const Table: import("styled-components").StyledComponent<"table", any, TableProps, never>;
|
|
8
|
+
export declare const SkeletonCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
9
|
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface LoadingStateProps {
|
|
3
|
-
type: 'text' | 'card' | '
|
|
3
|
+
type: 'text' | 'card' | 'value';
|
|
4
4
|
lines?: number;
|
|
5
5
|
cardsNumber?: number;
|
|
6
|
-
header?: boolean;
|
|
7
|
-
columnsNumber?: number;
|
|
8
|
-
rowsNumber?: number;
|
|
9
6
|
center?: boolean;
|
|
10
7
|
}
|
|
11
8
|
declare const LoadingState: (props: LoadingStateProps) => JSX.Element;
|
|
@@ -4,6 +4,5 @@ interface LoadingStateProps {
|
|
|
4
4
|
center?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, LoadingStateProps, never>;
|
|
7
|
-
export declare const Table: import("styled-components").StyledComponent<"div", any, LoadingStateProps, never>;
|
|
8
7
|
export declare const Grid: import("styled-components").StyledComponent<"div", any, LoadingStateProps, never>;
|
|
9
8
|
export {};
|
|
@@ -267,7 +267,7 @@ const useColor = value => {
|
|
|
267
267
|
const ButtonWrapper = /*#__PURE__*/_styled__default.button.withConfig({
|
|
268
268
|
displayName: "styles__ButtonWrapper",
|
|
269
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:", ";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 => {
|
|
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:", ";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 => {
|
|
271
271
|
var _props$color;
|
|
272
272
|
|
|
273
273
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
@@ -279,7 +279,7 @@ const ButtonWrapper = /*#__PURE__*/_styled__default.button.withConfig({
|
|
|
279
279
|
var _props$color2;
|
|
280
280
|
|
|
281
281
|
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.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, typography.letterSpacing, /*#__PURE__*/polished.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);
|
|
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, typography.letterSpacing, /*#__PURE__*/polished.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);
|
|
283
283
|
|
|
284
284
|
const Button = props => {
|
|
285
285
|
const {
|
|
@@ -458,7 +458,7 @@ const ButtonLink = props => {
|
|
|
458
458
|
blank = false,
|
|
459
459
|
rel = undefined,
|
|
460
460
|
value = '',
|
|
461
|
-
iconPosition = '
|
|
461
|
+
iconPosition = 'left',
|
|
462
462
|
icon = '',
|
|
463
463
|
dataTestId = '',
|
|
464
464
|
eventId = '',
|
|
@@ -514,7 +514,7 @@ const CheckboxLabel = /*#__PURE__*/_styled__default.span.withConfig({
|
|
|
514
514
|
const CheckboxInput = /*#__PURE__*/_styled__default.input.withConfig({
|
|
515
515
|
displayName: "styles__CheckboxInput",
|
|
516
516
|
componentId: "w5t014-2"
|
|
517
|
-
})(["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);
|
|
517
|
+
})(["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
518
|
const Checkmark = /*#__PURE__*/_styled__default.span.withConfig({
|
|
519
519
|
displayName: "styles__Checkmark",
|
|
520
520
|
componentId: "w5t014-3"
|
|
@@ -1048,7 +1048,7 @@ const Spinner = props => {
|
|
|
1048
1048
|
const TagWrapper = /*#__PURE__*/_styled__default.span.withConfig({
|
|
1049
1049
|
displayName: "styles__TagWrapper",
|
|
1050
1050
|
componentId: "sc-1ghratr-0"
|
|
1051
|
-
})(["--bg:", ";--txt:", ";display:inline-block;border:", " solid var(--bg);border-radius:", ";background-color:", ";
|
|
1051
|
+
})(["--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
1052
|
var _props$color;
|
|
1053
1053
|
|
|
1054
1054
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
@@ -1056,7 +1056,7 @@ const TagWrapper = /*#__PURE__*/_styled__default.span.withConfig({
|
|
|
1056
1056
|
var _props$txtColor;
|
|
1057
1057
|
|
|
1058
1058
|
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
1059
|
-
}, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/polished.rem('
|
|
1059
|
+
}, /*#__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
1060
|
|
|
1061
1061
|
const Tag = props => {
|
|
1062
1062
|
const {
|
|
@@ -2660,17 +2660,42 @@ const OverflowWrapper = /*#__PURE__*/_styled__default.div.withConfig({
|
|
|
2660
2660
|
const Table = /*#__PURE__*/_styled__default.table.withConfig({
|
|
2661
2661
|
displayName: "styles__Table",
|
|
2662
2662
|
componentId: "vmoy3z-2"
|
|
2663
|
-
})(["width:100%;border-width:
|
|
2663
|
+
})(["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
|
+
width: ${polished.rem('75px')};
|
|
2665
|
+
height: ${polished.rem('15px')};
|
|
2666
|
+
background: #f6f7f8;
|
|
2667
|
+
background-image: -webkit-linear-gradient(
|
|
2668
|
+
left,
|
|
2669
|
+
#f6f7f8 0%,
|
|
2670
|
+
#edeef1 20%,
|
|
2671
|
+
#f6f7f8 40%,
|
|
2672
|
+
#f6f7f8 100%
|
|
2673
|
+
);
|
|
2674
|
+
background-repeat: no-repeat;
|
|
2675
|
+
background-size: ${polished.rem('800px')} 100%;
|
|
2676
|
+
animation-fill-mode: forwards;
|
|
2677
|
+
animation-name: placeholderSkeleton;
|
|
2678
|
+
animation-timing-function: linear;
|
|
2679
|
+
animation-iteration-count: infinite;
|
|
2680
|
+
animation-duration: 1.5s;
|
|
2681
|
+
`, /*#__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
|
+
const SkeletonCell = /*#__PURE__*/_styled__default.div.withConfig({
|
|
2683
|
+
displayName: "styles__SkeletonCell",
|
|
2684
|
+
componentId: "vmoy3z-3"
|
|
2685
|
+
})(["@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'));
|
|
2664
2686
|
|
|
2665
2687
|
const Table$1 = props => {
|
|
2666
2688
|
const {
|
|
2667
|
-
border =
|
|
2689
|
+
border = true,
|
|
2668
2690
|
options,
|
|
2669
2691
|
values = [],
|
|
2670
2692
|
actions = [],
|
|
2671
2693
|
dataTestId = 'table-test-id',
|
|
2672
2694
|
menuDataTestId = 'table-action-menu',
|
|
2673
2695
|
actionMenuTestId = 'icon-button',
|
|
2696
|
+
loading = false,
|
|
2697
|
+
loadingColumns = 4,
|
|
2698
|
+
loadingRows = 20,
|
|
2674
2699
|
showEmpty = false,
|
|
2675
2700
|
emptyValue = 'No Data',
|
|
2676
2701
|
className = 'table',
|
|
@@ -2690,6 +2715,9 @@ const Table$1 = props => {
|
|
|
2690
2715
|
const hasActionMenu = actions.length > 0;
|
|
2691
2716
|
const validValues = values.filter(hasValue);
|
|
2692
2717
|
const hasValues = Array.isArray(values) && values.length > 0;
|
|
2718
|
+
const headSkeleton = /*#__PURE__*/React__default.createElement("th", null, /*#__PURE__*/React__default.createElement(SkeletonCell, null));
|
|
2719
|
+
const cellSkeleton = /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(SkeletonCell, null));
|
|
2720
|
+
const columnsSkeleton = columns.length > 0 ? columns.length : loadingColumns;
|
|
2693
2721
|
|
|
2694
2722
|
if (showEmpty && !hasValues) {
|
|
2695
2723
|
const columnHeaders = columns.map(column => column.value);
|
|
@@ -2704,8 +2732,11 @@ const Table$1 = props => {
|
|
|
2704
2732
|
border: border,
|
|
2705
2733
|
"data-testid": dataTestId,
|
|
2706
2734
|
className: className,
|
|
2707
|
-
style: style
|
|
2708
|
-
|
|
2735
|
+
style: style,
|
|
2736
|
+
loadingState: loading
|
|
2737
|
+
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, loading && !columns ? Array.from({
|
|
2738
|
+
length: loadingColumns
|
|
2739
|
+
}, () => headSkeleton) : columns.map(({
|
|
2709
2740
|
id = '',
|
|
2710
2741
|
className = '',
|
|
2711
2742
|
value = '',
|
|
@@ -2714,7 +2745,11 @@ const Table$1 = props => {
|
|
|
2714
2745
|
key: id,
|
|
2715
2746
|
className: className,
|
|
2716
2747
|
"data-testid": colDataTestId ? `th-${colDataTestId}` : null
|
|
2717
|
-
}, value)), hasActionMenu && /*#__PURE__*/React__default.createElement("th", null))), /*#__PURE__*/React__default.createElement("tbody", null,
|
|
2748
|
+
}, value)), !loading && hasActionMenu && /*#__PURE__*/React__default.createElement("th", null))), /*#__PURE__*/React__default.createElement("tbody", null, loading ? Array.from({
|
|
2749
|
+
length: loadingRows
|
|
2750
|
+
}, () => /*#__PURE__*/React__default.createElement("tr", null, Array.from({
|
|
2751
|
+
length: columnsSkeleton
|
|
2752
|
+
}, () => cellSkeleton))) : validValues.map((row, index) => /*#__PURE__*/React__default.createElement("tr", {
|
|
2718
2753
|
key: row.id,
|
|
2719
2754
|
"data-testid": `row-${dataTestId}`
|
|
2720
2755
|
}, columns.map(({
|
|
@@ -5790,7 +5825,7 @@ const ModalContainer = /*#__PURE__*/_styled__default.div.withConfig({
|
|
|
5790
5825
|
const ModalHeader = /*#__PURE__*/_styled__default.div.withConfig({
|
|
5791
5826
|
displayName: "styles__ModalHeader",
|
|
5792
5827
|
componentId: "sc-16r6vcc-3"
|
|
5793
|
-
})(["display:flex;h2{margin:0 0 ", " 0;font-size:2rem;font-weight:", ";}button{display:none;position:absolute;top:0;right:0;margin:", " ", " 0 0;
|
|
5828
|
+
})(["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__*/polished.rem('30px'), bold$9, /*#__PURE__*/polished.rem('-14px'), /*#__PURE__*/polished.rem('-14px'), /*#__PURE__*/polished.rem('2px'), colors.grey200, /*#__PURE__*/polished.rem('28px'), /*#__PURE__*/polished.rem('28px'), device.s);
|
|
5794
5829
|
|
|
5795
5830
|
const Modal = props => {
|
|
5796
5831
|
const {
|
|
@@ -5829,11 +5864,12 @@ const Modal = props => {
|
|
|
5829
5864
|
zIndex: zIndex,
|
|
5830
5865
|
className: "modal"
|
|
5831
5866
|
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, title && /*#__PURE__*/React__default.createElement("h2", null, title), /*#__PURE__*/React__default.createElement(Button, {
|
|
5832
|
-
|
|
5833
|
-
|
|
5867
|
+
color: "white",
|
|
5868
|
+
txtColor: "grey200",
|
|
5834
5869
|
icon: "cross",
|
|
5835
5870
|
ariaLabel: "Close",
|
|
5836
|
-
action: hide
|
|
5871
|
+
action: hide,
|
|
5872
|
+
rounded: true
|
|
5837
5873
|
})), children, footer && /*#__PURE__*/React__default.createElement(ModalFooter, {
|
|
5838
5874
|
closeAction: hide,
|
|
5839
5875
|
closeValue: closeValue
|
|
@@ -6018,25 +6054,6 @@ const Wrapper$h = _styled__default.div`
|
|
|
6018
6054
|
}
|
|
6019
6055
|
}
|
|
6020
6056
|
`;
|
|
6021
|
-
const Table$3 = _styled__default.div`
|
|
6022
|
-
--columns: ${props => props.columnsNumber};
|
|
6023
|
-
|
|
6024
|
-
display: grid;
|
|
6025
|
-
grid-template-columns: repeat(4, 1fr);
|
|
6026
|
-
grid-template-columns: repeat(var(--columns), 1fr);
|
|
6027
|
-
grid-gap: ${/*#__PURE__*/polished.rem('15px')};
|
|
6028
|
-
padding: ${/*#__PURE__*/polished.rem('15px')};
|
|
6029
|
-
|
|
6030
|
-
.header {
|
|
6031
|
-
width: 50%;
|
|
6032
|
-
height: ${/*#__PURE__*/polished.rem('15px')};
|
|
6033
|
-
}
|
|
6034
|
-
|
|
6035
|
-
.cell {
|
|
6036
|
-
width: 100%;
|
|
6037
|
-
height: ${/*#__PURE__*/polished.rem('15px')};
|
|
6038
|
-
}
|
|
6039
|
-
`;
|
|
6040
6057
|
const Grid = _styled__default.div`
|
|
6041
6058
|
display: grid;
|
|
6042
6059
|
grid-template-columns: repeat(auto-fill, ${/*#__PURE__*/polished.rem('300px')});
|
|
@@ -6049,15 +6066,10 @@ const LoadingState = props => {
|
|
|
6049
6066
|
type = 'text',
|
|
6050
6067
|
lines = 3,
|
|
6051
6068
|
cardsNumber = 4,
|
|
6052
|
-
header = true,
|
|
6053
|
-
columnsNumber = 4,
|
|
6054
|
-
rowsNumber = 3,
|
|
6055
6069
|
center = true
|
|
6056
6070
|
} = props;
|
|
6057
6071
|
let paragraphs = [];
|
|
6058
6072
|
let cards = [];
|
|
6059
|
-
let tableHeader = [];
|
|
6060
|
-
let columns = [];
|
|
6061
6073
|
let loadingType;
|
|
6062
6074
|
|
|
6063
6075
|
for (let i = 0; i < lines; i++) {
|
|
@@ -6088,20 +6100,6 @@ const LoadingState = props => {
|
|
|
6088
6100
|
})));
|
|
6089
6101
|
}
|
|
6090
6102
|
|
|
6091
|
-
for (let i = 0; i < columnsNumber; i++) {
|
|
6092
|
-
tableHeader.push( /*#__PURE__*/React__default.createElement("div", {
|
|
6093
|
-
key: i,
|
|
6094
|
-
className: "header"
|
|
6095
|
-
}));
|
|
6096
|
-
}
|
|
6097
|
-
|
|
6098
|
-
for (let i = 0; i < columnsNumber * rowsNumber; i++) {
|
|
6099
|
-
columns.push( /*#__PURE__*/React__default.createElement("div", {
|
|
6100
|
-
key: i,
|
|
6101
|
-
className: "cell"
|
|
6102
|
-
}));
|
|
6103
|
-
}
|
|
6104
|
-
|
|
6105
6103
|
switch (type) {
|
|
6106
6104
|
case 'text':
|
|
6107
6105
|
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6117,13 +6115,6 @@ const LoadingState = props => {
|
|
|
6117
6115
|
}, cards);
|
|
6118
6116
|
break;
|
|
6119
6117
|
|
|
6120
|
-
case 'table':
|
|
6121
|
-
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Table$3, {
|
|
6122
|
-
className: "table",
|
|
6123
|
-
columnsNumber: columnsNumber
|
|
6124
|
-
}, header && tableHeader, columns));
|
|
6125
|
-
break;
|
|
6126
|
-
|
|
6127
6118
|
case 'value':
|
|
6128
6119
|
loadingType = /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
6129
6120
|
className: "value"
|