@visa/nova-react
Version:
Visa Product Design System Nova React library
18 lines (17 loc) • 2.24 kB
JavaScript
/**
* Copyright (c) 2025 Visa, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**/
import v from"clsx";import{cloneElement as e}from"react";const l=({children:l,className:i,vAlignContent:r,vAlignItems:a,vAlignSelf:n,vColGap:o,vContainerHide:t,vElevation:x,vFlex:g,vFlexCol:p,vFlexColReverse:d,vFlexGrow:s,vFlexGrow0:$,vFlexInline:f,vFlexNoWrap:m,vFlexRow:c,vFlexRowReverse:F,vFlexShrink:w,vFlexShrink0:h,vFlexWrap:M,vFlexWrapReverse:R,vGap:P,vHide:y,vJustifyContent:C,vMargin:G,vMarginBottom:H,vMarginHorizontal:N,vMarginLeft:k,vMarginRight:u,vMarginTop:A,vMarginVertical:S,vMediaHide:W,vPadding:b,vPaddingBottom:z,vPaddingHorizontal:B,vPaddingLeft:I,vPaddingRight:L,vPaddingTop:T,vPaddingVertical:V,vRowGap:j,...E})=>{const J=v(r&&`v-align-content-${r}`,a&&`v-align-items-${a}`,n&&`v-align-self-${n}`,(o||0===o)&&`v-col-gap-${o}`,t&&`v-${t}-container-hide`,x&&`v-elevation-${x}`,(g||p||j)&&"v-flex",p&&"v-flex-col",d&&"v-flex-col-reverse",s&&"v-flex-grow",$&&"v-flex-grow-0",f&&"v-flex-inline",m&&"v-flex-nowrap",c&&"v-flex-row",F&&"v-flex-row-reverse",w&&"v-flex-shrink",h&&"v-flex-shrink-0",M&&"v-flex-wrap",R&&"v-flex-wrap-reverse",(P||0===P)&&`v-gap-${P}`,y&&"v-hide",C&&`v-justify-content-${C}`,(G||0===G)&&`v-m-${G}`,(H||0===H)&&`v-mb-${H}`,(N||0===N)&&`v-mx-${N}`,(k||0===k)&&`v-ml-${k}`,(u||0===u)&&`v-mr-${u}`,(A||0===A)&&`v-mt-${A}`,(S||0===S)&&`v-my-${S}`,W&&`v-${W}-media-hide`,(b||0===b)&&`v-p-${b}`,(z||0===z)&&`v-pb-${z}`,(B||0===B)&&`v-px-${B}`,(I||0===I)&&`v-pl-${I}`,(L||0===L)&&`v-pr-${L}`,(T||0===T)&&`v-pt-${T}`,(V||0===V)&&`v-py-${V}`,(j||0===j)&&`v-row-gap-${j}`,i,l.props.className)||void 0;return e(l,{className:J,...E})};l.displayName="UtilityFragment";export{l as default};