@xinghunm/compass-ui 0.7.1 → 0.8.0
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.d.mts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +229 -223
- package/dist/index.mjs +216 -210
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import kl from"react";import oo from"@emotion/styled";import yl from"react";import{useRef as xl}from"react";import vl from"@emotion/styled";var le={colors:{primary:"#1890ff",success:"#52c41a",warning:"#faad14",error:"#ff4d4f",info:"#1890ff",text:"rgba(0, 0, 0, 0.88)",textSecondary:"rgba(0, 0, 0, 0.65)",textTertiary:"rgba(0, 0, 0, 0.45)",textDisabled:"rgba(0, 0, 0, 0.25)",background:"#ffffff",backgroundSecondary:"#fafafa",backgroundTertiary:"#f5f5f5",backgroundHover:"#fafafa",border:"#d9d9d9",borderSecondary:"#f0f0f0",borderHover:"#4096ff",white:"#ffffff"},spacing:{xs:4,sm:8,md:16,lg:24,xl:32,xxl:48},borderRadius:{xs:2,sm:4,md:6,lg:8,xl:12},fontSize:{xs:12,sm:14,md:16,lg:18,xl:20,xxl:24},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75},shadows:{sm:"0 1px 2px rgba(0, 0, 0, 0.03)",md:"0 1px 6px rgba(0, 0, 0, 0.03)",lg:"0 4px 12px rgba(0, 0, 0, 0.15)",xl:"0 8px 24px rgba(0, 0, 0, 0.15)"},transitions:{fast:"all 0.1s ease-in-out",normal:"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)",slow:"all 0.3s ease-in-out"},breakpoints:{xs:"480px",sm:"576px",md:"768px",lg:"992px",xl:"1200px"},components:{pagination:{itemSize:"32px",itemBg:"#ffffff",itemActiveBg:"#ffffff",itemBorderRadius:"4px",itemColor:"rgba(0, 0, 0, 0.88)",itemActiveColor:"#1890ff",itemHoverBg:"#ffffff",itemHoverColor:"#1890ff",fontSize:"14px"},button:{padding:{sm:"0 8px",md:"0 16px"},fontSize:{sm:"12px",md:"14px",lg:"16px"},borderRadius:{sm:"4px",md:"6px",lg:"8px"},rippleOpacity:.3},message:{contentPadding:"8px 16px",contentBg:"#ffffff",contentColor:"rgba(0, 0, 0, 0.88)",borderRadius:"8px",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",zIndex:1010},modal:{maskColor:"rgba(0, 0, 0, 0.45)",contentBg:"#ffffff",borderRadius:"8px",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",headerPadding:"16px 24px",bodyPadding:"24px",footerPadding:"10px 16px",zIndex:1e3},progress:{trackColor:"#f5f5f5",successColor:"#52c41a",errorColor:"#ff4d4f",warningColor:"#faad14",infoColor:"#1890ff",fontSize:"14px"},steps:{descriptionColor:"rgba(0, 0, 0, 0.45)",titleColor:"rgba(0, 0, 0, 0.65)",subTitleColor:"rgba(0, 0, 0, 0.45)",waitIconColor:"rgba(0, 0, 0, 0.25)",processIconColor:"#1890ff",finishIconColor:"#1890ff",errorIconColor:"#ff4d4f",waitTitleColor:"rgba(0, 0, 0, 0.45)",processTitleColor:"rgba(0, 0, 0, 0.85)",finishTitleColor:"rgba(0, 0, 0, 0.65)",errorTitleColor:"#ff4d4f",waitDescriptionColor:"rgba(0, 0, 0, 0.45)",processDescriptionColor:"rgba(0, 0, 0, 0.65)",finishDescriptionColor:"rgba(0, 0, 0, 0.45)",errorDescriptionColor:"#ff4d4f",iconSize:"32px",dotSize:"8px",titleFontSize:"16px",descriptionFontSize:"14px"},input:{padding:{sm:"4px 8px",md:"6px 12px",lg:"8px 16px"},fontSize:{sm:"12px",md:"14px",lg:"16px"},borderRadius:"4px",activeBorderColor:"#40a9ff",hoverBorderColor:"#4096ff"},dropdown:{zIndex:1050,backgroundColor:"#ffffff",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",borderRadius:"4px",padding:"4px 0"},menu:{itemHoverBg:"#f5f5f5",itemSelectedBg:"#e6f7ff",itemColor:"rgba(0, 0, 0, 0.88)",itemHeight:"32px",itemPadding:"0 12px",fontSize:"14px",borderRadius:"4px"},datePicker:{cellWidth:"32px",cellHeight:"32px",cellPadding:"0",cellMargin:"2px",cellFontSize:"14px",cellBorderRadius:"4px",headerPadding:"12px 16px",headerHeight:"40px",headerFontSize:"14px",weekDayFontSize:"12px",cellActiveBg:"#1890ff",cellHoverBg:"#40a9ff",cellColor:"rgba(0, 0, 0, 0.88)",cellActiveColor:"#ffffff",cellDisabledColor:"rgba(0, 0, 0, 0.25)",borderColor:"rgba(0, 0, 0, 0.06)",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",zIndex:1e3},tree:{nodeSelectedBg:"#e6f7ff",nodeHoverBg:"#f5f5f5",nodeColor:"rgba(0, 0, 0, 0.88)",nodeSelectedColor:"rgba(0, 0, 0, 0.88)",switcherColor:"rgba(0, 0, 0, 0.45)",switcherHoverColor:"#1890ff",fontSize:"14px",borderRadius:"4px",indentSize:"24px"},select:{borderRadius:"4px",backgroundColor:"#ffffff",borderColor:"#d9d9d9",hoverBorderColor:"#4096ff",activeBorderColor:"#1890ff",placeholderColor:"rgba(0, 0, 0, 0.25)",optionSelectedBg:"#e6f7ff",optionHoverBg:"#f5f5f5",optionColor:"rgba(0, 0, 0, 0.88)",optionSelectedColor:"rgba(0, 0, 0, 0.88)",tagBg:"#f5f5f5",tagColor:"rgba(0, 0, 0, 0.88)",tagBorderColor:"#f0f0f0",padding:{sm:"0 8px",md:"0 11px",lg:"0 11px"},fontSize:{sm:"12px",md:"14px",lg:"16px"}},form:{itemMarginBottom:"16px",labelColor:"rgba(0, 0, 0, 0.88)",labelFontSize:"14px",labelMarginBottom:"8px",errorColor:"#ff4d4f",errorFontSize:"12px",errorMarginTop:"2px",errorMarginBottom:"2px"},tabs:{tabBarBorderColor:"#f0f0f0",tabBarBorderWidth:"1px",tabBarBackgroundColor:"#ffffff",tabItemColor:"rgba(0, 0, 0, 0.88)",tabItemActiveColor:"#1890ff",tabItemHoverColor:"#40a9ff",tabItemDisabledColor:"rgba(0, 0, 0, 0.25)",tabItemFontSize:"14px",tabItemPadding:"12px 16px",tabItemHorizontalGutter:"32px",tabItemVerticalGutter:"16px",inkBarColor:"#1890ff",inkBarHeight:"2px"},table:{headerBg:"#fafafa",headerColor:"rgba(0, 0, 0, 0.85)",rowHoverBg:"#fafafa",borderColor:"#f0f0f0",bodyBg:"#ffffff",color:"rgba(0, 0, 0, 0.88)",cellPadding:"16px 16px"}}};var pn={...le,colors:{...le.colors,primary:"#177ddc",primaryHover:"#1765ad",primaryActive:"#165996",text:"rgba(255, 255, 255, 0.85)",textSecondary:"rgba(255, 255, 255, 0.45)",textTertiary:"rgba(255, 255, 255, 0.25)",textDisabled:"rgba(255, 255, 255, 0.15)",background:"#141414",backgroundSecondary:"#1f1f1f",backgroundTertiary:"#2f2f2f",backgroundHover:"#262626",border:"#434343",borderSecondary:"#303030",borderHover:"#177ddc",success:"#49aa19",warning:"#d89614",error:"#a61d24",info:"#177ddc"},shadows:{...le.shadows,sm:"0 1px 2px rgba(0, 0, 0, 0.3)",md:"0 1px 6px rgba(0, 0, 0, 0.3)",lg:"0 4px 12px rgba(0, 0, 0, 0.4)",xl:"0 8px 24px rgba(0, 0, 0, 0.4)"},components:{...le.components,modal:{...le.components.modal,contentBg:"#1f1f1f",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)"},message:{...le.components.message,boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)"},progress:{...le.components.progress,trackColor:"#303030"},steps:{...le.components.steps,descriptionColor:"rgba(255, 255, 255, 0.45)",titleColor:"rgba(255, 255, 255, 0.65)",subTitleColor:"rgba(255, 255, 255, 0.45)",waitIconColor:"rgba(255, 255, 255, 0.25)",processIconColor:"#177ddc",finishIconColor:"#177ddc",errorIconColor:"#a61d24",waitTitleColor:"rgba(255, 255, 255, 0.45)",processTitleColor:"rgba(255, 255, 255, 0.85)",finishTitleColor:"rgba(255, 255, 255, 0.65)",errorTitleColor:"#a61d24",waitDescriptionColor:"rgba(255, 255, 255, 0.45)",processDescriptionColor:"rgba(255, 255, 255, 0.65)",finishDescriptionColor:"rgba(255, 255, 255, 0.45)",errorDescriptionColor:"#a61d24"},input:{...le.components.input,activeBorderColor:"#177ddc",hoverBorderColor:"#177ddc"},form:{...le.components.form,labelColor:"rgba(255, 255, 255, 0.85)",errorColor:"#a61d24"},table:{headerBg:"#1f1f1f",headerColor:"rgba(255, 255, 255, 0.85)",rowHoverBg:"#262626",borderColor:"#303030",bodyBg:"#141414",color:"rgba(255, 255, 255, 0.85)",cellPadding:"16px 16px"}}};import{createContext as Qi,useContext as fn,useState as Ji,useMemo as qo,useEffect as Xi}from"react";import{ThemeProvider as Zi,Global as el,css as tl}from"@emotion/react";var dn=(e,o)=>e?.components?.[o]||le.components[o],ie=(e,o)=>e?.[o]||le[o];function Uo(e,o){if(!o)return e;if(!e)return o;let r={...e},s=o;return Object.keys(s).forEach(n=>{let a=r[n],i=s[n];Array.isArray(a)&&Array.isArray(i)?r[n]=[...a,...i]:a&&typeof a=="object"&&i&&typeof i=="object"?r[n]=Uo(a,i):i!==void 0&&(r[n]=i)}),r}var mn="compass";function un(e){let o={};function r(s,n){if(!s||typeof s!="object")return;let a=s;Object.keys(a).forEach(i=>{let l=a[i],d=[...n,i];if(typeof l=="string"||typeof l=="number"){let p=`--${mn}-${d.join("-")}`,m=l;typeof l=="number"&&["borderRadius","spacing","fontSize"].includes(d[0])&&(m=`${l}px`),o[p]=m}else l&&typeof l=="object"&&r(l,d)})}return r(e,[]),o}function qi(e){return`--${mn}-${e.replace(/\./g,"-")}`}function t(e,o){let r=qi(e);return o?`var(${r}, ${o})`:`var(${r})`}import{jsx as Qo,jsxs as rl}from"react/jsx-runtime";var Jo=Qi(void 0),ol=({children:e,theme:o,lightTheme:r,darkTheme:s,defaultMode:n="light",global:a})=>{let[i,l]=Ji(n),p=!!fn(Jo),m=a??!p;Xi(()=>{l(n)},[n]);let f=qo(()=>{let w=i==="dark"?pn:le;return((...c)=>{let P={...w};return c.forEach(S=>{S&&(P=Uo(P,S))}),P})(o,i==="dark"?s:r)},[i,o,r,s]),x=()=>{l(w=>w==="light"?"dark":"light")},b=qo(()=>({mode:i,setMode:l,toggleTheme:x,theme:f}),[i,f]),y=qo(()=>un(f),[f]);return Qo(Jo.Provider,{value:b,children:rl(Zi,{theme:f,children:[m&&Qo(el,{styles:tl({":root":y})}),Qo("div",{className:"compass-theme-scope",style:{display:"contents",...m?{}:y},children:e})]})})},Xo=()=>{let e=fn(Jo);return e||{mode:"light",setMode:()=>{},toggleTheme:()=>{},theme:le}},Et=ol;import{useRef as vn,useState as ml,forwardRef as ul,useImperativeHandle as fl}from"react";import gl from"@emotion/styled";import{TransitionGroup as hl}from"react-transition-group";import{useState as gn,useRef as nl}from"react";import hn from"@emotion/styled";import{keyframes as bn,css as yn}from"@emotion/react";import{Transition as al}from"react-transition-group";import{jsx as Zo}from"react/jsx-runtime";var sl=e=>bn`
|
|
1
|
+
import Pl from"react";import no from"@emotion/styled";import vl from"react";import{useRef as Sl}from"react";import Cl from"@emotion/styled";var le={colors:{primary:"#1890ff",success:"#52c41a",warning:"#faad14",error:"#ff4d4f",info:"#1890ff",text:"rgba(0, 0, 0, 0.88)",textSecondary:"rgba(0, 0, 0, 0.65)",textTertiary:"rgba(0, 0, 0, 0.45)",textDisabled:"rgba(0, 0, 0, 0.25)",background:"#ffffff",backgroundSecondary:"#fafafa",backgroundTertiary:"#f5f5f5",backgroundHover:"#fafafa",border:"#d9d9d9",borderSecondary:"#f0f0f0",borderHover:"#4096ff",white:"#ffffff"},spacing:{xs:4,sm:8,md:16,lg:24,xl:32,xxl:48},borderRadius:{xs:2,sm:4,md:6,lg:8,xl:12},fontSize:{xs:12,sm:14,md:16,lg:18,xl:20,xxl:24},fontWeight:{light:300,normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75},shadows:{sm:"0 1px 2px rgba(0, 0, 0, 0.03)",md:"0 1px 6px rgba(0, 0, 0, 0.03)",lg:"0 4px 12px rgba(0, 0, 0, 0.15)",xl:"0 8px 24px rgba(0, 0, 0, 0.15)"},transitions:{fast:"all 0.1s ease-in-out",normal:"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)",slow:"all 0.3s ease-in-out"},breakpoints:{xs:"480px",sm:"576px",md:"768px",lg:"992px",xl:"1200px"},components:{pagination:{itemSize:"32px",itemBg:"#ffffff",itemActiveBg:"#ffffff",itemBorderRadius:"4px",itemColor:"rgba(0, 0, 0, 0.88)",itemActiveColor:"#1890ff",itemHoverBg:"#ffffff",itemHoverColor:"#1890ff",fontSize:"14px"},button:{padding:{sm:"0 8px",md:"0 16px"},fontSize:{sm:"12px",md:"14px",lg:"16px"},borderRadius:{sm:"4px",md:"6px",lg:"8px"},rippleOpacity:.3},message:{contentPadding:"8px 16px",contentBg:"#ffffff",contentColor:"rgba(0, 0, 0, 0.88)",borderRadius:"8px",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",zIndex:1010},modal:{maskColor:"rgba(0, 0, 0, 0.45)",contentBg:"#ffffff",borderRadius:"8px",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",headerPadding:"16px 24px",bodyPadding:"24px",footerPadding:"10px 16px",zIndex:1e3,padding:"24px"},progress:{trackColor:"#f5f5f5",successColor:"#52c41a",errorColor:"#ff4d4f",warningColor:"#faad14",infoColor:"#1890ff",fontSize:"14px"},steps:{descriptionColor:"rgba(0, 0, 0, 0.45)",titleColor:"rgba(0, 0, 0, 0.65)",subTitleColor:"rgba(0, 0, 0, 0.45)",waitIconColor:"rgba(0, 0, 0, 0.25)",processIconColor:"#1890ff",finishIconColor:"#1890ff",errorIconColor:"#ff4d4f",waitTitleColor:"rgba(0, 0, 0, 0.45)",processTitleColor:"rgba(0, 0, 0, 0.85)",finishTitleColor:"rgba(0, 0, 0, 0.65)",errorTitleColor:"#ff4d4f",waitDescriptionColor:"rgba(0, 0, 0, 0.45)",processDescriptionColor:"rgba(0, 0, 0, 0.65)",finishDescriptionColor:"rgba(0, 0, 0, 0.45)",errorDescriptionColor:"#ff4d4f",iconSize:"32px",dotSize:"8px",titleFontSize:"16px",descriptionFontSize:"14px"},input:{padding:{sm:"4px 8px",md:"6px 12px",lg:"8px 16px"},fontSize:{sm:"12px",md:"14px",lg:"16px"},borderRadius:"4px",activeBorderColor:"#40a9ff",hoverBorderColor:"#4096ff"},dropdown:{zIndex:1050,backgroundColor:"#ffffff",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",borderRadius:"4px",padding:"4px 0"},menu:{itemHoverBg:"#f5f5f5",itemSelectedBg:"#e6f7ff",itemColor:"rgba(0, 0, 0, 0.88)",itemHeight:"32px",itemPadding:"0 12px",fontSize:"14px",borderRadius:"4px"},datePicker:{cellWidth:"32px",cellHeight:"32px",cellPadding:"0",cellMargin:"2px",cellFontSize:"14px",cellBorderRadius:"4px",headerPadding:"12px 16px",headerHeight:"40px",headerFontSize:"14px",weekDayFontSize:"12px",cellActiveBg:"#1890ff",cellHoverBg:"#40a9ff",cellColor:"rgba(0, 0, 0, 0.88)",cellActiveColor:"#ffffff",cellDisabledColor:"rgba(0, 0, 0, 0.25)",borderColor:"rgba(0, 0, 0, 0.06)",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",zIndex:1e3},tree:{nodeSelectedBg:"#e6f7ff",nodeHoverBg:"#f5f5f5",nodeColor:"rgba(0, 0, 0, 0.88)",nodeSelectedColor:"rgba(0, 0, 0, 0.88)",switcherColor:"rgba(0, 0, 0, 0.45)",switcherHoverColor:"#1890ff",fontSize:"14px",borderRadius:"4px",indentSize:"24px"},select:{borderRadius:"4px",backgroundColor:"#ffffff",borderColor:"#d9d9d9",hoverBorderColor:"#4096ff",activeBorderColor:"#1890ff",placeholderColor:"rgba(0, 0, 0, 0.25)",dropdownBg:"#ffffff",dropdownBoxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",dropdownPadding:"4px 0",dropdownZIndex:1050,dropdownMaxHeight:"256px",optionSelectedBg:"#e6f7ff",optionHoverBg:"#f5f5f5",optionColor:"rgba(0, 0, 0, 0.88)",optionSelectedColor:"rgba(0, 0, 0, 0.88)",optionPadding:"0 12px",optionMinHeight:"32px",optionFontSize:"14px",tagBg:"#f5f5f5",tagColor:"rgba(0, 0, 0, 0.88)",tagBorderColor:"#f0f0f0",tagHeight:"24px",tagPadding:"0 8px",tagFontSize:"12px",tagBorderRadius:"4px",padding:{sm:"1px 8px",md:"3px 12px",lg:"6px 16px"},fontSize:{sm:"12px",md:"14px",lg:"16px"},minHeight:{sm:"20px",md:"24px",lg:"26px"}},form:{itemMarginBottom:"16px",labelColor:"rgba(0, 0, 0, 0.88)",labelFontSize:"14px",labelMarginBottom:"8px",errorColor:"#ff4d4f",errorFontSize:"12px",errorMarginTop:"2px",errorMarginBottom:"2px"},tabs:{tabBarBorderColor:"#f0f0f0",tabBarBorderWidth:"1px",tabBarBackgroundColor:"#ffffff",tabItemColor:"rgba(0, 0, 0, 0.88)",tabItemActiveColor:"#1890ff",tabItemHoverColor:"#40a9ff",tabItemDisabledColor:"rgba(0, 0, 0, 0.25)",tabItemFontSize:"14px",tabItemPadding:"12px 16px",tabItemHorizontalGutter:"32px",tabItemVerticalGutter:"16px",inkBarColor:"#1890ff",inkBarHeight:"2px"},table:{headerBg:"#fafafa",headerColor:"rgba(0, 0, 0, 0.85)",rowHoverBg:"#fafafa",borderColor:"#f0f0f0",bodyBg:"#ffffff",color:"rgba(0, 0, 0, 0.88)",cellPadding:"16px 16px"}}};var dn={...le,colors:{...le.colors,primary:"#177ddc",primaryHover:"#1765ad",primaryActive:"#165996",text:"rgba(255, 255, 255, 0.85)",textSecondary:"rgba(255, 255, 255, 0.45)",textTertiary:"rgba(255, 255, 255, 0.25)",textDisabled:"rgba(255, 255, 255, 0.15)",background:"#141414",backgroundSecondary:"#1f1f1f",backgroundTertiary:"#2f2f2f",backgroundHover:"#262626",border:"#434343",borderSecondary:"#303030",borderHover:"#177ddc",success:"#49aa19",warning:"#d89614",error:"#a61d24",info:"#177ddc"},shadows:{...le.shadows,sm:"0 1px 2px rgba(0, 0, 0, 0.3)",md:"0 1px 6px rgba(0, 0, 0, 0.3)",lg:"0 4px 12px rgba(0, 0, 0, 0.4)",xl:"0 8px 24px rgba(0, 0, 0, 0.4)"},components:{...le.components,modal:{...le.components.modal,contentBg:"#1f1f1f",boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)"},message:{...le.components.message,boxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)"},progress:{...le.components.progress,trackColor:"#303030"},steps:{...le.components.steps,descriptionColor:"rgba(255, 255, 255, 0.45)",titleColor:"rgba(255, 255, 255, 0.65)",subTitleColor:"rgba(255, 255, 255, 0.45)",waitIconColor:"rgba(255, 255, 255, 0.25)",processIconColor:"#177ddc",finishIconColor:"#177ddc",errorIconColor:"#a61d24",waitTitleColor:"rgba(255, 255, 255, 0.45)",processTitleColor:"rgba(255, 255, 255, 0.85)",finishTitleColor:"rgba(255, 255, 255, 0.65)",errorTitleColor:"#a61d24",waitDescriptionColor:"rgba(255, 255, 255, 0.45)",processDescriptionColor:"rgba(255, 255, 255, 0.65)",finishDescriptionColor:"rgba(255, 255, 255, 0.45)",errorDescriptionColor:"#a61d24"},input:{...le.components.input,activeBorderColor:"#177ddc",hoverBorderColor:"#177ddc"},form:{...le.components.form,labelColor:"rgba(255, 255, 255, 0.85)",errorColor:"#a61d24"},table:{...le.components.table,headerBg:"#1f1f1f",headerColor:"rgba(255, 255, 255, 0.85)",rowHoverBg:"#262626",borderColor:"#303030",bodyBg:"#141414",color:"rgba(255, 255, 255, 0.85)",cellPadding:"16px 16px"},select:{...le.components.select,dropdownBoxShadow:"0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)",optionSelectedBg:"#111d2c",optionHoverBg:"#262626",tagBg:"#262626",tagBorderColor:"#303030"}}};import{createContext as Xi,useContext as gn,useState as Zi,useMemo as Jo,useEffect as el}from"react";import{ThemeProvider as tl,Global as ol,css as rl}from"@emotion/react";var mn=(e,o)=>e?.components?.[o]||le.components[o],ce=(e,o)=>e?.[o]||le[o];function Qo(e,o){if(!o)return e;if(!e)return o;let r={...e},s=o;return Object.keys(s).forEach(n=>{let a=r[n],i=s[n];Array.isArray(a)&&Array.isArray(i)?r[n]=[...a,...i]:a&&typeof a=="object"&&i&&typeof i=="object"?r[n]=Qo(a,i):i!==void 0&&(r[n]=i)}),r}var un="compass";function fn(e){let o={};function r(s,n){if(!s||typeof s!="object")return;let a=s;Object.keys(a).forEach(i=>{let l=a[i],m=[...n,i];if(typeof l=="string"||typeof l=="number"){let d=`--${un}-${m.join("-")}`,p=l;typeof l=="number"&&["borderRadius","spacing","fontSize"].includes(m[0])&&(p=`${l}px`),o[d]=p}else l&&typeof l=="object"&&r(l,m)})}return r(e,[]),o}function Ji(e){return`--${un}-${e.replace(/\./g,"-")}`}function t(e,o){let r=Ji(e);return o?`var(${r}, ${o})`:`var(${r})`}import{jsx as Xo,jsxs as al}from"react/jsx-runtime";var Zo=Xi(void 0),nl=({children:e,theme:o,lightTheme:r,darkTheme:s,defaultMode:n="light",global:a})=>{let[i,l]=Zi(n),d=!!gn(Zo),p=a??!d;el(()=>{l(n)},[n]);let u=Jo(()=>{let w=i==="dark"?dn:le;return((...c)=>{let P={...w};return c.forEach(S=>{S&&(P=Qo(P,S))}),P})(o,i==="dark"?s:r)},[i,o,r,s]),y=()=>{l(w=>w==="light"?"dark":"light")},h=Jo(()=>({mode:i,setMode:l,toggleTheme:y,theme:u}),[i,u]),b=Jo(()=>fn(u),[u]);return Xo(Zo.Provider,{value:h,children:al(tl,{theme:u,children:[p&&Xo(ol,{styles:rl({":root":b})}),Xo("div",{className:"compass-theme-scope",style:{display:"contents",...p?{}:b},children:e})]})})},er=()=>{let e=gn(Zo);return e||{mode:"light",setMode:()=>{},toggleTheme:()=>{},theme:le}},zt=nl;import{useRef as Sn,useState as fl,forwardRef as gl,useImperativeHandle as hl}from"react";import bl from"@emotion/styled";import{TransitionGroup as yl}from"react-transition-group";import{useState as hn,useRef as sl}from"react";import bn from"@emotion/styled";import{keyframes as yn,css as xn}from"@emotion/react";import{Transition as il}from"react-transition-group";import{jsx as tr}from"react/jsx-runtime";var ll=e=>yn`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0.1;
|
|
@@ -7,37 +7,37 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
7
7
|
transform: scale(1);
|
|
8
8
|
opacity: ${e};
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,cl=yn`
|
|
11
11
|
0% {
|
|
12
12
|
opacity: 1;
|
|
13
13
|
}
|
|
14
14
|
100% {
|
|
15
15
|
opacity: 0;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,pl=(e,o)=>{let r=o||.3;return xn`
|
|
18
18
|
opacity: ${r};
|
|
19
19
|
transform: scale(1);
|
|
20
|
-
animation: ${
|
|
21
|
-
`},
|
|
20
|
+
animation: ${ll(r)} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
+
`},dl=e=>xn`
|
|
22
22
|
opacity: 0;
|
|
23
|
-
animation: ${
|
|
24
|
-
`,
|
|
23
|
+
animation: ${cl} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
24
|
+
`,ml=bn.span`
|
|
25
25
|
width: 50;
|
|
26
26
|
height: 50;
|
|
27
27
|
left: 0;
|
|
28
28
|
top: 0;
|
|
29
29
|
opacity: 0;
|
|
30
30
|
position: absolute;
|
|
31
|
-
${e=>e.$visible&&
|
|
32
|
-
`,
|
|
31
|
+
${e=>e.$visible&&pl(e.$duration,e.$opacity)};
|
|
32
|
+
`,ul=bn.span`
|
|
33
33
|
opacity: 1;
|
|
34
34
|
display: block;
|
|
35
35
|
width: 100%;
|
|
36
36
|
height: 100%;
|
|
37
37
|
border-radius: 50%;
|
|
38
38
|
background-color: ${e=>e.$bgColor||"currentColor"};
|
|
39
|
-
${e=>e.$leaving&&
|
|
40
|
-
`,
|
|
39
|
+
${e=>e.$leaving&&dl(e.$duration)};
|
|
40
|
+
`,vn=e=>{let{rippleX:o,rippleY:r,rippleSize:s,bgColor:n,opacity:a,...i}=e,[l,m]=hn(!1),[d,p]=hn(!1),u=sl(null),y=()=>{m(!0)},h=()=>{p(!0)},b={width:s,height:s,top:-(s/2)+r,left:-(s/2)+o};return tr(il,{...i,nodeRef:u,onEnter:y,onExit:h,children:tr(ml,{ref:u,$visible:l,$opacity:a,style:b,$duration:i.timeout.enter,children:tr(ul,{$bgColor:n,$leaving:d,$duration:i.timeout.exit})})})};import{jsx as or}from"react/jsx-runtime";var xl=bl.div`
|
|
41
41
|
display: block;
|
|
42
42
|
position: absolute;
|
|
43
43
|
overflow: hidden;
|
|
@@ -48,7 +48,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
48
48
|
top: 0;
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
z-index: 0;
|
|
51
|
-
`,
|
|
51
|
+
`,Cn=500,rr=gl((e,o)=>{let r=Sn(0),[s,n]=fl([]),a=Sn(null),i=d=>{let{rippleX:p,rippleY:u,rippleSize:y}=d;n([...s,{num:++r.current,timeout:{exit:Cn,enter:Cn},rippleX:p,rippleY:u,rippleSize:y}])},l=d=>{let p=a.current;if(!p)return;let u=p.getBoundingClientRect(),y=d.clientX,h=d.clientY,b=Math.round(y-u.left),w=Math.round(h-u.top),g=Math.max(Math.abs(p.clientWidth-b),b)*2+2,f=Math.max(Math.abs(p.clientHeight-w),w)*2+2,c=Math.sqrt(g**2+f**2);i({rippleX:b,rippleY:w,rippleSize:c})},m=()=>{s.length&&n(d=>d.slice(1))};return hl(o,()=>({start:l,stop:m})),or(xl,{ref:a,children:or(yl,{component:"span",children:s.map(({num:d,...p})=>or(vn,{...p,...e},d))})})});rr.displayName="TouchRipple";import{jsx as kl,jsxs as wl}from"react/jsx-runtime";var $l=Cl.button`
|
|
52
52
|
display: inline-flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
justify-content: center;
|
|
@@ -59,7 +59,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
59
59
|
padding: 0;
|
|
60
60
|
cursor: pointer;
|
|
61
61
|
background: transparent;
|
|
62
|
-
`,
|
|
62
|
+
`,nr=vl.forwardRef((e,o)=>{let{hasRipple:r=!0,className:s,children:n,...a}=e,{theme:i}=er(),l=mn(i,"button").rippleOpacity,m=Sl(),d=u=>{r&&m.current&&m.current.start(u)},p=u=>{r&&m.current&&m.current.stop(u)};return wl($l,{ref:o,...a,className:s,onMouseLeave:p,onMouseUp:p,onMouseDown:d,children:[n,kl(rr,{ref:m,opacity:l})]})});nr.displayName="ButtonBase";var $n=no(nr)`
|
|
63
63
|
display: inline-flex;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
@@ -196,16 +196,16 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
196
196
|
`}
|
|
197
197
|
|
|
198
198
|
${({$block:e})=>e&&"width: 100%;"}
|
|
199
|
-
|
|
199
|
+
`,kn=no.span`
|
|
200
200
|
display: inline-flex;
|
|
201
201
|
align-items: center;
|
|
202
202
|
|
|
203
203
|
${({$hasText:e})=>e&&"margin-right: 4px;"}
|
|
204
|
-
`,
|
|
204
|
+
`,wn=no.span`
|
|
205
205
|
display: inline-flex;
|
|
206
206
|
align-items: center;
|
|
207
207
|
line-height: 1;
|
|
208
|
-
`,
|
|
208
|
+
`,Pn=no.span`
|
|
209
209
|
display: inline-block;
|
|
210
210
|
width: 14px;
|
|
211
211
|
height: 14px;
|
|
@@ -222,14 +222,14 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
222
222
|
transform: rotate(360deg);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
`;import{jsx as
|
|
225
|
+
`;import{jsx as ar,jsxs as Tl}from"react/jsx-runtime";var Tn=Pl.forwardRef(({children:e,variant:o="default",size:r="medium",shape:s="default",disabled:n=!1,loading:a=!1,danger:i=!1,block:l=!1,icon:m,type:d="button",onClick:p,className:u,style:y,classNames:h,styles:b,...w},g)=>{let f=c=>{a||n||p?.(c)};return ar($n,{ref:g,type:d,className:`compass-button compass-button--${o} ${u||""} ${h?.root||""}`,style:{...y,...b?.root},$variant:o,$size:r,$shape:s,$danger:i,$loading:a,$block:l,disabled:n||a,onClick:f,...w,children:Tl(wn,{$loading:a,className:`compass-button-content ${h?.text||""}`,style:b?.text,children:[(a||m)&&ar(kn,{$hasText:!!e,className:`compass-button-icon ${h?.icon||""}`,style:b?.icon,children:a?ar(Pn,{"aria-hidden":!0,className:`compass-button-loading ${h?.loading||""}`,style:b?.loading}):m}),e]})})});Tn.displayName="Button";var Mn=Tn;var ye=Mn;import _n from"react";import qe from"@emotion/styled";var Rn=qe.div`
|
|
226
226
|
display: flex;
|
|
227
227
|
width: 100%;
|
|
228
228
|
height: ${e=>e.direction==="vertical"?"100%":"auto"};
|
|
229
229
|
font-size: 0;
|
|
230
230
|
text-align: initial;
|
|
231
231
|
flex-direction: ${e=>e.direction==="vertical"?"column":"row"};
|
|
232
|
-
`,
|
|
232
|
+
`,In=qe.div`
|
|
233
233
|
position: relative;
|
|
234
234
|
display: inline-block;
|
|
235
235
|
flex: 1;
|
|
@@ -312,7 +312,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
312
312
|
margin-right: 0;
|
|
313
313
|
padding-bottom: 0;
|
|
314
314
|
`}
|
|
315
|
-
`,
|
|
315
|
+
`,Fn=qe.div`
|
|
316
316
|
position: relative;
|
|
317
317
|
z-index: 1;
|
|
318
318
|
box-sizing: border-box;
|
|
@@ -354,10 +354,10 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
354
354
|
border-color: ${n};
|
|
355
355
|
color: ${n};
|
|
356
356
|
`;default:return""}}}
|
|
357
|
-
`,Nn=
|
|
357
|
+
`,Nn=qe.div`
|
|
358
358
|
display: inline-block;
|
|
359
359
|
vertical-align: top;
|
|
360
|
-
`,
|
|
360
|
+
`,Dn=qe.div`
|
|
361
361
|
position: relative;
|
|
362
362
|
display: inline-block;
|
|
363
363
|
padding-right: 16px;
|
|
@@ -375,16 +375,16 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
375
375
|
background: ${t("colors.borderSecondary","#f0f0f0")};
|
|
376
376
|
content: '';
|
|
377
377
|
}
|
|
378
|
-
`,
|
|
378
|
+
`,En=qe.div`
|
|
379
379
|
display: inline;
|
|
380
380
|
margin-left: 8px;
|
|
381
381
|
color: ${t("components.steps.subTitleColor","rgba(0, 0, 0, 0.45)")};
|
|
382
382
|
font-weight: normal;
|
|
383
383
|
font-size: 14px;
|
|
384
|
-
`,
|
|
384
|
+
`,zn=qe.div`
|
|
385
385
|
color: ${e=>{switch(e.status){case"process":return t("components.steps.processDescriptionColor","rgba(0, 0, 0, 0.88)");case"wait":return t("components.steps.waitDescriptionColor","rgba(0, 0, 0, 0.45)");case"finish":return t("components.steps.finishDescriptionColor","rgba(0, 0, 0, 0.45)");case"error":return t("components.steps.errorDescriptionColor","#ff4d4f");default:return t("components.steps.descriptionColor","rgba(0, 0, 0, 0.45)")}}};
|
|
386
386
|
font-size: ${t("components.steps.descriptionFontSize","14px")};
|
|
387
|
-
`,
|
|
387
|
+
`,Bn=qe.div`
|
|
388
388
|
display: ${e=>e.direction==="vertical"&&!e.isLast?"block":"none"};
|
|
389
389
|
position: absolute;
|
|
390
390
|
top: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return`calc((32px + ${e.variant==="dot"?r:o}) / 2 + 6px)`}};
|
|
@@ -404,7 +404,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
404
404
|
transition: background 0.3s;
|
|
405
405
|
content: '';
|
|
406
406
|
}
|
|
407
|
-
`;import{jsx as E,jsxs as Kn}from"react/jsx-runtime";var Bn=()=>E("span",{role:"img","aria-label":"caret-right",className:"compass-icon compass-icon-caret-right",children:E("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M715.8 493.5L335 865c-12.3 12-32.8 3.3-32.8-13.7V172.7c0-17 20.5-25.7 32.8-13.7l380.8 371.5c7.5 7.3 7.5 19.4 0 26.7z"})})}),qe=()=>E("span",{role:"img","aria-label":"info",className:"compass-icon compass-icon-info-circle",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"info-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),ht=()=>E("span",{role:"img","aria-label":"success",className:"compass-icon compass-icon-check-circle",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),bt=()=>E("span",{role:"img","aria-label":"error",className:"compass-icon compass-icon-close-circle",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})})}),yt=()=>E("span",{role:"img","aria-label":"warning",className:"compass-icon compass-icon-exclamation-circle",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),xt=()=>E("span",{role:"img","aria-label":"loading",className:"compass-icon compass-icon-loading",children:E("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})})}),Ee=()=>E("span",{role:"img","aria-label":"close",className:"compass-icon compass-icon-close",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})})});var Hn=()=>E("span",{role:"img","aria-label":"eye",className:"compass-icon compass-icon-eye",children:E("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M7,1.09375 C10.724875,1.09375 13.78125,3.7135 13.78125,7 C13.78125,10.2865 10.724875,12.90625 7,12.90625 C3.275125,12.90625 0.21875,10.2865 0.21875,7 C0.21875,3.7135 3.275125,1.09375 7,1.09375 Z M7,2.40625 C3.959375,2.40625 1.53125,4.487 1.53125,7 C1.53125,9.513 3.959375,11.59375 7,11.59375 C10.040625,11.59375 12.46875,9.513 12.46875,7 C12.46875,4.487 10.040625,2.40625 7,2.40625 Z M7,4.59375 C8.32893518,4.59375 9.40625,5.67106482 9.40625,7 C9.40625,8.32893518 8.32893518,9.40625 7,9.40625 C5.67106482,9.40625 4.59375,8.32893518 4.59375,7 C4.59375,5.67106482 5.67106482,4.59375 7,4.59375 Z M7,5.90625 C6.39593855,5.90625 5.90625,6.39593855 5.90625,7 C5.90625,7.60406145 6.39593855,8.09375 7,8.09375 C7.60406145,8.09375 8.09375,7.60406145 8.09375,7 C8.09375,6.39593855 7.60406145,5.90625 7,5.90625 Z"})})}),Ln=()=>E("span",{role:"img","aria-label":"eye-invisible",className:"compass-icon compass-icon-eye-invisible",children:E("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye-invisible",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M12.868625,4.03725 C13.4603604,4.91226301 13.7780744,5.94369109 13.78125,7 C13.78125,10.2865 10.724875,12.9062678 7,12.9062678 C6.18828678,12.9079957 5.38143233,12.7810017 4.6095,12.53 C4.38661092,12.4570062 4.21959467,12.2706472 4.17136464,12.0411227 C4.12313461,11.8115982 4.20101809,11.5737784 4.37567714,11.4172477 C4.55033619,11.260717 4.79523593,11.2092562 5.018125,11.28225 C5.64375,11.487 6.313125,11.59375 7,11.59375 C10.040625,11.59375 12.46875,9.513 12.46875,7 C12.46875,6.20725 12.229,5.44425 11.7775,4.764375 C11.6348466,4.56962526 11.6106339,4.31227896 11.714459,4.09433903 C11.8182841,3.8763991 12.0333813,3.73305843 12.2744938,3.72113218 C12.5156063,3.70920592 12.7437992,3.83061993 12.868625,4.03725 L12.868625,4.03725 Z M12.27625,2.16125 C12.5059406,2.39088742 12.5330996,2.7539993 12.340125,3.01525 L12.27625,3.08875 L3.073,12.292 C2.82983557,12.5332728 2.4420013,12.5469304 2.18246741,12.3233601 C1.92293353,12.0997899 1.87901583,11.7142083 2.081625,11.438 L2.1455,11.3645 L11.34875,2.16125 C11.6049654,1.90535329 12.0200346,1.90535329 12.27625,2.16125 L12.27625,2.16125 Z M7,1.09375 C7.9835,1.09375 8.938125,1.27575 9.814,1.624 C10.1432145,1.7625157 10.3012034,2.13888002 10.1694996,2.47087839 C10.0377958,2.80287677 9.66476628,2.968586 9.330125,2.84375 C8.58802706,2.55203261 7.79737147,2.40358057 7,2.40625 C3.959375,2.40625 1.53125,4.487 1.53125,7 C1.53125,7.96775 1.89,8.892625 2.550625,9.66875 C2.77602395,9.94547739 2.73894098,10.351606 2.4671521,10.5829359 C2.19536323,10.8142658 1.78852775,10.7859733 1.551375,10.51925 C0.693,9.512125 0.21875,8.288 0.21875,7 C0.21875,3.7135 3.275125,1.09375 7,1.09375 Z"})})}),ro=()=>E("span",{role:"img","aria-label":"search",className:"compass-icon compass-icon-search",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"search",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"})})}),ze=()=>E("span",{role:"img","aria-label":"close-circle",className:"compass-icon compass-icon-close-circle",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})})}),no=()=>E("span",{role:"img","aria-label":"check",className:"compass-icon compass-icon-check",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})})}),nt=()=>E("span",{role:"img","aria-label":"left",className:"compass-icon compass-icon-left",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"})})}),at=()=>E("span",{role:"img","aria-label":"right",className:"compass-icon compass-icon-right",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.8 31.8 0 000-50.4z"})})}),Qe=()=>E("span",{role:"img","aria-label":"double-left",className:"compass-icon compass-icon-double-left",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"})})}),Je=()=>E("span",{role:"img","aria-label":"double-right",className:"compass-icon compass-icon-double-right",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"})})}),ao=()=>E("span",{role:"img","aria-label":"calendar",className:"compass-icon compass-icon-calendar",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"calendar",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"})})}),so=()=>E("span",{role:"img","aria-label":"down",className:"compass-icon compass-icon-down",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})})});var On=()=>E("span",{role:"img","aria-label":"ellipsis",className:"compass-icon compass-icon-ellipsis",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"ellipsis",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M176 512a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"})})}),Vn=()=>E("span",{role:"img","aria-label":"plus-square",className:"compass-icon compass-icon-plus-square",children:Kn("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[E("path",{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),E("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]})}),Wn=()=>E("span",{role:"img","aria-label":"minus-square",className:"compass-icon compass-icon-minus-square",children:Kn("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[E("path",{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),E("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]})}),An=()=>E("span",{role:"img","aria-label":"file",className:"compass-icon compass-icon-file",children:E("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"file",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:E("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"})})});import{jsx as st,jsxs as nr}from"react/jsx-runtime";var _n=()=>null,jn=({current:e=0,status:o="process",direction:r="horizontal",labelPlacement:s="horizontal",variant:n="default",items:a,children:i,onChange:l,className:d,style:p,styles:m,classNames:f})=>{let x=(g,u,c)=>g<u?"finish":g===u?c:"wait",b=(g,u,c)=>c||(u==="finish"?st(no,{}):u==="error"?st(Ee,{}):g+1),y=(g,u)=>{l&&!u&&g!==e&&l(g)},w=[];return a?w=a:i&&Yn.Children.forEach(i,g=>{Yn.isValidElement(g)&&g.type===_n&&w.push(g.props)}),st(Mn,{direction:r,labelPlacement:s,className:`compass-steps compass-steps--${r} compass-steps--label-${s} compass-steps--${n} ${d||""} ${f?.root||""}`,style:{...p,...m?.root},role:"list",children:w.map((g,u)=>{let c=g.status||x(u,e,o),P=!!l&&!g.disabled;return nr(Rn,{status:c,active:u===e,disabled:g.disabled,direction:r,labelPlacement:s,variant:n,clickable:P,onClick:()=>y(u,g.disabled),className:`compass-steps-item compass-steps-item--${c} ${u===e?"compass-steps-item--active":""} ${g.disabled?"compass-steps-item--disabled":""} ${f?.item||""} ${g.className||""}`,style:{...m?.item,...g.style},role:"listitem",children:[st(zn,{direction:r,isLast:u===w.length-1,variant:n,className:f?.tail,style:m?.tail}),st(In,{status:c,active:u===e,variant:n,className:`compass-steps-icon ${n==="dot"?"compass-steps-icon--dot":""} ${f?.icon||""}`,style:m?.icon,children:n!=="dot"&&b(u,c,g.icon)}),nr(Nn,{className:`compass-steps-content ${f?.content||""}`,style:m?.content,children:[nr(Fn,{status:c,className:`compass-steps-title ${f?.title||""}`,style:m?.title,isLast:u===w.length-1,direction:r,children:[g.title,g.subTitle&&st(Dn,{className:`compass-steps-subtitle ${f?.subtitle||""}`,style:m?.subtitle,children:g.subTitle})]}),g.description&&st(En,{status:c,className:`compass-steps-description ${f?.description||""}`,style:m?.description,children:g.description})]})]},u)})})};jn.Step=_n;var Gn=jn;var Pl=Gn;import{useState as ec,useMemo as tc}from"react";import{useState as yr,useEffect as xr}from"react";import ar from"@emotion/styled";var sr=ar.ul`
|
|
407
|
+
`;import{jsx as D,jsxs as Yn}from"react/jsx-runtime";var Hn=()=>D("span",{role:"img","aria-label":"caret-right",className:"compass-icon compass-icon-caret-right",children:D("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M715.8 493.5L335 865c-12.3 12-32.8 3.3-32.8-13.7V172.7c0-17 20.5-25.7 32.8-13.7l380.8 371.5c7.5 7.3 7.5 19.4 0 26.7z"})})}),Qe=()=>D("span",{role:"img","aria-label":"info",className:"compass-icon compass-icon-info-circle",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"info-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),bt=()=>D("span",{role:"img","aria-label":"success",className:"compass-icon compass-icon-check-circle",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),yt=()=>D("span",{role:"img","aria-label":"error",className:"compass-icon compass-icon-close-circle",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})})}),xt=()=>D("span",{role:"img","aria-label":"warning",className:"compass-icon compass-icon-exclamation-circle",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),vt=()=>D("span",{role:"img","aria-label":"loading",className:"compass-icon compass-icon-loading",children:D("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})})}),Ee=()=>D("span",{role:"img","aria-label":"close",className:"compass-icon compass-icon-close",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})})});var Ln=()=>D("span",{role:"img","aria-label":"eye",className:"compass-icon compass-icon-eye",children:D("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M7,1.09375 C10.724875,1.09375 13.78125,3.7135 13.78125,7 C13.78125,10.2865 10.724875,12.90625 7,12.90625 C3.275125,12.90625 0.21875,10.2865 0.21875,7 C0.21875,3.7135 3.275125,1.09375 7,1.09375 Z M7,2.40625 C3.959375,2.40625 1.53125,4.487 1.53125,7 C1.53125,9.513 3.959375,11.59375 7,11.59375 C10.040625,11.59375 12.46875,9.513 12.46875,7 C12.46875,4.487 10.040625,2.40625 7,2.40625 Z M7,4.59375 C8.32893518,4.59375 9.40625,5.67106482 9.40625,7 C9.40625,8.32893518 8.32893518,9.40625 7,9.40625 C5.67106482,9.40625 4.59375,8.32893518 4.59375,7 C4.59375,5.67106482 5.67106482,4.59375 7,4.59375 Z M7,5.90625 C6.39593855,5.90625 5.90625,6.39593855 5.90625,7 C5.90625,7.60406145 6.39593855,8.09375 7,8.09375 C7.60406145,8.09375 8.09375,7.60406145 8.09375,7 C8.09375,6.39593855 7.60406145,5.90625 7,5.90625 Z"})})}),On=()=>D("span",{role:"img","aria-label":"eye-invisible",className:"compass-icon compass-icon-eye-invisible",children:D("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye-invisible",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M12.868625,4.03725 C13.4603604,4.91226301 13.7780744,5.94369109 13.78125,7 C13.78125,10.2865 10.724875,12.9062678 7,12.9062678 C6.18828678,12.9079957 5.38143233,12.7810017 4.6095,12.53 C4.38661092,12.4570062 4.21959467,12.2706472 4.17136464,12.0411227 C4.12313461,11.8115982 4.20101809,11.5737784 4.37567714,11.4172477 C4.55033619,11.260717 4.79523593,11.2092562 5.018125,11.28225 C5.64375,11.487 6.313125,11.59375 7,11.59375 C10.040625,11.59375 12.46875,9.513 12.46875,7 C12.46875,6.20725 12.229,5.44425 11.7775,4.764375 C11.6348466,4.56962526 11.6106339,4.31227896 11.714459,4.09433903 C11.8182841,3.8763991 12.0333813,3.73305843 12.2744938,3.72113218 C12.5156063,3.70920592 12.7437992,3.83061993 12.868625,4.03725 L12.868625,4.03725 Z M12.27625,2.16125 C12.5059406,2.39088742 12.5330996,2.7539993 12.340125,3.01525 L12.27625,3.08875 L3.073,12.292 C2.82983557,12.5332728 2.4420013,12.5469304 2.18246741,12.3233601 C1.92293353,12.0997899 1.87901583,11.7142083 2.081625,11.438 L2.1455,11.3645 L11.34875,2.16125 C11.6049654,1.90535329 12.0200346,1.90535329 12.27625,2.16125 L12.27625,2.16125 Z M7,1.09375 C7.9835,1.09375 8.938125,1.27575 9.814,1.624 C10.1432145,1.7625157 10.3012034,2.13888002 10.1694996,2.47087839 C10.0377958,2.80287677 9.66476628,2.968586 9.330125,2.84375 C8.58802706,2.55203261 7.79737147,2.40358057 7,2.40625 C3.959375,2.40625 1.53125,4.487 1.53125,7 C1.53125,7.96775 1.89,8.892625 2.550625,9.66875 C2.77602395,9.94547739 2.73894098,10.351606 2.4671521,10.5829359 C2.19536323,10.8142658 1.78852775,10.7859733 1.551375,10.51925 C0.693,9.512125 0.21875,8.288 0.21875,7 C0.21875,3.7135 3.275125,1.09375 7,1.09375 Z"})})}),ao=()=>D("span",{role:"img","aria-label":"search",className:"compass-icon compass-icon-search",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"search",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"})})}),ze=()=>D("span",{role:"img","aria-label":"close-circle",className:"compass-icon compass-icon-close-circle",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})})}),so=()=>D("span",{role:"img","aria-label":"check",className:"compass-icon compass-icon-check",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})})}),at=()=>D("span",{role:"img","aria-label":"left",className:"compass-icon compass-icon-left",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"})})}),st=()=>D("span",{role:"img","aria-label":"right",className:"compass-icon compass-icon-right",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.8 31.8 0 000-50.4z"})})}),Je=()=>D("span",{role:"img","aria-label":"double-left",className:"compass-icon compass-icon-double-left",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"})})}),Xe=()=>D("span",{role:"img","aria-label":"double-right",className:"compass-icon compass-icon-double-right",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"})})}),io=()=>D("span",{role:"img","aria-label":"calendar",className:"compass-icon compass-icon-calendar",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"calendar",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"})})}),lo=()=>D("span",{role:"img","aria-label":"down",className:"compass-icon compass-icon-down",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})})});var Vn=()=>D("span",{role:"img","aria-label":"ellipsis",className:"compass-icon compass-icon-ellipsis",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"ellipsis",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M176 512a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"})})}),Wn=()=>D("span",{role:"img","aria-label":"plus-square",className:"compass-icon compass-icon-plus-square",children:Yn("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[D("path",{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),D("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]})}),An=()=>D("span",{role:"img","aria-label":"minus-square",className:"compass-icon compass-icon-minus-square",children:Yn("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[D("path",{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}),D("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"})]})}),Kn=()=>D("span",{role:"img","aria-label":"file",className:"compass-icon compass-icon-file",children:D("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"file",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:D("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"})})});import{jsx as it,jsxs as sr}from"react/jsx-runtime";var jn=()=>null,Gn=({current:e=0,status:o="process",direction:r="horizontal",labelPlacement:s="horizontal",variant:n="default",items:a,children:i,onChange:l,className:m,style:d,styles:p,classNames:u})=>{let y=(g,f,c)=>g<f?"finish":g===f?c:"wait",h=(g,f,c)=>c||(f==="finish"?it(so,{}):f==="error"?it(Ee,{}):g+1),b=(g,f)=>{l&&!f&&g!==e&&l(g)},w=[];return a?w=a:i&&_n.Children.forEach(i,g=>{_n.isValidElement(g)&&g.type===jn&&w.push(g.props)}),it(Rn,{direction:r,labelPlacement:s,className:`compass-steps compass-steps--${r} compass-steps--label-${s} compass-steps--${n} ${m||""} ${u?.root||""}`,style:{...d,...p?.root},role:"list",children:w.map((g,f)=>{let c=g.status||y(f,e,o),P=!!l&&!g.disabled;return sr(In,{status:c,active:f===e,disabled:g.disabled,direction:r,labelPlacement:s,variant:n,clickable:P,onClick:()=>b(f,g.disabled),className:`compass-steps-item compass-steps-item--${c} ${f===e?"compass-steps-item--active":""} ${g.disabled?"compass-steps-item--disabled":""} ${u?.item||""} ${g.className||""}`,style:{...p?.item,...g.style},role:"listitem",children:[it(Bn,{direction:r,isLast:f===w.length-1,variant:n,className:u?.tail,style:p?.tail}),it(Fn,{status:c,active:f===e,variant:n,className:`compass-steps-icon ${n==="dot"?"compass-steps-icon--dot":""} ${u?.icon||""}`,style:p?.icon,children:n!=="dot"&&h(f,c,g.icon)}),sr(Nn,{className:`compass-steps-content ${u?.content||""}`,style:p?.content,children:[sr(Dn,{status:c,className:`compass-steps-title ${u?.title||""}`,style:p?.title,isLast:f===w.length-1,direction:r,children:[g.title,g.subTitle&&it(En,{className:`compass-steps-subtitle ${u?.subtitle||""}`,style:p?.subtitle,children:g.subTitle})]}),g.description&&it(zn,{status:c,className:`compass-steps-description ${u?.description||""}`,style:p?.description,children:g.description})]})]},f)})})};Gn.Step=jn;var Un=Gn;var Ml=Un;import{useState as oc,useMemo as rc}from"react";import{useState as vr,useEffect as Sr}from"react";import ir from"@emotion/styled";var lr=ir.ul`
|
|
408
408
|
display: flex;
|
|
409
409
|
align-items: center;
|
|
410
410
|
list-style: none;
|
|
@@ -440,7 +440,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
440
440
|
input[type='number'] {
|
|
441
441
|
-moz-appearance: textfield;
|
|
442
442
|
}
|
|
443
|
-
`,
|
|
443
|
+
`,lt=ir.li`
|
|
444
444
|
display: inline-flex;
|
|
445
445
|
justify-content: center;
|
|
446
446
|
align-items: center;
|
|
@@ -511,7 +511,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
511
511
|
opacity: 0;
|
|
512
512
|
font-size: 12px;
|
|
513
513
|
}
|
|
514
|
-
`,
|
|
514
|
+
`,zu=ir.li`
|
|
515
515
|
display: inline-flex;
|
|
516
516
|
justify-content: center;
|
|
517
517
|
align-items: center;
|
|
@@ -520,17 +520,17 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
520
520
|
margin-right: 8px;
|
|
521
521
|
color: ${t("components.pagination.itemColor","rgba(0, 0, 0, 0.25)")};
|
|
522
522
|
cursor: pointer;
|
|
523
|
-
`;import
|
|
523
|
+
`;import ca,{useState as dr,useRef as El,useMemo as pa}from"react";import{useFloating as zl,autoUpdate as Bl,offset as Hl,flip as Ll,shift as Ol,useDismiss as Vl,useRole as Wl,useClick as Al,useInteractions as Kl,FloatingPortal as Yl,size as _l,useHover as jl,safePolygon as Gl}from"@floating-ui/react";import qn from"react";var cr=qn.createContext(null),Qn=()=>{let e=qn.useContext(cr);if(!e)throw new Error("Select compounds must be used within a Select component");return e};import{useMemo as Fl}from"react";import Se from"@emotion/styled";import{keyframes as Rl}from"@emotion/react";var Il=Rl`
|
|
524
524
|
from {
|
|
525
525
|
transform: rotate(0deg);
|
|
526
526
|
}
|
|
527
527
|
to {
|
|
528
528
|
transform: rotate(360deg);
|
|
529
529
|
}
|
|
530
|
-
`,
|
|
530
|
+
`,Jn=Se.span`
|
|
531
531
|
display: inline-flex;
|
|
532
|
-
animation: ${
|
|
533
|
-
`,
|
|
532
|
+
animation: ${Il} 1s linear infinite;
|
|
533
|
+
`,Xn=Se.div`
|
|
534
534
|
position: relative;
|
|
535
535
|
display: inline-flex;
|
|
536
536
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
@@ -538,7 +538,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
538
538
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
539
539
|
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
540
540
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
541
|
-
`,
|
|
541
|
+
`,Zn=Se.div`
|
|
542
542
|
display: flex;
|
|
543
543
|
align-items: center;
|
|
544
544
|
justify-content: space-between;
|
|
@@ -556,7 +556,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
556
556
|
&:hover {
|
|
557
557
|
border-color: ${({status:e})=>{if(!e)return t("components.select.hoverBorderColor",t("colors.primary","#1890ff"))}};
|
|
558
558
|
}
|
|
559
|
-
`,
|
|
559
|
+
`,ea=Se.div`
|
|
560
560
|
position: relative;
|
|
561
561
|
flex: 1;
|
|
562
562
|
overflow: hidden;
|
|
@@ -567,24 +567,29 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
567
567
|
flex-wrap: wrap;
|
|
568
568
|
align-items: center;
|
|
569
569
|
gap: 4px;
|
|
570
|
-
min-height: ${({size:e})=>e
|
|
571
|
-
`,
|
|
570
|
+
min-height: ${({size:e})=>{switch(e){case"small":return t("components.select.minHeight.sm","20px");case"large":return t("components.select.minHeight.lg","26px");default:return t("components.select.minHeight.md","24px")}}};
|
|
571
|
+
`,Bt=Se.span`
|
|
572
572
|
color: ${t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf"))};
|
|
573
|
-
`,
|
|
574
|
-
padding: 4px 0;
|
|
575
|
-
background-color: ${t("colors.background","#fff")};
|
|
576
|
-
border-radius: ${t("borderRadius.md","4px")};
|
|
577
|
-
box-shadow:
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
573
|
+
`,ta=Se.div`
|
|
574
|
+
padding: ${t("components.select.dropdownPadding","4px 0")};
|
|
575
|
+
background-color: ${t("components.select.dropdownBg",t("colors.background","#fff"))};
|
|
576
|
+
border-radius: ${t("components.select.borderRadius",t("borderRadius.md","4px"))};
|
|
577
|
+
box-shadow: ${t("components.select.dropdownBoxShadow","0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)")};
|
|
578
|
+
z-index: ${t("components.select.dropdownZIndex","1050")};
|
|
579
|
+
max-height: ${t("components.select.dropdownMaxHeight","256px")};
|
|
580
|
+
display: flex;
|
|
581
|
+
flex-direction: column;
|
|
582
|
+
overflow: hidden;
|
|
583
|
+
`,oa=Se.div`
|
|
584
|
+
flex: 1;
|
|
585
|
+
min-height: 0;
|
|
583
586
|
overflow-y: auto;
|
|
584
|
-
`,
|
|
585
|
-
padding: 0 12px;
|
|
586
|
-
min-height: 32px;
|
|
587
|
+
`,ra=Se.div`
|
|
588
|
+
padding: ${t("components.select.optionPadding","0 12px")};
|
|
589
|
+
min-height: ${t("components.select.optionMinHeight","32px")};
|
|
590
|
+
font-size: ${t("components.select.optionFontSize","14px")};
|
|
587
591
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
592
|
+
|
|
588
593
|
transition: all 0.3s;
|
|
589
594
|
background-color: ${({selected:e,active:o})=>e?t("components.select.optionSelectedBg","#e6f7ff"):o?t("components.select.optionHoverBg","#e6e6e6"):"transparent"};
|
|
590
595
|
color: ${({selected:e,disabled:o})=>o?t("colors.textDisabled","#00000040"):e?t("components.select.optionSelectedColor",t("colors.text","rgba(0, 0, 0, 0.88)")):t("components.select.optionColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
@@ -601,18 +606,19 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
601
606
|
&:hover {
|
|
602
607
|
background-color: ${({disabled:e,selected:o})=>e?"transparent":o?t("components.select.optionSelectedBg","#e6f7ff"):t("components.select.optionHoverBg","#e6e6e6")};
|
|
603
608
|
}
|
|
604
|
-
`,
|
|
609
|
+
`,na=Se.span`
|
|
605
610
|
display: inline-flex;
|
|
606
611
|
align-items: center;
|
|
607
|
-
height: 24px;
|
|
608
|
-
padding: 0 8px;
|
|
609
|
-
font-size: 12px;
|
|
612
|
+
height: ${t("components.select.tagHeight","24px")};
|
|
613
|
+
padding: ${t("components.select.tagPadding","0 8px")};
|
|
614
|
+
font-size: ${t("components.select.tagFontSize","12px")};
|
|
610
615
|
line-height: normal;
|
|
611
616
|
background: ${t("components.select.tagBg",t("colors.backgroundSecondary","#f5f5f5"))};
|
|
612
617
|
color: ${t("components.select.tagColor","inherit")};
|
|
613
618
|
border: 1px solid ${t("components.select.tagBorderColor","transparent")};
|
|
614
|
-
border-radius: 4px;
|
|
619
|
+
border-radius: ${t("components.select.tagBorderRadius","4px")};
|
|
615
620
|
margin-right: 4px;
|
|
621
|
+
|
|
616
622
|
margin-top: 1px;
|
|
617
623
|
margin-bottom: 1px;
|
|
618
624
|
|
|
@@ -622,7 +628,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
622
628
|
align-items: center;
|
|
623
629
|
height: 100%;
|
|
624
630
|
}
|
|
625
|
-
`,
|
|
631
|
+
`,aa=Se.span`
|
|
626
632
|
margin-left: 4px;
|
|
627
633
|
cursor: pointer;
|
|
628
634
|
font-size: 12px;
|
|
@@ -639,13 +645,13 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
639
645
|
&:hover {
|
|
640
646
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
641
647
|
}
|
|
642
|
-
`,
|
|
648
|
+
`,sa=Se.span`
|
|
643
649
|
display: flex;
|
|
644
650
|
align-items: center;
|
|
645
651
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.25)")};
|
|
646
652
|
font-size: 12px;
|
|
647
653
|
line-height: 0;
|
|
648
|
-
`,
|
|
654
|
+
`,pr=Se.input`
|
|
649
655
|
margin: 0;
|
|
650
656
|
padding: 0;
|
|
651
657
|
background: transparent;
|
|
@@ -659,14 +665,14 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
659
665
|
margin-top: 1px;
|
|
660
666
|
margin-bottom: 1px;
|
|
661
667
|
min-width: 4px;
|
|
662
|
-
`,
|
|
668
|
+
`,ia=Se.div`
|
|
663
669
|
display: inline-block;
|
|
664
670
|
max-width: 100%;
|
|
665
|
-
`;import{jsx as
|
|
671
|
+
`;import{jsx as la,jsxs as Dl}from"react/jsx-runtime";var Nl=({value:e,children:o,disabled:r,className:s,style:n,label:a})=>{let{value:i,onSelect:l,multiple:m,menuItemSelectedIcon:d}=Qn(),p=Fl(()=>m&&Array.isArray(i)?i.includes(e):i===e,[i,e,m]),u=y=>{if(r)return;y.preventDefault(),y.stopPropagation(),l(e,{value:e,label:a||o,disabled:r})};return Dl(ra,{className:`compass-select-option ${p?"compass-select-option-selected":""} ${s||""}`,style:n,onClick:u,selected:p,disabled:r,role:"option","aria-selected":p,children:[la("span",{className:"compass-select-option-content",children:o}),p&&(d||la(so,{}))]})},co=Nl;import{Fragment as mr,jsx as ie,jsxs as Ht}from"react/jsx-runtime";var ur=e=>{let{children:o,options:r,value:s,defaultValue:n,onChange:a,disabled:i,loading:l,allowClear:m,placeholder:d,multiple:p=!1,mode:u,size:y="medium",status:h,dropdownStyle:b,dropdownClassName:w,trigger:g="click",showSearch:f,className:c,style:P,styles:S,classNames:C,optionRender:F,labelRender:N,menuItemSelectedIcon:M,popupRender:W}=e,O=p||u==="multiple"||u==="tags",T=u==="tags",[R,k]=dr(n||(O?[]:"")),v=s!==void 0,$=v?s:R,[z,j]=dr(!1),[L,A]=dr(""),K=El(null),U=pa(()=>{let E=[];return r?E=r:ca.Children.forEach(o,X=>{if(ca.isValidElement(X)&&(X.type===co||typeof X.type=="function"&&X.type.name==="Option")){let{value:te,children:he,disabled:pe,...fe}=X.props;E.push({value:te,label:he,disabled:pe,...fe})}}),E},[o,r]),x=pa(()=>L?U.filter(E=>String(E.label).toLowerCase().includes(L.toLowerCase())):U,[U,L]),B=E=>{i||(j(E),E?setTimeout(()=>{f&&K.current?.focus()},0):A(""))},{x:q,y:I,refs:oe,floatingStyles:G,context:V}=zl({open:z,onOpenChange:B,placement:"bottom-start",middleware:[Hl(4),Ll(),Ol(),_l({apply({rects:E,elements:X}){Object.assign(X.floating.style,{minWidth:`${E.reference.width}px`})}})],whileElementsMounted:Bl}),Y=Al(V,{enabled:g==="click"}),ue=jl(V,{enabled:g==="hover",handleClose:Gl()}),ne=Vl(V),Re=Wl(V,{role:"listbox"}),{getReferenceProps:Ye,getFloatingProps:nt}=Kl([Y,ue,ne,Re]),Ve=E=>{let X=U.find(te=>te.value===E);return X?N?N(X):X.label:E},Q=(E,X)=>{v||k(E),a?.(E,X)},H=(E,X)=>{if(O){let te=Array.isArray($)?$:[],he=te.indexOf(E),pe,fe=[];he===-1?pe=[...te,E]:pe=te.filter(Ue=>Ue!==E),fe=pe.map(Ue=>U.find(ro=>ro.value===Ue)||{value:Ue,label:Ue}),Q(pe,fe),A(""),f&&K.current?.focus()}else Q(E,X),j(!1),A("")},ee=E=>{E.stopPropagation(),Q(O?[]:"",O?[]:{})},Ie=(E,X)=>{X.stopPropagation();let he=(Array.isArray($)?$:[]).filter(fe=>fe!==E),pe=he.map(fe=>U.find(Ue=>Ue.value===fe)||{value:fe,label:fe});Q(he,pe)},_e=E=>{A(E.target.value),z||j(!0)},je=E=>{if(E.key==="Enter"&&T&&L){let X=U.find(te=>te.value===L);if(X)H(X.value,X);else{let te=L;H(te,{value:te,label:te})}E.preventDefault()}},Et=()=>{if(O){let E=Array.isArray($)?$:[];return Ht(mr,{children:[E.map(X=>Ht(na,{style:S?.tag,className:C?.tag,children:[ie("span",{children:Ve(X)}),ie(aa,{onClick:te=>Ie(X,te),children:ie(Ee,{})})]},X)),(f||T)&&ie(ia,{style:{width:L?"auto":"4px",minWidth:"50px",flex:1},children:ie(pr,{ref:K,value:L,onChange:_e,onKeyDown:je,disabled:i,style:{width:"100%"}})}),!L&&E.length===0&&!f&&!T&&ie(Bt,{children:d}),E.length===0&&!L&&(f||T)&&ie(Bt,{style:{position:"absolute",left:0,pointerEvents:"none"},children:d})]})}return f?Ht(mr,{children:[!L&&($!==void 0&&$!==""?ie("span",{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:Ve($)}):ie(Bt,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:d})),ie(pr,{ref:K,value:L,onChange:_e,onKeyDown:je,disabled:i,style:{opacity:z||L?1:0}})]}):!$&&$!==0?ie(Bt,{children:d}):Ve($)},ht=m&&!i&&(O?Array.isArray($)&&$.length>0:$!==""&&$!==void 0&&$!==null),Ge={value:$,onSelect:H,multiple:O,searchValue:L,activeValue:null,setActiveValue:()=>{},menuItemSelectedIcon:M},_=oe.setReference,Z=ie(oa,{className:"compass-select-menu",children:x.length>0?x.map((E,X)=>{let te=O?Array.isArray($)&&$.includes(E.value):$===E.value;return ie(co,{value:E.value,disabled:E.disabled,label:E.label,style:S?.option,className:`${C?.option||""}`,menuItemSelectedIcon:F?ie(mr,{}):void 0,children:F?F(E,{index:X,selected:te}):E.label},E.value)}):ie("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})}),re=W?W(Z):Z;return ie(cr.Provider,{value:Ge,children:Ht(Xn,{ref:_,className:`compass-select ${c||""} ${C?.root||""} ${z?"compass-select-open":""} ${i?"compass-select-disabled":""}`,style:{...P,...S?.root},disabled:i,fullWidth:!0,...Ye({onClick:()=>{(f||T)&&K.current?.focus()}}),children:[Ht(Zn,{size:y,active:z,status:h,style:S?.trigger,className:`compass-select-selector ${C?.trigger||""}`,children:[ie(ea,{size:y,children:Et()}),ie(sa,{children:l?ie(Jn,{children:ie(vt,{})}):ht?ie("span",{onClick:ee,style:{cursor:"pointer"},children:ie(ze,{})}):ie(lo,{})})]}),z&&ie(Yl,{children:ie(ta,{ref:oe.setFloating,style:{...b,...G,opacity:q===null||I===null?0:1,visibility:q===null||I===null?"hidden":"visible",...S?.dropdown},className:`compass-select-dropdown ${w||""} ${C?.dropdown||""}`,...nt({onClick:E=>E.stopPropagation(),onMouseDown:E=>E.stopPropagation(),onPointerDown:E=>E.stopPropagation()}),children:re})})]})})};ur.Option=co;ur.displayName="Select";var da=ur;var po=da;import br,{useState as uo,useRef as Ul}from"react";import gr from"@emotion/styled";import Lt from"@emotion/styled";var Ot=Lt.div`
|
|
666
672
|
display: inline-flex;
|
|
667
673
|
flex-direction: column;
|
|
668
674
|
width: ${({fullWidth:e})=>e?"100%":"320px"};
|
|
669
|
-
`,
|
|
675
|
+
`,ct=Lt.span`
|
|
670
676
|
display: flex;
|
|
671
677
|
align-items: center;
|
|
672
678
|
justify-content: center;
|
|
@@ -675,7 +681,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
675
681
|
line-height: 0;
|
|
676
682
|
margin-right: ${({$position:e})=>e==="start"?"8px":"0"};
|
|
677
683
|
margin-left: ${({$position:e})=>e==="end"?"8px":"0"};
|
|
678
|
-
`,
|
|
684
|
+
`,fr=Lt.button`
|
|
679
685
|
background: none;
|
|
680
686
|
border: none;
|
|
681
687
|
padding: 0;
|
|
@@ -697,7 +703,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
697
703
|
&:hover {
|
|
698
704
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
699
705
|
}
|
|
700
|
-
`,
|
|
706
|
+
`,Vt=Lt.input`
|
|
701
707
|
flex: 1;
|
|
702
708
|
border: none;
|
|
703
709
|
outline: none;
|
|
@@ -731,7 +737,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
731
737
|
width: 0;
|
|
732
738
|
height: 0;
|
|
733
739
|
}
|
|
734
|
-
`,
|
|
740
|
+
`,mo=Lt.div`
|
|
735
741
|
display: flex;
|
|
736
742
|
align-items: center;
|
|
737
743
|
position: relative;
|
|
@@ -747,7 +753,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
747
753
|
&:hover {
|
|
748
754
|
border-color: ${({focused:e,disabled:o,status:r})=>o?t("colors.border","#d9d9d9"):r==="error"?t("colors.errorHover","#ff7875"):r==="warning"?t("colors.warningHover","#ffc53d"):e?t("components.input.activeBorderColor",t("colors.primary","#1890ff")):t("components.input.hoverBorderColor",t("colors.primary","#1890ff"))};
|
|
749
755
|
|
|
750
|
-
.compass-input-clear
|
|
756
|
+
.compass-input-field-clear[data-visible='true'] {
|
|
751
757
|
opacity: 1;
|
|
752
758
|
pointer-events: auto;
|
|
753
759
|
}
|
|
@@ -758,9 +764,9 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
758
764
|
cursor: not-allowed;
|
|
759
765
|
opacity: 0.6;
|
|
760
766
|
`}
|
|
761
|
-
`;var
|
|
767
|
+
`;var ma=gr(mo)`
|
|
762
768
|
padding-right: ${({size:e,controls:o})=>o?{small:"30px",medium:"34px",large:"38px"}[e||"medium"]:void 0};
|
|
763
|
-
`,
|
|
769
|
+
`,ua=gr.div`
|
|
764
770
|
display: flex;
|
|
765
771
|
flex-direction: column;
|
|
766
772
|
position: absolute;
|
|
@@ -793,7 +799,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
793
799
|
.compass-input-number:focus-within & {
|
|
794
800
|
border-left-color: ${t("components.input.activeBorderColor",t("colors.primary","#40a9ff"))};
|
|
795
801
|
}
|
|
796
|
-
`,
|
|
802
|
+
`,hr=gr.button`
|
|
797
803
|
display: flex;
|
|
798
804
|
align-items: center;
|
|
799
805
|
justify-content: center;
|
|
@@ -833,13 +839,13 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
833
839
|
width: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
834
840
|
height: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
835
841
|
}
|
|
836
|
-
`;import{jsx as Be,jsxs as
|
|
842
|
+
`;import{jsx as Be,jsxs as fa}from"react/jsx-runtime";var ga=br.forwardRef((e,o)=>{let{value:r,defaultValue:s,onChange:n,min:a,max:i,step:l=1,precision:m,controls:d=!0,keyboard:p=!0,disabled:u,onBlur:y,onPressEnter:h,onFocus:b,prefix:w,suffix:g,size:f="medium",fullWidth:c=!1,className:P,style:S,status:C,classNames:F,styles:N,...M}=e,W=Ul(null);br.useImperativeHandle(o,()=>W.current);let[O,T]=uo(!1),R=r!==void 0,[k,v]=uo(s??null),$=R?r===void 0?null:r:k,z=br.useCallback(V=>V===null?"":m!==void 0?V.toFixed(m):String(V),[m]),[j,L]=uo(()=>z($)),[A,K]=uo($);$!==A&&!O&&(L(z($)),K($));let U=V=>{if(!V.trim())return null;let Y=parseFloat(V);return isNaN(Y)?null:Y},x=V=>{let Y=V;return a!==void 0&&Y<a&&(Y=a),i!==void 0&&Y>i&&(Y=i),Y},B=V=>{T(!0),b?.(V)},q=V=>{let Y=U(j);Y!==null&&(Y=x(Y)),R||v(Y),n?.(Y);let ue=z(Y);L(ue),K(Y),y?.(V),T(!1)},I=V=>{let Y=V.target.value.trim();if(/^-?(\d+(\.\d*)?)?$/.test(Y)||Y===""||Y==="-"){if(Y==="-"&&a!==void 0&&a>=0)return;let ne=U(Y);if(ne!==null&&i!==void 0&&ne>i)return;L(Y),R||v(ne),n?.(ne)}},oe=V=>{let Y=$??0,ue=V==="up"?l:-l,ne=Y+ue;m!==void 0?ne=parseFloat(ne.toFixed(m)):ne=parseFloat(ne.toFixed(10)),ne=x(ne),R||v(ne),n?.(ne),L(z(ne)),K(ne)},G=V=>{if(V.key==="Enter"){let Y=U(j);Y!==null&&(Y=x(Y)),R||v(Y),n?.(Y),L(z(Y)),K(Y),h?.(V)}p&&!u&&(V.key==="ArrowUp"?(V.preventDefault(),oe("up")):V.key==="ArrowDown"&&(V.preventDefault(),oe("down")))};return Be(Ot,{fullWidth:c,className:`compass-input-number ${P||""} ${F?.root||""}`,style:{...S,...N?.root},children:fa(ma,{disabled:u,focused:O,size:f,controls:d,status:C,className:`compass-input-number-wrapper compass-input-number--${f} ${F?.inputWrapper||""}`,style:N?.inputWrapper,children:[w&&Be(ct,{$position:"start",className:`compass-input-number-prefix ${F?.prefix||""}`,style:N?.prefix,children:w}),Be(Vt,{ref:W,type:"text",role:"spinbutton","aria-valuenow":$??void 0,"aria-valuemin":a,"aria-valuemax":i,inputMode:"decimal",value:j,onChange:I,onBlur:q,onFocus:B,onKeyDown:G,disabled:u,$size:f,className:`compass-input-number-input ${F?.input||""}`,style:N?.input,...M}),g&&Be(ct,{$position:"end",className:`compass-input-number-suffix ${F?.suffix||""}`,style:N?.suffix,children:g}),d&&!u&&fa(ua,{size:f,children:[Be(hr,{type:"button",disabled:i!==void 0&&$!==null&&$>=i,onClick:()=>oe("up"),onMouseDown:V=>V.preventDefault(),$size:f,className:`compass-input-number-handler-up ${F?.upHandler||""}`,style:N?.upHandler,children:Be("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:Be("path",{d:"M6 3l4 4H2z"})})}),Be(hr,{type:"button",disabled:a!==void 0&&$!==null&&$<=a,onClick:()=>oe("down"),onMouseDown:V=>V.preventDefault(),$size:f,className:`compass-input-number-handler-down ${F?.downHandler||""}`,style:N?.downHandler,children:Be("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:Be("path",{d:"M6 9l4-4H2z"})})})]})]})})});ga.displayName="InputNumber";var yr=ga;var xr=yr;import{useMemo as ql}from"react";var St="...",fo=(e,o)=>{let r=o-e+1;return Array.from({length:r},(s,n)=>n+e)},ha=({total:e,pageSize:o,siblingCount:r=1,current:s})=>ql(()=>{let a=Math.ceil(e/o),i=r+5;if(a<=i)return fo(1,a);let l=Math.max(s-r,1),m=Math.min(s+r,a),d=l>2,p=m<a-2,u=1,y=a;if(!d&&p){let h=3+2*r;return[...fo(1,h),St,a]}if(d&&!p){let h=3+2*r,b=fo(a-h+1,a);return[u,St,...b]}if(d&&p){let h=fo(l,m);return[u,St,...h,St,y]}return[]},[e,o,r,s])||[];import{createContext as Ql,useContext as Jl}from"react";var go=Ql({locale:void 0}),Ce=()=>Jl(go);var Xl={locale:"en-US",Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},DatePicker:{monthBeforeYear:!0,yearFormat:"yyyy",monthFormat:"MMM",quarterFormat:"yyyy-KQ",weekFormat:"yyyy-wo",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",timeSelect:"Select time",dateSelect:"Select date",weekSelect:"Select week",clear:"Clear",month:"Month",year:"Year",previousMonth:"Previous month",nextMonth:"Next month",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dayFormat:"d",dateFormat:"M/d/yyyy",dateTimeFormat:"M/d/yyyy HH:mm:ss",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century",shortWeekDays:["Mo","Tu","We","Th","Fr","Sa","Su"],weekDays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hour:"Hour",minute:"Minute",second:"Second",startDate:"Start date",endDate:"End date"},Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},ba=Xl;import{jsx as de,jsxs as Ct}from"react/jsx-runtime";var Zl=({current:e,defaultCurrent:o=1,total:r=0,pageSize:s,defaultPageSize:n=10,onChange:a,disabled:i,size:l="default",showSizeChanger:m,pageSizeOptions:d=[10,20,50,100],showQuickJumper:p,showTotal:u,simple:y,totalAlign:h="left",className:b,style:w,styles:g,classNames:f,...c})=>{let{locale:P}=Ce(),S=P?.Pagination||ba.Pagination,[C,F]=vr(e||o),[N,M]=vr(s||n),[W,O]=vr(String(C));Sr(()=>{e!==void 0&&(F(e),O(String(e)))},[e]),Sr(()=>{O(String(C))},[C]),Sr(()=>{s!==void 0&&M(s)},[s]);let T=Math.ceil(r/N),R=ha({current:C,total:r,pageSize:N,siblingCount:1}),k=x=>{if(i)return;let B=x;B<1&&(B=1),B>T&&(B=T),B!==C&&(e===void 0&&F(B),a?.(B,N))},v=x=>{let B=Number(x);M(B);let q=1;e===void 0&&F(q),a?.(q,B)},$=()=>{k(C-5)},z=()=>{k(C+5)},j=x=>{O(x===null?"":String(x))},L=()=>{let x=parseInt(W,10);isNaN(x)?x=C:(x<1&&(x=1),x>T&&(x=T)),k(x),O(String(x))},A=x=>{let B=x.target,q=parseInt(B.value,10);isNaN(q)?q=C:(q<1&&(q=1),q>T&&(q=T)),k(q),O(String(q)),B.blur()};if(r===0)return null;if(y)return Ct(lr,{className:`compass-pagination compass-pagination-simple ${b||""} ${f?.root||""}`,style:{...w,...g?.root},disabled:i,size:l,...c,"aria-label":"pagination",children:[de(lt,{disabled:C===1||i,onClick:()=>k(C-1),size:l,className:`compass-pagination-prev ${f?.item||""}`,style:g?.item,title:S.prev_page,children:de(at,{})}),Ct("li",{style:{margin:"0 8px",display:"flex",alignItems:"center"},children:[de(xr,{value:W?parseInt(W,10):null,onChange:j,onBlur:L,onPressEnter:A,size:l==="small"?"small":"medium",disabled:i,className:"compass-pagination-simple-input",min:1,max:T}),de("span",{style:{margin:"0 8px"},children:"/"}),T]}),de(lt,{disabled:C===T||i,onClick:()=>k(C+1),size:l,className:`compass-pagination-next ${f?.item||""}`,style:g?.item,title:S.next_page,children:de(st,{})})]});let K=R.map((x,B)=>{if(x===St){let q=B===1;return Ct(lt,{className:`compass-pagination-jump-placeholder ${f?.jumpItem||""}`,style:g?.jumpItem,size:l,disabled:i,title:q?S.prev_5:S.next_5,onClick:q?$:z,children:[de("div",{className:"compass-pagination-item-ellipsis",children:de(Vn,{})}),de("div",{className:"compass-pagination-item-link-icon",children:q?de(Je,{}):de(Xe,{})})]},`dots-${B}`)}return de(lt,{active:C===x,disabled:i,size:l,onClick:()=>k(Number(x)),className:`compass-pagination-item compass-pagination-item-${x} ${C===x?`compass-pagination-item-active ${f?.activeItem||""}`:""} ${f?.item||""}`,style:{...g?.item,...C===x?g?.activeItem:{}},children:x},x)}),U=()=>{if(!u)return null;let x=(C-1)*N+1,B=Math.min(C*N,r);return de("li",{className:`compass-pagination-total-text ${f?.total||""}`,style:{marginRight:h==="left"?8:0,marginLeft:h==="right"?8:0,...g?.total},children:u(r,[x,B])})};return Ct(lr,{className:`compass-pagination ${b||""} ${f?.root||""}`,style:{...w,...g?.root},disabled:i,size:l,...c,"aria-label":"pagination",children:[h==="left"&&U(),de(lt,{disabled:C===1||i,onClick:()=>k(C-1),size:l,className:`compass-pagination-prev ${f?.item||""}`,style:g?.item,title:S.prev_page,children:de(at,{})}),K,de(lt,{disabled:C===T||i,onClick:()=>k(C+1),size:l,className:`compass-pagination-next ${f?.item||""}`,style:g?.item,title:S.next_page,children:de(st,{})}),m&&de("li",{className:`compass-pagination-options ${f?.options||""}`,style:{marginLeft:16,...g?.options},children:de(po,{size:l==="small"?"small":"medium",value:String(N),onChange:v,disabled:i,styles:{root:{width:l==="small"?90:110}},children:d.map(x=>Ct(po.Option,{value:String(x),children:[x," ",S.items_per_page]},x))})}),h==="right"&&U(),p&&Ct("li",{className:`compass-pagination-options compass-pagination-quick-jumper ${f?.options||""}`,style:{marginLeft:16,display:"flex",alignItems:"center",...g?.options},children:[S.jump_to,de(xr,{size:l==="small"?"small":"medium",disabled:i,style:{width:50,margin:"0 8px"},min:1,max:T,onBlur:x=>{let B=parseInt(x.target.value,10);isNaN(B)||k(B),x.target.value=""},onPressEnter:x=>{let B=x.currentTarget,q=parseInt(B.value,10);isNaN(q)||(k(q),B.value="",B.blur())}})]})]})},ya=Zl;var Cr=ya;import Fe from"@emotion/styled";import{keyframes as ec}from"@emotion/react";var xa=Fe.div`
|
|
837
843
|
position: relative;
|
|
838
844
|
width: 100%;
|
|
839
845
|
overflow-x: auto;
|
|
840
846
|
border-radius: 8px;
|
|
841
847
|
border: ${({bordered:e})=>{let o=t("colors.border","#d9d9d9");return e?`1px solid ${o}`:"none"}};
|
|
842
|
-
`,
|
|
848
|
+
`,va=Fe.table`
|
|
843
849
|
width: ${({scrollX:e})=>e?typeof e=="number"?`${e}px`:e:"100%"};
|
|
844
850
|
min-width: 100%;
|
|
845
851
|
border-collapse: collapse;
|
|
@@ -847,10 +853,10 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
847
853
|
background-color: ${t("components.table.bodyBg",t("colors.background","#fff"))};
|
|
848
854
|
display: ${({scrollY:e})=>e?"flex":"table"};
|
|
849
855
|
flex-direction: column;
|
|
850
|
-
`,
|
|
856
|
+
`,Sa=Fe.thead`
|
|
851
857
|
background-color: ${t("components.table.headerBg",t("colors.backgroundSecondary","#fafafa"))};
|
|
852
858
|
${({scrollY:e})=>e?"flex: 0 0 auto;":""}
|
|
853
|
-
|
|
859
|
+
`,$r=Fe.tbody`
|
|
854
860
|
${({scrollY:e})=>e?`
|
|
855
861
|
display: block;
|
|
856
862
|
overflow-y: auto;
|
|
@@ -861,7 +867,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
861
867
|
& > tr:last-child > td {
|
|
862
868
|
border-bottom: none;
|
|
863
869
|
}
|
|
864
|
-
`,
|
|
870
|
+
`,ho=Fe.tr`
|
|
865
871
|
transition: background-color 0.2s;
|
|
866
872
|
${({scrollY:e})=>e?`
|
|
867
873
|
display: table;
|
|
@@ -875,7 +881,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
875
881
|
|
|
876
882
|
border-bottom: 1px solid
|
|
877
883
|
${t("components.table.borderColor",t("colors.border","#d9d9d9"))};
|
|
878
|
-
`,
|
|
884
|
+
`,kr=Fe.th`
|
|
879
885
|
padding: ${({size:e})=>e==="small"?"8px 8px":e==="large"?"16px 16px":"12px 16px"};
|
|
880
886
|
color: ${t("components.table.headerColor",t("colors.text","#333"))};
|
|
881
887
|
font-weight: 600;
|
|
@@ -889,7 +895,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
889
895
|
${e==="right"?"right: 0;":"left: 0;"}
|
|
890
896
|
box-shadow: ${e==="right"?"-2px 0 5px rgba(0,0,0,0.05)":"2px 0 5px rgba(0,0,0,0.05)"};
|
|
891
897
|
`:""}
|
|
892
|
-
`,
|
|
898
|
+
`,bo=Fe.td`
|
|
893
899
|
padding: ${({size:e})=>e==="small"?"8px 8px":e==="large"?"16px 16px":"12px 16px"};
|
|
894
900
|
color: ${t("components.table.color",t("colors.text","#333"))};
|
|
895
901
|
text-align: ${({align:e})=>e||"left"};
|
|
@@ -900,15 +906,15 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
900
906
|
${e==="right"?"right: 0;":"left: 0;"}
|
|
901
907
|
box-shadow: ${e==="right"?"-2px 0 5px rgba(0,0,0,0.05)":"2px 0 5px rgba(0,0,0,0.05)"};
|
|
902
908
|
`:""}
|
|
903
|
-
`,
|
|
909
|
+
`,Ca=Fe.div`
|
|
904
910
|
padding: 32px;
|
|
905
911
|
text-align: center;
|
|
906
912
|
color: ${t("colors.textSecondary","#999")};
|
|
907
|
-
|
|
913
|
+
`,$a=Fe.div`
|
|
908
914
|
display: flex;
|
|
909
915
|
justify-content: flex-end;
|
|
910
916
|
padding: 16px 0;
|
|
911
|
-
|
|
917
|
+
`,wr=Fe.div`
|
|
912
918
|
position: absolute;
|
|
913
919
|
top: 0;
|
|
914
920
|
left: 0;
|
|
@@ -923,11 +929,11 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
923
929
|
color: ${t("colors.primary","#1890ff")};
|
|
924
930
|
font-weight: 500;
|
|
925
931
|
max-height: 380px;
|
|
926
|
-
`,
|
|
932
|
+
`,tc=ec`
|
|
927
933
|
100% {
|
|
928
934
|
transform: rotate(360deg);
|
|
929
935
|
}
|
|
930
|
-
`,
|
|
936
|
+
`,Pr=Fe.div`
|
|
931
937
|
width: 32px;
|
|
932
938
|
height: 32px;
|
|
933
939
|
border-radius: 50%;
|
|
@@ -936,13 +942,13 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
936
942
|
no-repeat,
|
|
937
943
|
conic-gradient(#0000 30%, ${t("colors.primary","#1890ff")});
|
|
938
944
|
-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 4px), #000 0);
|
|
939
|
-
animation: ${
|
|
940
|
-
`;import{jsx as
|
|
945
|
+
animation: ${tc} 1s infinite linear;
|
|
946
|
+
`;import{jsx as me,jsxs as pt}from"react/jsx-runtime";function ka(e){let{dataSource:o=[],columns:r,rowKey:s="key",bordered:n=!1,size:a="medium",loading:i=!1,pagination:l,rowSelection:m,emptyText:d="No Data",scroll:p,onHeaderRow:u,onRow:y,loadingIndicator:h,className:b,style:w,styles:g,classNames:f}=e,[c,P]=oc(null),S=(v,$)=>typeof s=="function"?s(v):String(v[s])||$.toString(),C=v=>{if(m?.onChange)if(v.target.checked){let $=o.map((z,j)=>S(z,j));m.onChange($,o)}else m.onChange([],[])},F=(v,$)=>{if(!m?.onChange)return;let z=S(v,$),j=m.selectedRowKeys||[],L=j.includes(z),A=[];L?A=j.filter(U=>U!==z):A=[...j,z];let K=o.filter((U,x)=>A.includes(S(U,x)));m.onChange(A,K)},N=v=>{let $=r.find(z=>(z.key||z.dataIndex)===v);!$||!$.sorter||P(z=>z?.key===v?z.order==="ascend"?{key:v,order:"descend"}:null:{key:v,order:"ascend"})},M=rc(()=>{let v=[...o];if(c&&c.order){let $=r.find(z=>(z.key||z.dataIndex)===c.key);$?.sorter&&v.sort((z,j)=>{let L=$.sorter(z,j);return c.order==="ascend"?L:-L})}return v},[o,c,r]),W=o.length>0&&o.every((v,$)=>m?.selectedRowKeys?.includes(S(v,$))),O=(m?.selectedRowKeys?.length||0)>0&&!W,T=()=>me(Sa,{scrollY:p?.y,className:`compass-table-thead ${f?.thead||""}`,style:g?.thead,children:pt(ho,{scrollY:p?.y,className:`compass-table-row ${f?.tr||""}`,style:g?.tr,...u?u(r):{},children:[m&&me(kr,{size:a,width:50,className:`compass-table-cell compass-table-selection-column ${f?.th||""}`,style:g?.th,fixed:"left",children:me("input",{type:"checkbox",checked:W,ref:v=>{v&&(v.indeterminate=!!O)},onChange:C})}),r.map(v=>{let $=v.key||v.dataIndex,j=c?.key===$?c.order:null;return me(kr,{align:v.align,width:v.width,size:a,fixed:v.fixed,className:`compass-table-cell ${f?.th||""}`,style:{cursor:v.sorter?"pointer":"default",...g?.th},onClick:()=>N($),children:pt("div",{style:{display:"flex",alignItems:"center",justifyContent:v.align==="right"?"flex-end":v.align==="center"?"center":"flex-start"},children:[v.title,v.sorter&&pt("span",{style:{display:"inline-flex",flexDirection:"column",marginLeft:8,fontSize:10,lineHeight:.8,color:"#bfbfbf"},children:[me("span",{style:{color:j==="ascend"?"#1890ff":"inherit"},role:"img","aria-label":"caret-up",children:"\u25B2"}),me("span",{style:{color:j==="descend"?"#1890ff":"inherit"},role:"img","aria-label":"caret-down",children:"\u25BC"})]})]})},$)})]})}),R=()=>{if(M.length===0){let v=i&&o.length===0;return me($r,{className:`compass-table-tbody ${f?.tbody||""}`,style:g?.tbody,children:me(ho,{className:`compass-table-row ${f?.tr||""}`,style:g?.tr,children:me(bo,{colSpan:r.length+(m?1:0),className:`compass-table-cell ${f?.td||""}`,style:{...v?{textAlign:"center",padding:"32px"}:void 0,...g?.td},children:v?me(wr,{className:`compass-table-loading-overlay ${f?.loadingOverlay||""}`,style:{position:"static",background:"transparent",...g?.loadingOverlay},children:h||me(Pr,{})}):me(Ca,{className:`compass-table-empty ${f?.empty||""}`,style:g?.empty,children:d})})})})}return me($r,{scrollY:p?.y,className:`compass-table-tbody ${f?.tbody||""}`,style:g?.tbody,children:M.map((v,$)=>{let z=S(v,$),j=m?.selectedRowKeys?.includes(z);return pt(ho,{scrollY:p?.y,className:`compass-table-row ${f?.tr||""}`,style:g?.tr,...y?y(v,$):{},children:[m&&me(bo,{size:a,className:`compass-table-cell compass-table-selection-column ${f?.td||""}`,style:g?.td,fixed:"left",children:me("input",{type:"checkbox",checked:!!j,onChange:()=>F(v,$)})}),r.map(L=>{let A=L.key||L.dataIndex,K=L.dataIndex?v[L.dataIndex]:void 0;return me(bo,{align:L.align,size:a,fixed:L.fixed,className:`compass-table-cell ${f?.td||""}`,style:g?.td,children:L.render?L.render(K,v,$):K},A)})]},z)})})},k=["compass-table",a&&`compass-table--${a}`,n&&"compass-table--bordered"].filter(Boolean).join(" ");return pt("div",{children:[pt(xa,{bordered:n,className:`${k} ${b||""} ${f?.root||""}`,style:{...w,...g?.root},children:[pt(va,{className:`compass-table-container ${f?.table||""}`,scrollY:p?.y,scrollX:p?.x,style:g?.table,children:[T(),R()]}),i&&o.length>0&&me(wr,{className:`compass-table-loading-overlay ${f?.loadingOverlay||""}`,style:g?.loadingOverlay,children:h||me(Pr,{})})]}),l&&me($a,{className:`compass-table-pagination ${f?.pagination||""}`,style:g?.pagination,children:me(Cr,{...l})})]})}import{useState as Mr,useMemo as Ha}from"react";import{List as nc}from"react-window";import Ze from"@emotion/styled";import{css as wa}from"@emotion/react";var Pa=Ze.div`
|
|
941
947
|
position: relative;
|
|
942
948
|
font-size: ${t("components.tree.fontSize","14px")};
|
|
943
949
|
line-height: 1.5;
|
|
944
950
|
color: ${t("components.tree.nodeColor","rgba(0, 0, 0, 0.88)")};
|
|
945
|
-
`,
|
|
951
|
+
`,Ta=Ze.div`
|
|
946
952
|
display: flex;
|
|
947
953
|
align-items: center;
|
|
948
954
|
padding: 0 4px;
|
|
@@ -958,14 +964,14 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
958
964
|
background-color: ${({selected:e})=>e?t("components.tree.nodeSelectedBg","#e6f7ff"):t("components.tree.nodeHoverBg","#f5f5f5")};
|
|
959
965
|
}
|
|
960
966
|
|
|
961
|
-
${({disabled:e})=>e
|
|
967
|
+
${({disabled:e})=>e&&wa`
|
|
962
968
|
cursor: not-allowed;
|
|
963
969
|
opacity: 0.5;
|
|
964
970
|
&:hover {
|
|
965
971
|
background-color: transparent;
|
|
966
972
|
}
|
|
967
973
|
`}
|
|
968
|
-
`,
|
|
974
|
+
`,yo=Ze.span`
|
|
969
975
|
font-size: 12px;
|
|
970
976
|
display: flex;
|
|
971
977
|
align-items: center;
|
|
@@ -996,14 +1002,14 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
996
1002
|
color: inherit;
|
|
997
1003
|
}
|
|
998
1004
|
}
|
|
999
|
-
`,
|
|
1005
|
+
`,Ma=Ze.span`
|
|
1000
1006
|
align-self: stretch;
|
|
1001
1007
|
width: ${t("components.tree.indentSize","24px")};
|
|
1002
1008
|
display: inline-block;
|
|
1003
1009
|
flex-shrink: 0;
|
|
1004
1010
|
position: relative;
|
|
1005
1011
|
|
|
1006
|
-
${({active:e})=>e
|
|
1012
|
+
${({active:e})=>e&&wa`
|
|
1007
1013
|
&::before {
|
|
1008
1014
|
content: '';
|
|
1009
1015
|
position: absolute;
|
|
@@ -1014,39 +1020,39 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1014
1020
|
transform: translateX(-50%);
|
|
1015
1021
|
}
|
|
1016
1022
|
`}
|
|
1017
|
-
`,
|
|
1023
|
+
`,Ra=Ze.span`
|
|
1018
1024
|
margin-right: 8px;
|
|
1019
1025
|
display: flex;
|
|
1020
1026
|
align-items: center;
|
|
1021
|
-
`,
|
|
1027
|
+
`,Ia=Ze.div`
|
|
1022
1028
|
display: flex;
|
|
1023
1029
|
align-items: center;
|
|
1024
1030
|
flex: 1;
|
|
1025
1031
|
min-width: 0;
|
|
1026
|
-
`,
|
|
1032
|
+
`,Fa=Ze.div`
|
|
1027
1033
|
flex: 1;
|
|
1028
1034
|
min-width: 0;
|
|
1029
1035
|
white-space: nowrap;
|
|
1030
1036
|
overflow: hidden;
|
|
1031
1037
|
text-overflow: ellipsis;
|
|
1032
|
-
`,
|
|
1038
|
+
`,Na=Ze.span`
|
|
1033
1039
|
display: inline-flex;
|
|
1034
1040
|
align-items: center;
|
|
1035
1041
|
justify-content: center;
|
|
1036
1042
|
width: 16px;
|
|
1037
1043
|
height: 16px;
|
|
1038
1044
|
margin-right: 4px;
|
|
1039
|
-
`;import{jsx as
|
|
1045
|
+
`;import{jsx as $e,jsxs as Da}from"react/jsx-runtime";var Tr=({level:e=0,expanded:o,selected:r,checked:s,halfChecked:n,disabled:a,title:i,icon:l,isLeaf:m,checkable:d,selectable:p,onExpand:u,onSelect:y,onCheck:h,className:b,style:w,switcherIcon:g,showLine:f,showIcon:c,indentLines:P=[],styles:S,classNames:C})=>{let F=T=>{T.stopPropagation(),!m&&u&&u(T)},N=T=>{T.stopPropagation(),!a&&(p!==!1?y&&y(T):!m&&u&&u(T))},M=T=>{T.stopPropagation(),!a&&d!==!1&&h&&h(T)},W=()=>typeof g=="function"?g({expanded:!!o}):f?m?$e(Kn,{}):o?$e(An,{}):$e(Wn,{}):g||$e(Hn,{}),O=typeof g!="function";return Da(Ta,{level:f?0:e,selected:r,disabled:a,className:`compass-tree-node ${r?"compass-tree-node--selected":""} ${a?"compass-tree-node--disabled":""} ${m?"compass-tree-node--leaf":""} ${C?.node||""} ${b||""}`,style:{...w,...S?.node},onClick:N,showLine:f,children:[f&&P.map((T,R)=>$e(Ma,{active:T,className:"compass-tree-indent"},R)),m?f?$e(yo,{className:`compass-tree-switcher compass-tree-switcher--leaf ${C?.switcher||""}`,showLine:f,style:S?.switcher,children:W()}):$e(yo,{className:`compass-tree-switcher compass-tree-switcher--noop ${C?.switcher||""}`,showLine:f,style:S?.switcher,children:$e("span",{style:{width:"16px",display:"inline-block"}})}):$e(yo,{expanded:O?o:void 0,onClick:F,className:`compass-tree-switcher ${C?.switcher||""}`,style:S?.switcher,showLine:f,children:W()}),d&&$e(Ra,{onClick:M,className:`compass-tree-checkbox ${C?.checkbox||""}`,style:S?.checkbox,children:$e("input",{type:"checkbox",checked:s,disabled:a,ref:T=>{T&&(T.indeterminate=!!n)},readOnly:!0})}),Da(Ia,{className:`compass-tree-content ${C?.content||""}`,style:S?.content,children:[c&&l&&$e(Na,{className:`compass-tree-icon ${C?.icon||""}`,style:S?.icon,children:l}),$e(Fa,{className:`compass-tree-title ${C?.title||""}`,style:S?.title,children:i})]})]})};function Ea(e=[],o=[]){let r=new Set(o),s=[];function n(a,i=null,l=0,m="0"){return a.map((d,p)=>{let u=`${m}-${p}`,y={...d,parent:i,children:[],pos:u,data:d,level:l,key:d.key,title:d.title};return s.push(y),r.has(d.key)?y.children=n(d.children||[],y,l+1,u):y.children=[],y})}return n(e),s}function za(e,o,r){let s=[];return e.forEach((n,a)=>{let{key:i,children:l}=n,m=o?`${o.pos}-${a}`:`${a}`,d={node:n,index:a,key:i,pos:m,parent:o||void 0};r.keyEntities[i]=d,s.push(d),l&&(d.children=za(l,d,r))}),s}function xo(e){let o={};return za(e,null,{keyEntities:o}),{keyEntities:o}}function Ba(e,o,r,s){let n=new Set(r),a=s[e];if(!a)return{checkedKeys:Array.from(n)};function i(m){o?n.add(m.key):n.delete(m.key),m.children&&m.children.forEach(d=>i(d))}i(a);let l=a.parent;for(;l;)l.children&&(l.children.every(d=>n.has(d.key))?n.add(l.key):n.delete(l.key)),l=l.parent;return{checkedKeys:Array.from(n)}}import{jsx as Wt}from"react/jsx-runtime";var ac=({treeData:e=[],checkable:o=!1,selectable:r=!0,showLine:s=!1,showIcon:n=!1,defaultExpandedKeys:a=[],expandedKeys:i,onExpand:l,defaultSelectedKeys:m=[],selectedKeys:d,onSelect:p,defaultCheckedKeys:u=[],checkedKeys:y,onCheck:h,height:b,itemHeight:w=28,virtual:g=!1,switcherIcon:f,titleRender:c,expandOnClick:P,className:S,style:C,styles:F,classNames:N})=>{let[M,W]=Mr(i||a),[O,T]=Mr(d||m),[R,k]=Mr(y||u),v=i||M,$=d||O,z=y||R,{keyEntities:j}=Ha(()=>xo(e),[e]),L=Ha(()=>Ea(e,v),[e,v]),A=(I,oe)=>{let G=v.includes(I)?v.filter(V=>V!==I):[...v,I];i||W(G),l&&l(G,{node:oe,expanded:!v.includes(I)})},K=(I,oe,G)=>{let V=[I];d||T(V),p&&p(V,{node:oe,selected:!0,event:G}),P&&!oe.isLeaf&&A(I,oe)},U=(I,oe,G)=>{let V=!z.includes(I),{checkedKeys:Y}=Ba(I,V,z,j);y||k(Y),h&&h(Y,{node:oe,checked:V,event:G})},x=I=>{if(!I.parent){let G=e;return G[G.length-1].key===I.key}let oe=I.parent.children;return oe[oe.length-1].key===I.key},B=({index:I,style:oe})=>{let G=L[I];if(!G)return Wt("div",{style:oe});let V=[],Y=G.parent;for(;Y;)V.unshift(!x(Y)),Y=Y.parent;return Wt(Tr,{eventKey:G.key,title:c?c(G.data):G.title,level:G.level,expanded:v.includes(G.key),selected:$.includes(G.key),checked:z.includes(G.key),isLeaf:G.isLeaf||!G.data.children||G.data.children.length===0,checkable:o,selectable:G.data.selectable??r,disabled:G.disabled,icon:G.icon,style:oe,onExpand:()=>A(G.key,G.data),onSelect:ue=>K(G.key,G.data,ue),onCheck:ue=>U(G.key,G.data,ue),switcherIcon:f,showLine:s,showIcon:n,indentLines:V,styles:F,classNames:N},G.key)},q=()=>g&&b?Wt(nc,{defaultHeight:b,rowCount:L.length,rowHeight:w,rowComponent:B,rowProps:{},style:{width:"100%",height:b}}):L.map(I=>{let oe=[],G=I.parent;for(;G;)oe.unshift(!x(G)),G=G.parent;return Wt(Tr,{eventKey:I.key,title:c?c(I.data):I.title,level:I.level,expanded:v.includes(I.key),selected:$.includes(I.key),checked:z.includes(I.key),isLeaf:I.isLeaf||!I.data.children||I.data.children.length===0,checkable:o,selectable:I.data.selectable??r,disabled:I.disabled,icon:I.icon,onExpand:()=>A(I.key,I.data),onSelect:V=>K(I.key,I.data,V),onCheck:V=>U(I.key,I.data,V),switcherIcon:f,showLine:s,showIcon:n,indentLines:oe,styles:F,classNames:N},I.key)});return Wt(Pa,{className:`compass-tree ${S||""} ${N?.root||""}`,style:{...C,...F?.root},children:q()})},La=ac;var Rr=La;import lc,{useState as Kt,useRef as qa,useMemo as Fr}from"react";import{useFloating as cc,autoUpdate as pc,offset as dc,flip as mc,shift as uc,useDismiss as fc,useRole as gc,useClick as hc,useInteractions as bc,FloatingPortal as yc,size as xc}from"@floating-ui/react";import we from"@emotion/styled";import{keyframes as sc}from"@emotion/react";var ic=sc`
|
|
1040
1046
|
from {
|
|
1041
1047
|
transform: rotate(0deg);
|
|
1042
1048
|
}
|
|
1043
1049
|
to {
|
|
1044
1050
|
transform: rotate(360deg);
|
|
1045
1051
|
}
|
|
1046
|
-
`,
|
|
1052
|
+
`,Oa=we.span`
|
|
1047
1053
|
display: inline-flex;
|
|
1048
|
-
animation: ${
|
|
1049
|
-
`,
|
|
1054
|
+
animation: ${ic} 1s linear infinite;
|
|
1055
|
+
`,Va=we.div`
|
|
1050
1056
|
position: relative;
|
|
1051
1057
|
display: inline-flex;
|
|
1052
1058
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
@@ -1054,7 +1060,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1054
1060
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
1055
1061
|
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
1056
1062
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1057
|
-
`,
|
|
1063
|
+
`,Wa=we.div`
|
|
1058
1064
|
display: flex;
|
|
1059
1065
|
align-items: center;
|
|
1060
1066
|
justify-content: space-between;
|
|
@@ -1072,7 +1078,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1072
1078
|
&:hover {
|
|
1073
1079
|
border-color: ${({status:e})=>{if(!e)return t("components.select.hoverBorderColor",t("colors.primary","#1890ff"))}};
|
|
1074
1080
|
}
|
|
1075
|
-
`,
|
|
1081
|
+
`,Aa=we.div`
|
|
1076
1082
|
position: relative;
|
|
1077
1083
|
flex: 1;
|
|
1078
1084
|
overflow: hidden;
|
|
@@ -1084,9 +1090,9 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1084
1090
|
align-items: center;
|
|
1085
1091
|
gap: 4px;
|
|
1086
1092
|
min-height: ${({size:e})=>e==="small"?"20px":e==="large"?"26px":"24px"};
|
|
1087
|
-
`,
|
|
1093
|
+
`,At=we.span`
|
|
1088
1094
|
color: ${t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf"))};
|
|
1089
|
-
`,
|
|
1095
|
+
`,Ka=we.div`
|
|
1090
1096
|
padding: 4px 0;
|
|
1091
1097
|
background-color: ${t("colors.background","#fff")};
|
|
1092
1098
|
border-radius: ${t("borderRadius.md","4px")};
|
|
@@ -1098,7 +1104,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1098
1104
|
max-height: 256px;
|
|
1099
1105
|
overflow-y: auto;
|
|
1100
1106
|
min-width: 100%;
|
|
1101
|
-
`,
|
|
1107
|
+
`,Ya=we.span`
|
|
1102
1108
|
display: inline-flex;
|
|
1103
1109
|
align-items: center;
|
|
1104
1110
|
height: 24px;
|
|
@@ -1119,7 +1125,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1119
1125
|
align-items: center;
|
|
1120
1126
|
height: 100%;
|
|
1121
1127
|
}
|
|
1122
|
-
`,
|
|
1128
|
+
`,_a=we.span`
|
|
1123
1129
|
margin-left: 4px;
|
|
1124
1130
|
cursor: pointer;
|
|
1125
1131
|
font-size: 12px;
|
|
@@ -1136,13 +1142,13 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1136
1142
|
&:hover {
|
|
1137
1143
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1138
1144
|
}
|
|
1139
|
-
`,
|
|
1145
|
+
`,ja=we.span`
|
|
1140
1146
|
display: flex;
|
|
1141
1147
|
align-items: center;
|
|
1142
1148
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.25)")};
|
|
1143
1149
|
font-size: 12px;
|
|
1144
1150
|
line-height: 0;
|
|
1145
|
-
`,
|
|
1151
|
+
`,Ir=we.input`
|
|
1146
1152
|
margin: 0;
|
|
1147
1153
|
padding: 0;
|
|
1148
1154
|
background: transparent;
|
|
@@ -1156,10 +1162,10 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1156
1162
|
margin-top: 1px;
|
|
1157
1163
|
margin-bottom: 1px;
|
|
1158
1164
|
min-width: 4px;
|
|
1159
|
-
`,
|
|
1165
|
+
`,Ga=we.div`
|
|
1160
1166
|
display: inline-block;
|
|
1161
1167
|
max-width: 100%;
|
|
1162
|
-
`,
|
|
1168
|
+
`,Ua=we.span`
|
|
1163
1169
|
position: absolute;
|
|
1164
1170
|
left: 0;
|
|
1165
1171
|
top: 50%;
|
|
@@ -1169,10 +1175,10 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1169
1175
|
overflow: hidden;
|
|
1170
1176
|
text-overflow: ellipsis;
|
|
1171
1177
|
color: ${({$isOpen:e})=>e?t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf")):"inherit"};
|
|
1172
|
-
`;import{Fragment as
|
|
1178
|
+
`;import{Fragment as Qa,jsx as se,jsxs as dt}from"react/jsx-runtime";var vc=e=>{let{treeData:o=[],value:r,defaultValue:s,onChange:n,disabled:a,loading:i,allowClear:l,placeholder:m,className:d,style:p,multiple:u=!1,treeCheckable:y=!1,treeDefaultExpandedKeys:h=[],size:b="medium",status:w,dropdownStyle:g,dropdownClassName:f,showSearch:c=!1,titleRender:P,switcherIcon:S}=e,[C,F]=Kt(s||(u||y?[]:"")),N=r!==void 0,M=N?r:C,[W,O]=Kt(!1),[T,R]=Kt(""),[k,v]=Kt(""),$=qa(!1),z=qa(null),[j,L]=Kt(h||[]),{keyEntities:A}=Fr(()=>xo(o),[o]),K=Fr(()=>{if(!e.onlyLeafSelect)return o;let _=Z=>Z.map(re=>{let E=re.children&&re.children.length>0;return re.isLeaf===!0||!E?re:{...re,selectable:!1,children:re.children?_(re.children):void 0}});return _(o)},[o,e.onlyLeafSelect]),{x:U,y:x,refs:B,floatingStyles:q,context:I}=cc({open:W,onOpenChange:_=>{a||!_&&(k||T)||(O(_),_?setTimeout(()=>{c&&z.current?.focus()},0):(R(""),v("")))},placement:"bottom-start",middleware:[dc(4),mc(),uc(),xc({apply({rects:_,elements:Z}){Object.assign(Z.floating.style,{minWidth:`${_.reference.width}px`})}})],whileElementsMounted:pc}),oe=hc(I,{enabled:!0,keyboardHandlers:!1}),G=fc(I,{escapeKey:!0,outsidePress:!0}),V=gc(I,{role:"listbox"}),{getReferenceProps:Y,getFloatingProps:ue}=bc([oe,G,V]),ne=_=>{let Z=A[_];return Z?Z.node.title:_},Re=(_,Z,re)=>{N||F(_),n&&n(_,Z,re)},Ye=(_,Z)=>{let{node:re,selected:E}=Z,X=re.key;if(!y)if(u){let te=Array.isArray(M)?M:[],he=E?[...te,X]:te.filter(fe=>fe!==X),pe=he.map(fe=>ne(fe));Re(he,pe,{triggerNode:re,...Z}),R(""),v(""),c&&z.current?.focus()}else Re(X,re.title,{triggerNode:re,...Z}),O(!1),O(!1),R(""),v("")},nt=(_,Z)=>{if(!y)return;let re=_.map(E=>ne(E));Re(_,re,Z)},Ve=(_,Z)=>{Z.stopPropagation();let E=(Array.isArray(M)?M:[]).filter(te=>te!==_),X=E.map(te=>ne(te));Re(E,X)},Q=_=>{_.stopPropagation(),Re(u||y?[]:void 0,u||y?[]:void 0)},H=()=>{$.current=!0},ee=_=>{let Z=_.currentTarget.value;v(Z),R(Z),$.current=!1},Ie=_=>{let Z=_.target.value;v(Z),$.current||R(Z),W||O(!0)},_e=()=>{if(u||y){let _=Array.isArray(M)?M:[];return dt(Qa,{children:[_.map(Z=>dt(Ya,{children:[se("span",{children:ne(Z)}),se(_a,{onClick:re=>Ve(Z,re),children:se(Ee,{})})]},Z)),c&&se(Ga,{style:{width:k?"auto":"4px",minWidth:"50px",flex:1},children:se(Ir,{ref:z,value:k,onChange:Ie,onCompositionStart:H,onCompositionEnd:ee,disabled:a})}),_.length===0&&!k&&!c&&se(At,{children:m}),_.length===0&&!k&&c&&se(At,{style:{position:"absolute",left:0,pointerEvents:"none"},children:m})]})}return c?dt(Qa,{children:[M!==void 0&&M!==""&&M!==null?se(Ua,{$isOpen:W,style:{opacity:k?0:1,visibility:k?"hidden":"visible"},children:ne(M)}):se(At,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",opacity:k?0:1,visibility:k?"hidden":"visible"},children:m}),se(Ir,{ref:z,value:k,onChange:Ie,onCompositionStart:H,onCompositionEnd:ee,disabled:a,style:{opacity:W||k?1:0}})]}):M!==void 0&&M!==""&&M!==null?ne(M):se(At,{children:m})},je=l&&!a&&(Array.isArray(M)?M.length>0:M!==void 0&&M!==""&&M!==null),Et={treeData:K,selectable:!y&&(e.treeSelectable!==void 0?e.treeSelectable:!0),checkable:y,onSelect:Ye,onCheck:nt,defaultExpandedKeys:h,checkedKeys:y?Array.isArray(M)?M:[]:void 0,selectedKeys:y?[]:Array.isArray(M)?M:M?[M]:[],titleRender:_=>{if(P)return P(_,T);let{treeSelectedIcon:Z}=e,re=_.title,E=re;if(T&&re&&String(re).toLowerCase().includes(T.toLowerCase())){let te=re.toLowerCase().indexOf(T.toLowerCase()),he=re.substring(0,te),pe=re.substring(te,te+T.length),fe=re.substring(te+T.length);E=dt("span",{children:[he,se("span",{style:{color:"#1677ff"},children:pe}),fe]})}return(Array.isArray(M)?M.includes(_.key):M===_.key)&&Z?dt("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[se("span",{children:E}),se("span",{style:{display:"flex",alignItems:"center"},children:Z})]}):E},switcherIcon:S},{filteredTreeData:ht,expandedKeysForSearch:Ge}=Fr(()=>{if(!T)return{filteredTreeData:K,expandedKeysForSearch:[]};let _=[],Z=(X,te=[])=>{let he=[];return X.forEach(pe=>{let fe=pe.title;if(fe&&String(fe).toLowerCase().includes(T.toLowerCase()))_.push(...te),he.push(pe);else if(pe.children){let ro=Z(pe.children,[...te,pe.key]);ro.length&&(_.push(pe.key),he.push({...pe,children:ro}))}}),he},re=Z(K),E=Array.from(new Set(_));return{filteredTreeData:re,expandedKeysForSearch:E}},[K,T]);return lc.useEffect(()=>{T&&L(_=>{let Z=new Set([..._,...Ge]);return Array.from(Z)})},[T,Ge]),dt(Va,{ref:B.setReference,fullWidth:!0,disabled:a,className:`compass-tree-select ${d||""} ${W?"compass-tree-select-open":""} ${a?"compass-tree-select-disabled":""}`,style:p,...Y({onClick:()=>{c&&z.current?.focus()}}),children:[dt(Wa,{size:b,active:W,status:w,children:[se(Aa,{size:b,children:_e()}),se(ja,{children:i?se(Oa,{children:se(vt,{})}):je?se("span",{onClick:Q,style:{cursor:"pointer"},children:se(ze,{})}):c&&W?se(ao,{}):se(lo,{})})]}),W&&se(yc,{children:se(Ka,{ref:B.setFloating,style:{...g,...q,opacity:U===null||x===null?0:1,visibility:U===null||x===null?"hidden":"visible"},className:`compass-tree-select-dropdown ${f||""}`,...ue(),children:ht.length>0?se(Rr,{...Et,treeData:ht,expandedKeys:j,onExpand:_=>{L(_)}}):se("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})})})]})},Ja=vc;var Sc=Ja;import ls,{useState as wc}from"react";import{useFloating as Pc,autoUpdate as Tc,offset as Mc,flip as Rc,shift as Ic,useDismiss as Fc,useRole as Nc,useClick as Dc,useHover as Ec,useInteractions as zc,FloatingPortal as Bc,useMergeRefs as Hc}from"@floating-ui/react";import Xa from"@emotion/styled";var Eg=Xa.div`
|
|
1173
1179
|
display: inline-block;
|
|
1174
1180
|
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1175
|
-
`,
|
|
1181
|
+
`,Za=Xa.div`
|
|
1176
1182
|
min-width: 120px;
|
|
1177
1183
|
padding: ${t("components.dropdown.padding","4px")};
|
|
1178
1184
|
background-color: ${t("components.dropdown.backgroundColor",t("colors.background","#ffffff"))};
|
|
@@ -1189,11 +1195,11 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1189
1195
|
.compass-dropdown-content {
|
|
1190
1196
|
width: 100%;
|
|
1191
1197
|
}
|
|
1192
|
-
`;import
|
|
1198
|
+
`;import $c,{useContext as rs,forwardRef as ns}from"react";import Nr from"@emotion/styled";var es=Nr.ul`
|
|
1193
1199
|
margin: 0;
|
|
1194
1200
|
padding: 0;
|
|
1195
1201
|
list-style: none;
|
|
1196
|
-
`,
|
|
1202
|
+
`,ts=Nr.li`
|
|
1197
1203
|
display: flex;
|
|
1198
1204
|
align-items: center;
|
|
1199
1205
|
margin: 0;
|
|
@@ -1210,15 +1216,15 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1210
1216
|
&:hover {
|
|
1211
1217
|
background-color: ${({$disabled:e,$danger:o,$selected:r})=>e?"transparent":o?"#fff2f0":r?t("components.menu.itemSelectedBg","#e6f7ff"):t("components.menu.itemHoverBg","#f5f5f5")};
|
|
1212
1218
|
}
|
|
1213
|
-
`,
|
|
1219
|
+
`,os=Nr.span`
|
|
1214
1220
|
margin-right: 8px;
|
|
1215
1221
|
display: inline-flex;
|
|
1216
1222
|
align-items: center;
|
|
1217
|
-
`;import{createContext as
|
|
1223
|
+
`;import{createContext as Cc}from"react";var $t=Cc({});import{jsx as Yt,jsxs as kc}from"react/jsx-runtime";var as=ns((e,o)=>{let{children:r,items:s,onClick:n,selectedKeys:a,defaultSelectedKeys:i=[],onSelect:l,className:m,style:d,styles:p,classNames:u,...y}=e,h=rs($t),[b,w]=$c.useState(i),g=a??b,f=(c,P)=>{n?.(c,P),h.onItemClick?.(c,P),P!==void 0&&(a===void 0&&w([P]),l?.([P]))};return Yt($t.Provider,{value:{onItemClick:f,selectedKeys:g,styles:p,classNames:u},children:Yt(es,{ref:o,className:`compass-menu ${m||""} ${u?.root||""}`,style:{...d,...p?.root},role:"menu",...y,children:s?s.map(c=>Yt(Dr,{eventKey:c.key,onClick:c.onClick,disabled:c.disabled,danger:c.danger,icon:c.icon,className:c.className,style:c.style,children:c.label},c.key)):r})})}),Dr=ns((e,o)=>{let{children:r,onClick:s,disabled:n,icon:a,danger:i,eventKey:l,className:m,style:d,...p}=e,u=rs($t),y=l!==void 0&&u.selectedKeys?.includes(l),h=b=>{n||(s?.(b),u.onItemClick?.(b,l))};return kc(ts,{ref:o,className:`compass-menu-item ${n?"compass-menu-item--disabled":""} ${i?"compass-menu-item--danger":""} ${y?"compass-menu-item--selected":""} ${u.classNames?.item||""} ${m||""}`,style:{...u.styles?.item,...d},onClick:h,$disabled:n,$danger:i,$selected:y,role:"menuitem","aria-disabled":n,"aria-selected":y,...p,children:[a&&Yt(os,{className:`compass-menu-item-icon ${u.classNames?.icon||""}`,style:u.styles?.icon,children:a}),Yt("span",{className:`compass-menu-item-content ${u.classNames?.content||""}`,style:u.styles?.content,children:r})]})});Dr.displayName="MenuItem";as.displayName="Menu";var ss=as;ss.Item=Dr;var is=ss;var Er=is;import{Fragment as Lc,jsx as _t,jsxs as Oc}from"react/jsx-runtime";var cs=({children:e,overlay:o,menu:r,trigger:s="hover",placement:n="bottom-start",visible:a,onVisibleChange:i,disabled:l,closeOnSelect:m=!0,className:d,style:p,overlayClassName:u,overlayStyle:y,classNames:h,styles:b})=>{let[w,g]=wc(!1),f=a!==void 0,c=f?a:w,P=U=>{l||(f||g(U),i?.(U))},{refs:S,floatingStyles:C,context:F}=Pc({open:c,onOpenChange:P,placement:n,middleware:[Mc(4),Rc(),Ic()],whileElementsMounted:Tc}),N=Ec(F,{enabled:s==="hover",delay:{open:0,close:100}}),M=Dc(F,{enabled:s==="click"}),W=Fc(F),O=Nc(F),{getReferenceProps:T,getFloatingProps:R}=zc([N,M,W,O]),k=ls.Children.only(e),v=k.ref,$=Hc([S.setReference,v]),z=()=>{m&&P(!1)},j=o||(r?_t(Er,{...r}):null),L=["compass-dropdown-trigger",d,h?.trigger,k.props.className].filter(Boolean).join(" "),A=["compass-dropdown",u,h?.overlay].filter(Boolean).join(" "),K=ls.cloneElement(k,{...T(k.props),className:L,style:{...k.props.style,...p,...b?.trigger},ref:$});return j?Oc(Lc,{children:[K,c&&_t(Bc,{children:_t(Za,{ref:S.setFloating,style:{...C,...y,...b?.overlay},className:A,...R(),children:_t($t.Provider,{value:{onItemClick:z},children:_t("div",{className:`compass-dropdown-content ${h?.content||""}`,style:b?.content,children:j})})})})]}):K};cs.displayName="Dropdown";var ps=cs;var Vc=ps;import ds,{useState as zr,useRef as Wc}from"react";import{jsx as He,jsxs as Ac}from"react/jsx-runtime";var ms=ds.forwardRef((e,o)=>{let{type:r="text",fullWidth:s=!1,prefix:n,suffix:a,size:i="medium",allowClear:l,className:m,style:d,disabled:p,value:u,defaultValue:y,onChange:h,onFocus:b,onBlur:w,onPressEnter:g,onKeyDown:f,status:c,classNames:P,styles:S,...C}=e,F=Wc(null);ds.useImperativeHandle(o,()=>F.current);let[N,M]=zr(!1),[W,O]=zr(!1),[T,R]=zr(y||""),k=u!==void 0,v=k?u:T,$=I=>{M(!0),b?.(I)},z=I=>{M(!1),w?.(I)},j=I=>{k||R(I.target.value),h?.(I)},L=I=>{I.key==="Enter"&&g?.(I),f?.(I)},A=I=>{I.preventDefault(),I.stopPropagation();let oe={target:{value:""},currentTarget:{value:""}};k||R(""),h?.(oe),F.current?.focus()},K=I=>{I.preventDefault(),I.stopPropagation(),O(!W),F.current?.focus()},U=l&&!p&&v&&String(v).length>0,x=r==="password"&&W?"text":r,B=n,q=a;return r==="password"?q=He(fr,{type:"button",visible:!0,className:`compass-input-field-clear ${P?.clear||""}`,style:{marginLeft:8,...S?.clear},onClick:K,tabIndex:-1,children:W?He(Ln,{}):He(On,{})}):r==="search"&&!a&&(q=He(ao,{})),He(Ot,{fullWidth:s,className:`compass-input-field ${m||""} ${P?.root||""}`,style:{...d,...S?.root},children:Ac(mo,{disabled:p,focused:N,size:i,status:c,className:`compass-input-field-wrapper compass-input-field--${i}${c?` compass-input-field--${c}`:""}`,children:[B&&He(ct,{$position:"start",className:`compass-input-field-prefix ${P?.prefix||""}`,style:S?.prefix,children:B}),He(Vt,{ref:F,type:x,disabled:p,value:v,onChange:j,onFocus:$,onBlur:z,onKeyDown:L,$size:i,className:`compass-input-field-input ${P?.input||""}`,style:S?.input,...C}),l&&!p&&He(fr,{type:"button",className:`compass-input-field-clear ${P?.clear||""}`,style:S?.clear,visible:!!U,$isHoverShow:!0,"data-visible":!!U,onClick:A,tabIndex:-1,children:He(ze,{})}),q&&He(ct,{$position:"end",className:`compass-input-field-suffix ${P?.suffix||""}`,style:S?.suffix,children:q})]})})});ms.displayName="InputField";var us=ms;var jt=us;import{useState as Br,useMemo as Kc,useCallback as Ut}from"react";import{useFloating as Yc,autoUpdate as _c,offset as jc,flip as Gc,shift as Uc,useDismiss as qc,useRole as Qc,useInteractions as Jc,FloatingPortal as Xc,size as Zc}from"@floating-ui/react";import Gt from"@emotion/styled";var fs=Gt.div`
|
|
1218
1224
|
position: relative;
|
|
1219
1225
|
display: inline-block;
|
|
1220
1226
|
width: ${e=>e.fullWidth?"100%":"auto"};
|
|
1221
|
-
`,
|
|
1227
|
+
`,gs=Gt.div`
|
|
1222
1228
|
position: absolute;
|
|
1223
1229
|
top: 100%;
|
|
1224
1230
|
left: 0;
|
|
@@ -1232,7 +1238,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1232
1238
|
border-radius: ${t("components.select.borderRadius",t("borderRadius.md","4px"))};
|
|
1233
1239
|
box-shadow: ${t("components.dropdown.boxShadow",t("shadows.lg","0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)"))};
|
|
1234
1240
|
outline: none;
|
|
1235
|
-
`,
|
|
1241
|
+
`,hs=Gt.div`
|
|
1236
1242
|
position: relative;
|
|
1237
1243
|
padding: 8px 12px;
|
|
1238
1244
|
word-break: break-word;
|
|
@@ -1245,21 +1251,21 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1245
1251
|
&:hover {
|
|
1246
1252
|
background-color: ${t("components.select.optionHoverBg","#f5f5f5")};
|
|
1247
1253
|
}
|
|
1248
|
-
`,
|
|
1254
|
+
`,bs=Gt.div`
|
|
1249
1255
|
padding: 8px 12px;
|
|
1250
1256
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1251
1257
|
text-align: center;
|
|
1252
|
-
`,
|
|
1258
|
+
`,ys=Gt.span`
|
|
1253
1259
|
color: ${t("colors.primary","#1890ff")};
|
|
1254
1260
|
font-weight: 500;
|
|
1255
|
-
`;import{Fragment as
|
|
1261
|
+
`;import{Fragment as xs,jsx as We,jsxs as ap}from"react/jsx-runtime";function ep(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var tp=({text:e,searchValue:o})=>{if(!o)return We(xs,{children:e});let r=e.split(new RegExp(`(${ep(o)})`,"gi"));return We(xs,{children:r.map((s,n)=>s.toLowerCase()===o.toLowerCase()?We(ys,{children:s},n):s)})};function op(e,o){let[r,s]=Br(o||""),n=e!==void 0;return{currentValue:n?e:r,setInternalValue:s,isControlled:n}}function rp(e,o,r){return Kc(()=>{if(!o)return e;if(typeof o=="function")return e.filter(n=>o(r||"",n));if(!r)return e;let s=r.toLowerCase();return e.filter(n=>{let a=n.label?String(n.label):"",i=String(n.value);return a.toLowerCase().includes(s)||i.toLowerCase().includes(s)})},[e,o,r])}var np=e=>{let{value:o,defaultValue:r,options:s=[],onSearch:n,onSelect:a,onChange:i,filterOption:l=!0,dropdownMatchSelectWidth:m=!0,notFoundContent:d,fullWidth:p,style:u,className:y,classNames:h,styles:b,...w}=e,{currentValue:g,setInternalValue:f,isControlled:c}=op(o,r),[P,S]=Br(!1),[C,F]=Br(-1),N=rp(s,l,g),{refs:M,strategy:W,context:O,floatingStyles:T}=Yc({open:P,onOpenChange:S,placement:"bottom-start",middleware:[jc(4),Gc(),Uc(),Zc({apply({rects:x,elements:B,availableHeight:q}){let I=m===!0?`${x.reference.width}px`:typeof m=="number"?`${m}px`:"";Object.assign(B.floating.style,{width:I,maxHeight:`${Math.min(q,256)}px`})}})],whileElementsMounted:_c}),R=qc(O),k=Qc(O,{role:"listbox"}),{getReferenceProps:v,getFloatingProps:$}=Jc([R,k]),z=Ut(x=>{let B=x.target.value;c||f(B),i?.(B),n?.(B),S(!0),F(-1)},[c,f,i,n,S,F]),j=Ut(x=>{c||f(x.value),i?.(x.value),a?.(x.value,x),S(!1)},[c,f,i,a,S]),L=Ut(x=>{if(N.length===0)return;let B=N.length;x.key==="ArrowDown"?(x.preventDefault(),F(q=>q<B-1?q+1:0)):x.key==="ArrowUp"?(x.preventDefault(),F(q=>q>0?q-1:B-1)):x.key==="Enter"?P&&C>=0&&N[C]?(x.preventDefault(),j(N[C])):S(!1):x.key==="Escape"&&S(!1),w.onKeyDown?.(x)},[N,P,C,j,F,S,w]),A=Ut(x=>{g&&N.length>0&&S(!0),w.onFocus?.(x)},[g,N.length,S,w]),K=Ut(x=>{w.onBlur?.(x)},[w]),U=x=>{let B=x.label||x.value;return typeof B!="string"?B:We(tp,{text:B,searchValue:g})};return ap(fs,{ref:x=>M.setReference(x),fullWidth:p,style:{...b?.root,...u},className:`compass-auto-complete ${h?.root||""} ${y||""}`,...v(),children:[We(jt,{...w,style:b?.input,className:h?.input,value:g,onChange:z,onKeyDown:L,onFocus:A,onBlur:K,fullWidth:!0,autoComplete:"off"}),P&&(N.length>0||d)&&We(Xc,{children:We(gs,{ref:x=>M.setFloating(x),className:`compass-auto-complete-dropdown ${h?.dropdown||""}`,style:{...b?.dropdown,position:W,...T},...$(),children:N.length>0?N.map((x,B)=>We(hs,{active:B===C,style:b?.option,className:`compass-auto-complete-option ${B===C?"compass-auto-complete-option--active":""} ${h?.option||""}`,onClick:()=>j(x),onMouseEnter:()=>F(B),children:U(x)},x.value)):d&&We(bs,{children:d})})})]})},vs=np;var sp=vs;import cp,{useState as So,useEffect as pp,useImperativeHandle as dp,forwardRef as Ps}from"react";import{createPortal as mp}from"react-dom";import{createRoot as up}from"react-dom/client";import{TransitionGroup as fp,CSSTransition as gp}from"react-transition-group";import vo from"@emotion/styled";import{keyframes as ip,css as Ss}from"@emotion/react";var lp=ip`
|
|
1256
1262
|
from {
|
|
1257
1263
|
transform: rotate(0deg);
|
|
1258
1264
|
}
|
|
1259
1265
|
to {
|
|
1260
1266
|
transform: rotate(360deg);
|
|
1261
1267
|
}
|
|
1262
|
-
`,
|
|
1268
|
+
`,Cs=vo.div`
|
|
1263
1269
|
position: fixed;
|
|
1264
1270
|
top: ${t("spacing.md","16px")};
|
|
1265
1271
|
left: 0;
|
|
@@ -1269,7 +1275,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1269
1275
|
display: flex;
|
|
1270
1276
|
flex-direction: column;
|
|
1271
1277
|
align-items: center;
|
|
1272
|
-
|
|
1278
|
+
`,$s=vo.div`
|
|
1273
1279
|
padding: ${t("spacing.sm","8px")};
|
|
1274
1280
|
text-align: center;
|
|
1275
1281
|
pointer-events: all;
|
|
@@ -1292,7 +1298,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1292
1298
|
transform: translateY(-100%);
|
|
1293
1299
|
transition: ${t("transitions.slow","all 0.3s ease-in-out")};
|
|
1294
1300
|
}
|
|
1295
|
-
`,
|
|
1301
|
+
`,ks=vo.div`
|
|
1296
1302
|
display: inline-flex;
|
|
1297
1303
|
align-items: center;
|
|
1298
1304
|
padding: ${t("components.message.contentPadding","8px 16px")};
|
|
@@ -1302,35 +1308,35 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1302
1308
|
font-size: ${t("fontSize.sm","14px")};
|
|
1303
1309
|
line-height: ${t("lineHeight.normal","1.5715")};
|
|
1304
1310
|
color: ${t("components.message.contentColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
1305
|
-
|
|
1311
|
+
`,ws=vo.span`
|
|
1306
1312
|
margin-right: ${t("spacing.sm","8px")};
|
|
1307
1313
|
display: inline-flex;
|
|
1308
1314
|
align-items: center;
|
|
1309
1315
|
font-size: ${t("fontSize.md","16px")};
|
|
1310
1316
|
line-height: 1;
|
|
1311
1317
|
|
|
1312
|
-
${({$type:e})=>{let o=t("colors.primary","#1890ff");switch(e){case"success":o=t("colors.success","#52c41a");break;case"error":o=t("colors.error","#ff4d4f");break;case"warning":o=t("colors.warning","#faad14");break}return e==="loading"?
|
|
1318
|
+
${({$type:e})=>{let o=t("colors.primary","#1890ff");switch(e){case"success":o=t("colors.success","#52c41a");break;case"error":o=t("colors.error","#ff4d4f");break;case"warning":o=t("colors.warning","#faad14");break}return e==="loading"?Ss`
|
|
1313
1319
|
color: ${o};
|
|
1314
1320
|
.anticon {
|
|
1315
1321
|
display: inline-block;
|
|
1316
|
-
animation: ${
|
|
1322
|
+
animation: ${lp} 1s linear infinite;
|
|
1317
1323
|
}
|
|
1318
|
-
`:
|
|
1324
|
+
`:Ss`
|
|
1319
1325
|
color: ${o};
|
|
1320
1326
|
`}}
|
|
1321
|
-
`;import{jsx as
|
|
1327
|
+
`;import{jsx as ke,jsxs as Sp}from"react/jsx-runtime";var hp={info:ke(Qe,{}),success:ke(bt,{}),error:ke(yt,{}),warning:ke(xt,{}),loading:ke(vt,{})},Ts=Ps(({content:e,type:o="info",icon:r,className:s,style:n,duration:a=3,onClose:i},l)=>{let[m,d]=So(!1);return pp(()=>{if(a<=0||m)return;let p=setTimeout(()=>{i?.()},a*1e3);return()=>clearTimeout(p)},[a,m,i]),ke($s,{ref:l,className:`compass-message compass-message--${o} ${s||""}`,style:n,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:Sp(ks,{className:"compass-message-content",children:[ke(ws,{$type:o,children:r||hp[o]}),e]})})});Ts.displayName="Message";var Co=Ps((e,o)=>{let[r,s]=So([]),[n]=So(()=>new Map),[a]=So(()=>typeof window<"u"?document.body:null);return dp(o,()=>({add:i=>{i.key&&!n.has(i.key)&&n.set(i.key,cp.createRef()),s(l=>[...l,i])},remove:i=>{s(l=>l.filter(m=>m.key!==i)),n.delete(i)}})),a?mp(ke(Cs,{children:ke(fp,{component:null,children:r.map(i=>{let{key:l,...m}=i,d=n.get(l);return ke(gp,{timeout:300,classNames:"compass-message",nodeRef:d,children:ke(Ts,{ref:d,...m})},l)})})}),a):null});Co.displayName="MessageContainerWrapper";var kt=null,Qt=null,qt=null,bp=()=>kt?Promise.resolve(kt):qt||(qt=new Promise(e=>{let o=document.createElement("div");document.body.appendChild(o),Qt=up(o);let r=()=>ke(Co,{ref:s=>{s&&(kt=s,e(s))}});Qt.render(ke(r,{}))}),qt),yp=0,xp=Date.now(),vp=()=>`compass-message-${xp}-${yp++}`,Ne=e=>{let{content:o,duration:r=3,type:s="info",onClose:n,key:a=vp(),...i}=e,l=()=>{kt&&kt.remove(a),n?.()};bp().then(m=>{m.add({...i,key:a,content:o,duration:r,type:s,onClose:l})})},Ms={info:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?Ne({...e,type:"info"}):Ne({content:e,duration:o,type:"info",onClose:r}),success:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?Ne({...e,type:"success"}):Ne({content:e,duration:o,type:"success",onClose:r}),error:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?Ne({...e,type:"error"}):Ne({content:e,duration:o,type:"error",onClose:r}),warning:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?Ne({...e,type:"warning"}):Ne({content:e,duration:o,type:"warning",onClose:r}),loading:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?Ne({...e,type:"loading"}):Ne({content:e,duration:o,type:"loading",onClose:r}),open:Ne,destroy:()=>{Qt&&(Qt.unmount(),Qt=null),kt=null,qt=null}};import{useRef as Cp}from"react";import{jsx as Pp}from"react/jsx-runtime";var $p=0,kp=Date.now(),wp=()=>`compass-message-hook-${kp}-${$p++}`;function Hr(){let e=Cp(null),o=n=>{if(!e.current)return;let{content:a,duration:i=3,type:l="info",onClose:m,key:d=wp(),...p}=n,u=()=>{e.current?.remove(d),m?.()};e.current.add({...p,key:d,content:a,duration:i,type:l,onClose:u})};return[{info:(n,a,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"info"}):o({content:n,duration:a,type:"info",onClose:i}),success:(n,a,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"success"}):o({content:n,duration:a,type:"success",onClose:i}),error:(n,a,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"error"}):o({content:n,duration:a,type:"error",onClose:i}),warning:(n,a,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"warning"}):o({content:n,duration:a,type:"warning",onClose:i}),loading:(n,a,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"loading"}):o({content:n,duration:a,type:"loading",onClose:i}),open:o,destroy:n=>{n&&e.current?.remove(n)}},Pp(Co,{ref:e},"message-holder")]}var Rs=Ms;Rs.useMessage=Hr;var Tp=Rs;import Os from"react";import Fp from"react-dom";import et from"@emotion/styled";var Jt=500,Is=et.div`
|
|
1322
1328
|
position: fixed;
|
|
1323
1329
|
inset: 0;
|
|
1324
1330
|
z-index: ${t("components.modal.zIndex","1000")};
|
|
1325
1331
|
pointer-events: ${e=>e.$visible?"auto":"none"};
|
|
1326
|
-
`,
|
|
1332
|
+
`,Fs=et.div`
|
|
1327
1333
|
position: fixed;
|
|
1328
1334
|
inset: 0;
|
|
1329
1335
|
background-color: ${t("components.modal.maskColor","rgba(0, 0, 0, 0.45)")};
|
|
1330
1336
|
backdrop-filter: blur(1px);
|
|
1331
1337
|
opacity: ${e=>e.$visible?1:0};
|
|
1332
|
-
transition: opacity ${
|
|
1333
|
-
`,
|
|
1338
|
+
transition: opacity ${Jt}ms;
|
|
1339
|
+
`,Ns=et.div`
|
|
1334
1340
|
background: ${t("components.modal.contentBg",t("colors.background","#fff"))};
|
|
1335
1341
|
padding: ${t("components.modal.padding",t("spacing.lg","24px"))};
|
|
1336
1342
|
border-radius: ${t("components.modal.borderRadius",t("borderRadius.lg","8px"))};
|
|
@@ -1342,93 +1348,93 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1342
1348
|
top: 120px;
|
|
1343
1349
|
opacity: ${e=>e.$visible?1:0};
|
|
1344
1350
|
transition:
|
|
1345
|
-
transform ${
|
|
1346
|
-
opacity ${
|
|
1351
|
+
transform ${Jt}ms,
|
|
1352
|
+
opacity ${Jt}ms;
|
|
1347
1353
|
${e=>e.$visible?"transform: translateY(0)":"transform: translateY(-20px)"}
|
|
1348
|
-
`,
|
|
1354
|
+
`,Ds=et.div`
|
|
1349
1355
|
display: flex;
|
|
1350
1356
|
align-items: center;
|
|
1351
1357
|
justify-content: space-between;
|
|
1352
1358
|
margin-bottom: ${t("spacing.md","16px")};
|
|
1353
|
-
`,
|
|
1359
|
+
`,Es=et.div`
|
|
1354
1360
|
font-size: ${t("fontSize.lg","18px")};
|
|
1355
1361
|
font-weight: ${t("fontWeight.bold","700")};
|
|
1356
1362
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1357
1363
|
line-height: 1.5;
|
|
1358
|
-
`,
|
|
1364
|
+
`,zs=et(ye)``,Bs=et.div`
|
|
1359
1365
|
display: flex;
|
|
1360
1366
|
width: 100%;
|
|
1361
1367
|
justify-content: flex-end;
|
|
1362
1368
|
margin-top: ${t("spacing.md","16px")};
|
|
1363
|
-
`,
|
|
1369
|
+
`,Lr=et(ye)`
|
|
1364
1370
|
padding: 4px 18px;
|
|
1365
1371
|
margin: 0;
|
|
1366
|
-
`;import{jsx as
|
|
1372
|
+
`;import{jsx as Hs}from"react/jsx-runtime";var Mp=e=>{let{children:o,locale:r,theme:s}=e;return Hs(go.Provider,{value:{locale:r},children:Hs(zt,{theme:s?.token,lightTheme:s?.light,darkTheme:s?.dark,defaultMode:s?.defaultMode,global:s?.global,children:o})})},Ls=Mp;var Rp=Ls;var Ip={locale:"zh-CN",Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},DatePicker:{monthBeforeYear:!1,yearFormat:"yyyy\u5E74",monthFormat:"M\u6708",quarterFormat:"yyyy\u5E74\u7B2CQ\u5B63\u5EA6",weekFormat:"yyyy\u5E74\u7B2Cw\u5468",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",dayFormat:"d",dateFormat:"yyyy\u5E74M\u6708d\u65E5",dateTimeFormat:"yyyy\u5E74M\u6708d\u65E5 HH:mm:ss",previousYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA",shortWeekDays:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"],weekDays:["\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u661F\u671F\u65E5"],months:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],shortMonths:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],hour:"\u65F6",minute:"\u5206",second:"\u79D2",startDate:"\u5F00\u59CB\u65E5\u671F",endDate:"\u7ED3\u675F\u65E5\u671F"},Pagination:{items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875"}},De=Ip;import{jsx as tt,jsxs as $o}from"react/jsx-runtime";var Np=e=>{let{isOpen:o,maskVisible:r=!0,footer:s,onCancel:n,children:a,className:i,style:l,title:m,header:d,closable:p=!0,onOk:u,okText:y="\u786E\u5B9A",cancelText:h="\u53D6\u6D88",confirmLoading:b,afterClose:w,styles:g,classNames:f,...c}=e,{locale:P}=Ce(),S=P?.Modal||De.Modal,C=y==="\u786E\u5B9A"?S.okText:y,F=h==="\u53D6\u6D88"?S.cancelText:h,[N,M]=Os.useState(!1);Os.useEffect(()=>{o||M(!1)},[o]);let W=async T=>{if(!u)return;let R=u(T);if(R&&typeof R.then=="function"){M(!0);try{await R,M(!1),n&&n(T)}catch(k){throw M(!1),console.error(k),k}}else n&&n(T)},O=T=>{!o&&T.target===T.currentTarget&&w?.()};return $o(Is,{className:`compass-modal ${i||""} ${f?.root||""}`,$visible:o,style:{zIndex:l?.zIndex,...g?.root},role:"dialog","aria-modal":"true",...c,children:[r&&tt(Fs,{className:`compass-modal-mask ${f?.mask||""}`,style:g?.mask,onClick:n,"aria-hidden":"true",$visible:o}),$o(Ns,{className:`compass-modal-content ${f?.content||""}`,$visible:o,$width:e.width,onTransitionEnd:O,style:{...l,...g?.content},children:[d===void 0?(m||p)&&$o(Ds,{className:`compass-modal-header ${f?.header||""}`,style:g?.header,children:[tt(Es,{className:"compass-modal-title",children:m}),p&&tt(zs,{className:"compass-modal-close",onClick:n,"aria-label":"Close",variant:"text",shape:"circle",icon:tt(Ee,{})})]}):d,tt("div",{className:`compass-modal-body ${f?.body||""}`,style:g?.body,children:a}),s===void 0?$o(Bs,{className:`compass-modal-footer ${f?.footer||""}`,style:g?.footer,children:[tt(Lr,{onClick:n,"aria-label":"Close modal",children:F}),tt(Lr,{onClick:W,style:{marginLeft:12},variant:"primary",loading:b||N,children:C})]}):s]})]})},Dp=e=>{let{children:o,...r}=e;return Fp.createPortal(tt(Np,{...r,children:o}),document.body)},wt=Dp;import{createRoot as Ep}from"react-dom/client";import Pt from"@emotion/styled";var ko=Pt.div`
|
|
1367
1373
|
display: flex;
|
|
1368
1374
|
align-items: flex-start;
|
|
1369
|
-
|
|
1375
|
+
`,wo=Pt.div`
|
|
1370
1376
|
margin-right: 12px;
|
|
1371
1377
|
font-size: 22px;
|
|
1372
1378
|
line-height: 1;
|
|
1373
1379
|
color: ${e=>{switch(e.$type){case"info":case"confirm":return"#1677ff";case"success":return"#52c41a";case"error":return"#ff4d4f";case"warning":return"#faad14";default:return"#1677ff"}}};
|
|
1374
|
-
`,
|
|
1380
|
+
`,Po=Pt.div`
|
|
1375
1381
|
flex: 1;
|
|
1376
|
-
`,
|
|
1382
|
+
`,To=Pt.div`
|
|
1377
1383
|
color: rgba(0, 0, 0, 0.88);
|
|
1378
1384
|
font-weight: 600;
|
|
1379
1385
|
font-size: 16px;
|
|
1380
1386
|
line-height: 1.5;
|
|
1381
1387
|
margin-bottom: 8px;
|
|
1382
|
-
`,
|
|
1388
|
+
`,Mo=Pt.div`
|
|
1383
1389
|
color: rgba(0, 0, 0, 0.88);
|
|
1384
1390
|
font-size: 14px;
|
|
1385
1391
|
line-height: 1.5;
|
|
1386
|
-
`,
|
|
1392
|
+
`,Ro=Pt.div`
|
|
1387
1393
|
display: flex;
|
|
1388
1394
|
justify-content: flex-end;
|
|
1389
1395
|
gap: 8px;
|
|
1390
1396
|
margin-top: 24px;
|
|
1391
|
-
`;import{jsx as Pe,jsxs as
|
|
1397
|
+
`;import{jsx as Pe,jsxs as Or}from"react/jsx-runtime";var Xt=e=>{let o=document.createElement("div");document.body.appendChild(o);let r=Ep(o),s={...e,isOpen:!1,confirmLoading:!1},n=()=>{r.unmount(),o.parentNode&&o.parentNode.removeChild(o)},a=i=>{let{onOk:l,onCancel:m,title:d,content:p,icon:u,type:y="confirm",okText:h=De.Modal.okText,cancelText:b=De.Modal.cancelText,closable:w=!1,confirmLoading:g,...f}=i,c=async()=>{if(l){let N=l();if(N&&typeof N.then=="function"){s={...s,confirmLoading:!0},a(s);try{await N,S()}catch(M){throw s={...s,confirmLoading:!1},a(s),console.error("Modal confirm error",M),M}}else S()}else S()},P=async()=>{m&&await m(),S()},S=()=>{s={...s,isOpen:!1,confirmLoading:!1},a(s),setTimeout(()=>{n()},Jt)},F={info:Pe(Qe,{}),success:Pe(bt,{}),error:Pe(yt,{}),warning:Pe(xt,{})}[y]||Pe(Qe,{});r.render(Pe(zt,{theme:le,children:Pe(wt,{...f,width:416,closable:w,onCancel:P,footer:Or(Ro,{children:[y==="confirm"?Pe(ye,{onClick:P,children:b}):null,Pe(ye,{variant:"primary",onClick:c,loading:g,children:h})]}),children:Or(ko,{children:[Pe(wo,{$type:y,children:u||F}),Or(Po,{children:[d&&Pe(To,{children:d}),p&&Pe(Mo,{children:p})]})]})})}))};return a(s),setTimeout(()=>{s={...s,isOpen:!0},a(s)},10),{destroy:close,update:i=>{s={...s,...i},a(s)}}},Vs=e=>Xt({...e,type:"info"}),Ws=e=>Xt({...e,type:"success"}),As=e=>Xt({...e,type:"error"}),Ks=e=>Xt({...e,type:"warning"}),zp=e=>Xt({...e,type:"confirm"}),Ys=zp;import Bp,{useRef as Hp,useState as Wr,useImperativeHandle as Lp}from"react";import{Fragment as Vp,jsx as xe,jsxs as Vr}from"react/jsx-runtime";var Op=({afterClose:e,closeModal:o,onOk:r,onCancel:s,title:n,content:a,icon:i,type:l="info",okText:m="OK",cancelText:d="Cancel",isOpen:p,confirmLoading:u,...y})=>{let[h,b]=Wr(!1),{locale:w}=Ce(),g=w?.Modal||De.Modal,f=m==="OK"?g.okText:m,c=d==="Cancel"?g.cancelText:d,P=async()=>{if(r){let N=r();if(N&&typeof N.then=="function"){b(!0);try{await N,b(!1),o()}catch(M){throw b(!1),console.error(M),M}}else o()}else o()},S=async()=>{s&&await s(),o()},F={info:xe(Qe,{}),success:xe(bt,{}),error:xe(yt,{}),warning:xe(xt,{})}[l]||xe(Qe,{});return xe(wt,{...y,afterClose:e,closable:y.closable??!1,width:416,isOpen:!!p,onCancel:S,footer:Vr(Ro,{children:[l==="confirm"?xe(ye,{onClick:S,children:c}):null,xe(ye,{variant:"primary",onClick:P,loading:u||h,children:f})]}),children:Vr(ko,{children:[xe(wo,{$type:l,children:i||F}),Vr(Po,{children:[n&&xe(To,{children:n}),a&&xe(Mo,{children:a})]})]})})},_s=Bp.forwardRef((e,o)=>{let[r,s]=Wr(new Map);return Lp(o,()=>({patchElement:(n,a)=>{s(i=>{let l=new Map(i);return l.set(n,a),l})},removeElement:n=>{s(a=>{let i=new Map(a);return i.delete(n),i})}})),xe(Vp,{children:Array.from(r.values())})});_s.displayName="ElementsHolder";function Ar(){let e=Hp(null),[o,r]=Wr(null);o||r(xe(_s,{ref:e}));let s=a=>i=>{let l=Math.random().toString(36).substring(2),d={...a(i),isOpen:!1},p=()=>{d={...d,isOpen:!1},u(d)},u=y=>{e.current&&e.current.patchElement(l,xe(Op,{...y,type:y.type||"info",isOpen:!!y.isOpen,closeModal:p,afterClose:()=>{e.current&&e.current.removeElement(l)}},l))};return u(d),setTimeout(()=>{d={...d,isOpen:!0},u(d)},10),{destroy:p,update:y=>{d={...d,...y},u(d)}}};return[{info:s(a=>({...a,type:"info"})),success:s(a=>({...a,type:"success"})),error:s(a=>({...a,type:"error"})),warning:s(a=>({...a,type:"warning"})),confirm:s(a=>({...a,type:"confirm"}))},o]}var mt=wt;mt.info=Vs;mt.success=Ws;mt.error=As;mt.warning=Ks;mt.confirm=Ys;mt.useModal=Ar;var Wp=mt;import Gp from"react";import Ap from"react";import Le from"@emotion/styled";var js=Le.div`
|
|
1392
1398
|
display: flex;
|
|
1393
1399
|
align-items: center;
|
|
1394
1400
|
gap: ${t("spacing.sm","8px")};
|
|
1395
1401
|
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px;`:""}
|
|
1396
|
-
`,
|
|
1402
|
+
`,Gs=Le.div`
|
|
1397
1403
|
flex: 1;
|
|
1398
1404
|
background-color: ${t("components.progress.trackColor",t("colors.backgroundSecondary","#fafafa"))};
|
|
1399
1405
|
border-radius: ${t("borderRadius.xl","12px")};
|
|
1400
1406
|
overflow: hidden;
|
|
1401
1407
|
height: ${({size:e})=>{if(typeof e=="number")return`${e}px`;if(typeof e=="object"&&"height"in e)return`${e.height}px`;switch(e){case"small":return"4px";case"large":return"12px";case"medium":default:return"8px"}}};
|
|
1402
1408
|
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px; flex: none;`:""}
|
|
1403
|
-
`,
|
|
1409
|
+
`,Us=Le.div`
|
|
1404
1410
|
height: 100%;
|
|
1405
1411
|
border-radius: inherit;
|
|
1406
1412
|
transition: ${t("transitions.normal","all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)")};
|
|
1407
1413
|
width: ${({percent:e})=>Math.min(Math.max(e,0),100)}%;
|
|
1408
1414
|
background: ${({strokeColor:e,status:o})=>{if(e)return e;switch(o){case"success":return t("components.progress.successColor",t("colors.success","#52c41a"));case"error":return t("components.progress.errorColor",t("colors.error","#ff4d4f"));case"warning":return t("components.progress.warningColor",t("colors.warning","#faad14"));default:return t("components.progress.infoColor",t("colors.primary","#1890ff"))}}};
|
|
1409
|
-
`,
|
|
1415
|
+
`,qs=Le.span`
|
|
1410
1416
|
font-size: ${({size:e})=>{switch(e){case"small":return t("fontSize.xs","12px");case"large":return t("fontSize.md","16px");case"medium":default:return t("fontSize.sm","14px")}}};
|
|
1411
1417
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1412
1418
|
white-space: nowrap;
|
|
1413
1419
|
min-width: ${({size:e})=>{switch(e){case"small":return"28px";case"large":return"36px";case"medium":default:return"32px"}}};
|
|
1414
1420
|
text-align: right;
|
|
1415
|
-
`,
|
|
1421
|
+
`,Qs=Le.div`
|
|
1416
1422
|
display: inline-block;
|
|
1417
1423
|
width: ${({width:e})=>e}px;
|
|
1418
1424
|
height: ${({width:e})=>e}px;
|
|
1419
|
-
`,
|
|
1425
|
+
`,Js=Le.svg`
|
|
1420
1426
|
transform: rotate(-90deg);
|
|
1421
1427
|
width: 100%;
|
|
1422
1428
|
height: 100%;
|
|
1423
|
-
`,
|
|
1429
|
+
`,Xs=Le.circle`
|
|
1424
1430
|
fill: none;
|
|
1425
1431
|
stroke: ${t("components.progress.trackColor",t("colors.backgroundSecondary","#fafafa"))};
|
|
1426
|
-
`,
|
|
1432
|
+
`,Zs=Le.circle`
|
|
1427
1433
|
fill: none;
|
|
1428
1434
|
transition: ${t("transitions.normal","all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)")};
|
|
1429
1435
|
stroke: ${({strokeColor:e,status:o})=>{if(e)return e;switch(o){case"success":return t("components.progress.successColor",t("colors.success","#52c41a"));case"error":return t("components.progress.errorColor",t("colors.error","#ff4d4f"));case"warning":return t("components.progress.warningColor",t("colors.warning","#faad14"));default:return t("components.progress.infoColor",t("colors.primary","#1890ff"))}}};
|
|
1430
1436
|
stroke-linecap: round;
|
|
1431
|
-
`,
|
|
1437
|
+
`,ei=Le.div`
|
|
1432
1438
|
position: absolute;
|
|
1433
1439
|
top: 50%;
|
|
1434
1440
|
left: 50%;
|
|
@@ -1437,67 +1443,67 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1437
1443
|
font-size: ${({size:e,width:o})=>e==="small"||o<60?t("fontSize.xs","12px"):e==="large"||o>120?t("fontSize.md","16px"):t("fontSize.sm","14px")};
|
|
1438
1444
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1439
1445
|
white-space: nowrap;
|
|
1440
|
-
`,
|
|
1446
|
+
`,ti=Le.div`
|
|
1441
1447
|
position: relative;
|
|
1442
1448
|
display: inline-block;
|
|
1443
|
-
`;import{useMemo as
|
|
1449
|
+
`;import{useMemo as oi}from"react";var Io=e=>Math.min(Math.max(e,0),100),Fo=(e,o)=>oi(()=>e!=="normal"?e:o===100?"success":"normal",[e,o]),No=(e,o,r,s)=>oi(()=>r?r(e):o==="success"&&s&&e===100?s:`${Math.round(e)}%`,[r,e,o,s]);import{jsx as Kr,jsxs as Kp}from"react/jsx-runtime";var Yr=Ap.forwardRef(({percent:e=0,size:o="medium",status:r="normal",showInfo:s=!0,format:n,strokeColor:a,trailColor:i,success:l,className:m,style:d,...p},u)=>{let y=Io(e),h=Fo(r,y),b=No(y,h,n,l);return Kp(js,{ref:u,className:`compass-progress compass-progress--line ${m||""}`,style:d,size:o,status:h,role:"progressbar","aria-valuenow":y,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${y}%`,...p,children:[Kr(Gs,{size:o,status:h,style:{...i?{backgroundColor:i}:{}},children:Kr(Us,{percent:y,size:o,status:h,strokeColor:typeof a=="string"?a:void 0,style:{background:typeof a=="object"?`linear-gradient(${a.direction||"to right"}, ${a.from}, ${a.to})`:void 0}})}),s&&Kr(qs,{size:o,status:h,children:b})]})});Yr.displayName="LinearProgress";import Yp,{useMemo as _p,useId as jp}from"react";import{jsx as ut,jsxs as _r}from"react/jsx-runtime";var jr=Yp.forwardRef(({percent:e=0,size:o="medium",status:r="normal",showInfo:s=!0,format:n,strokeWidth:a,strokeColor:i,trailColor:l,success:m,gapDegree:d,gapPosition:p="top",className:u,style:y,...h},b)=>{let w=Io(e),g=Fo(r,w),f=No(w,g,n,m),c=_p(()=>{if(typeof o=="number")return o;switch(o){case"small":return 80;case"medium":return 120;case"large":return 160;default:return 120}},[o]),P=a??(o==="small"?4:o==="large"?8:6),S=(c-P)/2,C=2*Math.PI*S,F=C,N=C-w/100*C,M=jp(),W=typeof i=="object",O=Math.max(0,Math.min(295,d||0)),T=C*((360-O)/360),R=`${T} ${C}`,k=0,v=T*(1-w/100),$=()=>`rotate(${(p==="bottom"?90:p==="left"?180:p==="right"?0:-90)+O/2}deg)`;return _r(ti,{ref:b,className:`compass-progress compass-progress--circle ${u||""}`,style:y,role:"progressbar","aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${w}%`,...h,children:[ut(Qs,{width:c,children:_r(Js,{style:d?{transform:$()}:void 0,children:[ut(Xs,{cx:c/2,cy:c/2,r:S,strokeWidth:P,strokeDasharray:d?R:void 0,strokeDashoffset:d?k:void 0,style:{stroke:l}}),ut(Zs,{cx:c/2,cy:c/2,r:S,strokeWidth:P,strokeDasharray:d?R:F,strokeDashoffset:d?v:N,status:g,strokeColor:typeof i=="string"?i:void 0,style:{stroke:W?`url(#${M})`:void 0,transition:"stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s"}}),typeof i=="object"&&ut("defs",{children:_r("linearGradient",{id:M,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ut("stop",{offset:"0%",stopColor:i.from}),ut("stop",{offset:"100%",stopColor:i.to})]})})]})}),s&&ut(ei,{width:c,size:o,children:f})]})});jr.displayName="CircleProgress";import{jsx as ri}from"react/jsx-runtime";var Gr=Gp.forwardRef(({type:e="line",...o},r)=>e==="circle"?ri(jr,{ref:r,...o}):ri(Yr,{ref:r,...o}));Gr.displayName="Progress";var Up=Gr;import Si,{useState as eo,useEffect as Ci}from"react";import{useFloating as Cd,useDismiss as $d,useInteractions as kd,offset as wd,flip as Pd,shift as Td,autoUpdate as Md,FloatingPortal as Rd,FloatingFocusManager as Id}from"@floating-ui/react";import{format as ft,startOfWeek as Zr,endOfWeek as $i,isWithinInterval as ki,getISOWeek as Fd}from"date-fns";import Nd from"@emotion/styled";import{useMemo as qp,useState as ni}from"react";import{startOfMonth as Qp,endOfMonth as Jp,startOfWeek as Xp,endOfWeek as Zp,eachDayOfInterval as ed,addMonths as ai,subMonths as si,isSameMonth as td,isSameDay as ii,isToday as od}from"date-fns";var Do=({value:e,defaultValue:o})=>{let[r,s]=ni(e||o||new Date),[n,a]=ni(e);e&&e!==n&&!ii(r,e)&&(s(e),a(e));let i=qp(()=>{let h=Qp(r),b=Jp(h),w=Xp(h,{weekStartsOn:1}),g=Zp(b,{weekStartsOn:1});return ed({start:w,end:g}).map(c=>({date:c,isCurrentMonth:td(c,h),isToday:od(c),isSelected:e?ii(c,e):!1}))},[r,e]);return{viewDate:r,days:i,nextMonth:()=>s(ai(r,1)),prevMonth:()=>s(si(r,1)),nextYear:()=>s(ai(r,12)),prevYear:()=>s(si(r,12)),setMonth:h=>{let b=new Date(r);b.setMonth(h),s(b)},setYear:h=>{let b=new Date(r);b.setFullYear(h),s(b)},setViewDate:s}};import pi from"@emotion/styled";import{setMonth as li,format as rd}from"date-fns";import{jsx as ci}from"react/jsx-runtime";var nd=pi.div`
|
|
1444
1450
|
display: grid;
|
|
1445
1451
|
grid-template-columns: repeat(3, 1fr);
|
|
1446
1452
|
gap: 12px;
|
|
1447
1453
|
padding: 8px 16px;
|
|
1448
|
-
`,
|
|
1454
|
+
`,ad=pi.div`
|
|
1449
1455
|
padding: 8px 12px;
|
|
1450
1456
|
text-align: center;
|
|
1451
1457
|
cursor: pointer;
|
|
1452
1458
|
border-radius: 4px;
|
|
1453
1459
|
font-size: 14px;
|
|
1454
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1455
|
-
color: ${({theme:e,isSelected:o})=>o?"#fff":
|
|
1460
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"transparent"};
|
|
1461
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ce(e,"colors").text};
|
|
1456
1462
|
|
|
1457
1463
|
&:hover {
|
|
1458
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1464
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1459
1465
|
}
|
|
1460
|
-
`,
|
|
1466
|
+
`,di=({viewDate:e,onSelect:o,selectedDate:r})=>{let s=Array.from({length:12},(a,i)=>i),n=a=>{let i=li(e,a);o(i)};return ci(nd,{children:s.map(a=>{let i=li(e,a),l=r?r.getMonth()===a&&r.getFullYear()===e.getFullYear():!1;return ci(ad,{isSelected:l,onClick:()=>n(a),children:rd(i,"MMM")},a)})})};import ui from"@emotion/styled";import{setYear as sd}from"date-fns";import{jsx as mi}from"react/jsx-runtime";var id=ui.div`
|
|
1461
1467
|
display: grid;
|
|
1462
1468
|
grid-template-columns: repeat(3, 1fr);
|
|
1463
1469
|
gap: 12px;
|
|
1464
1470
|
padding: 8px 16px;
|
|
1465
|
-
`,
|
|
1471
|
+
`,ld=ui.div`
|
|
1466
1472
|
padding: 8px 12px;
|
|
1467
1473
|
text-align: center;
|
|
1468
1474
|
cursor: pointer;
|
|
1469
1475
|
border-radius: 4px;
|
|
1470
1476
|
font-size: 14px;
|
|
1471
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1472
|
-
color: ${({theme:e,isSelected:o,isCurrent:r})=>o?"#fff":r?
|
|
1477
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"transparent"};
|
|
1478
|
+
color: ${({theme:e,isSelected:o,isCurrent:r})=>o?"#fff":r?ce(e,"colors").text:ce(e,"colors").textDisabled};
|
|
1473
1479
|
|
|
1474
1480
|
&:hover {
|
|
1475
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1481
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1476
1482
|
}
|
|
1477
|
-
`,
|
|
1483
|
+
`,fi=({viewDate:e,onSelect:o,selectedDate:r})=>{let s=e.getFullYear(),n=Math.floor(s/10)*10,a=Array.from({length:12},(l,m)=>n-1+m),i=l=>{let m=sd(e,l);o(m)};return mi(id,{children:a.map(l=>{let m=r?r.getFullYear()===l:!1,d=l>=n&&l<=n+9;return mi(ld,{isSelected:m,isCurrent:d,onClick:()=>i(l),children:l},l)})})};import gi from"@emotion/styled";import{setMonth as cd,getQuarter as pd}from"date-fns";import{jsx as fd,jsxs as ud}from"react/jsx-runtime";var dd=gi.div`
|
|
1478
1484
|
display: grid;
|
|
1479
1485
|
grid-template-columns: repeat(4, 1fr);
|
|
1480
1486
|
gap: 12px;
|
|
1481
1487
|
padding: 24px 16px;
|
|
1482
|
-
`,
|
|
1488
|
+
`,md=gi.div`
|
|
1483
1489
|
padding: 16px 12px;
|
|
1484
1490
|
text-align: center;
|
|
1485
1491
|
cursor: pointer;
|
|
1486
1492
|
border-radius: 4px;
|
|
1487
1493
|
font-size: 14px;
|
|
1488
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1489
|
-
color: ${({theme:e,isSelected:o})=>o?"#fff":
|
|
1494
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"transparent"};
|
|
1495
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ce(e,"colors").text};
|
|
1490
1496
|
|
|
1491
1497
|
&:hover {
|
|
1492
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1498
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1493
1499
|
}
|
|
1494
|
-
`,
|
|
1500
|
+
`,hi=({viewDate:e,onSelect:o,selectedDate:r})=>{let s=[1,2,3,4],n=a=>{let i=cd(e,(a-1)*3);o(i)};return fd(dd,{children:s.map(a=>{let i=r?pd(r)===a&&r.getFullYear()===e.getFullYear():!1;return ud(md,{isSelected:i,onClick:()=>n(a),children:["Q",a]},a)})})};import Tt from"@emotion/styled";import{setHours as gd,setMinutes as hd,setSeconds as bd}from"date-fns";import{jsx as Ae,jsxs as Jr}from"react/jsx-runtime";var yd=Tt.div`
|
|
1495
1501
|
display: flex;
|
|
1496
1502
|
flex-direction: column;
|
|
1497
1503
|
border-left: 1px solid rgba(0, 0, 0, 0.06);
|
|
1498
1504
|
height: 320px; // Fixed height to match date panel
|
|
1499
1505
|
width: 160px;
|
|
1500
|
-
`,
|
|
1506
|
+
`,Ur=Tt.div`
|
|
1501
1507
|
flex: 1;
|
|
1502
1508
|
overflow-y: auto;
|
|
1503
1509
|
padding: 4px 0;
|
|
@@ -1516,53 +1522,53 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1516
1522
|
}
|
|
1517
1523
|
|
|
1518
1524
|
&::-webkit-scrollbar-thumb {
|
|
1519
|
-
background: ${({theme:e})=>
|
|
1525
|
+
background: ${({theme:e})=>ce(e,"colors").border};
|
|
1520
1526
|
border-radius: 3px;
|
|
1521
1527
|
|
|
1522
1528
|
&:hover {
|
|
1523
|
-
background: ${({theme:e})=>
|
|
1529
|
+
background: ${({theme:e})=>ce(e,"colors").textSecondary};
|
|
1524
1530
|
}
|
|
1525
1531
|
}
|
|
1526
|
-
`,
|
|
1532
|
+
`,qr=Tt.div`
|
|
1527
1533
|
padding: 6px 0;
|
|
1528
1534
|
text-align: center;
|
|
1529
1535
|
cursor: pointer;
|
|
1530
1536
|
font-size: 14px;
|
|
1531
1537
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1532
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1533
|
-
color: ${({theme:e,isSelected:o})=>o?"#fff":
|
|
1538
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primary:"transparent"};
|
|
1539
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ce(e,"colors").text};
|
|
1534
1540
|
margin: 0 4px;
|
|
1535
1541
|
border-radius: 4px;
|
|
1536
1542
|
|
|
1537
1543
|
&:hover {
|
|
1538
|
-
background: ${({theme:e,isSelected:o})=>o?
|
|
1544
|
+
background: ${({theme:e,isSelected:o})=>o?ce(e,"colors").primaryHover||ce(e,"colors").primary:ce(e,"colors").backgroundSecondary};
|
|
1539
1545
|
}
|
|
1540
1546
|
|
|
1541
1547
|
&:active {
|
|
1542
1548
|
transform: scale(0.95);
|
|
1543
1549
|
}
|
|
1544
|
-
`,
|
|
1550
|
+
`,xd=Tt.div`
|
|
1545
1551
|
height: 41px;
|
|
1546
1552
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
|
1547
1553
|
box-sizing: border-box;
|
|
1548
1554
|
display: flex;
|
|
1549
1555
|
align-items: center;
|
|
1550
|
-
`,
|
|
1556
|
+
`,Qr=Tt.div`
|
|
1551
1557
|
flex: 1;
|
|
1552
1558
|
text-align: center;
|
|
1553
1559
|
font-size: 12px;
|
|
1554
|
-
color: ${({theme:e})=>
|
|
1560
|
+
color: ${({theme:e})=>ce(e,"colors").textSecondary};
|
|
1555
1561
|
font-weight: 400;
|
|
1556
1562
|
line-height: 40px;
|
|
1557
|
-
`,
|
|
1563
|
+
`,vd=Tt.div`
|
|
1558
1564
|
display: flex;
|
|
1559
1565
|
flex: 1;
|
|
1560
1566
|
overflow: hidden;
|
|
1561
|
-
`,
|
|
1567
|
+
`,Eo=({value:e,onChange:o})=>{let{locale:r}=Ce(),s=Array.from({length:24},(p,u)=>u),n=Array.from({length:60},(p,u)=>u),a=Array.from({length:60},(p,u)=>u),i=e||new Date,l=p=>{o(gd(i,p))},m=p=>{o(hd(i,p))},d=p=>{o(bd(i,p))};return Jr(yd,{children:[Jr(xd,{children:[Ae(Qr,{children:r?.DatePicker.hour||"\u65F6"}),Ae(Qr,{children:r?.DatePicker.minute||"\u5206"}),Ae(Qr,{children:r?.DatePicker.second||"\u79D2"})]}),Jr(vd,{children:[Ae(Ur,{children:s.map(p=>Ae(qr,{isSelected:i.getHours()===p,onClick:()=>l(p),children:p.toString().padStart(2,"0")},p))}),Ae(Ur,{children:n.map(p=>Ae(qr,{isSelected:i.getMinutes()===p,onClick:()=>m(p),children:p.toString().padStart(2,"0")},p))}),Ae(Ur,{children:a.map(p=>Ae(qr,{isSelected:i.getSeconds()===p,onClick:()=>d(p),children:p.toString().padStart(2,"0")},p))})]})]})};import ge from"@emotion/styled";var zo=ge.div`
|
|
1562
1568
|
position: relative;
|
|
1563
1569
|
display: inline-block;
|
|
1564
1570
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
1565
|
-
`,
|
|
1571
|
+
`,Bo=ge.div`
|
|
1566
1572
|
background: ${t("colors.background","#fff")};
|
|
1567
1573
|
border: 1px solid ${t("components.datePicker.borderColor",t("colors.border","#d9d9d9"))};
|
|
1568
1574
|
border-radius: ${t("borderRadius.lg","8px")};
|
|
@@ -1570,22 +1576,22 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1570
1576
|
width: auto;
|
|
1571
1577
|
user-select: none;
|
|
1572
1578
|
overflow: hidden;
|
|
1573
|
-
`,
|
|
1579
|
+
`,Ho=ge.div`
|
|
1574
1580
|
display: flex;
|
|
1575
1581
|
border-top: 1px solid
|
|
1576
1582
|
${t("components.datePicker.borderColor",t("colors.border","#d9d9d9"))};
|
|
1577
|
-
`,
|
|
1583
|
+
`,Lo=ge.div`
|
|
1578
1584
|
width: 280px;
|
|
1579
|
-
`,
|
|
1585
|
+
`,Mt=ge.div`
|
|
1580
1586
|
display: flex;
|
|
1581
1587
|
justify-content: space-between;
|
|
1582
1588
|
align-items: center;
|
|
1583
1589
|
padding: ${t("components.datePicker.headerPadding","11px 16px")};
|
|
1584
|
-
`,
|
|
1590
|
+
`,Rt=ge.div`
|
|
1585
1591
|
display: flex;
|
|
1586
1592
|
align-items: center;
|
|
1587
1593
|
gap: 4px;
|
|
1588
|
-
`,
|
|
1594
|
+
`,ve=ge.button`
|
|
1589
1595
|
background: none;
|
|
1590
1596
|
border: none;
|
|
1591
1597
|
cursor: pointer;
|
|
@@ -1604,7 +1610,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1604
1610
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1605
1611
|
background: ${t("colors.backgroundSecondary","rgba(0, 0, 0, 0.04)")};
|
|
1606
1612
|
}
|
|
1607
|
-
`,
|
|
1613
|
+
`,It=ge.div`
|
|
1608
1614
|
font-weight: 500;
|
|
1609
1615
|
cursor: pointer;
|
|
1610
1616
|
font-size: ${t("components.datePicker.headerFontSize","16px")};
|
|
@@ -1613,22 +1619,22 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1613
1619
|
&:hover {
|
|
1614
1620
|
color: ${t("colors.primary","#1890ff")};
|
|
1615
1621
|
}
|
|
1616
|
-
`,
|
|
1622
|
+
`,Oo=ge.div`
|
|
1617
1623
|
display: grid;
|
|
1618
1624
|
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1619
1625
|
padding: 8px 12px 4px;
|
|
1620
1626
|
text-align: center;
|
|
1621
|
-
`,
|
|
1627
|
+
`,Zt=ge.div`
|
|
1622
1628
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1623
1629
|
font-size: ${t("components.datePicker.weekDayFontSize","12px")};
|
|
1624
1630
|
padding: 4px 0;
|
|
1625
1631
|
font-weight: 400;
|
|
1626
|
-
`,
|
|
1632
|
+
`,Vo=ge.div`
|
|
1627
1633
|
display: grid;
|
|
1628
1634
|
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1629
1635
|
gap: 0;
|
|
1630
1636
|
padding: 4px 12px 8px;
|
|
1631
|
-
`,
|
|
1637
|
+
`,bi=ge.div`
|
|
1632
1638
|
height: ${t("components.datePicker.cellHeight","24px")};
|
|
1633
1639
|
width: 100%;
|
|
1634
1640
|
margin: ${t("components.datePicker.cellMargin","3px")} 0;
|
|
@@ -1648,7 +1654,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1648
1654
|
background: ${({isSelected:e})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):t("components.datePicker.cellHoverBg","#f0f0f0")};
|
|
1649
1655
|
color: ${({isSelected:e})=>e?t("components.datePicker.cellActiveColor","#1890ff"):t("components.datePicker.cellActiveColor","#1890ff")};
|
|
1650
1656
|
}
|
|
1651
|
-
`,
|
|
1657
|
+
`,Sd=(e,o)=>{if(!e||!e.startsWith("#"))return e;let r=parseInt(e.slice(1,3),16),s=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return`rgba(${r}, ${s}, ${n}, ${o})`},Wo=ge.div`
|
|
1652
1658
|
height: ${t("components.datePicker.cellHeight","24px")};
|
|
1653
1659
|
width: ${({isWeekMode:e})=>e?"100%":t("components.datePicker.cellWidth","36px")};
|
|
1654
1660
|
margin: ${({isWeekMode:e})=>e?`${t("components.datePicker.cellMargin","3px")} 0`:`${t("components.datePicker.cellMargin","3px")} auto`};
|
|
@@ -1659,7 +1665,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1659
1665
|
box-sizing: border-box;
|
|
1660
1666
|
font-size: ${t("components.datePicker.cellFontSize","14px")};
|
|
1661
1667
|
color: ${({isCurrentMonth:e,isSelected:o,isHovered:r})=>o||r?t("components.datePicker.cellActiveColor",t("colors.primary","#1890ff")):e?t("components.datePicker.cellColor",t("colors.text","rgba(0, 0, 0, 0.88)")):t("components.datePicker.cellDisabledColor","rgba(0, 0, 0, 0.25)")};
|
|
1662
|
-
background: ${({isSelected:e,isHovered:o,isInRange:r})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):o?t("components.datePicker.cellHoverBg","#f0f0f0"):r?
|
|
1668
|
+
background: ${({isSelected:e,isHovered:o,isInRange:r})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):o?t("components.datePicker.cellHoverBg","#f0f0f0"):r?Sd(t("colors.primary","#1890ff"),.2):"transparent"};
|
|
1663
1669
|
border-radius: ${({isWeekMode:e,isWeekEnd:o})=>e?o?`0 ${t("components.datePicker.cellBorderRadius","2px")} ${t("components.datePicker.cellBorderRadius","2px")} 0`:"0":t("components.datePicker.cellBorderRadius","2px")};
|
|
1664
1670
|
border: ${({isToday:e,isSelected:o,isWeekMode:r,isHovered:s})=>r&&s?"1px solid transparent":!o&&e?`1px solid ${t("components.datePicker.cellActiveBg","#e6f7ff")}`:"1px solid transparent"};
|
|
1665
1671
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -1672,7 +1678,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1672
1678
|
&:active {
|
|
1673
1679
|
transform: ${({isWeekMode:e})=>e?"none":"scale(0.95)"};
|
|
1674
1680
|
}
|
|
1675
|
-
`,
|
|
1681
|
+
`,yi=ge.div`
|
|
1676
1682
|
display: flex;
|
|
1677
1683
|
align-items: center;
|
|
1678
1684
|
position: relative;
|
|
@@ -1695,7 +1701,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1695
1701
|
cursor: not-allowed;
|
|
1696
1702
|
opacity: 0.6;
|
|
1697
1703
|
`}
|
|
1698
|
-
`,
|
|
1704
|
+
`,Xr=ge.input`
|
|
1699
1705
|
flex: 1;
|
|
1700
1706
|
border: none;
|
|
1701
1707
|
outline: none;
|
|
@@ -1714,11 +1720,11 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1714
1720
|
&:disabled {
|
|
1715
1721
|
cursor: not-allowed;
|
|
1716
1722
|
}
|
|
1717
|
-
`,
|
|
1723
|
+
`,xi=ge.span`
|
|
1718
1724
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1719
1725
|
margin: 0 8px;
|
|
1720
1726
|
flex-shrink: 0;
|
|
1721
|
-
`,
|
|
1727
|
+
`,vi=ge.div`
|
|
1722
1728
|
position: absolute;
|
|
1723
1729
|
bottom: -1px;
|
|
1724
1730
|
height: 2px;
|
|
@@ -1729,7 +1735,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1729
1735
|
pointer-events: none;
|
|
1730
1736
|
opacity: 1;
|
|
1731
1737
|
z-index: 1;
|
|
1732
|
-
`,
|
|
1738
|
+
`,Ft=ge.span`
|
|
1733
1739
|
display: flex;
|
|
1734
1740
|
align-items: center;
|
|
1735
1741
|
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
@@ -1742,19 +1748,19 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1742
1748
|
&:hover {
|
|
1743
1749
|
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1744
1750
|
}
|
|
1745
|
-
`;import{Fragment as
|
|
1751
|
+
`;import{Fragment as Ed,jsx as J,jsxs as Te}from"react/jsx-runtime";var Dd=Nd.div`
|
|
1746
1752
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1747
1753
|
padding: 8px 16px;
|
|
1748
1754
|
display: flex;
|
|
1749
1755
|
justify-content: flex-end;
|
|
1750
1756
|
align-items: center;
|
|
1751
|
-
|
|
1757
|
+
`,wi=Si.forwardRef((e,o)=>{let{value:r,defaultValue:s,onChange:n,picker:a="date",showTime:i=!1,format:l,disabled:m=!1,placeholder:d,clearable:p=!1,className:u,style:y,fullWidth:h=!1,styles:b,classNames:w,...g}=e,[f,c]=eo(!1),[P,S]=eo(r||s||null),[C,F]=eo(a==="week"?"date":a),[N,M]=eo(null),[W,O]=eo(!1),T=H=>{H.stopPropagation(),S(null),n?.(null)},{locale:R}=Ce(),k=R?.DatePicker||De.DatePicker;Ci(()=>{r!==void 0&&S(r)},[r]),Ci(()=>{f&&F(a==="week"?"date":a)},[f,a]);let{viewDate:v,days:$,nextMonth:z,prevMonth:j,nextYear:L,prevYear:A,setYear:K,setViewDate:U}=Do({value:P}),{refs:x,floatingStyles:B,context:q}=Cd({open:f,onOpenChange:c,middleware:[wd(4),Pd(),Td()],whileElementsMounted:Md,placement:"bottom-start"}),I=$d(q),{getReferenceProps:oe,getFloatingProps:G}=kd([I]),V=H=>{if(P&&C==="date"&&(H.setHours(P.getHours()),H.setMinutes(P.getMinutes()),H.setSeconds(P.getSeconds())),a==="week"){let ee=Zr(H,{weekStartsOn:1});S(ee),n?.(ee),c(!1)}else S(H),i&&a==="date"||(n?.(H),c(!1))},Y=H=>{S(H)},ue=(H,ee)=>{U(H),a===ee?V(H):ee==="year"?F(a==="quarter"?"quarter":"month"):ee==="month"&&F("date")},ne=()=>{n?.(P),c(!1)},Ye=P?ft(P,l||(i&&a==="date"?k.dateTimeFormat||"yyyy-MM-dd HH:mm:ss":a==="year"?k.yearFormat||"yyyy":a==="month"?"yyyy-MM":a==="quarter"?k.quarterFormat||"yyyy-QQQ":a==="week"?k.weekFormat||"yyyy-wo":k.dateFormat||"yyyy-MM-dd")):"",nt=k.shortWeekDays,Ve=()=>{switch(C){case"year":{let H=Math.floor(v.getFullYear()/10)*10;return Te(Mt,{className:w?.header,style:b?.header,children:[J(ve,{onClick:()=>K(v.getFullYear()-10),children:J(Je,{})}),J(It,{children:`${H}-${H+9}`}),J(ve,{onClick:()=>K(v.getFullYear()+10),children:J(Xe,{})})]})}case"month":case"quarter":return Te(Mt,{className:w?.header,style:b?.header,children:[J(ve,{onClick:A,children:J(Je,{})}),J(It,{onClick:()=>F("year"),children:ft(v,k.yearFormat)}),J(ve,{onClick:L,children:J(Xe,{})})]});default:return Te(Mt,{className:w?.header,style:b?.header,children:[Te(Rt,{children:[J(ve,{onClick:A,children:J(Je,{})}),J(ve,{onClick:j,children:J(at,{})})]}),J(It,{onClick:()=>F("month"),children:k.monthBeforeYear?`${ft(v,k.monthFormat)} ${ft(v,k.yearFormat)}`:`${ft(v,k.yearFormat)} ${ft(v,k.monthFormat)}`}),Te(Rt,{children:[J(ve,{onClick:z,children:J(st,{})}),J(ve,{onClick:L,children:J(Xe,{})})]})]})}},Q=()=>{switch(C){case"year":return J(fi,{viewDate:v,selectedDate:P,onSelect:H=>ue(H,"year")});case"month":return J(di,{viewDate:v,selectedDate:P,onSelect:H=>ue(H,"month")});case"quarter":return J(hi,{viewDate:v,selectedDate:P,onSelect:H=>ue(H,"quarter")});default:{let H=a==="week";return Te(Ed,{children:[Te(Oo,{showWeekNumber:H,children:[H&&J(Zt,{}),nt.map(ee=>J(Zt,{children:ee},ee))]}),J(Vo,{showWeekNumber:H,onMouseLeave:()=>M(null),children:$.map((ee,Ie)=>{let _e=ee.isSelected;if(a==="week"&&P){let Ge=Zr(P,{weekStartsOn:1}),_=$i(P,{weekStartsOn:1});_e=ki(ee.date,{start:Ge,end:_})}let je=!1;if(a==="week"&&N){let Ge=Zr(N,{weekStartsOn:1}),_=$i(N,{weekStartsOn:1});je=ki(ee.date,{start:Ge,end:_})}let Et=Ie%7===0,ht=Ie%7===6;return Te(Si.Fragment,{children:[H&&Et&&J(bi,{isSelected:_e,isHovered:je,onClick:()=>V(ee.date),onMouseEnter:()=>M(ee.date),children:Fd(ee.date)}),J(Wo,{className:w?.day,style:b?.day,isCurrentMonth:ee.isCurrentMonth,isToday:ee.isToday,isSelected:_e,isWeekMode:H,isWeekEnd:ht,isHovered:je,onClick:()=>V(ee.date),onMouseEnter:()=>M(ee.date),children:ft(ee.date,"d")})]},Ie)})})]})}}};return Te(zo,{ref:o,className:`compass-date-picker ${u||""} ${w?.root||""}`,style:{...y,...b?.root},fullWidth:h,children:[J("div",{ref:x.setReference,...oe(),onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:J(jt,{...g,className:w?.input,style:b?.input,fullWidth:h,placeholder:d||k.dateSelect,value:Ye,readOnly:!0,disabled:m,onClick:()=>!m&&c(!f),onChange:H=>{H.target.value||(S(null),n?.(null))},suffix:p&&W&&Ye?J(Ft,{onClick:T,style:{cursor:"pointer"},onMouseDown:H=>{H.preventDefault()},children:J(ze,{})}):J(Ft,{children:J(io,{})})})}),f&&J(Rd,{children:J(Id,{context:q,modal:!1,children:J("div",{ref:x.setFloating,style:{...B,zIndex:1e3},...G(),children:Te(Bo,{className:w?.popup,style:b?.popup,children:[Ve(),Te(Ho,{className:w?.body,style:b?.body,children:[J(Lo,{children:Q()}),i&&a==="date"&&C==="date"&&J(Eo,{value:P,onChange:Y})]}),i&&a==="date"&&Te(Dd,{className:w?.footer,style:b?.footer,children:[J("div",{})," ",J(ye,{size:"small",variant:"primary",onClick:ne,children:k.ok})]})]})})})})]})}),Pi=wi;wi.displayName="DatePicker";import zd,{useState as to,useEffect as Bd,useRef as Hd}from"react";import{useFloating as Ld,useDismiss as Od,useInteractions as Vd,offset as Wd,flip as Ad,shift as Kd,autoUpdate as Yd,FloatingPortal as _d,FloatingFocusManager as jd}from"@floating-ui/react";import{format as gt,isSameDay as Ti,isWithinInterval as Mi,isBefore as en,isAfter as Gd}from"date-fns";import Ud from"@emotion/styled";import{jsx as ae,jsxs as ot}from"react/jsx-runtime";var qd=Ud.div`
|
|
1752
1758
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1753
1759
|
padding: 8px 16px;
|
|
1754
1760
|
display: flex;
|
|
1755
1761
|
justify-content: flex-end;
|
|
1756
1762
|
align-items: center;
|
|
1757
|
-
`,
|
|
1763
|
+
`,Ri=zd.forwardRef((e,o)=>{let{value:r,defaultValue:s,onChange:n,showTime:a=!1,format:i,disabled:l=!1,placeholder:m,clearable:d=!1,className:p,style:u,fullWidth:y=!1,styles:h,classNames:b,status:w}=e,[g,f]=to(!1),[c,P]=to(r||s||[null,null]),[S,C]=to(null),[F,N]=to(null),[M,W]=to(!1),O=Hd(!1);Bd(()=>{r!==void 0&&P(r)},[r]);let{viewDate:T,days:R,nextMonth:k,prevMonth:v,nextYear:$,prevYear:z,setViewDate:j}=Do({value:c[0]||new Date}),{locale:L}=Ce(),A=L?.DatePicker||De.DatePicker,K=Q=>{!Q&&(!c[0]||!c[1])&&(P([null,null]),C(null)),f(Q)},{refs:U,floatingStyles:x,context:B}=Ld({open:g,onOpenChange:K,middleware:[Wd(4),Ad(),Kd()],whileElementsMounted:Yd,placement:"bottom-start"}),q=Od(B),{getReferenceProps:I,getFloatingProps:oe}=Vd([q]),G=Q=>{if(S==="start"){let H=[Q,c[1]];H[1]&&Gd(Q,H[1])&&(H[1]=null),P(H),a||(O.current&&H[0]&&H[1]?(n?.(H),f(!1),C(null)):(O.current=!0,C("end")))}else if(S==="end"){let H=[c[0],Q];H[0]&&en(Q,H[0])&&(H[0]=Q,H[1]=c[0]),P(H),a||(O.current&&H[0]&&H[1]?(n?.(H),f(!1),C(null)):(O.current=!0,C("start")))}},V=(Q,H)=>{let ee=[...c];H==="start"?ee[0]=Q:ee[1]=Q,P(ee)},Y=()=>{if(!c[0]){C("start");return}if(!c[1]){C("end");return}n?.(c),f(!1),C(null)},ue=Q=>{l||(f(!0),O.current=!1,C(Q),Q==="start"&&c[0]?j(c[0]):Q==="end"&&c[1]&&j(c[1]))},ne=Q=>{Q.stopPropagation(),P([null,null]),n?.([null,null]),C(null)},Re=()=>i||(a?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"),Ye=Q=>{if(c[0]&&c[1])return Mi(Q,{start:c[0],end:c[1]});if(S==="end"&&c[0]&&F){let H=en(c[0],F)?c[0]:F,ee=en(c[0],F)?F:c[0];return Mi(Q,{start:H,end:ee})}return!1},nt=Q=>c[0]&&Ti(Q,c[0])||c[1]&&Ti(Q,c[1]),Ve=A.shortWeekDays;return ot(zo,{ref:o,className:`compass-date-range-picker ${p||""} ${b?.root||""}`,style:{...u,...h?.root},fullWidth:y,children:[ae("div",{ref:U.setReference,...I(),children:ot(yi,{focused:g,disabled:l,error:w==="error",className:b?.input,style:h?.input,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[ae(Xr,{placeholder:m?.[0]||A.startDate,value:c[0]?gt(c[0],Re()):"",readOnly:!0,disabled:l,onClick:()=>ue("start")}),ae(xi,{children:"\u2192"}),ae(Xr,{placeholder:m?.[1]||A.endDate,value:c[1]?gt(c[1],Re()):"",readOnly:!0,disabled:l,onClick:()=>ue("end")}),d&&M&&(c[0]||c[1])?ae(Ft,{onClick:ne,style:{cursor:"pointer"},role:"button","aria-label":"clear",children:ae(ze,{})}):ae(Ft,{children:ae(io,{})}),g&&S&&ae(vi,{position:S==="start"?"left":"right"})]})}),g&&ae(_d,{children:ae(jd,{context:B,modal:!1,children:ae("div",{ref:U.setFloating,style:{...x,zIndex:1e3},...oe(),children:ot(Bo,{className:b?.popup,style:h?.popup,children:[ot(Mt,{className:b?.header,style:h?.header,children:[ot(Rt,{children:[ae(ve,{onClick:z,children:ae(Je,{})}),ae(ve,{onClick:v,children:ae(at,{})})]}),ae(It,{children:A.monthBeforeYear?`${gt(T,A.monthFormat)} ${gt(T,A.yearFormat)}`:`${gt(T,A.yearFormat)} ${gt(T,A.monthFormat)}`}),ot(Rt,{children:[ae(ve,{onClick:k,children:ae(st,{})}),ae(ve,{onClick:$,children:ae(Xe,{})})]})]}),ot(Ho,{className:b?.body,style:h?.body,children:[ot(Lo,{children:[ae(Oo,{children:Ve.map(Q=>ae(Zt,{children:Q},Q))}),ae(Vo,{children:R.map((Q,H)=>{let ee=Ye(Q.date),Ie=nt(Q.date);return ae(Wo,{className:b?.day,style:h?.day,isCurrentMonth:Q.isCurrentMonth,isToday:Q.isToday,isSelected:!!Ie,isInRange:ee&&!Ie,onClick:()=>G(Q.date),onMouseEnter:()=>N(Q.date),onMouseLeave:()=>N(null),children:gt(Q.date,"d")},H)})})]}),a&&S&&ae(Eo,{value:S==="start"?c[0]:c[1],onChange:Q=>V(Q,S)})]}),a&&ae(qd,{className:b?.footer,style:h?.footer,children:ae(ye,{size:"small",variant:"primary",onClick:Y,disabled:S==="start"?!c[0]:!c[1],children:A.ok})})]})})})})]})}),Ii=Ri;Ri.displayName="DateRangePicker";var Fi=Pi;Fi.RangePicker=Ii;var Qd=Fi;import tm,{useEffect as om,useLayoutEffect as rm,useRef as nm}from"react";import Di,{createContext as Jd,useContext as Xd,useMemo as Zd}from"react";var be=e=>e?Array.isArray(e)?e:[e]:[],Ni=(e,o)=>{let r=e.map(be),s=be(o);return r.some(n=>Oe(n,s))},Oe=(e,o)=>e.length!==o.length?!1:e.every((r,s)=>r===o[s]),Me=(e,o)=>{let r=e;for(let s=0;s<o.length;s++){if(r==null)return;r=r[o[s]]}return r},Nt=(e,o,r)=>{let s={...e},n=s;for(let a=0;a<o.length;a++){let i=o[a],l=n;if(a===o.length-1)l[i]=r;else{if(!l[i]||typeof l[i]!="object"){let m=o[a+1];l[i]=typeof m=="number"?[]:{}}Array.isArray(l[i])?l[i]=[...l[i]]:l[i]={...l[i]},n=l[i]}}return s};var Ao=class{store={};fieldEntities=[];watchList=[];initialValues={};callbacks={};forceRootUpdate;constructor(o,r={}){this.store={...r},this.initialValues=r,this.forceRootUpdate=o}getFieldValue=o=>{let r=be(o);return Me(this.store,r)};getFieldsValue=()=>({...this.store});getFieldError=o=>{let r=be(o),s=this.getFieldEntity(r);return s?s.getErrors():[]};getFieldData=o=>{let r=this.getFieldEntity(o);return{name:o,value:this.getFieldValue(o),touched:this.isFieldTouched(o),validating:r?.isFieldValidating()||!1,errors:r?.getErrors()||[]}};isFieldsTouched=o=>o?o.some(r=>{let s=be(r),n=Me(this.store,s),a=Me(this.initialValues,s);return n!==a}):this.fieldEntities.some(r=>{let s=r.getNamePath(),n=Me(this.store,s),a=Me(this.initialValues,s);return n!==a});isFieldTouched=o=>this.isFieldsTouched([o]);isFieldValidating=o=>{if(o){let r=be(o);return this.getFieldEntity(r)?.isFieldValidating()||!1}return this.fieldEntities.some(r=>r.isFieldValidating())};notifyFieldChange=o=>{if(this.callbacks.onFieldsChange){let r=this.getFieldData(o),s=this.fieldEntities.map(n=>{let a=n.getNamePath();return a?this.getFieldData(a):null}).filter(n=>n!==null);this.callbacks.onFieldsChange([r],s)}};resetFields=o=>{let r=o?.map(be)||this.fieldEntities.map(s=>s.getNamePath()).filter(s=>!!s&&s.length>0);r.forEach(s=>{let n=Me(this.initialValues,s);this.store=Nt(this.store,s,n);let a=this.getFieldEntity(s);a&&a.setErrors([])}),r.forEach(s=>{this.notify(s)})};setFieldValue=(o,r)=>{let s=be(o);Me(this.store,s)!==r&&(this.store=Nt(this.store,s,r),this.notify(s),this.callbacks.onValuesChange&&this.callbacks.onValuesChange({[s.join(".")]:r},this.store))};setFields=o=>{o.forEach(r=>{let{name:s,value:n,errors:a}=r,i=be(s);if(n!==void 0&&(this.store=Nt(this.store,i,n)),a!==void 0){let l=this.getFieldEntity(i);l&&l.setErrors(a)}this.notify(i)}),this.callbacks.onValuesChange&&o.forEach(({value:r})=>{r!==void 0&&this.callbacks.onValuesChange?.(this.store,this.store)})};setFieldsValue=o=>{let r=(s,n=[])=>{s&&typeof s=="object"&&!Array.isArray(s)?Object.keys(s).forEach(a=>{r(s[a],[...n,a])}):n.length>0&&(this.store=Nt(this.store,n,s),this.notify(n))};r(o),this.callbacks.onValuesChange&&this.callbacks.onValuesChange(o,this.store)};registerField=o=>{this.fieldEntities.push(o);let r=o.getNamePath(),s=Me(this.initialValues,r),n=Me(this.store,r);return r.length>0&&s!==void 0&&n===void 0&&(this.store=Nt(this.store,r,s)),()=>{this.fieldEntities=this.fieldEntities.filter(a=>a!==o)}};registerWatch=o=>(this.watchList.push(o),()=>{this.watchList=this.watchList.filter(r=>r!==o)});notify=o=>{this.fieldEntities.forEach(r=>{let{dependencies:s}=r.props,n=r.getNamePath();Oe(n,o)?r.onStoreChange():s&&s.some(i=>{let l=be(i);return Oe(l,o)||o.length>l.length&&Oe(o.slice(0,l.length),l)})&&r.isFieldTouched()&&r.validateRules()}),this.watchList.forEach(r=>r(o))};getFieldEntity=o=>this.fieldEntities.find(r=>Oe(r.getNamePath(),o));setCallbacks=o=>{this.callbacks={...this.callbacks,...o}};parseValidateFieldsArgs=(o,r)=>o&&!Array.isArray(o)&&typeof o=="object"?{nameList:void 0,validateOnly:!!o.validateOnly}:{nameList:o,validateOnly:!!r?.validateOnly};validateFields=async(o,r)=>{let{nameList:s,validateOnly:n}=this.parseValidateFieldsArgs(o,r),a=this.getFieldsValue(),i=[];this.fieldEntities.forEach(p=>{let u=p.getNamePath();u.length&&(!s||Ni(s,u))&&i.push({name:u,promise:p.validateRules({validateOnly:n})})});let m=(await Promise.all(i.map(p=>p.promise))).map((p,u)=>!p||p.length===0?null:{name:i[u].name,errors:p}).filter(p=>p!==null);if(m.length===0)return a;throw{values:a,errorFields:m,outOfDate:!1}};setInitialValues=(o,r)=>{this.initialValues=o||{},r&&(this.store={...this.initialValues},this.fieldEntities.forEach(s=>{s.onStoreChange()}),this.forceRootUpdate&&this.forceRootUpdate({}))};submit=()=>{this.validateFields().then(o=>{this.callbacks.onFinish&&this.callbacks.onFinish(o)}).catch(o=>{this.callbacks.onFinishFailed&&this.callbacks.onFinishFailed(o)})}};var tn=Jd(null),Ko=()=>Xd(tn),Yo=e=>{let[,o]=Di.useState({}),[r]=Di.useState(()=>new Ao(o));return[Zd(()=>e||{getFieldValue:n=>r.getFieldValue(n),setFieldValue:(n,a)=>r.setFieldValue(n,a),validateFields:(n,a)=>r.validateFields(n,a),getFieldsValue:()=>r.getFieldsValue(),setFieldsValue:n=>r.setFieldsValue(n),getFieldError:n=>r.getFieldError(n),isFieldsTouched:n=>r.isFieldsTouched(n),isFieldTouched:n=>r.isFieldTouched(n),isFieldValidating:n=>r.isFieldValidating(n),resetFields:n=>r.resetFields(n),setFields:n=>r.setFields(n),submit:()=>r.submit(),getInternalHooks:n=>n==="COMPASS_FORM_INTERNAL_HOOKS"?{registerField:r.registerField,registerWatch:r.registerWatch,setInitialValues:r.setInitialValues,setCallbacks:r.setCallbacks,dispatch:()=>{},getFieldValue:r.getFieldValue,notifyFieldChange:r.notifyFieldChange}:null},[e,r])]};import em from"@emotion/styled";var Ei=em.form`
|
|
1758
1764
|
&.compass-form-horizontal {
|
|
1759
1765
|
.compass-form-item {
|
|
1760
1766
|
display: flex;
|
|
@@ -1798,18 +1804,18 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1798
1804
|
}
|
|
1799
1805
|
}
|
|
1800
1806
|
}
|
|
1801
|
-
`;import{jsx as
|
|
1807
|
+
`;import{jsx as zi}from"react/jsx-runtime";var on=tm.forwardRef(({form:e,layout:o="vertical",initialValues:r,children:s,onFinish:n,onFinishFailed:a,onValuesChange:i,onFieldsChange:l,className:m,style:d,classNames:p,styles:u},y)=>{let[h]=Yo(e),b=h.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS"),w=nm(!1);return rm(()=>{!w.current&&r&&b&&(b.setInitialValues(r,!0),w.current=!0)},[r,b]),om(()=>{b&&b.setCallbacks({onFinish:n,onFinishFailed:a,onValuesChange:i,onFieldsChange:l})},[n,a,i,l,b]),zi(tn.Provider,{value:{...h,classNames:p,styles:u},children:zi(Ei,{ref:y,className:`compass-form compass-form--${o} ${m||""} ${p?.form||""}`,style:{...d,...u?.form},onSubmit:g=>{g.preventDefault(),g.stopPropagation(),h.submit()},children:s})})});on.displayName="Form";import{cloneElement as am,useState as an,useLayoutEffect as sm,useCallback as Dt,useRef as Li,useEffect as im,useMemo as lm}from"react";import cm from"async-validator";import _o from"@emotion/styled";var rn=_o.div`
|
|
1802
1808
|
margin-bottom: ${t("spacing.lg","24px")};
|
|
1803
1809
|
position: relative;
|
|
1804
1810
|
display: flex;
|
|
1805
1811
|
flex-direction: column;
|
|
1806
1812
|
width: fit-content;
|
|
1807
|
-
`,
|
|
1813
|
+
`,nn=_o.label`
|
|
1808
1814
|
display: block;
|
|
1809
1815
|
margin-bottom: ${t("components.form.labelMarginBottom",t("spacing.xs","8px"))};
|
|
1810
1816
|
font-size: ${t("components.form.labelFontSize",t("fontSize.md","14px"))};
|
|
1811
1817
|
color: ${t("components.form.labelColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
1812
|
-
`,
|
|
1818
|
+
`,Bi=_o.div`
|
|
1813
1819
|
color: ${t("components.form.errorColor",t("colors.error","#ff4d4f"))};
|
|
1814
1820
|
font-size: ${t("components.form.errorFontSize",t("fontSize.sm","12px"))};
|
|
1815
1821
|
margin-bottom: 0;
|
|
@@ -1819,9 +1825,9 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1819
1825
|
overflow-wrap: break-word;
|
|
1820
1826
|
word-break: break-all;
|
|
1821
1827
|
white-space: pre-wrap;
|
|
1822
|
-
`,
|
|
1828
|
+
`,Hi=_o.div`
|
|
1823
1829
|
margin-bottom: calc(-1 * ${t("spacing.lg","24px")});
|
|
1824
|
-
`;import{Fragment as
|
|
1830
|
+
`;import{Fragment as pm,jsx as jo,jsxs as sn}from"react/jsx-runtime";var ln=e=>{let{name:o,label:r,rules:s=[],children:n,validateTrigger:a="onChange",className:i,style:l,help:m}=e,d=Ko(),{classNames:p,styles:u}=d||{},[y,h]=an([]),[b,w]=an(!1),g=Li(y),f=Li(b),c=lm(()=>be(o||[]),[o]);im(()=>{g.current=y,f.current=b,o&&d&&d.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.notifyFieldChange(c)},[y,b,o,c,d]);let[,P]=an({}),S=Dt(()=>{P({})},[]),C=Dt(async(v={})=>{if(!o||!s||s.length===0)return null;let $=("triggerName"in v,d?.getFieldValue(c)),z=c.join("."),j={[z]:s},L=new cm(j),{validateOnly:A=!1}=v;A||(w(!0),f.current=!0);try{return await L.validate({[z]:$},{suppressWarning:!0}),A||(h([]),g.current=[]),null}catch(K){if(K&&typeof K=="object"&&"errors"in K){let x=K.errors.map(B=>B.message||"");return A||(h(x),g.current=x),x}console.error("[FormItem] Validation error:",K);let U=[K instanceof Error?K.message:String(K)];return A||(g.current=U),U}finally{A||(w(!1),f.current=!1)}},[d,o,c,s]),F=Dt(()=>g.current,[]),N=Dt(()=>c,[c]),M=Dt(()=>f.current,[]),W=Dt(()=>o&&d?.isFieldTouched(c)||!1,[o,c,d]);if(sm(()=>{if(o&&d){let v=d.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.registerField;return v?.({onStoreChange:S,validateRules:C,getNamePath:N,getErrors:F,isFieldValidating:M,isFieldTouched:W,setErrors:z=>h(z),props:e})}},[o,d,S,C,N,F,M,W,e]),!o||!d)return sn(rn,{className:`compass-form-item ${i||""} ${p?.item||""}`,style:{...l,...u?.item},children:[r&&jo(nn,{className:`compass-form-item-label ${p?.label||""}`,style:u?.label,children:r}),n]});let O=d.getFieldValue(c),T=v=>{let $={...v.props};return $.value=O===void 0?"":O,$.name=c.join("."),y.length>0&&($.status="error"),(Array.isArray(a)?a:[a]).forEach(j=>{let L=$[j];$[j]=(...A)=>{L?.(...A);let K;if(j==="onChange"){let U=A[0],x=U;U&&typeof U=="object"&&U.target&&(x=U.target.value),K=x,d.setFieldValue(c,K),d.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.notifyFieldChange(c)}s.length>0&&C(j==="onChange"?{triggerName:"onChange"}:{})}}),am(v,$)},R=m!==void 0?m:y.length>0?y[0]:null,k=!!R;return sn(rn,{className:`compass-form-item ${i||""} ${p?.item||""}`,style:{...l,...u?.item},hasError:k,children:[r&&jo(nn,{className:`compass-form-item-label ${p?.label||""}`,style:u?.label,children:r}),T(n),k&&sn(pm,{children:[jo(Bi,{className:`compass-form-item-error-message ${p?.error||""}`,style:u?.error,children:R}),jo(Hi,{})]})]})};ln.displayName="FormItem";import{useState as dm,useEffect as mm,useRef as um,useMemo as fm}from"react";var Oi=(e,o)=>{let r=Ko(),s=o||r,n=fm(()=>be(e),[e]),a=()=>{if(s){let d=s.getFieldsValue();return Me(d,n)}},[i,l]=dm(a),m=um(i);return m.current=i,mm(()=>{if(!s)return;let d=s.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS");if(!d)return;let p=h=>{if(Oe(h,n)||n.length>h.length&&Oe(n.slice(0,h.length),h)||h.length>n.length&&Oe(h.slice(0,n.length),n)){let b=s.getFieldValue(n);l(b)}},u=d.registerWatch(p),y=s.getFieldValue(n);return JSON.stringify(y)!==JSON.stringify(m.current)&&l(y),u},[s,n.join(".")]),i};var Go=on;Go.Item=ln;Go.useForm=Yo;Go.useWatch=Oi;var gm=Go;import oo,{useEffect as ym,useRef as xm,useState as qi}from"react";import Ke from"@emotion/styled";var Vi=Ke.div`
|
|
1825
1831
|
display: flex;
|
|
1826
1832
|
flex-direction: ${({$tabBarPosition:e})=>e==="left"||e==="right"?"row":"column"};
|
|
1827
1833
|
width: 100%;
|
|
@@ -1834,7 +1840,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1834
1840
|
${({$tabBarPosition:e})=>e==="right"&&`
|
|
1835
1841
|
flex-direction: row-reverse;
|
|
1836
1842
|
`}
|
|
1837
|
-
`,
|
|
1843
|
+
`,Wi=Ke.div`
|
|
1838
1844
|
display: flex;
|
|
1839
1845
|
flex: none;
|
|
1840
1846
|
position: relative;
|
|
@@ -1863,7 +1869,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1863
1869
|
width: 100%;
|
|
1864
1870
|
overflow: hidden;
|
|
1865
1871
|
`}
|
|
1866
|
-
`,
|
|
1872
|
+
`,Ai=Ke.div`
|
|
1867
1873
|
display: flex;
|
|
1868
1874
|
flex: auto;
|
|
1869
1875
|
align-self: flex-start;
|
|
@@ -1893,7 +1899,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1893
1899
|
&::-webkit-scrollbar-track {
|
|
1894
1900
|
background-color: transparent;
|
|
1895
1901
|
}
|
|
1896
|
-
`,
|
|
1902
|
+
`,Ki=Ke.div`
|
|
1897
1903
|
display: flex;
|
|
1898
1904
|
position: relative;
|
|
1899
1905
|
transition: transform 0.3s;
|
|
@@ -1901,7 +1907,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1901
1907
|
flex-direction: column;
|
|
1902
1908
|
width: 100%;
|
|
1903
1909
|
`}
|
|
1904
|
-
`,
|
|
1910
|
+
`,Yi=Ke.div`
|
|
1905
1911
|
position: relative;
|
|
1906
1912
|
display: inline-flex;
|
|
1907
1913
|
align-items: center;
|
|
@@ -1933,7 +1939,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1933
1939
|
border-radius: 4px 4px 0 0;
|
|
1934
1940
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
1935
1941
|
`}}
|
|
1936
|
-
`,
|
|
1942
|
+
`,_i=Ke.span`
|
|
1937
1943
|
display: inline-flex;
|
|
1938
1944
|
align-items: center;
|
|
1939
1945
|
justify-content: center;
|
|
@@ -1950,7 +1956,7 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1950
1956
|
background-color: rgba(0, 0, 0, 0.06);
|
|
1951
1957
|
color: ${()=>t("colors.text","#333")};
|
|
1952
1958
|
}
|
|
1953
|
-
`,
|
|
1959
|
+
`,ji=Ke.div`
|
|
1954
1960
|
position: absolute;
|
|
1955
1961
|
background: ${()=>t("components.tabs.inkBarColor",t("colors.primary","#1890ff"))};
|
|
1956
1962
|
pointer-events: none;
|
|
@@ -1973,15 +1979,15 @@ import kl from"react";import oo from"@emotion/styled";import yl from"react";impo
|
|
|
1973
1979
|
left: ${o}px;
|
|
1974
1980
|
${e==="bottom"?"top: 0;":"bottom: 0;"}
|
|
1975
1981
|
`}}
|
|
1976
|
-
`,
|
|
1982
|
+
`,Gi=Ke.div`
|
|
1977
1983
|
display: flex;
|
|
1978
1984
|
flex: auto;
|
|
1979
1985
|
flex-direction: column;
|
|
1980
1986
|
min-width: 0;
|
|
1981
1987
|
min-height: 0;
|
|
1982
|
-
`,
|
|
1988
|
+
`,Uo=Ke.div`
|
|
1983
1989
|
flex: none;
|
|
1984
1990
|
width: 100%;
|
|
1985
1991
|
outline: none;
|
|
1986
1992
|
display: ${({$active:e})=>e?"block":"none"};
|
|
1987
|
-
`;import
|
|
1993
|
+
`;import hm from"react";import{jsx as bm}from"react/jsx-runtime";var Ui=hm.forwardRef(({children:e,active:o=!1,className:r,style:s,...n},a)=>bm(Uo,{ref:a,$active:o,className:r,style:s,role:"tabpanel","aria-hidden":!o,...n,children:e}));Ui.displayName="TabPane";var cn=Ui;import{jsx as rt,jsxs as qo}from"react/jsx-runtime";var pn=oo.forwardRef(({activeKey:e,defaultActiveKey:o,onChange:r,onEdit:s,items:n,tabBarExtraContent:a,tabPosition:i="top",tabBarPosition:l,type:m="line",size:d="default",children:p,className:u,style:y,styles:h,classNames:b,...w},g)=>{let f=l||i,c=oo.useMemo(()=>{if(n)return n;if(p){let R=[];return oo.Children.forEach(p,k=>{oo.isValidElement(k)&&k.type===cn&&R.push({key:k.key,label:k.props.tab,children:k.props.children,disabled:k.props.disabled,...k.props})}),R}return[]},[n,p]),[P,S]=qi(()=>e!==void 0?e:o!==void 0?o:c.length>0?c[0].key:""),C=e!==void 0?e:P,[F,N]=qi({left:0,width:0,top:0,height:0}),M=xm(null),W=oo.useCallback(()=>{if(!M.current)return;let R=M.current.querySelector(`[data-key="${C}"]`);R&&N({left:R.offsetLeft,width:R.offsetWidth,top:R.offsetTop,height:R.offsetHeight})},[C]);ym(()=>{W()},[W,i,c.length]);let O=(R,k)=>{k||(e===void 0&&S(R),r?.(R))},T=(R,k,v)=>{R.stopPropagation(),s?.(k,v)};return qo(Vi,{ref:g,$tabPosition:i,$tabBarPosition:f,className:`compass-tabs compass-tabs--${i} compass-tabs--${d} ${u||""} ${b?.root||""}`,style:{...y,...h?.root},...w,children:[qo(Wi,{$tabPosition:i,$tabBarPosition:f,$type:m,className:`compass-tabs-nav ${b?.nav||""}`,style:h?.nav,children:[rt(Ai,{$tabPosition:i,className:"compass-tabs-nav-wrap",children:qo(Ki,{ref:M,$tabPosition:i,className:"compass-tabs-nav-list",children:[c.map(R=>qo(Yi,{"data-key":R.key,$active:C===R.key,$disabled:R.disabled,$size:d,$position:i,$type:m,onClick:()=>O(R.key,R.disabled),role:"tab","aria-selected":C===R.key,"aria-disabled":R.disabled,className:`compass-tabs-tab ${C===R.key?"compass-tabs-tab-active":""} ${R.disabled?"compass-tabs-tab-disabled":""}`,children:[R.icon&&rt("span",{style:{marginRight:8,display:"inline-flex",alignItems:"center"},children:R.icon}),R.label,m==="editable-card"&&R.closable!==!1&&rt(_i,{role:"button","aria-label":"close",onClick:k=>T(k,R.key,"remove"),children:rt(Ee,{})})]},R.key)),rt(ji,{$left:F.left,$width:F.width,$top:F.top,$height:F.height,$position:i,$type:m,className:`compass-tabs-ink-bar ${b?.inkBar||""}`,style:h?.inkBar})]})}),a&&rt("div",{style:{marginLeft:"auto"},children:a})]}),rt(Gi,{className:`compass-tabs-content ${b?.content||""}`,style:h?.content,children:c.map(R=>rt(Uo,{$active:C===R.key,role:"tabpanel",className:`compass-tabs-tabpane ${C===R.key?"compass-tabs-tabpane-active":""}`,children:R.children},R.key))})]})});pn.displayName="Tabs";pn.TabPane=cn;var Qi=pn;var vm=Qi;export{sp as AutoComplete,ye as Button,Rp as ConfigProvider,Qd as DatePicker,Vc as Dropdown,gm as Form,jt as InputField,yr as InputNumber,Er as Menu,Tp as Message,Wp as Modal,Cr as Pagination,Up as Progress,po as Select,Ml as Steps,ka as Table,vm as Tabs,Rr as Tree,Sc as TreeSelect};
|