@razorpay/blade 11.32.0 → 11.34.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/build/lib/native/components/BottomNav/BottomNav.native.js +17 -0
- package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -0
- package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +1 -1
- package/build/lib/native/components/Table/TableContext.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/index.js +1 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/utils/componentZIndices.js +1 -1
- package/build/lib/native/utils/componentZIndices.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js +136 -0
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -0
- package/build/lib/web/development/components/BottomNav/index.js +2 -0
- package/build/lib/web/development/components/BottomNav/index.js.map +1 -0
- package/build/lib/web/development/components/Button/IconButton/IconButton.js +2 -0
- package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +25 -3
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/tokens.js +14 -0
- package/build/lib/web/development/components/Button/IconButton/tokens.js.map +1 -0
- package/build/lib/web/development/components/Table/Table.web.js +12 -3
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +214 -70
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableContext.js +3 -1
- package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +14 -6
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +6 -1
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/utils/componentZIndices.js +2 -0
- package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +2 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js +136 -0
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -0
- package/build/lib/web/production/components/BottomNav/index.js +2 -0
- package/build/lib/web/production/components/BottomNav/index.js.map +1 -0
- package/build/lib/web/production/components/Button/IconButton/IconButton.js +2 -0
- package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +25 -3
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/tokens.js +14 -0
- package/build/lib/web/production/components/Button/IconButton/tokens.js.map +1 -0
- package/build/lib/web/production/components/Table/Table.web.js +12 -3
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +214 -70
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableContext.js +3 -1
- package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +14 -6
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +6 -1
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/utils/componentZIndices.js +2 -0
- package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +2 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +144 -18
- package/build/types/components/index.native.d.ts +96 -15
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
|
|
|
4
4
|
import { Body, Cell, Row } from '@table-library/react-table-library/table';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { useTableContext } from './TableContext.js';
|
|
7
|
-
import { tableRow, checkboxCellWidth } from './tokens.js';
|
|
7
|
+
import { tableRow, classes, tableBackgroundColor, checkboxCellWidth } from './tokens.js';
|
|
8
8
|
import { ComponentIds } from './componentIds.js';
|
|
9
9
|
import getIn from '../../utils/lodashButBetter/get.js';
|
|
10
10
|
import '../Typography/index.js';
|
|
@@ -16,6 +16,7 @@ import '../../utils/assignWithoutSideEffects/index.js';
|
|
|
16
16
|
import '../../utils/getFocusRingStyles/index.js';
|
|
17
17
|
import '../../tokens/global/index.js';
|
|
18
18
|
import '../../utils/makeAccessible/index.js';
|
|
19
|
+
import { useIsomorphicLayoutEffect } from '../../utils/useIsomorphicLayoutEffect.js';
|
|
19
20
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
21
|
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
21
22
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
@@ -28,18 +29,39 @@ import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
|
28
29
|
import { size } from '../../tokens/global/size.js';
|
|
29
30
|
import { Text } from '../Typography/Text/Text.js';
|
|
30
31
|
import { Checkbox } from '../Checkbox/Checkbox.js';
|
|
32
|
+
import { getMediaQuery } from '../../utils/getMediaQuery/getMediaQuery.js';
|
|
31
33
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
32
34
|
|
|
33
35
|
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; }
|
|
34
36
|
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; }
|
|
37
|
+
var getTableRowBackgroundTransition = function getTableRowBackgroundTransition(theme) {
|
|
38
|
+
var rowBackgroundTransition = "background-color ".concat(makeMotionTime(getIn(theme.motion, tableRow.backgroundColorMotionDuration)), " ").concat(getIn(theme.motion, tableRow.backgroundColorMotionEasing));
|
|
39
|
+
return rowBackgroundTransition;
|
|
40
|
+
};
|
|
41
|
+
var getTableActionsHoverStyles = function getTableActionsHoverStyles(_ref) {
|
|
42
|
+
var hoverColor = _ref.hoverColor,
|
|
43
|
+
theme = _ref.theme,
|
|
44
|
+
backgroundGradientColor = _ref.backgroundGradientColor;
|
|
45
|
+
var rowBackgroundTransition = getTableRowBackgroundTransition(theme);
|
|
46
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "& .".concat(classes.HOVER_ACTIONS), {
|
|
47
|
+
backgroundColor: getIn(theme.colors, tableBackgroundColor),
|
|
48
|
+
transition: rowBackgroundTransition
|
|
49
|
+
}), "& .".concat(classes.HOVER_ACTIONS_LAYER2), {
|
|
50
|
+
backgroundColor: getIn(theme.colors, backgroundGradientColor !== null && backgroundGradientColor !== void 0 ? backgroundGradientColor : 'transparent'),
|
|
51
|
+
transition: rowBackgroundTransition
|
|
52
|
+
}), "& .".concat(classes.HOVER_ACTIONS_LAYER3), {
|
|
53
|
+
backgroundColor: getIn(theme.colors, hoverColor),
|
|
54
|
+
transition: rowBackgroundTransition
|
|
55
|
+
});
|
|
56
|
+
};
|
|
35
57
|
var StyledBody = /*#__PURE__*/styled(Body).withConfig({
|
|
36
58
|
displayName: "TableBodyweb__StyledBody",
|
|
37
59
|
componentId: "sc-1fpz8hn-0"
|
|
38
|
-
})(function (
|
|
39
|
-
var theme =
|
|
40
|
-
$showStripedRows =
|
|
41
|
-
$isSelectable =
|
|
42
|
-
var rowBackgroundTransition =
|
|
60
|
+
})(function (_ref3) {
|
|
61
|
+
var theme = _ref3.theme,
|
|
62
|
+
$showStripedRows = _ref3.$showStripedRows,
|
|
63
|
+
$isSelectable = _ref3.$isSelectable;
|
|
64
|
+
var rowBackgroundTransition = getTableRowBackgroundTransition(theme);
|
|
43
65
|
return {
|
|
44
66
|
'&&&': _objectSpread(_objectSpread(_objectSpread({
|
|
45
67
|
border: 'none',
|
|
@@ -50,15 +72,27 @@ var StyledBody = /*#__PURE__*/styled(Body).withConfig({
|
|
|
50
72
|
'& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {
|
|
51
73
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected)
|
|
52
74
|
},
|
|
53
|
-
'& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {
|
|
75
|
+
'& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
54
76
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover)
|
|
55
|
-
},
|
|
56
|
-
|
|
77
|
+
}, getTableActionsHoverStyles({
|
|
78
|
+
hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,
|
|
79
|
+
backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,
|
|
80
|
+
theme: theme
|
|
81
|
+
})),
|
|
82
|
+
'& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
57
83
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus)
|
|
58
|
-
},
|
|
59
|
-
|
|
84
|
+
}, getTableActionsHoverStyles({
|
|
85
|
+
hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,
|
|
86
|
+
backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,
|
|
87
|
+
theme: theme
|
|
88
|
+
})),
|
|
89
|
+
'& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
60
90
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive)
|
|
61
|
-
}
|
|
91
|
+
}, getTableActionsHoverStyles({
|
|
92
|
+
hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,
|
|
93
|
+
backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,
|
|
94
|
+
theme: theme
|
|
95
|
+
}))
|
|
62
96
|
}, $isSelectable && {
|
|
63
97
|
'& tr:active:not(.disabled-row) .cell-wrapper': {
|
|
64
98
|
backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive)
|
|
@@ -92,32 +126,60 @@ var StyledBody = /*#__PURE__*/styled(Body).withConfig({
|
|
|
92
126
|
'& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {
|
|
93
127
|
backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelectedActive)
|
|
94
128
|
},
|
|
95
|
-
'& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {
|
|
129
|
+
'& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
96
130
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover)
|
|
97
|
-
},
|
|
98
|
-
|
|
131
|
+
}, getTableActionsHoverStyles({
|
|
132
|
+
hoverColor: tableRow.stripe.backgroundColorHover,
|
|
133
|
+
theme: theme,
|
|
134
|
+
backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover
|
|
135
|
+
})),
|
|
136
|
+
'& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
99
137
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus)
|
|
100
|
-
},
|
|
101
|
-
|
|
138
|
+
}, getTableActionsHoverStyles({
|
|
139
|
+
hoverColor: tableRow.stripe.backgroundColorFocus,
|
|
140
|
+
theme: theme,
|
|
141
|
+
backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus
|
|
142
|
+
})),
|
|
143
|
+
'& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
102
144
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive)
|
|
103
|
-
},
|
|
104
|
-
|
|
145
|
+
}, getTableActionsHoverStyles({
|
|
146
|
+
hoverColor: tableRow.stripe.backgroundColorActive,
|
|
147
|
+
backgroundGradientColor: tableRow.stripe.backgroundColorHover,
|
|
148
|
+
theme: theme
|
|
149
|
+
})),
|
|
150
|
+
'& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': _objectSpread({
|
|
105
151
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected)
|
|
106
|
-
},
|
|
107
|
-
|
|
152
|
+
}, getTableActionsHoverStyles({
|
|
153
|
+
hoverColor: tableRow.stripe.backgroundColorSelected,
|
|
154
|
+
theme: theme,
|
|
155
|
+
backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected
|
|
156
|
+
})),
|
|
157
|
+
'& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': _objectSpread({
|
|
108
158
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover)
|
|
109
|
-
},
|
|
110
|
-
|
|
159
|
+
}, getTableActionsHoverStyles({
|
|
160
|
+
hoverColor: tableRow.stripe.backgroundColorSelectedHover,
|
|
161
|
+
theme: theme,
|
|
162
|
+
backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover
|
|
163
|
+
})),
|
|
164
|
+
'& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': _objectSpread({
|
|
111
165
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus)
|
|
112
|
-
},
|
|
113
|
-
|
|
166
|
+
}, getTableActionsHoverStyles({
|
|
167
|
+
hoverColor: tableRow.stripe.backgroundColorSelectedFocus,
|
|
168
|
+
theme: theme,
|
|
169
|
+
backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus
|
|
170
|
+
})),
|
|
171
|
+
'& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': _objectSpread({
|
|
114
172
|
backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive)
|
|
115
|
-
}
|
|
173
|
+
}, getTableActionsHoverStyles({
|
|
174
|
+
hoverColor: tableRow.stripe.backgroundColorSelectedActive,
|
|
175
|
+
theme: theme,
|
|
176
|
+
backgroundGradientColor: tableRow.stripe.backgroundColorHover
|
|
177
|
+
}))
|
|
116
178
|
})
|
|
117
179
|
};
|
|
118
180
|
});
|
|
119
|
-
var _TableBody = function _TableBody(
|
|
120
|
-
var children =
|
|
181
|
+
var _TableBody = function _TableBody(_ref4) {
|
|
182
|
+
var children = _ref4.children;
|
|
121
183
|
var _useTableContext = useTableContext(),
|
|
122
184
|
showStripedRows = _useTableContext.showStripedRows,
|
|
123
185
|
selectionType = _useTableContext.selectionType;
|
|
@@ -138,9 +200,9 @@ var TableBody = /*#__PURE__*/assignWithoutSideEffects(_TableBody, {
|
|
|
138
200
|
var StyledCell = /*#__PURE__*/styled(Cell).withConfig({
|
|
139
201
|
displayName: "TableBodyweb__StyledCell",
|
|
140
202
|
componentId: "sc-1fpz8hn-1"
|
|
141
|
-
})(function (
|
|
142
|
-
var theme =
|
|
143
|
-
$backgroundColor =
|
|
203
|
+
})(function (_ref5) {
|
|
204
|
+
var theme = _ref5.theme,
|
|
205
|
+
$backgroundColor = _ref5.$backgroundColor;
|
|
144
206
|
return {
|
|
145
207
|
'&&&': {
|
|
146
208
|
height: '100%',
|
|
@@ -158,12 +220,12 @@ var StyledCell = /*#__PURE__*/styled(Cell).withConfig({
|
|
|
158
220
|
var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
159
221
|
displayName: "TableBodyweb__CellWrapper",
|
|
160
222
|
componentId: "sc-1fpz8hn-2"
|
|
161
|
-
})(function (
|
|
162
|
-
var theme =
|
|
163
|
-
$rowDensity =
|
|
164
|
-
showStripedRows =
|
|
165
|
-
|
|
166
|
-
hasPadding =
|
|
223
|
+
})(function (_ref6) {
|
|
224
|
+
var theme = _ref6.theme,
|
|
225
|
+
$rowDensity = _ref6.$rowDensity,
|
|
226
|
+
showStripedRows = _ref6.showStripedRows,
|
|
227
|
+
_ref6$hasPadding = _ref6.hasPadding,
|
|
228
|
+
hasPadding = _ref6$hasPadding === void 0 ? true : _ref6$hasPadding;
|
|
167
229
|
var rowBackgroundTransition = "background-color ".concat(makeMotionTime(getIn(theme.motion, tableRow.backgroundColorMotionDuration)), " ").concat(getIn(theme.motion, tableRow.backgroundColorMotionEasing));
|
|
168
230
|
return {
|
|
169
231
|
'&&&': _objectSpread({
|
|
@@ -181,8 +243,9 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
181
243
|
})
|
|
182
244
|
};
|
|
183
245
|
});
|
|
184
|
-
var _TableCell = function _TableCell(
|
|
185
|
-
var children =
|
|
246
|
+
var _TableCell = function _TableCell(_ref7) {
|
|
247
|
+
var children = _ref7.children,
|
|
248
|
+
_hasPadding = _ref7._hasPadding;
|
|
186
249
|
var isChildrenString = typeof children === 'string';
|
|
187
250
|
var _useTableContext2 = useTableContext(),
|
|
188
251
|
selectionType = _useTableContext2.selectionType,
|
|
@@ -208,6 +271,7 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
208
271
|
showStripedRows: showStripedRows,
|
|
209
272
|
display: "flex",
|
|
210
273
|
alignItems: "center",
|
|
274
|
+
hasPadding: _hasPadding,
|
|
211
275
|
flex: 1
|
|
212
276
|
// when a direct string child is passed we want to disable pointer events
|
|
213
277
|
// for custom cells components, consumers can handle pointer events themselves
|
|
@@ -216,6 +280,7 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
216
280
|
// allow text to wrap, so that if the <Text> overflows it can truncate
|
|
217
281
|
,
|
|
218
282
|
whiteSpace: "normal",
|
|
283
|
+
position: "relative",
|
|
219
284
|
children: isChildrenString ? /*#__PURE__*/jsx(Text, {
|
|
220
285
|
size: "medium",
|
|
221
286
|
truncateAfterLines: 1,
|
|
@@ -228,10 +293,10 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
228
293
|
var TableCell = /*#__PURE__*/assignWithoutSideEffects(_TableCell, {
|
|
229
294
|
componentId: ComponentIds.TableCell
|
|
230
295
|
});
|
|
231
|
-
var TableCheckboxCell = function TableCheckboxCell(
|
|
232
|
-
var isChecked =
|
|
233
|
-
onChange =
|
|
234
|
-
isDisabled =
|
|
296
|
+
var TableCheckboxCell = function TableCheckboxCell(_ref8) {
|
|
297
|
+
var isChecked = _ref8.isChecked,
|
|
298
|
+
onChange = _ref8.onChange,
|
|
299
|
+
isDisabled = _ref8.isDisabled;
|
|
235
300
|
return /*#__PURE__*/jsx(TableCell, {
|
|
236
301
|
children: /*#__PURE__*/jsx(BaseBox, {
|
|
237
302
|
display: "flex",
|
|
@@ -253,14 +318,16 @@ var TableCheckboxCell = function TableCheckboxCell(_ref6) {
|
|
|
253
318
|
var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
254
319
|
displayName: "TableBodyweb__StyledRow",
|
|
255
320
|
componentId: "sc-1fpz8hn-3"
|
|
256
|
-
})(function (
|
|
257
|
-
var theme =
|
|
258
|
-
$isSelectable =
|
|
259
|
-
$isHoverable =
|
|
260
|
-
$showBorderedCells =
|
|
321
|
+
})(function (_ref9) {
|
|
322
|
+
var theme = _ref9.theme,
|
|
323
|
+
$isSelectable = _ref9.$isSelectable,
|
|
324
|
+
$isHoverable = _ref9.$isHoverable,
|
|
325
|
+
$showBorderedCells = _ref9.$showBorderedCells;
|
|
326
|
+
var _useTableContext3 = useTableContext(),
|
|
327
|
+
hasHoverActions = _useTableContext3.hasHoverActions;
|
|
261
328
|
var rowBackgroundTransition = "background-color ".concat(makeMotionTime(getIn(theme.motion, tableRow.backgroundColorMotionDuration)), " ").concat(getIn(theme.motion, tableRow.backgroundColorMotionEasing));
|
|
262
329
|
return {
|
|
263
|
-
'&&&': _objectSpread(_objectSpread(_objectSpread({
|
|
330
|
+
'&&&': _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
264
331
|
backgroundColor: 'transparent',
|
|
265
332
|
'& .cell-wrapper': $showBorderedCells ? {
|
|
266
333
|
borderRightWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),
|
|
@@ -270,23 +337,56 @@ var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
|
270
337
|
'& td:last-child .cell-wrapper': {
|
|
271
338
|
borderRight: 'none'
|
|
272
339
|
}
|
|
273
|
-
},
|
|
274
|
-
|
|
340
|
+
}, hasHoverActions ? _defineProperty({}, "@media ".concat(getMediaQuery({
|
|
341
|
+
min: theme.breakpoints.m
|
|
342
|
+
})), {
|
|
343
|
+
'& td:last-child': {
|
|
344
|
+
opacity: 0,
|
|
345
|
+
position: 'sticky',
|
|
346
|
+
zIndex: 2,
|
|
347
|
+
right: 0,
|
|
348
|
+
width: '0px',
|
|
349
|
+
'& > div:first-child': {
|
|
350
|
+
overflow: 'visible'
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
'& td:last-child:focus-within': _objectSpread({
|
|
354
|
+
opacity: 1
|
|
355
|
+
}, getTableActionsHoverStyles({
|
|
356
|
+
theme: theme,
|
|
357
|
+
hoverColor: tableRow.nonStripe.backgroundColor
|
|
358
|
+
})),
|
|
359
|
+
'&:hover td:last-child': {
|
|
360
|
+
opacity: 1
|
|
361
|
+
}
|
|
362
|
+
}) : {}), ($isHoverable || $isSelectable) && {
|
|
363
|
+
'&:hover:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
275
364
|
transition: rowBackgroundTransition,
|
|
276
365
|
cursor: 'pointer',
|
|
277
366
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover)
|
|
278
|
-
}
|
|
367
|
+
}, getTableActionsHoverStyles({
|
|
368
|
+
hoverColor: tableRow.nonStripe.backgroundColorHover,
|
|
369
|
+
theme: theme
|
|
370
|
+
}))
|
|
279
371
|
}), $isSelectable && {
|
|
280
|
-
'&:focus:not(.disabled-row) .cell-wrapper-base': {
|
|
372
|
+
'&:focus:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
281
373
|
transition: rowBackgroundTransition,
|
|
282
374
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),
|
|
283
375
|
cursor: 'pointer'
|
|
284
|
-
},
|
|
285
|
-
|
|
376
|
+
}, getTableActionsHoverStyles({
|
|
377
|
+
hoverColor: tableRow.nonStripe.backgroundColorFocus,
|
|
378
|
+
backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,
|
|
379
|
+
theme: theme
|
|
380
|
+
})),
|
|
381
|
+
'&:active:not(.disabled-row) .cell-wrapper-base': _objectSpread({
|
|
286
382
|
transition: rowBackgroundTransition,
|
|
287
383
|
backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),
|
|
288
384
|
cursor: 'pointer'
|
|
289
|
-
}
|
|
385
|
+
}, getTableActionsHoverStyles({
|
|
386
|
+
hoverColor: tableRow.nonStripe.backgroundColorActive,
|
|
387
|
+
backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,
|
|
388
|
+
theme: theme
|
|
389
|
+
}))
|
|
290
390
|
}), {}, {
|
|
291
391
|
'&:focus': getFocusRingStyles({
|
|
292
392
|
theme: theme,
|
|
@@ -295,22 +395,25 @@ var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
|
295
395
|
})
|
|
296
396
|
};
|
|
297
397
|
});
|
|
298
|
-
var _TableRow = function _TableRow(
|
|
299
|
-
var children =
|
|
300
|
-
item =
|
|
301
|
-
isDisabled =
|
|
302
|
-
onHover =
|
|
303
|
-
_onClick =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
398
|
+
var _TableRow = function _TableRow(_ref11) {
|
|
399
|
+
var children = _ref11.children,
|
|
400
|
+
item = _ref11.item,
|
|
401
|
+
isDisabled = _ref11.isDisabled,
|
|
402
|
+
onHover = _ref11.onHover,
|
|
403
|
+
_onClick = _ref11.onClick,
|
|
404
|
+
hoverActions = _ref11.hoverActions,
|
|
405
|
+
testID = _ref11.testID;
|
|
406
|
+
var _useTableContext4 = useTableContext(),
|
|
407
|
+
selectionType = _useTableContext4.selectionType,
|
|
408
|
+
selectedRows = _useTableContext4.selectedRows,
|
|
409
|
+
toggleRowSelectionById = _useTableContext4.toggleRowSelectionById,
|
|
410
|
+
setDisabledRows = _useTableContext4.setDisabledRows,
|
|
411
|
+
showBorderedCells = _useTableContext4.showBorderedCells,
|
|
412
|
+
setHasHoverActions = _useTableContext4.setHasHoverActions;
|
|
311
413
|
var isSelectable = selectionType !== 'none';
|
|
312
414
|
var isMultiSelect = selectionType === 'multiple';
|
|
313
415
|
var isSelected = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.includes(item.id);
|
|
416
|
+
var hasHoverActions = Boolean(hoverActions);
|
|
314
417
|
useEffect(function () {
|
|
315
418
|
if (isDisabled) {
|
|
316
419
|
setDisabledRows(function (prev) {
|
|
@@ -318,6 +421,11 @@ var _TableRow = function _TableRow(_ref8) {
|
|
|
318
421
|
});
|
|
319
422
|
}
|
|
320
423
|
}, [isDisabled, item.id, setDisabledRows]);
|
|
424
|
+
useIsomorphicLayoutEffect(function () {
|
|
425
|
+
if (hasHoverActions) {
|
|
426
|
+
setHasHoverActions(true);
|
|
427
|
+
}
|
|
428
|
+
}, [hasHoverActions]);
|
|
321
429
|
return /*#__PURE__*/jsxs(StyledRow, _objectSpread(_objectSpread(_objectSpread({
|
|
322
430
|
disabled: isDisabled,
|
|
323
431
|
$isSelectable: isDisabled ? false : isSelectable,
|
|
@@ -347,7 +455,43 @@ var _TableRow = function _TableRow(_ref8) {
|
|
|
347
455
|
return !isDisabled && toggleRowSelectionById(item.id);
|
|
348
456
|
},
|
|
349
457
|
isDisabled: isDisabled
|
|
350
|
-
}), children
|
|
458
|
+
}), children, hoverActions ? /*#__PURE__*/jsx(TableCell, {
|
|
459
|
+
_hasPadding: false,
|
|
460
|
+
children: /*#__PURE__*/jsx(BaseBox, {
|
|
461
|
+
className: classes.HOVER_ACTIONS,
|
|
462
|
+
position: {
|
|
463
|
+
base: 'relative',
|
|
464
|
+
m: 'absolute'
|
|
465
|
+
},
|
|
466
|
+
top: "spacing.0",
|
|
467
|
+
right: "spacing.0",
|
|
468
|
+
height: "100%",
|
|
469
|
+
flexShrink: 0,
|
|
470
|
+
flexGrow: 1,
|
|
471
|
+
width: "max-content",
|
|
472
|
+
children: /*#__PURE__*/jsx(BaseBox, {
|
|
473
|
+
className: classes.HOVER_ACTIONS_LAYER2,
|
|
474
|
+
height: "100%",
|
|
475
|
+
width: "max-content",
|
|
476
|
+
display: "flex",
|
|
477
|
+
alignItems: "center",
|
|
478
|
+
children: /*#__PURE__*/jsx(BaseBox, {
|
|
479
|
+
height: "100%",
|
|
480
|
+
width: "max-content",
|
|
481
|
+
className: classes.HOVER_ACTIONS_LAYER3,
|
|
482
|
+
display: "flex",
|
|
483
|
+
alignItems: "center",
|
|
484
|
+
paddingLeft: {
|
|
485
|
+
base: 'spacing.4',
|
|
486
|
+
m: 'spacing.6'
|
|
487
|
+
},
|
|
488
|
+
paddingRight: "spacing.4",
|
|
489
|
+
gap: "spacing.3",
|
|
490
|
+
children: hoverActions
|
|
491
|
+
})
|
|
492
|
+
})
|
|
493
|
+
})
|
|
494
|
+
}) : null]
|
|
351
495
|
}));
|
|
352
496
|
};
|
|
353
497
|
var TableRow = /*#__PURE__*/assignWithoutSideEffects(_TableRow, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { size } from '~tokens/global';\nimport { makeAccessible } from '~utils/makeAccessible';\n\nconst StyledBody = styled(Body)<{\n $isSelectable: boolean;\n $showStripedRows: boolean;\n}>(({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n});\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n $showBorderedCells={true}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nexport const StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': { ...getFocusRingStyles({ theme, negativeOffset: true }) },\n },\n}));\n\nexport const CellWrapper = styled(BaseBox)<{\n $rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n hasPadding?: boolean;\n}>(({ theme, $rowDensity, showStripedRows, hasPadding = true }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[$rowDensity])) : '0px',\n paddingRight: hasPadding\n ? makeSpace(getIn(theme, tableRow.paddingRight[$rowDensity]))\n : '0px',\n minHeight: makeSize(getIn(size, tableRow.minHeight[$rowDensity])),\n height: '100%',\n width: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n // allow text to wrap, so that if the <Text> overflows it can truncate\n whiteSpace=\"normal\"\n >\n {isChildrenString ? (\n <Text size=\"medium\" truncateAfterLines={1}>\n {children}\n </Text>\n ) : (\n children\n )}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{\n $isSelectable: boolean;\n $isHoverable: boolean;\n $showBorderedCells: boolean;\n}>(({ theme, $isSelectable, $isHoverable, $showBorderedCells }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n '& .cell-wrapper': $showBorderedCells\n ? {\n borderRightWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderRightStyle: 'solid',\n borderRightColor: getIn(theme.colors, tableRow.borderColor),\n }\n : undefined,\n '& td:last-child .cell-wrapper': {\n borderRight: 'none',\n },\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n});\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n testID,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n showBorderedCells,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n $showBorderedCells={showBorderedCells}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...makeAccessible({ selected: isSelected })}\n {...metaAttribute({ name: MetaConstants.TableRow, testID })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","$showBorderedCells","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","$rowDensity","_ref4$hasPadding","hasPadding","paddingLeft","makeSpace","paddingRight","minHeight","makeSize","size","width","borderBottomWidth","borderBottomColor","borderColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","rowDensity","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","whiteSpace","Text","truncateAfterLines","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","checkboxCellWidth","onClick","e","stopPropagation","Checkbox","StyledRow","Row","_ref7","$isHoverable","borderRightWidth","borderRightStyle","borderRightColor","undefined","borderRight","cursor","_TableRow","_ref8","item","onHover","testID","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","makeAccessible","selected","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAG5B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AAC1C,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACC,6BAA6B,CAC5D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIE,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACE,2BAA2B,CAAC,CAAE,CAAA;EAEhE,OAAO;AACL,IAAA,KAAK,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACHC,MAAAA,MAAM,EAAE,MAAM;AACdC,MAAAA,UAAU,EAAEV,uBAAuB;AAEnC,MAAA,+BAA+B,EAAE;AAC/BW,QAAAA,YAAY,EAAE,MAAA;OACf;AAED,MAAA,2FAA2F,EAAE;QAC3FC,eAAe,EAAET,K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,KAAA,CAAA,GAAPA,OAAO,CAAG;AAAED,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;KAAC;IACxChB,OAAO,EAAE,SAAAA,OAAA,GAAA;AAAA,MAAA,OAAMA,QAAO,KAAA,IAAA,IAAPA,QAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,QAAO,CAAG;AAAEgB,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BmB,cAAc,CAAC;AAAEC,IAAAA,QAAQ,EAAEX,UAAAA;GAAY,CAAC,CACxC/E,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACyF,QAAQ;AAAEnB,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAhF,IAAAA,QAAA,EAE1DsF,CAAAA,aAAa,iBACZhF,GAAA,CAACiD,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAE8B,UAAW;MACtB7B,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACC,UAAU,IAAIwB,sBAAsB,CAACL,IAAI,CAACW,EAAE,CAAC,CAAA;OAAC;AAC/D9B,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACA3D,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMmG,QAAQ,gBAAGvF,wBAAwB,CAACgE,SAAS,EAAE;EACnD5G,WAAW,EAAE6C,YAAY,CAACsF,QAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, classes, tableBackgroundColor, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { getMediaQuery, makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { size } from '~tokens/global';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport type { Theme } from '~components/BladeProvider';\n\nconst getTableRowBackgroundTransition = (theme: Theme): string => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return rowBackgroundTransition;\n};\n\nconst getTableActionsHoverStyles = ({\n hoverColor,\n theme,\n backgroundGradientColor,\n}: {\n hoverColor: DotNotationToken<Theme['colors']>;\n backgroundGradientColor?: DotNotationToken<Omit<Theme['colors'], 'name'>>;\n theme: Theme;\n}): React.CSSProperties => {\n const rowBackgroundTransition = getTableRowBackgroundTransition(theme);\n\n return {\n // Solid layer 1 background - should match the table background\n [`& .${classes.HOVER_ACTIONS}`]: {\n backgroundColor: getIn(theme.colors, tableBackgroundColor),\n transition: rowBackgroundTransition,\n },\n // Alpha layer 2 background - Stripped row background, Hover background in selected state, etc\n [`& .${classes.HOVER_ACTIONS_LAYER2}`]: {\n backgroundColor: getIn(theme.colors, backgroundGradientColor ?? 'transparent'),\n transition: rowBackgroundTransition,\n },\n // Alpha layer 3 background - Hover, selection, active background\n [`& .${classes.HOVER_ACTIONS_LAYER3}`]: {\n backgroundColor: getIn(theme.colors, hoverColor),\n transition: rowBackgroundTransition,\n },\n };\n};\n\nconst StyledBody = styled(Body)<{\n $isSelectable: boolean;\n $showStripedRows: boolean;\n}>(({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = getTableRowBackgroundTransition(theme);\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,\n theme,\n }),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,\n theme,\n }),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover,\n }),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus,\n }),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorActive,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n theme,\n }),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelected,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected,\n }),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover,\n }),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus,\n }),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedActive,\n theme,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n }),\n },\n }),\n },\n };\n});\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n $showBorderedCells={true}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nexport const StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': { ...getFocusRingStyles({ theme, negativeOffset: true }) },\n },\n}));\n\nexport const CellWrapper = styled(BaseBox)<{\n $rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n hasPadding?: boolean;\n}>(({ theme, $rowDensity, showStripedRows, hasPadding = true }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[$rowDensity])) : '0px',\n paddingRight: hasPadding\n ? makeSpace(getIn(theme, tableRow.paddingRight[$rowDensity]))\n : '0px',\n minHeight: makeSize(getIn(size, tableRow.minHeight[$rowDensity])),\n height: '100%',\n width: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children, _hasPadding }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n $rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n hasPadding={_hasPadding}\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n // allow text to wrap, so that if the <Text> overflows it can truncate\n whiteSpace=\"normal\"\n position=\"relative\"\n >\n {isChildrenString ? (\n <Text size=\"medium\" truncateAfterLines={1}>\n {children}\n </Text>\n ) : (\n children\n )}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{\n $isSelectable: boolean;\n $isHoverable: boolean;\n $showBorderedCells: boolean;\n}>(({ theme, $isSelectable, $isHoverable, $showBorderedCells }) => {\n const { hasHoverActions } = useTableContext();\n\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n '& .cell-wrapper': $showBorderedCells\n ? {\n borderRightWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderRightStyle: 'solid',\n borderRightColor: getIn(theme.colors, tableRow.borderColor),\n }\n : undefined,\n '& td:last-child .cell-wrapper': {\n borderRight: 'none',\n },\n ...(hasHoverActions\n ? {\n [`@media ${getMediaQuery({ min: theme.breakpoints.m })}`]: {\n '& td:last-child': {\n opacity: 0,\n position: 'sticky',\n zIndex: 2,\n right: 0,\n width: '0px',\n '& > div:first-child': {\n overflow: 'visible',\n },\n },\n '& td:last-child:focus-within': {\n opacity: 1,\n ...getTableActionsHoverStyles({\n theme,\n hoverColor: tableRow.nonStripe.backgroundColor,\n }),\n },\n '&:hover td:last-child': {\n opacity: 1,\n },\n },\n }\n : {}),\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorFocus,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n});\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n hoverActions,\n testID,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n showBorderedCells,\n setHasHoverActions,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n const hasHoverActions = Boolean(hoverActions);\n\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n useIsomorphicLayoutEffect(() => {\n if (hasHoverActions) {\n setHasHoverActions(true);\n }\n }, [hasHoverActions]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n $showBorderedCells={showBorderedCells}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...makeAccessible({ selected: isSelected })}\n {...metaAttribute({ name: MetaConstants.TableRow, testID })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n {hoverActions ? (\n <TableCell _hasPadding={false}>\n <BaseBox\n className={classes.HOVER_ACTIONS}\n position={{ base: 'relative', m: 'absolute' }}\n top=\"spacing.0\"\n right=\"spacing.0\"\n height=\"100%\"\n flexShrink={0}\n flexGrow={1}\n width=\"max-content\"\n >\n <BaseBox\n className={classes.HOVER_ACTIONS_LAYER2}\n height=\"100%\"\n width=\"max-content\"\n display=\"flex\"\n alignItems=\"center\"\n >\n <BaseBox\n height=\"100%\"\n width=\"max-content\"\n className={classes.HOVER_ACTIONS_LAYER3}\n display=\"flex\"\n alignItems=\"center\"\n paddingLeft={{ base: 'spacing.4', m: 'spacing.6' }}\n paddingRight=\"spacing.4\"\n gap=\"spacing.3\"\n >\n {hoverActions}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n </TableCell>\n ) : null}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["getTableRowBackgroundTransition","theme","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","getTableActionsHoverStyles","_ref","hoverColor","backgroundGradientColor","_defineProperty","classes","HOVER_ACTIONS","backgroundColor","colors","tableBackgroundColor","transition","HOVER_ACTIONS_LAYER2","HOVER_ACTIONS_LAYER3","StyledBody","styled","Body","withConfig","displayName","componentId","_ref3","$showStripedRows","$isSelectable","_objectSpread","border","borderBottom","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","nonStripeWrapper","backgroundColorSelectedFocus","backgroundColorSelectedActive","backgroundColorHover","backgroundColorActive","stripeWrapper","stripe","backgroundColorFocus","_TableBody","_ref4","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","$showBorderedCells","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref5","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref6","$rowDensity","_ref6$hasPadding","hasPadding","paddingLeft","makeSpace","paddingRight","minHeight","makeSize","size","width","borderBottomWidth","borderBottomColor","borderColor","borderBottomStyle","_TableCell","_ref7","_hasPadding","isChildrenString","_useTableContext2","rowDensity","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","whiteSpace","position","Text","truncateAfterLines","TableCheckboxCell","_ref8","isChecked","onChange","isDisabled","justifyContent","checkboxCellWidth","onClick","e","stopPropagation","Checkbox","StyledRow","Row","_ref9","$isHoverable","_useTableContext3","hasHoverActions","borderRightWidth","borderRightStyle","borderRightColor","undefined","borderRight","getMediaQuery","min","breakpoints","m","opacity","zIndex","right","overflow","cursor","_TableRow","_ref11","item","onHover","hoverActions","testID","_useTableContext4","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","setHasHoverActions","isMultiSelect","isSelected","includes","id","Boolean","useEffect","prev","_toConsumableArray","useIsomorphicLayoutEffect","_jsxs","disabled","onMouseEnter","makeAccessible","selected","TableRow","base","top","flexShrink","flexGrow","gap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAMA,+BAA+B,GAAG,SAAlCA,+BAA+BA,CAAIC,KAAY,EAAa;AAChE,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK,CAACJ,KAAK,CAACK,MAAM,EAAEC,QAAQ,CAACC,6BAA6B,CAC5D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIE,KAAK,CAACJ,KAAK,CAACK,MAAM,EAAEC,QAAQ,CAACE,2BAA2B,CAAC,CAAE,CAAA;AAEhE,EAAA,OAAOP,uBAAuB,CAAA;AAChC,CAAC,CAAA;AAED,IAAMQ,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAAC,IAAA,EAQL;AAAA,EAAA,IAPzBC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVX,KAAK,GAAAU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AU,EAAC,QAAQ;UAAAlD,QAAA,eAEnBM,GAAA,CAACiB,OAAO,EAAA;AACNL,YAAAA,MAAM,EAAC,MAAM;AACbgB,YAAAA,KAAK,EAAC,aAAa;YACnBc,SAAS,EAAEjF,OAAO,CAACO,oBAAqB;AACxC2E,YAAAA,OAAO,EAAC,MAAM;AACdC,YAAAA,UAAU,EAAC,QAAQ;AACnBtB,YAAAA,WAAW,EAAE;AAAEuF,cAAAA,IAAI,EAAE,WAAW;AAAEjC,cAAAA,CAAC,EAAE,WAAA;aAAc;AACnDpD,YAAAA,YAAY,EAAC,WAAW;AACxByF,YAAAA,GAAG,EAAC,WAAW;AAAAvH,YAAAA,QAAA,EAEd4F,YAAAA;WACM,CAAA;SACF,CAAA;OACF,CAAA;KACA,CAAC,GACV,IAAI,CAAA;AAAA,GAAA,CACC,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMsB,QAAQ,gBAAGtG,wBAAwB,CAAC4E,SAAS,EAAE;EACnD5G,WAAW,EAAEiC,YAAY,CAACqG,QAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -23,7 +23,9 @@ var TableContext = /*#__PURE__*/React__default.createContext({
|
|
|
23
23
|
setPaginationType: function setPaginationType() {},
|
|
24
24
|
backgroundColor: 'surface.background.gray.intense',
|
|
25
25
|
setHeaderRowDensity: function setHeaderRowDensity() {},
|
|
26
|
-
showBorderedCells: false
|
|
26
|
+
showBorderedCells: false,
|
|
27
|
+
hasHoverActions: false,
|
|
28
|
+
setHasHoverActions: function setHasHoverActions() {}
|
|
27
29
|
});
|
|
28
30
|
var useTableContext = function useTableContext() {
|
|
29
31
|
var context = React__default.useContext(TableContext);
|