@razorpay/blade 9.0.1 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/index.native.js +2 -2
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +4 -22
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/package.json +1 -1
|
@@ -3088,9 +3088,9 @@ var StyledAccordionButton=styled(Animated.createAnimatedComponent(Pressable))(ge
|
|
|
3088
3088
|
|
|
3089
3089
|
var CollapsibleContext=createContext(null);var useCollapsible=function useCollapsible(){var collapsibleContext=useContext(CollapsibleContext);if(!collapsibleContext){throw new Error("[Blade: CollapsibleContext]: You're trying to use Collapsible sub-components without Collapsible. useCollapsible should only be used within CollapsibleContext");}return collapsibleContext;};
|
|
3090
3090
|
|
|
3091
|
-
var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction;return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(
|
|
3091
|
+
var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction;return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(){return {transformExpanded:-180,transformCollapsed:0};};
|
|
3092
3092
|
|
|
3093
|
-
var CollapsibleChevronIcon=function CollapsibleChevronIcon(props){var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded
|
|
3093
|
+
var CollapsibleChevronIcon=function CollapsibleChevronIcon(props){var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded;var _useTheme=useTheme(),theme=_useTheme.theme;var _getCollapsibleChevro=getCollapsibleChevronIconTransforms(),transformExpanded=_getCollapsibleChevro.transformExpanded,transformCollapsed=_getCollapsibleChevro.transformCollapsed;var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));var rotateZ=useDerivedValue(function(){var _f=function _f(){return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});};_f._closure={withTiming:withTiming,isExpanded:isExpanded,transformExpanded:transformExpanded,transformCollapsed:transformCollapsed,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isExpanded,transformExpanded,transformCollapsed,duration,easing}=jsThis._closure;{return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});}}";_f.__workletHash=6055948545361;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Collapsible/CollapsibleChevronIcon.native.tsx (23:34)";return _f;}());var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {transform:[{rotateZ:rotateZ.value+"deg"}]};};_f._closure={rotateZ:rotateZ};_f.asString="function _f(){const{rotateZ}=jsThis._closure;{return{transform:[{rotateZ:rotateZ.value+\"deg\"}]};}}";_f.__workletHash=15898834984503;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Collapsible/CollapsibleChevronIcon.native.tsx (26:42)";_f.__optimalization=3;return _f;}());return jsx(Animated.View,_extends({style:animatedStyles},makeAccessible({hidden:true}),{children:jsx(ChevronDownIcon,_extends({},props))}));};
|
|
3094
3094
|
|
|
3095
3095
|
var _AccordionButton=function _AccordionButton(_ref){var index=_ref.index,Icon=_ref.icon,children=_ref.children;var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var _useAccordion=useAccordion(),showNumberPrefix=_useAccordion.showNumberPrefix,expandedIndex=_useAccordion.expandedIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var toggleCollapse=function toggleCollapse(){return onExpandChange(!isExpanded);};var isItemExpanded=expandedIndex===index;var isPressed=useSharedValue(false);var duration=castNativeType(getTransitionDuration$1(theme));var easing=castNativeType(getTransitionEasing$1(theme));var activeBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true}));var inActiveBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false}));useEffect(function(){activeBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true});inActiveBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false});},[isExpanded,activeBackgroundColor,inActiveBackgroundColor,theme]);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,inActiveBackgroundColor:inActiveBackgroundColor,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,inActiveBackgroundColor,duration,easing}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};}}";_f.__workletHash=12210880793787;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Accordion/AccordionButton.native.tsx (51:42)";_f.__optimalization=2;return _f;}());var _showNumberPrefix=typeof index==='number'&&showNumberPrefix;var _index=_showNumberPrefix?jsxs(Heading,{size:"small",marginRight:"spacing.2",children:[index+1,"."]}):null;var a11yLabel=_showNumberPrefix?index+1+". "+children:children;var renderChildren=function renderChildren(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;var iconColor=pressed?'surface.action.icon.focus.lowContrast':'surface.action.icon.default.lowContrast';var _icon=Icon&&jsx(Icon,{size:"medium",color:iconColor,marginRight:"spacing.3",marginY:"spacing.2"});if(_index&&_icon){throw new Error("[Blade: Accordion]: showNumberPrefix and icon shouldn't be used together");}return jsxs(BaseBox,{display:"flex",flexDirection:"row",flex:1,justifyContent:"space-between",alignItems:"center",children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"flex-start",marginRight:"spacing.5",flexShrink:1,children:[_index,_icon,jsx(Heading,{size:"small",children:children})]}),jsx(BaseBox,{children:jsx(CollapsibleChevronIcon,{color:iconColor,size:"large"})})]});};return jsx(StyledAccordionButton,_extends({isExpanded:isExpanded,onPress:toggleCollapse,style:animatedStyles},makeAccessible({role:'button',expanded:isItemExpanded,controls:collapsibleBodyId,label:a11yLabel}),metaAttribute({name:MetaConstants.AccordionButton}),{children:renderChildren}));};var AccordionButton=assignWithoutSideEffects(_AccordionButton,{componentId:MetaConstants.AccordionButton});
|
|
3096
3096
|
|