@razorpay/blade 11.25.0 → 11.26.1
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/README.md +3 -4
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +2 -2
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +6 -0
- package/build/lib/native/components/Table/TableContext.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js +16 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js +6 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/native/components/Table/TablePagination.native.js +2 -2
- package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
- package/build/lib/native/components/Table/TableToolbar.native.js +2 -2
- package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +22 -0
- package/build/lib/native/components/Table/tokens.js.map +1 -0
- package/build/lib/native/components/index.js +4 -3
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/theme/createTheme.js +1 -1
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -2
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -0
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/development/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/development/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/index.js +2 -2
- package/build/lib/web/development/components/Table/tokens.js +14 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -1
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -2
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -0
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/production/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/production/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/index.js +2 -2
- package/build/lib/web/production/components/Table/tokens.js +14 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -1
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/types/components/index.d.ts +16 -4
- package/build/types/components/index.native.d.ts +18 -6
- package/build/types/tokens/index.d.ts +6 -3
- package/build/types/tokens/index.native.d.ts +6 -3
- package/package.json +1 -1
- package/build/lib/web/development/components/Table/types.js +0 -2
- package/build/lib/web/development/components/Table/types.js.map +0 -1
- package/build/lib/web/production/components/Table/types.js +0 -2
- package/build/lib/web/production/components/Table/types.js.map +0 -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,
|
|
7
|
+
import { tableRow, 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';
|
|
@@ -15,9 +15,6 @@ import '../../utils/metaAttribute/index.js';
|
|
|
15
15
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
16
16
|
import '../../utils/getFocusRingStyles/index.js';
|
|
17
17
|
import '../../tokens/global/index.js';
|
|
18
|
-
import '../Input/BaseInput/index.js';
|
|
19
|
-
import '../Box/index.js';
|
|
20
|
-
import '../Icons/index.js';
|
|
21
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
22
19
|
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
23
20
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
@@ -29,11 +26,6 @@ import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
|
|
|
29
26
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
30
27
|
import { size } from '../../tokens/global/size.js';
|
|
31
28
|
import { Text } from '../Typography/Text/Text.js';
|
|
32
|
-
import CheckIcon from '../Icons/CheckIcon/CheckIcon.js';
|
|
33
|
-
import AlertCircleIcon from '../Icons/AlertCircleIcon/AlertCircleIcon.js';
|
|
34
|
-
import { Box } from '../Box/Box.js';
|
|
35
|
-
import { BaseInput } from '../Input/BaseInput/BaseInput.js';
|
|
36
|
-
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
37
29
|
import { Checkbox } from '../Checkbox/Checkbox.js';
|
|
38
30
|
|
|
39
31
|
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; }
|
|
@@ -178,7 +170,8 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
178
170
|
paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])) : '0px',
|
|
179
171
|
paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',
|
|
180
172
|
minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),
|
|
181
|
-
height: '100%'
|
|
173
|
+
height: '100%',
|
|
174
|
+
width: '100%'
|
|
182
175
|
}, !showStripedRows && {
|
|
183
176
|
borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),
|
|
184
177
|
borderBottomColor: getIn(theme.colors, tableRow.borderColor),
|
|
@@ -229,143 +222,10 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
229
222
|
var TableCell = /*#__PURE__*/assignWithoutSideEffects(_TableCell, {
|
|
230
223
|
componentId: ComponentIds.TableCell
|
|
231
224
|
});
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
var theme = _ref6.theme,
|
|
237
|
-
rowDensity = _ref6.rowDensity;
|
|
238
|
-
return {
|
|
239
|
-
'&&&': {
|
|
240
|
-
'&:focus-visible': {
|
|
241
|
-
outline: '1px solid'
|
|
242
|
-
},
|
|
243
|
-
'&:focus-within': _objectSpread({}, rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
244
|
-
theme: theme,
|
|
245
|
-
negativeOffset: true
|
|
246
|
-
}) : {})
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
});
|
|
250
|
-
var validationStateToInputTrailingIconMap = {
|
|
251
|
-
none: undefined,
|
|
252
|
-
success: CheckIcon,
|
|
253
|
-
error: AlertCircleIcon
|
|
254
|
-
};
|
|
255
|
-
var rowDensityToIsTableInputCellMapping = {
|
|
256
|
-
comfortable: false,
|
|
257
|
-
normal: true,
|
|
258
|
-
compact: true
|
|
259
|
-
};
|
|
260
|
-
var getEditableInputMargin = function getEditableInputMargin(_ref7) {
|
|
261
|
-
var rowDensity = _ref7.rowDensity;
|
|
262
|
-
if (rowDensity === 'comfortable') {
|
|
263
|
-
return ['spacing.4', 'spacing.4'];
|
|
264
|
-
}
|
|
265
|
-
return 'spacing.2';
|
|
266
|
-
};
|
|
267
|
-
var _TableEditableCell = function _TableEditableCell(_ref8) {
|
|
268
|
-
var _ref8$validationState = _ref8.validationState,
|
|
269
|
-
validationState = _ref8$validationState === void 0 ? 'none' : _ref8$validationState,
|
|
270
|
-
accessibilityLabel = _ref8.accessibilityLabel,
|
|
271
|
-
autoCapitalize = _ref8.autoCapitalize,
|
|
272
|
-
autoCompleteSuggestionType = _ref8.autoCompleteSuggestionType,
|
|
273
|
-
autoFocus = _ref8.autoFocus,
|
|
274
|
-
defaultValue = _ref8.defaultValue,
|
|
275
|
-
isDisabled = _ref8.isDisabled,
|
|
276
|
-
isRequired = _ref8.isRequired,
|
|
277
|
-
keyboardReturnKeyType = _ref8.keyboardReturnKeyType,
|
|
278
|
-
leadingIcon = _ref8.leadingIcon,
|
|
279
|
-
maxCharacters = _ref8.maxCharacters,
|
|
280
|
-
name = _ref8.name,
|
|
281
|
-
onBlur = _ref8.onBlur,
|
|
282
|
-
onChange = _ref8.onChange,
|
|
283
|
-
onClick = _ref8.onClick,
|
|
284
|
-
onFocus = _ref8.onFocus,
|
|
285
|
-
onSubmit = _ref8.onSubmit,
|
|
286
|
-
placeholder = _ref8.placeholder,
|
|
287
|
-
prefix = _ref8.prefix,
|
|
288
|
-
suffix = _ref8.suffix,
|
|
289
|
-
value = _ref8.value,
|
|
290
|
-
testID = _ref8.testID,
|
|
291
|
-
trailingButton = _ref8.trailingButton,
|
|
292
|
-
errorText = _ref8.errorText,
|
|
293
|
-
successText = _ref8.successText;
|
|
294
|
-
var _useTableContext3 = useTableContext(),
|
|
295
|
-
rowDensity = _useTableContext3.rowDensity,
|
|
296
|
-
showStripedRows = _useTableContext3.showStripedRows,
|
|
297
|
-
backgroundColor = _useTableContext3.backgroundColor;
|
|
298
|
-
return /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
299
|
-
role: "cell",
|
|
300
|
-
$backgroundColor: backgroundColor,
|
|
301
|
-
rowDensity: rowDensity
|
|
302
|
-
}, metaAttribute({
|
|
303
|
-
name: MetaConstants.TableCell
|
|
304
|
-
})), {}, {
|
|
305
|
-
children: /*#__PURE__*/jsx(BaseBox, {
|
|
306
|
-
className: "cell-wrapper-base",
|
|
307
|
-
display: "flex",
|
|
308
|
-
alignItems: "center",
|
|
309
|
-
height: "100%",
|
|
310
|
-
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
311
|
-
className: "cell-wrapper",
|
|
312
|
-
rowDensity: rowDensity,
|
|
313
|
-
showStripedRows: showStripedRows,
|
|
314
|
-
display: "flex",
|
|
315
|
-
alignItems: "center",
|
|
316
|
-
flex: 1,
|
|
317
|
-
hasPadding: false,
|
|
318
|
-
children: /*#__PURE__*/jsx(Box, {
|
|
319
|
-
margin: getEditableInputMargin({
|
|
320
|
-
rowDensity: rowDensity
|
|
321
|
-
}),
|
|
322
|
-
width: "100%",
|
|
323
|
-
children: /*#__PURE__*/jsx(BaseInput, {
|
|
324
|
-
isTableInputCell: rowDensityToIsTableInputCellMapping[rowDensity],
|
|
325
|
-
validationState: validationState,
|
|
326
|
-
id: "table-editable-cell-input",
|
|
327
|
-
size: tableEditableCellRowDensityToInputSizeMap[rowDensity],
|
|
328
|
-
type: "text",
|
|
329
|
-
trailingIcon: validationStateToInputTrailingIconMap[validationState],
|
|
330
|
-
accessibilityLabel: accessibilityLabel,
|
|
331
|
-
autoCapitalize: autoCapitalize,
|
|
332
|
-
autoCompleteSuggestionType: autoCompleteSuggestionType
|
|
333
|
-
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
334
|
-
,
|
|
335
|
-
autoFocus: autoFocus,
|
|
336
|
-
defaultValue: defaultValue,
|
|
337
|
-
isDisabled: isDisabled,
|
|
338
|
-
isRequired: isRequired,
|
|
339
|
-
keyboardReturnKeyType: keyboardReturnKeyType,
|
|
340
|
-
leadingIcon: leadingIcon,
|
|
341
|
-
maxCharacters: maxCharacters,
|
|
342
|
-
name: name,
|
|
343
|
-
onBlur: onBlur,
|
|
344
|
-
onChange: onChange,
|
|
345
|
-
onClick: onClick,
|
|
346
|
-
onFocus: onFocus,
|
|
347
|
-
onSubmit: castWebType(onSubmit),
|
|
348
|
-
placeholder: placeholder,
|
|
349
|
-
prefix: prefix,
|
|
350
|
-
suffix: suffix,
|
|
351
|
-
value: value,
|
|
352
|
-
testID: testID,
|
|
353
|
-
trailingButton: trailingButton,
|
|
354
|
-
errorText: errorText,
|
|
355
|
-
successText: successText
|
|
356
|
-
})
|
|
357
|
-
})
|
|
358
|
-
})
|
|
359
|
-
})
|
|
360
|
-
}));
|
|
361
|
-
};
|
|
362
|
-
var TableEditableCell = /*#__PURE__*/assignWithoutSideEffects(_TableEditableCell, {
|
|
363
|
-
componentId: ComponentIds.TableEditableCell
|
|
364
|
-
});
|
|
365
|
-
var TableCheckboxCell = function TableCheckboxCell(_ref9) {
|
|
366
|
-
var isChecked = _ref9.isChecked,
|
|
367
|
-
onChange = _ref9.onChange,
|
|
368
|
-
isDisabled = _ref9.isDisabled;
|
|
225
|
+
var TableCheckboxCell = function TableCheckboxCell(_ref6) {
|
|
226
|
+
var isChecked = _ref6.isChecked,
|
|
227
|
+
onChange = _ref6.onChange,
|
|
228
|
+
isDisabled = _ref6.isDisabled;
|
|
369
229
|
return /*#__PURE__*/jsx(TableCell, {
|
|
370
230
|
children: /*#__PURE__*/jsx(BaseBox, {
|
|
371
231
|
display: "flex",
|
|
@@ -386,12 +246,12 @@ var TableCheckboxCell = function TableCheckboxCell(_ref9) {
|
|
|
386
246
|
};
|
|
387
247
|
var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
388
248
|
displayName: "TableBodyweb__StyledRow",
|
|
389
|
-
componentId: "sc-1fpz8hn-
|
|
390
|
-
})(function (
|
|
391
|
-
var theme =
|
|
392
|
-
$isSelectable =
|
|
393
|
-
$isHoverable =
|
|
394
|
-
$showBorderedCells =
|
|
249
|
+
componentId: "sc-1fpz8hn-3"
|
|
250
|
+
})(function (_ref7) {
|
|
251
|
+
var theme = _ref7.theme,
|
|
252
|
+
$isSelectable = _ref7.$isSelectable,
|
|
253
|
+
$isHoverable = _ref7.$isHoverable,
|
|
254
|
+
$showBorderedCells = _ref7.$showBorderedCells;
|
|
395
255
|
var rowBackgroundTransition = "background-color ".concat(makeMotionTime(getIn(theme.motion, tableRow.backgroundColorMotionDuration)), " ").concat(getIn(theme.motion, tableRow.backgroundColorMotionEasing));
|
|
396
256
|
return {
|
|
397
257
|
'&&&': _objectSpread(_objectSpread(_objectSpread({
|
|
@@ -429,18 +289,18 @@ var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
|
429
289
|
})
|
|
430
290
|
};
|
|
431
291
|
});
|
|
432
|
-
var _TableRow = function _TableRow(
|
|
433
|
-
var children =
|
|
434
|
-
item =
|
|
435
|
-
isDisabled =
|
|
436
|
-
onHover =
|
|
437
|
-
_onClick =
|
|
438
|
-
var
|
|
439
|
-
selectionType =
|
|
440
|
-
selectedRows =
|
|
441
|
-
toggleRowSelectionById =
|
|
442
|
-
setDisabledRows =
|
|
443
|
-
showBorderedCells =
|
|
292
|
+
var _TableRow = function _TableRow(_ref8) {
|
|
293
|
+
var children = _ref8.children,
|
|
294
|
+
item = _ref8.item,
|
|
295
|
+
isDisabled = _ref8.isDisabled,
|
|
296
|
+
onHover = _ref8.onHover,
|
|
297
|
+
_onClick = _ref8.onClick;
|
|
298
|
+
var _useTableContext3 = useTableContext(),
|
|
299
|
+
selectionType = _useTableContext3.selectionType,
|
|
300
|
+
selectedRows = _useTableContext3.selectedRows,
|
|
301
|
+
toggleRowSelectionById = _useTableContext3.toggleRowSelectionById,
|
|
302
|
+
setDisabledRows = _useTableContext3.setDisabledRows,
|
|
303
|
+
showBorderedCells = _useTableContext3.showBorderedCells;
|
|
444
304
|
var isSelectable = selectionType !== 'none';
|
|
445
305
|
var isMultiSelect = selectionType === 'multiple';
|
|
446
306
|
var isSelected = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.includes(item.id);
|
|
@@ -484,5 +344,5 @@ var TableRow = /*#__PURE__*/assignWithoutSideEffects(_TableRow, {
|
|
|
484
344
|
componentId: ComponentIds.TableRow
|
|
485
345
|
});
|
|
486
346
|
|
|
487
|
-
export { TableBody, TableCell,
|
|
347
|
+
export { CellWrapper, StyledCell, TableBody, TableCell, TableRow };
|
|
488
348
|
//# sourceMappingURL=TableBody.web.js.map
|
|
@@ -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, tableEditableCellRowDensityToInputSizeMap, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n TableEditableCellProps,\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 { castWebType, 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 { BaseInput } from '~components/Input/BaseInput';\nimport { Box } from '~components/Box';\nimport { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport type { MarginProps } from '~components/Box/BaseBox/types/spacingTypes';\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\nconst 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\nconst 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 ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',\n minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),\n height: '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 >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst StyledEditableCell = styled(StyledCell)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}>(({ theme, rowDensity }) => ({\n '&&&': {\n '&:focus-visible': { outline: '1px solid' },\n '&:focus-within': {\n ...(rowDensity !== 'comfortable' ? getFocusRingStyles({ theme, negativeOffset: true }) : {}),\n },\n },\n}));\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst getEditableInputMargin = ({\n rowDensity,\n}: {\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}): MarginProps['margin'] => {\n if (rowDensity === 'comfortable') {\n return ['spacing.4', 'spacing.4'];\n }\n\n return 'spacing.2';\n};\n\nconst _TableEditableCell = ({\n validationState = 'none',\n accessibilityLabel,\n autoCapitalize,\n autoCompleteSuggestionType,\n autoFocus,\n defaultValue,\n isDisabled,\n isRequired,\n keyboardReturnKeyType,\n leadingIcon,\n maxCharacters,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onSubmit,\n placeholder,\n prefix,\n suffix,\n value,\n testID,\n trailingButton,\n errorText,\n successText,\n}: TableEditableCellProps): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n rowDensity={rowDensity}\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 hasPadding={false}\n >\n <Box margin={getEditableInputMargin({ rowDensity })} width=\"100%\">\n <BaseInput\n isTableInputCell={rowDensityToIsTableInputCellMapping[rowDensity]}\n validationState={validationState}\n id=\"table-editable-cell-input\"\n size={tableEditableCellRowDensityToInputSizeMap[rowDensity]}\n type=\"text\"\n trailingIcon={validationStateToInputTrailingIconMap[validationState]}\n accessibilityLabel={accessibilityLabel}\n autoCapitalize={autoCapitalize}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n defaultValue={defaultValue}\n isDisabled={isDisabled}\n isRequired={isRequired}\n keyboardReturnKeyType={keyboardReturnKeyType}\n leadingIcon={leadingIcon}\n maxCharacters={maxCharacters}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onSubmit={castWebType(onSubmit)}\n placeholder={placeholder}\n prefix={prefix}\n suffix={suffix}\n value={value}\n testID={testID}\n trailingButton={trailingButton}\n errorText={errorText}\n successText={successText}\n />\n </Box>\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n );\n};\n\nconst TableEditableCell = assignWithoutSideEffects(_TableEditableCell, {\n componentId: ComponentIds.TableEditableCell,\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}: 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 {...metaAttribute({ name: MetaConstants.TableRow })}\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, TableEditableCell };\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","borderBottomWidth","width","borderBottomColor","borderColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","StyledEditableCell","_ref6","outline","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping","comfortable","normal","compact","getEditableInputMargin","_ref7","_TableEditableCell","_ref8","_ref8$validationState","validationState","accessibilityLabel","autoCapitalize","autoCompleteSuggestionType","autoFocus","defaultValue","isDisabled","isRequired","keyboardReturnKeyType","leadingIcon","maxCharacters","onBlur","onChange","onClick","onFocus","onSubmit","placeholder","prefix","suffix","value","testID","trailingButton","errorText","successText","_useTableContext3","Box","margin","BaseInput","isTableInputCell","id","tableEditableCellRowDensityToInputSizeMap","type","trailingIcon","castWebType","TableEditableCell","TableCheckboxCell","_ref9","isChecked","justifyContent","checkboxCellWidth","e","stopPropagation","Checkbox","StyledRow","Row","_ref10","$isHoverable","borderRightWidth","borderRightStyle","borderRightColor","borderRight","cursor","_TableRow","_ref11","item","onHover","_useTableContext4","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","isMultiSelect","isSelected","includes","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,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,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A,CAAA,GAAPA,OAAO,CAAG;AAAED,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;KAAC;IACxCzC,OAAO,EAAE,SAAAA,OAAA,GAAA;AAAA,MAAA,OAAMA,QAAO,KAAA,IAAA,IAAPA,QAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,QAAO,CAAG;AAAEyC,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BrH,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACoI,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA9I,IAAAA,QAAA,EAElDoI,CAAAA,aAAa,iBACZ9H,GAAA,CAACoG,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAEyB,UAAW;MACtBlD,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACN,UAAU,IAAIoD,sBAAsB,CAACJ,IAAI,CAACzB,EAAE,CAAC,CAAA;OAAC;AAC/DvB,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACA7E,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAM8I,QAAQ,gBAAGlI,wBAAwB,CAAC+G,SAAS,EAAE;EACnD3J,WAAW,EAAE6C,YAAY,CAACiI,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, 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';\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 ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '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 >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\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}: 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 {...metaAttribute({ name: MetaConstants.TableRow })}\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","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","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","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,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,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AAE,SAAAA,YAAA,GAAA;AAAA,MAAA,OAAMhB,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,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/BnE,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACmF,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA7F,IAAAA,QAAA,EAElDkF,CAAAA,aAAa,iBACZ5E,GAAA,CAAC8C,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAE6B,UAAW;MACtB5B,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACC,UAAU,IAAIuB,sBAAsB,CAACJ,IAAI,CAACU,EAAE,CAAC,CAAA;OAAC;AAC/D7B,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACAxD,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAM6F,QAAQ,gBAAGjF,wBAAwB,CAAC6D,SAAS,EAAE;EACnDzG,WAAW,EAAE6C,YAAY,CAACgF,QAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { StyledCell, CellWrapper } from './TableBody.web.js';
|
|
4
|
+
import { useTableContext } from './TableContext.js';
|
|
5
|
+
import { rowDensityToIsTableInputCellMapping, tableEditableCellRowDensityToInputSizeMap, validationStateToInputTrailingIconMap } from './tokens.js';
|
|
6
|
+
import { ComponentIds } from './componentIds.js';
|
|
7
|
+
import { TableEditableCellContext } from './TableEditableCellContext.js';
|
|
8
|
+
import '../../utils/getFocusRingStyles/index.js';
|
|
9
|
+
import '../../utils/metaAttribute/index.js';
|
|
10
|
+
import '../Box/BaseBox/index.js';
|
|
11
|
+
import '../Box/index.js';
|
|
12
|
+
import '../Input/BaseInput/index.js';
|
|
13
|
+
import '../../utils/index.js';
|
|
14
|
+
import '../../utils/assignWithoutSideEffects/index.js';
|
|
15
|
+
import '../Dropdown/index.js';
|
|
16
|
+
import { jsx } from 'react/jsx-runtime';
|
|
17
|
+
import { getFocusRingStyles } from '../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
18
|
+
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
19
|
+
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
20
|
+
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
21
|
+
import { Box } from '../Box/Box.js';
|
|
22
|
+
import { BaseInput } from '../Input/BaseInput/BaseInput.js';
|
|
23
|
+
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
24
|
+
import { Dropdown } from '../Dropdown/Dropdown.js';
|
|
25
|
+
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
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; }
|
|
29
|
+
var StyledEditableCell = /*#__PURE__*/styled(StyledCell).withConfig({
|
|
30
|
+
displayName: "TableEditableCellweb__StyledEditableCell",
|
|
31
|
+
componentId: "cvczp8-0"
|
|
32
|
+
})(function (_ref) {
|
|
33
|
+
var theme = _ref.theme,
|
|
34
|
+
rowDensity = _ref.rowDensity;
|
|
35
|
+
return {
|
|
36
|
+
'&&&': {
|
|
37
|
+
'&:focus-visible': {
|
|
38
|
+
outline: '1px solid'
|
|
39
|
+
},
|
|
40
|
+
'&:focus-within': _objectSpread({}, rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
41
|
+
theme: theme,
|
|
42
|
+
negativeOffset: true
|
|
43
|
+
}) : {})
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
var getEditableInputMargin = function getEditableInputMargin(_ref2) {
|
|
48
|
+
var rowDensity = _ref2.rowDensity;
|
|
49
|
+
if (rowDensity === 'comfortable') {
|
|
50
|
+
return ['spacing.4', 'spacing.4'];
|
|
51
|
+
}
|
|
52
|
+
return 'spacing.2';
|
|
53
|
+
};
|
|
54
|
+
var _TableEditableCell = function _TableEditableCell(_ref3) {
|
|
55
|
+
var _ref3$validationState = _ref3.validationState,
|
|
56
|
+
validationState = _ref3$validationState === void 0 ? 'none' : _ref3$validationState,
|
|
57
|
+
accessibilityLabel = _ref3.accessibilityLabel,
|
|
58
|
+
autoCapitalize = _ref3.autoCapitalize,
|
|
59
|
+
autoCompleteSuggestionType = _ref3.autoCompleteSuggestionType,
|
|
60
|
+
autoFocus = _ref3.autoFocus,
|
|
61
|
+
defaultValue = _ref3.defaultValue,
|
|
62
|
+
isDisabled = _ref3.isDisabled,
|
|
63
|
+
isRequired = _ref3.isRequired,
|
|
64
|
+
keyboardReturnKeyType = _ref3.keyboardReturnKeyType,
|
|
65
|
+
leadingIcon = _ref3.leadingIcon,
|
|
66
|
+
maxCharacters = _ref3.maxCharacters,
|
|
67
|
+
name = _ref3.name,
|
|
68
|
+
onBlur = _ref3.onBlur,
|
|
69
|
+
onChange = _ref3.onChange,
|
|
70
|
+
onClick = _ref3.onClick,
|
|
71
|
+
onFocus = _ref3.onFocus,
|
|
72
|
+
onSubmit = _ref3.onSubmit,
|
|
73
|
+
placeholder = _ref3.placeholder,
|
|
74
|
+
prefix = _ref3.prefix,
|
|
75
|
+
suffix = _ref3.suffix,
|
|
76
|
+
value = _ref3.value,
|
|
77
|
+
testID = _ref3.testID,
|
|
78
|
+
trailingButton = _ref3.trailingButton,
|
|
79
|
+
errorText = _ref3.errorText,
|
|
80
|
+
successText = _ref3.successText;
|
|
81
|
+
var _useTableContext = useTableContext(),
|
|
82
|
+
rowDensity = _useTableContext.rowDensity,
|
|
83
|
+
showStripedRows = _useTableContext.showStripedRows,
|
|
84
|
+
backgroundColor = _useTableContext.backgroundColor;
|
|
85
|
+
return /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
86
|
+
role: "cell",
|
|
87
|
+
$backgroundColor: backgroundColor,
|
|
88
|
+
rowDensity: rowDensity
|
|
89
|
+
}, metaAttribute({
|
|
90
|
+
name: MetaConstants.TableCell
|
|
91
|
+
})), {}, {
|
|
92
|
+
children: /*#__PURE__*/jsx(BaseBox, {
|
|
93
|
+
className: "cell-wrapper-base",
|
|
94
|
+
display: "flex",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
height: "100%",
|
|
97
|
+
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
98
|
+
className: "cell-wrapper",
|
|
99
|
+
rowDensity: rowDensity,
|
|
100
|
+
showStripedRows: showStripedRows,
|
|
101
|
+
display: "flex",
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
flex: 1,
|
|
104
|
+
hasPadding: false,
|
|
105
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
106
|
+
margin: getEditableInputMargin({
|
|
107
|
+
rowDensity: rowDensity
|
|
108
|
+
}),
|
|
109
|
+
width: "100%",
|
|
110
|
+
children: /*#__PURE__*/jsx(BaseInput, {
|
|
111
|
+
isTableInputCell: rowDensityToIsTableInputCellMapping[rowDensity],
|
|
112
|
+
validationState: validationState,
|
|
113
|
+
id: "table-editable-cell-input",
|
|
114
|
+
type: "text",
|
|
115
|
+
size: tableEditableCellRowDensityToInputSizeMap[rowDensity],
|
|
116
|
+
trailingIcon: validationStateToInputTrailingIconMap[validationState],
|
|
117
|
+
accessibilityLabel: accessibilityLabel,
|
|
118
|
+
autoCapitalize: autoCapitalize,
|
|
119
|
+
autoCompleteSuggestionType: autoCompleteSuggestionType
|
|
120
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
121
|
+
,
|
|
122
|
+
autoFocus: autoFocus,
|
|
123
|
+
defaultValue: defaultValue,
|
|
124
|
+
isDisabled: isDisabled,
|
|
125
|
+
isRequired: isRequired,
|
|
126
|
+
keyboardReturnKeyType: keyboardReturnKeyType,
|
|
127
|
+
leadingIcon: leadingIcon,
|
|
128
|
+
maxCharacters: maxCharacters,
|
|
129
|
+
name: name,
|
|
130
|
+
onBlur: onBlur,
|
|
131
|
+
onChange: onChange,
|
|
132
|
+
onClick: onClick,
|
|
133
|
+
onFocus: onFocus,
|
|
134
|
+
onSubmit: castWebType(onSubmit),
|
|
135
|
+
placeholder: placeholder,
|
|
136
|
+
prefix: prefix,
|
|
137
|
+
suffix: suffix,
|
|
138
|
+
value: value,
|
|
139
|
+
testID: testID,
|
|
140
|
+
trailingButton: trailingButton,
|
|
141
|
+
errorText: errorText,
|
|
142
|
+
successText: successText,
|
|
143
|
+
showHintsAsTooltip: true
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
}));
|
|
149
|
+
};
|
|
150
|
+
var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps) {
|
|
151
|
+
var _useTableContext2 = useTableContext(),
|
|
152
|
+
rowDensity = _useTableContext2.rowDensity,
|
|
153
|
+
showStripedRows = _useTableContext2.showStripedRows,
|
|
154
|
+
backgroundColor = _useTableContext2.backgroundColor;
|
|
155
|
+
return /*#__PURE__*/jsx(TableEditableCellContext.Provider, {
|
|
156
|
+
value: {
|
|
157
|
+
isInsideTableEditableCell: true
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
160
|
+
role: "cell",
|
|
161
|
+
$backgroundColor: backgroundColor,
|
|
162
|
+
rowDensity: rowDensity
|
|
163
|
+
}, metaAttribute({
|
|
164
|
+
name: MetaConstants.TableCell
|
|
165
|
+
})), {}, {
|
|
166
|
+
children: /*#__PURE__*/jsx(BaseBox, {
|
|
167
|
+
className: "cell-wrapper-base",
|
|
168
|
+
display: "flex",
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
height: "100%",
|
|
171
|
+
width: "100%",
|
|
172
|
+
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
173
|
+
className: "cell-wrapper",
|
|
174
|
+
rowDensity: rowDensity,
|
|
175
|
+
showStripedRows: showStripedRows,
|
|
176
|
+
display: "flex",
|
|
177
|
+
alignItems: "center",
|
|
178
|
+
flex: 1,
|
|
179
|
+
hasPadding: false,
|
|
180
|
+
children: /*#__PURE__*/jsx(Dropdown, _objectSpread({
|
|
181
|
+
_width: "100%",
|
|
182
|
+
margin: "spacing.2"
|
|
183
|
+
}, dropdownProps))
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
}))
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
var TableEditableCell = /*#__PURE__*/assignWithoutSideEffects(_TableEditableCell, {
|
|
190
|
+
componentId: ComponentIds.TableEditableCell
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
export { TableEditableCell, TableEditableDropdownCell };
|
|
194
|
+
//# sourceMappingURL=TableEditableCell.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableEditableCell.web.js","sources":["../../../../../../src/components/Table/TableEditableCell.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { CellWrapper, StyledCell } from './TableBody';\nimport { useTableContext } from './TableContext';\nimport type { TableEditableCellProps, TableEditableDropdownCellProps, TableProps } from './types';\nimport {\n rowDensityToIsTableInputCellMapping,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n} from './tokens';\nimport { ComponentIds } from './componentIds';\nimport { TableEditableCellContext } from './TableEditableCellContext';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport type { MarginProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Box } from '~components/Box';\nimport { BaseInput } from '~components/Input/BaseInput';\nimport { castWebType } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { Dropdown } from '~components/Dropdown';\n\nconst StyledEditableCell = styled(StyledCell)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}>(({ theme, rowDensity }) => ({\n '&&&': {\n '&:focus-visible': { outline: '1px solid' },\n '&:focus-within': {\n ...(rowDensity !== 'comfortable' ? getFocusRingStyles({ theme, negativeOffset: true }) : {}),\n },\n },\n}));\n\nconst getEditableInputMargin = ({\n rowDensity,\n}: {\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n}): MarginProps['margin'] => {\n if (rowDensity === 'comfortable') {\n return ['spacing.4', 'spacing.4'];\n }\n\n return 'spacing.2';\n};\n\nconst _TableEditableCell = ({\n validationState = 'none',\n accessibilityLabel,\n autoCapitalize,\n autoCompleteSuggestionType,\n autoFocus,\n defaultValue,\n isDisabled,\n isRequired,\n keyboardReturnKeyType,\n leadingIcon,\n maxCharacters,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onSubmit,\n placeholder,\n prefix,\n suffix,\n value,\n testID,\n trailingButton,\n errorText,\n successText,\n}: TableEditableCellProps): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n rowDensity={rowDensity}\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 hasPadding={false}\n >\n <Box margin={getEditableInputMargin({ rowDensity })} width=\"100%\">\n <BaseInput\n isTableInputCell={rowDensityToIsTableInputCellMapping[rowDensity]}\n validationState={validationState}\n id=\"table-editable-cell-input\"\n type=\"text\"\n size={tableEditableCellRowDensityToInputSizeMap[rowDensity]}\n trailingIcon={validationStateToInputTrailingIconMap[validationState]}\n accessibilityLabel={accessibilityLabel}\n autoCapitalize={autoCapitalize}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n defaultValue={defaultValue}\n isDisabled={isDisabled}\n isRequired={isRequired}\n keyboardReturnKeyType={keyboardReturnKeyType}\n leadingIcon={leadingIcon}\n maxCharacters={maxCharacters}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onSubmit={castWebType(onSubmit)}\n placeholder={placeholder}\n prefix={prefix}\n suffix={suffix}\n value={value}\n testID={testID}\n trailingButton={trailingButton}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={true}\n />\n </Box>\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n );\n};\n\nconst TableEditableDropdownCell = (\n dropdownProps: TableEditableDropdownCellProps,\n): React.ReactElement => {\n const { rowDensity, showStripedRows, backgroundColor } = useTableContext();\n\n return (\n <TableEditableCellContext.Provider value={{ isInsideTableEditableCell: true }}>\n <StyledEditableCell\n role=\"cell\"\n $backgroundColor={backgroundColor}\n rowDensity={rowDensity}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox\n className=\"cell-wrapper-base\"\n display=\"flex\"\n alignItems=\"center\"\n height=\"100%\"\n width=\"100%\"\n >\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n hasPadding={false}\n >\n <Dropdown _width=\"100%\" margin=\"spacing.2\" {...dropdownProps} />\n </CellWrapper>\n </BaseBox>\n </StyledEditableCell>\n </TableEditableCellContext.Provider>\n );\n};\n\nconst TableEditableCell = assignWithoutSideEffects(_TableEditableCell, {\n componentId: ComponentIds.TableEditableCell,\n});\n\nexport { TableEditableCell, TableEditableDropdownCell };\n"],"names":["StyledEditableCell","styled","StyledCell","withConfig","displayName","componentId","_ref","theme","rowDensity","outline","_objectSpread","getFocusRingStyles","negativeOffset","getEditableInputMargin","_ref2","_TableEditableCell","_ref3","_ref3$validationState","validationState","accessibilityLabel","autoCapitalize","autoCompleteSuggestionType","autoFocus","defaultValue","isDisabled","isRequired","keyboardReturnKeyType","leadingIcon","maxCharacters","name","onBlur","onChange","onClick","onFocus","onSubmit","placeholder","prefix","suffix","value","testID","trailingButton","errorText","successText","_useTableContext","useTableContext","showStripedRows","backgroundColor","_jsx","role","$backgroundColor","metaAttribute","MetaConstants","TableCell","children","BaseBox","className","display","alignItems","height","CellWrapper","flex","hasPadding","Box","margin","width","BaseInput","isTableInputCell","rowDensityToIsTableInputCellMapping","id","type","size","tableEditableCellRowDensityToInputSizeMap","trailingIcon","validationStateToInputTrailingIconMap","castWebType","showHintsAsTooltip","TableEditableDropdownCell","dropdownProps","_useTableContext2","TableEditableCellContext","Provider","isInsideTableEditableCell","Dropdown","_width","TableEditableCell","assignWithoutSideEffects","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,kBAAkB,gBAA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