@razorpay/blade 11.28.0 → 11.28.2

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.
Files changed (26) hide show
  1. package/build/lib/native/components/Form/FormHint.js +2 -1
  2. package/build/lib/native/components/Form/FormHint.js.map +1 -1
  3. package/build/lib/native/components/Table/tokens.js.map +1 -1
  4. package/build/lib/web/development/components/Form/FormHint.js +19 -15
  5. package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
  6. package/build/lib/web/development/components/Form/FormHintWrapper.web.js +2 -4
  7. package/build/lib/web/development/components/Form/FormHintWrapper.web.js.map +1 -1
  8. package/build/lib/web/development/components/StepGroup/StepItem.web.js +11 -6
  9. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  10. package/build/lib/web/development/components/Table/Table.web.js +5 -5
  11. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  12. package/build/lib/web/development/components/Table/tokens.js +2 -2
  13. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  14. package/build/lib/web/production/components/Form/FormHint.js +19 -15
  15. package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
  16. package/build/lib/web/production/components/Form/FormHintWrapper.web.js +2 -4
  17. package/build/lib/web/production/components/Form/FormHintWrapper.web.js.map +1 -1
  18. package/build/lib/web/production/components/StepGroup/StepItem.web.js +11 -6
  19. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  20. package/build/lib/web/production/components/Table/Table.web.js +5 -5
  21. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  22. package/build/lib/web/production/components/Table/tokens.js +2 -2
  23. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  24. package/build/types/components/index.d.ts +5 -1
  25. package/build/types/components/index.native.d.ts +4 -0
  26. package/package.json +1 -1
@@ -20,8 +20,9 @@ import '../../tokens/global/typography.js';
20
20
  import '../../tokens/global/motion.js';
21
21
  import CheckIcon from '../Icons/CheckIcon/CheckIcon.js';
22
22
  import InfoIcon from '../Icons/InfoIcon/InfoIcon.js';
23
+ import { Box } from '../Box/Box.js';
23
24
 
24
- var HintText=function HintText(_ref){var Icon=_ref.icon,children=_ref.children,id=_ref.id,color=_ref.color,size=_ref.size;var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,{marginTop:hintMarginTop[size],id:id,children:jsxs(FormHintWrapper,{children:[Icon?jsx(Icon,{}):null,jsx(Text,{as:isReactNative?undefined:'span',color:color,size:hintTextSize[size],variant:"caption",children:children})]})});};var Icons={error:function error(_ref2){var size=_ref2.size;return jsxs(Fragment,{children:[jsx(InfoIcon,{color:"feedback.icon.negative.intense",size:hintIconSize[size]}),jsx(BaseBox,{marginRight:"spacing.2"})]});},success:function success(_ref3){var size=_ref3.size;return jsxs(Fragment,{children:[jsx(CheckIcon,{color:"feedback.icon.positive.intense",size:hintIconSize[size]}),jsx(BaseBox,{marginRight:"spacing.2"})]});}};var FormHint=function FormHint(_ref4){var type=_ref4.type,helpText=_ref4.helpText,errorText=_ref4.errorText,successText=_ref4.successText,helpTextId=_ref4.helpTextId,errorTextId=_ref4.errorTextId,successTextId=_ref4.successTextId,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size;var colors={help:'surface.text.gray.muted',error:'feedback.text.negative.intense',success:'feedback.text.positive.intense'};var showError=type==='error'&&errorText;var showSuccess=type==='success'&&successText;var showHelp=!showError&&!showSuccess&&helpText;return jsxs(Fragment,{children:[showHelp&&jsx(HintText,{size:size,id:helpTextId,color:colors.help,children:helpText}),showError&&jsx(HintText,{size:size,id:errorTextId,icon:function icon(){return Icons.error({size:size});},color:colors.error,children:errorText}),showSuccess&&jsx(HintText,{size:size,id:successTextId,icon:function icon(){return Icons.success({size:size});},color:colors.success,children:successText})]});};
25
+ var HintText=function HintText(_ref){var Icon=_ref.icon,children=_ref.children,id=_ref.id,color=_ref.color,size=_ref.size;var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,{marginTop:hintMarginTop[size],id:id,children:jsxs(FormHintWrapper,{children:[Icon?jsx(Box,{flexShrink:0,marginTop:"spacing.1",children:jsx(Icon,{})}):null,jsx(Text,{as:isReactNative?undefined:'span',color:color,size:hintTextSize[size],variant:"caption",wordBreak:"break-word",children:children})]})});};var Icons={error:function error(_ref2){var size=_ref2.size;return jsx(InfoIcon,{display:'block',color:"feedback.icon.negative.intense",size:hintIconSize[size]});},success:function success(_ref3){var size=_ref3.size;return jsx(CheckIcon,{display:'block',color:"feedback.icon.positive.intense",size:hintIconSize[size]});}};var FormHint=function FormHint(_ref4){var type=_ref4.type,helpText=_ref4.helpText,errorText=_ref4.errorText,successText=_ref4.successText,helpTextId=_ref4.helpTextId,errorTextId=_ref4.errorTextId,successTextId=_ref4.successTextId,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size;var colors={help:'surface.text.gray.muted',error:'feedback.text.negative.intense',success:'feedback.text.positive.intense'};var showError=type==='error'&&errorText;var showSuccess=type==='success'&&successText;var showHelp=!showError&&!showSuccess&&helpText;return jsxs(Fragment,{children:[showHelp&&jsx(HintText,{size:size,id:helpTextId,color:colors.help,children:helpText}),showError&&jsx(HintText,{size:size,id:errorTextId,icon:function icon(){return Icons.error({size:size});},color:colors.error,children:errorText}),showSuccess&&jsx(HintText,{size:size,id:successTextId,icon:function icon(){return Icons.success({size:size});},color:colors.success,children:successText})]});};
25
26
 
26
27
  export { FormHint };
27
28
  //# sourceMappingURL=FormHint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormHint.js","sources":["../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport { hintIconSize, hintMarginTop, hintTextSize } from './formTokens';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\n\ntype HintTextProps = {\n icon?: React.ElementType;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n size: 'small' | 'medium' | 'large';\n};\n\nconst HintText = ({ icon: Icon, children, id, color, size }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop={hintMarginTop[size]} id={id}>\n <FormHintWrapper>\n {Icon ? <Icon /> : null}\n <Text\n as={isReactNative ? undefined : 'span'}\n color={color}\n size={hintTextSize[size]}\n variant=\"caption\"\n >\n {children}\n </Text>\n </FormHintWrapper>\n </BaseBox>\n );\n};\n\nexport type FormHintProps = {\n type: 'help' | 'error' | 'success';\n /**\n * Help text for the group\n */\n helpText?: string;\n /**\n * Error text for the group\n *\n * Renders when `state` is set to 'error'\n */\n errorText?: string;\n /**\n * Success text for the group\n *\n * Renders when `state` is set to 'success'\n */\n successText?: string;\n /**\n * Sets the id on errorText.\n * Needed for accessibility reasons.\n */\n errorTextId?: string;\n /**\n * Sets the id on helpText.\n * Needed for accessibility reasons.\n */\n helpTextId?: string;\n /**\n * Sets the id on successText.\n * Needed for accessibility reasons.\n */\n successTextId?: string;\n /**\n * Sets the size of the hint\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nconst Icons = {\n error: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <InfoIcon color=\"feedback.icon.negative.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n success: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <CheckIcon color=\"feedback.icon.positive.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n};\n\nconst FormHint = ({\n type,\n helpText,\n errorText,\n successText,\n helpTextId,\n errorTextId,\n successTextId,\n size = 'medium',\n}: FormHintProps): React.ReactElement => {\n const colors: Record<string, TextProps<{ variant: 'caption' }>['color']> = {\n help: 'surface.text.gray.muted',\n error: 'feedback.text.negative.intense',\n success: 'feedback.text.positive.intense',\n };\n\n const showError = type === 'error' && errorText;\n const showSuccess = type === 'success' && successText;\n const showHelp = !showError && !showSuccess && helpText;\n\n return (\n <>\n {showHelp && (\n <HintText size={size} id={helpTextId} color={colors.help}>\n {helpText}\n </HintText>\n )}\n\n {showError && (\n <HintText\n size={size}\n id={errorTextId}\n icon={() => Icons.error({ size })}\n color={colors.error}\n >\n {errorText}\n </HintText>\n )}\n\n {showSuccess && (\n <HintText\n size={size}\n id={successTextId}\n icon={() => Icons.success({ size })}\n color={colors.success}\n >\n {successText}\n </HintText>\n )}\n </>\n );\n};\n\nexport { FormHint };\n"],"names":["HintText","_ref","Icon","icon","children","id","color","size","isReactNative","getPlatformType","_jsx","BaseBox","marginTop","hintMarginTop","_jsxs","FormHintWrapper","Text","as","undefined","hintTextSize","variant","Icons","error","_ref2","_Fragment","InfoIcon","hintIconSize","marginRight","success","_ref3","CheckIcon","FormHint","_ref4","type","helpText","errorText","successText","helpTextId","errorTextId","successTextId","_ref4$size","colors","help","showError","showSuccess","showHelp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAA+E,CAAA,IAAnEC,IAAI,CAAAD,IAAA,CAAVE,IAAI,CAAQC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,EAAE,CAAAJ,IAAA,CAAFI,EAAE,CAAEC,KAAK,CAAAL,IAAA,CAALK,KAAK,CAAEC,IAAI,CAAAN,IAAA,CAAJM,IAAI,CACvD,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAE1D,OACEC,GAAA,CAACC,OAAO,CAACC,CAAAA,SAAS,CAAEC,aAAa,CAACN,IAAI,CAAE,CAACF,EAAE,CAAEA,EAAG,CAAAD,QAAA,CAC9CU,IAAA,CAACC,eAAe,CAAA,CAAAX,QAAA,CAAA,CACbF,IAAI,CAAGQ,GA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XF,EAAE,CAAEkC,aAAc,CAClBpC,IAAI,CAAE,SAAAA,IAAAA,EAAM,CAAA,OAAAkB,KAAK,CAACO,OAAO,CAAC,CAAErB,IAAI,CAAJA,IAAK,CAAC,CAAC,CAAC,CAAA,CACpCD,KAAK,CAAEmC,MAAM,CAACb,OAAQ,CAAAxB,QAAA,CAErBgC,WAAW,CACJ,CACX,CAAA,CACD,CAAC,CAEP;;;;"}
1
+ {"version":3,"file":"FormHint.js","sources":["../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport { hintIconSize, hintMarginTop, hintTextSize } from './formTokens';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { Box } from '~components/Box';\n\ntype HintTextProps = {\n icon?: IconComponent;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n size: 'small' | 'medium' | 'large';\n};\n\nconst HintText = ({ icon: Icon, children, id, color, size }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop={hintMarginTop[size]} id={id}>\n <FormHintWrapper>\n {Icon ? (\n // offset block element 2px down to align with text\n <Box flexShrink={0} marginTop=\"spacing.1\">\n <Icon />\n </Box>\n ) : null}\n <Text\n as={isReactNative ? undefined : 'span'}\n color={color}\n size={hintTextSize[size]}\n variant=\"caption\"\n wordBreak=\"break-word\"\n >\n {children}\n </Text>\n </FormHintWrapper>\n </BaseBox>\n );\n};\n\nexport type FormHintProps = {\n type: 'help' | 'error' | 'success';\n /**\n * Help text for the group\n */\n helpText?: string;\n /**\n * Error text for the group\n *\n * Renders when `state` is set to 'error'\n */\n errorText?: string;\n /**\n * Success text for the group\n *\n * Renders when `state` is set to 'success'\n */\n successText?: string;\n /**\n * Sets the id on errorText.\n * Needed for accessibility reasons.\n */\n errorTextId?: string;\n /**\n * Sets the id on helpText.\n * Needed for accessibility reasons.\n */\n helpTextId?: string;\n /**\n * Sets the id on successText.\n * Needed for accessibility reasons.\n */\n successTextId?: string;\n /**\n * Sets the size of the hint\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nconst Icons = {\n error: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <InfoIcon\n display={'block' as never}\n color=\"feedback.icon.negative.intense\"\n size={hintIconSize[size]}\n />\n ),\n success: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <CheckIcon\n display={'block' as never}\n color=\"feedback.icon.positive.intense\"\n size={hintIconSize[size]}\n />\n ),\n};\n\nconst FormHint = ({\n type,\n helpText,\n errorText,\n successText,\n helpTextId,\n errorTextId,\n successTextId,\n size = 'medium',\n}: FormHintProps): React.ReactElement => {\n const colors: Record<string, TextProps<{ variant: 'caption' }>['color']> = {\n help: 'surface.text.gray.muted',\n error: 'feedback.text.negative.intense',\n success: 'feedback.text.positive.intense',\n };\n\n const showError = type === 'error' && errorText;\n const showSuccess = type === 'success' && successText;\n const showHelp = !showError && !showSuccess && helpText;\n\n return (\n <>\n {showHelp && (\n <HintText size={size} id={helpTextId} color={colors.help}>\n {helpText}\n </HintText>\n )}\n\n {showError && (\n <HintText\n size={size}\n id={errorTextId}\n icon={() => Icons.error({ size })}\n color={colors.error}\n >\n {errorText}\n </HintText>\n )}\n\n {showSuccess && (\n <HintText\n size={size}\n id={successTextId}\n icon={() => Icons.success({ size })}\n color={colors.success}\n >\n {successText}\n </HintText>\n )}\n </>\n );\n};\n\nexport { FormHint };\n"],"names":["HintText","_ref","Icon","icon","children","id","color","size","isReactNative","getPlatformType","_jsx","BaseBox","marginTop","hintMarginTop","_jsxs","FormHintWrapper","Box","flexShrink","Text","as","undefined","hintTextSize","variant","wordBreak","Icons","error","_ref2","InfoIcon","display","hintIconSize","success","_ref3","CheckIcon","FormHint","_ref4","type","helpText","errorText","successText","helpTextId","errorTextId","successTextId","_ref4$size","colors","help","showError","showSuccess","showHelp","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAA+E,CAAnE,IAAAC,IAAI,CAAAD,IAAA,CAAVE,IAAI,CAAQC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,EAAE,CAAAJ,IAAA,CAAFI,EAAE,CAAEC,KAAK,CAAAL,IAAA,CAALK,KAAK,CAAEC,IAAI,CAAAN,IAAA,CAAJM,IAAI,CACvD,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAE1D,OACEC,GAAA,CAACC,OAAO,CAAA,CAACC,SAAS,CAAEC,aAAa,CAACN,IAAI,CAAE,CAACF,EAAE,CAAEA,EAAG,CAAAD,QAAA,CAC9CU,IAAA,CAACC,eAAe,CAAAX,CAAAA,QAAA,CACbF,CAAAA,IAAI,CAEHQ,GAAA,CAACM,GAAG,CAAA,CAACC,UAAU,CAAE,CAAE,CAACL,SAAS,CAAC,WAAW,CAAAR,QAAA,CACvCM,GAAA,CAACR,IAAI,CAAA,EAAE,CAAC,CACL,CAAC,CACJ,IAAI,CACRQ,GAAA,CAACQ,IAAI,CAAA,CACHC,EAAE,CAAEX,aAAa,CAAGY,SAAS,CAAG,MAAO,CACvCd,KAAK,CAAEA,KAAM,CACbC,IAAI,CAAEc,YAAY,CAACd,IAAI,CAAE,CACzBe,OAAO,CAAC,SAAS,CACjBC,SAAS,CAAC,YAAY,CAAAnB,QAAA,CAErBA,QAAQ,CACL,CAAC,CACQ,CAAA,CAAC,CACX,CAAC,CAEd,CAAC,CA0CD,IAAMoB,KAAK,CAAG,CACZC,KAAK,CAAE,SAAAA,KAAAC,CAAAA,KAAA,CAAG,CAAA,IAAAnB,IAAI,CAAAmB,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AAA,CAAAkC,QAAA,CAAA5C,CAAAA,QAAA,CACG2C,CAAAA,QAAQ,EACPrC,GAAA,CAACV,QAAQ,CAACO,CAAAA,IAAI,CAAEA,IAAK,CAACF,EAAE,CAAEkC,UAAW,CAACjC,KAAK,CAAEqC,MAAM,CAACC,IAAK,CAAAxC,QAAA,CACtDgC,QAAQ,CACD,CACX,CAEAS,SAAS,EACRnC,GAAA,CAACV,QAAQ,CACPO,CAAAA,IAAI,CAAEA,IAAK,CACXF,EAAE,CAAEmC,WAAY,CAChBrC,IAAI,CAAE,SAAAA,IAAA,EAAA,CAAA,OAAMqB,KAAK,CAACC,KAAK,CAAC,CAAElB,IAAI,CAAJA,IAAK,CAAC,CAAC,CAAC,CAAA,CAClCD,KAAK,CAAEqC,MAAM,CAAClB,KAAM,CAAArB,QAAA,CAEnBiC,SAAS,CACF,CACX,CAEAS,WAAW,EACVpC,GAAA,CAACV,QAAQ,CAAA,CACPO,IAAI,CAAEA,IAAK,CACXF,EAAE,CAAEoC,aAAc,CAClBtC,IAAI,CAAE,SAAAA,IAAAA,EAAM,CAAA,OAAAqB,KAAK,CAACM,OAAO,CAAC,CAAEvB,IAAI,CAAJA,IAAK,CAAC,CAAC,CAAC,CAAA,CACpCD,KAAK,CAAEqC,MAAM,CAACb,OAAQ,CAAA1B,QAAA,CAErBkC,WAAW,CACJ,CACX,CAAA,CACD,CAAC,CAEP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyHeaderFooterZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyHeaderFooterZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
@@ -5,9 +5,11 @@ import '../Typography/Text/index.js';
5
5
  import '../Box/BaseBox/index.js';
6
6
  import '../Icons/index.js';
7
7
  import '../../utils/getPlatformType/index.js';
8
+ import '../Box/index.js';
8
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
10
  import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
10
11
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
12
+ import { Box } from '../Box/Box.js';
11
13
  import { Text } from '../Typography/Text/Text.js';
12
14
  import InfoIcon from '../Icons/InfoIcon/InfoIcon.js';
13
15
  import CheckIcon from '../Icons/CheckIcon/CheckIcon.js';
@@ -25,11 +27,19 @@ var HintText = function HintText(_ref) {
25
27
  marginTop: hintMarginTop[size],
26
28
  id: id,
27
29
  children: /*#__PURE__*/jsxs(FormHintWrapper, {
28
- children: [Icon ? /*#__PURE__*/jsx(Icon, {}) : null, /*#__PURE__*/jsx(Text, {
30
+ children: [Icon ?
31
+ /*#__PURE__*/
32
+ // offset block element 2px down to align with text
33
+ jsx(Box, {
34
+ flexShrink: 0,
35
+ marginTop: "spacing.1",
36
+ children: /*#__PURE__*/jsx(Icon, {})
37
+ }) : null, /*#__PURE__*/jsx(Text, {
29
38
  as: isReactNative ? undefined : 'span',
30
39
  color: color,
31
40
  size: hintTextSize[size],
32
41
  variant: "caption",
42
+ wordBreak: "break-word",
33
43
  children: children
34
44
  })]
35
45
  })
@@ -38,24 +48,18 @@ var HintText = function HintText(_ref) {
38
48
  var Icons = {
39
49
  error: function error(_ref2) {
40
50
  var size = _ref2.size;
41
- return /*#__PURE__*/jsxs(Fragment, {
42
- children: [/*#__PURE__*/jsx(InfoIcon, {
43
- color: "feedback.icon.negative.intense",
44
- size: hintIconSize[size]
45
- }), /*#__PURE__*/jsx(BaseBox, {
46
- marginRight: "spacing.2"
47
- })]
51
+ return /*#__PURE__*/jsx(InfoIcon, {
52
+ display: 'block',
53
+ color: "feedback.icon.negative.intense",
54
+ size: hintIconSize[size]
48
55
  });
49
56
  },
50
57
  success: function success(_ref3) {
51
58
  var size = _ref3.size;
52
- return /*#__PURE__*/jsxs(Fragment, {
53
- children: [/*#__PURE__*/jsx(CheckIcon, {
54
- color: "feedback.icon.positive.intense",
55
- size: hintIconSize[size]
56
- }), /*#__PURE__*/jsx(BaseBox, {
57
- marginRight: "spacing.2"
58
- })]
59
+ return /*#__PURE__*/jsx(CheckIcon, {
60
+ display: 'block',
61
+ color: "feedback.icon.positive.intense",
62
+ size: hintIconSize[size]
59
63
  });
60
64
  }
61
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FormHint.js","sources":["../../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport { hintIconSize, hintMarginTop, hintTextSize } from './formTokens';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\n\ntype HintTextProps = {\n icon?: React.ElementType;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n size: 'small' | 'medium' | 'large';\n};\n\nconst HintText = ({ icon: Icon, children, id, color, size }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop={hintMarginTop[size]} id={id}>\n <FormHintWrapper>\n {Icon ? <Icon /> : null}\n <Text\n as={isReactNative ? undefined : 'span'}\n color={color}\n size={hintTextSize[size]}\n variant=\"caption\"\n >\n {children}\n </Text>\n </FormHintWrapper>\n </BaseBox>\n );\n};\n\nexport type FormHintProps = {\n type: 'help' | 'error' | 'success';\n /**\n * Help text for the group\n */\n helpText?: string;\n /**\n * Error text for the group\n *\n * Renders when `state` is set to 'error'\n */\n errorText?: string;\n /**\n * Success text for the group\n *\n * Renders when `state` is set to 'success'\n */\n successText?: string;\n /**\n * Sets the id on errorText.\n * Needed for accessibility reasons.\n */\n errorTextId?: string;\n /**\n * Sets the id on helpText.\n * Needed for accessibility reasons.\n */\n helpTextId?: string;\n /**\n * Sets the id on successText.\n * Needed for accessibility reasons.\n */\n successTextId?: string;\n /**\n * Sets the size of the hint\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nconst Icons = {\n error: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <InfoIcon color=\"feedback.icon.negative.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n success: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <>\n <CheckIcon color=\"feedback.icon.positive.intense\" size={hintIconSize[size]} />\n <BaseBox marginRight=\"spacing.2\" />\n </>\n ),\n};\n\nconst FormHint = ({\n type,\n helpText,\n errorText,\n successText,\n helpTextId,\n errorTextId,\n successTextId,\n size = 'medium',\n}: FormHintProps): React.ReactElement => {\n const colors: Record<string, TextProps<{ variant: 'caption' }>['color']> = {\n help: 'surface.text.gray.muted',\n error: 'feedback.text.negative.intense',\n success: 'feedback.text.positive.intense',\n };\n\n const showError = type === 'error' && errorText;\n const showSuccess = type === 'success' && successText;\n const showHelp = !showError && !showSuccess && helpText;\n\n return (\n <>\n {showHelp && (\n <HintText size={size} id={helpTextId} color={colors.help}>\n {helpText}\n </HintText>\n )}\n\n {showError && (\n <HintText\n size={size}\n id={errorTextId}\n icon={() => Icons.error({ size })}\n color={colors.error}\n >\n {errorText}\n </HintText>\n )}\n\n {showSuccess && (\n <HintText\n size={size}\n id={successTextId}\n icon={() => Icons.success({ size })}\n color={colors.success}\n >\n {successText}\n </HintText>\n )}\n </>\n );\n};\n\nexport { FormHint };\n"],"names":["HintText","_ref","Icon","icon","children","id","color","size","isReactNative","getPlatformType","_jsx","BaseBox","marginTop","hintMarginTop","_jsxs","FormHintWrapper","Text","as","undefined","hintTextSize","variant","Icons","error","_ref2","_Fragment","InfoIcon","hintIconSize","marginRight","success","_ref3","CheckIcon","FormHint","_ref4","type","helpText","errorText","successText","helpTextId","errorTextId","successTextId","_ref4$size","colors","help","showError","showSuccess","showHelp"],"mappings":";;;;;;;;;;;;;;AAAA;;AAmBA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAA+E;AAAA,EAAA,IAAnEC,IAAI,GAAAD,IAAA,CAAVE,IAAI;IAAQC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAEC,EAAE,GAAAJ,IAAA,CAAFI,EAAE;IAAEC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAEC,IAAI,GAAAN,IAAA,CAAJM,IAAI,CAAA;AACvD,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;EAE1D,oBACEC,GAAA,CAACC,OAAO,EAAA;AAACC,IAAAA,SAAS,EAAEC,aAAa,CAACN,IAAI,CAAE;AAACF,IAAAA,EAAE,EAAEA,EAAG;IAAAD,QAAA,eAC9CU,IAAA,CAACC,eAAe,EAAA;AAAAX,MAAAA,QAAA,EACbF,CAAAA,IAAI,gBAAGQ,GAAA,CAACR,IAAI,EAAE,EAAA,CAAC,GAAG,IAAI,eACvBQ,GAAA,CAACM,IAAI,EAAA;AACHC,QAAAA,EAAE,EAAET,aAAa,GAAGU,SAAS,GAAG,MAAO;AACvCZ,QAAAA,KAAK,EAAEA,KAAM;AACbC,QAAAA,IAAI,EAAEY,YAAY,CAACZ,IAAI,CAAE;AACzBa,QAAAA,OAAO,EAAC,SAAS;AAAAhB,QAAAA,QAAA,EAEhBA,QAAAA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ACV,QAAQ,EAAA;AACPO,MAAAA,IAAI,EAAEA,IAAK;AACXF,MAAAA,EAAE,EAAEkC,aAAc;MAClBpC,IAAI,EAAE,SAAAA,IAAA,GAAA;QAAA,OAAMkB,KAAK,CAACO,OAAO,CAAC;AAAErB,UAAAA,IAAI,EAAJA,IAAAA;AAAK,SAAC,CAAC,CAAA;OAAC;MACpCD,KAAK,EAAEmC,MAAM,CAACb,OAAQ;AAAAxB,MAAAA,QAAA,EAErBgC,WAAAA;AAAW,KACJ,CACX,CAAA;AAAA,GACD,CAAC,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"FormHint.js","sources":["../../../../../../src/components/Form/FormHint.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { FormHintWrapper } from './FormHintWrapper';\nimport { hintIconSize, hintMarginTop, hintTextSize } from './formTokens';\nimport type { TextProps } from '~components/Typography/Text';\nimport { Text } from '~components/Typography/Text';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { CheckIcon, InfoIcon } from '~components/Icons';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { Box } from '~components/Box';\n\ntype HintTextProps = {\n icon?: IconComponent;\n children: string;\n id?: string;\n color: TextProps<{ variant: 'caption' }>['color'];\n size: 'small' | 'medium' | 'large';\n};\n\nconst HintText = ({ icon: Icon, children, id, color, size }: HintTextProps): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox marginTop={hintMarginTop[size]} id={id}>\n <FormHintWrapper>\n {Icon ? (\n // offset block element 2px down to align with text\n <Box flexShrink={0} marginTop=\"spacing.1\">\n <Icon />\n </Box>\n ) : null}\n <Text\n as={isReactNative ? undefined : 'span'}\n color={color}\n size={hintTextSize[size]}\n variant=\"caption\"\n wordBreak=\"break-word\"\n >\n {children}\n </Text>\n </FormHintWrapper>\n </BaseBox>\n );\n};\n\nexport type FormHintProps = {\n type: 'help' | 'error' | 'success';\n /**\n * Help text for the group\n */\n helpText?: string;\n /**\n * Error text for the group\n *\n * Renders when `state` is set to 'error'\n */\n errorText?: string;\n /**\n * Success text for the group\n *\n * Renders when `state` is set to 'success'\n */\n successText?: string;\n /**\n * Sets the id on errorText.\n * Needed for accessibility reasons.\n */\n errorTextId?: string;\n /**\n * Sets the id on helpText.\n * Needed for accessibility reasons.\n */\n helpTextId?: string;\n /**\n * Sets the id on successText.\n * Needed for accessibility reasons.\n */\n successTextId?: string;\n /**\n * Sets the size of the hint\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nconst Icons = {\n error: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <InfoIcon\n display={'block' as never}\n color=\"feedback.icon.negative.intense\"\n size={hintIconSize[size]}\n />\n ),\n success: ({ size }: { size: 'small' | 'medium' | 'large' }): ReactElement => (\n <CheckIcon\n display={'block' as never}\n color=\"feedback.icon.positive.intense\"\n size={hintIconSize[size]}\n />\n ),\n};\n\nconst FormHint = ({\n type,\n helpText,\n errorText,\n successText,\n helpTextId,\n errorTextId,\n successTextId,\n size = 'medium',\n}: FormHintProps): React.ReactElement => {\n const colors: Record<string, TextProps<{ variant: 'caption' }>['color']> = {\n help: 'surface.text.gray.muted',\n error: 'feedback.text.negative.intense',\n success: 'feedback.text.positive.intense',\n };\n\n const showError = type === 'error' && errorText;\n const showSuccess = type === 'success' && successText;\n const showHelp = !showError && !showSuccess && helpText;\n\n return (\n <>\n {showHelp && (\n <HintText size={size} id={helpTextId} color={colors.help}>\n {helpText}\n </HintText>\n )}\n\n {showError && (\n <HintText\n size={size}\n id={errorTextId}\n icon={() => Icons.error({ size })}\n color={colors.error}\n >\n {errorText}\n </HintText>\n )}\n\n {showSuccess && (\n <HintText\n size={size}\n id={successTextId}\n icon={() => Icons.success({ size })}\n color={colors.success}\n >\n {successText}\n </HintText>\n )}\n </>\n );\n};\n\nexport { FormHint };\n"],"names":["HintText","_ref","Icon","icon","children","id","color","size","isReactNative","getPlatformType","_jsx","BaseBox","marginTop","hintMarginTop","_jsxs","FormHintWrapper","Box","flexShrink","Text","as","undefined","hintTextSize","variant","wordBreak","Icons","error","_ref2","InfoIcon","display","hintIconSize","success","_ref3","CheckIcon","FormHint","_ref4","type","helpText","errorText","successText","helpTextId","errorTextId","successTextId","_ref4$size","colors","help","showError","showSuccess","showHelp","_Fragment"],"mappings":";;;;;;;;;;;;;;;;AAAA;;AAqBA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAA+E;AAAA,EAAA,IAAnEC,IAAI,GAAAD,IAAA,CAAVE,IAAI;IAAQC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAEC,EAAE,GAAAJ,IAAA,CAAFI,EAAE;IAAEC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAEC,IAAI,GAAAN,IAAA,CAAJM,IAAI,CAAA;AACvD,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;EAE1D,oBACEC,GAAA,CAACC,OAAO,EAAA;AAACC,IAAAA,SAAS,EAAEC,aAAa,CAACN,IAAI,CAAE;AAACF,IAAAA,EAAE,EAAEA,EAAG;IAAAD,QAAA,eAC9CU,IAAA,CAACC,eAAe,EAAA;AAAAX,MAAAA,QAAA,GACbF,IAAI;AAAA;AACH;AACAQ,MAAAA,GAAA,CAACM,GAAG,EAAA;AAACC,QAAAA,UAAU,EAAE,CAAE;AAACL,QAAAA,SAAS,EAAC,WAAW;AAAAR,QAAAA,QAAA,eACvCM,GAAA,CAACR,IAAI,EAAE,EAAA,CAAA;AAAC,OACL,CAAC,GACJ,IAAI,eACRQ,GAAA,CAACQ,IAAI,EAAA;AACHC,QAAAA,EAAE,EAAEX,aAAa,GAAGY,SAAS,GAAG,MAAO;AACvCd,QAAAA,KAAK,EAAEA,KAAM;AACbC,QAAAA,IAAI,EAAEc,YAAY,CAACd,IAAI,CAAE;AACzBe,QAAAA,OAAO,EAAC,SAAS;AACjB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A,IAAI,EAAJA,IAAAA;AAAK,SAAC,CAAC,CAAA;OAAC;MACpCD,KAAK,EAAEqC,MAAM,CAACb,OAAQ;AAAA1B,MAAAA,QAAA,EAErBkC,WAAAA;AAAW,KACJ,CACX,CAAA;AAAA,GACD,CAAC,CAAA;AAEP;;;;"}
@@ -9,10 +9,8 @@ var FormHintWrapper = function FormHintWrapper(_ref) {
9
9
  as: "span",
10
10
  display: "flex",
11
11
  flexDirection: "row",
12
- alignItems: "center",
13
- style: {
14
- wordBreak: 'break-all'
15
- },
12
+ alignItems: "flex-start",
13
+ gap: "spacing.2",
16
14
  children: children
17
15
  });
18
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FormHintWrapper.web.js","sources":["../../../../../../src/components/Form/FormHintWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport BaseBox from '~components/Box/BaseBox';\n\nconst FormHintWrapper = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n return (\n <BaseBox\n as=\"span\"\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n style={{\n wordBreak: 'break-all',\n }}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { FormHintWrapper };\n"],"names":["FormHintWrapper","_ref","children","_jsx","BaseBox","as","display","flexDirection","alignItems","style","wordBreak"],"mappings":";;;;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAwE;AAAA,EAAA,IAAlEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;EACjC,oBACEC,GAAA,CAACC,OAAO,EAAA;AACNC,IAAAA,EAAE,EAAC,MAAM;AACTC,IAAAA,OAAO,EAAC,MAAM;AACdC,IAAAA,aAAa,EAAC,KAAK;AACnBC,IAAAA,UAAU,EAAC,QAAQ;AACnBC,IAAAA,KAAK,EAAE;AACLC,MAAAA,SAAS,EAAE,WAAA;KACX;AAAAR,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"FormHintWrapper.web.js","sources":["../../../../../../src/components/Form/FormHintWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport BaseBox from '~components/Box/BaseBox';\n\nconst FormHintWrapper = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n return (\n <BaseBox as=\"span\" display=\"flex\" flexDirection=\"row\" alignItems=\"flex-start\" gap=\"spacing.2\">\n {children}\n </BaseBox>\n );\n};\n\nexport { FormHintWrapper };\n"],"names":["FormHintWrapper","_ref","children","_jsx","BaseBox","as","display","flexDirection","alignItems","gap"],"mappings":";;;;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAwE;AAAA,EAAA,IAAlEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;EACjC,oBACEC,GAAA,CAACC,OAAO,EAAA;AAACC,IAAAA,EAAE,EAAC,MAAM;AAACC,IAAAA,OAAO,EAAC,MAAM;AAACC,IAAAA,aAAa,EAAC,KAAK;AAACC,IAAAA,UAAU,EAAC,YAAY;AAACC,IAAAA,GAAG,EAAC,WAAW;AAAAP,IAAAA,QAAA,EAC1FA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd;;;;"}
@@ -45,12 +45,15 @@ var InteractiveItemHeaderBox = /*#__PURE__*/styled.button.withConfig({
45
45
  borderRadius: props.theme.border.radius.medium,
46
46
  width: '100%',
47
47
  transition: "background-color ".concat(props.theme.motion.duration.xquick, " ").concat(props.theme.motion.easing.standard.effective),
48
- ':hover': {
48
+ ':not([disabled]):hover': {
49
49
  backgroundColor: props.isSelected ? props.theme.colors.interactive.background.primary.fadedHighlighted : props.theme.colors.interactive.background.gray.fadedHighlighted
50
50
  },
51
- ':focus-visible': _objectSpread({}, getFocusRingStyles({
51
+ ':not([disabled]):focus-visible': _objectSpread({}, getFocusRingStyles({
52
52
  theme: props.theme
53
- }))
53
+ })),
54
+ '&[disabled]': {
55
+ cursor: 'not-allowed'
56
+ }
54
57
  };
55
58
  });
56
59
  var getStepTypeFromIndex = function getStepTypeFromIndex(_ref) {
@@ -80,6 +83,7 @@ var _StepItem = function _StepItem(_ref2) {
80
83
  marker = _ref2.marker,
81
84
  trailing = _ref2.trailing,
82
85
  isSelected = _ref2.isSelected,
86
+ isDisabled = _ref2.isDisabled,
83
87
  href = _ref2.href,
84
88
  target = _ref2.target,
85
89
  onClick = _ref2.onClick,
@@ -129,18 +133,18 @@ var _StepItem = function _StepItem(_ref2) {
129
133
  children: [/*#__PURE__*/jsxs(Box, {
130
134
  children: [/*#__PURE__*/jsx(Text, {
131
135
  size: stepItemHeaderTokens[size$1].title,
132
- color: "surface.text.gray.subtle",
136
+ color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle',
133
137
  weight: "semibold",
134
138
  children: title
135
139
  }), /*#__PURE__*/jsx(Text, {
136
140
  size: stepItemHeaderTokens[size$1].timestamp,
137
141
  marginY: "spacing.2",
138
- color: "surface.text.gray.muted",
142
+ color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted',
139
143
  variant: "caption",
140
144
  children: timestamp
141
145
  }), /*#__PURE__*/jsx(Text, {
142
146
  size: stepItemHeaderTokens[size$1].description,
143
- color: "surface.text.gray.muted",
147
+ color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted',
144
148
  children: description
145
149
  })]
146
150
  }), /*#__PURE__*/jsx(Box, {
@@ -181,6 +185,7 @@ var _StepItem = function _StepItem(_ref2) {
181
185
  target: target,
182
186
  isSelected: isSelected,
183
187
  onClick: onClick,
188
+ disabled: isDisabled,
184
189
  children: stepItemHeaderJSX
185
190
  })) : /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, stepItemHeaderPaddings), {}, {
186
191
  children: stepItemHeaderJSX
@@ -1 +1 @@
1
- {"version":3,"file":"StepItem.web.js","sources":["../../../../../../src/components/StepGroup/StepItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { StepLine } from './StepLine';\nimport type { StepLineProps } from './StepLine';\nimport { useStepGroup } from './StepGroupContext';\nimport type {\n InteractiveItemHeaderProps,\n StepGroupContextType,\n StepGroupProps,\n StepItemProps,\n} from './types';\nimport { componentIds } from './componentIds';\nimport { itemLineGap, stepItemHeaderTokens } from './tokens';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize, makeSpace } from '~utils';\nimport { size as sizeTokens } from '~tokens/global';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { throwBladeError } from '~utils/logger';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\ntype GetStepTypeFromIndexProps = {\n _index: StepItemProps['_index'];\n _nestingLevel: StepGroupProps['_nestingLevel'];\n itemsCount: StepGroupContextType['itemsInGroupCount'];\n};\n\nconst InteractiveItemHeaderBox = styled.button<InteractiveItemHeaderProps>((props) => {\n return {\n padding: `${makeSpace(getIn(props.theme, props.paddingY))} ${makeSpace(\n getIn(props.theme, props.paddingX),\n )}`,\n cursor: 'pointer',\n display: 'inline-block',\n textDecoration: 'none',\n border: 'none',\n textAlign: 'inherit',\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.faded\n : props.theme.colors.transparent,\n borderRadius: props.theme.border.radius.medium,\n width: '100%',\n transition: `background-color ${props.theme.motion.duration.xquick} ${props.theme.motion.easing.standard.effective}`,\n ':hover': {\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.fadedHighlighted\n : props.theme.colors.interactive.background.gray.fadedHighlighted,\n },\n ':focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n };\n});\n\nconst getStepTypeFromIndex = ({\n _index,\n _nestingLevel,\n itemsCount,\n}: GetStepTypeFromIndexProps): StepLineProps['stepType'] => {\n if (_nestingLevel === 0) {\n return 'default';\n }\n\n if (itemsCount === 1) {\n return 'single-item';\n }\n\n if (_index === 0) {\n return 'start';\n }\n\n if (_index === itemsCount - 1) {\n return 'end';\n }\n\n return 'middle';\n};\n\nconst _StepItem = ({\n title,\n timestamp,\n description,\n stepProgress = 'none',\n marker,\n trailing,\n isSelected,\n href,\n target,\n onClick,\n children,\n _index = 0,\n _totalIndex = 0,\n _nestingLevel = 0,\n}: StepItemProps): React.ReactElement => {\n const {\n itemsInGroupCount: itemsCount,\n totalItemsInParentGroupCount,\n orientation,\n size,\n } = useStepGroup();\n const stepType = React.useMemo(\n () => getStepTypeFromIndex({ _index, _nestingLevel, itemsCount }),\n [_index, _nestingLevel, itemsCount],\n );\n\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n const isFirstItem = _totalIndex === 0;\n const isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;\n const isInteractive = Boolean(href) || Boolean(onClick);\n const isVertical = orientation === 'vertical';\n\n if (__DEV__) {\n if (trailing && orientation === 'horizontal') {\n throwBladeError({\n message: 'trailing is not allowed in horizontal StepGroup',\n moduleName: 'StepItem',\n });\n }\n\n if (_nestingLevel >= 1 && orientation === 'horizontal') {\n throwBladeError({\n message: 'Nested StepGroup components are not allowed in horizontal orientation',\n moduleName: 'StepItem',\n });\n }\n }\n\n const stepItemHeaderJSX = (\n <Box display=\"flex\" flexDirection=\"row\" justifyContent=\"space-between\" gap=\"spacing.4\">\n <Box>\n <Text\n size={stepItemHeaderTokens[size].title}\n color=\"surface.text.gray.subtle\"\n weight=\"semibold\"\n >\n {title}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].timestamp}\n marginY=\"spacing.2\"\n color=\"surface.text.gray.muted\"\n variant=\"caption\"\n >\n {timestamp}\n </Text>\n <Text size={stepItemHeaderTokens[size].description} color=\"surface.text.gray.muted\">\n {description}\n </Text>\n </Box>\n <Box>{trailing}</Box>\n </Box>\n );\n\n const stepItemHeaderPaddings: Omit<InteractiveItemHeaderProps, 'isSelected'> = {\n paddingY: 'spacing.3',\n paddingX: 'spacing.4',\n } as const;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isVertical ? 'row' : 'column'}\n gap={itemLineGap[size]}\n className={`step-item step-index-${_index} step-nesting-level-${_nestingLevel}`}\n textAlign={isVertical ? 'left' : 'center'}\n alignItems={isVertical ? undefined : 'center'}\n minWidth={isVertical ? undefined : `min(${makeSize(sizeTokens['120'])}, 100%)`}\n width={isVertical ? '100%' : undefined}\n flex={isVertical ? undefined : '1'}\n {...metaAttribute({ name: MetaConstants.StepItem })}\n ref={itemRef}\n >\n <StepLine\n shouldShowStartBranch={!isFirstItem}\n shouldShowEndBranch={!isLastItem}\n stepType={stepType}\n marker={marker}\n stepProgress={stepProgress}\n />\n <Box marginTop=\"spacing.3\" flex=\"1\" marginRight={isVertical ? undefined : undefined}>\n {isInteractive ? (\n <InteractiveItemHeaderBox\n {...stepItemHeaderPaddings}\n as={href ? 'a' : 'button'}\n href={href}\n target={target}\n isSelected={isSelected}\n onClick={onClick}\n >\n {stepItemHeaderJSX}\n </InteractiveItemHeaderBox>\n ) : (\n <Box {...stepItemHeaderPaddings}>{stepItemHeaderJSX}</Box>\n )}\n {children ? (\n <Box paddingX=\"spacing.4\" paddingY=\"spacing.3\">\n {children}\n </Box>\n ) : null}\n </Box>\n </BaseBox>\n );\n};\n\n/**\n * ## StepItem\n *\n * Component meant to be used inside the StepGroup parent component\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem\n * title=\"Personal Details\"\n * timestamp=\"Thu 15th Oct'23 | 12:00pm\"\n * description=\"Fill your personal details here\"\n * marker={<StepItemIndicator color=\"negative\" />}\n * />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepItem = assignWithoutSideEffects(_StepItem, {\n componentId: componentIds.StepItem,\n displayName: componentIds.StepItem,\n});\n\nexport { StepLine, StepItem };\n"],"names":["InteractiveItemHeaderBox","styled","button","withConfig","displayName","componentId","props","padding","concat","makeSpace","getIn","theme","paddingY","paddingX","cursor","display","textDecoration","border","textAlign","backgroundColor","isSelected","colors","interactive","background","primary","faded","transparent","borderRadius","radius","medium","width","transition","motion","duration","xquick","easing","standard","effective","fadedHighlighted","gray","_objectSpread","getFocusRingStyles","getStepTypeFromIndex","_ref","_index","_nestingLevel","itemsCount","_StepItem","_ref2","title","timestamp","description","_ref2$stepProgress","stepProgress","marker","trailing","href","target","onClick","children","_ref2$_index","_ref2$_totalIndex","_totalIndex","_ref2$_nestingLevel","_useStepGroup","useStepGroup","itemsInGroupCount","totalItemsInParentGroupCount","orientation","size","stepType","React","useMemo","itemRef","useRef","isFirstItem","isLastItem","isInteractive","Boolean","isVertical","throwBladeError","message","moduleName","stepItemHeaderJSX","_jsxs","Box","flexDirection","justifyContent","gap","_jsx","Text","stepItemHeaderTokens","color","weight","marginY","variant","stepItemHeaderPaddings","BaseBox","itemLineGap","className","alignItems","undefined","minWidth","makeSize","sizeTokens","flex","metaAttribute","name","MetaConstants","StepItem","ref","StepLine","shouldShowStartBranch","shouldShowEndBranch","marginTop","marginRight","as","assignWithoutSideEffects","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAMA,wBAAwB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAA6B,CAAA,CAAA,UAACC,KAAK,EAAK;EACpF,OAAO;AACLC,IAAAA,OAAO,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,SAAS,CAACC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACM,QAAQ,CAAC,CAAC,EAAAJ,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,SAAS,CACpEC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACO,QAAQ,CACnC,CAAC,CAAE;AACHC,IA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WAAW,EAAEkH,YAAY,CAACT,QAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"StepItem.web.js","sources":["../../../../../../src/components/StepGroup/StepItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { StepLine } from './StepLine';\nimport type { StepLineProps } from './StepLine';\nimport { useStepGroup } from './StepGroupContext';\nimport type {\n InteractiveItemHeaderProps,\n StepGroupContextType,\n StepGroupProps,\n StepItemProps,\n} from './types';\nimport { componentIds } from './componentIds';\nimport { itemLineGap, stepItemHeaderTokens } from './tokens';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize, makeSpace } from '~utils';\nimport { size as sizeTokens } from '~tokens/global';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { throwBladeError } from '~utils/logger';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\ntype GetStepTypeFromIndexProps = {\n _index: StepItemProps['_index'];\n _nestingLevel: StepGroupProps['_nestingLevel'];\n itemsCount: StepGroupContextType['itemsInGroupCount'];\n};\n\nconst InteractiveItemHeaderBox = styled.button<InteractiveItemHeaderProps>((props) => {\n return {\n padding: `${makeSpace(getIn(props.theme, props.paddingY))} ${makeSpace(\n getIn(props.theme, props.paddingX),\n )}`,\n cursor: 'pointer',\n display: 'inline-block',\n textDecoration: 'none',\n border: 'none',\n textAlign: 'inherit',\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.faded\n : props.theme.colors.transparent,\n borderRadius: props.theme.border.radius.medium,\n width: '100%',\n transition: `background-color ${props.theme.motion.duration.xquick} ${props.theme.motion.easing.standard.effective}`,\n ':not([disabled]):hover': {\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.fadedHighlighted\n : props.theme.colors.interactive.background.gray.fadedHighlighted,\n },\n ':not([disabled]):focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n '&[disabled]': {\n cursor: 'not-allowed',\n },\n };\n});\n\nconst getStepTypeFromIndex = ({\n _index,\n _nestingLevel,\n itemsCount,\n}: GetStepTypeFromIndexProps): StepLineProps['stepType'] => {\n if (_nestingLevel === 0) {\n return 'default';\n }\n\n if (itemsCount === 1) {\n return 'single-item';\n }\n\n if (_index === 0) {\n return 'start';\n }\n\n if (_index === itemsCount - 1) {\n return 'end';\n }\n\n return 'middle';\n};\n\nconst _StepItem = ({\n title,\n timestamp,\n description,\n stepProgress = 'none',\n marker,\n trailing,\n isSelected,\n isDisabled,\n href,\n target,\n onClick,\n children,\n _index = 0,\n _totalIndex = 0,\n _nestingLevel = 0,\n}: StepItemProps): React.ReactElement => {\n const {\n itemsInGroupCount: itemsCount,\n totalItemsInParentGroupCount,\n orientation,\n size,\n } = useStepGroup();\n const stepType = React.useMemo(\n () => getStepTypeFromIndex({ _index, _nestingLevel, itemsCount }),\n [_index, _nestingLevel, itemsCount],\n );\n\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n const isFirstItem = _totalIndex === 0;\n const isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;\n const isInteractive = Boolean(href) || Boolean(onClick);\n const isVertical = orientation === 'vertical';\n\n if (__DEV__) {\n if (trailing && orientation === 'horizontal') {\n throwBladeError({\n message: 'trailing is not allowed in horizontal StepGroup',\n moduleName: 'StepItem',\n });\n }\n\n if (_nestingLevel >= 1 && orientation === 'horizontal') {\n throwBladeError({\n message: 'Nested StepGroup components are not allowed in horizontal orientation',\n moduleName: 'StepItem',\n });\n }\n }\n\n const stepItemHeaderJSX = (\n <Box display=\"flex\" flexDirection=\"row\" justifyContent=\"space-between\" gap=\"spacing.4\">\n <Box>\n <Text\n size={stepItemHeaderTokens[size].title}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n weight=\"semibold\"\n >\n {title}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].timestamp}\n marginY=\"spacing.2\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n variant=\"caption\"\n >\n {timestamp}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].description}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n >\n {description}\n </Text>\n </Box>\n <Box>{trailing}</Box>\n </Box>\n );\n\n const stepItemHeaderPaddings: Omit<InteractiveItemHeaderProps, 'isSelected'> = {\n paddingY: 'spacing.3',\n paddingX: 'spacing.4',\n } as const;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isVertical ? 'row' : 'column'}\n gap={itemLineGap[size]}\n className={`step-item step-index-${_index} step-nesting-level-${_nestingLevel}`}\n textAlign={isVertical ? 'left' : 'center'}\n alignItems={isVertical ? undefined : 'center'}\n minWidth={isVertical ? undefined : `min(${makeSize(sizeTokens['120'])}, 100%)`}\n width={isVertical ? '100%' : undefined}\n flex={isVertical ? undefined : '1'}\n {...metaAttribute({ name: MetaConstants.StepItem })}\n ref={itemRef}\n >\n <StepLine\n shouldShowStartBranch={!isFirstItem}\n shouldShowEndBranch={!isLastItem}\n stepType={stepType}\n marker={marker}\n stepProgress={stepProgress}\n />\n <Box marginTop=\"spacing.3\" flex=\"1\" marginRight={isVertical ? undefined : undefined}>\n {isInteractive ? (\n <InteractiveItemHeaderBox\n {...stepItemHeaderPaddings}\n as={href ? 'a' : 'button'}\n href={href}\n target={target}\n isSelected={isSelected}\n onClick={onClick}\n disabled={isDisabled}\n >\n {stepItemHeaderJSX}\n </InteractiveItemHeaderBox>\n ) : (\n <Box {...stepItemHeaderPaddings}>{stepItemHeaderJSX}</Box>\n )}\n {children ? (\n <Box paddingX=\"spacing.4\" paddingY=\"spacing.3\">\n {children}\n </Box>\n ) : null}\n </Box>\n </BaseBox>\n );\n};\n\n/**\n * ## StepItem\n *\n * Component meant to be used inside the StepGroup parent component\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem\n * title=\"Personal Details\"\n * timestamp=\"Thu 15th Oct'23 | 12:00pm\"\n * description=\"Fill your personal details here\"\n * marker={<StepItemIndicator color=\"negative\" />}\n * />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepItem = assignWithoutSideEffects(_StepItem, {\n componentId: componentIds.StepItem,\n displayName: componentIds.StepItem,\n});\n\nexport { StepLine, StepItem };\n"],"names":["InteractiveItemHeaderBox","styled","button","withConfig","displayName","componentId","props","padding","concat","makeSpace","getIn","theme","paddingY","paddingX","cursor","display","textDecoration","border","textAlign","backgroundColor","isSelected","colors","interactive","background","primary","faded","transparent","borderRadius","radius","medium","width","transition","motion","duration","xquick","easing","standard","effective","fadedHighlighted","gray","_objectSpread","getFocusRingStyles","getStepTypeFromIndex","_ref","_index","_nestingLevel","itemsCount","_StepItem","_ref2","title","timestamp","description","_ref2$stepProgress","stepProgress","marker","trailing","isDisabled","href","target","onClick","children","_ref2$_index","_ref2$_totalIndex","_totalIndex","_ref2$_nestingLevel","_useStepGroup","useStepGroup","itemsInGroupCount","totalItemsInParentGroupCount","orientation","size","stepType","React","useMemo","itemRef","useRef","isFirstItem","isLastItem","isInteractive","Boolean","isVertical","throwBladeError","message","moduleName","stepItemHeaderJSX","_jsxs","Box","flexDirection","justifyContent","gap","_jsx","Text","stepItemHeaderTokens","color","weight","marginY","variant","stepItemHeaderPaddings","BaseBox","itemLineGap","className","alignItems","undefined","minWidth","makeSize","sizeTokens","flex","metaAttribute","name","MetaConstants","StepItem","ref","StepLine","shouldShowStartBranch","shouldShowEndBranch","marginTop","marginRight","as","disabled","assignWithoutSideEffects","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAMA,wBAAwB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,uCA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AAA,aAAA,CAAA,EAAA,EAAKyD,sBAAsB,CAAA,EAAA,EAAA,EAAA;AAAArC,QAAAA,QAAA,EAAGwB,iBAAAA;AAAiB,OAAA,CAAM,CAC1D,EACAxB,QAAQ,gBACP8B,GAAA,CAACJ,GAAG,EAAA;AAACzE,QAAAA,QAAQ,EAAC,WAAW;AAACD,QAAAA,QAAQ,EAAC,WAAW;AAAAgD,QAAAA,QAAA,EAC3CA,QAAAA;OACE,CAAC,GACJ,IAAI,CAAA;AAAA,KACL,CAAC,CAAA;AAAA,GAAA,CACC,CAAC,CAAA;AAEd,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMkD,QAAQ,gBAAGS,wBAAwB,CAACxE,SAAS,EAAE;EACnD1C,WAAW,EAAEmH,YAAY,CAACV,QAAQ;EAClC1G,WAAW,EAAEoH,YAAY,CAACV,QAAAA;AAC5B,CAAC;;;;"}
@@ -11,7 +11,7 @@ import styled from 'styled-components';
11
11
  import usePresence from 'use-presence';
12
12
  import { TableContext } from './TableContext.js';
13
13
  import { ComponentIds } from './componentIds.js';
14
- import { tableBackgroundColor, firstColumnStickyHeaderFooterZIndex, checkboxCellWidth, tablePagination, refreshWrapperZIndex } from './tokens.js';
14
+ import { tableBackgroundColor, firstColumnStickyZIndex, checkboxCellWidth, tablePagination, refreshWrapperZIndex } from './tokens.js';
15
15
  import '../../utils/index.js';
16
16
  import '../../utils/isValidAllowedChildren/index.js';
17
17
  import '../../utils/logger/index.js';
@@ -161,12 +161,12 @@ var _Table = function _Table(_ref3) {
161
161
 
162
162
  // Table Theme
163
163
  var columnCount = getTableHeaderCellCount(children);
164
- var firstColumnStickyHeaderCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyHeaderFooterZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyHeaderFooterZIndex, " !important;\n }\n ")) : '';
165
- var firstColumnStickyFooterCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyHeaderFooterZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyHeaderFooterZIndex, " !important;\n }\n ")) : '';
166
- var firstColumnStickyBodyCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n }\n ".concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n }\n ")) : '';
164
+ var firstColumnStickyHeaderCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
165
+ var firstColumnStickyFooterCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
166
+ var firstColumnStickyBodyCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
167
167
  var tableTheme = useTheme$1({
168
168
  Table: "\n height:".concat(isFooterSticky ? "100%" : undefined, ";\n border: ").concat(makeBorderSize(theme.border.width.thin), " solid ").concat(theme.colors.surface.border.gray.muted, ";\n --data-table-library_grid-template-columns: ").concat(gridTemplateColumns !== null && gridTemplateColumns !== void 0 ? gridTemplateColumns : " ".concat(selectionType === 'multiple' ? 'min-content' : '', " repeat(").concat(columnCount, ",minmax(100px, 1fr)) !important;"), " !important;\n background-color: ").concat(getIn(theme.colors, backgroundColor), ";\n "),
169
- HeaderCell: "\n position: ".concat(shouldHeaderBeSticky ? 'sticky' : 'relative', ";\n top: ").concat(shouldHeaderBeSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyHeaderCellCSS, "\n "),
169
+ HeaderCell: "\n position: ".concat(shouldHeaderBeSticky ? 'sticky' : 'relative', ";\n \n top: ").concat(shouldHeaderBeSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyHeaderCellCSS, "\n "),
170
170
  Cell: "\n ".concat(firstColumnStickyBodyCellCSS, "\n "),
171
171
  FooterCell: "\n position: ".concat(isFooterSticky ? 'sticky' : 'relative', ";\n bottom: ").concat(isFooterSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyFooterCellCSS, "\n ")
172
172
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyHeaderFooterZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{ $styledProps?: { height?: BoxProps['height'] } }>(\n ({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n });\n\n return {\n '&&&': {\n ...styledPropsCSSObject,\n },\n };\n },\n);\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance.effective\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit.effective\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n ...styledProps\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isHeaderSticky ?? isFirstColumnSticky;\n const backgroundColor = tableBackgroundColor;\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyHeaderFooterZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyHeaderFooterZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyHeaderFooterZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyHeaderFooterZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns ??\n ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (action, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n rowSelectConfig.fns.onToggleById(id);\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (action, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" />\n </BaseBox>\n ) : (\n <BaseBox\n flex={1}\n position=\"relative\"\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {toolbar}\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n $styledProps={{\n height,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\n\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","height","_objectSpread","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","concat","makeMotionTime","motion","duration","quick","easing","entrance","effective","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","showStripedRows","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","styledProps","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","shouldHeaderBeSticky","backgroundColor","tableBackgroundColor","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyHeaderFooterZIndex","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","width","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","action","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","map","item","Boolean","onAddAll","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","Spinner","accessibilityLabel","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAMA,aAGL,GAAG;EACFC,MAAM,EAAEC,WAAW,CAACC,YAAY;EAChCC,QAAQ,EAAEF,WAAW,CAACG,WAAW;AACjCC,EAAAA,IAAI,EAAEC,SAAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,QAA0C,EAAa;AACtF,EAAA,IAAMC,kBAAkB,GAAGD,QAAQ,CAAC,EAAE,CAAC,CAAA;EACvC,IAAIC,kBAAkB,iBAAIC,cAAK,CAACC,cAAc,CAACF,kBAAkB,CAAC,EAAE;IAClE,IAAMG,mBAAmB,GA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A,IAAI,EAAC,OAAO;AACZC,QAAAA,MAAM,EAAE;AAAEC,UAAAA,WAAW,EAAEpH,oBAAoB;AAAEqH,UAAAA,gBAAgB,EAAE,IAAA;SAAO;AACtEvK,QAAAA,IAAI,EAAEA,IAAAA;AACN;AAAA;AACAxB,QAAAA,KAAK,EAAE2F,UAAW;AAClBqG,QAAAA,MAAM,EAAEpK,aAAa,KAAK,MAAM,GAAGyF,eAAe,GAAG,IAAK;AAC1DuB,QAAAA,IAAI,EAAExG,aAAa,GAAGwG,IAAI,GAAG,IAAK;AAClC/I,QAAAA,YAAY,EAAE;AACZM,UAAAA,MAAM,EAANA,MAAAA;SACA;AACFmC,QAAAA,UAAU,EAAEgH,aAAa,GAAGC,gBAAgB,GAAG,IAAA;AAAK,OAAA,EAChD2B,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACvF,KAAAA;AAAM,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA/H,QAAAA,QAAA,EAE/CA,QAAAA;OACe,CAAA,CAAC,EAClBwE,UAAU,CAAA;KACJ,CAAA,CAAA;AACV,GACoB,CAAC,CAAA;AAE5B,CAAC,CAAA;AAED,IAAMuD,KAAK,gBAAGoG,wBAAwB,CAAC3K,MAAM,EAAE;EAC7C3B,WAAW,EAAEf,YAAY,CAACiH,KAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{ $styledProps?: { height?: BoxProps['height'] } }>(\n ({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n });\n\n return {\n '&&&': {\n ...styledPropsCSSObject,\n },\n };\n },\n);\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance.effective\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit.effective\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n ...styledProps\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isHeaderSticky ?? isFirstColumnSticky;\n const backgroundColor = tableBackgroundColor;\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns ??\n ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n \n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (action, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n rowSelectConfig.fns.onToggleById(id);\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (action, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" />\n </BaseBox>\n ) : (\n <BaseBox\n flex={1}\n position=\"relative\"\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {toolbar}\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n $styledProps={{\n height,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\n\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","height","_objectSpread","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","concat","makeMotionTime","motion","duration","quick","easing","entrance","effective","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","showStripedRows","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","styledProps","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","shouldHeaderBeSticky","backgroundColor","tableBackgroundColor","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyZIndex","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","width","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","action","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","map","item","Boolean","onAddAll","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","Spinner","accessibilityLabel","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAMA,aAGL,GAAG;EACFC,MAAM,EAAEC,WAAW,CAACC,YAAY;EAChCC,QAAQ,EAAEF,WAAW,CAACG,WAAW;AACjCC,EAAAA,IAAI,EAAEC,SAAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,QAA0C,EAAa;AACtF,EAAA,IAAMC,kBAAkB,GAAGD,QAAQ,CAAC,EAAE,CAAC,CAAA;EACvC,IAAIC,kBAAkB,iBAAIC,cAAK,CAACC,cAAc,CAACF,kBAAkB,CAAC,EAAE;IAClE,IAAMG,mBAAmB,GAAGF,cAAK,CAACG,QAAQ,CAAC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