@atlaskit/dynamic-table 18.0.0 → 18.0.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/CHANGELOG.md +12 -0
- package/dist/cjs/components/stateless.js +2 -2
- package/dist/cjs/styled/constants.js +2 -35
- package/dist/cjs/styled/dynamic-table.compiled.css +11 -0
- package/dist/cjs/styled/dynamic-table.js +42 -52
- package/dist/cjs/styled/empty-body.compiled.css +11 -0
- package/dist/cjs/styled/empty-body.js +17 -25
- package/dist/cjs/styled/loading-container-advanced.compiled.css +9 -0
- package/dist/cjs/styled/loading-container-advanced.js +23 -38
- package/dist/cjs/styled/loading-container.compiled.css +8 -0
- package/dist/cjs/styled/loading-container.js +27 -33
- package/dist/cjs/styled/rankable/table-cell.compiled.css +1 -0
- package/dist/cjs/styled/rankable/table-cell.js +12 -15
- package/dist/cjs/styled/rankable/table-row.compiled.css +7 -0
- package/dist/cjs/styled/rankable/table-row.js +21 -26
- package/dist/cjs/styled/table-cell.compiled.css +13 -0
- package/dist/cjs/styled/table-cell.js +16 -17
- package/dist/cjs/styled/table-head.compiled.css +58 -0
- package/dist/cjs/styled/table-head.js +38 -153
- package/dist/cjs/styled/table-row.compiled.css +6 -0
- package/dist/cjs/styled/table-row.js +20 -36
- package/dist/cjs/theme.js +1 -21
- package/dist/es2019/components/stateless.js +2 -2
- package/dist/es2019/styled/constants.js +1 -33
- package/dist/es2019/styled/dynamic-table.compiled.css +11 -0
- package/dist/es2019/styled/dynamic-table.js +28 -52
- package/dist/es2019/styled/empty-body.compiled.css +11 -0
- package/dist/es2019/styled/empty-body.js +12 -22
- package/dist/es2019/styled/loading-container-advanced.compiled.css +9 -0
- package/dist/es2019/styled/loading-container-advanced.js +20 -37
- package/dist/es2019/styled/loading-container.compiled.css +8 -0
- package/dist/es2019/styled/loading-container.js +16 -29
- package/dist/es2019/styled/rankable/table-cell.compiled.css +1 -0
- package/dist/es2019/styled/rankable/table-cell.js +9 -14
- package/dist/es2019/styled/rankable/table-row.compiled.css +7 -0
- package/dist/es2019/styled/rankable/table-row.js +12 -23
- package/dist/es2019/styled/table-cell.compiled.css +13 -0
- package/dist/es2019/styled/table-cell.js +13 -19
- package/dist/es2019/styled/table-head.compiled.css +58 -0
- package/dist/es2019/styled/table-head.js +29 -153
- package/dist/es2019/styled/table-row.compiled.css +6 -0
- package/dist/es2019/styled/table-row.js +11 -38
- package/dist/es2019/theme.js +0 -17
- package/dist/esm/components/stateless.js +2 -2
- package/dist/esm/styled/constants.js +1 -33
- package/dist/esm/styled/dynamic-table.compiled.css +11 -0
- package/dist/esm/styled/dynamic-table.js +39 -50
- package/dist/esm/styled/empty-body.compiled.css +11 -0
- package/dist/esm/styled/empty-body.js +12 -22
- package/dist/esm/styled/loading-container-advanced.compiled.css +9 -0
- package/dist/esm/styled/loading-container-advanced.js +20 -37
- package/dist/esm/styled/loading-container.compiled.css +8 -0
- package/dist/esm/styled/loading-container.js +25 -33
- package/dist/esm/styled/rankable/table-cell.compiled.css +1 -0
- package/dist/esm/styled/rankable/table-cell.js +9 -14
- package/dist/esm/styled/rankable/table-row.compiled.css +7 -0
- package/dist/esm/styled/rankable/table-row.js +17 -23
- package/dist/esm/styled/table-cell.compiled.css +13 -0
- package/dist/esm/styled/table-cell.js +13 -19
- package/dist/esm/styled/table-head.compiled.css +58 -0
- package/dist/esm/styled/table-head.js +38 -154
- package/dist/esm/styled/table-row.compiled.css +6 -0
- package/dist/esm/styled/table-row.js +16 -36
- package/dist/esm/theme.js +0 -17
- package/dist/types/styled/constants.d.ts +0 -4
- package/dist/types/styled/dynamic-table.d.ts +0 -6
- package/dist/types/theme.d.ts +0 -16
- package/dist/types-ts4.5/styled/constants.d.ts +0 -4
- package/dist/types-ts4.5/styled/dynamic-table.d.ts +0 -6
- package/dist/types-ts4.5/theme.d.ts +0 -16
- package/package.json +18 -17
|
@@ -1,160 +1,43 @@
|
|
|
1
|
+
/* table-head.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./table-head.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
2
6
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
-
|
|
4
|
-
* @jsxRuntime classic
|
|
5
|
-
* @jsx jsx
|
|
6
|
-
*/
|
|
7
|
+
|
|
7
8
|
import { forwardRef } from 'react';
|
|
8
9
|
|
|
9
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
|
|
11
|
+
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { B100, N30A } from '@atlaskit/theme/colors';
|
|
13
|
+
import { B100, N300, N30A, N40 } from '@atlaskit/theme/colors';
|
|
13
14
|
import { ASC, DESC } from '../internal/constants';
|
|
14
|
-
import {
|
|
15
|
-
import { cellStyles, fixedSizeTruncateStyles, getTruncationStyleVars, overflowTruncateStyles, truncationWidthStyles } from './constants';
|
|
15
|
+
import { getTruncationStyleVars } from './constants';
|
|
16
16
|
const CSS_VAR_TEXT_COLOR = '--local-dynamic-table-text-color';
|
|
17
|
-
const rankingStyles =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const rankingStyles = null;
|
|
18
|
+
const headStyles = null;
|
|
19
|
+
const overflowTruncateStyles = null;
|
|
20
|
+
const truncationWidthStyles = null;
|
|
21
|
+
const fixedSizeTruncateStyles = null;
|
|
22
|
+
const cellStyles = null;
|
|
23
23
|
export const Head = ({
|
|
24
24
|
isRanking,
|
|
25
25
|
testId,
|
|
26
26
|
...props
|
|
27
27
|
}) => {
|
|
28
|
-
return
|
|
29
|
-
css: [headStyles, isRanking && rankingStyles],
|
|
28
|
+
return /*#__PURE__*/React.createElement("thead", _extends({
|
|
30
29
|
"data-testid": testId
|
|
31
30
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
32
|
-
}, props
|
|
31
|
+
}, props, {
|
|
32
|
+
className: ax(["_179rglyw", isRanking && "_1e0c1ule"])
|
|
33
|
+
}));
|
|
33
34
|
};
|
|
34
|
-
const headCellBaseStyles =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color: `var(--ds-text-subtle, ${`var(${CSS_VAR_TEXT_COLOR})`})`,
|
|
41
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
42
|
-
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
43
|
-
textAlign: 'left',
|
|
44
|
-
verticalAlign: 'middle',
|
|
45
|
-
'&:focus-visible': {
|
|
46
|
-
outline: `solid 2px ${`var(--ds-border-focused, ${B100})`}`
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
const headCellBaseStylesOld = css({
|
|
50
|
-
boxSizing: 'border-box',
|
|
51
|
-
position: 'relative',
|
|
52
|
-
border: 'none',
|
|
53
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
54
|
-
borderBlockEnd: `2px solid ${tableBorder.borderColor}`,
|
|
55
|
-
color: `var(--ds-text-subtle, ${`var(${CSS_VAR_TEXT_COLOR})`})`,
|
|
56
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
57
|
-
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
58
|
-
textAlign: 'left',
|
|
59
|
-
verticalAlign: 'top',
|
|
60
|
-
'&:focus-visible': {
|
|
61
|
-
outline: `solid 2px ${`var(--ds-border-focused, ${B100})`}`
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const onClickStyles = css({
|
|
65
|
-
'&:hover': {
|
|
66
|
-
backgroundColor: `var(--ds-background-neutral-hovered, ${N30A})`,
|
|
67
|
-
cursor: 'pointer'
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const baseStyles = css({
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
72
|
-
'& > button': {
|
|
73
|
-
padding: "var(--ds-space-0, 0)",
|
|
74
|
-
position: 'relative',
|
|
75
|
-
appearance: 'none',
|
|
76
|
-
background: 'none',
|
|
77
|
-
border: 'none',
|
|
78
|
-
color: 'inherit',
|
|
79
|
-
cursor: 'inherit',
|
|
80
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
81
|
-
fontSize: 'inherit',
|
|
82
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
83
|
-
fontWeight: 'inherit',
|
|
84
|
-
'&::before, &::after': {
|
|
85
|
-
display: 'block',
|
|
86
|
-
width: 0,
|
|
87
|
-
height: 0,
|
|
88
|
-
position: 'absolute',
|
|
89
|
-
border: '3px solid transparent',
|
|
90
|
-
content: '""',
|
|
91
|
-
insetInlineEnd: "var(--ds-space-negative-100, -8px)"
|
|
92
|
-
},
|
|
93
|
-
'&::before': {
|
|
94
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
95
|
-
borderBlockEnd: `3px solid ${arrow.defaultColor}`,
|
|
96
|
-
insetBlockEnd: "var(--ds-space-100, 8px)"
|
|
97
|
-
},
|
|
98
|
-
'&::after': {
|
|
99
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
100
|
-
borderBlockStart: `3px solid ${arrow.defaultColor}`,
|
|
101
|
-
insetBlockEnd: 0
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
'@media (forced-colors: active)': {
|
|
105
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
106
|
-
'& > button': {
|
|
107
|
-
'&::before, &::after': {
|
|
108
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
109
|
-
border: `3px solid ${MSThemeColors.Background}`
|
|
110
|
-
},
|
|
111
|
-
'&::before': {
|
|
112
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
113
|
-
borderBlockEnd: `3px solid ${MSThemeColors.Text}`
|
|
114
|
-
},
|
|
115
|
-
'&::after': {
|
|
116
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
117
|
-
borderBlockStart: `3px solid ${MSThemeColors.Text}`
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
const ascendingStyles = css({
|
|
123
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
124
|
-
'& > button': {
|
|
125
|
-
'&::before': {
|
|
126
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
127
|
-
borderBlockEnd: `3px solid ${arrow.selectedColor}`
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
'@media (forced-colors: active)': {
|
|
131
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
132
|
-
'& > button': {
|
|
133
|
-
'&::before': {
|
|
134
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
135
|
-
borderBlockEnd: `3px solid ${MSThemeColors.SelectedBackground}`
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
const descendingStyles = css({
|
|
141
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
142
|
-
'& > button': {
|
|
143
|
-
'&::after': {
|
|
144
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
145
|
-
borderBlockStart: `3px solid ${arrow.selectedColor}`
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
'@media (forced-colors: active)': {
|
|
149
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
150
|
-
'& > button': {
|
|
151
|
-
'&::after': {
|
|
152
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
153
|
-
borderBlockStart: `3px solid ${MSThemeColors.SelectedBackground}`
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
35
|
+
const headCellBaseStyles = null;
|
|
36
|
+
const headCellBaseStylesOld = null;
|
|
37
|
+
const onClickStyles = null;
|
|
38
|
+
const baseStyles = null;
|
|
39
|
+
const ascendingStyles = null;
|
|
40
|
+
const descendingStyles = null;
|
|
158
41
|
export const HeadCell = /*#__PURE__*/forwardRef(({
|
|
159
42
|
width,
|
|
160
43
|
children,
|
|
@@ -172,7 +55,7 @@ export const HeadCell = /*#__PURE__*/forwardRef(({
|
|
|
172
55
|
...(width && getTruncationStyleVars({
|
|
173
56
|
width
|
|
174
57
|
})),
|
|
175
|
-
[CSS_VAR_TEXT_COLOR]:
|
|
58
|
+
[CSS_VAR_TEXT_COLOR]: `var(--ds-text-subtlest, ${N300})`
|
|
176
59
|
};
|
|
177
60
|
const isASC = sortOrder === ASC;
|
|
178
61
|
const isDESC = sortOrder === DESC;
|
|
@@ -188,22 +71,15 @@ export const HeadCell = /*#__PURE__*/forwardRef(({
|
|
|
188
71
|
// https://dequeuniversity.com/rules/axe/4.7/empty-table-header
|
|
189
72
|
const Component = children ? 'th' : 'td';
|
|
190
73
|
const isVisuallyRefreshed = fg('platform-component-visual-refresh');
|
|
191
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
192
75
|
"aria-sort": getFormattedSortOrder()
|
|
193
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
194
77
|
,
|
|
195
78
|
style: mergedStyles,
|
|
196
|
-
css: [
|
|
197
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
198
|
-
cellStyles, isVisuallyRefreshed ? headCellBaseStyles : headCellBaseStylesOld, !isVisuallyRefreshed && onClick && onClickStyles,
|
|
199
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
200
|
-
truncationWidthStyles,
|
|
201
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
202
|
-
isFixedSize && shouldTruncate && fixedSizeTruncateStyles,
|
|
203
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
204
|
-
isFixedSize && overflowTruncateStyles, !isVisuallyRefreshed && isSortable && baseStyles, !isVisuallyRefreshed && isASC && ascendingStyles, !isVisuallyRefreshed && isDESC && descendingStyles],
|
|
205
79
|
onClick: !isVisuallyRefreshed ? onClick : undefined,
|
|
206
80
|
ref: ref,
|
|
207
81
|
"data-testid": testId
|
|
208
|
-
}, rest
|
|
82
|
+
}, rest, {
|
|
83
|
+
className: ax(["_izbqglyw _h7alglyw _85i51b66 _1q511b66 _y4tiu2gc _bozgu2gc _y3gn1e5h _1s37ze3t _uupyze3t", isVisuallyRefreshed ? "_11c8dcr7 _179r1on0 _mqm2glyw _vchhusvi _kqswh2mm _syaz34id _k48pmoej _y3gn1e5h _s7n4nkob _1ygbvd8c" : "_11c8dcr7 _179r1on0 _mqm2glyw _t51zglyw _191wglyw _vchhusvi _kqswh2mm _syaz34id _k48pmoej _y3gn1e5h _s7n4jp4b _1ygbvd8c", !isVisuallyRefreshed && onClick && "_irr317ks _d0altlke", "_1bsb8a2a", isFixedSize && shouldTruncate && "_1bto1l2s _o5721q9c", isFixedSize && "_1reo15vq _18m915vq", !isVisuallyRefreshed && isSortable && "_173zglyw _pw6dglyw _1xgk1j28 _1wfn1j28 _y9yonqa1 _997wnqa1 _sklb1l7b _1j091l7b _19w61ule _1w611ule _1hvvidpf _n56nidpf _wyc4idpf _1d4oidpf _no7mstnw _qh32stnw _4b5mb3bt _hn3bb3bt _14gsx0bf _cigmx0bf _c77kvia6 _qzvtu2gc _f473via6 _1fpyidpf _a04fh2mm _xv14glyw _58ej1kw7 _1ay31kw7 _mdbq1kw7 _10pp1kw7 _1yw3ze3t _n2fdze3t _8607ze3t _szhwze3t _1g2wwc43 _ze9fwc43 _1lcgnqa1 _at5qnqa1 _o4d71l7b _npl51l7b _1rp11onz _1iornqa1 _oi051l7b _1ehx1onz _19t8nqa1 _1bog1l7b", !isVisuallyRefreshed && isASC && "_c77k1thn _142s94yt", !isVisuallyRefreshed && isDESC && "_f4731thn _17x894yt"])
|
|
84
|
+
}), children);
|
|
209
85
|
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
._bfhkqtfy{background-color:var(--ds-background-neutral-subtle,transparent)}
|
|
3
|
+
._bfhktkjs{background-color:var(--ds-background-selected,var(--local-dynamic-table-highlighted-bg))}
|
|
4
|
+
._1ygbi9un:focus-visible{outline:2px solid var(--ds-border-focused,var(--local-dynamic-table-hover-bg))}._1ah312gs:focus-visible{outline-offset:-2px}
|
|
5
|
+
._irr31ae3:hover{background-color:var(--ds-background-selected-hovered,var(--local-dynamic-table-hover-highlighted-bg))}
|
|
6
|
+
._irr3s8ts:hover{background-color:var(--ds-background-neutral-subtle-hovered,var(--local-dynamic-table-hover-bg))}
|
|
@@ -1,39 +1,12 @@
|
|
|
1
|
+
/* table-row.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./table-row.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { tableRowCSSVars as cssVars } from './dynamic-table';
|
|
11
|
-
const rowStyles = css({
|
|
12
|
-
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
13
|
-
'&:focus-visible': {
|
|
14
|
-
outline: `2px solid ${`var(--ds-border-focused, ${
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
16
|
-
`var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`})`}`,
|
|
17
|
-
outlineOffset: `-2px`
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const rowBackgroundStyles = css({
|
|
21
|
-
'&:hover': {
|
|
22
|
-
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
24
|
-
`var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`})`
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const rowHighlightedBackgroundStyles = css({
|
|
28
|
-
backgroundColor: `var(--ds-background-selected, ${
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
|
-
`var(${cssVars.CSS_VAR_HIGHLIGHTED_BACKGROUND})`})`,
|
|
31
|
-
'&:hover': {
|
|
32
|
-
backgroundColor: `var(--ds-background-selected-hovered, ${
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
34
|
-
`var(${cssVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND})`})`
|
|
35
|
-
}
|
|
36
|
-
});
|
|
7
|
+
const rowStyles = null;
|
|
8
|
+
const rowBackgroundStyles = null;
|
|
9
|
+
const rowHighlightedBackgroundStyles = null;
|
|
37
10
|
|
|
38
11
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
39
12
|
export const TableBodyRow = /*#__PURE__*/forwardRef(({
|
|
@@ -43,12 +16,12 @@ export const TableBodyRow = /*#__PURE__*/forwardRef(({
|
|
|
43
16
|
testId,
|
|
44
17
|
...rest
|
|
45
18
|
}, ref) => {
|
|
46
|
-
return
|
|
19
|
+
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
47
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
48
|
-
style: style
|
|
49
|
-
css: [rowStyles, isHighlighted ? rowHighlightedBackgroundStyles : rowBackgroundStyles]
|
|
21
|
+
style: style
|
|
50
22
|
}, rest, {
|
|
51
23
|
ref: ref,
|
|
52
|
-
"data-testid": testId
|
|
24
|
+
"data-testid": testId,
|
|
25
|
+
className: ax(["_bfhkqtfy _1ygbi9un _1ah312gs", isHighlighted ? "_bfhktkjs _irr31ae3" : "_irr3s8ts"])
|
|
53
26
|
}), children);
|
|
54
27
|
});
|
package/dist/es2019/theme.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
2
1
|
export const MSThemeColors = {
|
|
3
2
|
Background: 'Canvas',
|
|
4
3
|
Text: 'CanvasText',
|
|
5
4
|
SelectedBackground: 'Highlight',
|
|
6
5
|
SelectedText: 'HighlightText'
|
|
7
|
-
};
|
|
8
|
-
export const arrow = {
|
|
9
|
-
defaultColor: `var(--ds-icon-disabled, ${colors.N40})`,
|
|
10
|
-
selectedColor: `var(--ds-icon-subtle, ${colors.N300})`
|
|
11
|
-
};
|
|
12
|
-
export const row = {
|
|
13
|
-
focusOutline: `var(--ds-border-focused, ${colors.B100})`,
|
|
14
|
-
highlightedBackground: `var(--ds-background-selected, ${colors.B50})`,
|
|
15
|
-
hoverBackground: `var(--ds-background-neutral-subtle-hovered, ${colors.N10})`,
|
|
16
|
-
hoverHighlightedBackground: `var(--ds-background-selected-hovered, ${colors.B75})`
|
|
17
|
-
};
|
|
18
|
-
export const head = {
|
|
19
|
-
textColor: `var(--ds-text-subtlest, ${colors.N300})`
|
|
20
|
-
};
|
|
21
|
-
export const tableBorder = {
|
|
22
|
-
borderColor: `var(--ds-border, ${colors.N40})`
|
|
23
6
|
};
|
|
@@ -77,14 +77,14 @@ var DynamicTable = function DynamicTable(_ref) {
|
|
|
77
77
|
action: 'sorted',
|
|
78
78
|
componentName: 'dynamicTable',
|
|
79
79
|
packageName: "@atlaskit/dynamic-table",
|
|
80
|
-
packageVersion: "18.0.
|
|
80
|
+
packageVersion: "18.0.2"
|
|
81
81
|
});
|
|
82
82
|
var onRankEnd = usePlatformLeafEventHandler({
|
|
83
83
|
fn: providedOnRankEnd,
|
|
84
84
|
action: 'ranked',
|
|
85
85
|
componentName: 'dynamicTable',
|
|
86
86
|
packageName: "@atlaskit/dynamic-table",
|
|
87
|
-
packageVersion: "18.0.
|
|
87
|
+
packageVersion: "18.0.2"
|
|
88
88
|
});
|
|
89
89
|
useEffect(function () {
|
|
90
90
|
validateSortKey(sortKey, head);
|
|
@@ -1,38 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
2
|
var CSS_VAR_WIDTH = '--local-dynamic-table-width';
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
|
-
export var truncationWidthStyles = css({
|
|
7
|
-
width: "var(".concat(CSS_VAR_WIDTH, ")")
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
-
export var fixedSizeTruncateStyles = css({
|
|
12
|
-
textOverflow: 'ellipsis',
|
|
13
|
-
whiteSpace: 'nowrap'
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
|
-
export var overflowTruncateStyles = css({
|
|
18
|
-
overflow: 'hidden'
|
|
19
|
-
});
|
|
20
3
|
export var getTruncationStyleVars = function getTruncationStyleVars(_ref) {
|
|
21
4
|
var width = _ref.width;
|
|
22
5
|
return typeof width !== 'undefined' ? _defineProperty({}, CSS_VAR_WIDTH, "".concat(width, "%")) : undefined;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
|
-
export var cellStyles = css({
|
|
27
|
-
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)"),
|
|
28
|
-
border: 'none',
|
|
29
|
-
textAlign: 'left',
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
31
|
-
'&:first-of-type': {
|
|
32
|
-
paddingInlineStart: "var(--ds-space-0, 0px)"
|
|
33
|
-
},
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
35
|
-
'&:last-child': {
|
|
36
|
-
paddingInlineEnd: "var(--ds-space-0, 0px)"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
._11c8lodh{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._179rralu{border-block-end:var(--_k02y3n)}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
6
|
+
._1kqm1n9t{table-layout:fixed}
|
|
7
|
+
._1pfh1ejb{margin-block-start:var(--ds-space-300,24px)}
|
|
8
|
+
._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
|
|
9
|
+
._btyzidpf{border-spacing:0}
|
|
10
|
+
._m6k41e03{will-change:transform}
|
|
11
|
+
._yq5hus1c{border-collapse:separate}
|
|
@@ -1,37 +1,23 @@
|
|
|
1
|
+
/* dynamic-table.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
5
|
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"];
|
|
6
|
+
import "./dynamic-table.compiled.css";
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
11
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
6
|
-
|
|
7
|
-
* @jsxRuntime classic
|
|
8
|
-
* @jsx jsx
|
|
9
|
-
*/
|
|
12
|
+
|
|
10
13
|
import { forwardRef } from 'react';
|
|
11
14
|
|
|
12
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
CSS_VAR_HOVER_BACKGROUND: '--local-dynamic-table-hover-bg',
|
|
19
|
-
CSS_VAR_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-highlighted-bg',
|
|
20
|
-
CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-hover-highlighted-bg',
|
|
21
|
-
CSS_VAR_ROW_FOCUS_OUTLINE: '--local-dynamic-table-row-focus-outline'
|
|
22
|
-
};
|
|
23
|
-
var fixedSizeTableStyles = css({
|
|
24
|
-
tableLayout: 'fixed'
|
|
25
|
-
});
|
|
26
|
-
var tableStyles = css({
|
|
27
|
-
width: '100%',
|
|
28
|
-
borderCollapse: 'separate',
|
|
29
|
-
borderSpacing: '0px'
|
|
30
|
-
});
|
|
31
|
-
var bodyBorder = css({
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
|
-
borderBlockEnd: "2px solid ".concat(tableBorder.borderColor)
|
|
34
|
-
});
|
|
16
|
+
|
|
17
|
+
import { B100, B50, B75, N10, N40 } from '@atlaskit/theme/colors';
|
|
18
|
+
var fixedSizeTableStyles = null;
|
|
19
|
+
var tableStyles = null;
|
|
20
|
+
var bodyBorder = null;
|
|
35
21
|
export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
36
22
|
var isFixedSize = _ref.isFixedSize,
|
|
37
23
|
hasDataRow = _ref.hasDataRow,
|
|
@@ -39,36 +25,39 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
39
25
|
testId = _ref.testId,
|
|
40
26
|
isLoading = _ref.isLoading,
|
|
41
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement("table", _extends({
|
|
43
29
|
inert: isLoading ? '' : undefined,
|
|
44
|
-
style: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground), tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground), tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground), tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline),
|
|
45
|
-
css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
|
|
46
30
|
ref: ref
|
|
47
31
|
}, rest, {
|
|
48
|
-
"data-testid": testId && "".concat(testId, "--table")
|
|
32
|
+
"data-testid": testId && "".concat(testId, "--table"),
|
|
33
|
+
className: ax(["_1bsb1osq _yq5hus1c _btyzidpf", isFixedSize && "_1kqm1n9t", hasDataRow && "_179rralu"]),
|
|
34
|
+
style: _objectSpread(_objectSpread({}, {
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
36
|
+
'--local-dynamic-table-hover-bg': "var(--ds-background-neutral-subtle-hovered, ".concat(N10, ")"),
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
38
|
+
'--local-dynamic-table-highlighted-bg': "var(--ds-background-selected, ".concat(B50, ")"),
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
40
|
+
'--local-dynamic-table-hover-highlighted-bg': "var(--ds-background-selected-hovered, ".concat(B75, ")"),
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
42
|
+
'--local-dynamic-table-row-focus-outline': "var(--ds-border-focused, ".concat(B100, ")")
|
|
43
|
+
}), {}, {
|
|
44
|
+
"--_k02y3n": ix("2px solid ".concat("var(--ds-border, ".concat(N40, ")")))
|
|
45
|
+
})
|
|
49
46
|
}), children);
|
|
50
47
|
});
|
|
51
|
-
var captionStyles =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
export var Caption = function Caption(_ref3) {
|
|
58
|
-
var children = _ref3.children;
|
|
59
|
-
return jsx("caption", {
|
|
60
|
-
css: captionStyles
|
|
48
|
+
var captionStyles = null;
|
|
49
|
+
export var Caption = function Caption(_ref2) {
|
|
50
|
+
var children = _ref2.children;
|
|
51
|
+
return /*#__PURE__*/React.createElement("caption", {
|
|
52
|
+
className: ax(["_11c8lodh _6rthu2gc _1pfh1ejb _m6k41e03"])
|
|
61
53
|
}, children);
|
|
62
54
|
};
|
|
63
|
-
var paginationWrapperStyles =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return jsx("div", {
|
|
71
|
-
css: paginationWrapperStyles,
|
|
72
|
-
"data-testid": testId && "".concat(testId, "--pagination--container")
|
|
55
|
+
var paginationWrapperStyles = null;
|
|
56
|
+
export var PaginationWrapper = function PaginationWrapper(_ref3) {
|
|
57
|
+
var children = _ref3.children,
|
|
58
|
+
testId = _ref3.testId;
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
"data-testid": testId && "".concat(testId, "--pagination--container"),
|
|
61
|
+
className: ax(["_1e0c1txw _1bah1h6o"])
|
|
73
62
|
}, children);
|
|
74
63
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
._18u01wug{margin-left:auto}
|
|
2
|
+
._19bv19bv{padding-left:10px}
|
|
3
|
+
._19pk1wug{margin-top:auto}
|
|
4
|
+
._1bsb1ssb{width:50%}
|
|
5
|
+
._2hwx1wug{margin-right:auto}
|
|
6
|
+
._4t3i1jdh{height:9rem}
|
|
7
|
+
._ca0q19bv{padding-top:10px}
|
|
8
|
+
._n3td19bv{padding-bottom:10px}
|
|
9
|
+
._otyr1wug{margin-bottom:auto}
|
|
10
|
+
._u5f319bv{padding-right:10px}
|
|
11
|
+
._y3gn1h6o{text-align:center}
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
+
/* empty-body.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import "./empty-body.compiled.css";
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
+
var fixedHeightStyles = null;
|
|
12
8
|
export var EmptyViewWithFixedHeight = function EmptyViewWithFixedHeight(_ref) {
|
|
13
9
|
var children = _ref.children,
|
|
14
10
|
testId = _ref.testId;
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
"data-testid": testId && "".concat(testId, "--empty-view-with-fixed-height"),
|
|
13
|
+
className: ax(["_4t3i1jdh"])
|
|
18
14
|
}, children);
|
|
19
15
|
};
|
|
20
|
-
var emptyViewContainerStyles =
|
|
21
|
-
width: '50%',
|
|
22
|
-
margin: 'auto',
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
24
|
-
padding: '10px',
|
|
25
|
-
textAlign: 'center'
|
|
26
|
-
});
|
|
16
|
+
var emptyViewContainerStyles = null;
|
|
27
17
|
export var EmptyViewContainer = function EmptyViewContainer(props) {
|
|
28
18
|
var children = props.children,
|
|
29
19
|
testId = props.testId;
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
"data-testid": testId && "".concat(testId, "--empty-view-container"),
|
|
22
|
+
className: ax(["_19pk1wug _2hwx1wug _otyr1wug _18u01wug _ca0q19bv _u5f319bv _n3td19bv _19bv19bv _1bsb1ssb _y3gn1h6o"])
|
|
33
23
|
}, children);
|
|
34
24
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
._1r04idpf{inset:0}._152tidpf{inset-block-start:0}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
5
|
+
._4cvr1h6o{align-items:center}
|
|
6
|
+
._6rth1ejb{margin-block-end:var(--ds-space-300,24px)}
|
|
7
|
+
._kqswh2mm{position:relative}
|
|
8
|
+
._kqswstnw{position:absolute}
|
|
9
|
+
._lcxvglyw{pointer-events:none}
|