@razorpay/blade 11.30.2 → 11.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/web/development/components/Card/CardRoot.web.js +4 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +4 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
21
21
|
displayName: "CardRootweb__StyledCardRoot",
|
|
22
22
|
componentId: "sc-1nb70ck-0"
|
|
23
23
|
})(function (_ref) {
|
|
24
|
-
var
|
|
24
|
+
var as = _ref.as,
|
|
25
|
+
theme = _ref.theme,
|
|
25
26
|
isSelected = _ref.isSelected,
|
|
26
27
|
isFocused = _ref.isFocused,
|
|
27
28
|
shouldScaleOnHover = _ref.shouldScaleOnHover,
|
|
@@ -36,7 +37,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
36
37
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
37
38
|
transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),
|
|
38
39
|
transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),
|
|
39
|
-
transitionProperty: 'transform, box-shadow'
|
|
40
|
+
transitionProperty: 'transform, box-shadow',
|
|
41
|
+
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
40
42
|
}, isMobile && isPressed && {
|
|
41
43
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
42
44
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ as, theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","cursor","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CACpC,CAAA,CAAA,UAAAC,IAAA,EAAmF;AAAA,EAAA,IAAhFC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,QAAQ,GAAAP,IAAA,CAARO,QAAQ,CAAA;AAC1E,EAAA,IAAMC,aAAa,GAAGL,UAAU,GAAGD,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACC,MAAM,GAAG,aAAa,CAAA;AAC7F,EAAA,IAAMC,cAAc,GAAA,cAAA,CAAAC,MAAA,CAAkBb,KAAK,CAACS,MAAM,CAACK,KAAK,CAACC,OAAO,EAAA,KAAA,CAAA,CAAAF,MAAA,CAAMP,aAAa,CAAE,CAAA;AACrF;AACA,EAAA,IAAMU,SAAS,GAAGd,SAAS,wBAAAW,MAAA,CACFb,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACO,KAAK,IAC9D,EAAE,CAAA;AAEN,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACE;IACAC,SAAS,EAAA,EAAA,CAAAN,MAAA,CAAKD,cAAc,EAAAC,MAAA,CA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@ -21,7 +21,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
21
21
|
displayName: "CardRootweb__StyledCardRoot",
|
|
22
22
|
componentId: "sc-1nb70ck-0"
|
|
23
23
|
})(function (_ref) {
|
|
24
|
-
var
|
|
24
|
+
var as = _ref.as,
|
|
25
|
+
theme = _ref.theme,
|
|
25
26
|
isSelected = _ref.isSelected,
|
|
26
27
|
isFocused = _ref.isFocused,
|
|
27
28
|
shouldScaleOnHover = _ref.shouldScaleOnHover,
|
|
@@ -36,7 +37,8 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
36
37
|
boxShadow: "".concat(selectedBorder).concat(focusRing),
|
|
37
38
|
transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),
|
|
38
39
|
transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),
|
|
39
|
-
transitionProperty: 'transform, box-shadow'
|
|
40
|
+
transitionProperty: 'transform, box-shadow',
|
|
41
|
+
cursor: as === 'label' ? 'pointer' : 'initial'
|
|
40
42
|
}, isMobile && isPressed && {
|
|
41
43
|
transform: "scale(".concat(CARD_SCALE_DOWN_VALUE, ")")
|
|
42
44
|
}), !isMobile && shouldScaleOnHover && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","
|
|
1
|
+
{"version":3,"file":"CardRoot.web.js","sources":["../../../../../../src/components/Card/CardRoot.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport type { CardRootProps } from './types';\nimport { CARD_LINK_OVERLAY_ID, CARD_SCALE_DOWN_VALUE, CARD_SCALE_UP_VALUE } from './constants';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { useIsMobile } from '~utils/useIsMobile';\n\nconst StyledCardRoot = styled(BaseBox)<CardRootProps & { isPressed: boolean; isMobile: boolean }>(\n ({ as, theme, isSelected, isFocused, shouldScaleOnHover, isPressed, isMobile }) => {\n const selectedColor = isSelected ? theme.colors.surface.border.primary.normal : 'transparent';\n const selectedBorder = `0px 0px 0px ${theme.border.width.thicker}px ${selectedColor}`;\n // focused state\n const focusRing = isFocused\n ? `, 0px 0px 0px 4px ${theme.colors.surface.border.primary.muted}`\n : '';\n\n return {\n // Selected state\n boxShadow: `${selectedBorder}${focusRing}`,\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.standard.effective),\n transitionProperty: 'transform, box-shadow',\n cursor: as === 'label' ? 'pointer' : 'initial',\n\n // pressed state for mobile only\n ...(isMobile &&\n isPressed && {\n transform: `scale(${CARD_SCALE_DOWN_VALUE})`,\n }),\n\n // Hover state for desktop only\n ...(!isMobile &&\n shouldScaleOnHover && {\n '&:hover': {\n transform: `scale(${CARD_SCALE_UP_VALUE})`,\n },\n }),\n\n // uplift all the nested links so they receive clicks and events (except the LinkOverlay)\n // https://www.sarasoueidan.com/blog/nested-links\n [`& a[href]:not(a[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n [`& button:not(button[data-blade-component=\"${CARD_LINK_OVERLAY_ID}\"])`]: {\n zIndex: 2,\n position: 'relative',\n },\n };\n },\n);\n\nconst CardRoot = ({\n as,\n accessibilityLabel,\n children,\n ...props\n}: CardRootProps): React.ReactElement => {\n const isMobile = useIsMobile();\n const [isPressed, setIsPressed] = React.useState(false);\n\n return (\n <StyledCardRoot\n as={as}\n {...props}\n isMobile={isMobile}\n isPressed={props.shouldScaleOnHover ? isPressed : false}\n onTouchStart={() => setIsPressed(true)}\n onTouchEnd={() => setIsPressed(false)}\n onMouseDown={() => setIsPressed(true)}\n onMouseUp={() => setIsPressed(false)}\n {...makeAccessible({\n label: as === 'label' ? accessibilityLabel : undefined,\n })}\n >\n {children}\n </StyledCardRoot>\n );\n};\n\nexport { CardRoot };\n"],"names":["StyledCardRoot","styled","BaseBox","withConfig","displayName","componentId","_ref","as","theme","isSelected","isFocused","shouldScaleOnHover","isPressed","isMobile","selectedColor","colors","surface","border","primary","normal","selectedBorder","concat","width","thicker","focusRing","muted","_objectSpread","boxShadow","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","transitionProperty","cursor","transform","CARD_SCALE_DOWN_VALUE","CARD_SCALE_UP_VALUE","_defineProperty","CARD_LINK_OVERLAY_ID","zIndex","position","CardRoot","_ref2","accessibilityLabel","children","props","_objectWithoutProperties","_excluded","useIsMobile","_React$useState","React","useState","_React$useState2","_slicedToArray","setIsPressed","_jsx","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","makeAccessible","label","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,6B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