@razorpay/blade 11.30.2 → 11.30.4
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/web/development/components/Card/CardRoot.web.js +4 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +10 -6
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableEditableCell.web.js +6 -6
- package/build/lib/web/development/components/Table/TableEditableCell.web.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +4 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +10 -6
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableEditableCell.web.js +6 -6
- package/build/lib/web/production/components/Table/TableEditableCell.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
21
21
|
displayName: "CardRootweb__StyledCardRoot",
|
|
22
22
|
componentId: "sc-1nb70ck-0"
|
|
23
23
|
})(function (_ref) {
|
|
24
|
-
var
|
|
24
|
+
var as = _ref.as,
|
|
25
|
+
theme = _ref.theme,
|
|
25
26
|
isSelected = _ref.isSelected,
|
|
26
27
|
isFocused = _ref.isFocused,
|
|
27
28
|
shouldScaleOnHover = _ref.shouldScaleOnHover,
|
|
@@ -36,7 +37,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
36
37
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
37
38
|
transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),
|
|
38
39
|
transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),
|
|
39
|
-
transitionProperty: 'transform, box-shadow'
|
|
40
|
+
transitionProperty: 'transform, box-shadow',
|
|
41
|
+
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
40
42
|
}, isMobile && isPressed && {
|
|
41
43
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
42
44
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ as, theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","cursor","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CACpC,CAAA,CAAA,UAAAC,IAAA,EAAmF;AAAA,EAAA,IAAhFC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,QAAQ,GAAAP,IAAA,CAARO,QAAQ,CAAA;AAC1E,EAAA,IAAMC,aAAa,GAAGL,UAAU,GAAGD,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACC,MAAM,GAAG,aAAa,CAAA;AAC7F,EAAA,IAAMC,cAAc,GAAA,cAAA,CAAAC,MAAA,CAAkBb,KAAK,CAACS,MAAM,CAACK,KAAK,CAACC,OAAO,EAAA,KAAA,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AS,EAAE,SAAAA,SAAA,GAAA;MAAA,OAAML,YAAY,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EACjCM,cAAc,CAAC;AACjBC,IAAAA,KAAK,EAAE5D,EAAE,KAAK,OAAO,GAAG0C,kBAAkB,GAAGmB,SAAAA;AAC/C,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAlB,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -160,7 +160,7 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
160
160
|
componentId: "sc-1fpz8hn-2"
|
|
161
161
|
})(function (_ref4) {
|
|
162
162
|
var theme = _ref4.theme,
|
|
163
|
-
rowDensity = _ref4
|
|
163
|
+
$rowDensity = _ref4.$rowDensity,
|
|
164
164
|
showStripedRows = _ref4.showStripedRows,
|
|
165
165
|
_ref4$hasPadding = _ref4.hasPadding,
|
|
166
166
|
hasPadding = _ref4$hasPadding === void 0 ? true : _ref4$hasPadding;
|
|
@@ -169,9 +169,9 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
169
169
|
'&&&': _objectSpread({
|
|
170
170
|
transition: rowBackgroundTransition,
|
|
171
171
|
backgroundColor: tableRow.nonStripeWrapper.backgroundColor,
|
|
172
|
-
paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])) : '0px',
|
|
173
|
-
paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',
|
|
174
|
-
minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),
|
|
172
|
+
paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[$rowDensity])) : '0px',
|
|
173
|
+
paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[$rowDensity])) : '0px',
|
|
174
|
+
minHeight: makeSize(getIn(size, tableRow.minHeight[$rowDensity])),
|
|
175
175
|
height: '100%',
|
|
176
176
|
width: '100%'
|
|
177
177
|
}, !showStripedRows && {
|
|
@@ -204,7 +204,7 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
204
204
|
height: "100%",
|
|
205
205
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
206
206
|
className: "cell-wrapper",
|
|
207
|
-
rowDensity: rowDensity,
|
|
207
|
+
$rowDensity: rowDensity,
|
|
208
208
|
showStripedRows: showStripedRows,
|
|
209
209
|
display: "flex",
|
|
210
210
|
alignItems: "center",
|
|
@@ -212,9 +212,13 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
212
212
|
// when a direct string child is passed we want to disable pointer events
|
|
213
213
|
// for custom cells components, consumers can handle pointer events themselves
|
|
214
214
|
,
|
|
215
|
-
pointerEvents: isChildrenString && isSelectable ? 'none' : 'auto'
|
|
215
|
+
pointerEvents: isChildrenString && isSelectable ? 'none' : 'auto'
|
|
216
|
+
// allow text to wrap, so that if the <Text> overflows it can truncate
|
|
217
|
+
,
|
|
218
|
+
whiteSpace: "normal",
|
|
216
219
|
children: isChildrenString ? /*#__PURE__*/jsx(Text, {
|
|
217
220
|
size: "medium",
|
|
221
|
+
truncateAfterLines: 1,
|
|
218
222
|
children: children
|
|
219
223
|
}) : children
|
|
220
224
|
})
|
|
@@ -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 ? 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 {...makeAccessible({ selected: isSelected })}\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","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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,YAAY,EAAE,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/BkB,cAAc,CAAC;AAAEC,IAAAA,QAAQ,EAAEX,UAAAA;GAAY,CAAC,CACxC3E,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACqF,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA/F,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,IAAM+F,QAAQ,gBAAGnF,wBAAwB,CAAC6D,SAAS,EAAE;EACnDzG,WAAW,EAAE6C,YAAY,CAACkF,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';\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}: 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 })}\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","_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,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,CAACC,UAAU,IAAIuB,sBAAsB,CAACJ,IAAI,CAACU,EAAE,CAAC,CAAA;OAAC;AAC/D7B,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACA3D,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMkG,QAAQ,gBAAGtF,wBAAwB,CAACgE,SAAS,EAAE;EACnD5G,WAAW,EAAE6C,YAAY,CAACqF,QAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -31,13 +31,13 @@ var StyledEditableCell = /*#__PURE__*/styled(StyledCell).withConfig({
|
|
|
31
31
|
componentId: "cvczp8-0"
|
|
32
32
|
})(function (_ref) {
|
|
33
33
|
var theme = _ref.theme,
|
|
34
|
-
rowDensity = _ref
|
|
34
|
+
$rowDensity = _ref.$rowDensity;
|
|
35
35
|
return {
|
|
36
36
|
'&&&': {
|
|
37
37
|
'&:focus-visible': {
|
|
38
38
|
outline: '1px solid'
|
|
39
39
|
},
|
|
40
|
-
'&:focus-within': _objectSpread({}, rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
40
|
+
'&:focus-within': _objectSpread({}, $rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
41
41
|
theme: theme,
|
|
42
42
|
negativeOffset: true
|
|
43
43
|
}) : {})
|
|
@@ -85,7 +85,7 @@ var _TableEditableCell = function _TableEditableCell(_ref3) {
|
|
|
85
85
|
return /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
86
86
|
role: "cell",
|
|
87
87
|
$backgroundColor: backgroundColor,
|
|
88
|
-
rowDensity: rowDensity
|
|
88
|
+
$rowDensity: rowDensity
|
|
89
89
|
}, metaAttribute({
|
|
90
90
|
name: MetaConstants.TableCell
|
|
91
91
|
})), {}, {
|
|
@@ -96,7 +96,7 @@ var _TableEditableCell = function _TableEditableCell(_ref3) {
|
|
|
96
96
|
height: "100%",
|
|
97
97
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
98
98
|
className: "cell-wrapper",
|
|
99
|
-
rowDensity: rowDensity,
|
|
99
|
+
$rowDensity: rowDensity,
|
|
100
100
|
showStripedRows: showStripedRows,
|
|
101
101
|
display: "flex",
|
|
102
102
|
alignItems: "center",
|
|
@@ -159,7 +159,7 @@ var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps
|
|
|
159
159
|
children: /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
160
160
|
role: "cell",
|
|
161
161
|
$backgroundColor: backgroundColor,
|
|
162
|
-
rowDensity: rowDensity
|
|
162
|
+
$rowDensity: rowDensity
|
|
163
163
|
}, metaAttribute({
|
|
164
164
|
name: MetaConstants.TableCell
|
|
165
165
|
})), {}, {
|
|
@@ -171,7 +171,7 @@ var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps
|
|
|
171
171
|
width: "100%",
|
|
172
172
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
173
173
|
className: "cell-wrapper",
|
|
174
|
-
rowDensity: rowDensity,
|
|
174
|
+
$rowDensity: rowDensity,
|
|
175
175
|
showStripedRows: showStripedRows,
|
|
176
176
|
display: "flex",
|
|
177
177
|
alignItems: "center",
|
|
@@ -1 +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,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU,CAAA;EAAA,OAAQ;AAC7B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,UAAU,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,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J,UAAAA,SAAS,EAAC,cAAc;AACxB/C,UAAAA,UAAU,EAAEA,UAAW;AACvBqC,UAAAA,eAAe,EAAEA,eAAgB;AACjCW,UAAAA,OAAO,EAAC,MAAM;AACdC,UAAAA,UAAU,EAAC,QAAQ;AACnBG,UAAAA,IAAI,EAAE,CAAE;AACRC,UAAAA,UAAU,EAAE,KAAM;AAAAR,UAAAA,QAAA,eAElBN,GAAA,CAACmC,QAAQ,EAAAxE,aAAA,CAAA;AAACyE,YAAAA,MAAM,EAAC,MAAM;AAACpB,YAAAA,MAAM,EAAC,WAAA;AAAW,WAAA,EAAKc,aAAa,CAAG,CAAA;SACpD,CAAA;OACN,CAAA;KACS,CAAA,CAAA;AAAC,GACY,CAAC,CAAA;AAExC,EAAC;AAED,IAAMO,iBAAiB,gBAAGC,wBAAwB,CAACtE,kBAAkB,EAAE;EACrEV,WAAW,EAAEiF,YAAY,CAACF,iBAAAA;AAC5B,CAAC;;;;"}
|
|
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","rowDensity","_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,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW,CAAA;EAAA,OAAQ;AAC9B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,WAAW,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,EAALA,KAAK;AAAEK,QAAAA,cAAc,EAAE,IAAA;OAAM,CAAC,GAAG,EAAE,CAAA;AAEhG,KAAA;GACD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMC,sBAAsB,GAAG,SAAz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AAQ;AACnBG,UAAAA,IAAI,EAAE,CAAE;AACRC,UAAAA,UAAU,EAAE,KAAM;AAAAR,UAAAA,QAAA,eAElBN,GAAA,CAACmC,QAAQ,EAAAzE,aAAA,CAAA;AAAC0E,YAAAA,MAAM,EAAC,MAAM;AAACpB,YAAAA,MAAM,EAAC,WAAA;AAAW,WAAA,EAAKc,aAAa,CAAG,CAAA;SACpD,CAAA;OACN,CAAA;KACS,CAAA,CAAA;AAAC,GACY,CAAC,CAAA;AAExC,EAAC;AAED,IAAMO,iBAAiB,gBAAGC,wBAAwB,CAACtE,kBAAkB,EAAE;EACrEX,WAAW,EAAEkF,YAAY,CAACF,iBAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -21,7 +21,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
21
21
|
displayName: "CardRootweb__StyledCardRoot",
|
|
22
22
|
componentId: "sc-1nb70ck-0"
|
|
23
23
|
})(function (_ref) {
|
|
24
|
-
var
|
|
24
|
+
var as = _ref.as,
|
|
25
|
+
theme = _ref.theme,
|
|
25
26
|
isSelected = _ref.isSelected,
|
|
26
27
|
isFocused = _ref.isFocused,
|
|
27
28
|
shouldScaleOnHover = _ref.shouldScaleOnHover,
|
|
@@ -36,7 +37,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
36
37
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
37
38
|
transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),
|
|
38
39
|
transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),
|
|
39
|
-
transitionProperty: 'transform, box-shadow'
|
|
40
|
+
transitionProperty: 'transform, box-shadow',
|
|
41
|
+
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
40
42
|
}, isMobile && isPressed && {
|
|
41
43
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
42
44
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ as, theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","cursor","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CACpC,CAAA,CAAA,UAAAC,IAAA,EAAmF;AAAA,EAAA,IAAhFC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,QAAQ,GAAAP,IAAA,CAARO,QAAQ,CAAA;AAC1E,EAAA,IAAMC,aAAa,GAAGL,UAAU,GAAGD,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACC,MAAM,GAAG,aAAa,CAAA;AAC7F,EAAA,IAAMC,cAAc,GAAA,cAAA,CAAAC,MAAA,CAAkBb,KAAK,CAACS,MAAM,CAACK,KAAK,CAACC,OAAO,EAAA,KAAA,CAAA,CAAAF,MAAA,CAAMP,aAAa,CAAE,CAAA;AACrF;AACA,EAAA,IAAMU,SAAS,GAAGd,SAAS,wBAAAW,MAAA,CACFb,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAAC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0C,kBAAkB,GAAGmB,SAAAA;AAC/C,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAlB,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -160,7 +160,7 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
160
160
|
componentId: "sc-1fpz8hn-2"
|
|
161
161
|
})(function (_ref4) {
|
|
162
162
|
var theme = _ref4.theme,
|
|
163
|
-
rowDensity = _ref4
|
|
163
|
+
$rowDensity = _ref4.$rowDensity,
|
|
164
164
|
showStripedRows = _ref4.showStripedRows,
|
|
165
165
|
_ref4$hasPadding = _ref4.hasPadding,
|
|
166
166
|
hasPadding = _ref4$hasPadding === void 0 ? true : _ref4$hasPadding;
|
|
@@ -169,9 +169,9 @@ var CellWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
169
169
|
'&&&': _objectSpread({
|
|
170
170
|
transition: rowBackgroundTransition,
|
|
171
171
|
backgroundColor: tableRow.nonStripeWrapper.backgroundColor,
|
|
172
|
-
paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])) : '0px',
|
|
173
|
-
paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',
|
|
174
|
-
minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),
|
|
172
|
+
paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[$rowDensity])) : '0px',
|
|
173
|
+
paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[$rowDensity])) : '0px',
|
|
174
|
+
minHeight: makeSize(getIn(size, tableRow.minHeight[$rowDensity])),
|
|
175
175
|
height: '100%',
|
|
176
176
|
width: '100%'
|
|
177
177
|
}, !showStripedRows && {
|
|
@@ -204,7 +204,7 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
204
204
|
height: "100%",
|
|
205
205
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
206
206
|
className: "cell-wrapper",
|
|
207
|
-
rowDensity: rowDensity,
|
|
207
|
+
$rowDensity: rowDensity,
|
|
208
208
|
showStripedRows: showStripedRows,
|
|
209
209
|
display: "flex",
|
|
210
210
|
alignItems: "center",
|
|
@@ -212,9 +212,13 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
212
212
|
// when a direct string child is passed we want to disable pointer events
|
|
213
213
|
// for custom cells components, consumers can handle pointer events themselves
|
|
214
214
|
,
|
|
215
|
-
pointerEvents: isChildrenString && isSelectable ? 'none' : 'auto'
|
|
215
|
+
pointerEvents: isChildrenString && isSelectable ? 'none' : 'auto'
|
|
216
|
+
// allow text to wrap, so that if the <Text> overflows it can truncate
|
|
217
|
+
,
|
|
218
|
+
whiteSpace: "normal",
|
|
216
219
|
children: isChildrenString ? /*#__PURE__*/jsx(Text, {
|
|
217
220
|
size: "medium",
|
|
221
|
+
truncateAfterLines: 1,
|
|
218
222
|
children: children
|
|
219
223
|
}) : children
|
|
220
224
|
})
|
|
@@ -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 ? 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 {...makeAccessible({ selected: isSelected })}\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","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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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/BkB,cAAc,CAAC;AAAEC,IAAAA,QAAQ,EAAEX,UAAAA;GAAY,CAAC,CACxC3E,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACqF,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA/F,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,IAAM+F,QAAQ,gBAAGnF,wBAAwB,CAAC6D,SAAS,EAAE;EACnDzG,WAAW,EAAE6C,YAAY,CAACkF,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';\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}: 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 })}\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","_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,K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AA;AAEhB,CAAC,CAAA;AAED,IAAMkG,QAAQ,gBAAGtF,wBAAwB,CAACgE,SAAS,EAAE;EACnD5G,WAAW,EAAE6C,YAAY,CAACqF,QAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -31,13 +31,13 @@ var StyledEditableCell = /*#__PURE__*/styled(StyledCell).withConfig({
|
|
|
31
31
|
componentId: "cvczp8-0"
|
|
32
32
|
})(function (_ref) {
|
|
33
33
|
var theme = _ref.theme,
|
|
34
|
-
rowDensity = _ref
|
|
34
|
+
$rowDensity = _ref.$rowDensity;
|
|
35
35
|
return {
|
|
36
36
|
'&&&': {
|
|
37
37
|
'&:focus-visible': {
|
|
38
38
|
outline: '1px solid'
|
|
39
39
|
},
|
|
40
|
-
'&:focus-within': _objectSpread({}, rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
40
|
+
'&:focus-within': _objectSpread({}, $rowDensity !== 'comfortable' ? getFocusRingStyles({
|
|
41
41
|
theme: theme,
|
|
42
42
|
negativeOffset: true
|
|
43
43
|
}) : {})
|
|
@@ -85,7 +85,7 @@ var _TableEditableCell = function _TableEditableCell(_ref3) {
|
|
|
85
85
|
return /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
86
86
|
role: "cell",
|
|
87
87
|
$backgroundColor: backgroundColor,
|
|
88
|
-
rowDensity: rowDensity
|
|
88
|
+
$rowDensity: rowDensity
|
|
89
89
|
}, metaAttribute({
|
|
90
90
|
name: MetaConstants.TableCell
|
|
91
91
|
})), {}, {
|
|
@@ -96,7 +96,7 @@ var _TableEditableCell = function _TableEditableCell(_ref3) {
|
|
|
96
96
|
height: "100%",
|
|
97
97
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
98
98
|
className: "cell-wrapper",
|
|
99
|
-
rowDensity: rowDensity,
|
|
99
|
+
$rowDensity: rowDensity,
|
|
100
100
|
showStripedRows: showStripedRows,
|
|
101
101
|
display: "flex",
|
|
102
102
|
alignItems: "center",
|
|
@@ -159,7 +159,7 @@ var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps
|
|
|
159
159
|
children: /*#__PURE__*/jsx(StyledEditableCell, _objectSpread(_objectSpread({
|
|
160
160
|
role: "cell",
|
|
161
161
|
$backgroundColor: backgroundColor,
|
|
162
|
-
rowDensity: rowDensity
|
|
162
|
+
$rowDensity: rowDensity
|
|
163
163
|
}, metaAttribute({
|
|
164
164
|
name: MetaConstants.TableCell
|
|
165
165
|
})), {}, {
|
|
@@ -171,7 +171,7 @@ var TableEditableDropdownCell = function TableEditableDropdownCell(dropdownProps
|
|
|
171
171
|
width: "100%",
|
|
172
172
|
children: /*#__PURE__*/jsx(CellWrapper, {
|
|
173
173
|
className: "cell-wrapper",
|
|
174
|
-
rowDensity: rowDensity,
|
|
174
|
+
$rowDensity: rowDensity,
|
|
175
175
|
showStripedRows: showStripedRows,
|
|
176
176
|
display: "flex",
|
|
177
177
|
alignItems: "center",
|
|
@@ -1 +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,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU,CAAA;EAAA,OAAQ;AAC7B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,UAAU,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,EAALA,KAAK;AAAEK,QAAAA,cAAc,EAAE,IAAA;OAAM,CAAC,GAAG,EAAE,CAAA;AAE/F,KAAA;GACD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsB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ACnBG,UAAAA,IAAI,EAAE,CAAE;AACRC,UAAAA,UAAU,EAAE,KAAM;AAAAR,UAAAA,QAAA,eAElBN,GAAA,CAACmC,QAAQ,EAAAxE,aAAA,CAAA;AAACyE,YAAAA,MAAM,EAAC,MAAM;AAACpB,YAAAA,MAAM,EAAC,WAAA;AAAW,WAAA,EAAKc,aAAa,CAAG,CAAA;SACpD,CAAA;OACN,CAAA;KACS,CAAA,CAAA;AAAC,GACY,CAAC,CAAA;AAExC,EAAC;AAED,IAAMO,iBAAiB,gBAAGC,wBAAwB,CAACtE,kBAAkB,EAAE;EACrEV,WAAW,EAAEiF,YAAY,CAACF,iBAAAA;AAC5B,CAAC;;;;"}
|
|
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","rowDensity","_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,gBAAGC,MAAM,CAACC,UAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAE1C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW,CAAA;EAAA,OAAQ;AAC9B,IAAA,KAAK,EAAE;AACL,MAAA,iBAAiB,EAAE;AAAEC,QAAAA,OAAO,EAAE,WAAA;OAAa;MAC3C,gBAAgB,EAAAC,aAAA,CACVF,EAAAA,EAAAA,WAAW,KAAK,aAAa,GAAGG,kBAAkB,CAAC;AAAEJ,QAAAA,KAAK,EAALA,KAAK;AAAEK,QAAAA,cAAc,EAAE,IAAA;OAAM,CAAC,GAAG,EAAE,CAAA;AAEhG,KAAA;GACD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,KAAA,EAIC;AAAA,EAAA,IAH3BC,UAAU,GAAAD,KAAA,CAAVC,UAAU,CAAA;EAIV,IAAIA,UAAU,KAAK,aAAa,EAAE;AAChC,IAAA,OAAO,CAAC,WAAW,EAAE,W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