UNPKG

amotify

Version:

UI Component for React,NextJS,esbuild

2 lines (1 loc) 1.69 kB
import{b as e,c as n,d as p}from"../../chunk-C5N2D3ZX.js";import{jsx as i}from"react/jsx-runtime";import{Box as s,Span as u}from"../../atoms";const c=t=>{if(t||(t="border"),t=="plain")return{};let r={flexSizing:"none",padding:"3/4",borderRadius:"2.tone.secondary",backgroundColor:"cloud"};return t=="border"?r=n(e({},r),{border:!0}):t=="cloud"?r=n(e({},r),{border:"1.thin"}):t=="bottomBorder"&&(r=n(e({},r),{borderRadius:0,borderBottom:!0})),r},d={position:"absolute",flexCenter:!0,fontColor:"theme",fontSize:"1.mini",backgroundColor:"inherit",top:"50%",freeCSS:{pointerEvents:"none",transform:"translateY(-50%)"}},I=t=>i(u,e({children:"\u5FC5\u9808",fontColor:"white",fontSize:"0.xs",padding:["1/4","1/3"],backgroundColor:"nega",borderRadius:"3.tone.tertiary"},t)),b=t=>i(u,e({children:"*",fontColor:"nega",padding:["1/4","1/3"],borderRadius:"3.tone.tertiary"},t)),h=t=>i(u,e({children:"\u7701\u7565\u53EF",fontColor:"white",fontSize:"0.xs",padding:["1/4","1/3"],borderRadius:"3.tone.tertiary",backgroundColor:"layer.6"},t)),x=t=>{let o=t,{tone:r}=o,a=p(o,["tone"]);return i(s,e(n(e({},c(r)),{borderTopRightRadius:"2/3",borderBottomRightRadius:"2/3"}),a))},m=t=>{let o=t,{tone:r}=o,a=p(o,["tone"]);return i(s,e(n(e({},c(r)),{borderTopLeftRadius:"2/3",borderBottomLeftRadius:"2/3"}),a))},y=t=>{let o=t,{tone:r="border"}=o,a=p(o,["tone"]);return i(s,n(e(n(e({},d),{right:"3/4"}),a),{freeCSS:e(e({},d.freeCSS),a.freeCSS)}))},F=t=>{let o=t,{tone:r="border"}=o,a=p(o,["tone"]);return i(s,n(e(n(e({},d),{left:"3/4"}),a),{freeCSS:e(e({},d.freeCSS),a.freeCSS)}))};export{F as LeftIcon,x as LeftIndicator,h as OmitSign,b as RequiredShortSign,I as RequiredSign,y as RightIcon,m as RightIndicator};