@razorpay/blade 10.12.1 → 10.13.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.
@@ -2085,7 +2085,7 @@ var Rect=function Rect(_ref){var height=_ref.height,width=_ref.width,fill=_ref.f
2085
2085
 
2086
2086
  var _excluded$4Z=["children","height","viewBox","width","fill"];var StyledSvg$1=styled(Svg$1)(function(props){var styledPropsCSSObject=useStyledProps(props);return styledPropsCSSObject;});var _Svg=function _Svg(_ref,ref){var children=_ref.children,height=_ref.height,viewBox=_ref.viewBox,width=_ref.width,fill=_ref.fill,styledProps=_objectWithoutProperties(_ref,_excluded$4Z);return jsx(StyledSvg$1,Object.assign({},makeAccessible({hidden:true}),metaAttribute({name:MetaConstants.Icon}),{height:height,viewBox:viewBox,width:width,fill:fill,ref:ref},styledProps,{children:children}));};var Svg=React__default.forwardRef(_Svg);
2087
2087
 
2088
- var svgSize={small:{width:size[8],height:size[8]},medium:{width:size[12],height:size[12]}};var CheckedIcon$1=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var IndeterminateIcon=function IndeterminateIcon(_ref2){var color=_ref2.color,size=_ref2.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var CheckboxIcon=function CheckboxIcon(_ref3){var isChecked=_ref3.isChecked,isIndeterminate=_ref3.isIndeterminate,isDisabled=_ref3.isDisabled,isNegative=_ref3.isNegative,size=_ref3.size;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultIconColor=getIn(theme,'colors.brand.gray.200.lowContrast');var disabledIconColor=getIn(theme,'colors.brand.gray.500.lowContrast');var iconColor=isDisabled?disabledIconColor:defaultIconColor;return jsxs(CheckboxIconWrapper,Object.assign({size:size,isIndeterminate:isIndeterminate,isDisabled:isDisabled,isNegative:isNegative,isChecked:!!(isChecked||isIndeterminate)},metaAttribute({name:'checkbox-icon-wrapper'}),{children:[jsx(Fade$1,{show:isIndeterminate,styles:{position:'absolute',display:'flex'},children:jsx(IndeterminateIcon,{size:size,color:iconColor})}),jsx(Fade$1,{show:Boolean(isChecked)&&!isIndeterminate,styles:{position:'absolute',display:'flex'},children:isChecked?jsx(CheckedIcon$1,{size:size,color:iconColor}):null})]}));};
2088
+ var svgSize={small:{width:size[8],height:size[8]},medium:{width:size[12],height:size[12]}};var CheckedIcon$1=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",fill:color,stroke:color,strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var IndeterminateIcon=function IndeterminateIcon(_ref2){var color=_ref2.color,size=_ref2.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",fill:color,stroke:color,strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var CheckboxIcon=function CheckboxIcon(_ref3){var isChecked=_ref3.isChecked,isIndeterminate=_ref3.isIndeterminate,isDisabled=_ref3.isDisabled,isNegative=_ref3.isNegative,size=_ref3.size;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultIconColor=getIn(theme,'colors.brand.gray.200.lowContrast');var disabledIconColor=getIn(theme,'colors.brand.gray.500.lowContrast');var iconColor=isDisabled?disabledIconColor:defaultIconColor;return jsxs(CheckboxIconWrapper,Object.assign({size:size,isIndeterminate:isIndeterminate,isDisabled:isDisabled,isNegative:isNegative,isChecked:!!(isChecked||isIndeterminate)},metaAttribute({name:'checkbox-icon-wrapper'}),{children:[jsx(Fade$1,{show:isIndeterminate,styles:{position:'absolute',display:'flex'},children:jsx(IndeterminateIcon,{size:size,color:iconColor})}),jsx(Fade$1,{show:Boolean(isChecked)&&!isIndeterminate,styles:{position:'absolute',display:'flex'},children:isChecked?jsx(CheckedIcon$1,{size:size,color:iconColor}):null})]}));};
2089
2089
 
2090
2090
  var handoffComplete=false;var id=0;var genId=function genId(){return ++id;};var useId=function useId(prefix,idProp){var initialId=idProp||(handoffComplete?genId():null);var _React$useState=React.useState(initialId),_React$useState2=_slicedToArray(_React$useState,2),uid=_React$useState2[0],setUid=_React$useState2[1];useIsomorphicLayoutEffect(function(){if(uid===null)setUid(genId());},[]);React.useEffect(function(){if(!handoffComplete){handoffComplete=true;}},[]);var id=uid!=null?uid.toString():undefined;return prefix?`${prefix}-${id}`:id;};
2091
2091
 
@@ -2788,7 +2788,7 @@ var CarouselItem=function CarouselItem(_ref){var children=_ref.children;var _use
2788
2788
 
2789
2789
  var ChipGroupContext=React__default.createContext({});var ChipGroupProvider=ChipGroupContext.Provider;var useChipGroupContext=function useChipGroupContext(){var context=React__default.useContext(ChipGroupContext);if(__DEV__){if(typeof context==='undefined'){throwBladeError({message:'useChipGroupContext must be used within ChipGroup',moduleName:'ChipGroup'});}}return context;};
2790
2790
 
2791
- var chipGroupGapTokens={xsmall:{right:'spacing.3',bottom:'spacing.3'},small:{right:'spacing.3',bottom:'spacing.3'},medium:{right:'spacing.3',bottom:'spacing.4'},large:{right:'spacing.3',bottom:'spacing.4'}};var chipHeightTokens={xsmall:size[24],small:size[28],medium:size[36],large:size[48]};var chipHorizontalPaddingTokens={withoutIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}},withIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.5',large:'spacing.6'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}}};var chipColorTokens={text:{unchecked:'surface.text.subtle.lowContrast',disabled:'surface.text.placeholder.lowContrast',none:'brand.primary.500',positive:'feedback.text.positive.lowContrast',negative:'feedback.text.negative.lowContrast'},icon:{unchecked:'surface.text.subtle.lowContrast',disabled:'surface.text.placeholder.lowContrast',none:'brand.primary.500',positive:'feedback.icon.positive.lowContrast',negative:'feedback.icon.negative.lowContrast'},background:{unchecked:{default:'transparent',hover:'brand.gray.a50.lowContrast',disabled:'transparent'},none:{default:'brand.primary.300',hover:'brand.primary.400',disabled:'brand.gray.a50.lowContrast'},positive:{default:'feedback.positive.action.background.primary.default.lowContrast',hover:'feedback.positive.action.background.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'},negative:{default:'feedback.negative.action.background.primary.default.lowContrast',hover:'feedback.negative.action.background.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'}},border:{unchecked:{default:'brand.gray.400.lowContrast',disabled:'brand.gray.400.lowContrast'},none:{default:'brand.primary.500',hover:'brand.primary.500',disabled:'brand.gray.a100.lowContrast'},positive:{default:'feedback.positive.action.border.primary.default.lowContrast',hover:'feedback.positive.action.border.primary.hover.lowContrast',disabled:'brand.gray.a100.lowContrast'},negative:{default:'feedback.negative.action.border.primary.default.lowContrast',hover:'feedback.negative.action.border.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'}}};var getChipInputHoverTokens=function getChipInputHoverTokens(intent){return {default:{background:{checked:'transparent',unchecked:'transparent'},border:{checked:`colors.${chipColorTokens.border[intent||'none'].hover}`,unchecked:'colors.brand.gray.500.lowContrast'}}};};var chipIconSizes={xsmall:'small',small:'small',medium:'medium',large:'large'};var chipTextSizes={xsmall:{variant:'body',size:'small'},small:{variant:'body',size:'medium'},medium:{variant:'body',size:'large'},large:{variant:'body',size:'large'}};var chipMotionTokens={duration:'motion.duration.xquick',easing:'motion.easing.standard.effective'};
2791
+ var chipGroupGapTokens={xsmall:{right:'spacing.3',bottom:'spacing.3'},small:{right:'spacing.3',bottom:'spacing.3'},medium:{right:'spacing.3',bottom:'spacing.4'},large:{right:'spacing.3',bottom:'spacing.4'}};var chipHeightTokens={xsmall:size[24],small:size[28],medium:size[36],large:size[48]};var chipHorizontalPaddingTokens={withoutIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}},withIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.5',large:'spacing.6'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}}};var chipColorTokens={text:{unchecked:'surface.text.subtle.lowContrast',disabled:'surface.text.placeholder.lowContrast',none:'action.text.secondary.default',positive:'feedback.text.positive.lowContrast',negative:'feedback.text.negative.lowContrast'},icon:{unchecked:'surface.text.subtle.lowContrast',disabled:'surface.text.placeholder.lowContrast',none:'action.icon.secondary.default',positive:'feedback.icon.positive.lowContrast',negative:'feedback.icon.negative.lowContrast'},background:{unchecked:{default:'transparent',hover:'brand.gray.a50.lowContrast',disabled:'transparent'},none:{default:'brand.primary.300',hover:'brand.primary.400',disabled:'brand.gray.a50.lowContrast'},positive:{default:'feedback.positive.action.background.primary.default.lowContrast',hover:'feedback.positive.action.background.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'},negative:{default:'feedback.negative.action.background.primary.default.lowContrast',hover:'feedback.negative.action.background.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'}},border:{unchecked:{default:'brand.gray.400.lowContrast',disabled:'brand.gray.400.lowContrast'},none:{default:'brand.primary.500',hover:'brand.primary.500',disabled:'brand.gray.a100.lowContrast'},positive:{default:'feedback.positive.action.border.primary.default.lowContrast',hover:'feedback.positive.action.border.primary.hover.lowContrast',disabled:'brand.gray.a100.lowContrast'},negative:{default:'feedback.negative.action.border.primary.default.lowContrast',hover:'feedback.negative.action.border.primary.hover.lowContrast',disabled:'brand.gray.a50.lowContrast'}}};var getChipInputHoverTokens=function getChipInputHoverTokens(intent){return {default:{background:{checked:'transparent',unchecked:'transparent'},border:{checked:`colors.${chipColorTokens.border[intent||'none'].hover}`,unchecked:'colors.brand.gray.500.lowContrast'}}};};var chipIconSizes={xsmall:'small',small:'small',medium:'medium',large:'large'};var chipTextSizes={xsmall:{variant:'body',size:'small'},small:{variant:'body',size:'medium'},medium:{variant:'body',size:'large'},large:{variant:'body',size:'large'}};var chipMotionTokens={duration:'motion.duration.xquick',easing:'motion.easing.standard.effective'};
2792
2792
 
2793
2793
  var getAnimatedChipStyles=function getAnimatedChipStyles(_ref){var theme=_ref.theme,isDesktop=_ref.isDesktop,isDisabled=_ref.isDisabled,borderColor=_ref.borderColor;return {backgroundColor:isDisabled?'transparent':getIn(theme.colors,'surface.background.level2.lowContrast'),borderRadius:makeBorderSize(theme.border.radius.max),borderColor:getIn(theme.colors,borderColor),borderWidth:getIn(theme,'border.width.thin'),display:'flex',flexWrap:'nowrap',flexDirection:'row',alignItems:'center',justifyContent:'center',textAlign:'left',textOverflow:'ellipsis',maxWidth:isDesktop?'420px':'280px'};};
2794
2794