@apify/ui-library 1.132.1 → 1.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/box.d.ts.map +1 -1
- package/dist/src/components/card_container.js.map +1 -1
- package/dist/src/components/chip.d.ts.map +1 -1
- package/dist/src/components/chip.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/floating/tooltip.d.ts.map +1 -1
- package/dist/src/components/floating/tooltip.js +8 -0
- package/dist/src/components/floating/tooltip.js.map +1 -1
- package/dist/src/components/icon_button.d.ts.map +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/link.d.ts +3 -0
- package/dist/src/components/link.d.ts.map +1 -1
- package/dist/src/components/link.js +2 -2
- package/dist/src/components/link.js.map +1 -1
- package/dist/src/components/rating.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
- package/dist/src/components/spinner.d.ts.map +1 -1
- package/dist/src/components/spinner.js.map +1 -1
- package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/src/components/store/store_actor_header.js.map +1 -1
- package/dist/src/components/table/index.d.ts +17 -0
- package/dist/src/components/table/index.d.ts.map +1 -0
- package/dist/src/components/table/index.js +16 -0
- package/dist/src/components/table/index.js.map +1 -0
- package/dist/src/components/table/table.context.d.ts +3 -0
- package/dist/src/components/table/table.context.d.ts.map +1 -0
- package/dist/src/components/table/table.context.js +3 -0
- package/dist/src/components/table/table.context.js.map +1 -0
- package/dist/src/components/table/table.d.ts +3 -0
- package/dist/src/components/table/table.d.ts.map +1 -0
- package/dist/src/components/table/table.js +6 -0
- package/dist/src/components/table/table.js.map +1 -0
- package/dist/src/components/table/table.styled.d.ts +30 -0
- package/dist/src/components/table/table.styled.d.ts.map +1 -0
- package/dist/src/components/table/table.styled.js +194 -0
- package/dist/src/components/table/table.styled.js.map +1 -0
- package/dist/src/components/table/table_body.d.ts +3 -0
- package/dist/src/components/table/table_body.d.ts.map +1 -0
- package/dist/src/components/table/table_body.js +6 -0
- package/dist/src/components/table/table_body.js.map +1 -0
- package/dist/src/components/table/table_cell.d.ts +10 -0
- package/dist/src/components/table/table_cell.d.ts.map +1 -0
- package/dist/src/components/table/table_cell.js +18 -0
- package/dist/src/components/table/table_cell.js.map +1 -0
- package/dist/src/components/table/table_empty_row.d.ts +6 -0
- package/dist/src/components/table/table_empty_row.d.ts.map +1 -0
- package/dist/src/components/table/table_empty_row.js +5 -0
- package/dist/src/components/table/table_empty_row.js.map +1 -0
- package/dist/src/components/table/table_error_row.d.ts +7 -0
- package/dist/src/components/table/table_error_row.d.ts.map +1 -0
- package/dist/src/components/table/table_error_row.js +6 -0
- package/dist/src/components/table/table_error_row.js.map +1 -0
- package/dist/src/components/table/table_expansion_row.d.ts +10 -0
- package/dist/src/components/table/table_expansion_row.d.ts.map +1 -0
- package/dist/src/components/table/table_expansion_row.js +10 -0
- package/dist/src/components/table/table_expansion_row.js.map +1 -0
- package/dist/src/components/table/table_foot.d.ts +3 -0
- package/dist/src/components/table/table_foot.d.ts.map +1 -0
- package/dist/src/components/table/table_foot.js +6 -0
- package/dist/src/components/table/table_foot.js.map +1 -0
- package/dist/src/components/table/table_head.d.ts +3 -0
- package/dist/src/components/table/table_head.d.ts.map +1 -0
- package/dist/src/components/table/table_head.js +6 -0
- package/dist/src/components/table/table_head.js.map +1 -0
- package/dist/src/components/table/table_head_cell.d.ts +3 -0
- package/dist/src/components/table/table_head_cell.d.ts.map +1 -0
- package/dist/src/components/table/table_head_cell.js +6 -0
- package/dist/src/components/table/table_head_cell.js.map +1 -0
- package/dist/src/components/table/table_head_row.d.ts +3 -0
- package/dist/src/components/table/table_head_row.d.ts.map +1 -0
- package/dist/src/components/table/table_head_row.js +6 -0
- package/dist/src/components/table/table_head_row.js.map +1 -0
- package/dist/src/components/table/table_loading_row.d.ts +6 -0
- package/dist/src/components/table/table_loading_row.d.ts.map +1 -0
- package/dist/src/components/table/table_loading_row.js +6 -0
- package/dist/src/components/table/table_loading_row.js.map +1 -0
- package/dist/src/components/table/table_row.d.ts +4 -0
- package/dist/src/components/table/table_row.d.ts.map +1 -0
- package/dist/src/components/table/table_row.js +12 -0
- package/dist/src/components/table/table_row.js.map +1 -0
- package/dist/src/components/table/table_test_ids.d.ts +16 -0
- package/dist/src/components/table/table_test_ids.d.ts.map +1 -0
- package/dist/src/components/table/table_test_ids.js +16 -0
- package/dist/src/components/table/table_test_ids.js.map +1 -0
- package/dist/src/components/table/table_wrapper.d.ts +4 -0
- package/dist/src/components/table/table_wrapper.d.ts.map +1 -0
- package/dist/src/components/table/table_wrapper.js +49 -0
- package/dist/src/components/table/table_wrapper.js.map +1 -0
- package/dist/src/components/table/types.d.ts +21 -0
- package/dist/src/components/table/types.d.ts.map +1 -0
- package/dist/src/components/table/types.js +2 -0
- package/dist/src/components/table/types.js.map +1 -0
- package/dist/src/components/tag.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/pagination.d.ts.map +1 -1
- package/dist/src/design_system/theme.d.ts.map +1 -1
- package/dist/src/type_utils.d.ts.map +1 -1
- package/dist/src/ui_dependency_provider.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/box.tsx +1 -1
- package/src/components/card_container.tsx +1 -1
- package/src/components/chip.tsx +3 -3
- package/src/components/code/code_block/code_block.tsx +3 -3
- package/src/components/code/inline_code/inline_code.tsx +1 -1
- package/src/components/code/one_line_code/one_line_code.tsx +2 -2
- package/src/components/code/prism_highlighter.tsx +1 -1
- package/src/components/floating/tooltip.tsx +8 -0
- package/src/components/image.tsx +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/link.stories.tsx +12 -0
- package/src/components/link.tsx +9 -0
- package/src/components/rating.tsx +3 -3
- package/src/components/simple_markdown/simple_markdown.tsx +1 -1
- package/src/components/spinner.tsx +1 -1
- package/src/components/store/store_actor_header.tsx +2 -2
- package/src/components/table/index.ts +16 -0
- package/src/components/table/table.context.ts +5 -0
- package/src/components/table/table.stories.tsx +258 -0
- package/src/components/table/table.styled.ts +207 -0
- package/src/components/table/table.tsx +9 -0
- package/src/components/table/table_body.tsx +9 -0
- package/src/components/table/table_cell.tsx +28 -0
- package/src/components/table/table_empty_row.tsx +12 -0
- package/src/components/table/table_error_row.tsx +13 -0
- package/src/components/table/table_expansion_row.tsx +24 -0
- package/src/components/table/table_foot.tsx +9 -0
- package/src/components/table/table_head.tsx +9 -0
- package/src/components/table/table_head_cell.tsx +9 -0
- package/src/components/table/table_head_row.tsx +9 -0
- package/src/components/table/table_loading_row.tsx +13 -0
- package/src/components/table/table_row.tsx +30 -0
- package/src/components/table/table_test_ids.ts +15 -0
- package/src/components/table/table_wrapper.tsx +71 -0
- package/src/components/table/types.ts +24 -0
- package/src/components/tabs/tabs.tsx +1 -1
- package/src/components/tag.tsx +1 -1
- package/src/components/to_consolidate/pagination.tsx +1 -1
- package/src/design_system/theme.ts +1 -1
- package/src/type_utils.ts +1 -1
- package/src/ui_dependency_provider.tsx +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { theme } from '../../design_system/theme.js';
|
|
3
|
+
import { Box } from '../box.js';
|
|
4
|
+
/** z-index for sticky table head cells. Consumers can override via CSS if needed. */
|
|
5
|
+
const STICKY_HEAD_Z_INDEX = 5;
|
|
6
|
+
export const tableClassNames = {
|
|
7
|
+
TABLE: 'Table',
|
|
8
|
+
HEAD: 'Table-Head',
|
|
9
|
+
BODY: 'Table-Body',
|
|
10
|
+
FOOT: 'Table-Foot',
|
|
11
|
+
HEAD_ROW: 'Table-Head-Row',
|
|
12
|
+
HEAD_CELL: 'Table-Head-Cell',
|
|
13
|
+
BODY_ROW: 'Table-Body-Row',
|
|
14
|
+
BODY_ROW_CLICKABLE: 'Table-Body-Row_clickable',
|
|
15
|
+
BODY_ROW_EXPANDED: 'Table-Body-Row_expanded',
|
|
16
|
+
BODY_CELL: 'Table-Body-Cell',
|
|
17
|
+
FOOT_ROW: 'Table-Foot-Row',
|
|
18
|
+
FOOT_CELL: 'Table-Foot-Cell',
|
|
19
|
+
ROW_EMPTY: 'Table-Row-Empty',
|
|
20
|
+
ROW_EMPTY_CELL: 'Table-Row-Empty-Cell',
|
|
21
|
+
ROW_EXPANSION: 'Table-Row-Expansion',
|
|
22
|
+
ROW_EXPANSION_CELL: 'Table-Row-Expansion-Cell',
|
|
23
|
+
WRAPPER_SCROLLABLE: 'Table-Scrollable-Content',
|
|
24
|
+
WRAPPER_SHADOW_LEFT: 'Table-Scrollable-Shadow-Left',
|
|
25
|
+
WRAPPER_SHADOW_RIGHT: 'Table-Scrollable-Shadow-Right',
|
|
26
|
+
// Responsive hiding
|
|
27
|
+
HIDDEN_SM: 'Table-Cell_hiddenSM',
|
|
28
|
+
HIDDEN_MD: 'Table-Cell_hiddenMD',
|
|
29
|
+
HIDDEN_LG: 'Table-Cell_hiddenLG',
|
|
30
|
+
// Nested links
|
|
31
|
+
CELL_OVERLAY_LINK: 'Table-Cell-Overlay-Link',
|
|
32
|
+
CELL_LINK: 'Table-Cell-Link',
|
|
33
|
+
};
|
|
34
|
+
export const StyledTable = styled.table `
|
|
35
|
+
position: relative;
|
|
36
|
+
border-collapse: separate;
|
|
37
|
+
border-spacing: 0;
|
|
38
|
+
min-width: 100%;
|
|
39
|
+
|
|
40
|
+
/* Head cell rounding */
|
|
41
|
+
.${tableClassNames.HEAD_CELL}:first-child {
|
|
42
|
+
border-top-left-radius: ${theme.radius.radius12};
|
|
43
|
+
}
|
|
44
|
+
.${tableClassNames.HEAD_CELL}:last-child {
|
|
45
|
+
border-top-right-radius: ${theme.radius.radius12};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Generic cell padding */
|
|
49
|
+
.${tableClassNames.HEAD_CELL},
|
|
50
|
+
.${tableClassNames.BODY_CELL},
|
|
51
|
+
.${tableClassNames.ROW_EMPTY_CELL},
|
|
52
|
+
.${tableClassNames.ROW_EXPANSION_CELL} {
|
|
53
|
+
padding: ${theme.space.space8};
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Head styling */
|
|
58
|
+
.${tableClassNames.HEAD_CELL} {
|
|
59
|
+
position: sticky;
|
|
60
|
+
top: 0;
|
|
61
|
+
z-index: ${STICKY_HEAD_Z_INDEX};
|
|
62
|
+
height: 4rem;
|
|
63
|
+
background-color: ${theme.color.neutral.backgroundMuted};
|
|
64
|
+
border-bottom: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
65
|
+
color: ${theme.color.neutral.textMuted};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Body styling */
|
|
69
|
+
.${tableClassNames.BODY_ROW}:hover {
|
|
70
|
+
background-color: ${theme.color.neutral.hover};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.${tableClassNames.BODY_ROW}:not(:first-child) .${tableClassNames.BODY_CELL} {
|
|
74
|
+
border-top: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.${tableClassNames.BODY_ROW_CLICKABLE} {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Foot styling */
|
|
82
|
+
.${tableClassNames.FOOT_ROW}:not(:first-child) .${tableClassNames.FOOT_CELL} {
|
|
83
|
+
border-top: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Responsive hiding */
|
|
87
|
+
.${tableClassNames.HIDDEN_SM} {
|
|
88
|
+
display: none !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media ${theme.device.tablet} {
|
|
92
|
+
.${tableClassNames.HIDDEN_MD} {
|
|
93
|
+
display: none !important;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media ${theme.device.desktop} {
|
|
98
|
+
.${tableClassNames.HIDDEN_LG} {
|
|
99
|
+
display: none !important;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Expansion row */
|
|
104
|
+
.${tableClassNames.ROW_EXPANSION_CELL} {
|
|
105
|
+
border-top: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
106
|
+
box-shadow: inset 0rem 0.2rem 0.8rem -0.2rem ${theme.color.neutral.separatorSubtle};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Nested links — see https://www.notion.so/apify/How-to-Nested-links-4863b883e9e1498b965531d946721926 */
|
|
110
|
+
.${tableClassNames.CELL_OVERLAY_LINK} {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 0;
|
|
113
|
+
left: 0;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
z-index: 0;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.${tableClassNames.CELL_LINK} {
|
|
121
|
+
position: relative;
|
|
122
|
+
z-index: 1;
|
|
123
|
+
color: ${theme.color.neutral.text};
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
/* Extra padding for easier clicking, compensated by negative margin */
|
|
126
|
+
padding: ${theme.space.space4} ${theme.space.space8};
|
|
127
|
+
margin: -${theme.space.space4} -${theme.space.space8};
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
z-index: 2;
|
|
131
|
+
color: ${theme.color.primary.text};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Empty row */
|
|
136
|
+
.${tableClassNames.ROW_EMPTY_CELL} {
|
|
137
|
+
text-align: center;
|
|
138
|
+
padding: ${theme.space.space16};
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
export const StyledHorizontallyScrollableTableWrapper = styled(Box) `
|
|
142
|
+
position: relative;
|
|
143
|
+
width: 100%;
|
|
144
|
+
background-color: ${theme.color.neutral.background};
|
|
145
|
+
border: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
146
|
+
border-radius: ${theme.radius.radius12};
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
|
|
149
|
+
.${tableClassNames.WRAPPER_SCROLLABLE} {
|
|
150
|
+
position: relative;
|
|
151
|
+
overflow-x: auto;
|
|
152
|
+
overflow-y: hidden;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&::before,
|
|
156
|
+
&::after {
|
|
157
|
+
content: '';
|
|
158
|
+
position: absolute;
|
|
159
|
+
top: 0;
|
|
160
|
+
bottom: 0;
|
|
161
|
+
width: 1.6rem;
|
|
162
|
+
pointer-events: none;
|
|
163
|
+
opacity: 0;
|
|
164
|
+
transition: opacity 0.3s ease;
|
|
165
|
+
z-index: ${STICKY_HEAD_Z_INDEX + 1};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&::before {
|
|
169
|
+
left: 0;
|
|
170
|
+
background: linear-gradient(to right, ${theme.color.neutral.separatorSubtle}, transparent);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&::after {
|
|
174
|
+
right: 0;
|
|
175
|
+
background: linear-gradient(to left, ${theme.color.neutral.separatorSubtle}, transparent);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.${tableClassNames.WRAPPER_SHADOW_LEFT}::before {
|
|
179
|
+
opacity: 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.${tableClassNames.WRAPPER_SHADOW_RIGHT}::after {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
export const StyledTableFooterWrapper = styled(Box) `
|
|
187
|
+
position: relative;
|
|
188
|
+
width: 100%;
|
|
189
|
+
background-color: ${theme.color.neutral.backgroundMuted};
|
|
190
|
+
border-top: solid 1px ${theme.color.neutral.separatorSubtle};
|
|
191
|
+
overflow-x: auto;
|
|
192
|
+
scrollbar-width: none;
|
|
193
|
+
`;
|
|
194
|
+
//# sourceMappingURL=table.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.styled.js","sourceRoot":"","sources":["../../../../src/components/table/table.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,qFAAqF;AACrF,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAElB,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,iBAAiB;IAE5B,QAAQ,EAAE,gBAAgB;IAC1B,kBAAkB,EAAE,0BAA0B;IAC9C,iBAAiB,EAAE,yBAAyB;IAC5C,SAAS,EAAE,iBAAiB;IAE5B,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,iBAAiB;IAE5B,SAAS,EAAE,iBAAiB;IAC5B,cAAc,EAAE,sBAAsB;IAEtC,aAAa,EAAE,qBAAqB;IACpC,kBAAkB,EAAE,0BAA0B;IAE9C,kBAAkB,EAAE,0BAA0B;IAC9C,mBAAmB,EAAE,8BAA8B;IACnD,oBAAoB,EAAE,+BAA+B;IAErD,oBAAoB;IACpB,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,qBAAqB;IAEhC,eAAe;IACf,iBAAiB,EAAE,yBAAyB;IAC5C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AAC,cAAc,CAAC,uBAAuB,CAAC,CAEjE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableBody = ({ className, ...rest }) => (_jsx("tbody", { "data-test": tableTestIds.BODY, className: clsx(tableClassNames.BODY, className), ...rest }));
|
|
6
|
+
//# sourceMappingURL=table_body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_body.js","sourceRoot":"","sources":["../../../../src/components/table/table_body.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAgD,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAC9F,6BAAkB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CACtG,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC, TdHTMLAttributes } from 'react';
|
|
2
|
+
import { type LinkProps } from '../link.js';
|
|
3
|
+
export declare const TableCell: FC<TdHTMLAttributes<HTMLTableCellElement>>;
|
|
4
|
+
/**
|
|
5
|
+
* Inner link inside a cell whose row has a `to` prop (overlay link).
|
|
6
|
+
* Elevated above the row overlay via `z-index` so it remains clickable and hoverable.
|
|
7
|
+
* Includes extra padding (compensated by negative margin) for easier click targets.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TableCellLink: FC<LinkProps>;
|
|
10
|
+
//# sourceMappingURL=table_cell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_cell.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAKlD,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAShE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,SAAS,CAEvC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useContext } from 'react';
|
|
4
|
+
import { Link } from '../link.js';
|
|
5
|
+
import { TableRowLinkContext } from './table.context.js';
|
|
6
|
+
import { tableClassNames } from './table.styled.js';
|
|
7
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
8
|
+
export const TableCell = ({ className, children, ...rest }) => {
|
|
9
|
+
const rowLink = useContext(TableRowLinkContext);
|
|
10
|
+
return (_jsxs("td", { "data-test": tableTestIds.CELL, className: clsx(tableClassNames.BODY_CELL, className), ...rest, children: [rowLink && _jsx(Link, { className: tableClassNames.CELL_OVERLAY_LINK, to: rowLink, tabIndex: -1, ariaHidden: true }), children] }));
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Inner link inside a cell whose row has a `to` prop (overlay link).
|
|
14
|
+
* Elevated above the row overlay via `z-index` so it remains clickable and hoverable.
|
|
15
|
+
* Includes extra padding (compensated by negative margin) for easier click targets.
|
|
16
|
+
*/
|
|
17
|
+
export const TableCellLink = ({ className, ...rest }) => (_jsx(Link, { className: clsx(tableClassNames.CELL_LINK, className), ...rest }));
|
|
18
|
+
//# sourceMappingURL=table_cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_cell.js","sourceRoot":"","sources":["../../../../src/components/table/table_cell.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAA+C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACtG,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAEhD,OAAO,CACH,2BAAe,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,KAAM,IAAI,aAC5F,OAAO,IAAI,KAAC,IAAI,IAAC,SAAS,EAAE,eAAe,CAAC,iBAAiB,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,UAAU,SAAG,EACvG,QAAQ,IACR,CACR,CAAC;AACN,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACpE,KAAC,IAAI,IAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAC5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_empty_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_empty_row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3C,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAMtE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tableClassNames } from './table.styled.js';
|
|
3
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
4
|
+
export const TableEmptyRow = ({ colSpan, children }) => (_jsx("tr", { "data-test": tableTestIds.EMPTY_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children }) }));
|
|
5
|
+
//# sourceMappingURL=table_empty_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_empty_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_empty_row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAiD,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAClG,0BAAe,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC,SAAS,YACvE,aAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,cAAc,YAC1D,QAAQ,GACR,GACJ,CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_error_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_error_row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3C,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAM7F,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '../text/index.js';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableErrorRow = ({ colSpan, children, error }) => (_jsx("tr", { "data-test": tableTestIds.ERROR_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children ?? _jsx(Text, { color: "error", children: error?.message ?? 'Failed to load data' }) }) }));
|
|
6
|
+
//# sourceMappingURL=table_error_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_error_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_error_row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAwE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAChI,0BAAe,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC,SAAS,YACvE,aAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,cAAc,YAC1D,QAAQ,IAAI,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,KAAK,EAAE,OAAO,IAAI,qBAAqB,GAAQ,GAChF,GACJ,CACR,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { TableExpansion } from './types.js';
|
|
3
|
+
export declare const TableExpansionRow: FC<{
|
|
4
|
+
colSpan: number;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
expansion: TableExpansion;
|
|
7
|
+
itemId: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=table_expansion_row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_expansion_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_expansion_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAUA,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableExpansionRow = ({ colSpan, children, expansion, itemId, className }) => {
|
|
6
|
+
if (!expansion.isExpanded(itemId))
|
|
7
|
+
return null;
|
|
8
|
+
return (_jsx("tr", { "data-test": tableTestIds.EXPANSION_ROW, className: clsx(tableClassNames.ROW_EXPANSION, className), children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EXPANSION_CELL, children: children }) }));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=table_expansion_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_expansion_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_expansion_row.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,MAAM,CAAC,MAAM,iBAAiB,GAMzB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE;IACzD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/C,OAAO,CACH,0BAAe,YAAY,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,YAChG,aAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,kBAAkB,YAC9D,QAAQ,GACR,GACJ,CACR,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_foot.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_foot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAEjE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableFoot = ({ className, ...rest }) => (_jsx("tfoot", { "data-test": tableTestIds.FOOT, className: clsx(tableClassNames.FOOT, className), ...rest }));
|
|
6
|
+
//# sourceMappingURL=table_foot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_foot.js","sourceRoot":"","sources":["../../../../src/components/table/table_foot.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAgD,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAC9F,6BAAkB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CACtG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_head.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAEjE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableHead = ({ className, ...rest }) => (_jsx("thead", { "data-test": tableTestIds.HEAD, className: clsx(tableClassNames.HEAD, className), ...rest }));
|
|
6
|
+
//# sourceMappingURL=table_head.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head.js","sourceRoot":"","sources":["../../../../src/components/table/table_head.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAgD,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAC9F,6BAAkB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CACtG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head_cell.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_head_cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAKlD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAEpE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableHeadCell = ({ className, ...rest }) => (_jsx("th", { "data-test": tableTestIds.HEAD_CELL, className: clsx(tableClassNames.HEAD_CELL, className), ...rest }));
|
|
6
|
+
//# sourceMappingURL=table_head_cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head_cell.js","sourceRoot":"","sources":["../../../../src/components/table/table_head_cell.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAA+C,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACjG,0BAAe,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAC7G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_head_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAEhE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableHeadRow = ({ className, ...rest }) => (_jsx("tr", { "data-test": tableTestIds.HEAD_ROW, className: clsx(tableClassNames.HEAD_ROW, className), ...rest }));
|
|
6
|
+
//# sourceMappingURL=table_head_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_head_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_head_row.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,YAAY,GAA4C,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAC7F,0BAAe,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAC3G,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_loading_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_loading_row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3C,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAMzE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InlineSpinner } from '../spinner.js';
|
|
3
|
+
import { tableClassNames } from './table.styled.js';
|
|
4
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
5
|
+
export const TableLoadingRow = ({ colSpan, children }) => (_jsx("tr", { "data-test": tableTestIds.LOADING_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children ?? _jsx(InlineSpinner, {}) }) }));
|
|
6
|
+
//# sourceMappingURL=table_loading_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_loading_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_loading_row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,eAAe,GAAkD,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACrG,0BAAe,YAAY,CAAC,WAAW,EAAE,SAAS,EAAE,eAAe,CAAC,SAAS,YACzE,aAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,cAAc,YAC1D,QAAQ,IAAI,KAAC,aAAa,KAAG,GAC7B,GACJ,CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAqBtC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { TableRowLinkContext } from './table.context.js';
|
|
4
|
+
import { tableClassNames } from './table.styled.js';
|
|
5
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
6
|
+
export const TableRow = ({ className, clickable, expanded, to, ...rest }) => {
|
|
7
|
+
const row = (_jsx("tr", { "data-test": tableTestIds.ROW, className: clsx(tableClassNames.BODY_ROW, (clickable || to) && tableClassNames.BODY_ROW_CLICKABLE, expanded && tableClassNames.BODY_ROW_EXPANDED, className), ...rest }));
|
|
8
|
+
if (!to)
|
|
9
|
+
return row;
|
|
10
|
+
return (_jsx(TableRowLinkContext.Provider, { value: to, children: row }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=table_row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_row.js","sourceRoot":"","sources":["../../../../src/components/table/table_row.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC3F,MAAM,GAAG,GAAG,CACR,0BACe,YAAY,CAAC,GAAG,EAC3B,SAAS,EAAE,IAAI,CACX,eAAe,CAAC,QAAQ,EACxB,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,eAAe,CAAC,kBAAkB,EACvD,QAAQ,IAAI,eAAe,CAAC,iBAAiB,EAC7C,SAAS,CACZ,KACG,IAAI,GACV,CACL,CAAC;IAEF,IAAI,CAAC,EAAE;QAAE,OAAO,GAAG,CAAC;IAEpB,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,YAClC,GAAG,GACuB,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const tableTestIds: {
|
|
2
|
+
TABLE: string;
|
|
3
|
+
HEAD: string;
|
|
4
|
+
HEAD_ROW: string;
|
|
5
|
+
HEAD_CELL: string;
|
|
6
|
+
BODY: string;
|
|
7
|
+
ROW: string;
|
|
8
|
+
CELL: string;
|
|
9
|
+
FOOT: string;
|
|
10
|
+
WRAPPER: string;
|
|
11
|
+
EMPTY_ROW: string;
|
|
12
|
+
LOADING_ROW: string;
|
|
13
|
+
ERROR_ROW: string;
|
|
14
|
+
EXPANSION_ROW: string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=table_test_ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_test_ids.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_test_ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAcxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const tableTestIds = {
|
|
2
|
+
TABLE: 'Table-table',
|
|
3
|
+
HEAD: 'Table-head',
|
|
4
|
+
HEAD_ROW: 'Table-headRow',
|
|
5
|
+
HEAD_CELL: 'Table-headCell',
|
|
6
|
+
BODY: 'Table-body',
|
|
7
|
+
ROW: 'Table-row',
|
|
8
|
+
CELL: 'Table-cell',
|
|
9
|
+
FOOT: 'Table-foot',
|
|
10
|
+
WRAPPER: 'Table-wrapper',
|
|
11
|
+
EMPTY_ROW: 'Table-emptyRow',
|
|
12
|
+
LOADING_ROW: 'Table-loadingRow',
|
|
13
|
+
ERROR_ROW: 'Table-errorRow',
|
|
14
|
+
EXPANSION_ROW: 'Table-expansionRow',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=table_test_ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_test_ids.js","sourceRoot":"","sources":["../../../../src/components/table/table_test_ids.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,eAAe;IACxB,SAAS,EAAE,gBAAgB;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,SAAS,EAAE,gBAAgB;IAC3B,aAAa,EAAE,oBAAoB;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAUhC,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAE1E,eAAO,MAAM,kCAAkC,EAAE,EAAE,CAAC,uCAAuC,CA0D1F,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
3
|
+
import { Box } from '../box.js';
|
|
4
|
+
import { StyledHorizontallyScrollableTableWrapper, StyledTableFooterWrapper, tableClassNames, } from './table.styled.js';
|
|
5
|
+
import { tableTestIds } from './table_test_ids.js';
|
|
6
|
+
export const HorizontallyScrollableTableWrapper = ({ children, footer, className }) => {
|
|
7
|
+
const scrollableRef = useRef(null);
|
|
8
|
+
const wrapperRef = useRef(null);
|
|
9
|
+
const animationFrameIdRef = useRef(0);
|
|
10
|
+
const updateShadows = useCallback(() => {
|
|
11
|
+
const container = scrollableRef.current;
|
|
12
|
+
const wrapper = wrapperRef.current;
|
|
13
|
+
if (!container || !wrapper)
|
|
14
|
+
return;
|
|
15
|
+
const isScrollable = container.scrollWidth > container.clientWidth;
|
|
16
|
+
if (container.scrollLeft > 0) {
|
|
17
|
+
wrapper.classList.add(tableClassNames.WRAPPER_SHADOW_LEFT);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
wrapper.classList.remove(tableClassNames.WRAPPER_SHADOW_LEFT);
|
|
21
|
+
}
|
|
22
|
+
if (isScrollable && container.scrollLeft < container.scrollWidth - container.clientWidth - 1) {
|
|
23
|
+
wrapper.classList.add(tableClassNames.WRAPPER_SHADOW_RIGHT);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
wrapper.classList.remove(tableClassNames.WRAPPER_SHADOW_RIGHT);
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
29
|
+
const throttledUpdateShadows = useCallback(() => {
|
|
30
|
+
cancelAnimationFrame(animationFrameIdRef.current);
|
|
31
|
+
animationFrameIdRef.current = requestAnimationFrame(updateShadows);
|
|
32
|
+
}, [updateShadows]);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const container = scrollableRef.current;
|
|
35
|
+
if (!container)
|
|
36
|
+
return undefined;
|
|
37
|
+
updateShadows();
|
|
38
|
+
container.addEventListener('scroll', throttledUpdateShadows);
|
|
39
|
+
const resizeObserver = new ResizeObserver(throttledUpdateShadows);
|
|
40
|
+
resizeObserver.observe(container);
|
|
41
|
+
return () => {
|
|
42
|
+
cancelAnimationFrame(animationFrameIdRef.current);
|
|
43
|
+
container.removeEventListener('scroll', throttledUpdateShadows);
|
|
44
|
+
resizeObserver.disconnect();
|
|
45
|
+
};
|
|
46
|
+
}, [updateShadows, throttledUpdateShadows]);
|
|
47
|
+
return (_jsxs(StyledHorizontallyScrollableTableWrapper, { "data-test": tableTestIds.WRAPPER, ref: wrapperRef, className: className, children: [_jsx(Box, { className: tableClassNames.WRAPPER_SCROLLABLE, ref: scrollableRef, children: children }), footer && (_jsx(StyledTableFooterWrapper, { children: footer }))] }));
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=table_wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table_wrapper.js","sourceRoot":"","sources":["../../../../src/components/table/table_wrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EACH,wCAAwC,EACxC,wBAAwB,EACxB,eAAe,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,MAAM,CAAC,MAAM,kCAAkC,GAAgD,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE;IAC/H,MAAM,aAAa,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,mBAAmB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEtC,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC;QACxC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,SAAS,IAAI,CAAC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AG,EAAE;YACR,oBAAoB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAClD,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;YAChE,cAAc,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE5C,OAAO,CACH,MAAC,wCAAwC,iBAAY,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,aAC5G,KAAC,GAAG,IAAC,SAAS,EAAE,eAAe,CAAC,kBAAkB,EAAE,GAAG,EAAE,aAAa,YACjE,QAAQ,GACP,EACL,MAAM,IAAI,CACP,KAAC,wBAAwB,cACpB,MAAM,GACgB,CAC9B,IACsC,CAC9C,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { To } from '../link.js';
|
|
3
|
+
export type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
4
|
+
/** Apply clickable cursor style. Automatically set when `to` is provided. */
|
|
5
|
+
clickable?: boolean;
|
|
6
|
+
/** Apply expanded row style. */
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
/** Row-level navigation URL. Each `TableCell` inside will render an overlay link automatically. */
|
|
9
|
+
to?: To;
|
|
10
|
+
};
|
|
11
|
+
export type HorizontallyScrollableTableWrapperProps = {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TableExpansion = {
|
|
17
|
+
expandedId: string | null;
|
|
18
|
+
toggle: (id: string) => void;
|
|
19
|
+
isExpanded: (id: string) => boolean;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,mBAAmB,CAAC,GAAG;IAC9D,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mGAAmG;IACnG,EAAE,CAAC,EAAE,EAAE,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IAClD,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CACvC,CAAC"}
|