@razorpay/blade 12.32.2 → 12.32.3

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.
@@ -5,12 +5,17 @@ import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js';
5
5
  import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.native.js';
6
6
  import 'react-native';
7
7
  import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
8
+ import { useBreakpoint } from '../../../utils/useBreakpoint/useBreakpoint.js';
8
9
  import '@babel/runtime/helpers/slicedToArray';
9
- import '../../BladeProvider/useTheme.js';
10
+ import useTheme from '../../BladeProvider/useTheme.js';
10
11
  import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
12
+ import 'styled-components/native';
13
+ import '@gorhom/portal';
14
+ import 'react-native-gesture-handler';
15
+ import '../../BottomSheet/BottomSheetStack.js';
11
16
  import { jsx } from 'react/jsx-runtime';
12
17
 
13
- var _excluded=["children","labelledBy","position","accessibilityRole","componentName","testID"];var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.children,labelledBy=_ref.labelledBy,position=_ref.position,_ref$accessibilityRol=_ref.accessibilityRole,accessibilityRole=_ref$accessibilityRol===void 0?'group':_ref$accessibilityRol,componentName=_ref.componentName,testID=_ref.testID,props=_objectWithoutProperties(_ref,_excluded);var isReactNative=getPlatformType()==='react-native';var labelPosition=position==='top'?'column':'row';if(isReactNative)labelPosition='column';var role=accessibilityRole==='group'&&isReactNative?undefined:accessibilityRole;return jsx(BaseBox,Object.assign({display:"flex",flexDirection:labelPosition},makeAccessible({role:role,labelledBy:labelledBy}),metaAttribute({name:componentName,testID:testID}),makeAnalyticsAttribute(props),{children:children}));};
18
+ var _excluded=["children","labelledBy","position","accessibilityRole","componentName","testID"];var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.children,labelledBy=_ref.labelledBy,position=_ref.position,_ref$accessibilityRol=_ref.accessibilityRole,accessibilityRole=_ref$accessibilityRol===void 0?'group':_ref$accessibilityRol,componentName=_ref.componentName,testID=_ref.testID,props=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isReactNative=getPlatformType()==='react-native';var isLabelLeftPositioned=position==='left'&&matchedDeviceType==='desktop';if(isReactNative)isLabelLeftPositioned=false;var role=accessibilityRole==='group'&&isReactNative?undefined:accessibilityRole;return jsx(BaseBox,Object.assign({display:"flex",flexDirection:isLabelLeftPositioned?'row':'column'},makeAccessible({role:role,labelledBy:labelledBy}),metaAttribute({name:componentName,testID:testID}),makeAnalyticsAttribute(props),{children:children}));};
14
19
 
15
20
  export { SelectorGroupField };
16
21
  //# sourceMappingURL=SelectorGroupField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n let labelPosition: CSSObject['flexDirection'] = position === 'top' ? 'column' : 'row';\n if (isReactNative) labelPosition = 'column';\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={labelPosition}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","isReactNative","getPlatformType","labelPosition","role","undefined","_jsx","BaseBox","Object","assign","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;gGAmBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAQ2B,CAAA,IAPjDC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CACVC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAAC,qBAAA,CAAAJ,IAAA,CACRK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,OAAO,CAAAA,qBAAA,CAC3BE,aAAa,CAAAN,IAAA,CAAbM,aAAa,CACbC,MAAM,CAAAP,IAAA,CAANO,MAAM,CACHC,KAAK,CAAAC,wBAAA,CAAAT,IAAA,CAAAU,SAAA,CAER,CAAA,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAIC,aAAyC,CAAGV,QAAQ,GAAK,KAAK,CAAG,QAAQ,CAAG,KAAK,CACrF,GAAIQ,aAAa,CAAEE,aAAa,CAAG,QAAQ,CAC3C,IAAMC,IAAI,CAAGT,iBAAiB,GAAK,OAAO,EAAIM,aAAa,CAAGI,SAAS,CAAGV,iBAAiB,CAE3F,OACEW,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNC,CAAAA,OAAO,CAAC,MAAM,CACdC,aAAa,CAAER,aAAc,EACzBS,cAAc,CAAC,CACjBR,IAAI,CAAJA,IAAI,CACJZ,UAAU,CAAVA,UACF,CAAC,CAAC,CACEqB,aAAa,CAAC,CAAEC,IAAI,CAAElB,aAAa,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAC9CkB,sBAAsB,CAACjB,KAAK,CAAC,CAAAP,CAAAA,QAAA,CAEhCA,QAAQ,CAAA,CACF,CAAC,CAEd;;;;"}
1
+ {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType, useBreakpoint } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isReactNative = getPlatformType() === 'react-native';\n\n let isLabelLeftPositioned = position === 'left' && matchedDeviceType === 'desktop';\n if (isReactNative) isLabelLeftPositioned = false;\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isReactNative","getPlatformType","isLabelLeftPositioned","role","undefined","_jsx","BaseBox","Object","assign","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;;;;;;gGAmBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAQ2B,CAAA,IAPjDC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CACVC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAAC,qBAAA,CAAAJ,IAAA,CACRK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAA,KAAA,CAAA,CAAG,OAAO,CAAAA,qBAAA,CAC3BE,aAAa,CAAAN,IAAA,CAAbM,aAAa,CACbC,MAAM,CAAAP,IAAA,CAANO,MAAM,CACHC,KAAK,CAAAC,wBAAA,CAAAT,IAAA,CAAAU,SAAA,CAAA,CAER,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAAC,cAAA,CAA8BC,aAAa,CAAC,CAAEC,WAAW,CAAEH,KAAK,CAACG,WAAY,CAAC,CAAC,CAAvEC,iBAAiB,CAAAH,cAAA,CAAjBG,iBAAiB,CACzB,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAE1D,IAAIC,qBAAqB,CAAGjB,QAAQ,GAAK,MAAM,EAAIc,iBAAiB,GAAK,SAAS,CAClF,GAAIC,aAAa,CAAEE,qBAAqB,CAAG,KAAK,CAChD,IAAMC,IAAI,CAAGhB,iBAAiB,GAAK,OAAO,EAAIa,aAAa,CAAGI,SAAS,CAAGjB,iBAAiB,CAE3F,OACEkB,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNC,CAAAA,OAAO,CAAC,MAAM,CACdC,aAAa,CAAER,qBAAqB,CAAG,KAAK,CAAG,QAAS,CAAA,CACpDS,cAAc,CAAC,CACjBR,IAAI,CAAJA,IAAI,CACJnB,UAAU,CAAVA,UACF,CAAC,CAAC,CACE4B,aAAa,CAAC,CAAEC,IAAI,CAAEzB,aAAa,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAC9CyB,sBAAsB,CAACxB,KAAK,CAAC,CAAAP,CAAAA,QAAA,CAEhCA,QAAQ,CACF,CAAA,CAAC,CAEd;;;;"}
@@ -6,7 +6,10 @@ import '../../Box/BaseBox/index.js';
6
6
  import '../../../utils/makeAccessible/index.js';
7
7
  import '../../../utils/index.js';
8
8
  import '../../../utils/makeAnalyticsAttribute/index.js';
9
+ import '../../BladeProvider/index.js';
9
10
  import { jsx } from 'react/jsx-runtime';
11
+ import useTheme from '../../BladeProvider/useTheme.js';
12
+ import { useBreakpoint } from '../../../utils/useBreakpoint/useBreakpoint.js';
10
13
  import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
11
14
  import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
12
15
  import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
@@ -25,13 +28,19 @@ var SelectorGroupField = function SelectorGroupField(_ref) {
25
28
  componentName = _ref.componentName,
26
29
  testID = _ref.testID,
27
30
  props = _objectWithoutProperties(_ref, _excluded);
31
+ var _useTheme = useTheme(),
32
+ theme = _useTheme.theme;
33
+ var _useBreakpoint = useBreakpoint({
34
+ breakpoints: theme.breakpoints
35
+ }),
36
+ matchedDeviceType = _useBreakpoint.matchedDeviceType;
28
37
  var isReactNative = getPlatformType() === 'react-native';
29
- var labelPosition = position === 'top' ? 'column' : 'row';
30
- if (isReactNative) labelPosition = 'column';
38
+ var isLabelLeftPositioned = position === 'left' && matchedDeviceType === 'desktop';
39
+ if (isReactNative) isLabelLeftPositioned = false;
31
40
  var role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;
32
41
  return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
33
42
  display: "flex",
34
- flexDirection: labelPosition
43
+ flexDirection: isLabelLeftPositioned ? 'row' : 'column'
35
44
  }, makeAccessible({
36
45
  role: role,
37
46
  labelledBy: labelledBy
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n let labelPosition: CSSObject['flexDirection'] = position === 'top' ? 'column' : 'row';\n if (isReactNative) labelPosition = 'column';\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={labelPosition}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","isReactNative","getPlatformType","labelPosition","role","undefined","_jsx","BaseBox","_objectSpread","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQ2B;AAAA,EAAA,IAPjDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IACVC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,qBAAA,GAAAJ,IAAA,CACRK,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA;IAC3BE,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,MAAM,GAAAP,IAAA,CAANO,MAAM;AACHC,IAAAA,KAAK,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAER,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;EAC1D,IAAIC,aAAyC,GAAGV,QAAQ,KAAK,KAAK,GAAG,QAAQ,GAAG,KAAK,CAAA;AACrF,EAAA,IAAIQ,aAAa,EAAEE,aAAa,GAAG,QAAQ,CAAA;EAC3C,IAAMC,IAAI,GAAGT,iBAAiB,KAAK,OAAO,IAAIM,aAAa,GAAGI,SAAS,GAAGV,iBAAiB,CAAA;EAE3F,oBACEW,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACNC,IAAAA,OAAO,EAAC,MAAM;AACdC,IAAAA,aAAa,EAAEP,aAAAA;AAAc,GAAA,EACzBQ,cAAc,CAAC;AACjBP,IAAAA,IAAI,EAAJA,IAAI;AACJZ,IAAAA,UAAU,EAAVA,UAAAA;GACD,CAAC,CACEoB,EAAAA,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAEjB,aAAa;AAAEC,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAC9CiB,sBAAsB,CAAChB,KAAK,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAP,IAAAA,QAAA,EAEhCA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType, useBreakpoint } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isReactNative = getPlatformType() === 'react-native';\n\n let isLabelLeftPositioned = position === 'left' && matchedDeviceType === 'desktop';\n if (isReactNative) isLabelLeftPositioned = false;\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isReactNative","getPlatformType","isLabelLeftPositioned","role","undefined","_jsx","BaseBox","_objectSpread","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQ2B;AAAA,EAAA,IAPjDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IACVC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,qBAAA,GAAAJ,IAAA,CACRK,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA;IAC3BE,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,MAAM,GAAAP,IAAA,CAANO,MAAM;AACHC,IAAAA,KAAK,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAER,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,IAAAC,cAAA,GAA8BC,aAAa,CAAC;MAAEC,WAAW,EAAEH,KAAK,CAACG,WAAAA;AAAY,KAAC,CAAC;IAAvEC,iBAAiB,GAAAH,cAAA,CAAjBG,iBAAiB,CAAA;AACzB,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;EAE1D,IAAIC,qBAAqB,GAAGjB,QAAQ,KAAK,MAAM,IAAIc,iBAAiB,KAAK,SAAS,CAAA;AAClF,EAAA,IAAIC,aAAa,EAAEE,qBAAqB,GAAG,KAAK,CAAA;EAChD,IAAMC,IAAI,GAAGhB,iBAAiB,KAAK,OAAO,IAAIa,aAAa,GAAGI,SAAS,GAAGjB,iBAAiB,CAAA;EAE3F,oBACEkB,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACNC,IAAAA,OAAO,EAAC,MAAM;AACdC,IAAAA,aAAa,EAAEP,qBAAqB,GAAG,KAAK,GAAG,QAAA;AAAS,GAAA,EACpDQ,cAAc,CAAC;AACjBP,IAAAA,IAAI,EAAJA,IAAI;AACJnB,IAAAA,UAAU,EAAVA,UAAAA;GACD,CAAC,CACE2B,EAAAA,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAExB,aAAa;AAAEC,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAC9CwB,sBAAsB,CAACvB,KAAK,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAP,IAAAA,QAAA,EAEhCA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd;;;;"}
@@ -22,7 +22,7 @@ var getTableBodyStyles = function getTableBodyStyles(_ref3) {
22
22
  width = _ref3.width,
23
23
  isSelectable = _ref3.isSelectable,
24
24
  showStripedRows = _ref3.showStripedRows;
25
- var shouldAddCommonStyle = isVirtualized !== null && isVirtualized !== void 0 ? isVirtualized : addCommonStyles;
25
+ var shouldAddCommonStyle = Boolean(isVirtualized) || addCommonStyles;
26
26
  return _objectSpread(_objectSpread({}, isVirtualized && {
27
27
  '& > div ': {
28
28
  overflow: 'auto !important',
@@ -1 +1 @@
1
- {"version":3,"file":"tableBodyStyles.js","sources":["../../../../../../../src/components/Table/commonStyles/tableBodyStyles.tsx"],"sourcesContent":["import { tableRow } from '../tokens';\nimport { getTableActionsHoverStyles } from '../utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\n\nconst getRowWrapperSelector = ({ isVirtualized }: { isVirtualized?: boolean }): string => {\n return isVirtualized ? 'tbody div' : '&';\n};\n\nconst addTableRowSelectorIFVirtualized = ({\n isVirtualized,\n}: {\n isVirtualized?: boolean;\n}): string => {\n return isVirtualized ? 'tr' : '';\n};\n\nconst getTableBodyStyles = ({\n isVirtualized,\n addCommonStyles,\n theme,\n height,\n width,\n isSelectable,\n showStripedRows,\n}: {\n isVirtualized?: boolean;\n addCommonStyles?: boolean;\n theme: Theme;\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isSelectable?: boolean;\n showStripedRows?: boolean;\n}): Record<string, unknown> => {\n const shouldAddCommonStyle = isVirtualized ?? addCommonStyles;\n return {\n ...(isVirtualized && {\n '& > div ': {\n overflow: 'auto !important',\n height: `${height} !important`,\n width: `${width} !important`,\n },\n // and remove scroll from the main table element\n '&': {\n overflow: 'hidden !important',\n },\n // for virtualized table, we need to apply some styles to tbody\n 'tbody > div': {\n display: 'block !important',\n },\n 'tbody div tr': {\n display: 'grid',\n gridTemplateColumns: 'var(--data-table-library_grid-template-columns)',\n columnGap: '0',\n },\n 'tbody div tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n 'tbody div td': {\n padding: '0',\n },\n }),\n // these styles are common for both virtualized and non-virtualized tables\n ...(shouldAddCommonStyle && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n\n ...(isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...(showStripedRows && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper-base`]: {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...(showStripedRows &&\n isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorActive,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n theme,\n }),\n },\n\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelected,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedActive,\n theme,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n }),\n },\n }),\n }),\n };\n};\nexport { getTableBodyStyles };\n"],"names":["getRowWrapperSelector","_ref","isVirtualized","addTableRowSelectorIFVirtualized","_ref2","getTableBodyStyles","_ref3","_ref6","addCommonStyles","theme","height","width","isSelectable","showStripedRows","shouldAddCommonStyle","_objectSpread","overflow","concat","display","gridTemplateColumns","columnGap","borderBottom","padding","_defineProperty","backgroundColor","getIn","colors","tableRow","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","getTableActionsHoverStyles","hoverColor","backgroundGradientColor","nonStripeWrapper","backgroundColorSelectedFocus","backgroundColorSelectedActive","backgroundColorHover","backgroundColorActive","stripeWrapper","stripe","backgroundColorFocus"],"mappings":";;;;;;;AAMA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,aAAa,GAAAD,IAAA,CAAbC,aAAa,CAAA;AAC5C,EAAA,OAAOA,aAAa,GAAG,WAAW,GAAG,GAAG,CAAA;AAC1C,CAAC,CAAA;AAED,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAAC,KAAA,EAIxB;AAAA,EAAA,IAHZF,aAAa,GAAAE,KAAA,CAAbF,aAAa,CAAA;AAIb,EAAA,OAAOA,aAAa,GAA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AC,CAAC,CAAA,CAAA,EAAA,EAAA,CAAAlB,MAAA,CAEAjB,qBAAqB,CAAC;AACxBE,IAAAA,aAAa,EAAbA,aAAAA;AACF,GAAC,CAAC,EAAA,IAAA,CAAA,CAAAe,MAAA,CAAKd,gCAAgC,CAAC;AACtCD,IAAAA,aAAa,EAAbA,aAAAA;GACD,CAAC,mLAAAa,aAAA,CAAA;IACAS,eAAe,EAAEC,KAAK,CAAChB,KAAK,CAACiB,MAAM,EAAEC,QAAQ,CAACa,MAAM,CAACJ,6BAA6B,CAAA;AAAC,GAAA,EAChFL,0BAA0B,CAAC;AAC5BC,IAAAA,UAAU,EAAEL,QAAQ,CAACa,MAAM,CAACJ,6BAA6B;AACzD3B,IAAAA,KAAK,EAALA,KAAK;AACLwB,IAAAA,uBAAuB,EAAEN,QAAQ,CAACa,MAAM,CAACH,oBAAAA;GAC1C,CAAC,GAEL,CACJ,CAAA,CAAA;AAEL;;;;"}
1
+ {"version":3,"file":"tableBodyStyles.js","sources":["../../../../../../../src/components/Table/commonStyles/tableBodyStyles.tsx"],"sourcesContent":["import { tableRow } from '../tokens';\nimport { getTableActionsHoverStyles } from '../utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\n\nconst getRowWrapperSelector = ({ isVirtualized }: { isVirtualized?: boolean }): string => {\n return isVirtualized ? 'tbody div' : '&';\n};\n\nconst addTableRowSelectorIFVirtualized = ({\n isVirtualized,\n}: {\n isVirtualized?: boolean;\n}): string => {\n return isVirtualized ? 'tr' : '';\n};\n\nconst getTableBodyStyles = ({\n isVirtualized,\n addCommonStyles,\n theme,\n height,\n width,\n isSelectable,\n showStripedRows,\n}: {\n isVirtualized?: boolean;\n addCommonStyles?: boolean;\n theme: Theme;\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isSelectable?: boolean;\n showStripedRows?: boolean;\n}): Record<string, unknown> => {\n const shouldAddCommonStyle = Boolean(isVirtualized) || addCommonStyles;\n\n return {\n ...(isVirtualized && {\n '& > div ': {\n overflow: 'auto !important',\n height: `${height} !important`,\n width: `${width} !important`,\n },\n // and remove scroll from the main table element\n '&': {\n overflow: 'hidden !important',\n },\n // for virtualized table, we need to apply some styles to tbody\n 'tbody > div': {\n display: 'block !important',\n },\n 'tbody div tr': {\n display: 'grid',\n gridTemplateColumns: 'var(--data-table-library_grid-template-columns)',\n columnGap: '0',\n },\n 'tbody div tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n 'tbody div td': {\n padding: '0',\n },\n }),\n // these styles are common for both virtualized and non-virtualized tables\n ...(shouldAddCommonStyle && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n\n ...(isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...(showStripedRows && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper-base`]: {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...(showStripedRows &&\n isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorActive,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n theme,\n }),\n },\n\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelected,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedActive,\n theme,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n }),\n },\n }),\n }),\n };\n};\nexport { getTableBodyStyles };\n"],"names":["getRowWrapperSelector","_ref","isVirtualized","addTableRowSelectorIFVirtualized","_ref2","getTableBodyStyles","_ref3","_ref6","addCommonStyles","theme","height","width","isSelectable","showStripedRows","shouldAddCommonStyle","Boolean","_objectSpread","overflow","concat","display","gridTemplateColumns","columnGap","borderBottom","padding","_defineProperty","backgroundColor","getIn","colors","tableRow","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","getTableActionsHoverStyles","hoverColor","backgroundGradientColor","nonStripeWrapper","backgroundColorSelectedFocus","backgroundColorSelectedActive","backgroundColorHover","backgroundColorActive","stripeWrapper","stripe","backgroundColorFocus"],"mappings":";;;;;;;AAMA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,aAAa,GAAAD,IAAA,CAAbC,aAAa,CAAA;AAC5C,EAAA,OAAOA,aAAa,GAAG,WAAW,GAAG,GAAG,CAAA;AAC1C,CAAC,CAAA;AAED,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAAC,KAAA,EAIxB;AAAA,EAAA,IAHZF,aAAa,GAAAE,KAAA,CAAbF,aAAa,CAAA;AAIb,EAAA,OAAOA,aAAa,GAAG,IAAI,GAAG,EAAE,CAAA;AAClC,CAAC,CAAA;AAED,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,KAAA,EAgBO;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IAf7BL,aAAa,GAAAI,KAAA,CAAbJ,aAAa;IACbM,eAAe,GAAAF,KAAA,CAAfE,eAAe;IACfC,KAAK,GAAAH,KAAA,CAALG,KAAK;IACLC,MAAM,GAAAJ,KAAA,CAANI,MAAM;IACNC,KAAK,GAAAL,KAAA,CAALK,KAAK;IACLC,YAAY,GAAAN,KAAA,CAAZM,YAAY;IACZC,eAAe,GAAAP,KAAA,CAAfO,eAAe,CAAA;AAUf,EAAA,IAAMC,oBAAoB,GAAGC,OA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AEN,QAAQ,CAACa,MAAM,CAACH,oBAAAA;GAC1C,CAAC,GAEL,CACJ,CAAA,CAAA;AAEL;;;;"}
@@ -6,7 +6,10 @@ import '../../Box/BaseBox/index.js';
6
6
  import '../../../utils/makeAccessible/index.js';
7
7
  import '../../../utils/index.js';
8
8
  import '../../../utils/makeAnalyticsAttribute/index.js';
9
+ import '../../BladeProvider/index.js';
9
10
  import { jsx } from 'react/jsx-runtime';
11
+ import useTheme from '../../BladeProvider/useTheme.js';
12
+ import { useBreakpoint } from '../../../utils/useBreakpoint/useBreakpoint.js';
10
13
  import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
11
14
  import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
12
15
  import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
@@ -25,13 +28,19 @@ var SelectorGroupField = function SelectorGroupField(_ref) {
25
28
  componentName = _ref.componentName,
26
29
  testID = _ref.testID,
27
30
  props = _objectWithoutProperties(_ref, _excluded);
31
+ var _useTheme = useTheme(),
32
+ theme = _useTheme.theme;
33
+ var _useBreakpoint = useBreakpoint({
34
+ breakpoints: theme.breakpoints
35
+ }),
36
+ matchedDeviceType = _useBreakpoint.matchedDeviceType;
28
37
  var isReactNative = getPlatformType() === 'react-native';
29
- var labelPosition = position === 'top' ? 'column' : 'row';
30
- if (isReactNative) labelPosition = 'column';
38
+ var isLabelLeftPositioned = position === 'left' && matchedDeviceType === 'desktop';
39
+ if (isReactNative) isLabelLeftPositioned = false;
31
40
  var role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;
32
41
  return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
33
42
  display: "flex",
34
- flexDirection: labelPosition
43
+ flexDirection: isLabelLeftPositioned ? 'row' : 'column'
35
44
  }, makeAccessible({
36
45
  role: role,
37
46
  labelledBy: labelledBy
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n let labelPosition: CSSObject['flexDirection'] = position === 'top' ? 'column' : 'row';\n if (isReactNative) labelPosition = 'column';\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={labelPosition}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","isReactNative","getPlatformType","labelPosition","role","undefined","_jsx","BaseBox","_objectSpread","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQ2B;AAAA,EAAA,IAPjDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,UAAU,GAAAF,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],"sourcesContent":["import React from 'react';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType, useBreakpoint } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isReactNative = getPlatformType() === 'react-native';\n\n let isLabelLeftPositioned = position === 'left' && matchedDeviceType === 'desktop';\n if (isReactNative) isLabelLeftPositioned = false;\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isReactNative","getPlatformType","isLabelLeftPositioned","role","undefined","_jsx","BaseBox","_objectSpread","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAm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ACjBP,IAAAA,IAAI,EAAJA,IAAI;AACJnB,IAAAA,UAAU,EAAVA,UAAAA;GACD,CAAC,CACE2B,EAAAA,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAExB,aAAa;AAAEC,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAC9CwB,sBAAsB,CAACvB,KAAK,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAP,IAAAA,QAAA,EAEhCA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd;;;;"}
@@ -22,7 +22,7 @@ var getTableBodyStyles = function getTableBodyStyles(_ref3) {
22
22
  width = _ref3.width,
23
23
  isSelectable = _ref3.isSelectable,
24
24
  showStripedRows = _ref3.showStripedRows;
25
- var shouldAddCommonStyle = isVirtualized !== null && isVirtualized !== void 0 ? isVirtualized : addCommonStyles;
25
+ var shouldAddCommonStyle = Boolean(isVirtualized) || addCommonStyles;
26
26
  return _objectSpread(_objectSpread({}, isVirtualized && {
27
27
  '& > div ': {
28
28
  overflow: 'auto !important',
@@ -1 +1 @@
1
- {"version":3,"file":"tableBodyStyles.js","sources":["../../../../../../../src/components/Table/commonStyles/tableBodyStyles.tsx"],"sourcesContent":["import { tableRow } from '../tokens';\nimport { getTableActionsHoverStyles } from '../utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\n\nconst getRowWrapperSelector = ({ isVirtualized }: { isVirtualized?: boolean }): string => {\n return isVirtualized ? 'tbody div' : '&';\n};\n\nconst addTableRowSelectorIFVirtualized = ({\n isVirtualized,\n}: {\n isVirtualized?: boolean;\n}): string => {\n return isVirtualized ? 'tr' : '';\n};\n\nconst getTableBodyStyles = ({\n isVirtualized,\n addCommonStyles,\n theme,\n height,\n width,\n isSelectable,\n showStripedRows,\n}: {\n isVirtualized?: boolean;\n addCommonStyles?: boolean;\n theme: Theme;\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isSelectable?: boolean;\n showStripedRows?: boolean;\n}): Record<string, unknown> => {\n const shouldAddCommonStyle = isVirtualized ?? addCommonStyles;\n return {\n ...(isVirtualized && {\n '& > div ': {\n overflow: 'auto !important',\n height: `${height} !important`,\n width: `${width} !important`,\n },\n // and remove scroll from the main table element\n '&': {\n overflow: 'hidden !important',\n },\n // for virtualized table, we need to apply some styles to tbody\n 'tbody > div': {\n display: 'block !important',\n },\n 'tbody div tr': {\n display: 'grid',\n gridTemplateColumns: 'var(--data-table-library_grid-template-columns)',\n columnGap: '0',\n },\n 'tbody div tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n 'tbody div td': {\n padding: '0',\n },\n }),\n // these styles are common for both virtualized and non-virtualized tables\n ...(shouldAddCommonStyle && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n\n ...(isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...(showStripedRows && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper-base`]: {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...(showStripedRows &&\n isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorActive,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n theme,\n }),\n },\n\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelected,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedActive,\n theme,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n }),\n },\n }),\n }),\n };\n};\nexport { getTableBodyStyles };\n"],"names":["getRowWrapperSelector","_ref","isVirtualized","addTableRowSelectorIFVirtualized","_ref2","getTableBodyStyles","_ref3","_ref6","addCommonStyles","theme","height","width","isSelectable","showStripedRows","shouldAddCommonStyle","_objectSpread","overflow","concat","display","gridTemplateColumns","columnGap","borderBottom","padding","_defineProperty","backgroundColor","getIn","colors","tableRow","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","getTableActionsHoverStyles","hoverColor","backgroundGradientColor","nonStripeWrapper","backgroundColorSelectedFocus","backgroundColorSelectedActive","backgroundColorHover","backgroundColorActive","stripeWrapper","stripe","backgroundColorFocus"],"mappings":";;;;;;;AAMA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,aAAa,GAAAD,IAAA,CAAbC,aAAa,CAAA;AAC5C,EAAA,OAAOA,aAAa,GAAG,WAAW,GAAG,GAAG,CAAA;AAC1C,CAAC,CAAA;AAED,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAAC,KAAA,EAIxB;AAAA,EAAA,IAHZF,aAAa,GAAAE,KAAA,CAAbF,aAAa,CAAA;AAIb,EAAA,OAAOA,aAAa,GAAG,IAAI,GAAG,EAAE,CAAA;AAClC,CAAC,CAAA;AAED,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,KAAA,EAgBO;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IAf7BL,aAAa,GAAAI,KAAA,CAAbJ,aAAa;IACbM,eAAe,GAAAF,KAAA,CAAfE,eAAe;IACfC,KAAK,GAAAH,KAAA,CAALG,KAAK;IACLC,MAAM,GAAAJ,KAAA,CAANI,MAAM;IACNC,KAAK,GAAAL,KAAA,CAALK,KAAK;IACLC,YAAY,GAAAN,KAAA,CAAZM,YAAY;IACZC,eAAe,GA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AAEL,QAAQ,CAACa,MAAM,CAACJ,6BAA6B;AACzD3B,IAAAA,KAAK,EAALA,KAAK;AACLwB,IAAAA,uBAAuB,EAAEN,QAAQ,CAACa,MAAM,CAACH,oBAAAA;GAC1C,CAAC,GAEL,CACJ,CAAA,CAAA;AAEL;;;;"}
1
+ {"version":3,"file":"tableBodyStyles.js","sources":["../../../../../../../src/components/Table/commonStyles/tableBodyStyles.tsx"],"sourcesContent":["import { tableRow } from '../tokens';\nimport { getTableActionsHoverStyles } from '../utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\n\nconst getRowWrapperSelector = ({ isVirtualized }: { isVirtualized?: boolean }): string => {\n return isVirtualized ? 'tbody div' : '&';\n};\n\nconst addTableRowSelectorIFVirtualized = ({\n isVirtualized,\n}: {\n isVirtualized?: boolean;\n}): string => {\n return isVirtualized ? 'tr' : '';\n};\n\nconst getTableBodyStyles = ({\n isVirtualized,\n addCommonStyles,\n theme,\n height,\n width,\n isSelectable,\n showStripedRows,\n}: {\n isVirtualized?: boolean;\n addCommonStyles?: boolean;\n theme: Theme;\n height?: BoxProps['height'];\n width?: BoxProps['width'];\n isSelectable?: boolean;\n showStripedRows?: boolean;\n}): Record<string, unknown> => {\n const shouldAddCommonStyle = Boolean(isVirtualized) || addCommonStyles;\n\n return {\n ...(isVirtualized && {\n '& > div ': {\n overflow: 'auto !important',\n height: `${height} !important`,\n width: `${width} !important`,\n },\n // and remove scroll from the main table element\n '&': {\n overflow: 'hidden !important',\n },\n // for virtualized table, we need to apply some styles to tbody\n 'tbody > div': {\n display: 'block !important',\n },\n 'tbody div tr': {\n display: 'grid',\n gridTemplateColumns: 'var(--data-table-library_grid-template-columns)',\n columnGap: '0',\n },\n 'tbody div tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n 'tbody div td': {\n padding: '0',\n },\n }),\n // these styles are common for both virtualized and non-virtualized tables\n ...(shouldAddCommonStyle && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedHover,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedHover,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedFocus,\n backgroundGradientColor: tableRow.nonStripeWrapper.backgroundColorSelectedFocus,\n theme,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.nonStripe.backgroundColorSelectedActive,\n backgroundGradientColor: tableRow.nonStripe.backgroundColorHover,\n theme,\n }),\n },\n\n ...(isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...(showStripedRows && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even) .cell-wrapper-base`]: {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...(showStripedRows &&\n isSelectable && {\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\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 [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base`]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorActive,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n theme,\n }),\n },\n\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelected,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelected,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedHover,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedHover,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })} .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedFocus,\n theme,\n backgroundGradientColor: tableRow.stripeWrapper.backgroundColorSelectedFocus,\n }),\n },\n [`${getRowWrapperSelector({\n isVirtualized,\n })} ${addTableRowSelectorIFVirtualized({\n isVirtualized,\n })}.row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base `]: {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n ...getTableActionsHoverStyles({\n hoverColor: tableRow.stripe.backgroundColorSelectedActive,\n theme,\n backgroundGradientColor: tableRow.stripe.backgroundColorHover,\n }),\n },\n }),\n }),\n };\n};\nexport { getTableBodyStyles };\n"],"names":["getRowWrapperSelector","_ref","isVirtualized","addTableRowSelectorIFVirtualized","_ref2","getTableBodyStyles","_ref3","_ref6","addCommonStyles","theme","height","width","isSelectable","showStripedRows","shouldAddCommonStyle","Boolean","_objectSpread","overflow","concat","display","gridTemplateColumns","columnGap","borderBottom","padding","_defineProperty","backgroundColor","getIn","colors","tableRow","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","getTableActionsHoverStyles","hoverColor","backgroundGradientColor","nonStripeWrapper","backgroundColorSelectedFocus","backgroundColorSelectedActive","backgroundColorHover","backgroundColorActive","stripeWrapper","stripe","backgroundColorFocus"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ACD,CAAC,kLAAAc,aAAA,CAAA;IACAS,eAAe,EAAEC,KAAK,CAACjB,KAAK,CAACkB,MAAM,EAAEC,QAAQ,CAACa,MAAM,CAACL,4BAA4B,CAAA;AAAC,GAAA,EAC/EJ,0BAA0B,CAAC;AAC5BC,IAAAA,UAAU,EAAEL,QAAQ,CAACa,MAAM,CAACL,4BAA4B;AACxD3B,IAAAA,KAAK,EAALA,KAAK;AACLyB,IAAAA,uBAAuB,EAAEN,QAAQ,CAACY,aAAa,CAACJ,4BAAAA;AAClD,GAAC,CAAC,CAAA,CAAA,EAAA,EAAA,CAAAlB,MAAA,CAEAlB,qBAAqB,CAAC;AACxBE,IAAAA,aAAa,EAAbA,aAAAA;AACF,GAAC,CAAC,EAAA,IAAA,CAAA,CAAAgB,MAAA,CAAKf,gCAAgC,CAAC;AACtCD,IAAAA,aAAa,EAAbA,aAAAA;GACD,CAAC,mLAAAc,aAAA,CAAA;IACAS,eAAe,EAAEC,KAAK,CAACjB,KAAK,CAACkB,MAAM,EAAEC,QAAQ,CAACa,MAAM,CAACJ,6BAA6B,CAAA;AAAC,GAAA,EAChFL,0BAA0B,CAAC;AAC5BC,IAAAA,UAAU,EAAEL,QAAQ,CAACa,MAAM,CAACJ,6BAA6B;AACzD5B,IAAAA,KAAK,EAALA,KAAK;AACLyB,IAAAA,uBAAuB,EAAEN,QAAQ,CAACa,MAAM,CAACH,oBAAAA;GAC1C,CAAC,GAEL,CACJ,CAAA,CAAA;AAEL;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@razorpay/blade",
3
3
  "description": "The Design System that powers Razorpay",
4
- "version": "12.32.2",
4
+ "version": "12.32.3",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=18.12.1"
@@ -116,7 +116,7 @@
116
116
  "react:storybook:serve:test": "wait-on http://127.0.0.1:9009/ && yarn test:react:interaction",
117
117
  "test:react:interaction": "cross-env FRAMEWORK=REACT test-storybook -c ./.storybook/react --url http://127.0.0.1:9009/",
118
118
  "test:react:interaction:ci": "yarn react:storybook:build && run-p react:storybook:serve react:storybook:serve:test --race",
119
- "test:react": "cross-env FRAMEWORK=REACT jest -c ./jest.web.config.js --shard=$SHARD --forceExit",
119
+ "test:react": "cross-env FRAMEWORK=REACT jest -c ./jest.web.config.js --shard=$SHARD --coverage --forceExit",
120
120
  "test:react-native": "cross-env FRAMEWORK=REACT_NATIVE jest -c ./jest.native.config.js --shard=$SHARD --forceExit",
121
121
  "start:ios": "cross-env NODE_OPTIONS=--openssl-legacy-provider run-p react-native:storybook:start react-native:storybook:ios",
122
122
  "start:android": "cross-env NODE_OPTIONS=--openssl-legacy-provider run-p react-native:storybook:start react-native:storybook:android",