@razorpay/blade 12.61.0 → 12.62.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.
- package/build/lib/native/components/Card/Card.js +1 -1
- package/build/lib/native/components/Card/Card.js.map +1 -1
- package/build/lib/native/components/VisuallyHidden/ScreenReaderStyles.js +2 -2
- package/build/lib/native/components/VisuallyHidden/ScreenReaderStyles.js.map +1 -1
- package/build/lib/native/components/index.js +1 -1
- package/build/lib/web/development/components/Card/Card.js +4 -2
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js +3 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +4 -9
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/VisuallyHidden/ScreenReaderStyles.js +1 -17
- package/build/lib/web/development/components/VisuallyHidden/ScreenReaderStyles.js.map +1 -1
- package/build/lib/web/development/components/VisuallyHidden/index.web.js +1 -1
- package/build/lib/web/development/components/index.js +1 -1
- package/build/lib/web/production/components/Card/Card.js +4 -2
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +3 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +4 -9
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/VisuallyHidden/ScreenReaderStyles.js +1 -17
- package/build/lib/web/production/components/VisuallyHidden/ScreenReaderStyles.js.map +1 -1
- package/build/lib/web/production/components/VisuallyHidden/index.web.js +1 -1
- package/build/lib/web/production/components/index.js +1 -1
- package/build/types/components/index.d.ts +9 -2
- package/build/types/components/index.native.d.ts +6 -2
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import { useCheckboxGroupContext } from '../Checkbox/CheckboxGroup/CheckboxGroup
|
|
|
23
23
|
import { useRadioGroupContext } from '../Radio/RadioGroup/RadioContext.js';
|
|
24
24
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
25
25
|
|
|
26
|
-
var _excluded=["children","backgroundColor","borderRadius","elevation","testID","padding","width","height","minHeight","minWidth","maxWidth","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as","size"],_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,_ref$size=_ref.size,size=_ref$size===void 0?'large':_ref$size,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;var checkboxGroupProps=useCheckboxGroupContext();var radioGroupProps=useRadioGroupContext();var getGroupProps=function getGroupProps(){if(Object.keys(checkboxGroupProps).length>0)return checkboxGroupProps;if(Object.keys(radioGroupProps).length>0)return radioGroupProps;return undefined;};var groupProps=getGroupProps();var _validationState=groupProps==null?void 0:groupProps.validationState;return jsx(CardProvider,{size:size,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,validationState:_validationState},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});
|
|
26
|
+
var _excluded=["children","backgroundColor","borderRadius","elevation","testID","padding","width","height","minHeight","minWidth","maxWidth","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as","size","cursor"],_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,_ref$size=_ref.size,size=_ref$size===void 0?'large':_ref$size,cursor=_ref.cursor,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;var checkboxGroupProps=useCheckboxGroupContext();var radioGroupProps=useRadioGroupContext();var getGroupProps=function getGroupProps(){if(Object.keys(checkboxGroupProps).length>0)return checkboxGroupProps;if(Object.keys(radioGroupProps).length>0)return radioGroupProps;return undefined;};var groupProps=getGroupProps();var _validationState=groupProps==null?void 0:groupProps.validationState;return jsx(CardProvider,{size:size,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,validationState:_validationState,cursor:isReactNative()?undefined:cursor},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});
|
|
27
27
|
|
|
28
28
|
export { Card, CardBody, ComponentIds };
|
|
29
29
|
//# 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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 size = 'large',\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\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","_ref$size","size","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qSA4Ba,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,EAiJA,IAAMC,KAAiE,CAAG,SAApEA,KAAiEA,CAAAC,IAAA,CAyBrEC,GAAG,CACoB,CAxBrB,IAAAC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,oBAAA,CAAAH,IAAA,CACRI,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAA,KAAA,CAAA,CAAG,iCAAiC,CAAAA,oBAAA,CAAAE,iBAAA,CAAAL,IAAA,CACnDM,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAA,KAAA,CAAA,CAAG,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,GAAG,KAAA,CAAA,CAAA,WAAW,CAAAA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,WAAW,CAAAnC,MAAA,CAAAC,MAAA,CAAA,CAAClB,EAAE,CAAC,QAAQ,CAACV,OAAO,CAAEA,OAAQ,CAAK0B,CAAAA,gBAAgB,CAAG,CAAC,CACjE,IAAI,CACPzC,QAAQ,CAAA,CACE,CAAC,CACN,CAAA,CAAC,CACC,CAAC,CAEnB,CAAC,CAQD,IAAM8E,SAAS,CAAG,SAAZA,SAASA,CAAAC,KAAA,CAAiF,CAAA,IAA3EpE,MAAM,CAAAoE,KAAA,CAANpE,MAAM,CAAEX,QAAQ,CAAA+E,KAAA,CAAR/E,QAAQ,CAAEO,MAAM,CAAAwE,KAAA,CAANxE,MAAM,CAAKqB,IAAI,CAAAC,wBAAA,CAAAkD,KAAA,CAAAC,UAAA,CACpDC,CAAAA,mBAAmB,CAAC,UAAU,CAAC,CAE/B,OACEjB,GAAA,CAACkB,OAAO,CAAAxC,MAAA,CAAAC,MAAA,CAAA,EAAA,CACFC,aAAa,CAAC,CAAEC,IAAI,CAAEyB,aAAa,CAACjF,QAAQ,CAAEkB,MAAM,CAANA,MAAO,CAAC,CAAC,CACvDkE,sBAAsB,CAAC7C,IAAI,CAAC,CAChCjB,CAAAA,MAAM,CAAEA,MAAO,CAAAX,QAAA,CAEdA,QAAQ,CAAA,CACF,CAAC,CAEd,CAAC,CAEK,IAAAuE,IAAI,CAAGvC,cAAK,CAACmD,UAAU,CAACtF,KAAK,EAC7B,IAAAR,QAAQ,CAAG+F,wBAAwB,CAACN,SAAS,CAAE,CAAEO,WAAW,CAAEvG,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 type { CSSObject } from 'styled-components';\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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 cursor?: Platform.Select<{\n web: CSSObject['cursor'];\n native: undefined;\n }>;\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 size = 'large',\n cursor,\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\n cursor={isReactNative() ? undefined : cursor}\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","_ref$size","size","cursor","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;8SA6Ba,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,C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AC,wBAAA,CAAAkD,KAAA,CAAAC,UAAA,CACpDC,CAAAA,mBAAmB,CAAC,UAAU,CAAC,CAE/B,OACEjB,GAAA,CAACkB,OAAO,CAAAxC,MAAA,CAAAC,MAAA,CAAA,EAAA,CACFC,aAAa,CAAC,CAAEC,IAAI,CAAEyB,aAAa,CAAClF,QAAQ,CAAEkB,MAAM,CAANA,MAAO,CAAC,CAAC,CACvDmE,sBAAsB,CAAC7C,IAAI,CAAC,CAAA,CAChClB,MAAM,CAAEA,MAAO,CAAAX,QAAA,CAEdA,QAAQ,CACF,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAwE,IAAI,CAAGvC,cAAK,CAACmD,UAAU,CAACvF,KAAK,EAC7B,IAAAR,QAAQ,CAAGgG,wBAAwB,CAACN,SAAS,CAAE,CAAEO,WAAW,CAAExG,YAAY,CAACO,QAAS,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var screenReaderStyles={border:
|
|
1
|
+
var screenReaderStyles={border:0,clip:'rect(0 0 0 0)',clipPath:'inset(50%)',height:`1px`,margin:'0 -1px -1px 0',overflow:'hidden',padding:0,position:'absolute',width:`1px`,left:'-10000px',whiteSpace:'nowrap',wordWrap:'normal'};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { screenReaderStyles };
|
|
4
4
|
//# sourceMappingURL=ScreenReaderStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border:
|
|
1
|
+
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: `1px`,\n margin: '0 -1px -1px 0',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: `1px`,\n left: '-10000px',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n};\n\nexport { screenReaderStyles };\n"],"names":["screenReaderStyles","border","clip","clipPath","height","margin","overflow","padding","position","width","left","whiteSpace","wordWrap"],"mappings":"AAMM,IAAAA,kBAA6B,CAAG,CACpCC,MAAM,CAAE,CAAC,CACTC,IAAI,CAAE,eAAe,CACrBC,QAAQ,CAAE,YAAY,CACtBC,MAAM,CAAE,CAAA,GAAA,CAAK,CACbC,MAAM,CAAE,eAAe,CACvBC,QAAQ,CAAE,QAAQ,CAClBC,OAAO,CAAE,CAAC,CACVC,QAAQ,CAAE,UAAU,CACpBC,KAAK,CAAE,CAAA,GAAA,CAAK,CACZC,IAAI,CAAE,UAAU,CAChBC,UAAU,CAAE,QAAQ,CACpBC,QAAQ,CAAE,QACZ;;;;"}
|
|
@@ -580,7 +580,7 @@ export { Text, getTextProps } from './Typography/Text/Text.js';
|
|
|
580
580
|
export { Code } from './Typography/Code/Code.js';
|
|
581
581
|
export { Display } from './Typography/Display/Display.js';
|
|
582
582
|
export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden.native.js';
|
|
583
|
-
export {
|
|
583
|
+
export { screenReaderStyles } from './VisuallyHidden/ScreenReaderStyles.js';
|
|
584
584
|
export { ListView } from './ListView/ListView.native.js';
|
|
585
585
|
export { ListViewFilters } from './ListView/ListViewFilters.native.js';
|
|
586
586
|
export { Preview, PreviewBody, PreviewFooter, PreviewHeader } from './Preview/Preview.native.js';
|
|
@@ -27,7 +27,7 @@ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeA
|
|
|
27
27
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
28
28
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
29
29
|
|
|
30
|
-
var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "maxWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as", "size"],
|
|
30
|
+
var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "maxWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as", "size", "cursor"],
|
|
31
31
|
_excluded2 = ["height", "children", "testID"];
|
|
32
32
|
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; }
|
|
33
33
|
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; }
|
|
@@ -76,6 +76,7 @@ var _Card = function _Card(_ref, ref) {
|
|
|
76
76
|
as = _ref.as,
|
|
77
77
|
_ref$size = _ref.size,
|
|
78
78
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
79
|
+
cursor = _ref.cursor,
|
|
79
80
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
80
81
|
var _React$useState = React__default.useState(false),
|
|
81
82
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -130,7 +131,8 @@ var _Card = function _Card(_ref, ref) {
|
|
|
130
131
|
maxWidth: maxWidth,
|
|
131
132
|
href: href,
|
|
132
133
|
accessibilityLabel: accessibilityLabel,
|
|
133
|
-
validationState: _validationState
|
|
134
|
+
validationState: _validationState,
|
|
135
|
+
cursor: isReactNative() ? undefined : cursor
|
|
134
136
|
}, metaAttribute({
|
|
135
137
|
name: MetaConstants.Card,
|
|
136
138
|
testID: testID
|
|
@@ -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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 size = 'large',\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\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","_ref$size","size","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","Object","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;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kB,OAAO,EAAAxC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CACFC,EAAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAE0B,aAAa,CAACjF,QAAQ;AAAEkB,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACvDkE,sBAAsB,CAAC7C,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCjB,IAAAA,MAAM,EAAEA,MAAO;AAAAX,IAAAA,QAAA,EAEdA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMuE,IAAI,gBAAGvC,cAAK,CAACmD,UAAU,CAACtF,KAAK,EAAC;AACpC,IAAMR,QAAQ,gBAAG+F,wBAAwB,CAACN,SAAS,EAAE;EAAEO,WAAW,EAAEvG,YAAY,CAACO,QAAAA;AAAS,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 type { CSSObject } from 'styled-components';\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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 cursor?: Platform.Select<{\n web: CSSObject['cursor'];\n native: undefined;\n }>;\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 size = 'large',\n cursor,\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\n cursor={isReactNative() ? undefined : cursor}\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","_ref$size","size","cursor","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","Object","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,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;AAqJD,IAAMC,KAAiE,GAAG,SAApEA,KAAiEA,CAAAC,IAAA,EA0BrEC,GAAG,EACoB;AAAA,EAAA,IAzBrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,iC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
30
30
|
isMobile = _ref.isMobile,
|
|
31
|
-
validationState = _ref.validationState
|
|
31
|
+
validationState = _ref.validationState,
|
|
32
|
+
cursor = _ref.cursor;
|
|
32
33
|
var getCardBorderColor = function getCardBorderColor() {
|
|
33
34
|
if (validationState === 'error') return theme.colors.interactive.border.negative["default"];
|
|
34
35
|
if (validationState === 'success') return theme.colors.interactive.border.positive["default"];
|
|
@@ -42,7 +43,7 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
42
43
|
return _objectSpread(_objectSpread(_objectSpread({
|
|
43
44
|
// Selected state
|
|
44
45
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
45
|
-
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
46
|
+
cursor: cursor ? cursor : as === 'label' ? 'pointer' : 'initial'
|
|
46
47
|
}, isMobile && isPressed && {
|
|
47
48
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
48
49
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({\n as,\n theme,\n isSelected,\n isFocused,\n shouldScaleOnHover,\n isPressed,\n isMobile,\n validationState,\n }) => {\n const getCardBorderColor = (): string => {\n if (validationState === 'error') return theme.colors.interactive.border.negative.default;\n if (validationState === 'success') return theme.colors.interactive.border.positive.default;\n if (isSelected) return theme.colors.surface.border.primary.normal;\n return 'transparent';\n };\n\n const selectedColor = getCardBorderColor();\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n transitionProperty: 'transform, box-shadow',\n\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst _CardRoot: React.ForwardRefRenderFunction<BladeElementRef, CardRootProps> = (\n { as, accessibilityLabel, children, ...props },\n ref,\n): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n ref={ref as never}\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nconst CardRoot = React.forwardRef(_CardRoot);\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","validationState","getCardBorderColor","colors","interactive","border","negative","positive","surface","primary","normal","selectedColor","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({\n as,\n theme,\n isSelected,\n isFocused,\n shouldScaleOnHover,\n isPressed,\n isMobile,\n validationState,\n cursor,\n }) => {\n const getCardBorderColor = (): string => {\n if (validationState === 'error') return theme.colors.interactive.border.negative.default;\n if (validationState === 'success') return theme.colors.interactive.border.positive.default;\n if (isSelected) return theme.colors.surface.border.primary.normal;\n return 'transparent';\n };\n\n const selectedColor = getCardBorderColor();\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n cursor: cursor ? cursor : as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n transitionProperty: 'transform, box-shadow',\n\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst _CardRoot: React.ForwardRefRenderFunction<BladeElementRef, CardRootProps> = (\n { as, accessibilityLabel, children, ...props },\n ref,\n): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n ref={ref as never}\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nconst CardRoot = React.forwardRef(_CardRoot);\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","validationState","cursor","getCardBorderColor","colors","interactive","border","negative","positive","surface","primary","normal","selectedColor","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transform","CARD_SCALE_DOWN_VALUE","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","transitionProperty","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","_CardRoot","_ref2","ref","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined","CardRoot","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CACpC,CAAA,CAAA,UAAAC,IAAA,EAUM;AAAA,EAAA,IATJC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;IAClBC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,eAAe,GAAAR,IAAA,CAAfQ,eAAe;IACfC,MAAM,GAAAT,IAAA,CAANS,MAAM,CAAA;AAEN,EAAA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,GAAiB;AACvC,IAAA,IAAIF,eAAe,KAAK,OAAO,EAAE,OAAON,KAAK,CAACS,MAAM,CAACC,WAAW,CAACC,MAAM,CAACC,QAAQ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AC,CAAA;AAED,IAAMmB,QAAQ,gBAAGb,cAAK,CAACc,UAAU,CAACxB,SAAS;;;;"}
|
|
@@ -11,11 +11,10 @@ import '../../../utils/makeAccessible/index.js';
|
|
|
11
11
|
import { useMergeRefs } from '../../../utils/useMergeRefs.js';
|
|
12
12
|
import '../../../utils/getFocusRingStyles/index.js';
|
|
13
13
|
import '../../../utils/makeAnalyticsAttribute/index.js';
|
|
14
|
-
import { useBottomSheetContext } from '../../BottomSheet/BottomSheetContext.js';
|
|
15
14
|
import { jsx } from 'react/jsx-runtime';
|
|
16
15
|
import { castWebType } from '../../../utils/platform/castUtils.js';
|
|
17
16
|
import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
18
|
-
import {
|
|
17
|
+
import { screenReaderStyles } from '../../VisuallyHidden/ScreenReaderStyles.js';
|
|
19
18
|
import { getFocusRingStyles } from '../../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
20
19
|
import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
|
|
21
20
|
import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
@@ -50,9 +49,8 @@ var StyledInput = /*#__PURE__*/styled.input.withConfig({
|
|
|
50
49
|
isChecked = _ref2.isChecked,
|
|
51
50
|
isDisabled = _ref2.isDisabled,
|
|
52
51
|
hasError = _ref2.hasError,
|
|
53
|
-
hoverTokens = _ref2.hoverTokens
|
|
54
|
-
|
|
55
|
-
return _objectSpread(_objectSpread({}, shouldUseLegacyScreenReaderStyles ? legacyScreenReaderStyles : screenReaderStyles), {}, {
|
|
52
|
+
hoverTokens = _ref2.hoverTokens;
|
|
53
|
+
return _objectSpread(_objectSpread({}, screenReaderStyles), {}, {
|
|
56
54
|
'&:focus-visible + div': _objectSpread({}, getFocusRingStyles({
|
|
57
55
|
theme: theme
|
|
58
56
|
})),
|
|
@@ -79,16 +77,13 @@ var _SelectorInput = function _SelectorInput(_ref3, ref) {
|
|
|
79
77
|
// to be able to set the mixed value via setMixed() function
|
|
80
78
|
// TODO: replace with a generic `mergeRefs()` util if we do this in other places
|
|
81
79
|
var mergedRef = useMergeRefs(ref, inputProps.ref);
|
|
82
|
-
var _useBottomSheetContex = useBottomSheetContext(),
|
|
83
|
-
isInBottomSheet = _useBottomSheetContex.isInBottomSheet;
|
|
84
80
|
return /*#__PURE__*/jsx(StyledInput, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
85
81
|
id: id,
|
|
86
82
|
isChecked: isChecked,
|
|
87
83
|
isDisabled: isDisabled,
|
|
88
84
|
hasError: hasError,
|
|
89
85
|
tabIndex: tabIndex,
|
|
90
|
-
hoverTokens: hoverTokens
|
|
91
|
-
shouldUseLegacyScreenReaderStyles: isInBottomSheet
|
|
86
|
+
hoverTokens: hoverTokens
|
|
92
87
|
}, inputProps), makeAccessible({
|
|
93
88
|
label: accessibilityLabel
|
|
94
89
|
})), makeAnalyticsAttribute(rest)), {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectorInput.web.js","sources":["../../../../../../../src/components/Form/Selector/SelectorInput.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { CSSObject } from 'styled-components';\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { HoverProps, SelectorInputProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType } from '~utils';\nimport { screenReaderStyles
|
|
1
|
+
{"version":3,"file":"SelectorInput.web.js","sources":["../../../../../../../src/components/Form/Selector/SelectorInput.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { CSSObject } from 'styled-components';\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { HoverProps, SelectorInputProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType } from '~utils';\nimport { screenReaderStyles } from '~components/VisuallyHidden';\nimport type { BladeElementRef } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst getHoverStyles = ({\n theme,\n isDisabled,\n hasError,\n isChecked,\n hoverTokens,\n}: { theme: Theme } & HoverProps): CSSObject => {\n if (isDisabled || hasError) return {};\n\n const checked = isChecked ? 'checked' : 'unchecked';\n const backgroundColor = hoverTokens.default.background[checked];\n const borderColor = hoverTokens.default.border?.[checked];\n\n return {\n borderColor: borderColor ? getIn(theme, borderColor) : undefined,\n backgroundColor: getIn(theme, backgroundColor),\n transitionTimingFunction: theme.motion.easing.standard as string,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration['2xquick'])),\n };\n};\n\nconst StyledInput = styled.input<HoverProps>(\n ({ theme, isChecked, isDisabled, hasError, hoverTokens }) => ({\n ...screenReaderStyles,\n '&:focus-visible + div': {\n ...getFocusRingStyles({ theme }),\n },\n '&:hover + div': {\n ...getHoverStyles({ theme, isChecked, isDisabled, hasError, hoverTokens }),\n },\n }),\n);\n\nconst _SelectorInput: React.ForwardRefRenderFunction<BladeElementRef, SelectorInputProps> = (\n {\n id,\n inputProps,\n isChecked,\n isDisabled,\n hasError,\n hoverTokens,\n tabIndex,\n accessibilityLabel,\n ...rest\n },\n ref,\n) => {\n // merging both refs because inputProps.ref needs to have access to indeterminate state\n // to be able to set the mixed value via setMixed() function\n // TODO: replace with a generic `mergeRefs()` util if we do this in other places\n const mergedRef = useMergeRefs(ref, inputProps.ref);\n\n return (\n <StyledInput\n id={id}\n isChecked={isChecked}\n isDisabled={isDisabled}\n hasError={hasError}\n tabIndex={tabIndex}\n hoverTokens={hoverTokens}\n {...inputProps}\n {...makeAccessible({ label: accessibilityLabel })}\n {...makeAnalyticsAttribute(rest)}\n ref={mergedRef}\n />\n );\n};\n\nconst SelectorInput = assignWithoutSideEffects(React.forwardRef(_SelectorInput), {\n displayName: 'SelectorInput',\n});\n\nexport { SelectorInput };\n"],"names":["getHoverStyles","_ref","_hoverTokens$default$","theme","isDisabled","hasError","isChecked","hoverTokens","checked","backgroundColor","background","borderColor","border","getIn","undefined","transitionTimingFunction","motion","easing","standard","transitionDuration","castWebType","makeMotionTime","duration","StyledInput","styled","input","withConfig","displayName","componentId","_ref2","_objectSpread","screenReaderStyles","getFocusRingStyles","_SelectorInput","_ref3","ref","id","inputProps","tabIndex","accessibilityLabel","rest","_objectWithoutProperties","_excluded","mergedRef","useMergeRefs","_jsx","makeAccessible","label","makeAnalyticsAttribute","SelectorInput","assignWithoutSideEffects","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAM4B;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAAA,EAAA,IAL9CC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,WAAW,GAAAN,IAAA,CAAXM,WAAW,CAAA;AAEX,EAAA,IAAIH,UAAU,IAAIC,QAAQ,EAAE,OAAO,EAAE,CAAA;AAErC,EAAA,IAAMG,OAAO,GAAGF,SAAS,GAAG,SAAS,GAAG,WAAW,CAAA;EACnD,IAAMG,eAAe,GAAGF,WAAW,CAAA,SAAA,CAAQ,CAACG,UAAU,CAACF,OAAO,CAAC,CAAA;AAC/D,EAAA,IAAMG,WAAW,GAAA,CAAAT,qBAAA,GAAGK,WAAW,CAAQ,SAAA,CAAA,CAACK,MAAM,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IAAAA,GAAG,EAAEQ,SAAAA;AAAU,GAAA,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKM,IAAAA,aAAa,gBAAGC,wBAAwB,cAACC,cAAK,CAACC,UAAU,CAACnB,cAAc,CAAC,EAAE;AAC/EN,EAAAA,WAAW,EAAE,eAAA;AACf,CAAC;;;;"}
|
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
* https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
4
4
|
*/
|
|
5
5
|
var screenReaderStyles = {
|
|
6
|
-
border: '0',
|
|
7
|
-
clip: 'rect(0, 0, 0, 0)',
|
|
8
|
-
height: '1px',
|
|
9
|
-
width: '1px',
|
|
10
|
-
margin: '-1px',
|
|
11
|
-
padding: '0',
|
|
12
|
-
overflow: 'hidden',
|
|
13
|
-
whiteSpace: 'nowrap',
|
|
14
|
-
position: 'absolute',
|
|
15
|
-
wordWrap: 'normal'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// So when we are using screenReaderStyles inside SelectorInput , it is causing wrong layout positioning in bottomSheet. that's why we are using legacyScreenReaderStyles only in SelectorInput.
|
|
19
|
-
//TODO: figure out and remove `legacyScreenReaderStyles` in future.
|
|
20
|
-
|
|
21
|
-
var legacyScreenReaderStyles = {
|
|
22
6
|
border: 0,
|
|
23
7
|
clip: 'rect(0 0 0 0)',
|
|
24
8
|
clipPath: 'inset(50%)',
|
|
@@ -33,5 +17,5 @@ var legacyScreenReaderStyles = {
|
|
|
33
17
|
wordWrap: 'normal'
|
|
34
18
|
};
|
|
35
19
|
|
|
36
|
-
export {
|
|
20
|
+
export { screenReaderStyles };
|
|
37
21
|
//# sourceMappingURL=ScreenReaderStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border:
|
|
1
|
+
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: `1px`,\n margin: '0 -1px -1px 0',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: `1px`,\n left: '-10000px',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n};\n\nexport { screenReaderStyles };\n"],"names":["screenReaderStyles","border","clip","clipPath","height","margin","overflow","padding","position","width","left","whiteSpace","wordWrap"],"mappings":"AAEA;AACA;AACA;AACA;AACA,IAAMA,kBAA6B,GAAG;AACpCC,EAAAA,MAAM,EAAE,CAAC;AACTC,EAAAA,IAAI,EAAE,eAAe;AACrBC,EAAAA,QAAQ,EAAE,YAAY;AACtBC,EAAAA,MAAM,EAAO,KAAA;AACbC,EAAAA,MAAM,EAAE,eAAe;AACvBC,EAAAA,QAAQ,EAAE,QAAQ;AAClBC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,KAAK,EAAO,KAAA;AACZC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,UAAU,EAAE,QAAQ;AACpBC,EAAAA,QAAQ,EAAE,QAAA;AACZ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { VisuallyHidden } from './VisuallyHidden.web.js';
|
|
2
|
-
export {
|
|
2
|
+
export { screenReaderStyles } from './ScreenReaderStyles.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
//# sourceMappingURL=index.web.js.map
|
|
@@ -662,7 +662,7 @@ export { Text, getTextProps } from './Typography/Text/Text.js';
|
|
|
662
662
|
export { Code } from './Typography/Code/Code.js';
|
|
663
663
|
export { Display } from './Typography/Display/Display.js';
|
|
664
664
|
export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden.web.js';
|
|
665
|
-
export {
|
|
665
|
+
export { screenReaderStyles } from './VisuallyHidden/ScreenReaderStyles.js';
|
|
666
666
|
export { ListView } from './ListView/ListView.web.js';
|
|
667
667
|
export { ListViewFilters } from './ListView/ListViewFilters.web.js';
|
|
668
668
|
export { Preview, PreviewBody, PreviewFooter, PreviewHeader } from './Preview/Preview.web.js';
|
|
@@ -27,7 +27,7 @@ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeA
|
|
|
27
27
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
28
28
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
29
29
|
|
|
30
|
-
var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "maxWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as", "size"],
|
|
30
|
+
var _excluded = ["children", "backgroundColor", "borderRadius", "elevation", "testID", "padding", "width", "height", "minHeight", "minWidth", "maxWidth", "onClick", "isSelected", "accessibilityLabel", "shouldScaleOnHover", "onHover", "href", "target", "rel", "as", "size", "cursor"],
|
|
31
31
|
_excluded2 = ["height", "children", "testID"];
|
|
32
32
|
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; }
|
|
33
33
|
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; }
|
|
@@ -76,6 +76,7 @@ var _Card = function _Card(_ref, ref) {
|
|
|
76
76
|
as = _ref.as,
|
|
77
77
|
_ref$size = _ref.size,
|
|
78
78
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
79
|
+
cursor = _ref.cursor,
|
|
79
80
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
80
81
|
var _React$useState = React__default.useState(false),
|
|
81
82
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -130,7 +131,8 @@ var _Card = function _Card(_ref, ref) {
|
|
|
130
131
|
maxWidth: maxWidth,
|
|
131
132
|
href: href,
|
|
132
133
|
accessibilityLabel: accessibilityLabel,
|
|
133
|
-
validationState: _validationState
|
|
134
|
+
validationState: _validationState,
|
|
135
|
+
cursor: isReactNative() ? undefined : cursor
|
|
134
136
|
}, metaAttribute({
|
|
135
137
|
name: MetaConstants.Card,
|
|
136
138
|
testID: testID
|
|
@@ -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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 size = 'large',\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\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","_ref$size","size","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","Object","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,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;AAiJD,IAAMC,KAAiE,GAAG,SAApEA,KAAiEA,CAAAC,IAAA,EAyBrEC,GAAG,EACoB;AAAA,EAAA,IAxBrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,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AK0B,gBAAgB,CAAG,CAAC,GACjE,IAAI,EACPzC,QAAQ,CAAA;OACE,CAAA;KACL,CAAA,CAAA;AAAC,GACC,CAAC,CAAA;AAEnB,CAAC,CAAA;AAQD,IAAM8E,SAAS,GAAG,SAAZA,SAASA,CAAAC,KAAA,EAAiF;AAAA,EAAA,IAA3EpE,MAAM,GAAAoE,KAAA,CAANpE,MAAM;IAAEX,QAAQ,GAAA+E,KAAA,CAAR/E,QAAQ;IAAEO,MAAM,GAAAwE,KAAA,CAANxE,MAAM;AAAKqB,IAAAA,IAAI,GAAAC,wBAAA,CAAAkD,KAAA,EAAAC,UAAA,CAAA,CAAA;EACpDC,mBAAmB,CAAC,UAAU,CAAC,CAAA;EAE/B,oBACEjB,GAAA,CAACkB,OAAO,EAAAxC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CACFC,EAAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAE0B,aAAa,CAACjF,QAAQ;AAAEkB,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACvDkE,sBAAsB,CAAC7C,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCjB,IAAAA,MAAM,EAAEA,MAAO;AAAAX,IAAAA,QAAA,EAEdA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMuE,IAAI,gBAAGvC,cAAK,CAACmD,UAAU,CAACtF,KAAK,EAAC;AACpC,IAAMR,QAAQ,gBAAG+F,wBAAwB,CAACN,SAAS,EAAE;EAAEO,WAAW,EAAEvG,YAAY,CAACO,QAAAA;AAAS,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 type { CSSObject } from 'styled-components';\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';\nimport { useCheckboxGroupContext } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport { useRadioGroupContext } from '~components/Radio/RadioGroup/RadioContext';\nimport type { CheckboxGroupContextType } from '~components/Checkbox/CheckboxGroup/CheckboxGroupContext';\nimport type { RadioGroupContextType } from '~components/Radio/RadioGroup/RadioContext';\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 * Sets the size of the card header title\n *\n * @default 'large'\n */\n size?: 'large' | 'medium';\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 cursor?: Platform.Select<{\n web: CSSObject['cursor'];\n native: undefined;\n }>;\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 size = 'large',\n cursor,\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 const checkboxGroupProps = useCheckboxGroupContext();\n const radioGroupProps = useRadioGroupContext();\n\n const getGroupProps = (): CheckboxGroupContextType | RadioGroupContextType | undefined => {\n if (Object.keys(checkboxGroupProps).length > 0) return checkboxGroupProps;\n if (Object.keys(radioGroupProps).length > 0) return radioGroupProps;\n return undefined;\n };\n\n const groupProps = getGroupProps();\n\n const _validationState = groupProps?.validationState;\n\n return (\n <CardProvider size={size}>\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 validationState={_validationState}\n cursor={isReactNative() ? undefined : cursor}\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","_ref$size","size","cursor","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","checkboxGroupProps","useCheckboxGroupContext","radioGroupProps","useRadioGroupContext","getGroupProps","Object","keys","length","groupProps","_validationState","validationState","_jsx","CardProvider","CardRoot","display","onMouseEnter","isReactNative","MetaConstants","Card","getStyledProps","makeAnalyticsAttribute","_jsxs","CardSurface","textAlign","LinkOverlay","_CardBody","_ref2","_excluded2","useVerifyInsideCard","BaseBox","forwardRef","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,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,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CAAA,EAAA,EAAA,EAAA;AAChClB,IAAAA,MAAM,EAAEA,MAAO;AAAAX,IAAAA,QAAA,EAEdA,QAAAA;AAAQ,GAAA,CACF,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMwE,IAAI,gBAAGvC,cAAK,CAACmD,UAAU,CAACvF,KAAK,EAAC;AACpC,IAAMR,QAAQ,gBAAGgG,wBAAwB,CAACN,SAAS,EAAE;EAAEO,WAAW,EAAExG,YAAY,CAACO,QAAAA;AAAS,CAAC;;;;"}
|
|
@@ -28,7 +28,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
28
28
|
shouldScaleOnHover = _ref.shouldScaleOnHover,
|
|
29
29
|
isPressed = _ref.isPressed,
|
|
30
30
|
isMobile = _ref.isMobile,
|
|
31
|
-
validationState = _ref.validationState
|
|
31
|
+
validationState = _ref.validationState,
|
|
32
|
+
cursor = _ref.cursor;
|
|
32
33
|
var getCardBorderColor = function getCardBorderColor() {
|
|
33
34
|
if (validationState === 'error') return theme.colors.interactive.border.negative["default"];
|
|
34
35
|
if (validationState === 'success') return theme.colors.interactive.border.positive["default"];
|
|
@@ -42,7 +43,7 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
42
43
|
return _objectSpread(_objectSpread(_objectSpread({
|
|
43
44
|
// Selected state
|
|
44
45
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
45
|
-
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
46
|
+
cursor: cursor ? cursor : as === 'label' ? 'pointer' : 'initial'
|
|
46
47
|
}, isMobile && isPressed && {
|
|
47
48
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
48
49
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({\n as,\n theme,\n isSelected,\n isFocused,\n shouldScaleOnHover,\n isPressed,\n isMobile,\n validationState,\n }) => {\n const getCardBorderColor = (): string => {\n if (validationState === 'error') return theme.colors.interactive.border.negative.default;\n if (validationState === 'success') return theme.colors.interactive.border.positive.default;\n if (isSelected) return theme.colors.surface.border.primary.normal;\n return 'transparent';\n };\n\n const selectedColor = getCardBorderColor();\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n transitionProperty: 'transform, box-shadow',\n\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst _CardRoot: React.ForwardRefRenderFunction<BladeElementRef, CardRootProps> = (\n { as, accessibilityLabel, children, ...props },\n ref,\n): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n ref={ref as never}\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nconst CardRoot = React.forwardRef(_CardRoot);\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","validationState","getCardBorderColor","colors","interactive","border","negative","positive","surface","primary","normal","selectedColor","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({\n as,\n theme,\n isSelected,\n isFocused,\n shouldScaleOnHover,\n isPressed,\n isMobile,\n validationState,\n cursor,\n }) => {\n const getCardBorderColor = (): string => {\n if (validationState === 'error') return theme.colors.interactive.border.negative.default;\n if (validationState === 'success') return theme.colors.interactive.border.positive.default;\n if (isSelected) return theme.colors.surface.border.primary.normal;\n return 'transparent';\n };\n\n const selectedColor = getCardBorderColor();\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n cursor: cursor ? cursor : as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n transitionProperty: 'transform, box-shadow',\n\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& label:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst _CardRoot: React.ForwardRefRenderFunction<BladeElementRef, CardRootProps> = (\n { as, accessibilityLabel, children, ...props },\n ref,\n): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n ref={ref as never}\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nconst CardRoot = React.forwardRef(_CardRoot);\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","validationState","cursor","getCardBorderColor","colors","interactive","border","negative","positive","surface","primary","normal","selectedColor","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transform","CARD_SCALE_DOWN_VALUE","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","transitionProperty","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","_CardRoot","_ref2","ref","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined","CardRoot","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CACpC,CAAA,CAAA,UAAAC,IAAA,EAUM;AAAA,EAAA,IATJC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,KAA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A,GAAA;MAAA,OAAQH,YAAY,CAAC,KAAK,CAAC,CAAA;KAAC;IACtCI,WAAW,EAAE,SAAbA,WAAWA,GAAA;MAAA,OAAQJ,YAAY,CAAC,IAAI,CAAC,CAAA;KAAC;IACtCK,SAAS,EAAE,SAAXA,SAASA,GAAA;MAAA,OAAQL,YAAY,CAAC,KAAK,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EACjCM,cAAc,CAAC;AACjBC,IAAAA,KAAK,EAAEjE,EAAE,KAAK,OAAO,GAAG+C,kBAAkB,GAAGmB,SAAAA;AAC/C,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAlB,IAAAA,QAAA,EAEDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB,CAAC,CAAA;AAED,IAAMmB,QAAQ,gBAAGb,cAAK,CAACc,UAAU,CAACxB,SAAS;;;;"}
|
|
@@ -11,11 +11,10 @@ import '../../../utils/makeAccessible/index.js';
|
|
|
11
11
|
import { useMergeRefs } from '../../../utils/useMergeRefs.js';
|
|
12
12
|
import '../../../utils/getFocusRingStyles/index.js';
|
|
13
13
|
import '../../../utils/makeAnalyticsAttribute/index.js';
|
|
14
|
-
import { useBottomSheetContext } from '../../BottomSheet/BottomSheetContext.js';
|
|
15
14
|
import { jsx } from 'react/jsx-runtime';
|
|
16
15
|
import { castWebType } from '../../../utils/platform/castUtils.js';
|
|
17
16
|
import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
18
|
-
import {
|
|
17
|
+
import { screenReaderStyles } from '../../VisuallyHidden/ScreenReaderStyles.js';
|
|
19
18
|
import { getFocusRingStyles } from '../../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
20
19
|
import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
|
|
21
20
|
import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
@@ -50,9 +49,8 @@ var StyledInput = /*#__PURE__*/styled.input.withConfig({
|
|
|
50
49
|
isChecked = _ref2.isChecked,
|
|
51
50
|
isDisabled = _ref2.isDisabled,
|
|
52
51
|
hasError = _ref2.hasError,
|
|
53
|
-
hoverTokens = _ref2.hoverTokens
|
|
54
|
-
|
|
55
|
-
return _objectSpread(_objectSpread({}, shouldUseLegacyScreenReaderStyles ? legacyScreenReaderStyles : screenReaderStyles), {}, {
|
|
52
|
+
hoverTokens = _ref2.hoverTokens;
|
|
53
|
+
return _objectSpread(_objectSpread({}, screenReaderStyles), {}, {
|
|
56
54
|
'&:focus-visible + div': _objectSpread({}, getFocusRingStyles({
|
|
57
55
|
theme: theme
|
|
58
56
|
})),
|
|
@@ -79,16 +77,13 @@ var _SelectorInput = function _SelectorInput(_ref3, ref) {
|
|
|
79
77
|
// to be able to set the mixed value via setMixed() function
|
|
80
78
|
// TODO: replace with a generic `mergeRefs()` util if we do this in other places
|
|
81
79
|
var mergedRef = useMergeRefs(ref, inputProps.ref);
|
|
82
|
-
var _useBottomSheetContex = useBottomSheetContext(),
|
|
83
|
-
isInBottomSheet = _useBottomSheetContex.isInBottomSheet;
|
|
84
80
|
return /*#__PURE__*/jsx(StyledInput, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
85
81
|
id: id,
|
|
86
82
|
isChecked: isChecked,
|
|
87
83
|
isDisabled: isDisabled,
|
|
88
84
|
hasError: hasError,
|
|
89
85
|
tabIndex: tabIndex,
|
|
90
|
-
hoverTokens: hoverTokens
|
|
91
|
-
shouldUseLegacyScreenReaderStyles: isInBottomSheet
|
|
86
|
+
hoverTokens: hoverTokens
|
|
92
87
|
}, inputProps), makeAccessible({
|
|
93
88
|
label: accessibilityLabel
|
|
94
89
|
})), makeAnalyticsAttribute(rest)), {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectorInput.web.js","sources":["../../../../../../../src/components/Form/Selector/SelectorInput.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { CSSObject } from 'styled-components';\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { HoverProps, SelectorInputProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType } from '~utils';\nimport { screenReaderStyles
|
|
1
|
+
{"version":3,"file":"SelectorInput.web.js","sources":["../../../../../../../src/components/Form/Selector/SelectorInput.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { CSSObject } from 'styled-components';\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { HoverProps, SelectorInputProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType } from '~utils';\nimport { screenReaderStyles } from '~components/VisuallyHidden';\nimport type { BladeElementRef } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst getHoverStyles = ({\n theme,\n isDisabled,\n hasError,\n isChecked,\n hoverTokens,\n}: { theme: Theme } & HoverProps): CSSObject => {\n if (isDisabled || hasError) return {};\n\n const checked = isChecked ? 'checked' : 'unchecked';\n const backgroundColor = hoverTokens.default.background[checked];\n const borderColor = hoverTokens.default.border?.[checked];\n\n return {\n borderColor: borderColor ? getIn(theme, borderColor) : undefined,\n backgroundColor: getIn(theme, backgroundColor),\n transitionTimingFunction: theme.motion.easing.standard as string,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration['2xquick'])),\n };\n};\n\nconst StyledInput = styled.input<HoverProps>(\n ({ theme, isChecked, isDisabled, hasError, hoverTokens }) => ({\n ...screenReaderStyles,\n '&:focus-visible + div': {\n ...getFocusRingStyles({ theme }),\n },\n '&:hover + div': {\n ...getHoverStyles({ theme, isChecked, isDisabled, hasError, hoverTokens }),\n },\n }),\n);\n\nconst _SelectorInput: React.ForwardRefRenderFunction<BladeElementRef, SelectorInputProps> = (\n {\n id,\n inputProps,\n isChecked,\n isDisabled,\n hasError,\n hoverTokens,\n tabIndex,\n accessibilityLabel,\n ...rest\n },\n ref,\n) => {\n // merging both refs because inputProps.ref needs to have access to indeterminate state\n // to be able to set the mixed value via setMixed() function\n // TODO: replace with a generic `mergeRefs()` util if we do this in other places\n const mergedRef = useMergeRefs(ref, inputProps.ref);\n\n return (\n <StyledInput\n id={id}\n isChecked={isChecked}\n isDisabled={isDisabled}\n hasError={hasError}\n tabIndex={tabIndex}\n hoverTokens={hoverTokens}\n {...inputProps}\n {...makeAccessible({ label: accessibilityLabel })}\n {...makeAnalyticsAttribute(rest)}\n ref={mergedRef}\n />\n );\n};\n\nconst SelectorInput = assignWithoutSideEffects(React.forwardRef(_SelectorInput), {\n displayName: 'SelectorInput',\n});\n\nexport { SelectorInput };\n"],"names":["getHoverStyles","_ref","_hoverTokens$default$","theme","isDisabled","hasError","isChecked","hoverTokens","checked","backgroundColor","background","borderColor","border","getIn","undefined","transitionTimingFunction","motion","easing","standard","transitionDuration","castWebType","makeMotionTime","duration","StyledInput","styled","input","withConfig","displayName","componentId","_ref2","_objectSpread","screenReaderStyles","getFocusRingStyles","_SelectorInput","_ref3","ref","id","inputProps","tabIndex","accessibilityLabel","rest","_objectWithoutProperties","_excluded","mergedRef","useMergeRefs","_jsx","makeAccessible","label","makeAnalyticsAttribute","SelectorInput","assignWithoutSideEffects","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAM4B;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAAA,EAAA,IAL9CC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAC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AEnD,oBACEU,GAAA,CAACtB,WAAW,EAAAO,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACVM,IAAAA,EAAE,EAAEA,EAAG;AACP9B,IAAAA,SAAS,EAAEA,SAAU;AACrBF,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,QAAQ,EAAEA,QAAS;AACnBiC,IAAAA,QAAQ,EAAEA,QAAS;AACnB/B,IAAAA,WAAW,EAAEA,WAAAA;GACT8B,EAAAA,UAAU,CACVS,EAAAA,cAAc,CAAC;AAAEC,IAAAA,KAAK,EAAER,kBAAAA;AAAmB,GAAC,CAAC,CAAA,EAC7CS,sBAAsB,CAACR,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCL,IAAAA,GAAG,EAAEQ,SAAAA;AAAU,GAAA,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKM,IAAAA,aAAa,gBAAGC,wBAAwB,cAACC,cAAK,CAACC,UAAU,CAACnB,cAAc,CAAC,EAAE;AAC/EN,EAAAA,WAAW,EAAE,eAAA;AACf,CAAC;;;;"}
|
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
* https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
4
4
|
*/
|
|
5
5
|
var screenReaderStyles = {
|
|
6
|
-
border: '0',
|
|
7
|
-
clip: 'rect(0, 0, 0, 0)',
|
|
8
|
-
height: '1px',
|
|
9
|
-
width: '1px',
|
|
10
|
-
margin: '-1px',
|
|
11
|
-
padding: '0',
|
|
12
|
-
overflow: 'hidden',
|
|
13
|
-
whiteSpace: 'nowrap',
|
|
14
|
-
position: 'absolute',
|
|
15
|
-
wordWrap: 'normal'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// So when we are using screenReaderStyles inside SelectorInput , it is causing wrong layout positioning in bottomSheet. that's why we are using legacyScreenReaderStyles only in SelectorInput.
|
|
19
|
-
//TODO: figure out and remove `legacyScreenReaderStyles` in future.
|
|
20
|
-
|
|
21
|
-
var legacyScreenReaderStyles = {
|
|
22
6
|
border: 0,
|
|
23
7
|
clip: 'rect(0 0 0 0)',
|
|
24
8
|
clipPath: 'inset(50%)',
|
|
@@ -33,5 +17,5 @@ var legacyScreenReaderStyles = {
|
|
|
33
17
|
wordWrap: 'normal'
|
|
34
18
|
};
|
|
35
19
|
|
|
36
|
-
export {
|
|
20
|
+
export { screenReaderStyles };
|
|
37
21
|
//# sourceMappingURL=ScreenReaderStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border:
|
|
1
|
+
{"version":3,"file":"ScreenReaderStyles.js","sources":["../../../../../../src/components/VisuallyHidden/ScreenReaderStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\n\n/**\n * Screen reader class adapted from webaim\n * https://webaim.org/techniques/css/invisiblecontent/#techniques\n */\nconst screenReaderStyles: CSSObject = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: `1px`,\n margin: '0 -1px -1px 0',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: `1px`,\n left: '-10000px',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n};\n\nexport { screenReaderStyles };\n"],"names":["screenReaderStyles","border","clip","clipPath","height","margin","overflow","padding","position","width","left","whiteSpace","wordWrap"],"mappings":"AAEA;AACA;AACA;AACA;AACA,IAAMA,kBAA6B,GAAG;AACpCC,EAAAA,MAAM,EAAE,CAAC;AACTC,EAAAA,IAAI,EAAE,eAAe;AACrBC,EAAAA,QAAQ,EAAE,YAAY;AACtBC,EAAAA,MAAM,EAAO,KAAA;AACbC,EAAAA,MAAM,EAAE,eAAe;AACvBC,EAAAA,QAAQ,EAAE,QAAQ;AAClBC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,KAAK,EAAO,KAAA;AACZC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,UAAU,EAAE,QAAQ;AACpBC,EAAAA,QAAQ,EAAE,QAAA;AACZ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { VisuallyHidden } from './VisuallyHidden.web.js';
|
|
2
|
-
export {
|
|
2
|
+
export { screenReaderStyles } from './ScreenReaderStyles.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
//# sourceMappingURL=index.web.js.map
|
|
@@ -662,7 +662,7 @@ export { Text, getTextProps } from './Typography/Text/Text.js';
|
|
|
662
662
|
export { Code } from './Typography/Code/Code.js';
|
|
663
663
|
export { Display } from './Typography/Display/Display.js';
|
|
664
664
|
export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden.web.js';
|
|
665
|
-
export {
|
|
665
|
+
export { screenReaderStyles } from './VisuallyHidden/ScreenReaderStyles.js';
|
|
666
666
|
export { ListView } from './ListView/ListView.web.js';
|
|
667
667
|
export { ListViewFilters } from './ListView/ListViewFilters.web.js';
|
|
668
668
|
export { Preview, PreviewBody, PreviewFooter, PreviewHeader } from './Preview/Preview.web.js';
|
|
@@ -9323,6 +9323,10 @@ type CardProps = {
|
|
|
9323
9323
|
* @default undefined
|
|
9324
9324
|
*/
|
|
9325
9325
|
as?: 'label';
|
|
9326
|
+
cursor?: Platform.Select<{
|
|
9327
|
+
web: CSSObject['cursor'];
|
|
9328
|
+
native: undefined;
|
|
9329
|
+
}>;
|
|
9326
9330
|
} & TestID & DataAnalyticsAttribute & StyledPropsBlade;
|
|
9327
9331
|
type CardBodyProps = {
|
|
9328
9332
|
children: React__default.ReactNode;
|
|
@@ -9461,6 +9465,10 @@ declare const Card: React__default.ForwardRefExoticComponent<{
|
|
|
9461
9465
|
* @default undefined
|
|
9462
9466
|
*/
|
|
9463
9467
|
as?: "label" | undefined;
|
|
9468
|
+
cursor?: Platform.Select<{
|
|
9469
|
+
web: CSSObject['cursor'];
|
|
9470
|
+
native: undefined;
|
|
9471
|
+
}> | undefined;
|
|
9464
9472
|
} & TestID & DataAnalyticsAttribute & Partial<Omit<MarginProps & Pick<FlexboxProps, "alignSelf" | "flexWrap" | "justifySelf" | "order" | "placeSelf"> & {
|
|
9465
9473
|
bottom: SpacingValueType | {
|
|
9466
9474
|
readonly base?: SpacingValueType | undefined;
|
|
@@ -27119,7 +27127,6 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
27119
27127
|
* https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
27120
27128
|
*/
|
|
27121
27129
|
declare const screenReaderStyles: CSSObject;
|
|
27122
|
-
declare const legacyScreenReaderStyles: CSSObject;
|
|
27123
27130
|
|
|
27124
27131
|
type ListViewCommonProps = {
|
|
27125
27132
|
children: React__default.ReactNode;
|
|
@@ -27258,4 +27265,4 @@ declare const PreviewBody: (PreviewBodyProps: PreviewBodyProps) => React__defaul
|
|
|
27258
27265
|
declare const PreviewFooter: (PreviewFooterProps: PreviewFooterProps) => React__default.ReactElement;
|
|
27259
27266
|
declare const Preview: ({ children, onFullScreen: onFullScreenProp, onZoomChange, zoomScaleStep, isDragAndZoomDisabled, defaultZoom, onDragChange, }: PreviewProps) => React__default.ReactElement;
|
|
27260
27267
|
|
|
27261
|
-
export { AcceptPaymentsFilledIcon, AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActionListSectionTitle, ActivityIcon, AddressBookIcon, AffordabilityFilledIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AndroidIcon, AnimateInteractions, AnimateInteractionsProps, AnnouncementIcon, ApertureIcon, AppStoreIcon, AppleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSquareDownIcon, ArrowSquareDownLeftIcon, ArrowSquareDownRightIcon, ArrowSquareLeftIcon, ArrowSquareRightIcon, ArrowSquareUpIcon, ArrowSquareUpLeftIcon, ArrowSquareUpRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollFilledIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationFilledIcon, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, Battery100PercentIcon, Battery20PercentIcon, Battery40PercentIcon, Battery60PercentIcon, Battery80PercentIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiFilledIcon, BfsiIcon, BillIcon, BillMeFilledIcon, BillMeIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomNav, BottomNavItem, BottomNavItemProps, BottomNavProps, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsFilledIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementFilledIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, ChartArea, ChartAreaProps, ChartAreaWrapper, ChartAreaWrapperProps, ChartBar, ChartBarProps, ChartBarWrapper, ChartBarWrapperProps, ChartCartesianGrid, ChartCartesianGridProps, ChartDonut, ChartDonutCell, ChartDonutProps, ChartDonutWrapper, ChartDonutWrapperProps, ChartLegend, ChartLegendProps, ChartLine, ChartLineProps, ChartLineWrapper, ChartLineWrapperProps, ChartReferenceLine, ChartReferenceLineProps, ChartTooltip, ChartTooltipProps, ChartXAxis, ChartXAxisProps, ChartYAxis, ChartYAxisProps, ChatMessage, ChatMessageProps, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpDownIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationFilledIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterInput, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansFilledIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountFilledIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingFilledIcon, DigitalLendingIcon, DisbursePaymentsFilledIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerBody, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownIconButton, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceFilledIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationFilledIcon, EducationIcon, Elevate, ElevateProps, EmptyState, EmptyStateProps, EngageFilledIcon, EngageIcon, EqualsIcon, EscrowAccountFilledIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, Fade, FadeProps, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterChipDatePicker, FilterChipGroup, FilterChipGroupContextType, FilterChipGroupProps, FilterChipSelectInput, FilterIcon, FlagIcon, FlaskIcon, FolderIcon, ForexManagementFilledIcon, ForexManagementIcon, FreelanceFilledIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, IndiaFlagIcon, Indicator, IndicatorProps, InfoGroup, InfoGroupProps, InfoIcon, InfoItem, InfoItemKey, InfoItemKeyProps, InfoItemProps, InfoItemValue, InfoItemValueProps, InputDropdownButton, InputGroup, InputGroupProps, InputRow, InputRowProps, InstagramIcon, InstantSettlementFilledIcon, InstantSettlementIcon, InternationalPaymentsFilledIcon, InternationalPaymentsIcon, InvoicesFilledIcon, InvoicesIcon, ItalicIcon, KeyIcon, KeyboardIcon, LayersIcon, LayoutIcon, LeftCircularCornerIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, ListSearchIcon, ListView, ListViewFilters, LoaderIcon, LoansForBusinessesFilledIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutFilledIcon, MagicCheckoutIcon, MagicKonnectFilledIcon, MagicKonnectIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppFilledIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreFilledIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, Morph, MorphProps, Move, MoveIcon, MoveProps, MusicIcon, MyAccountIcon, NavigationIcon, NoSignalIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerFilledIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonFilledIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayFilledIcon, PaymentGatewayIcon, PaymentLinkFilledIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesFilledIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsFilledIcon, PayrollAddonsIcon, PayrollForCaFilledIcon, PayrollForCaIcon, PayrollForStartupOrSmeFilledIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetFilledIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosFilledIcon, PosIcon, PowerIcon, Preview, PreviewBody, PreviewBodyProps, PreviewFooter, PreviewFooterProps, PreviewHeader, PreviewHeaderProps, PreviewProps, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, PromptIcon, QRCodeIcon, QuickFilter, QuickFilterGroup, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RayIcon, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollFilledIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteFilledIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasFilledIcon, SaasIcon, SaveIcon, Scale, ScaleProps, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Signal1BarIcon, Signal2BarIcon, Signal3BarIcon, Signal4BarIcon, SignalIcon, SimCardIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, Slide, SlideProps, SlidersIcon, SmartCollectFilledIcon, SmartCollectIcon, SmartphoneIcon, SolutionsFilledIcon, SolutionsIcon, SortIcon, SourceToPayFilledIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, Stagger, StaggerProps, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsFilledIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemData, TabNavItemProps, TabNavItems, TabNavProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsFilledIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, TimePicker, TitleCollectionProps, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqFilledIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopLeftRoundedCornerIcon, TopLeftSharpCornerIcon, TopNav, TopNavActions, TopNavBrand, TopNavContent, TopNavProps, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TranslateIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayFilledIcon, UpiAutopayIcon, UpiIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsFilledIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoFilledIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, VolumeOffIcon, VolumeOnIcon, WalletIcon, WatchIcon, WhatsAppIcon, WifiIcon, WifiOffIcon, WindIcon, WorldwideIcon, XCircleIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, drawerPadding, getHeadingProps, getTextProps, legacyScreenReaderStyles, screenReaderStyles, useTheme, useToast };
|
|
27268
|
+
export { AcceptPaymentsFilledIcon, AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActionListSectionTitle, ActivityIcon, AddressBookIcon, AffordabilityFilledIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AndroidIcon, AnimateInteractions, AnimateInteractionsProps, AnnouncementIcon, ApertureIcon, AppStoreIcon, AppleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSquareDownIcon, ArrowSquareDownLeftIcon, ArrowSquareDownRightIcon, ArrowSquareLeftIcon, ArrowSquareRightIcon, ArrowSquareUpIcon, ArrowSquareUpLeftIcon, ArrowSquareUpRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollFilledIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationFilledIcon, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, Battery100PercentIcon, Battery20PercentIcon, Battery40PercentIcon, Battery60PercentIcon, Battery80PercentIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiFilledIcon, BfsiIcon, BillIcon, BillMeFilledIcon, BillMeIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomNav, BottomNavItem, BottomNavItemProps, BottomNavProps, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsFilledIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementFilledIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, ChartArea, ChartAreaProps, ChartAreaWrapper, ChartAreaWrapperProps, ChartBar, ChartBarProps, ChartBarWrapper, ChartBarWrapperProps, ChartCartesianGrid, ChartCartesianGridProps, ChartDonut, ChartDonutCell, ChartDonutProps, ChartDonutWrapper, ChartDonutWrapperProps, ChartLegend, ChartLegendProps, ChartLine, ChartLineProps, ChartLineWrapper, ChartLineWrapperProps, ChartReferenceLine, ChartReferenceLineProps, ChartTooltip, ChartTooltipProps, ChartXAxis, ChartXAxisProps, ChartYAxis, ChartYAxisProps, ChatMessage, ChatMessageProps, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpDownIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationFilledIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterInput, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansFilledIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountFilledIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingFilledIcon, DigitalLendingIcon, DisbursePaymentsFilledIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerBody, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownIconButton, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceFilledIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationFilledIcon, EducationIcon, Elevate, ElevateProps, EmptyState, EmptyStateProps, EngageFilledIcon, EngageIcon, EqualsIcon, EscrowAccountFilledIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, Fade, FadeProps, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterChipDatePicker, FilterChipGroup, FilterChipGroupContextType, FilterChipGroupProps, FilterChipSelectInput, FilterIcon, FlagIcon, FlaskIcon, FolderIcon, ForexManagementFilledIcon, ForexManagementIcon, FreelanceFilledIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, IndiaFlagIcon, Indicator, IndicatorProps, InfoGroup, InfoGroupProps, InfoIcon, InfoItem, InfoItemKey, InfoItemKeyProps, InfoItemProps, InfoItemValue, InfoItemValueProps, InputDropdownButton, InputGroup, InputGroupProps, InputRow, InputRowProps, InstagramIcon, InstantSettlementFilledIcon, InstantSettlementIcon, InternationalPaymentsFilledIcon, InternationalPaymentsIcon, InvoicesFilledIcon, InvoicesIcon, ItalicIcon, KeyIcon, KeyboardIcon, LayersIcon, LayoutIcon, LeftCircularCornerIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, ListSearchIcon, ListView, ListViewFilters, LoaderIcon, LoansForBusinessesFilledIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutFilledIcon, MagicCheckoutIcon, MagicKonnectFilledIcon, MagicKonnectIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppFilledIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreFilledIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, Morph, MorphProps, Move, MoveIcon, MoveProps, MusicIcon, MyAccountIcon, NavigationIcon, NoSignalIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerFilledIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonFilledIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayFilledIcon, PaymentGatewayIcon, PaymentLinkFilledIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesFilledIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsFilledIcon, PayrollAddonsIcon, PayrollForCaFilledIcon, PayrollForCaIcon, PayrollForStartupOrSmeFilledIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetFilledIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosFilledIcon, PosIcon, PowerIcon, Preview, PreviewBody, PreviewBodyProps, PreviewFooter, PreviewFooterProps, PreviewHeader, PreviewHeaderProps, PreviewProps, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, PromptIcon, QRCodeIcon, QuickFilter, QuickFilterGroup, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RayIcon, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollFilledIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteFilledIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasFilledIcon, SaasIcon, SaveIcon, Scale, ScaleProps, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Signal1BarIcon, Signal2BarIcon, Signal3BarIcon, Signal4BarIcon, SignalIcon, SimCardIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, Slide, SlideProps, SlidersIcon, SmartCollectFilledIcon, SmartCollectIcon, SmartphoneIcon, SolutionsFilledIcon, SolutionsIcon, SortIcon, SourceToPayFilledIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, Stagger, StaggerProps, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsFilledIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemData, TabNavItemProps, TabNavItems, TabNavProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsFilledIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, TimePicker, TitleCollectionProps, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqFilledIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopLeftRoundedCornerIcon, TopLeftSharpCornerIcon, TopNav, TopNavActions, TopNavBrand, TopNavContent, TopNavProps, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TranslateIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayFilledIcon, UpiAutopayIcon, UpiIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsFilledIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoFilledIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, VolumeOffIcon, VolumeOnIcon, WalletIcon, WatchIcon, WhatsAppIcon, WifiIcon, WifiOffIcon, WindIcon, WorldwideIcon, XCircleIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, drawerPadding, getHeadingProps, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
@@ -6531,6 +6531,10 @@ type CardProps = {
|
|
|
6531
6531
|
* @default undefined
|
|
6532
6532
|
*/
|
|
6533
6533
|
as?: 'label';
|
|
6534
|
+
cursor?: Platform.Select<{
|
|
6535
|
+
web: CSSObject['cursor'];
|
|
6536
|
+
native: undefined;
|
|
6537
|
+
}>;
|
|
6534
6538
|
} & TestID & DataAnalyticsAttribute & StyledPropsBlade;
|
|
6535
6539
|
type CardBodyProps = {
|
|
6536
6540
|
children: react__default.ReactNode;
|
|
@@ -6669,6 +6673,7 @@ declare const Card: react__default.ForwardRefExoticComponent<{
|
|
|
6669
6673
|
* @default undefined
|
|
6670
6674
|
*/
|
|
6671
6675
|
as?: "label" | undefined;
|
|
6676
|
+
cursor?: undefined;
|
|
6672
6677
|
} & TestID & DataAnalyticsAttribute & Partial<Omit<MarginProps & Pick<FlexboxProps, "alignSelf" | "flexWrap" | "justifySelf" | "order" | "placeSelf"> & {
|
|
6673
6678
|
bottom: SpacingValueType | {
|
|
6674
6679
|
readonly base?: SpacingValueType | undefined;
|
|
@@ -16641,7 +16646,6 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => rea
|
|
|
16641
16646
|
* https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
16642
16647
|
*/
|
|
16643
16648
|
declare const screenReaderStyles: CSSObject;
|
|
16644
|
-
declare const legacyScreenReaderStyles: CSSObject;
|
|
16645
16649
|
|
|
16646
16650
|
type ListViewCommonProps = {
|
|
16647
16651
|
children: react__default.ReactNode;
|
|
@@ -16780,4 +16784,4 @@ declare const PreviewHeader: (_prop: PreviewHeaderProps) => react__default.React
|
|
|
16780
16784
|
declare const PreviewBody: (_prop: PreviewBodyProps) => react__default.ReactElement;
|
|
16781
16785
|
declare const PreviewFooter: (_prop: PreviewFooterProps) => react__default.ReactElement;
|
|
16782
16786
|
|
|
16783
|
-
export { AcceptPaymentsFilledIcon, AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActionListSectionTitle, ActivityIcon, AddressBookIcon, AffordabilityFilledIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AndroidIcon, AnimateInteractions, AnimateInteractionsProps, AnnouncementIcon, ApertureIcon, AppStoreIcon, AppleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSquareDownIcon, ArrowSquareDownLeftIcon, ArrowSquareDownRightIcon, ArrowSquareLeftIcon, ArrowSquareRightIcon, ArrowSquareUpIcon, ArrowSquareUpLeftIcon, ArrowSquareUpRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollFilledIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AwardIcon, Badge, BadgeProps, BankAccountVerificationFilledIcon, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BaseFilterChip, Battery100PercentIcon, Battery20PercentIcon, Battery40PercentIcon, Battery60PercentIcon, Battery80PercentIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiFilledIcon, BfsiIcon, BillIcon, BillMeFilledIcon, BillMeIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomNav, BottomNavItem, BottomNavItemProps, BottomNavProps, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsFilledIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementFilledIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, ChartArea, ChartAreaProps, ChartAreaWrapper, ChartAreaWrapperProps, ChartBar, ChartBarProps, ChartBarWrapper, ChartBarWrapperProps, ChartCartesianGrid, ChartCartesianGridProps, ChartDonut, ChartDonutCell, ChartDonutProps, ChartDonutWrapper, ChartDonutWrapperProps, ChartLegend, ChartLegendProps, ChartLine, ChartLineProps, ChartLineWrapper, ChartLineWrapperProps, ChartReferenceLine, ChartReferenceLineProps, ChartTooltip, ChartTooltipProps, ChartXAxis, ChartXAxisProps, ChartYAxis, ChartYAxisProps, ChatMessage, ChatMessageProps, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpDownIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationFilledIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterInput, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansFilledIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountFilledIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingFilledIcon, DigitalLendingIcon, DisbursePaymentsFilledIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerBody, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownIconButton, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceFilledIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationFilledIcon, EducationIcon, Elevate, ElevateProps, EmptyState, EmptyStateProps, EngageFilledIcon, EngageIcon, EqualsIcon, EscrowAccountFilledIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, Fade, FadeProps, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileZipIcon, FilmIcon, FilterChipDatePicker, FilterChipGroup, FilterChipGroupContextType, FilterChipGroupProps, FilterIcon, FlagIcon, FlaskIcon, FolderIcon, ForexManagementFilledIcon, ForexManagementIcon, FreelanceFilledIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, IndiaFlagIcon, Indicator, IndicatorProps, InfoGroup, InfoGroupProps, InfoIcon, InfoItem, InfoItemKey, InfoItemKeyProps, InfoItemProps, InfoItemValue, InfoItemValueProps, InputDropdownButton, InputGroup, InputGroupProps, InputRow, InputRowProps, InstagramIcon, InstantSettlementFilledIcon, InstantSettlementIcon, InternationalPaymentsFilledIcon, InternationalPaymentsIcon, InvoicesFilledIcon, InvoicesIcon, ItalicIcon, KeyIcon, KeyboardIcon, LayersIcon, LayoutIcon, LeftCircularCornerIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, ListSearchIcon, ListView, ListViewFilters, LoaderIcon, LoansForBusinessesFilledIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutFilledIcon, MagicCheckoutIcon, MagicKonnectFilledIcon, MagicKonnectIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppFilledIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreFilledIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, Morph, MorphProps, Move, MoveIcon, MoveProps, MusicIcon, MyAccountIcon, NavigationIcon, NoSignalIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerFilledIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonFilledIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayFilledIcon, PaymentGatewayIcon, PaymentLinkFilledIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesFilledIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsFilledIcon, PayrollAddonsIcon, PayrollForCaFilledIcon, PayrollForCaIcon, PayrollForStartupOrSmeFilledIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetFilledIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosFilledIcon, PosIcon, PowerIcon, Preview, PreviewBody, PreviewBodyProps, PreviewFooter, PreviewFooterProps, PreviewHeader, PreviewHeaderProps, PreviewProps, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, PromptIcon, QRCodeIcon, QuickFilter, QuickFilterGroup, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RayIcon, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollFilledIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteFilledIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasFilledIcon, SaasIcon, SaveIcon, Scale, ScaleProps, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Signal1BarIcon, Signal2BarIcon, Signal3BarIcon, Signal4BarIcon, SignalIcon, SimCardIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, Slide, SlideProps, SlidersIcon, SmartCollectFilledIcon, SmartCollectIcon, SmartphoneIcon, SolutionsFilledIcon, SolutionsIcon, SortIcon, SourceToPayFilledIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, Stagger, StaggerProps, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsFilledIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemData, TabNavItemProps, TabNavProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps$1 as TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsFilledIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, TimePicker, TitleCollectionProps, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqFilledIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopLeftRoundedCornerIcon, TopLeftSharpCornerIcon, TopNav, Tour, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TranslateIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayFilledIcon, UpiAutopayIcon, UpiIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsFilledIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoFilledIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, VolumeOffIcon, VolumeOnIcon, WalletIcon, WatchIcon, WhatsAppIcon, WifiIcon, WifiOffIcon, WindIcon, WorldwideIcon, XCircleIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getHeadingProps, getTextProps, legacyScreenReaderStyles, screenReaderStyles, useTheme, useToast };
|
|
16787
|
+
export { AcceptPaymentsFilledIcon, AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActionListSectionTitle, ActivityIcon, AddressBookIcon, AffordabilityFilledIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AndroidIcon, AnimateInteractions, AnimateInteractionsProps, AnnouncementIcon, ApertureIcon, AppStoreIcon, AppleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSquareDownIcon, ArrowSquareDownLeftIcon, ArrowSquareDownRightIcon, ArrowSquareLeftIcon, ArrowSquareRightIcon, ArrowSquareUpIcon, ArrowSquareUpLeftIcon, ArrowSquareUpRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollFilledIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AwardIcon, Badge, BadgeProps, BankAccountVerificationFilledIcon, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BaseFilterChip, Battery100PercentIcon, Battery20PercentIcon, Battery40PercentIcon, Battery60PercentIcon, Battery80PercentIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiFilledIcon, BfsiIcon, BillIcon, BillMeFilledIcon, BillMeIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomNav, BottomNavItem, BottomNavItemProps, BottomNavProps, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsFilledIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementFilledIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, ChartArea, ChartAreaProps, ChartAreaWrapper, ChartAreaWrapperProps, ChartBar, ChartBarProps, ChartBarWrapper, ChartBarWrapperProps, ChartCartesianGrid, ChartCartesianGridProps, ChartDonut, ChartDonutCell, ChartDonutProps, ChartDonutWrapper, ChartDonutWrapperProps, ChartLegend, ChartLegendProps, ChartLine, ChartLineProps, ChartLineWrapper, ChartLineWrapperProps, ChartReferenceLine, ChartReferenceLineProps, ChartTooltip, ChartTooltipProps, ChartXAxis, ChartXAxisProps, ChartYAxis, ChartYAxisProps, ChatMessage, ChatMessageProps, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpDownIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationFilledIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterInput, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansFilledIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountFilledIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingFilledIcon, DigitalLendingIcon, DisbursePaymentsFilledIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerBody, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownIconButton, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceFilledIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationFilledIcon, EducationIcon, Elevate, ElevateProps, EmptyState, EmptyStateProps, EngageFilledIcon, EngageIcon, EqualsIcon, EscrowAccountFilledIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, Fade, FadeProps, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileZipIcon, FilmIcon, FilterChipDatePicker, FilterChipGroup, FilterChipGroupContextType, FilterChipGroupProps, FilterIcon, FlagIcon, FlaskIcon, FolderIcon, ForexManagementFilledIcon, ForexManagementIcon, FreelanceFilledIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, IndiaFlagIcon, Indicator, IndicatorProps, InfoGroup, InfoGroupProps, InfoIcon, InfoItem, InfoItemKey, InfoItemKeyProps, InfoItemProps, InfoItemValue, InfoItemValueProps, InputDropdownButton, InputGroup, InputGroupProps, InputRow, InputRowProps, InstagramIcon, InstantSettlementFilledIcon, InstantSettlementIcon, InternationalPaymentsFilledIcon, InternationalPaymentsIcon, InvoicesFilledIcon, InvoicesIcon, ItalicIcon, KeyIcon, KeyboardIcon, LayersIcon, LayoutIcon, LeftCircularCornerIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, ListSearchIcon, ListView, ListViewFilters, LoaderIcon, LoansForBusinessesFilledIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutFilledIcon, MagicCheckoutIcon, MagicKonnectFilledIcon, MagicKonnectIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppFilledIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreFilledIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, Morph, MorphProps, Move, MoveIcon, MoveProps, MusicIcon, MyAccountIcon, NavigationIcon, NoSignalIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerFilledIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonFilledIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayFilledIcon, PaymentGatewayIcon, PaymentLinkFilledIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesFilledIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsFilledIcon, PayrollAddonsIcon, PayrollForCaFilledIcon, PayrollForCaIcon, PayrollForStartupOrSmeFilledIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetFilledIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosFilledIcon, PosIcon, PowerIcon, Preview, PreviewBody, PreviewBodyProps, PreviewFooter, PreviewFooterProps, PreviewHeader, PreviewHeaderProps, PreviewProps, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, PromptIcon, QRCodeIcon, QuickFilter, QuickFilterGroup, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RayIcon, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollFilledIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteFilledIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasFilledIcon, SaasIcon, SaveIcon, Scale, ScaleProps, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Signal1BarIcon, Signal2BarIcon, Signal3BarIcon, Signal4BarIcon, SignalIcon, SimCardIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, Slide, SlideProps, SlidersIcon, SmartCollectFilledIcon, SmartCollectIcon, SmartphoneIcon, SolutionsFilledIcon, SolutionsIcon, SortIcon, SourceToPayFilledIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, Stagger, StaggerProps, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsFilledIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemData, TabNavItemProps, TabNavProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps$1 as TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsFilledIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, TimePicker, TitleCollectionProps, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqFilledIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopLeftRoundedCornerIcon, TopLeftSharpCornerIcon, TopNav, Tour, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TranslateIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayFilledIcon, UpiAutopayIcon, UpiIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsFilledIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoFilledIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, VolumeOffIcon, VolumeOnIcon, WalletIcon, WatchIcon, WhatsAppIcon, WifiIcon, WifiOffIcon, WindIcon, WorldwideIcon, XCircleIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getHeadingProps, getTextProps, screenReaderStyles, useTheme, useToast };
|