UNPKG

amotify

Version:

UI Component for React,NextJS,esbuild

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