@aic-kits/react 0.7.0 → 0.7.1
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/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -81,7 +81,7 @@ Example:
|
|
|
81
81
|
Perhaps you're looking to import 'styled-components/native'?
|
|
82
82
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var si="__sc-".concat(pn,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[si]||(window[si]=0),window[si]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
83
83
|
|
|
84
|
-
See https://s-c.sh/2BAXzed for more info.`),window[si]+=1);const vs=r=>({none:0,hairline:r*.5,thin:r,thick:r*2,heavy:r*4}),ys=r=>({none:0,xs:r*.5,sm:r,md:r*2,lg:r*3,xl:r*4,full:9999}),o_=r=>["none","hairline","thin","thick","heavy"].includes(r),s_=r=>["none","xs","sm","md","lg","xl","full"].includes(r),Ci={transparent:"#FFFFFF00",white:"#FFFFFF",black:"#000000",primary:"#6949FF",secondary:"#FFC107",success:"#12D18E",danger:"#F75555",warning:"#FACC15",info:"#6949FF",grey100:"#F5F5F5",grey200:"#EEEEEE",grey300:"#E0E0E0",grey400:"#BDBDBD",grey500:"#9E9E9E",grey600:"#757575",grey700:"#616161",grey800:"#424242",grey900:"#212121",orange100:"#FFF3E0",orange200:"#FFE0B2",orange300:"#FFCC80",orange400:"#FFB74D",orange500:"#FF9800",orange600:"#FB8C00",orange700:"#F57C00",orange800:"#EF6C00",orange900:"#E65100",cyan100:"#E0F7FA",cyan200:"#B2EBF2",cyan300:"#80DEEA",cyan400:"#4DD0E1",cyan500:"#26C6DA",cyan600:"#00BCD4",cyan700:"#00ACC1",cyan800:"#0097A7",cyan900:"#006064",purple100:"#F3E5F5",purple200:"#E1BEE7",purple300:"#CE93D8",purple400:"#BA68C8",purple500:"#AB47BC",purple600:"#9C27B0",purple700:"#8E24AA",purple800:"#7B1FA2",purple900:"#6A1B9A",teal100:"#E0F2F1",teal200:"#B2DFDB",teal300:"#80CBC4",teal400:"#4DB6AC",teal500:"#26A69A",teal600:"#009688",teal700:"#00897B",teal800:"#00796B",teal900:"#004D40",lime100:"#F9FBE7",lime200:"#F0F4C3",lime300:"#E6EE9C",lime400:"#DCE775",lime500:"#CDDC39",lime600:"#C0CA33",lime700:"#AFB42B",lime800:"#9E9D24",lime900:"#827717",pink100:"#FCE4EC",pink200:"#F8BBD0",pink300:"#F48FB1",pink400:"#F06292",pink500:"#EC4899",pink600:"#E91E63",pink700:"#D81B60",pink800:"#C2185B",pink900:"#880E4F"},a_=r=>r in Ci,cl={primary:["#543ACC","#6949FF"],secondary:["#E0A800","#FFC107"],success:["#0FB57A","#12D18E"],danger:["#E64545","#F75555"],warning:["#E1B70D","#FACC15"],info:["#543ACC","#6949FF"]},u_=r=>["primary","secondary","success","danger","warning","info"].includes(r),c_=1,l_=8,f_=8,d_="Inter",h_=10,p_=4,ll={borderWidth:c_,space:l_,size:f_,font:{neutral:d_},fontSize:h_,radius:p_},fl=r=>({none:"none",sm:`0 1px 2px 0 ${r.grey400}40`,md:`0 4px 6px -1px ${r.grey500}40, 0 2px 4px -1px ${r.grey400}40`,lg:`0 10px 15px -3px ${r.grey600}40, 0 4px 6px -2px ${r.grey500}40`}),g_=r=>["none","sm","md","lg"].includes(r),xs=r=>({"2xs":r*.5,xs:r,sm:r*2,md:r*4,lg:r*8,xl:r*16,"2xl":r*32,"3xl":r*64,"4xl":r*128}),dl=r=>["2xs","xs","sm","md","lg","xl","2xl","3xl","4xl"].includes(r),ws=r=>({none:0,xxs:r*.25,xs:r*.5,sm:r,"sm-md":r*1.5,md:r*2,"md-lg":r*2.5,lg:r*3,xl:r*4,"2xl":r*5,"3xl":r*6,"4xl":r*8,"-xxs":r*-.25,"-xs":r*-.5,"-sm":r*-1,"-sm-md":r*-1.5,"-md":r*-2,"-md-lg":r*-2.5,"-lg":r*-3,"-xl":r*-4,"-2xl":r*-5,"-3xl":r*-6,"-4xl":r*-8}),m_=r=>["none","xxs","xs","sm","sm-md","md","md-lg","lg","xl","2xl","3xl","4xl","-xxs","-xs","-sm","-sm-md","-md","-md-lg","-lg","-xl","-2xl","-3xl","-4xl"].includes(r),bs=({neutral:r})=>({neutral:`"${r}", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif`}),Si=r=>({"2xs":r*.75,xs:r,small:r*1.25,medium:r*1.5,large:r*2,xl:r*2.5,"2xl":r*3,"3xl":r*3.5}),Cs=r=>{const s=Si(r),i=1.4;return{"2xs":s["2xs"]*i,xs:s.xs*i,small:s.small*i,medium:s.medium*i,large:s.large*i,xl:s.xl*i,"2xl":s["2xl"]*i,"3xl":s["3xl"]*i}},Ss=()=>({"extra-light":100,thin:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,black:900}),__=r=>["xs","small","medium","large","xl","2xl","3xl"].includes(r),v_=r=>["extra-light","thin","light","regular","medium","semibold","bold","extrabold","black"].includes(r),y_=(r=ll,s=Ci,i=cl)=>{const u=bs(r.font),l=Si(r.fontSize),h=Cs(r.fontSize),p=Ss(),v=vs(r.borderWidth),y=ws(r.space),R=xs(r.size),O=ys(r.radius),T=fl(s);return{colors:s,gradientColors:i,fonts:u,fontSizes:l,lineHeights:h,fontWeights:p,borderWidths:v,spaces:y,sizes:R,radii:O,shadows:T}},hl=r=>({paddingVertical:"sm-md",paddingHorizontal:"sm-md",borderRadius:"lg",borderColor:"grey300",borderWidth:"thin",backgroundColor:"white",gap:"sm",header:{gap:"sm-md",iconSize:"sm",iconColor:"grey600",disabledOpacity:.5},animation:{duration:300,easing:"ease"}}),pl=r=>({defaultSize:"md",defaultIconSize:"md",defaultEmojiSize:"lg",defaultBrandSize:"md",defaultImageSize:"md",defaultSvgSize:"md"}),gl=r=>({defaultBackgroundColor:"white",defaultHeaderParams:{backgroundColor:"white"}}),ml=r=>({squircleBorderRadii:{circle:"999px",rounded:"16px",square:"0px"},loadingConfig:{size:"24px"},defaultColor:"primary",defaultTextColor:"white",iconSpacing:"sm",borderWidth:"thin",variants:{solid:{},outlined:{bgColor:"transparent",paddingHorizontal:"md",paddingVertical:"sm"},text:{bgColor:"transparent",paddingHorizontal:"none",paddingVertical:"none"}}}),_l=r=>({pagination:{container:{marginTop:"md",padding:"xs",borderRadius:"full",backgroundColor:"grey100",gap:"xs"},dotSize:"2xs",inactiveColor:"grey300",activeColor:"primary",dotBorderRadius:"full"},navigation:{marginHorizontal:"md",buttonColor:"grey500",buttonPadding:"xs",buttonBackgroundColor:"white",buttonBorderRadius:"full",iconSize:"sm"},autoScroll:{defaultSpeed:20},container:{defaultItemSpacing:"md"}}),vl=r=>({defaultColor:"grey300",defaultThickness:1}),yl=r=>({defaultBackgroundColor:"white",avatarSize:"md"}),xl=r=>({defaultBorderColor:"grey300",activeBorderColor:"primary",errorColor:"danger",disabledBgColor:"grey100",defaultBgColor:"white",borderRadius:"md",borderWidth:"thin",padding:{vertical:"sm",horizontal:"md"},fontSize:"medium",placeholderColor:"grey500",iconSpacing:"sm"}),wl=r=>({defaultGap:"8px",defaultPadding:"0px"}),bl=r=>({sizes:{small:"24px",medium:"36px",large:"48px"},strokeWidths:{small:"2px",medium:"3px",large:"4px"},arc:{minAngle:40,maxAngle:290},animation:{loopInterval:800,showingDuration:250,contentShowingDuration:300}}),Cl=r=>({animation:{duration:1500,gradient:{start:"rgba(0, 0, 0, 0.05)",middle:"rgba(0, 0, 0, 0.07)",end:"rgba(0, 0, 0, 0.05)"},transition:{fadeInDuration:250,fadeOutDuration:250,contentFadeDuration:300}},borderRadius:{rectangle:"0",rounded:"8px",circle:"50%"}}),Sl=r=>({animation:{minScale:.92,maxScale:1,minOpacity:.7,maxOpacity:1,springConfig:{mass:.5}}}),Al=r=>({defaultAccentColor:"#00adef",aspectRatio:56.25,playerSettings:{autoplay:!1,muted:!1,loop:!1,title:!1,byline:!1,portrait:!1,controls:!0}}),El=r=>({art:pl(),base:gl(),button:ml(),divider:vl(),header:yl(),input:xl(),list:wl(),loading:bl(),skeleton:Cl(),touchable:Sl(),vimeo:Al(),carousel:_l(),accordion:hl()}),mn={borderWidth:2,space:12,size:12,font:{neutral:"Inter"},fontSize:16,radius:6},x_=ws(mn.space),w_=xs(mn.size),b_=vs(mn.borderWidth),C_=ys(mn.radius),S_=Si(mn.fontSize),A_=Cs(mn.fontSize),E_=Ss(),Sc=bs(mn.font),T_={spaces:x_,sizes:w_,colors:Ci,radii:C_,borderWidths:b_,fonts:Sc,__hd__:{text:{fontSizes:S_,lineHeights:A_,fontWeights:E_,fonts:Sc}}};function Tl(){const r=T_,s=El();return{...r,__hd__:{...r.__hd__,...s}}}const di=Tl(),ve=al,Rl=ul,Il=_s,Ol=(r,s)=>!["theme","themeFontSize","themeFontWeight","themeTypeface","themePosition","color","bg","bgColor","backgroundColor","opacity","margin","m","marginTop","mt","marginRight","mr","marginBottom","mb","marginLeft","ml","marginX","mx","marginY","my","padding","p","paddingTop","pt","paddingRight","pr","paddingBottom","pb","paddingLeft","pl","paddingX","px","paddingY","py","gap","borderRadius","r","radius","borderBottomLeftRadius","bbl","borderBottomRightRadius","bbr","borderTopLeftRadius","btl","borderTopRightRadius","btr","borderWidth","b","borderBottomWidth","bb","borderTopWidth","bt","borderLeftWidth","bl","borderRightWidth","br","borderColor","bc","borderBottomColor","bb","borderTopColor","bt","borderLeftColor","bl","borderRightColor","br","fontSize","fontWeight","lineHeight","letterSpacing","textAlign","fontStyle","textTransform","textDecoration","themeColor","useRichText","width","height","minWidth","maxWidth","minHeight","maxHeight","display","alignItems","alignContent","justifyContent","flexWrap","flexDirection","flex","flexGrow","flexShrink","flexBasis","alignSelf","position","top","right","bottom","left","overflow","cursor","transition","transform","animation","willChange","pointerEvents","userSelect","resize","boxShadow","textShadow","filter","backdropFilter","mixBlendMode","isolation","zIndex","marginInline","marginBlock","paddingInline","paddingBlock","fullWidth","fullHeight","fw","fh"].includes(r),R_=r=>typeof r=="function"?r(di):r?{...di,...r}:di,I_=({theme:r,children:s})=>{const i=R_(r);return b.jsx(J2,{shouldForwardProp:Ol,children:b.jsx(r_,{theme:i,children:s})})},O_={bgColor:{property:"backgroundColor",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},borderColor:{property:"borderColor",scale:"colors"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderRightColor:{property:"borderRightColor",scale:"colors"}},P_={m:{property:"margin",scale:"spaces"},mt:{property:"marginTop",scale:"spaces"},mb:{property:"marginBottom",scale:"spaces"},ml:{property:"marginLeft",scale:"spaces"},mr:{property:"marginRight",scale:"spaces"},mx:{property:"marginInline",scale:"spaces"},my:{property:"marginBlock",scale:"spaces"},p:{property:"padding",scale:"spaces"},pt:{property:"paddingTop",scale:"spaces"},pb:{property:"paddingBottom",scale:"spaces"},pl:{property:"paddingLeft",scale:"spaces"},pr:{property:"paddingRight",scale:"spaces"},px:{property:"paddingInline",scale:"spaces"},py:{property:"paddingBlock",scale:"spaces"},margin:{property:"margin",scale:"spaces"},marginBottom:{property:"marginBottom",scale:"spaces"},marginLeft:{property:"marginLeft",scale:"spaces"},marginRight:{property:"marginRight",scale:"spaces"},marginTop:{property:"marginTop",scale:"spaces"},marginX:{property:"marginInline",scale:"spaces"},marginY:{property:"marginBlock",scale:"spaces"},padding:{property:"padding",scale:"spaces"},paddingBottom:{property:"paddingBottom",scale:"spaces"},paddingLeft:{property:"paddingLeft",scale:"spaces"},paddingRight:{property:"paddingRight",scale:"spaces"},paddingTop:{property:"paddingTop",scale:"spaces"},paddingX:{property:"paddingInline",scale:"spaces"},paddingY:{property:"paddingBlock",scale:"spaces"},gap:{property:"gap",scale:"spaces"}},L_={bbl:{property:"borderBottomLeftRadius",scale:"radii"},bbr:{property:"borderBottomRightRadius",scale:"radii"},btl:{property:"borderTopLeftRadius",scale:"radii"},btr:{property:"borderTopRightRadius",scale:"radii"},r:{property:"borderRadius",scale:"radii"},radius:{property:"borderRadius",scale:"radii"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRadius:{property:"borderRadius",scale:"radii"}},$_={b:{property:"borderWidth",scale:"borderWidths"},bb:{property:"borderBottomWidth",scale:"borderWidths"},bt:{property:"borderTopWidth",scale:"borderWidths"},bl:{property:"borderLeftWidth",scale:"borderWidths"},br:{property:"borderRightWidth",scale:"borderWidths"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"}},Pl={...O_,...P_,...L_,...$_},Ll=["alignContent","alignItems","alignSelf","display","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","position","top","right","bottom","left","overflow","width","minWidth","maxWidth","height","minHeight","maxHeight","opacity","cursor","transition","transform","animation","willChange","pointerEvents","userSelect","resize","boxShadow","textShadow","filter","backdropFilter","mixBlendMode","isolation","zIndex","marginInline","marginBlock","paddingInline","paddingBlock"],As=["absoluteFill","fullWidth","fullHeight","fw","fh"],$l={absoluteFill:{position:"absolute",top:0,bottom:0,left:0,right:0},fullWidth:{width:"100%"},fullHeight:{height:"100%"},fw:{width:"100%"},fh:{height:"100%"}},Fl=(r,s,i)=>{const u=Pl[s],l=i[s];if(!l)return;const{scale:h,property:p}=u;switch(h){case"colors":return{[p]:r.colors[l]};case"spaces":return{[p]:r.spaces[l]};case"radii":return{[p]:r.radii[l]};case"borderWidths":return{[p]:r.borderWidths[l]}}},Bl=(r,s)=>Object.keys(s).reduce((u,l)=>({...u,...Fl(r,l,s)}),{}),F_=r=>As.reduce((s,i)=>r[i]?{...s,...$l[i]}:s,{}),Dl=Object.keys(Pl),Wl=(r,s)=>{const i=mt.pick(s,Dl),u=mt.pick(s,[...Ll]),l=mt.pick(s,[...As]);return{...Bl(r,i),...F_(l),...u}},Ml=ve.div(({theme:r,...s})=>Wl(r,s));function B_({children:r,style:s,"data-testid":i,...u},l){return b.jsx(Ml,{...u,style:s,ref:l,"data-testid":i,children:r})}const Z=A.forwardRef(B_),De=(r,s)=>typeof s=="number"?`${s}px`:mt.isString(s)?dl(s)?`${r.sizes[s]}px`:s:"auto",kl=r=>new RegExp("\\p{Emoji}","u").test(r)&&r.length<=2,Nl=r=>mt.isString(r)&&r.includes("icon-"),zl=r=>{const s=[".jpg",".jpeg",".png",".gif",".webp",".svg"],i=r.toLowerCase();return mt.isString(r)&&(s.some(u=>i.endsWith(u))||r.startsWith("data:image/")||r.startsWith("http"))},Hl=r=>mt.isString(r)&&r.startsWith("<svg"),Ul=({art:r,width:s,height:i,style:u,"data-testid":l,...h})=>{const p=ge(),v=p.__hd__.art.defaultBrandSize||p.__hd__.art.defaultSize,y=De(p,s??v),R=De(p,i??v);return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:R,style:u,"data-testid":l,...h,children:r})},jl=({art:r,width:s,height:i,style:u,"data-testid":l,...h})=>{const p=ge(),v=p.__hd__.art.defaultEmojiSize||p.__hd__.art.defaultSize,y=De(p,s??v),R=De(p,i??v),O=typeof R=="string"&&R.endsWith("px")?parseInt(R,10):p.__hd__.text.fontSizes[v]??24,T=p.__hd__.text.lineHeights[v]?`${p.__hd__.text.lineHeights[v]/O}`:"1";return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:R,style:{...u,fontSize:R,lineHeight:T},"data-testid":l,...h,children:r})},Gl=({art:r,width:s,height:i,color:u="currentColor",style:l,"data-testid":h,...p})=>{const v=ge(),y=v.__hd__.art.defaultIconSize||v.__hd__.art.defaultSize,R=De(v,s??y),O=De(v,i??y);return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:R,height:O,style:l,"data-testid":h,...p,children:b.jsx("i",{className:r,style:{color:u,fontSize:O}})})},D_=ve.img`
|
|
84
|
+
See https://s-c.sh/2BAXzed for more info.`),window[si]+=1);const vs=r=>({none:0,hairline:r*.5,thin:r,thick:r*2,heavy:r*4}),ys=r=>({none:0,xs:r*.5,sm:r,md:r*2,lg:r*3,xl:r*4,full:9999}),o_=r=>["none","hairline","thin","thick","heavy"].includes(r),s_=r=>["none","xs","sm","md","lg","xl","full"].includes(r),Ci={transparent:"#FFFFFF00",white:"#FFFFFF",black:"#000000",primary:"#6949FF",secondary:"#FFC107",success:"#12D18E",danger:"#F75555",warning:"#FACC15",info:"#6949FF",grey100:"#F5F5F5",grey200:"#EEEEEE",grey300:"#E0E0E0",grey400:"#BDBDBD",grey500:"#9E9E9E",grey600:"#757575",grey700:"#616161",grey800:"#424242",grey900:"#212121",orange100:"#FFF3E0",orange200:"#FFE0B2",orange300:"#FFCC80",orange400:"#FFB74D",orange500:"#FF9800",orange600:"#FB8C00",orange700:"#F57C00",orange800:"#EF6C00",orange900:"#E65100",cyan100:"#E0F7FA",cyan200:"#B2EBF2",cyan300:"#80DEEA",cyan400:"#4DD0E1",cyan500:"#26C6DA",cyan600:"#00BCD4",cyan700:"#00ACC1",cyan800:"#0097A7",cyan900:"#006064",purple100:"#F3E5F5",purple200:"#E1BEE7",purple300:"#CE93D8",purple400:"#BA68C8",purple500:"#AB47BC",purple600:"#9C27B0",purple700:"#8E24AA",purple800:"#7B1FA2",purple900:"#6A1B9A",teal100:"#E0F2F1",teal200:"#B2DFDB",teal300:"#80CBC4",teal400:"#4DB6AC",teal500:"#26A69A",teal600:"#009688",teal700:"#00897B",teal800:"#00796B",teal900:"#004D40",lime100:"#F9FBE7",lime200:"#F0F4C3",lime300:"#E6EE9C",lime400:"#DCE775",lime500:"#CDDC39",lime600:"#C0CA33",lime700:"#AFB42B",lime800:"#9E9D24",lime900:"#827717",pink100:"#FCE4EC",pink200:"#F8BBD0",pink300:"#F48FB1",pink400:"#F06292",pink500:"#EC4899",pink600:"#E91E63",pink700:"#D81B60",pink800:"#C2185B",pink900:"#880E4F"},a_=r=>r in Ci,cl={primary:["#543ACC","#6949FF"],secondary:["#E0A800","#FFC107"],success:["#0FB57A","#12D18E"],danger:["#E64545","#F75555"],warning:["#E1B70D","#FACC15"],info:["#543ACC","#6949FF"]},u_=r=>["primary","secondary","success","danger","warning","info"].includes(r),c_=1,l_=8,f_=8,d_="Inter",h_=10,p_=4,ll={borderWidth:c_,space:l_,size:f_,font:{neutral:d_},fontSize:h_,radius:p_},fl=r=>({none:"none",sm:`0 1px 2px 0 ${r.grey400}40`,md:`0 4px 6px -1px ${r.grey500}40, 0 2px 4px -1px ${r.grey400}40`,lg:`0 10px 15px -3px ${r.grey600}40, 0 4px 6px -2px ${r.grey500}40`}),g_=r=>["none","sm","md","lg"].includes(r),xs=r=>({"2xs":r*.5,xs:r,sm:r*2,md:r*4,lg:r*8,xl:r*16,"2xl":r*32,"3xl":r*64,"4xl":r*128}),dl=r=>["2xs","xs","sm","md","lg","xl","2xl","3xl","4xl"].includes(r),ws=r=>({none:0,xxs:r*.25,xs:r*.5,sm:r,"sm-md":r*1.5,md:r*2,"md-lg":r*2.5,lg:r*3,xl:r*4,"2xl":r*5,"3xl":r*6,"4xl":r*8,"-xxs":r*-.25,"-xs":r*-.5,"-sm":r*-1,"-sm-md":r*-1.5,"-md":r*-2,"-md-lg":r*-2.5,"-lg":r*-3,"-xl":r*-4,"-2xl":r*-5,"-3xl":r*-6,"-4xl":r*-8}),m_=r=>["none","xxs","xs","sm","sm-md","md","md-lg","lg","xl","2xl","3xl","4xl","-xxs","-xs","-sm","-sm-md","-md","-md-lg","-lg","-xl","-2xl","-3xl","-4xl"].includes(r),bs=({neutral:r})=>({neutral:`"${r}", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif`}),Si=r=>({"2xs":r*.75,xs:r,small:r*1.25,medium:r*1.5,large:r*2,xl:r*2.5,"2xl":r*3,"3xl":r*3.5}),Cs=r=>{const s=Si(r),i=1.4;return{"2xs":s["2xs"]*i,xs:s.xs*i,small:s.small*i,medium:s.medium*i,large:s.large*i,xl:s.xl*i,"2xl":s["2xl"]*i,"3xl":s["3xl"]*i}},Ss=()=>({"extra-light":100,thin:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,black:900}),__=r=>["xs","small","medium","large","xl","2xl","3xl"].includes(r),v_=r=>["extra-light","thin","light","regular","medium","semibold","bold","extrabold","black"].includes(r),y_=(r=ll,s=Ci,i=cl)=>{const u=bs(r.font),l=Si(r.fontSize),h=Cs(r.fontSize),p=Ss(),v=vs(r.borderWidth),y=ws(r.space),R=xs(r.size),O=ys(r.radius),T=fl(s);return{colors:s,gradientColors:i,fonts:u,fontSizes:l,lineHeights:h,fontWeights:p,borderWidths:v,spaces:y,sizes:R,radii:O,shadows:T}},hl=r=>({paddingVertical:"sm-md",paddingHorizontal:"sm-md",borderRadius:"lg",borderColor:"grey300",borderWidth:"thin",backgroundColor:"white",gap:"sm",header:{gap:"sm-md",iconSize:"sm",iconColor:"grey600",disabledOpacity:.5},animation:{duration:300,easing:"ease"}}),pl=r=>({defaultSize:"md",defaultIconSize:"md",defaultEmojiSize:"lg",defaultBrandSize:"md",defaultImageSize:"md",defaultSvgSize:"md"}),gl=r=>({defaultBackgroundColor:"white",defaultHeaderParams:{backgroundColor:"white"}}),ml=r=>({squircleBorderRadii:{circle:"999px",rounded:"16px",square:"0px"},loadingConfig:{size:"24px"},defaultColor:"primary",defaultTextColor:"white",iconSpacing:"sm",borderWidth:"thin",variants:{solid:{},outlined:{bgColor:"transparent",paddingHorizontal:"md",paddingVertical:"sm"},text:{bgColor:"transparent",paddingHorizontal:"none",paddingVertical:"none"}}}),_l=r=>({pagination:{container:{marginTop:"md",padding:"xs",borderRadius:"full",backgroundColor:"grey100",gap:"xs"},dotSize:"2xs",inactiveColor:"grey300",activeColor:"primary",dotBorderRadius:"full"},navigation:{marginHorizontal:"md",buttonColor:"grey500",buttonPadding:"xs",buttonBackgroundColor:"white",buttonBorderRadius:"full",iconSize:"sm"},autoScroll:{defaultSpeed:20},container:{defaultItemSpacing:"md"}}),vl=r=>({defaultColor:"grey300",defaultThickness:1}),yl=r=>({defaultBackgroundColor:"white",avatarSize:"md"}),xl=r=>({defaultBorderColor:"grey300",activeBorderColor:"primary",errorColor:"danger",disabledBgColor:"grey100",defaultBgColor:"white",borderRadius:"md",borderWidth:"thin",padding:{vertical:"sm",horizontal:"md"},fontSize:"medium",placeholderColor:"grey500",iconSpacing:"sm"}),wl=r=>({defaultGap:"8px",defaultPadding:"0px"}),bl=r=>({sizes:{small:"24px",medium:"36px",large:"48px"},strokeWidths:{small:"2px",medium:"3px",large:"4px"},arc:{minAngle:40,maxAngle:290},animation:{loopInterval:800,showingDuration:250,contentShowingDuration:300}}),Cl=r=>({animation:{duration:1500,gradient:{start:"rgba(0, 0, 0, 0.05)",middle:"rgba(0, 0, 0, 0.07)",end:"rgba(0, 0, 0, 0.05)"},transition:{fadeInDuration:250,fadeOutDuration:250,contentFadeDuration:300}},borderRadius:{rectangle:"0",rounded:"8px",circle:"50%"}}),Sl=r=>({animation:{minScale:.92,maxScale:1,minOpacity:.7,maxOpacity:1,springConfig:{mass:.5}}}),Al=r=>({defaultAccentColor:"#00adef",aspectRatio:56.25,playerSettings:{autoplay:!1,muted:!1,loop:!1,title:!1,byline:!1,portrait:!1,controls:!0}}),El=r=>({art:pl(),base:gl(),button:ml(),divider:vl(),header:yl(),input:xl(),list:wl(),loading:bl(),skeleton:Cl(),touchable:Sl(),vimeo:Al(),carousel:_l(),accordion:hl()}),mn={borderWidth:1,space:8,size:8,font:{neutral:"Inter"},fontSize:10,radius:4},x_=ws(mn.space),w_=xs(mn.size),b_=vs(mn.borderWidth),C_=ys(mn.radius),S_=Si(mn.fontSize),A_=Cs(mn.fontSize),E_=Ss(),Sc=bs(mn.font),T_={spaces:x_,sizes:w_,colors:Ci,radii:C_,borderWidths:b_,fonts:Sc,__hd__:{text:{fontSizes:S_,lineHeights:A_,fontWeights:E_,fonts:Sc}}};function Tl(){const r=T_,s=El();return{...r,__hd__:{...r.__hd__,...s}}}const di=Tl(),ve=al,Rl=ul,Il=_s,Ol=(r,s)=>!["theme","themeFontSize","themeFontWeight","themeTypeface","themePosition","color","bg","bgColor","backgroundColor","opacity","margin","m","marginTop","mt","marginRight","mr","marginBottom","mb","marginLeft","ml","marginX","mx","marginY","my","padding","p","paddingTop","pt","paddingRight","pr","paddingBottom","pb","paddingLeft","pl","paddingX","px","paddingY","py","gap","borderRadius","r","radius","borderBottomLeftRadius","bbl","borderBottomRightRadius","bbr","borderTopLeftRadius","btl","borderTopRightRadius","btr","borderWidth","b","borderBottomWidth","bb","borderTopWidth","bt","borderLeftWidth","bl","borderRightWidth","br","borderColor","bc","borderBottomColor","bb","borderTopColor","bt","borderLeftColor","bl","borderRightColor","br","fontSize","fontWeight","lineHeight","letterSpacing","textAlign","fontStyle","textTransform","textDecoration","themeColor","useRichText","width","height","minWidth","maxWidth","minHeight","maxHeight","display","alignItems","alignContent","justifyContent","flexWrap","flexDirection","flex","flexGrow","flexShrink","flexBasis","alignSelf","position","top","right","bottom","left","overflow","cursor","transition","transform","animation","willChange","pointerEvents","userSelect","resize","boxShadow","textShadow","filter","backdropFilter","mixBlendMode","isolation","zIndex","marginInline","marginBlock","paddingInline","paddingBlock","fullWidth","fullHeight","fw","fh"].includes(r),R_=r=>typeof r=="function"?r(di):r?{...di,...r}:di,I_=({theme:r,children:s})=>{const i=R_(r);return b.jsx(J2,{shouldForwardProp:Ol,children:b.jsx(r_,{theme:i,children:s})})},O_={bgColor:{property:"backgroundColor",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},borderColor:{property:"borderColor",scale:"colors"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderRightColor:{property:"borderRightColor",scale:"colors"}},P_={m:{property:"margin",scale:"spaces"},mt:{property:"marginTop",scale:"spaces"},mb:{property:"marginBottom",scale:"spaces"},ml:{property:"marginLeft",scale:"spaces"},mr:{property:"marginRight",scale:"spaces"},mx:{property:"marginInline",scale:"spaces"},my:{property:"marginBlock",scale:"spaces"},p:{property:"padding",scale:"spaces"},pt:{property:"paddingTop",scale:"spaces"},pb:{property:"paddingBottom",scale:"spaces"},pl:{property:"paddingLeft",scale:"spaces"},pr:{property:"paddingRight",scale:"spaces"},px:{property:"paddingInline",scale:"spaces"},py:{property:"paddingBlock",scale:"spaces"},margin:{property:"margin",scale:"spaces"},marginBottom:{property:"marginBottom",scale:"spaces"},marginLeft:{property:"marginLeft",scale:"spaces"},marginRight:{property:"marginRight",scale:"spaces"},marginTop:{property:"marginTop",scale:"spaces"},marginX:{property:"marginInline",scale:"spaces"},marginY:{property:"marginBlock",scale:"spaces"},padding:{property:"padding",scale:"spaces"},paddingBottom:{property:"paddingBottom",scale:"spaces"},paddingLeft:{property:"paddingLeft",scale:"spaces"},paddingRight:{property:"paddingRight",scale:"spaces"},paddingTop:{property:"paddingTop",scale:"spaces"},paddingX:{property:"paddingInline",scale:"spaces"},paddingY:{property:"paddingBlock",scale:"spaces"},gap:{property:"gap",scale:"spaces"}},L_={bbl:{property:"borderBottomLeftRadius",scale:"radii"},bbr:{property:"borderBottomRightRadius",scale:"radii"},btl:{property:"borderTopLeftRadius",scale:"radii"},btr:{property:"borderTopRightRadius",scale:"radii"},r:{property:"borderRadius",scale:"radii"},radius:{property:"borderRadius",scale:"radii"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRadius:{property:"borderRadius",scale:"radii"}},$_={b:{property:"borderWidth",scale:"borderWidths"},bb:{property:"borderBottomWidth",scale:"borderWidths"},bt:{property:"borderTopWidth",scale:"borderWidths"},bl:{property:"borderLeftWidth",scale:"borderWidths"},br:{property:"borderRightWidth",scale:"borderWidths"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"}},Pl={...O_,...P_,...L_,...$_},Ll=["alignContent","alignItems","alignSelf","display","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","position","top","right","bottom","left","overflow","width","minWidth","maxWidth","height","minHeight","maxHeight","opacity","cursor","transition","transform","animation","willChange","pointerEvents","userSelect","resize","boxShadow","textShadow","filter","backdropFilter","mixBlendMode","isolation","zIndex","marginInline","marginBlock","paddingInline","paddingBlock"],As=["absoluteFill","fullWidth","fullHeight","fw","fh"],$l={absoluteFill:{position:"absolute",top:0,bottom:0,left:0,right:0},fullWidth:{width:"100%"},fullHeight:{height:"100%"},fw:{width:"100%"},fh:{height:"100%"}},Fl=(r,s,i)=>{const u=Pl[s],l=i[s];if(!l)return;const{scale:h,property:p}=u;switch(h){case"colors":return{[p]:r.colors[l]};case"spaces":return{[p]:r.spaces[l]};case"radii":return{[p]:r.radii[l]};case"borderWidths":return{[p]:r.borderWidths[l]}}},Bl=(r,s)=>Object.keys(s).reduce((u,l)=>({...u,...Fl(r,l,s)}),{}),F_=r=>As.reduce((s,i)=>r[i]?{...s,...$l[i]}:s,{}),Dl=Object.keys(Pl),Wl=(r,s)=>{const i=mt.pick(s,Dl),u=mt.pick(s,[...Ll]),l=mt.pick(s,[...As]);return{...Bl(r,i),...F_(l),...u}},Ml=ve.div(({theme:r,...s})=>Wl(r,s));function B_({children:r,style:s,"data-testid":i,...u},l){return b.jsx(Ml,{...u,style:s,ref:l,"data-testid":i,children:r})}const Z=A.forwardRef(B_),De=(r,s)=>typeof s=="number"?`${s}px`:mt.isString(s)?dl(s)?`${r.sizes[s]}px`:s:"auto",kl=r=>new RegExp("\\p{Emoji}","u").test(r)&&r.length<=2,Nl=r=>mt.isString(r)&&r.includes("icon-"),zl=r=>{const s=[".jpg",".jpeg",".png",".gif",".webp",".svg"],i=r.toLowerCase();return mt.isString(r)&&(s.some(u=>i.endsWith(u))||r.startsWith("data:image/")||r.startsWith("http"))},Hl=r=>mt.isString(r)&&r.startsWith("<svg"),Ul=({art:r,width:s,height:i,style:u,"data-testid":l,...h})=>{const p=ge(),v=p.__hd__.art.defaultBrandSize||p.__hd__.art.defaultSize,y=De(p,s??v),R=De(p,i??v);return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:R,style:u,"data-testid":l,...h,children:r})},jl=({art:r,width:s,height:i,style:u,"data-testid":l,...h})=>{const p=ge(),v=p.__hd__.art.defaultEmojiSize||p.__hd__.art.defaultSize,y=De(p,s??v),R=De(p,i??v),O=typeof R=="string"&&R.endsWith("px")?parseInt(R,10):p.__hd__.text.fontSizes[v]??24,T=p.__hd__.text.lineHeights[v]?`${p.__hd__.text.lineHeights[v]/O}`:"1";return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:R,style:{...u,fontSize:R,lineHeight:T},"data-testid":l,...h,children:r})},Gl=({art:r,width:s,height:i,color:u="currentColor",style:l,"data-testid":h,...p})=>{const v=ge(),y=v.__hd__.art.defaultIconSize||v.__hd__.art.defaultSize,R=De(v,s??y),O=De(v,i??y);return b.jsx(Z,{display:"flex",alignItems:"center",justifyContent:"center",width:R,height:O,style:l,"data-testid":h,...p,children:b.jsx("i",{className:r,style:{color:u,fontSize:O}})})},D_=ve.img`
|
|
85
85
|
width: 100%;
|
|
86
86
|
height: 100%;
|
|
87
87
|
object-fit: cover;
|
package/dist/index.js
CHANGED
|
@@ -5356,14 +5356,14 @@ const cl = (r) => ({
|
|
|
5356
5356
|
carousel: k2(),
|
|
5357
5357
|
accordion: D2()
|
|
5358
5358
|
}), bn = {
|
|
5359
|
-
borderWidth:
|
|
5360
|
-
space:
|
|
5361
|
-
size:
|
|
5359
|
+
borderWidth: 1,
|
|
5360
|
+
space: 8,
|
|
5361
|
+
size: 8,
|
|
5362
5362
|
font: {
|
|
5363
5363
|
neutral: "Inter"
|
|
5364
5364
|
},
|
|
5365
|
-
fontSize:
|
|
5366
|
-
radius:
|
|
5365
|
+
fontSize: 10,
|
|
5366
|
+
radius: 4
|
|
5367
5367
|
}, X2 = dl(bn.space), J2 = fl(bn.size), Q2 = cl(bn.borderWidth), j2 = ll(bn.radius), e_ = As(bn.fontSize), t_ = pl(bn.fontSize), n_ = gl(), bc = hl(bn.font), r_ = {
|
|
5368
5368
|
spaces: X2,
|
|
5369
5369
|
sizes: J2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aic-kits/react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"vite-plugin-dts": "^4.3.0",
|
|
47
47
|
"vitest": "^2.1.8"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "c1408946def5ff1ca86f58bb567f429eb0a77f9d"
|
|
50
50
|
}
|