@razorpay/blade 12.28.0 → 12.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/build/lib/native/components/Card/Card.js +1 -1
  2. package/build/lib/native/components/Card/Card.js.map +1 -1
  3. package/build/lib/native/components/Preview/Preview.native.js +8 -0
  4. package/build/lib/native/components/Preview/Preview.native.js.map +1 -0
  5. package/build/lib/native/components/index.js +1 -0
  6. package/build/lib/native/components/index.js.map +1 -1
  7. package/build/lib/native/utils/componentZIndices.js +1 -1
  8. package/build/lib/native/utils/componentZIndices.js.map +1 -1
  9. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  10. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  11. package/build/lib/web/development/components/Card/Card.js +3 -1
  12. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  13. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +66 -23
  14. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  15. package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js +1 -1
  16. package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -1
  17. package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js +2 -6
  18. package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js.map +1 -1
  19. package/build/lib/web/development/components/Preview/Preview.web.js +399 -0
  20. package/build/lib/web/development/components/Preview/Preview.web.js.map +1 -0
  21. package/build/lib/web/development/components/Preview/PreviewContext.js +16 -0
  22. package/build/lib/web/development/components/Preview/PreviewContext.js.map +1 -0
  23. package/build/lib/web/development/components/Preview/index.js +2 -0
  24. package/build/lib/web/development/components/Preview/index.js.map +1 -0
  25. package/build/lib/web/development/components/index.js +2 -0
  26. package/build/lib/web/development/components/index.js.map +1 -1
  27. package/build/lib/web/development/utils/componentZIndices.js +2 -1
  28. package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
  29. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +5 -1
  30. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  31. package/build/lib/web/production/components/Card/Card.js +3 -1
  32. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  33. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +66 -23
  34. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  35. package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js +1 -1
  36. package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js.map +1 -1
  37. package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js +2 -6
  38. package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js.map +1 -1
  39. package/build/lib/web/production/components/Preview/Preview.web.js +399 -0
  40. package/build/lib/web/production/components/Preview/Preview.web.js.map +1 -0
  41. package/build/lib/web/production/components/Preview/PreviewContext.js +16 -0
  42. package/build/lib/web/production/components/Preview/PreviewContext.js.map +1 -0
  43. package/build/lib/web/production/components/Preview/index.js +2 -0
  44. package/build/lib/web/production/components/Preview/index.js.map +1 -0
  45. package/build/lib/web/production/components/index.js +2 -0
  46. package/build/lib/web/production/components/index.js.map +1 -1
  47. package/build/lib/web/production/utils/componentZIndices.js +2 -1
  48. package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
  49. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +5 -1
  50. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  51. package/build/types/components/index.d.ts +104 -5
  52. package/build/types/components/index.native.d.ts +104 -5
  53. package/package.json +5 -3
@@ -21,7 +21,7 @@ import { useVerifyAllowedChildren } from '../../utils/useVerifyAllowedChildren/u
21
21
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
22
22
  import { jsx, jsxs } from 'react/jsx-runtime';
23
23
 
24
- var _excluded=["children","backgroundColor","borderRadius","elevation","testID","padding","width","height","minHeight","minWidth","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as"],_excluded2=["height","children","testID"];var ComponentIds={CardHeader:'CardHeader',CardHeaderTrailing:'CardHeaderTrailing',CardHeaderLeading:'CardHeaderLeading',CardFooter:'CardFooter',CardFooterTrailing:'CardFooterTrailing',CardFooterLeading:'CardFooterLeading',CardBody:'CardBody',CardHeaderIcon:'CardHeaderIcon',CardHeaderCounter:'CardHeaderCounter',CardHeaderBadge:'CardHeaderBadge',CardHeaderAmount:'CardHeaderAmount',CardHeaderText:'CardHeaderText',CardHeaderLink:'CardHeaderLink',CardHeaderIconButton:'CardHeaderIconButton'};var _Card=function _Card(_ref,ref){var children=_ref.children,_ref$backgroundColor=_ref.backgroundColor,backgroundColor=_ref$backgroundColor===void 0?'surface.background.gray.intense':_ref$backgroundColor,_ref$borderRadius=_ref.borderRadius,borderRadius=_ref$borderRadius===void 0?'medium':_ref$borderRadius,_ref$elevation=_ref.elevation,elevation=_ref$elevation===void 0?'lowRaised':_ref$elevation,testID=_ref.testID,_ref$padding=_ref.padding,padding=_ref$padding===void 0?'spacing.7':_ref$padding,width=_ref.width,height=_ref.height,minHeight=_ref.minHeight,minWidth=_ref.minWidth,onClick=_ref.onClick,_ref$isSelected=_ref.isSelected,isSelected=_ref$isSelected===void 0?false:_ref$isSelected,accessibilityLabel=_ref.accessibilityLabel,_ref$shouldScaleOnHov=_ref.shouldScaleOnHover,shouldScaleOnHover=_ref$shouldScaleOnHov===void 0?false:_ref$shouldScaleOnHov,onHover=_ref.onHover,href=_ref.href,target=_ref.target,rel=_ref.rel,as=_ref.as,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isFocused=_React$useState2[0],setIsFocused=_React$useState2[1];useVerifyAllowedChildren({children:children,componentName:'Card',allowedComponents:[ComponentIds.CardHeader,ComponentIds.CardBody,ComponentIds.CardFooter]});var linkOverlayProps=Object.assign({},metaAttribute({name:CARD_LINK_OVERLAY_ID}),makeAccessible({label:accessibilityLabel,pressed:href?undefined:isSelected}),{onFocus:function onFocus(){setIsFocused(true);},onBlur:function onBlur(){setIsFocused(false);}});var defaultRel=target&&target==='_blank'?'noreferrer noopener':undefined;return jsx(CardProvider,{children:jsx(CardRoot,Object.assign({as:as,ref:ref,display:'block',borderRadius:borderRadius,onMouseEnter:onHover,shouldScaleOnHover:shouldScaleOnHover,isSelected:isSelected,isFocused:isFocused,onClick:isReactNative()?onClick:undefined,width:width,height:height,minHeight:minHeight,minWidth:minWidth,href:href,accessibilityLabel:accessibilityLabel},metaAttribute({name:MetaConstants.Card,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsxs(CardSurface,{height:height,minHeight:minHeight,padding:padding,borderRadius:borderRadius,elevation:elevation,textAlign:'left',backgroundColor:backgroundColor,children:[href?jsx(LinkOverlay,Object.assign({onClick:onClick,href:href,target:target,rel:rel!=null?rel:defaultRel},linkOverlayProps)):null,!href&&onClick?jsx(LinkOverlay,Object.assign({as:"button",onClick:onClick},linkOverlayProps)):null,children]})}))});};var _CardBody=function _CardBody(_ref2){var height=_ref2.height,children=_ref2.children,testID=_ref2.testID,rest=_objectWithoutProperties(_ref2,_excluded2);useVerifyInsideCard('CardBody');return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.CardBody,testID:testID}),makeAnalyticsAttribute(rest),{height:height,children:children}));};var Card=React__default.forwardRef(_Card);var CardBody=assignWithoutSideEffects(_CardBody,{componentId:ComponentIds.CardBody});
24
+ var _excluded=["children","backgroundColor","borderRadius","elevation","testID","padding","width","height","minHeight","minWidth","maxWidth","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as"],_excluded2=["height","children","testID"];var ComponentIds={CardHeader:'CardHeader',CardHeaderTrailing:'CardHeaderTrailing',CardHeaderLeading:'CardHeaderLeading',CardFooter:'CardFooter',CardFooterTrailing:'CardFooterTrailing',CardFooterLeading:'CardFooterLeading',CardBody:'CardBody',CardHeaderIcon:'CardHeaderIcon',CardHeaderCounter:'CardHeaderCounter',CardHeaderBadge:'CardHeaderBadge',CardHeaderAmount:'CardHeaderAmount',CardHeaderText:'CardHeaderText',CardHeaderLink:'CardHeaderLink',CardHeaderIconButton:'CardHeaderIconButton'};var _Card=function _Card(_ref,ref){var children=_ref.children,_ref$backgroundColor=_ref.backgroundColor,backgroundColor=_ref$backgroundColor===void 0?'surface.background.gray.intense':_ref$backgroundColor,_ref$borderRadius=_ref.borderRadius,borderRadius=_ref$borderRadius===void 0?'medium':_ref$borderRadius,_ref$elevation=_ref.elevation,elevation=_ref$elevation===void 0?'lowRaised':_ref$elevation,testID=_ref.testID,_ref$padding=_ref.padding,padding=_ref$padding===void 0?'spacing.7':_ref$padding,width=_ref.width,height=_ref.height,minHeight=_ref.minHeight,minWidth=_ref.minWidth,maxWidth=_ref.maxWidth,onClick=_ref.onClick,_ref$isSelected=_ref.isSelected,isSelected=_ref$isSelected===void 0?false:_ref$isSelected,accessibilityLabel=_ref.accessibilityLabel,_ref$shouldScaleOnHov=_ref.shouldScaleOnHover,shouldScaleOnHover=_ref$shouldScaleOnHov===void 0?false:_ref$shouldScaleOnHov,onHover=_ref.onHover,href=_ref.href,target=_ref.target,rel=_ref.rel,as=_ref.as,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isFocused=_React$useState2[0],setIsFocused=_React$useState2[1];useVerifyAllowedChildren({children:children,componentName:'Card',allowedComponents:[ComponentIds.CardHeader,ComponentIds.CardBody,ComponentIds.CardFooter]});var linkOverlayProps=Object.assign({},metaAttribute({name:CARD_LINK_OVERLAY_ID}),makeAccessible({label:accessibilityLabel,pressed:href?undefined:isSelected}),{onFocus:function onFocus(){setIsFocused(true);},onBlur:function onBlur(){setIsFocused(false);}});var defaultRel=target&&target==='_blank'?'noreferrer noopener':undefined;return jsx(CardProvider,{children:jsx(CardRoot,Object.assign({as:as,ref:ref,display:'block',borderRadius:borderRadius,onMouseEnter:onHover,shouldScaleOnHover:shouldScaleOnHover,isSelected:isSelected,isFocused:isFocused,onClick:isReactNative()?onClick:undefined,width:width,height:height,minHeight:minHeight,minWidth:minWidth,maxWidth:maxWidth,href:href,accessibilityLabel:accessibilityLabel},metaAttribute({name:MetaConstants.Card,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsxs(CardSurface,{height:height,minHeight:minHeight,padding:padding,borderRadius:borderRadius,elevation:elevation,textAlign:'left',backgroundColor:backgroundColor,children:[href?jsx(LinkOverlay,Object.assign({onClick:onClick,href:href,target:target,rel:rel!=null?rel:defaultRel},linkOverlayProps)):null,!href&&onClick?jsx(LinkOverlay,Object.assign({as:"button",onClick:onClick},linkOverlayProps)):null,children]})}))});};var _CardBody=function _CardBody(_ref2){var height=_ref2.height,children=_ref2.children,testID=_ref2.testID,rest=_objectWithoutProperties(_ref2,_excluded2);useVerifyInsideCard('CardBody');return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.CardBody,testID:testID}),makeAnalyticsAttribute(rest),{height:height,children:children}));};var Card=React__default.forwardRef(_Card);var CardBody=assignWithoutSideEffects(_CardBody,{componentId:ComponentIds.CardBody});
25
25
 
26
26
  export { Card, CardBody, ComponentIds };
27
27
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { CardSurface } from './CardSurface';\nimport { CardProvider, useVerifyInsideCard } from './CardContext';\nimport { LinkOverlay } from './LinkOverlay';\nimport { CardRoot } from './CardRoot';\nimport type { CardSpacingValueType, LinkOverlayProps } from './types';\nimport { CARD_LINK_OVERLAY_ID } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { Elevation } from '~tokens/global';\nimport type { BoxProps } from '~components/Box';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren/useVerifyAllowedChildren';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport const ComponentIds = {\n CardHeader: 'CardHeader',\n CardHeaderTrailing: 'CardHeaderTrailing',\n CardHeaderLeading: 'CardHeaderLeading',\n CardFooter: 'CardFooter',\n CardFooterTrailing: 'CardFooterTrailing',\n CardFooterLeading: 'CardFooterLeading',\n CardBody: 'CardBody',\n CardHeaderIcon: 'CardHeaderIcon',\n CardHeaderCounter: 'CardHeaderCounter',\n CardHeaderBadge: 'CardHeaderBadge',\n CardHeaderAmount: 'CardHeaderAmount',\n CardHeaderText: 'CardHeaderText',\n CardHeaderLink: 'CardHeaderLink',\n CardHeaderIconButton: 'CardHeaderIconButton',\n};\n\ntype CardSurfaceBackgroundColors = `surface.background.gray.${DotNotationToken<\n Theme['colors']['surface']['background']['gray']\n>}`;\n\nexport type CardProps = {\n /**\n * Card contents\n */\n children: React.ReactNode;\n /**\n * Sets the background color of the Card\n *\n * @default `surface.background.gray.intense`\n */\n backgroundColor?: CardSurfaceBackgroundColors;\n /**\n * Sets the border radius of the Card\n *\n * @default `medium`\n */\n borderRadius?: Extract<BoxProps['borderRadius'], 'medium' | 'large' | 'xlarge'>;\n /**\n * Sets the elevation for Cards\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n /**\n * Sets the padding equally on all sides. Only few `spacing` tokens are allowed deliberately\n * @default `spacing.7`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-spacing--docs\n */\n padding?: CardSpacingValueType;\n /**\n * Sets the width of the card\n */\n width?: BoxProps['width'];\n /**\n * Sets the height of the card\n */\n height?: BoxProps['height'];\n /**\n * Sets minimum height of the card\n */\n minHeight?: BoxProps['minHeight'];\n /**\n * Sets minimum width of the card\n */\n minWidth?: BoxProps['minWidth'];\n /**\n * If `true`, the card will be in selected state\n * Card will have a primary color border around it.\n *\n * @default false\n */\n\n isSelected?: boolean;\n /**\n * Makes the Card linkable by setting the `href` prop\n *\n * @default undefined\n */\n href?: string;\n /**\n * Sets the `target` attribute for the linkable card\n */\n target?: string;\n /**\n * Sets the `rel` attribute for the linkable card\n */\n rel?: string;\n /**\n * Sets the accessibility label for the card\n * This is useful when the card has an `href` or `onClick` prop\n * Setting this will announce the label when the card is focused\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the card will scale up on hover\n *\n * On mobile devices it will scale down on press\n *\n * **This prop is deprecated in favour of motion presets released in v12**\n *\n * ### Migration\n *\n * ```diff\n * - <Card\n * - shouldScaleOnHover\n * - />\n *\n * + <Scale motionTriggers={['hover']}>\n * + <Card />\n * + </Scale>\n * ```\n *\n * @default false\n *\n * @deprecated This prop is deprecated in favour of motion presets released in v12\n */\n shouldScaleOnHover?: boolean;\n /**\n * Callback triggered when the card is hovered\n */\n onHover?: () => void;\n /**\n * Callback triggered when the card is clicked\n */\n onClick?: (\n event: Platform.Select<{\n web: React.MouseEvent;\n native: GestureResponderEvent;\n }>,\n ) => void;\n /**\n * Sets the HTML element for the Card\n *\n * When `as` is set to `label`, the card will be rendered as a label element\n * This can be used to create a custom checkbox or radio button using the card\n *\n * @default undefined\n */\n as?: 'label';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst _Card: React.ForwardRefRenderFunction<BladeElementRef, CardProps> = (\n {\n children,\n backgroundColor = 'surface.background.gray.intense',\n borderRadius = 'medium',\n elevation = 'lowRaised',\n testID,\n padding = 'spacing.7',\n width,\n height,\n minHeight,\n minWidth,\n onClick,\n isSelected = false,\n accessibilityLabel,\n shouldScaleOnHover = false,\n onHover,\n href,\n target,\n rel,\n as,\n ...rest\n },\n ref,\n): React.ReactElement => {\n const [isFocused, setIsFocused] = React.useState(false);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Card',\n allowedComponents: [ComponentIds.CardHeader, ComponentIds.CardBody, ComponentIds.CardFooter],\n });\n\n const linkOverlayProps: LinkOverlayProps = {\n ...metaAttribute({ name: CARD_LINK_OVERLAY_ID }),\n ...makeAccessible({ label: accessibilityLabel, pressed: href ? undefined : isSelected }),\n onFocus: () => {\n setIsFocused(true);\n },\n onBlur: () => {\n setIsFocused(false);\n },\n };\n const defaultRel = target && target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <CardProvider>\n <CardRoot\n as={as}\n ref={ref as never}\n display={'block' as never}\n borderRadius={borderRadius}\n onMouseEnter={onHover as never}\n shouldScaleOnHover={shouldScaleOnHover}\n isSelected={isSelected}\n isFocused={isFocused}\n // on react native we need to pass onClick to root, because we don't need the LinkOverlay in RN\n onClick={isReactNative() ? onClick : undefined}\n width={width}\n height={height}\n minHeight={minHeight}\n minWidth={minWidth}\n href={href}\n accessibilityLabel={accessibilityLabel}\n {...metaAttribute({ name: MetaConstants.Card, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <CardSurface\n height={height}\n minHeight={minHeight}\n padding={padding}\n borderRadius={borderRadius}\n elevation={elevation}\n textAlign={'left' as never}\n backgroundColor={backgroundColor}\n >\n {href ? (\n <LinkOverlay\n onClick={onClick}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n {...linkOverlayProps}\n />\n ) : null}\n {!href && onClick ? (\n <LinkOverlay as=\"button\" onClick={onClick} {...linkOverlayProps} />\n ) : null}\n {children}\n </CardSurface>\n </CardRoot>\n </CardProvider>\n );\n};\n\ntype CardBodyProps = {\n children: React.ReactNode;\n height?: BoxProps['height'];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _CardBody = ({ height, children, testID, ...rest }: CardBodyProps): React.ReactElement => {\n useVerifyInsideCard('CardBody');\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.CardBody, testID })}\n {...makeAnalyticsAttribute(rest)}\n height={height}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst Card = React.forwardRef(_Card);\nconst CardBody = assignWithoutSideEffects(_CardBody, { componentId: ComponentIds.CardBody });\n\nexport { Card, CardBody };\n"],"names":["ComponentIds","CardHeader","CardHeaderTrailing","CardHeaderLeading","CardFooter","CardFooterTrailing","CardFooterLeading","CardBody","CardHeaderIcon","CardHeaderCounter","CardHeaderBadge","CardHeaderAmount","CardHeaderText","CardHeaderLink","CardHeaderIconButton","_Card","_ref","ref","children","_ref$backgroundColor","backgroundColor","_ref$borderRadius","borderRadius","_ref$elevation","elevation","testID","_ref$padding","padding","width","height","minHeight","minWidth","onClick","_ref$isSelected","isSelected","accessibilityLabel","_ref$shouldScaleOnHov","shouldScaleOnHover","onHover","href","target","rel","as","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","isFocused","setIsFocused","useVerifyAllowedChildren","componentName","allowedComponents","linkOverlayProps","Object","assign","metaAttribute","name","CARD_LINK_OVERLAY_ID","makeAccessible","label","pressed","undefined","onFocus","onBlur","defaultRel","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;mRAwBa,IAAAA,YAAY,CAAG,CAC1BC,UAAU,CAAE,YAAY,CACxBC,kBAAkB,CAAE,oBAAoB,CACxCC,i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,GAAG,CAAEA,GAAG,OAAHA,GAAG,CAAI2B,UAAW,CACnBZ,CAAAA,gBAAgB,CACrB,CAAC,CACA,IAAI,CACP,CAACjB,IAAI,EAAIP,OAAO,CACfqC,GAAA,CAACa,WAAW,CAAAzB,MAAA,CAAAC,MAAA,CAAA,CAAChB,EAAE,CAAC,QAAQ,CAACV,OAAO,CAAEA,OAAQ,CAAKwB,CAAAA,gBAAgB,CAAG,CAAC,CACjE,IAAI,CACPtC,QAAQ,EACE,CAAC,CAAA,CACN,CAAC,CACC,CAAC,CAEnB,CAAC,CAQD,IAAMiE,SAAS,CAAG,SAAZA,SAASA,CAAAC,KAAA,CAAiF,CAA3E,IAAAvD,MAAM,CAAAuD,KAAA,CAANvD,MAAM,CAAEX,QAAQ,CAAAkE,KAAA,CAARlE,QAAQ,CAAEO,MAAM,CAAA2D,KAAA,CAAN3D,MAAM,CAAKkB,IAAI,CAAAC,wBAAA,CAAAwC,KAAA,CAAAC,UAAA,CACpDC,CAAAA,mBAAmB,CAAC,UAAU,CAAC,CAE/B,OACEjB,GAAA,CAACkB,OAAO,CAAA9B,MAAA,CAAAC,MAAA,CACFC,EAAAA,CAAAA,aAAa,CAAC,CAAEC,IAAI,CAAEe,aAAa,CAACpE,QAAQ,CAAEkB,MAAM,CAANA,MAAO,CAAC,CAAC,CACvDqD,sBAAsB,CAACnC,IAAI,CAAC,EAChCd,MAAM,CAAEA,MAAO,CAAAX,QAAA,CAEdA,QAAQ,CAAA,CACF,CAAC,CAEd,CAAC,CAEK,IAAA0D,IAAI,CAAG7B,cAAK,CAACyC,UAAU,CAACzE,KAAK,EAC7B,IAAAR,QAAQ,CAAGkF,wBAAwB,CAACN,SAAS,CAAE,CAAEO,WAAW,CAAE1F,YAAY,CAACO,QAAS,CAAC;;;;"}
1
+ {"version":3,"file":"Card.js","sources":["../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { CardSurface } from './CardSurface';\nimport { CardProvider, useVerifyInsideCard } from './CardContext';\nimport { LinkOverlay } from './LinkOverlay';\nimport { CardRoot } from './CardRoot';\nimport type { CardSpacingValueType, LinkOverlayProps } from './types';\nimport { CARD_LINK_OVERLAY_ID } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { Elevation } from '~tokens/global';\nimport type { BoxProps } from '~components/Box';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren/useVerifyAllowedChildren';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport const ComponentIds = {\n CardHeader: 'CardHeader',\n CardHeaderTrailing: 'CardHeaderTrailing',\n CardHeaderLeading: 'CardHeaderLeading',\n CardFooter: 'CardFooter',\n CardFooterTrailing: 'CardFooterTrailing',\n CardFooterLeading: 'CardFooterLeading',\n CardBody: 'CardBody',\n CardHeaderIcon: 'CardHeaderIcon',\n CardHeaderCounter: 'CardHeaderCounter',\n CardHeaderBadge: 'CardHeaderBadge',\n CardHeaderAmount: 'CardHeaderAmount',\n CardHeaderText: 'CardHeaderText',\n CardHeaderLink: 'CardHeaderLink',\n CardHeaderIconButton: 'CardHeaderIconButton',\n};\n\ntype CardSurfaceBackgroundColors = `surface.background.gray.${DotNotationToken<\n Theme['colors']['surface']['background']['gray']\n>}`;\n\nexport type CardProps = {\n /**\n * Card contents\n */\n children: React.ReactNode;\n /**\n * Sets the background color of the Card\n *\n * @default `surface.background.gray.intense`\n */\n backgroundColor?: CardSurfaceBackgroundColors;\n /**\n * Sets the border radius of the Card\n *\n * @default `medium`\n */\n borderRadius?: Extract<BoxProps['borderRadius'], 'medium' | 'large' | 'xlarge'>;\n /**\n * Sets the elevation for Cards\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n /**\n * Sets the padding equally on all sides. Only few `spacing` tokens are allowed deliberately\n * @default `spacing.7`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-spacing--docs\n */\n padding?: CardSpacingValueType;\n /**\n * Sets the width of the card\n */\n width?: BoxProps['width'];\n /**\n * Sets the height of the card\n */\n height?: BoxProps['height'];\n /**\n * Sets minimum height of the card\n */\n minHeight?: BoxProps['minHeight'];\n /**\n * Sets minimum width of the card\n */\n minWidth?: BoxProps['minWidth'];\n /**\n * Sets maximum width of the card\n */\n maxWidth?: BoxProps['maxWidth'];\n /**\n * If `true`, the card will be in selected state\n * Card will have a primary color border around it.\n *\n * @default false\n */\n isSelected?: boolean;\n /**\n * Makes the Card linkable by setting the `href` prop\n *\n * @default undefined\n */\n href?: string;\n /**\n * Sets the `target` attribute for the linkable card\n */\n target?: string;\n /**\n * Sets the `rel` attribute for the linkable card\n */\n rel?: string;\n /**\n * Sets the accessibility label for the card\n * This is useful when the card has an `href` or `onClick` prop\n * Setting this will announce the label when the card is focused\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the card will scale up on hover\n *\n * On mobile devices it will scale down on press\n *\n * **This prop is deprecated in favour of motion presets released in v12**\n *\n * ### Migration\n *\n * ```diff\n * - <Card\n * - shouldScaleOnHover\n * - />\n *\n * + <Scale motionTriggers={['hover']}>\n * + <Card />\n * + </Scale>\n * ```\n *\n * @default false\n *\n * @deprecated This prop is deprecated in favour of motion presets released in v12\n */\n shouldScaleOnHover?: boolean;\n /**\n * Callback triggered when the card is hovered\n */\n onHover?: () => void;\n /**\n * Callback triggered when the card is clicked\n */\n onClick?: (\n event: Platform.Select<{\n web: React.MouseEvent;\n native: GestureResponderEvent;\n }>,\n ) => void;\n /**\n * Sets the HTML element for the Card\n *\n * When `as` is set to `label`, the card will be rendered as a label element\n * This can be used to create a custom checkbox or radio button using the card\n *\n * @default undefined\n */\n as?: 'label';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst _Card: React.ForwardRefRenderFunction<BladeElementRef, CardProps> = (\n {\n children,\n backgroundColor = 'surface.background.gray.intense',\n borderRadius = 'medium',\n elevation = 'lowRaised',\n testID,\n padding = 'spacing.7',\n width,\n height,\n minHeight,\n minWidth,\n maxWidth,\n onClick,\n isSelected = false,\n accessibilityLabel,\n shouldScaleOnHover = false,\n onHover,\n href,\n target,\n rel,\n as,\n ...rest\n },\n ref,\n): React.ReactElement => {\n const [isFocused, setIsFocused] = React.useState(false);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Card',\n allowedComponents: [ComponentIds.CardHeader, ComponentIds.CardBody, ComponentIds.CardFooter],\n });\n\n const linkOverlayProps: LinkOverlayProps = {\n ...metaAttribute({ name: CARD_LINK_OVERLAY_ID }),\n ...makeAccessible({ label: accessibilityLabel, pressed: href ? undefined : isSelected }),\n onFocus: () => {\n setIsFocused(true);\n },\n onBlur: () => {\n setIsFocused(false);\n },\n };\n const defaultRel = target && target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <CardProvider>\n <CardRoot\n as={as}\n ref={ref as never}\n display={'block' as never}\n borderRadius={borderRadius}\n onMouseEnter={onHover as never}\n shouldScaleOnHover={shouldScaleOnHover}\n isSelected={isSelected}\n isFocused={isFocused}\n // on react native we need to pass onClick to root, because we don't need the LinkOverlay in RN\n onClick={isReactNative() ? onClick : undefined}\n width={width}\n height={height}\n minHeight={minHeight}\n minWidth={minWidth}\n maxWidth={maxWidth}\n href={href}\n accessibilityLabel={accessibilityLabel}\n {...metaAttribute({ name: MetaConstants.Card, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <CardSurface\n height={height}\n minHeight={minHeight}\n padding={padding}\n borderRadius={borderRadius}\n elevation={elevation}\n textAlign={'left' as never}\n backgroundColor={backgroundColor}\n >\n {href ? (\n <LinkOverlay\n onClick={onClick}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n {...linkOverlayProps}\n />\n ) : null}\n {!href && onClick ? (\n <LinkOverlay as=\"button\" onClick={onClick} {...linkOverlayProps} />\n ) : null}\n {children}\n </CardSurface>\n </CardRoot>\n </CardProvider>\n );\n};\n\ntype CardBodyProps = {\n children: React.ReactNode;\n height?: BoxProps['height'];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _CardBody = ({ height, children, testID, ...rest }: CardBodyProps): React.ReactElement => {\n useVerifyInsideCard('CardBody');\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.CardBody, testID })}\n {...makeAnalyticsAttribute(rest)}\n height={height}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst Card = React.forwardRef(_Card);\nconst CardBody = assignWithoutSideEffects(_CardBody, { componentId: ComponentIds.CardBody });\n\nexport { Card, CardBody };\n"],"names":["ComponentIds","CardHeader","CardHeaderTrailing","CardHeaderLeading","CardFooter","CardFooterTrailing","CardFooterLeading","CardBody","CardHeaderIcon","CardHeaderCounter","CardHeaderBadge","CardHeaderAmount","CardHeaderText","CardHeaderLink","CardHeaderIconButton","_Card","_ref","ref","children","_ref$backgroundColor","backgroundColor","_ref$borderRadius","borderRadius","_ref$elevation","elevation","testID","_ref$padding","padding","width","height","minHeight","minWidth","maxWidth","onClick","_ref$isSelected","isSelected","accessibilityLabel","_ref$shouldScaleOnHov","shouldScaleOnHover","onHover","href","target","rel","as","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","isFocused","setIsFocused","useVerifyAllowedChildren","componentName","allowedComponents","linkOverlayProps","Object","assign","metaAttribute","name","CARD_LINK_OVERLAY_ID","makeAccessible","label","pressed","undefined","onFocus","onBlur","defaultRel","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;8RAwBa,IAAAA,YAAY,CAAG,CAC1BC,UAAU,CAAE,YAAY,CACxBC,kBAAkB,CAAE,oBAAoB,CACxCC,iBAAiB,CAAE,mBAAmB,CACtCC,UAAU,CAAE,YAAY,CACxBC,kBAAkB,CAAE,oBAAoB,CACxCC,iBAAiB,CAAE,mBAAmB,CACtCC,QAAQ,CAAE,UAAU,CACpBC,cAAc,CAAE,gBAAgB,CAChCC,iBAAiB,CAAE,mBAAmB,CACtCC,eAAe,CAAE,iBAAiB,CAClCC,gBAAgB,CAAE,kBAAkB,CACpCC,cAAc,CAAE,gBAAgB,CAChCC,cAAc,CAAE,gBAAgB,CAChCC,oBAAoB,CAAE,sBACxB,EA2IA,IAAMC,KAAiE,CAAG,SAApEA,KAAiEA,CAAAC,IAAA,CAwBrEC,GAAG,CACoB,CAAA,IAvBrBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,oBAAA,CAAAH,IAAA,CACRI,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAG,KAAA,CAAA,CAAA,iCAAiC,CAAAA,oBAAA,CAAAE,iBAAA,CAAAL,IAAA,CACnDM,YAAY,CAAZA,YAAY,CAAAD,iBAAA,UAAG,QAAQ,CAAAA,iBAAA,CAAAE,cAAA,CAAAP,IAAA,CACvBQ,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,WAAW,CAAAA,cAAA,CACvBE,MAAM,CAAAT,IAAA,CAANS,MAAM,CAAAC,YAAA,CAAAV,IAAA,CACNW,OAAO,CAAPA,OAAO,CAAAD,YAAA,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AC,CAAC,CACvDsD,sBAAsB,CAACnC,IAAI,CAAC,EAChCf,MAAM,CAAEA,MAAO,CAAAX,QAAA,CAEdA,QAAQ,CAAA,CACF,CAAC,CAEd,CAAC,CAEK,IAAA2D,IAAI,CAAG7B,cAAK,CAACyC,UAAU,CAAC1E,KAAK,EAC7B,IAAAR,QAAQ,CAAGmF,wBAAwB,CAACN,SAAS,CAAE,CAAEO,WAAW,CAAE3F,YAAY,CAACO,QAAS,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+ import 'react';
2
+ import { throwBladeError } from '../../utils/logger/logger.js';
3
+ import { jsx, Fragment } from 'react/jsx-runtime';
4
+
5
+ var Preview=function Preview(_prop){throwBladeError({message:'PreviewWindow is not yet implemented for native',moduleName:'PreviewWindow'});return jsx(Fragment,{});};var PreviewHeader=function PreviewHeader(_prop){throwBladeError({message:'PreviewHeader is not yet implemented for native',moduleName:'PreviewHeader'});return jsx(Fragment,{});};var PreviewBody=function PreviewBody(_prop){throwBladeError({message:'PreviewBody is not yet implemented for native',moduleName:'PreviewBody'});return jsx(Fragment,{});};var PreviewFooter=function PreviewFooter(_prop){throwBladeError({message:'PreviewFooter is not yet implemented for native',moduleName:'PreviewFooter'});return jsx(Fragment,{});};
6
+
7
+ export { Preview, PreviewBody, PreviewFooter, PreviewHeader };
8
+ //# sourceMappingURL=Preview.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preview.native.js","sources":["../../../../../src/components/Preview/Preview.native.tsx"],"sourcesContent":["import React from 'react';\nimport type {\n PreviewBodyProps,\n PreviewFooterProps,\n PreviewHeaderProps,\n PreviewProps,\n} from './types';\nimport { throwBladeError } from '~utils/logger';\n\nconst Preview = (_prop: PreviewProps): React.ReactElement => {\n throwBladeError({\n message: 'PreviewWindow is not yet implemented for native',\n moduleName: 'PreviewWindow',\n });\n\n return <></>;\n};\n\nconst PreviewHeader = (_prop: PreviewHeaderProps): React.ReactElement => {\n throwBladeError({\n message: 'PreviewHeader is not yet implemented for native',\n moduleName: 'PreviewHeader',\n });\n\n return <></>;\n};\n\nconst PreviewBody = (_prop: PreviewBodyProps): React.ReactElement => {\n throwBladeError({\n message: 'PreviewBody is not yet implemented for native',\n moduleName: 'PreviewBody',\n });\n\n return <></>;\n};\n\nconst PreviewFooter = (_prop: PreviewFooterProps): React.ReactElement => {\n throwBladeError({\n message: 'PreviewFooter is not yet implemented for native',\n moduleName: 'PreviewFooter',\n });\n\n return <></>;\n};\n\nexport { Preview, PreviewHeader, PreviewBody, PreviewFooter };\n"],"names":["Preview","_prop","throwBladeError","message","moduleName","_jsx","_Fragment","PreviewHeader","PreviewBody","PreviewFooter"],"mappings":";;;;AASM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,CAAIC,KAAmB,CAAyB,CAC3DC,eAAe,CAAC,CACdC,OAAO,CAAE,iDAAiD,CAC1DC,UAAU,CAAE,eACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAAAC,QAAA,GAAI,CAAC,CACd,EAEM,IAAAC,aAAa,CAAG,SAAhBA,aAAaA,CAAIN,KAAyB,CAAyB,CACvEC,eAAe,CAAC,CACdC,OAAO,CAAE,iDAAiD,CAC1DC,UAAU,CAAE,eACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAAAC,QAAA,CAAI,EAAA,CAAC,CACd,EAEM,IAAAE,WAAW,CAAG,SAAdA,WAAWA,CAAIP,KAAuB,CAAyB,CACnEC,eAAe,CAAC,CACdC,OAAO,CAAE,+CAA+C,CACxDC,UAAU,CAAE,aACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAAAC,QAAA,CAAA,EAAI,CAAC,CACd,EAEM,IAAAG,aAAa,CAAG,SAAhBA,aAAaA,CAAIR,KAAyB,CAAyB,CACvEC,eAAe,CAAC,CACdC,OAAO,CAAE,iDAAiD,CAC1DC,UAAU,CAAE,eACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAAAC,QAAA,GAAI,CAAC,CACd;;;;"}
@@ -518,6 +518,7 @@ export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden.native.js';
518
518
  export { screenReaderStyles } from './VisuallyHidden/ScreenReaderStyles.js';
519
519
  export { ListView } from './ListView/ListView.native.js';
520
520
  export { ListViewFilters } from './ListView/ListViewFilters.native.js';
521
+ export { Preview, PreviewBody, PreviewFooter, PreviewHeader } from './Preview/Preview.native.js';
521
522
  export { BottomSheetBody } from './BottomSheet/BottomSheetBody.native.js';
522
523
  export { BottomSheetFooter } from './BottomSheet/BottomSheetFooter.native.js';
523
524
  export { BottomSheetHeader } from './BottomSheet/BottomSheetHeader.native.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- var componentZIndices={bottomSheet:100,bottomNav:100,modal:1000,drawer:1001,dropdownOverlay:1002,tourMask:1100,popover:1100,tooltip:1100,topnav:100};
1
+ var componentZIndices={bottomSheet:100,bottomNav:100,modal:1000,drawer:1001,dropdownOverlay:1002,tourMask:1100,popover:1100,tooltip:1100,topnav:100,previewPanel:1100};
2
2
 
3
3
  export { componentZIndices };
4
4
  //# sourceMappingURL=componentZIndices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"componentZIndices.js","sources":["../../../../src/utils/componentZIndices.ts"],"sourcesContent":["// TODO: Move these properly to tokens at some point\nexport const componentZIndices = {\n bottomSheet: 100,\n bottomNav: 100, // should be behind drawer since sidenav opens in drawer in mobile\n modal: 1000,\n drawer: 1001,\n dropdownOverlay: 1002,\n tourMask: 1100,\n popover: 1100,\n tooltip: 1100,\n topnav: 100,\n};\n"],"names":["componentZIndices","bottomSheet","bottomNav","modal","drawer","dropdownOverlay","tourMask","popover","tooltip","topnav"],"mappings":"AACa,IAAAA,iBAAiB,CAAG,CAC/BC,WAAW,CAAE,GAAG,CAChBC,SAAS,CAAE,GAAG,CACdC,KAAK,CAAE,IAAI,CACXC,MAAM,CAAE,IAAI,CACZC,eAAe,CAAE,IAAI,CACrBC,QAAQ,CAAE,IAAI,CACdC,OAAO,CAAE,IAAI,CACbC,OAAO,CAAE,IAAI,CACbC,MAAM,CAAE,GACV;;;;"}
1
+ {"version":3,"file":"componentZIndices.js","sources":["../../../../src/utils/componentZIndices.ts"],"sourcesContent":["// TODO: Move these properly to tokens at some point\nexport const componentZIndices = {\n bottomSheet: 100,\n bottomNav: 100, // should be behind drawer since sidenav opens in drawer in mobile\n modal: 1000,\n drawer: 1001,\n dropdownOverlay: 1002,\n tourMask: 1100,\n popover: 1100,\n tooltip: 1100,\n topnav: 100,\n previewPanel: 1100,\n};\n"],"names":["componentZIndices","bottomSheet","bottomNav","modal","drawer","dropdownOverlay","tourMask","popover","tooltip","topnav","previewPanel"],"mappings":"AACa,IAAAA,iBAAiB,CAAG,CAC/BC,WAAW,CAAE,GAAG,CAChBC,SAAS,CAAE,GAAG,CACdC,KAAK,CAAE,IAAI,CACXC,MAAM,CAAE,IAAI,CACZC,eAAe,CAAE,IAAI,CACrBC,QAAQ,CAAE,IAAI,CACdC,OAAO,CAAE,IAAI,CACbC,OAAO,CAAE,IAAI,CACbC,MAAM,CAAE,GAAG,CACXC,YAAY,CAAE,IAChB;;;;"}
@@ -1,4 +1,4 @@
1
- var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',BaseFilterChip:'base-filter-chip',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',BottomNav:'bottomnav',BottomNavItem:'bottomnav-item',Carousel:'carousel',ChatMessage:'chat-message',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',FilterChipGroup:'filter-chip-group',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',ListView:'list-view',ListViewFilter:'list-view-filter',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',TopNav:'top-nav',TopNavBrand:'top-nav-brand',TopNavContent:'top-nav-content',TopNavActions:'top-nav-actions',TabNav:'tab-nav',TabNavItems:'tab-nav-items',TabNavItem:'tab-nav-item',TabNavItemLink:'tab-nav-item-link',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SideNav:'sidenav',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableCellWrapper:'table-cell-wrapper',TableSortButton:'table-sort-button',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TablePageSelectionButton:'table-page-selection-button',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Menu:'menu',MenuHeader:'menu-header',MenuFooter:'menu-footer',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item'};
1
+ var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',BaseFilterChip:'base-filter-chip',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',BottomNav:'bottomnav',BottomNavItem:'bottomnav-item',Carousel:'carousel',ChatMessage:'chat-message',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',FilterChipGroup:'filter-chip-group',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',ListView:'list-view',ListViewFilter:'list-view-filter',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',TopNav:'top-nav',TopNavBrand:'top-nav-brand',TopNavContent:'top-nav-content',TopNavActions:'top-nav-actions',TabNav:'tab-nav',TabNavItems:'tab-nav-items',TabNavItem:'tab-nav-item',TabNavItemLink:'tab-nav-item-link',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SideNav:'sidenav',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableCellWrapper:'table-cell-wrapper',TableSortButton:'table-sort-button',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TablePageSelectionButton:'table-page-selection-button',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Menu:'menu',MenuHeader:'menu-header',MenuFooter:'menu-footer',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item',PreviewWindow:'preview-window',PreviewHeader:'preview-header',PreviewBody:'preview-body',PreviewFooter:'preview-footer'};
2
2
 
3
3
  export { MetaConstants };
4
4
  //# sourceMappingURL=metaConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatMessage: 'chat-message',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TablePageSelectionButton: 'table-page-selection-button',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatMessage","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,KAAK,CAAE,OAAO,CACdC,cAAc,CAAE,kBAAkB,CAClCC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC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qB,CACxCC,qBAAqB,CAAE,yBAAyB,CAChDC,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,WAAW,CACrBC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,aAAa,CAC1BC,eAAe,CAAE,kBAAkB,CACnCC,iBAAiB,CAAE,oBAAoB,CACvCC,eAAe,CAAE,kBAAkB,CACnCC,IAAI,CAAE,MAAM,CACZC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UAAU,CACpBC,SAAS,CAAE,YAAY,CACvBC,QAAQ,CAAE,WACZ;;;;"}
1
+ {"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatMessage: 'chat-message',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TablePageSelectionButton: 'table-page-selection-button',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n PreviewWindow: 'preview-window',\n PreviewHeader: 'preview-header',\n PreviewBody: 'preview-body',\n PreviewFooter: 'preview-footer',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatMessage","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem","PreviewWindow","PreviewHeader","PreviewBody","PreviewFooter"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,c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ticsAttribute/makeA
25
25
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
26
26
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
27
27
 
28
- var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as"],
28
+ var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "maxWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as"],
29
29
  _excluded2 = ["height", "children", "testID"];
30
30
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31
31
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -60,6 +60,7 @@ var _Card = function _Card(_ref, ref) {
60
60
  height = _ref.height,
61
61
  minHeight = _ref.minHeight,
62
62
  minWidth = _ref.minWidth,
63
+ maxWidth = _ref.maxWidth,
63
64
  onClick = _ref.onClick,
64
65
  _ref$isSelected = _ref.isSelected,
65
66
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
@@ -112,6 +113,7 @@ var _Card = function _Card(_ref, ref) {
112
113
  height: height,
113
114
  minHeight: minHeight,
114
115
  minWidth: minWidth,
116
+ maxWidth: maxWidth,
115
117
  href: href,
116
118
  accessibilityLabel: accessibilityLabel
117
119
  }, metaAttribute({
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { CardSurface } from './CardSurface';\nimport { CardProvider, useVerifyInsideCard } from './CardContext';\nimport { LinkOverlay } from './LinkOverlay';\nimport { CardRoot } from './CardRoot';\nimport type { CardSpacingValueType, LinkOverlayProps } from './types';\nimport { CARD_LINK_OVERLAY_ID } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { Elevation } from '~tokens/global';\nimport type { BoxProps } from '~components/Box';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren/useVerifyAllowedChildren';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport const ComponentIds = {\n CardHeader: 'CardHeader',\n CardHeaderTrailing: 'CardHeaderTrailing',\n CardHeaderLeading: 'CardHeaderLeading',\n CardFooter: 'CardFooter',\n CardFooterTrailing: 'CardFooterTrailing',\n CardFooterLeading: 'CardFooterLeading',\n CardBody: 'CardBody',\n CardHeaderIcon: 'CardHeaderIcon',\n CardHeaderCounter: 'CardHeaderCounter',\n CardHeaderBadge: 'CardHeaderBadge',\n CardHeaderAmount: 'CardHeaderAmount',\n CardHeaderText: 'CardHeaderText',\n CardHeaderLink: 'CardHeaderLink',\n CardHeaderIconButton: 'CardHeaderIconButton',\n};\n\ntype CardSurfaceBackgroundColors = `surface.background.gray.${DotNotationToken<\n Theme['colors']['surface']['background']['gray']\n>}`;\n\nexport type CardProps = {\n /**\n * Card contents\n */\n children: React.ReactNode;\n /**\n * Sets the background color of the Card\n *\n * @default `surface.background.gray.intense`\n */\n backgroundColor?: CardSurfaceBackgroundColors;\n /**\n * Sets the border radius of the Card\n *\n * @default `medium`\n */\n borderRadius?: Extract<BoxProps['borderRadius'], 'medium' | 'large' | 'xlarge'>;\n /**\n * Sets the elevation for Cards\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n /**\n * Sets the padding equally on all sides. Only few `spacing` tokens are allowed deliberately\n * @default `spacing.7`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-spacing--docs\n */\n padding?: CardSpacingValueType;\n /**\n * Sets the width of the card\n */\n width?: BoxProps['width'];\n /**\n * Sets the height of the card\n */\n height?: BoxProps['height'];\n /**\n * Sets minimum height of the card\n */\n minHeight?: BoxProps['minHeight'];\n /**\n * Sets minimum width of the card\n */\n minWidth?: BoxProps['minWidth'];\n /**\n * If `true`, the card will be in selected state\n * Card will have a primary color border around it.\n *\n * @default false\n */\n\n isSelected?: boolean;\n /**\n * Makes the Card linkable by setting the `href` prop\n *\n * @default undefined\n */\n href?: string;\n /**\n * Sets the `target` attribute for the linkable card\n */\n target?: string;\n /**\n * Sets the `rel` attribute for the linkable card\n */\n rel?: string;\n /**\n * Sets the accessibility label for the card\n * This is useful when the card has an `href` or `onClick` prop\n * Setting this will announce the label when the card is focused\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the card will scale up on hover\n *\n * On mobile devices it will scale down on press\n *\n * **This prop is deprecated in favour of motion presets released in v12**\n *\n * ### Migration\n *\n * ```diff\n * - <Card\n * - shouldScaleOnHover\n * - />\n *\n * + <Scale motionTriggers={['hover']}>\n * + <Card />\n * + </Scale>\n * ```\n *\n * @default false\n *\n * @deprecated This prop is deprecated in favour of motion presets released in v12\n */\n shouldScaleOnHover?: boolean;\n /**\n * Callback triggered when the card is hovered\n */\n onHover?: () => void;\n /**\n * Callback triggered when the card is clicked\n */\n onClick?: (\n event: Platform.Select<{\n web: React.MouseEvent;\n native: GestureResponderEvent;\n }>,\n ) => void;\n /**\n * Sets the HTML element for the Card\n *\n * When `as` is set to `label`, the card will be rendered as a label element\n * This can be used to create a custom checkbox or radio button using the card\n *\n * @default undefined\n */\n as?: 'label';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst _Card: React.ForwardRefRenderFunction<BladeElementRef, CardProps> = (\n {\n children,\n backgroundColor = 'surface.background.gray.intense',\n borderRadius = 'medium',\n elevation = 'lowRaised',\n testID,\n padding = 'spacing.7',\n width,\n height,\n minHeight,\n minWidth,\n onClick,\n isSelected = false,\n accessibilityLabel,\n shouldScaleOnHover = false,\n onHover,\n href,\n target,\n rel,\n as,\n ...rest\n },\n ref,\n): React.ReactElement => {\n const [isFocused, setIsFocused] = React.useState(false);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Card',\n allowedComponents: [ComponentIds.CardHeader, ComponentIds.CardBody, ComponentIds.CardFooter],\n });\n\n const linkOverlayProps: LinkOverlayProps = {\n ...metaAttribute({ name: CARD_LINK_OVERLAY_ID }),\n ...makeAccessible({ label: accessibilityLabel, pressed: href ? undefined : isSelected }),\n onFocus: () => {\n setIsFocused(true);\n },\n onBlur: () => {\n setIsFocused(false);\n },\n };\n const defaultRel = target && target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <CardProvider>\n <CardRoot\n as={as}\n ref={ref as never}\n display={'block' as never}\n borderRadius={borderRadius}\n onMouseEnter={onHover as never}\n shouldScaleOnHover={shouldScaleOnHover}\n isSelected={isSelected}\n isFocused={isFocused}\n // on react native we need to pass onClick to root, because we don't need the LinkOverlay in RN\n onClick={isReactNative() ? onClick : undefined}\n width={width}\n height={height}\n minHeight={minHeight}\n minWidth={minWidth}\n href={href}\n accessibilityLabel={accessibilityLabel}\n {...metaAttribute({ name: MetaConstants.Card, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <CardSurface\n height={height}\n minHeight={minHeight}\n padding={padding}\n borderRadius={borderRadius}\n elevation={elevation}\n textAlign={'left' as never}\n backgroundColor={backgroundColor}\n >\n {href ? (\n <LinkOverlay\n onClick={onClick}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n {...linkOverlayProps}\n />\n ) : null}\n {!href && onClick ? (\n <LinkOverlay as=\"button\" onClick={onClick} {...linkOverlayProps} />\n ) : null}\n {children}\n </CardSurface>\n </CardRoot>\n </CardProvider>\n );\n};\n\ntype CardBodyProps = {\n children: React.ReactNode;\n height?: BoxProps['height'];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _CardBody = ({ height, children, testID, ...rest }: CardBodyProps): React.ReactElement => {\n useVerifyInsideCard('CardBody');\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.CardBody, testID })}\n {...makeAnalyticsAttribute(rest)}\n height={height}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst Card = React.forwardRef(_Card);\nconst CardBody = assignWithoutSideEffects(_CardBody, { componentId: ComponentIds.CardBody });\n\nexport { Card, CardBody };\n"],"names":["ComponentIds","CardHeader","CardHeaderTrailing","CardHeaderLeading","CardFooter","CardFooterTrailing","CardFooterLeading","CardBody","CardHeaderIcon","CardHeaderCounter","CardHeaderBadge","CardHeaderAmount","CardHeaderText","CardHeaderLink","CardHeaderIconButton","_Card","_ref","ref","children","_ref$backgroundColor","backgroundColor","_ref$borderRadius","borderRadius","_ref$elevation","elevation","testID","_ref$padding","padding","width","height","minHeight","minWidth","onClick","_ref$isSelected","isSelected","accessibilityLabel","_ref$shouldScaleOnHov","shouldScaleOnHover","onHover","href","target","rel","as","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","isFocused","setIsFocused","useVerifyAllowedChildren","componentName","allowedComponents","linkOverlayProps","_objectSpread","metaAttribute","name","CARD_LINK_OVERLAY_ID","makeAccessible","label","pressed","undefined","onFocus","onBlur","defaultRel","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,IAAMA,YAAY,GAAG;AAC1BC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,eAAe,EAAE,iBAAiB;AAClCC,EAAAA,gBAAgB,EAAE,kBAAkB;AACpCC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,oBAAoB,EAAE,sBAAA;AACxB,EAAC;AAwID,IAAMC,KAAiE,GAAG,SAApEA,KAAiEA,CAAAC,IAAA,EAuBrEC,GAAG,EACoB;AAAA,EAAA,IAtBrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,iCAAiC,GAAAA,oBAAA;IAAAE,iBAAA,GAAAL,IAAA,CACnDM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,G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/Card.tsx"],"sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { CardSurface } from './CardSurface';\nimport { CardProvider, useVerifyInsideCard } from './CardContext';\nimport { LinkOverlay } from './LinkOverlay';\nimport { CardRoot } from './CardRoot';\nimport type { CardSpacingValueType, LinkOverlayProps } from './types';\nimport { CARD_LINK_OVERLAY_ID } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { Elevation } from '~tokens/global';\nimport type { BoxProps } from '~components/Box';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren/useVerifyAllowedChildren';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport const ComponentIds = {\n CardHeader: 'CardHeader',\n CardHeaderTrailing: 'CardHeaderTrailing',\n CardHeaderLeading: 'CardHeaderLeading',\n CardFooter: 'CardFooter',\n CardFooterTrailing: 'CardFooterTrailing',\n CardFooterLeading: 'CardFooterLeading',\n CardBody: 'CardBody',\n CardHeaderIcon: 'CardHeaderIcon',\n CardHeaderCounter: 'CardHeaderCounter',\n CardHeaderBadge: 'CardHeaderBadge',\n CardHeaderAmount: 'CardHeaderAmount',\n CardHeaderText: 'CardHeaderText',\n CardHeaderLink: 'CardHeaderLink',\n CardHeaderIconButton: 'CardHeaderIconButton',\n};\n\ntype CardSurfaceBackgroundColors = `surface.background.gray.${DotNotationToken<\n Theme['colors']['surface']['background']['gray']\n>}`;\n\nexport type CardProps = {\n /**\n * Card contents\n */\n children: React.ReactNode;\n /**\n * Sets the background color of the Card\n *\n * @default `surface.background.gray.intense`\n */\n backgroundColor?: CardSurfaceBackgroundColors;\n /**\n * Sets the border radius of the Card\n *\n * @default `medium`\n */\n borderRadius?: Extract<BoxProps['borderRadius'], 'medium' | 'large' | 'xlarge'>;\n /**\n * Sets the elevation for Cards\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n /**\n * Sets the padding equally on all sides. Only few `spacing` tokens are allowed deliberately\n * @default `spacing.7`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-spacing--docs\n */\n padding?: CardSpacingValueType;\n /**\n * Sets the width of the card\n */\n width?: BoxProps['width'];\n /**\n * Sets the height of the card\n */\n height?: BoxProps['height'];\n /**\n * Sets minimum height of the card\n */\n minHeight?: BoxProps['minHeight'];\n /**\n * Sets minimum width of the card\n */\n minWidth?: BoxProps['minWidth'];\n /**\n * Sets maximum width of the card\n */\n maxWidth?: BoxProps['maxWidth'];\n /**\n * If `true`, the card will be in selected state\n * Card will have a primary color border around it.\n *\n * @default false\n */\n isSelected?: boolean;\n /**\n * Makes the Card linkable by setting the `href` prop\n *\n * @default undefined\n */\n href?: string;\n /**\n * Sets the `target` attribute for the linkable card\n */\n target?: string;\n /**\n * Sets the `rel` attribute for the linkable card\n */\n rel?: string;\n /**\n * Sets the accessibility label for the card\n * This is useful when the card has an `href` or `onClick` prop\n * Setting this will announce the label when the card is focused\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the card will scale up on hover\n *\n * On mobile devices it will scale down on press\n *\n * **This prop is deprecated in favour of motion presets released in v12**\n *\n * ### Migration\n *\n * ```diff\n * - <Card\n * - shouldScaleOnHover\n * - />\n *\n * + <Scale motionTriggers={['hover']}>\n * + <Card />\n * + </Scale>\n * ```\n *\n * @default false\n *\n * @deprecated This prop is deprecated in favour of motion presets released in v12\n */\n shouldScaleOnHover?: boolean;\n /**\n * Callback triggered when the card is hovered\n */\n onHover?: () => void;\n /**\n * Callback triggered when the card is clicked\n */\n onClick?: (\n event: Platform.Select<{\n web: React.MouseEvent;\n native: GestureResponderEvent;\n }>,\n ) => void;\n /**\n * Sets the HTML element for the Card\n *\n * When `as` is set to `label`, the card will be rendered as a label element\n * This can be used to create a custom checkbox or radio button using the card\n *\n * @default undefined\n */\n as?: 'label';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst _Card: React.ForwardRefRenderFunction<BladeElementRef, CardProps> = (\n {\n children,\n backgroundColor = 'surface.background.gray.intense',\n borderRadius = 'medium',\n elevation = 'lowRaised',\n testID,\n padding = 'spacing.7',\n width,\n height,\n minHeight,\n minWidth,\n maxWidth,\n onClick,\n isSelected = false,\n accessibilityLabel,\n shouldScaleOnHover = false,\n onHover,\n href,\n target,\n rel,\n as,\n ...rest\n },\n ref,\n): React.ReactElement => {\n const [isFocused, setIsFocused] = React.useState(false);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Card',\n allowedComponents: [ComponentIds.CardHeader, ComponentIds.CardBody, ComponentIds.CardFooter],\n });\n\n const linkOverlayProps: LinkOverlayProps = {\n ...metaAttribute({ name: CARD_LINK_OVERLAY_ID }),\n ...makeAccessible({ label: accessibilityLabel, pressed: href ? undefined : isSelected }),\n onFocus: () => {\n setIsFocused(true);\n },\n onBlur: () => {\n setIsFocused(false);\n },\n };\n const defaultRel = target && target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <CardProvider>\n <CardRoot\n as={as}\n ref={ref as never}\n display={'block' as never}\n borderRadius={borderRadius}\n onMouseEnter={onHover as never}\n shouldScaleOnHover={shouldScaleOnHover}\n isSelected={isSelected}\n isFocused={isFocused}\n // on react native we need to pass onClick to root, because we don't need the LinkOverlay in RN\n onClick={isReactNative() ? onClick : undefined}\n width={width}\n height={height}\n minHeight={minHeight}\n minWidth={minWidth}\n maxWidth={maxWidth}\n href={href}\n accessibilityLabel={accessibilityLabel}\n {...metaAttribute({ name: MetaConstants.Card, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <CardSurface\n height={height}\n minHeight={minHeight}\n padding={padding}\n borderRadius={borderRadius}\n elevation={elevation}\n textAlign={'left' as never}\n backgroundColor={backgroundColor}\n >\n {href ? (\n <LinkOverlay\n onClick={onClick}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n {...linkOverlayProps}\n />\n ) : null}\n {!href && onClick ? (\n <LinkOverlay as=\"button\" onClick={onClick} {...linkOverlayProps} />\n ) : null}\n {children}\n </CardSurface>\n </CardRoot>\n </CardProvider>\n );\n};\n\ntype CardBodyProps = {\n children: React.ReactNode;\n height?: BoxProps['height'];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _CardBody = ({ height, children, testID, ...rest }: CardBodyProps): React.ReactElement => {\n useVerifyInsideCard('CardBody');\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.CardBody, testID })}\n {...makeAnalyticsAttribute(rest)}\n height={height}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst Card = React.forwardRef(_Card);\nconst CardBody = assignWithoutSideEffects(_CardBody, { componentId: ComponentIds.CardBody });\n\nexport { Card, CardBody };\n"],"names":["ComponentIds","CardHeader","CardHeaderTrailing","CardHeaderLeading","CardFooter","CardFooterTrailing","CardFooterLeading","CardBody","CardHeaderIcon","CardHeaderCounter","CardHeaderBadge","CardHeaderAmount","CardHeaderText","CardHeaderLink","CardHeaderIconButton","_Card","_ref","ref","children","_ref$backgroundColor","backgroundColor","_ref$borderRadius","borderRadius","_ref$elevation","elevation","testID","_ref$padding","padding","width","height","minHeight","minWidth","maxWidth","onClick","_ref$isSelected","isSelected","accessibilityLabel","_ref$shouldScaleOnHov","shouldScaleOnHover","onHover","href","target","rel","as","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","isFocused","setIsFocused","useVerifyAllowedChildren","componentName","allowedComponents","linkOverlayProps","_objectSpread","metaAttribute","name","CARD_LINK_OVERLAY_ID","makeAccessible","label","pressed","undefined","onFocus","onBlur","defaultRel","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,IAAMA,YAAY,GAAG;AAC1BC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,eAAe,EAAE,iBAAiB;AAClCC,EAAAA,gBAAgB,EAAE,kBAAkB;AACpCC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,oBAAoB,EAAE,sBAAA;AACxB,EAAC;AA2ID,IAAMC,KAAiE,GAAG,SAApEA,KAAiEA,CAAAC,IAAA,EAwBrEC,GAAG,EACoB;AAAA,EAAA,IAvBrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,iCAAiC,GAAAA,oBAAA;IAAAE,iBAAA,GAAAL,IAAA,CACnDM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CA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AAY,CAACO,QAAAA;AAAS,CAAC;;;;"}
@@ -4,9 +4,10 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
5
5
  import { useRef, useState, useMemo, useCallback, forwardRef } from 'react';
6
6
  import { StyledFileUploadWrapper } from './StyledFileUploadWrapper.js';
7
- import { fileUploadColorTokens, getFileUploadInputHoverTokens, fileUploadLinkBorderTokens } from './fileUploadTokens.js';
7
+ import { fileUploadHeightTokens, fileUploadColorTokens, getFileUploadInputHoverTokens, fileUploadLinkBorderTokens } from './fileUploadTokens.js';
8
8
  import { FileUploadItem } from './FileUploadItem.js';
9
9
  import { isFileAccepted } from './isFileAccepted.js';
10
+ import { FileUploadItemIcon } from './FileUploadItemIcon.js';
10
11
  import '../Box/BaseBox/index.js';
11
12
  import '../Box/index.js';
12
13
  import { SelectorLabel } from '../Form/Selector/SelectorLabel.web.js';
@@ -26,9 +27,12 @@ import { useMergeRefs } from '../../utils/useMergeRefs.js';
26
27
  import { useControllableState } from '../../utils/useControllable.js';
27
28
  import { getOuterMotionRef, getInnerMotionRef } from '../../utils/getMotionRefs.js';
28
29
  import '../../utils/makeAnalyticsAttribute/index.js';
30
+ import '../../utils/logger/index.js';
29
31
  import { jsxs, jsx } from 'react/jsx-runtime';
32
+ import { throwBladeError } from '../../utils/logger/logger.js';
30
33
  import useTheme from '../BladeProvider/useTheme.js';
31
34
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
35
+ import { makeSize } from '../../utils/makeSize/makeSize.js';
32
36
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
33
37
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
34
38
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
@@ -36,7 +40,6 @@ import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
36
40
  import { FormLabel } from '../Form/FormLabel.js';
37
41
  import { screenReaderStyles } from '../VisuallyHidden/ScreenReaderStyles.js';
38
42
  import { Box } from '../Box/Box.js';
39
- import { makeSize } from '../../utils/makeSize/makeSize.js';
40
43
  import { Text } from '../Typography/Text/Text.js';
41
44
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
42
45
  import { FormHint } from '../Form/FormHint.js';
@@ -77,6 +80,30 @@ var _FileUpload = function _FileUpload(_ref, ref) {
77
80
  size = _ref$size === void 0 ? 'medium' : _ref$size,
78
81
  _motionMeta = _ref._motionMeta,
79
82
  rest = _objectWithoutProperties(_ref, _excluded);
83
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
84
+ var _ref2 = rest,
85
+ actionButtonText = _ref2.actionButtonText,
86
+ dropAreaText = _ref2.dropAreaText,
87
+ height = _ref2.height,
88
+ width = _ref2.width;
89
+ var isSizeVariable = size === 'variable';
90
+ // 'actionButtonText', 'dropAreaText', 'height', 'width' are only valid when size is 'variable'
91
+ if (true) {
92
+ if (!isSizeVariable && (actionButtonText || dropAreaText)) {
93
+ var propName = actionButtonText && dropAreaText ? 'actionButtonText and dropAreaText' : dropAreaText ? 'dropAreaText' : 'actionButtonText';
94
+ throwBladeError({
95
+ message: "".concat(propName, " can only be used when size is \"variable\""),
96
+ moduleName: 'FileUpload'
97
+ });
98
+ }
99
+ if (!isSizeVariable && (height || width)) {
100
+ var _propName = height && width ? 'height and width' : height ? 'height' : 'width';
101
+ throwBladeError({
102
+ message: "".concat(_propName, " can only be used when size is \"variable\""),
103
+ moduleName: 'FileUpload'
104
+ });
105
+ }
106
+ }
80
107
  var inputRef = useRef(null);
81
108
  var mergedRef = useMergeRefs(ref, inputRef);
82
109
  var _useTheme = useTheme(),
@@ -213,6 +240,17 @@ var _FileUpload = function _FileUpload(_ref, ref) {
213
240
  // Reset the input value to allow re-selecting the same file
214
241
  event.target.value = '';
215
242
  };
243
+ var getFileIconExtension = function getFileIconExtension(acceptValue) {
244
+ if (!acceptValue) return 'example.xyz';
245
+ var extensions = acceptValue.split(',').map(function (ext) {
246
+ return ext.trim();
247
+ }).filter(function (ext) {
248
+ return ext.startsWith('.');
249
+ });
250
+ return extensions.length === 1 ? "example".concat(extensions[0]) : 'example.xyz';
251
+ };
252
+ var computedHeight = isSizeVariable ? height !== null && height !== void 0 ? height : '100%' : makeSize(fileUploadHeightTokens[size]);
253
+ var computedWidth = isSizeVariable ? width !== null && width !== void 0 ? width : '100%' : '100%';
216
254
  return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread({
217
255
  ref: getOuterMotionRef({
218
256
  _motionMeta: _motionMeta,
@@ -232,7 +270,7 @@ var _FileUpload = function _FileUpload(_ref, ref) {
232
270
  position: "relative",
233
271
  width: "100%",
234
272
  children: [label ? /*#__PURE__*/jsx(FormLabel, {
235
- size: size,
273
+ size: isSizeVariable ? 'large' : size,
236
274
  as: "span",
237
275
  necessityIndicator: necessityIndicator,
238
276
  position: labelPosition,
@@ -244,7 +282,7 @@ var _FileUpload = function _FileUpload(_ref, ref) {
244
282
  inputProps: {},
245
283
  style: {
246
284
  cursor: isDisabled ? 'not-allowed' : 'pointer',
247
- width: '100%'
285
+ width: isOneFileSelectedWithSingleUpload && isLabelLeftPositioned ? undefined : '100%'
248
286
  },
249
287
  children: /*#__PURE__*/jsx(BaseBox, {
250
288
  display: "flex",
@@ -258,6 +296,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
258
296
  flexDirection: "row",
259
297
  justifyContent: "center",
260
298
  alignItems: "center",
299
+ height: computedHeight,
300
+ width: computedWidth,
261
301
  borderRadius: "medium",
262
302
  borderWidth: "thin",
263
303
  onDragOver: handleDragOver,
@@ -274,13 +314,16 @@ var _FileUpload = function _FileUpload(_ref, ref) {
274
314
  alignItems: "center",
275
315
  flexDirection: {
276
316
  base: 'column',
277
- s: 'row'
317
+ s: "".concat(isSizeVariable ? 'column' : 'row')
278
318
  },
279
319
  gap: makeSize(6),
280
320
  padding: "spacing.3",
281
- children: [/*#__PURE__*/jsxs(Text, {
321
+ children: [isSizeVariable && /*#__PURE__*/jsx(FileUploadItemIcon, {
322
+ fileName: getFileIconExtension(accept),
323
+ uploadStatus: "success"
324
+ }), /*#__PURE__*/jsxs(Text, {
282
325
  color: isDisabled ? fileUploadColorTokens.text.disabled : fileUploadColorTokens.text["default"],
283
- children: ["Drag files here or", ' ']
326
+ children: [isSizeVariable ? dropAreaText !== null && dropAreaText !== void 0 ? dropAreaText : 'Drag and drop your files here' : 'Drag files here or', ' ']
284
327
  }), /*#__PURE__*/jsx(SelectorInput, _objectSpread({
285
328
  id: inputId,
286
329
  hoverTokens: getFileUploadInputHoverTokens(),
@@ -319,7 +362,7 @@ var _FileUpload = function _FileUpload(_ref, ref) {
319
362
  borderBottomWidth: fileUploadLinkBorderTokens.width["default"],
320
363
  children: /*#__PURE__*/jsx(Text, {
321
364
  color: isDisabled ? fileUploadColorTokens.link.disabled : fileUploadColorTokens.link["default"],
322
- children: "Upload"
365
+ children: actionButtonText !== null && actionButtonText !== void 0 ? actionButtonText : 'Upload'
323
366
  })
324
367
  })
325
368
  })]
@@ -330,8 +373,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
330
373
  file: selectedFiles[0],
331
374
  size: size,
332
375
  onRemove: function onRemove() {
333
- var newFiles = selectedFiles.filter(function (_ref2) {
334
- var id = _ref2.id;
376
+ var newFiles = selectedFiles.filter(function (_ref3) {
377
+ var id = _ref3.id;
335
378
  return id !== selectedFiles[0].id;
336
379
  });
337
380
  setSelectedFiles(function () {
@@ -343,8 +386,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
343
386
  },
344
387
  onReupload: function onReupload() {
345
388
  var _inputRef$current;
346
- var newFiles = selectedFiles.filter(function (_ref3) {
347
- var id = _ref3.id;
389
+ var newFiles = selectedFiles.filter(function (_ref4) {
390
+ var id = _ref4.id;
348
391
  return id !== selectedFiles[0].id;
349
392
  });
350
393
  setSelectedFiles(function () {
@@ -366,8 +409,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
366
409
  setIsActive(false);
367
410
  },
368
411
  onDismiss: function onDismiss() {
369
- var newFiles = selectedFiles.filter(function (_ref4) {
370
- var id = _ref4.id;
412
+ var newFiles = selectedFiles.filter(function (_ref5) {
413
+ var id = _ref5.id;
371
414
  return id !== selectedFiles[0].id;
372
415
  });
373
416
  setSelectedFiles(function () {
@@ -380,13 +423,13 @@ var _FileUpload = function _FileUpload(_ref, ref) {
380
423
  onPreview: onPreview
381
424
  })]
382
425
  }), willRenderHintText && /*#__PURE__*/jsx(BaseBox, {
383
- marginLeft: makeSize(label && isLabelLeftPositioned ? formHintLeftLabelMarginLeft[size] : 0),
426
+ marginLeft: makeSize(label && isLabelLeftPositioned ? formHintLeftLabelMarginLeft[isSizeVariable ? 'large' : size] : 0),
384
427
  children: /*#__PURE__*/jsx(BaseBox, {
385
428
  display: "flex",
386
429
  flexDirection: "row",
387
430
  justifyContent: "'space-between",
388
431
  children: /*#__PURE__*/jsx(FormHint, {
389
- size: size,
432
+ size: isSizeVariable ? 'large' : size,
390
433
  type: getHintType({
391
434
  validationState: showError ? 'error' : validationState,
392
435
  hasHelpText: Boolean(helpText)
@@ -399,14 +442,14 @@ var _FileUpload = function _FileUpload(_ref, ref) {
399
442
  })
400
443
  }), !isOneFileSelectedWithSingleUpload && selectedFiles.map(function (file, index) {
401
444
  return /*#__PURE__*/jsx(BaseBox, {
402
- marginLeft: makeSize(label && isLabelLeftPositioned ? formHintLeftLabelMarginLeft[size] : 0),
445
+ marginLeft: makeSize(label && isLabelLeftPositioned ? formHintLeftLabelMarginLeft[isSizeVariable ? 'large' : size] : 0),
403
446
  marginTop: index === 0 ? 'spacing.5' : 'spacing.3',
404
447
  children: /*#__PURE__*/jsx(FileUploadItem, {
405
448
  file: file,
406
449
  size: size,
407
450
  onRemove: function onRemove() {
408
- var newFiles = selectedFiles.filter(function (_ref5) {
409
- var id = _ref5.id;
451
+ var newFiles = selectedFiles.filter(function (_ref6) {
452
+ var id = _ref6.id;
410
453
  return id !== file.id;
411
454
  });
412
455
  setSelectedFiles(function () {
@@ -418,8 +461,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
418
461
  },
419
462
  onReupload: function onReupload() {
420
463
  var _inputRef$current2;
421
- var newFiles = selectedFiles.filter(function (_ref6) {
422
- var id = _ref6.id;
464
+ var newFiles = selectedFiles.filter(function (_ref7) {
465
+ var id = _ref7.id;
423
466
  return id !== file.id;
424
467
  });
425
468
  setSelectedFiles(function () {
@@ -440,8 +483,8 @@ var _FileUpload = function _FileUpload(_ref, ref) {
440
483
  setIsActive(false);
441
484
  },
442
485
  onDismiss: function onDismiss() {
443
- var newFiles = selectedFiles.filter(function (_ref7) {
444
- var id = _ref7.id;
486
+ var newFiles = selectedFiles.filter(function (_ref8) {
487
+ var id = _ref8.id;
445
488
  return id !== file.id;
446
489
  });
447
490
  setSelectedFiles(function () {