carbon-react 104.24.1 → 104.25.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/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +6 -6
- package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +5 -11
- package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +7 -11
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +34 -30
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +3 -6
- package/lib/components/flat-table/flat-table.style.js +27 -36
- package/lib/components/flat-table/sort/sort.style.js +3 -12
- package/package.json +1 -1
|
@@ -37,9 +37,9 @@ const StyledFlatTableCell = _styledComponents.default.td`
|
|
|
37
37
|
verticalBorder,
|
|
38
38
|
verticalBorderColor
|
|
39
39
|
}) => (0, _styledComponents.css)`
|
|
40
|
-
background-color:
|
|
40
|
+
background-color: var(--colorsUtilityYang100);
|
|
41
41
|
border-width: 0;
|
|
42
|
-
border-bottom: 1px solid
|
|
42
|
+
border-bottom: 1px solid var(--colorsUtilityMajor100);
|
|
43
43
|
text-align: ${align};
|
|
44
44
|
vertical-align: middle;
|
|
45
45
|
padding: 0;
|
|
@@ -67,7 +67,7 @@ const StyledFlatTableCell = _styledComponents.default.td`
|
|
|
67
67
|
|
|
68
68
|
${verticalBorder && (0, _styledComponents.css)`
|
|
69
69
|
border-right: ${verticalBorderSizes[verticalBorder]} solid
|
|
70
|
-
|
|
70
|
+
var(--colorsUtilityMajor300);
|
|
71
71
|
`}
|
|
72
72
|
|
|
73
73
|
${verticalBorderColor && (0, _styledComponents.css)`
|
|
@@ -76,16 +76,16 @@ const StyledFlatTableCell = _styledComponents.default.td`
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&:first-of-type {
|
|
79
|
-
border-left: 1px solid
|
|
79
|
+
border-left: 1px solid var(--colorsUtilityMajor100);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
&:last-of-type {
|
|
83
|
-
border-right: 1px solid
|
|
83
|
+
border-right: 1px solid var(--colorsUtilityMajor100);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
${rowSpan && (0, _styledComponents.css)`
|
|
87
87
|
&:first-of-type + & {
|
|
88
|
-
border-left: 1px solid
|
|
88
|
+
border-left: 1px solid var(--colorsUtilityMajor100);
|
|
89
89
|
}
|
|
90
90
|
`}
|
|
91
91
|
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _checkbox = _interopRequireDefault(require("../../checkbox/checkbox.style"));
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../../style/themes/base"));
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -20,14 +18,13 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
20
18
|
const StyledFlatTableCheckbox = _styledComponents.default.td`
|
|
21
19
|
${({
|
|
22
20
|
as,
|
|
23
|
-
theme,
|
|
24
21
|
leftPosition,
|
|
25
22
|
makeCellSticky
|
|
26
23
|
}) => (0, _styledComponents.css)`
|
|
27
24
|
${as === "td" && (0, _styledComponents.css)`
|
|
28
|
-
background-color:
|
|
25
|
+
background-color: var(--colorsUtilityYang100);
|
|
29
26
|
border-width: 0;
|
|
30
|
-
border-bottom: 1px solid
|
|
27
|
+
border-bottom: 1px solid var(--colorsUtilityMajor100);
|
|
31
28
|
overflow: visible;
|
|
32
29
|
padding: 0;
|
|
33
30
|
text-align: left;
|
|
@@ -36,18 +33,18 @@ const StyledFlatTableCheckbox = _styledComponents.default.td`
|
|
|
36
33
|
white-space: nowrap;
|
|
37
34
|
|
|
38
35
|
&:first-of-type {
|
|
39
|
-
border-left: 1px solid
|
|
36
|
+
border-left: 1px solid var(--colorsUtilityMajor100);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
&:last-of-type {
|
|
43
|
-
border-right: 1px solid
|
|
40
|
+
border-right: 1px solid var(--colorsUtilityMajor100);
|
|
44
41
|
}
|
|
45
42
|
`}
|
|
46
43
|
|
|
47
44
|
${as === "th" && (0, _styledComponents.css)`
|
|
48
45
|
background-color: transparent;
|
|
49
46
|
border-width: 0;
|
|
50
|
-
border-bottom: 1px solid
|
|
47
|
+
border-bottom: 1px solid var(--colorsUtilityMajor100);
|
|
51
48
|
box-sizing: border-box;
|
|
52
49
|
font-weight: 700;
|
|
53
50
|
left: auto;
|
|
@@ -72,8 +69,5 @@ const StyledFlatTableCheckbox = _styledComponents.default.td`
|
|
|
72
69
|
padding-top: 0px;
|
|
73
70
|
}
|
|
74
71
|
`;
|
|
75
|
-
StyledFlatTableCheckbox.defaultProps = {
|
|
76
|
-
theme: _base.default
|
|
77
|
-
};
|
|
78
72
|
var _default = StyledFlatTableCheckbox;
|
|
79
73
|
exports.default = _default;
|
|
@@ -9,10 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _styledSystem = require("styled-system");
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../../style/themes/base"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
12
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
17
13
|
|
|
18
14
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -26,7 +22,6 @@ const StyledFlatTableHeader = _styledComponents.default.th`
|
|
|
26
22
|
${({
|
|
27
23
|
align,
|
|
28
24
|
alternativeBgColor,
|
|
29
|
-
theme,
|
|
30
25
|
colWidth,
|
|
31
26
|
leftPosition,
|
|
32
27
|
makeCellSticky,
|
|
@@ -65,9 +60,13 @@ const StyledFlatTableHeader = _styledComponents.default.th`
|
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
${alternativeBgColor && (0, _styledComponents.css)`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
&&&:first-child {
|
|
64
|
+
border-left: 1px solid var(--colorsActionMinor550);
|
|
65
|
+
}
|
|
66
|
+
&&& {
|
|
67
|
+
background-color: var(--colorsActionMinor550);
|
|
68
|
+
}
|
|
69
|
+
`};
|
|
71
70
|
|
|
72
71
|
${makeCellSticky && (0, _styledComponents.css)`
|
|
73
72
|
left: ${leftPosition}px;
|
|
@@ -102,8 +101,5 @@ const StyledFlatTableHeader = _styledComponents.default.th`
|
|
|
102
101
|
}
|
|
103
102
|
`}
|
|
104
103
|
`;
|
|
105
|
-
StyledFlatTableHeader.defaultProps = {
|
|
106
|
-
theme: _base.default
|
|
107
|
-
};
|
|
108
104
|
var _default = StyledFlatTableHeader;
|
|
109
105
|
exports.default = _default;
|
|
@@ -36,14 +36,14 @@ const stickyColumnFocusStyling = (index, theme) => {
|
|
|
36
36
|
return `
|
|
37
37
|
border-bottom: 1px solid transparent;
|
|
38
38
|
border-left: 1px solid
|
|
39
|
-
${index === 0 ?
|
|
39
|
+
${index === 0 ? "var(--colorsSemanticFocus500)" : "var(--colorsUtilityMajor100)"};
|
|
40
40
|
background-clip: padding-box;
|
|
41
41
|
z-index: ${theme.zIndex.overlay + 2};
|
|
42
42
|
|
|
43
43
|
:before {
|
|
44
44
|
content: "";
|
|
45
|
-
border-top: 2px solid
|
|
46
|
-
border-bottom: 2px solid
|
|
45
|
+
border-top: 2px solid var(--colorsSemanticFocus500);
|
|
46
|
+
border-bottom: 2px solid var(--colorsSemanticFocus500);
|
|
47
47
|
display: block;
|
|
48
48
|
left: 0px;
|
|
49
49
|
top: -1px;
|
|
@@ -55,20 +55,20 @@ const stickyColumnFocusStyling = (index, theme) => {
|
|
|
55
55
|
`;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const borderColor =
|
|
58
|
+
const borderColor = colorTheme => {
|
|
59
59
|
switch (colorTheme) {
|
|
60
60
|
case "light":
|
|
61
|
-
return
|
|
61
|
+
return "var(--colorsUtilityMajor100)";
|
|
62
62
|
|
|
63
63
|
case "transparent-base":
|
|
64
|
-
return
|
|
64
|
+
return "var(--colorsUtilityMajor025)";
|
|
65
65
|
|
|
66
66
|
case "transparent-white":
|
|
67
|
-
return
|
|
67
|
+
return "var(--colorsUtilityYang100)";
|
|
68
68
|
// default theme is "dark"
|
|
69
69
|
|
|
70
70
|
default:
|
|
71
|
-
return
|
|
71
|
+
return "var(--colorsUtilityMajor400)";
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -98,8 +98,8 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
98
98
|
}) => {
|
|
99
99
|
const backgroundColor = bgColor ? (0, _color.toColor)(theme, bgColor) : undefined;
|
|
100
100
|
const customBorderColor = horizontalBorderColor ? (0, _color.toColor)(theme, horizontalBorderColor) : undefined;
|
|
101
|
-
const colorOfSelected = isInSidebar ?
|
|
102
|
-
const colorOfHighlighted = isInSidebar ?
|
|
101
|
+
const colorOfSelected = isInSidebar ? "var(--colorsUtilityMajor150)" : "var(--colorsUtilityMajor075)";
|
|
102
|
+
const colorOfHighlighted = isInSidebar ? "var(--colorsUtilityMajor100)" : "var(--colorsUtilityMajor050)";
|
|
103
103
|
const allCellTypes = `${_flatTableRowHeader.StyledFlatTableRowHeader}, ${_flatTableCell.StyledFlatTableCell}, ${_flatTableCheckbox.default}`;
|
|
104
104
|
return (0, _styledComponents.css)`
|
|
105
105
|
border-collapse: separate;
|
|
@@ -110,12 +110,16 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
110
110
|
width: auto;
|
|
111
111
|
outline: 2px solid #0000;
|
|
112
112
|
|
|
113
|
+
[data-component="icon"] {
|
|
114
|
+
color: var(--colorsActionMinor500);
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
${allCellTypes} {
|
|
114
118
|
${backgroundColor && `background-color: ${backgroundColor};`}
|
|
115
119
|
|
|
116
120
|
${horizontalBorderSize !== "small" && (0, _styledComponents.css)`
|
|
117
121
|
border-bottom: ${horizontalBorderSizes[horizontalBorderSize]} solid
|
|
118
|
-
|
|
122
|
+
var(--colorsUtilityMajor100);
|
|
119
123
|
`}
|
|
120
124
|
|
|
121
125
|
${customBorderColor && (0, _styledComponents.css)`
|
|
@@ -124,11 +128,11 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
${_flatTableHeader.default} {
|
|
127
|
-
border-bottom: 1px solid ${borderColor(colorTheme
|
|
131
|
+
border-bottom: 1px solid ${borderColor(colorTheme)};
|
|
128
132
|
|
|
129
133
|
${!isInSidebar && `
|
|
130
134
|
:first-child {
|
|
131
|
-
border-left: 1px solid ${borderColor(colorTheme
|
|
135
|
+
border-left: 1px solid ${borderColor(colorTheme)};
|
|
132
136
|
}
|
|
133
137
|
`}
|
|
134
138
|
}
|
|
@@ -143,7 +147,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
143
147
|
cursor: pointer;
|
|
144
148
|
|
|
145
149
|
:focus {
|
|
146
|
-
outline: 2px solid
|
|
150
|
+
outline: 2px solid var(--colorsSemanticFocus500);
|
|
147
151
|
outline-offset: -1px;
|
|
148
152
|
|
|
149
153
|
${_flatTableRowHeader.StyledFlatTableRowHeader} {
|
|
@@ -165,7 +169,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
165
169
|
|
|
166
170
|
:hover {
|
|
167
171
|
${allCellTypes} {
|
|
168
|
-
background-color: ${backgroundColor ||
|
|
172
|
+
background-color: ${backgroundColor || "var(--colorsUtilityMajor025)"};
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
`}
|
|
@@ -176,43 +180,42 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
176
180
|
cursor: pointer;
|
|
177
181
|
|
|
178
182
|
:focus {
|
|
179
|
-
outline: 2px solid
|
|
183
|
+
outline: 2px solid var(--colorsSemanticFocus500);
|
|
180
184
|
outline-offset: -1px;
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
:hover {
|
|
184
|
-
background-color: ${backgroundColor ||
|
|
188
|
+
background-color: ${backgroundColor || "var(colorsUtilityMajor025)"};
|
|
185
189
|
}
|
|
186
190
|
}
|
|
187
191
|
`}
|
|
188
192
|
|
|
189
193
|
${![-1, 0].includes(rowHeaderIndex) && (0, _styledComponents.css)`
|
|
190
194
|
td:nth-of-type(${rowHeaderIndex + 1}) {
|
|
191
|
-
border-left: 1px solid
|
|
195
|
+
border-left: 1px solid
|
|
196
|
+
${customBorderColor || "var(--colorsUtilityMajor100)"};
|
|
192
197
|
}
|
|
193
198
|
|
|
194
199
|
th:nth-of-type(${rowHeaderIndex + 2}) {
|
|
195
|
-
border-left: 1px solid
|
|
196
|
-
${customBorderColor || borderColor(colorTheme, theme)};
|
|
200
|
+
border-left: 1px solid ${customBorderColor || borderColor(colorTheme)};
|
|
197
201
|
}
|
|
198
202
|
`}
|
|
199
203
|
|
|
200
204
|
${applyBorderLeft && (0, _styledComponents.css)`
|
|
201
205
|
th:first-of-type {
|
|
202
|
-
border-left: 1px solid
|
|
203
|
-
${customBorderColor || borderColor(colorTheme, theme)};
|
|
206
|
+
border-left: 1px solid ${customBorderColor || borderColor(colorTheme)};
|
|
204
207
|
}
|
|
205
208
|
`}
|
|
206
209
|
|
|
207
210
|
${isInSidebar && (0, _styledComponents.css)`
|
|
208
211
|
${allCellTypes} {
|
|
209
|
-
background-color: ${bgColor ||
|
|
212
|
+
background-color: ${bgColor || "var(--colorsUtilityMajor040)"};
|
|
210
213
|
};
|
|
211
214
|
}
|
|
212
215
|
|
|
213
216
|
${_flatTableHeader.default} {
|
|
214
|
-
background-color:
|
|
215
|
-
border-bottom-color:
|
|
217
|
+
background-color: var(--colorsUtilityMajor040);
|
|
218
|
+
border-bottom-color: var(--colorsUtilityMajor100);
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
td:first-of-type,
|
|
@@ -232,7 +235,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
232
235
|
:hover {
|
|
233
236
|
${_flatTableCell.StyledFlatTableCell},
|
|
234
237
|
${_flatTableCheckbox.default}:not(th) {
|
|
235
|
-
background-color: ${backgroundColor ||
|
|
238
|
+
background-color: ${backgroundColor || "var(--colorsUtilityMajor075)"};
|
|
236
239
|
}
|
|
237
240
|
}
|
|
238
241
|
`}
|
|
@@ -253,7 +256,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
253
256
|
|
|
254
257
|
${isSubRow && (0, _styledComponents.css)`
|
|
255
258
|
${allCellTypes} {
|
|
256
|
-
background-color: ${backgroundColor ||
|
|
259
|
+
background-color: ${backgroundColor || "var(--colorsActionMinor025)"};
|
|
257
260
|
}
|
|
258
261
|
|
|
259
262
|
${_flatTableCell.StyledFlatTableCell}:first-child > div,
|
|
@@ -264,23 +267,24 @@ const StyledFlatTableRow = _styledComponents.default.tr`
|
|
|
264
267
|
`}
|
|
265
268
|
|
|
266
269
|
${isDragging && (0, _styledComponents.css)`
|
|
267
|
-
border: ${isInSidebar ?
|
|
270
|
+
border: ${isInSidebar ? "var(--colorsUtilityMajor300)" : "var(--colorsUtilityMajor200)"}
|
|
268
271
|
2px solid;
|
|
269
272
|
cursor: grabbing;
|
|
270
273
|
${allCellTypes} {
|
|
271
|
-
background-color: ${isInSidebar ?
|
|
274
|
+
background-color: ${isInSidebar ? "var(--colorsUtilityMajor200)" : "var(--colorsUtilityMajor150)"};
|
|
272
275
|
}
|
|
273
276
|
`}
|
|
274
277
|
|
|
275
278
|
${draggable && (0, _styledComponents.css)`
|
|
276
279
|
${_icon.default}:first-of-type {
|
|
277
280
|
font-size: 16px;
|
|
281
|
+
color: var(--colorsActionMinor500);
|
|
278
282
|
}
|
|
279
283
|
`}
|
|
280
284
|
|
|
281
285
|
${isFirstSubRow && (0, _styledComponents.css)`
|
|
282
286
|
${allCellTypes} {
|
|
283
|
-
box-shadow:
|
|
287
|
+
box-shadow: var(--boxShadow075);
|
|
284
288
|
}
|
|
285
289
|
`}
|
|
286
290
|
|
|
@@ -35,8 +35,8 @@ const StyledFlatTableRowHeader = _styledComponents.default.th`
|
|
|
35
35
|
verticalBorder,
|
|
36
36
|
verticalBorderColor
|
|
37
37
|
}) => (0, _styledComponents.css)`
|
|
38
|
-
background-color:
|
|
39
|
-
border: 1px solid
|
|
38
|
+
background-color: var(--colorsUtilityYang100);
|
|
39
|
+
border: 1px solid var(--colorsUtilityMajor100);
|
|
40
40
|
border-top: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
left: 0;
|
|
@@ -98,7 +98,4 @@ const StyledFlatTableRowHeaderContent = _styledComponents.default.div`
|
|
|
98
98
|
line-height: 1em;
|
|
99
99
|
`}
|
|
100
100
|
`;
|
|
101
|
-
exports.StyledFlatTableRowHeaderContent = StyledFlatTableRowHeaderContent;
|
|
102
|
-
StyledFlatTableRowHeaderContent.defaultProps = {
|
|
103
|
-
theme: _base.default
|
|
104
|
-
};
|
|
101
|
+
exports.StyledFlatTableRowHeaderContent = StyledFlatTableRowHeaderContent;
|
|
@@ -76,55 +76,51 @@ const StyledFlatTable = _styledComponents.default.table`
|
|
|
76
76
|
}}
|
|
77
77
|
|
|
78
78
|
${({
|
|
79
|
-
isZebra
|
|
80
|
-
theme
|
|
79
|
+
isZebra
|
|
81
80
|
}) => isZebra && (0, _styledComponents.css)`
|
|
82
81
|
${_flatTableRow.default}:nth-child(2n) {
|
|
83
82
|
${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
84
83
|
${_flatTableCell.StyledFlatTableCell},
|
|
85
84
|
${_flatTableCheckbox.default} {
|
|
86
|
-
background-color:
|
|
85
|
+
background-color: var(--colorsUtilityMajor010);
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
${_flatTableRow.default}:hover {
|
|
90
89
|
${_flatTableCell.StyledFlatTableCell},
|
|
91
90
|
${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
92
91
|
${_flatTableCheckbox.default} {
|
|
93
|
-
background-color:
|
|
92
|
+
background-color: var(--colorsUtilityMajor025);
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
`}
|
|
97
96
|
`;
|
|
98
97
|
exports.StyledFlatTable = StyledFlatTable;
|
|
99
98
|
StyledFlatTable.defaultProps = {
|
|
100
|
-
theme: _themes.baseTheme,
|
|
101
99
|
size: "medium"
|
|
102
100
|
};
|
|
103
101
|
const StyledFlatTableWrapper = (0, _styledComponents.default)(_box.default)`
|
|
104
102
|
${({
|
|
105
|
-
isInSidebar
|
|
106
|
-
theme
|
|
103
|
+
isInSidebar
|
|
107
104
|
}) => (0, _styledComponents.css)`
|
|
108
105
|
box-sizing: border-box;
|
|
109
106
|
|
|
110
107
|
:focus {
|
|
111
|
-
outline: 2px solid
|
|
108
|
+
outline: 2px solid var(--colorsSemanticFocus500);
|
|
112
109
|
|
|
113
110
|
:not(:focus-visible) {
|
|
114
111
|
outline: none;
|
|
115
112
|
}
|
|
116
113
|
|
|
117
114
|
:focus-visible {
|
|
118
|
-
outline: 2px solid
|
|
115
|
+
outline: 2px solid var(--colorsSemanticFocus500);
|
|
119
116
|
}
|
|
120
117
|
}
|
|
121
118
|
|
|
122
|
-
${isInSidebar ? "min-width: fit-content" : `box-shadow: inset 0px 0px 0px 1px
|
|
119
|
+
${isInSidebar ? "min-width: fit-content" : `box-shadow: inset 0px 0px 0px 1px var(--colorsUtilityMajor100)`};
|
|
123
120
|
`}
|
|
124
121
|
|
|
125
122
|
${({
|
|
126
|
-
colorTheme
|
|
127
|
-
theme
|
|
123
|
+
colorTheme
|
|
128
124
|
}) => {
|
|
129
125
|
switch (colorTheme) {
|
|
130
126
|
case "light":
|
|
@@ -132,9 +128,9 @@ const StyledFlatTableWrapper = (0, _styledComponents.default)(_box.default)`
|
|
|
132
128
|
${_flatTableHeader.default},
|
|
133
129
|
${_flatTableHead.default} ${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
134
130
|
${_flatTableHead.default} ${_flatTableCheckbox.default} {
|
|
135
|
-
background-color:
|
|
136
|
-
border-right: 1px solid
|
|
137
|
-
border-bottom-color:
|
|
131
|
+
background-color: var(--colorsUtilityMajor100);
|
|
132
|
+
border-right: 1px solid var(--colorsUtilityMajor150);
|
|
133
|
+
border-bottom-color: var(--colorsUtilityMajor100);
|
|
138
134
|
}
|
|
139
135
|
`;
|
|
140
136
|
|
|
@@ -143,9 +139,9 @@ const StyledFlatTableWrapper = (0, _styledComponents.default)(_box.default)`
|
|
|
143
139
|
${_flatTableHeader.default},
|
|
144
140
|
${_flatTableHead.default} ${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
145
141
|
${_flatTableHead.default} ${_flatTableCheckbox.default} {
|
|
146
|
-
background-color:
|
|
147
|
-
border-right: 1px solid
|
|
148
|
-
border-bottom-color:
|
|
142
|
+
background-color: var(--colorsUtilityMajor025);
|
|
143
|
+
border-right: 1px solid var(--colorsUtilityMajor025);
|
|
144
|
+
border-bottom-color: var(--colorsUtilityMajor100);
|
|
149
145
|
}
|
|
150
146
|
`;
|
|
151
147
|
|
|
@@ -154,9 +150,9 @@ const StyledFlatTableWrapper = (0, _styledComponents.default)(_box.default)`
|
|
|
154
150
|
${_flatTableHeader.default},
|
|
155
151
|
${_flatTableHead.default} ${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
156
152
|
${_flatTableHead.default} ${_flatTableCheckbox.default} {
|
|
157
|
-
background-color:
|
|
158
|
-
border-right: 1px solid
|
|
159
|
-
border-bottom-color:
|
|
153
|
+
background-color: var(--colorsUtilityYang100);
|
|
154
|
+
border-right: 1px solid var(--colorsUtilityYang100);
|
|
155
|
+
border-bottom-color: var(--colorsUtilityMajor100);
|
|
160
156
|
}
|
|
161
157
|
`;
|
|
162
158
|
// default theme is "dark"
|
|
@@ -166,26 +162,24 @@ const StyledFlatTableWrapper = (0, _styledComponents.default)(_box.default)`
|
|
|
166
162
|
${_flatTableHead.default} ${_flatTableCheckbox.default},
|
|
167
163
|
${_flatTableHeader.default},
|
|
168
164
|
${_flatTableHead.default} ${_flatTableRowHeader.StyledFlatTableRowHeader} {
|
|
169
|
-
background-color:
|
|
170
|
-
border-right: 1px solid
|
|
171
|
-
color:
|
|
172
|
-
border-bottom-color:
|
|
165
|
+
background-color: var(--colorsUtilityMajor400);
|
|
166
|
+
border-right: 1px solid var(--colorsUtilityMajor300);
|
|
167
|
+
color: var(--colorsUtilityYang100);
|
|
168
|
+
border-bottom-color: var(--colorsUtilityMajor300);
|
|
173
169
|
}
|
|
174
170
|
`;
|
|
175
171
|
}
|
|
176
172
|
}}
|
|
177
173
|
|
|
178
174
|
${({
|
|
179
|
-
isInSidebar
|
|
180
|
-
theme
|
|
175
|
+
isInSidebar
|
|
181
176
|
}) => isInSidebar && (0, _styledComponents.css)`
|
|
182
177
|
${_flatTableHeader.default}, ${_flatTableHead.default} ${_flatTableRowHeader.StyledFlatTableRowHeader},
|
|
183
178
|
${_flatTableHead.default} ${_flatTableCheckbox.default} {
|
|
184
|
-
background-color:
|
|
185
|
-
border-right: 2px solid
|
|
186
|
-
|
|
187
|
-
color:
|
|
188
|
-
border-bottom-color: ${theme.table.secondary};
|
|
179
|
+
background-color: var(--colorsUtilityMajor040);
|
|
180
|
+
border-right: 2px solid var(--colorsUtilityMajor040);
|
|
181
|
+
color: var(--colorsUtilityYin090);
|
|
182
|
+
border-bottom-color: var(--colorsUtilityMajor100);
|
|
189
183
|
}
|
|
190
184
|
`}
|
|
191
185
|
|
|
@@ -221,7 +215,4 @@ const StyledFlatTableFooter = _styledComponents.default.div`
|
|
|
221
215
|
bottom: 0px;
|
|
222
216
|
`}
|
|
223
217
|
`;
|
|
224
|
-
exports.StyledFlatTableFooter = StyledFlatTableFooter;
|
|
225
|
-
StyledFlatTableFooter.defaultProps = {
|
|
226
|
-
theme: _themes.baseTheme
|
|
227
|
-
};
|
|
218
|
+
exports.StyledFlatTableFooter = StyledFlatTableFooter;
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _icon = _interopRequireDefault(require("../../icon/icon.style"));
|
|
11
11
|
|
|
12
|
-
var _themes = require("../../../style/themes");
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
const StyledSort = _styledComponents.default.div`
|
|
@@ -25,9 +23,7 @@ const StyledSort = _styledComponents.default.div`
|
|
|
25
23
|
width: 16px;
|
|
26
24
|
height: 16px;
|
|
27
25
|
padding-left: 6px;
|
|
28
|
-
color:
|
|
29
|
-
theme
|
|
30
|
-
}) => theme.flatTable.headerIconColor};
|
|
26
|
+
color: var(--colorsUtilityMajor200);
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
:hover {
|
|
@@ -36,9 +32,7 @@ const StyledSort = _styledComponents.default.div`
|
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
:focus {
|
|
39
|
-
outline: 1px solid
|
|
40
|
-
theme
|
|
41
|
-
}) => theme.colors.focus};
|
|
35
|
+
outline: 1px solid var(--colorsSemanticFocus500);
|
|
42
36
|
}
|
|
43
37
|
`;
|
|
44
38
|
exports.StyledSort = StyledSort;
|
|
@@ -46,7 +40,4 @@ const StyledSpaceHolder = _styledComponents.default.div`
|
|
|
46
40
|
display: inline-block;
|
|
47
41
|
width: 22px;
|
|
48
42
|
`;
|
|
49
|
-
exports.StyledSpaceHolder = StyledSpaceHolder;
|
|
50
|
-
StyledSort.defaultProps = {
|
|
51
|
-
theme: _themes.baseTheme
|
|
52
|
-
};
|
|
43
|
+
exports.StyledSpaceHolder = StyledSpaceHolder;
|