@xinghunm/compass-ui 0.6.0 → 0.7.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 +663 -147
- package/dist/index.d.ts +663 -147
- package/dist/index.js +1019 -814
- package/dist/index.mjs +1021 -816
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ki=Object.create;var wo=Object.defineProperty;var wi=Object.getOwnPropertyDescriptor;var $i=Object.getOwnPropertyNames;var Pi=Object.getPrototypeOf,Ti=Object.prototype.hasOwnProperty;var Mi=(e,t)=>{for(var o in t)wo(e,o,{get:t[o],enumerable:!0})},ln=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of $i(t))!Ti.call(e,r)&&r!==o&&wo(e,r,{get:()=>t[r],enumerable:!(n=wi(t,r))||n.enumerable});return e};var N=(e,t,o)=>(o=e!=null?ki(Pi(e)):{},ln(t||!e||!e.__esModule?wo(o,"default",{value:e,enumerable:!0}):o,e)),Ri=e=>ln(wo({},"__esModule",{value:!0}),e);var vl={};Mi(vl,{Button:()=>Me,ConfigProvider:()=>Qa,DatePicker:()=>ri,Dropdown:()=>$a,Form:()=>ci,InputField:()=>Lo,InputNumber:()=>vo,Menu:()=>Bo,Message:()=>Va,Modal:()=>as,Pagination:()=>Ws,Progress:()=>xs,Select:()=>yo,Steps:()=>An,Tabs:()=>Si,Tree:()=>No,TreeSelect:()=>fa});module.exports=Ri(vl);var Cn=N(require("react"));var to=N(require("@emotion/styled"));var mn=N(require("react")),gn=require("react"),hn=N(require("@emotion/styled"));var st=require("react"),un=N(require("@emotion/styled")),fn=require("react-transition-group");var eo=require("react"),yr=N(require("@emotion/styled")),Nt=require("@emotion/react"),cn=require("react-transition-group"),$o=require("react/jsx-runtime"),Ii=e=>Nt.keyframes`
|
|
1
|
+
"use strict";var cl=Object.create;var Bo=Object.defineProperty;var pl=Object.getOwnPropertyDescriptor;var dl=Object.getOwnPropertyNames;var ml=Object.getPrototypeOf,ul=Object.prototype.hasOwnProperty;var fl=(e,o)=>{for(var r in o)Bo(e,r,{get:o[r],enumerable:!0})},En=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of dl(o))!ul.call(e,n)&&n!==r&&Bo(e,n,{get:()=>o[n],enumerable:!(a=pl(o,n))||a.enumerable});return e};var K=(e,o,r)=>(r=e!=null?cl(ml(e)):{},En(o||!e||!e.__esModule?Bo(r,"default",{value:e,enumerable:!0}):r,e)),gl=e=>En(Bo({},"__esModule",{value:!0}),e);var mc={};fl(mc,{AutoComplete:()=>Bs,Button:()=>Ie,ConfigProvider:()=>ri,DatePicker:()=>Wi,Dropdown:()=>Ts,Form:()=>qi,InputField:()=>oo,InputNumber:()=>Uo,Menu:()=>sr,Message:()=>Us,Modal:()=>mi,Pagination:()=>Xo,Progress:()=>wi,Select:()=>So,Steps:()=>ya,Table:()=>Zr,Tabs:()=>ll,Tree:()=>nr,TreeSelect:()=>hs});module.exports=gl(mc);var Jn=K(require("react"));var yo=K(require("@emotion/styled"));var Yn=K(require("react")),_n=require("react"),jn=K(require("@emotion/styled"));var be={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 zn={...be,colors:{...be.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:{...be.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:{...be.components,modal:{...be.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:{...be.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:{...be.components.progress,trackColor:"#303030"},steps:{...be.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:{...be.components.input,activeBorderColor:"#177ddc",hoverBorderColor:"#177ddc"},form:{...be.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"}}};var We=require("react"),_t=require("@emotion/react");var Bn=(e,o)=>e?.components?.[o]||be.components[o],ue=(e,o)=>e?.[o]||be[o];function Er(e,o){if(!o)return e;if(!e)return o;let r={...e},a=o;return Object.keys(a).forEach(n=>{let s=r[n],i=a[n];Array.isArray(s)&&Array.isArray(i)?r[n]=[...s,...i]:s&&typeof s=="object"&&i&&typeof i=="object"?r[n]=Er(s,i):i!==void 0&&(r[n]=i)}),r}var Hn="compass";function Ln(e){let o={};function r(a,n){if(!a||typeof a!="object")return;let s=a;Object.keys(s).forEach(i=>{let l=s[i],d=[...n,i];if(typeof l=="string"||typeof l=="number"){let c=`--${Hn}-${d.join("-")}`,m=l;typeof l=="number"&&["borderRadius","spacing","fontSize"].includes(d[0])&&(m=`${l}px`),o[c]=m}else l&&typeof l=="object"&&r(l,d)})}return r(e,[]),o}function hl(e){return`--${Hn}-${e.replace(/\./g,"-")}`}function t(e,o){let r=hl(e);return o?`var(${r}, ${o})`:`var(${r})`}var Yt=require("react/jsx-runtime"),zr=(0,We.createContext)(void 0),bl=({children:e,theme:o,lightTheme:r,darkTheme:a,defaultMode:n="light",global:s})=>{let[i,l]=(0,We.useState)(n),c=!!(0,We.useContext)(zr),m=s??!c;(0,We.useEffect)(()=>{l(n)},[n]);let f=(0,We.useMemo)(()=>{let w=i==="dark"?zn:be;return((...p)=>{let P={...w};return p.forEach(v=>{v&&(P=Er(P,v))}),P})(o,i==="dark"?a:r)},[i,o,r,a]),x=()=>{l(w=>w==="light"?"dark":"light")},b=(0,We.useMemo)(()=>({mode:i,setMode:l,toggleTheme:x,theme:f}),[i,f]),y=(0,We.useMemo)(()=>Ln(f),[f]);return(0,Yt.jsx)(zr.Provider,{value:b,children:(0,Yt.jsxs)(_t.ThemeProvider,{theme:f,children:[m&&(0,Yt.jsx)(_t.Global,{styles:(0,_t.css)({":root":y})}),(0,Yt.jsx)("div",{className:"compass-theme-scope",style:{display:"contents",...m?{}:y},children:e})]})})},Br=()=>{let e=(0,We.useContext)(zr);return e||{mode:"light",setMode:()=>{},toggleTheme:()=>{},theme:be}},ho=bl;var ht=require("react"),An=K(require("@emotion/styled")),Kn=require("react-transition-group");var bo=require("react"),Hr=K(require("@emotion/styled")),jt=require("@emotion/react"),On=require("react-transition-group"),Ho=require("react/jsx-runtime"),yl=e=>jt.keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0.1;
|
|
@@ -7,37 +7,37 @@
|
|
|
7
7
|
transform: scale(1);
|
|
8
8
|
opacity: ${e};
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,xl=jt.keyframes`
|
|
11
11
|
0% {
|
|
12
12
|
opacity: 1;
|
|
13
13
|
}
|
|
14
14
|
100% {
|
|
15
15
|
opacity: 0;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
18
|
-
opacity: ${
|
|
17
|
+
`,vl=(e,o)=>{let r=o||.3;return jt.css`
|
|
18
|
+
opacity: ${r};
|
|
19
19
|
transform: scale(1);
|
|
20
|
-
animation: ${
|
|
21
|
-
`},
|
|
20
|
+
animation: ${yl(r)} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
+
`},Sl=e=>jt.css`
|
|
22
22
|
opacity: 0;
|
|
23
|
-
animation: ${
|
|
24
|
-
`,
|
|
23
|
+
animation: ${xl} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
24
|
+
`,Cl=Hr.default.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&&vl(e.$duration,e.$opacity)};
|
|
32
|
+
`,$l=Hr.default.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&&Sl(e.$duration)};
|
|
40
|
+
`,Vn=e=>{let{rippleX:o,rippleY:r,rippleSize:a,bgColor:n,opacity:s,...i}=e,[l,d]=(0,bo.useState)(!1),[c,m]=(0,bo.useState)(!1),f=(0,bo.useRef)(null),x=()=>{d(!0)},b=()=>{m(!0)},y={width:a,height:a,top:-(a/2)+r,left:-(a/2)+o};return(0,Ho.jsx)(On.Transition,{...i,nodeRef:f,onEnter:x,onExit:b,children:(0,Ho.jsx)(Cl,{ref:f,$visible:l,$opacity:s,style:y,$duration:i.timeout.enter,children:(0,Ho.jsx)($l,{$bgColor:n,$leaving:c,$duration:i.timeout.exit})})})};var Lo=require("react/jsx-runtime"),kl=An.default.div`
|
|
41
41
|
display: block;
|
|
42
42
|
position: absolute;
|
|
43
43
|
overflow: hidden;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
top: 0;
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
z-index: 0;
|
|
51
|
-
`,
|
|
51
|
+
`,Wn=500,Lr=(0,ht.forwardRef)((e,o)=>{let r=(0,ht.useRef)(0),[a,n]=(0,ht.useState)([]),s=(0,ht.useRef)(null),i=c=>{let{rippleX:m,rippleY:f,rippleSize:x}=c;n([...a,{num:++r.current,timeout:{exit:Wn,enter:Wn},rippleX:m,rippleY:f,rippleSize:x}])},l=c=>{let m=s.current;if(!m)return;let f=m.getBoundingClientRect(),x=c.clientX,b=c.clientY,y=Math.round(x-f.left),w=Math.round(b-f.top),g=Math.max(Math.abs(m.clientWidth-y),y)*2+2,u=Math.max(Math.abs(m.clientHeight-w),w)*2+2,p=Math.sqrt(g**2+u**2);i({rippleX:y,rippleY:w,rippleSize:p})},d=()=>{a.length&&n(c=>c.slice(1))};return(0,ht.useImperativeHandle)(o,()=>({start:l,stop:d})),(0,Lo.jsx)(kl,{ref:s,children:(0,Lo.jsx)(Kn.TransitionGroup,{component:"span",children:a.map(({num:c,...m})=>(0,Lo.jsx)(Vn,{...m,...e},c))})})});Lr.displayName="TouchRipple";var Oo=require("react/jsx-runtime"),wl=jn.default.button`
|
|
52
52
|
display: inline-flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
justify-content: center;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
padding: 0;
|
|
60
60
|
cursor: pointer;
|
|
61
61
|
background: transparent;
|
|
62
|
-
`,
|
|
62
|
+
`,Or=Yn.default.forwardRef((e,o)=>{let{hasRipple:r=!0,className:a,children:n,...s}=e,{theme:i}=Br(),l=Bn(i,"button").rippleOpacity,d=(0,_n.useRef)(),c=f=>{r&&d.current&&d.current.start(f)},m=f=>{r&&d.current&&d.current.stop(f)};return(0,Oo.jsxs)(wl,{ref:o,...s,className:a,onMouseLeave:m,onMouseUp:m,onMouseDown:c,children:[n,(0,Oo.jsx)(Lr,{ref:d,opacity:l})]})});Or.displayName="ButtonBase";var Gn=(0,yo.default)(Or)`
|
|
63
63
|
display: inline-flex;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
@@ -72,107 +72,120 @@
|
|
|
72
72
|
box-sizing: border-box;
|
|
73
73
|
position: relative;
|
|
74
74
|
white-space: nowrap;
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
font-weight: ${t("fontWeight.normal","400")};
|
|
77
|
+
transition: ${t("transitions.normal","all 0.3s")};
|
|
77
78
|
|
|
78
79
|
&:disabled {
|
|
79
80
|
cursor: not-allowed;
|
|
80
81
|
opacity: 0.6;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
|
-
${({$size:e,$shape:
|
|
84
|
-
height: 24px;
|
|
85
|
-
padding: ${
|
|
86
|
-
font-size: ${
|
|
87
|
-
border-radius: ${
|
|
88
|
-
${
|
|
84
|
+
${({$size:e,$shape:o})=>{let r=o==="circle";switch(e){case"small":return`
|
|
85
|
+
height: ${t("components.button.height.sm","24px")};
|
|
86
|
+
padding: ${r?"0":t("components.button.padding.sm",t("spacing.sm","0 8px"))};
|
|
87
|
+
font-size: ${t("components.button.fontSize.sm",t("fontSize.xs","12px"))};
|
|
88
|
+
border-radius: ${o==="round"?"999px":r?"50%":t("components.button.borderRadius.sm",t("borderRadius.sm","4px"))};
|
|
89
|
+
${r?`width: ${t("components.button.height.sm","24px")}; min-width: ${t("components.button.height.sm","24px")};`:""}
|
|
89
90
|
`;case"large":return`
|
|
90
|
-
height: 40px;
|
|
91
|
-
padding: ${
|
|
92
|
-
font-size: ${
|
|
93
|
-
border-radius: ${
|
|
94
|
-
${
|
|
95
|
-
`;default:return`
|
|
96
|
-
height: 32px;
|
|
97
|
-
padding: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
border-radius: ${
|
|
100
|
-
${
|
|
91
|
+
height: ${t("components.button.height.lg","40px")};
|
|
92
|
+
padding: ${r?"0":t("components.button.padding.lg",t("spacing.lg","0 16px"))};
|
|
93
|
+
font-size: ${t("components.button.fontSize.lg",t("fontSize.md","16px"))};
|
|
94
|
+
border-radius: ${o==="round"?"999px":r?"50%":t("components.button.borderRadius.lg",t("borderRadius.lg","8px"))};
|
|
95
|
+
${r?`width: ${t("components.button.height.lg","40px")}; min-width: ${t("components.button.height.lg","40px")};`:""}
|
|
96
|
+
`;case"medium":default:return`
|
|
97
|
+
height: ${t("components.button.height.md","32px")};
|
|
98
|
+
padding: ${r?"0":t("components.button.padding.md",t("spacing.md","0 16px"))};
|
|
99
|
+
font-size: ${t("components.button.fontSize.md",t("fontSize.sm","14px"))};
|
|
100
|
+
border-radius: ${o==="round"?"999px":r?"50%":t("components.button.borderRadius.md",t("borderRadius.md","6px"))};
|
|
101
|
+
${r?`width: ${t("components.button.height.md","32px")}; min-width: ${t("components.button.height.md","32px")};`:""}
|
|
101
102
|
`}}}
|
|
102
103
|
|
|
103
|
-
${({$variant:e
|
|
104
|
-
background-color: ${t
|
|
105
|
-
border-color: ${t
|
|
106
|
-
color: #fff;
|
|
104
|
+
${({$variant:e})=>{switch(e){case"primary":return`
|
|
105
|
+
background-color: ${t("colors.primary","#007bff")};
|
|
106
|
+
border-color: ${t("colors.primary","#007bff")};
|
|
107
|
+
color: ${t("colors.white","#fff")};
|
|
107
108
|
|
|
108
109
|
&:hover:not(:disabled) {
|
|
109
|
-
background-color: ${t
|
|
110
|
-
border-color: ${t
|
|
110
|
+
background-color: ${t("colors.primaryHover",`color-mix(in srgb, ${t("colors.primary","#007bff")}, white 20%)`)};
|
|
111
|
+
border-color: ${t("colors.primaryHover",`color-mix(in srgb, ${t("colors.primary","#007bff")}, white 20%)`)};
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
&:active:not(:disabled) {
|
|
114
|
-
background-color: ${t
|
|
115
|
-
border-color: ${t
|
|
115
|
+
background-color: ${t("colors.primaryActive",`color-mix(in srgb, ${t("colors.primary","#007bff")}, black 20%)`)};
|
|
116
|
+
border-color: ${t("colors.primaryActive",`color-mix(in srgb, ${t("colors.primary","#007bff")}, black 20%)`)};
|
|
116
117
|
}
|
|
117
118
|
`;case"dashed":return`
|
|
118
|
-
background-color: ${t
|
|
119
|
-
border-color: ${t
|
|
119
|
+
background-color: ${t("colors.background","#fff")};
|
|
120
|
+
border-color: ${t("colors.border","#d9d9d9")};
|
|
120
121
|
border-style: dashed;
|
|
121
|
-
color: ${t
|
|
122
|
+
color: ${t("colors.text","#000")};
|
|
122
123
|
|
|
123
124
|
&:hover:not(:disabled) {
|
|
124
|
-
border-color: ${t
|
|
125
|
-
color: ${t
|
|
125
|
+
border-color: ${t("colors.borderHover","#40a9ff")};
|
|
126
|
+
color: ${t("colors.borderHover","#40a9ff")};
|
|
127
|
+
background-color: ${t("colors.primaryHoverBg",`color-mix(in srgb, ${t("colors.primary","#007bff")}, ${t("colors.background","#fff")} 99%)`)};
|
|
126
128
|
}
|
|
127
129
|
`;case"text":return`
|
|
128
130
|
background-color: transparent;
|
|
129
131
|
border-color: transparent;
|
|
130
|
-
color: ${t
|
|
132
|
+
color: ${t("colors.text","#000")};
|
|
131
133
|
|
|
132
134
|
&:hover:not(:disabled) {
|
|
133
|
-
background-color: ${t
|
|
135
|
+
background-color: ${t("colors.backgroundTertiary","rgba(0, 0, 0, 0.018)")};
|
|
134
136
|
}
|
|
135
137
|
`;case"link":return`
|
|
136
138
|
background-color: transparent;
|
|
137
139
|
border-color: transparent;
|
|
138
|
-
color: ${t
|
|
140
|
+
color: ${t("colors.primary","#007bff")};
|
|
139
141
|
|
|
140
142
|
&:hover:not(:disabled) {
|
|
141
|
-
color: ${t
|
|
143
|
+
color: ${t("colors.primaryHover","#0056b3")};
|
|
142
144
|
}
|
|
143
145
|
`;default:return`
|
|
144
|
-
background-color: ${t
|
|
145
|
-
border-color: ${t
|
|
146
|
-
color: ${t
|
|
146
|
+
background-color: ${t("colors.background","#fff")};
|
|
147
|
+
border-color: ${t("colors.border","#d9d9d9")};
|
|
148
|
+
color: ${t("colors.text","#000")};
|
|
147
149
|
|
|
148
150
|
&:hover:not(:disabled) {
|
|
149
|
-
border-color: ${t
|
|
150
|
-
color: ${t
|
|
151
|
+
border-color: ${t("colors.borderHover","#40a9ff")};
|
|
152
|
+
color: ${t("colors.borderHover","#40a9ff")};
|
|
153
|
+
background-color: ${t("colors.primaryHoverBg",`color-mix(in srgb, ${t("colors.primary","#007bff")}, ${t("colors.background","#fff")} 99%)`)};
|
|
151
154
|
}
|
|
152
155
|
`}}}
|
|
153
156
|
|
|
154
157
|
|
|
155
|
-
${({$danger:e,$variant:
|
|
156
|
-
${
|
|
157
|
-
background-color: ${
|
|
158
|
-
border-color: ${
|
|
158
|
+
${({$danger:e,$variant:o})=>e&&`
|
|
159
|
+
${o==="primary"?`
|
|
160
|
+
background-color: ${t("colors.error","#ff4d4f")};
|
|
161
|
+
border-color: ${t("colors.error","#ff4d4f")};
|
|
162
|
+
|
|
163
|
+
&:hover:not(:disabled) {
|
|
164
|
+
background-color: ${t("colors.errorHover","#ff7875")};
|
|
165
|
+
border-color: ${t("colors.errorHover","#ff7875")};
|
|
166
|
+
}
|
|
167
|
+
`:o==="link"?`
|
|
168
|
+
color: ${t("colors.error","#ff4d4f")};
|
|
169
|
+
border-color: transparent;
|
|
170
|
+
background-color: transparent;
|
|
159
171
|
|
|
160
172
|
&:hover:not(:disabled) {
|
|
161
|
-
|
|
162
|
-
|
|
173
|
+
color: ${t("colors.errorHover","#ff7875")};
|
|
174
|
+
border-color: transparent;
|
|
175
|
+
background-color: transparent;
|
|
163
176
|
}
|
|
164
177
|
`:`
|
|
165
|
-
border-color: ${
|
|
166
|
-
color: ${
|
|
178
|
+
border-color: ${t("colors.error","#ff4d4f")};
|
|
179
|
+
color: ${t("colors.error","#ff4d4f")};
|
|
167
180
|
|
|
168
181
|
&:hover:not(:disabled) {
|
|
169
|
-
${
|
|
170
|
-
background-color: #fff2f0;
|
|
182
|
+
${o==="text"?`
|
|
183
|
+
background-color: ${t("colors.errorBg","#fff2f0")};
|
|
171
184
|
`:`
|
|
172
|
-
background-color: #fff2f0;
|
|
173
|
-
border-color: #ff7875;
|
|
185
|
+
background-color: ${t("colors.errorBg","#fff2f0")};
|
|
186
|
+
border-color: ${t("colors.errorHover","#ff7875")};
|
|
174
187
|
`}
|
|
175
|
-
color: #ff7875;
|
|
188
|
+
color: ${t("colors.errorHover","#ff7875")};
|
|
176
189
|
}
|
|
177
190
|
`}
|
|
178
191
|
`}
|
|
@@ -183,16 +196,16 @@
|
|
|
183
196
|
`}
|
|
184
197
|
|
|
185
198
|
${({$block:e})=>e&&"width: 100%;"}
|
|
186
|
-
`,
|
|
199
|
+
`,Un=yo.default.span`
|
|
187
200
|
display: inline-flex;
|
|
188
201
|
align-items: center;
|
|
189
202
|
|
|
190
203
|
${({$hasText:e})=>e&&"margin-right: 4px;"}
|
|
191
|
-
`,
|
|
204
|
+
`,qn=yo.default.span`
|
|
192
205
|
display: inline-flex;
|
|
193
206
|
align-items: center;
|
|
194
207
|
line-height: 1;
|
|
195
|
-
`,
|
|
208
|
+
`,Qn=yo.default.span`
|
|
196
209
|
display: inline-block;
|
|
197
210
|
width: 14px;
|
|
198
211
|
height: 14px;
|
|
@@ -209,14 +222,14 @@
|
|
|
209
222
|
transform: rotate(360deg);
|
|
210
223
|
}
|
|
211
224
|
}
|
|
212
|
-
`;var
|
|
225
|
+
`;var Gt=require("react/jsx-runtime"),Xn=Jn.default.forwardRef(({children:e,variant:o="default",size:r="medium",shape:a="default",disabled:n=!1,loading:s=!1,danger:i=!1,block:l=!1,icon:d,type:c="button",onClick:m,className:f,style:x,classNames:b,styles:y,...w},g)=>{let u=p=>{s||n||m?.(p)};return(0,Gt.jsx)(Gn,{ref:g,type:c,className:`compass-button compass-button--${o} ${f||""} ${b?.root||""}`,style:{...x,...y?.root},$variant:o,$size:r,$shape:a,$danger:i,$loading:s,$block:l,disabled:n||s,onClick:u,...w,children:(0,Gt.jsxs)(qn,{$loading:s,className:`compass-button-content ${b?.text||""}`,style:y?.text,children:[(s||d)&&(0,Gt.jsx)(Un,{$hasText:!!e,className:`compass-button-icon ${b?.icon||""}`,style:y?.icon,children:s?(0,Gt.jsx)(Qn,{"aria-hidden":!0,className:`compass-button-loading ${b?.loading||""}`,style:y?.loading}):d}),e]})})});Xn.displayName="Button";var Zn=Xn;var Ie=Zn;var Vr=K(require("react"));var bt=K(require("@emotion/styled"));var ea=bt.default.div`
|
|
213
226
|
display: flex;
|
|
214
227
|
width: 100%;
|
|
215
228
|
height: ${e=>e.direction==="vertical"?"100%":"auto"};
|
|
216
229
|
font-size: 0;
|
|
217
230
|
text-align: initial;
|
|
218
231
|
flex-direction: ${e=>e.direction==="vertical"?"column":"row"};
|
|
219
|
-
|
|
232
|
+
`,ta=bt.default.div`
|
|
220
233
|
position: relative;
|
|
221
234
|
display: inline-block;
|
|
222
235
|
flex: 1;
|
|
@@ -232,7 +245,7 @@
|
|
|
232
245
|
margin-right: 0;
|
|
233
246
|
}
|
|
234
247
|
|
|
235
|
-
${e=>{let t
|
|
248
|
+
${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return e.direction==="horizontal"&&e.labelPlacement==="vertical"&&`
|
|
236
249
|
text-align: center;
|
|
237
250
|
overflow: visible;
|
|
238
251
|
margin-right: 0;
|
|
@@ -271,11 +284,11 @@
|
|
|
271
284
|
top: 16px;
|
|
272
285
|
left: 50%;
|
|
273
286
|
display: block;
|
|
274
|
-
width: calc(100% - ${e.variant==="dot"?r:
|
|
287
|
+
width: calc(100% - ${e.variant==="dot"?r:o} - 16px);
|
|
275
288
|
height: 1px;
|
|
276
|
-
background: ${
|
|
289
|
+
background: ${t("colors.border","#d9d9d9")};
|
|
277
290
|
content: '';
|
|
278
|
-
margin-left: calc(${e.variant==="dot"?r:
|
|
291
|
+
margin-left: calc(${e.variant==="dot"?r:o} / 2 + 8px);
|
|
279
292
|
}
|
|
280
293
|
|
|
281
294
|
&:last-child::after {
|
|
@@ -299,22 +312,23 @@
|
|
|
299
312
|
margin-right: 0;
|
|
300
313
|
padding-bottom: 0;
|
|
301
314
|
`}
|
|
302
|
-
`,
|
|
315
|
+
`,oa=bt.default.div`
|
|
303
316
|
position: relative;
|
|
304
317
|
z-index: 1;
|
|
305
318
|
box-sizing: border-box;
|
|
306
319
|
display: inline-flex;
|
|
307
320
|
align-items: center;
|
|
308
321
|
justify-content: center;
|
|
309
|
-
|
|
310
|
-
|
|
322
|
+
justify-content: center;
|
|
323
|
+
width: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return e.variant==="dot"?r:o}};
|
|
324
|
+
height: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return e.variant==="dot"?r:o}};
|
|
311
325
|
margin-right: 8px;
|
|
312
|
-
margin-top: ${e=>{let t
|
|
313
|
-
font-size: ${
|
|
326
|
+
margin-top: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return`calc((32px - ${e.variant==="dot"?r:o}) / 2)`}};
|
|
327
|
+
font-size: ${t("components.steps.titleFontSize","16px")};
|
|
314
328
|
line-height: 1;
|
|
315
329
|
text-align: center;
|
|
316
330
|
border: 1px solid;
|
|
317
|
-
border-radius: ${e=>{let t
|
|
331
|
+
border-radius: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return e.variant==="dot"?r:o}};
|
|
318
332
|
transition:
|
|
319
333
|
background-color 0.3s,
|
|
320
334
|
border-color 0.3s;
|
|
@@ -323,32 +337,32 @@
|
|
|
323
337
|
display: flex;
|
|
324
338
|
}
|
|
325
339
|
|
|
326
|
-
${e=>{let t=
|
|
327
|
-
background-color: ${
|
|
328
|
-
border-color: ${
|
|
340
|
+
${e=>{let o=t("components.steps.processIconColor","#1890ff"),r=t("components.steps.waitIconColor","rgba(0, 0, 0, 0.25)"),a=t("components.steps.finishIconColor","#1890ff"),n=t("components.steps.errorIconColor","#ff4d4f"),s=t("colors.background","#ffffff");switch(e.status){case"process":return`
|
|
341
|
+
background-color: ${o};
|
|
342
|
+
border-color: ${o};
|
|
329
343
|
color: #fff;
|
|
330
344
|
`;case"wait":return`
|
|
331
|
-
background-color: ${
|
|
332
|
-
border-color: ${
|
|
333
|
-
color: ${
|
|
345
|
+
background-color: ${s};
|
|
346
|
+
border-color: ${r};
|
|
347
|
+
color: ${r};
|
|
334
348
|
`;case"finish":return`
|
|
335
|
-
background-color: ${
|
|
336
|
-
border-color: ${
|
|
337
|
-
color: ${
|
|
349
|
+
background-color: ${s};
|
|
350
|
+
border-color: ${a};
|
|
351
|
+
color: ${a};
|
|
338
352
|
`;case"error":return`
|
|
339
|
-
background-color: ${
|
|
340
|
-
border-color: ${
|
|
341
|
-
color: ${
|
|
353
|
+
background-color: ${s};
|
|
354
|
+
border-color: ${n};
|
|
355
|
+
color: ${n};
|
|
342
356
|
`;default:return""}}}
|
|
343
|
-
`,
|
|
357
|
+
`,ra=bt.default.div`
|
|
344
358
|
display: inline-block;
|
|
345
359
|
vertical-align: top;
|
|
346
|
-
`,
|
|
360
|
+
`,na=bt.default.div`
|
|
347
361
|
position: relative;
|
|
348
362
|
display: inline-block;
|
|
349
363
|
padding-right: 16px;
|
|
350
|
-
color: ${e=>{
|
|
351
|
-
font-size: ${
|
|
364
|
+
color: ${e=>{switch(e.status){case"process":return t("components.steps.processTitleColor","rgba(0, 0, 0, 0.88)");case"wait":return t("components.steps.waitTitleColor","rgba(0, 0, 0, 0.45)");case"finish":return t("components.steps.finishTitleColor","rgba(0, 0, 0, 0.88)");case"error":return t("components.steps.errorTitleColor","#ff4d4f");default:return t("components.steps.titleColor","rgba(0, 0, 0, 0.88)")}}};
|
|
365
|
+
font-size: ${t("components.steps.titleFontSize","16px")};
|
|
352
366
|
line-height: 32px;
|
|
353
367
|
|
|
354
368
|
&::after {
|
|
@@ -358,24 +372,24 @@
|
|
|
358
372
|
display: ${e=>e.isLast||e.direction==="vertical"?"none":"block"};
|
|
359
373
|
width: 9999px;
|
|
360
374
|
height: 1px;
|
|
361
|
-
background: ${
|
|
375
|
+
background: ${t("colors.borderSecondary","#f0f0f0")};
|
|
362
376
|
content: '';
|
|
363
377
|
}
|
|
364
|
-
`,
|
|
378
|
+
`,aa=bt.default.div`
|
|
365
379
|
display: inline;
|
|
366
380
|
margin-left: 8px;
|
|
367
|
-
color: ${
|
|
381
|
+
color: ${t("components.steps.subTitleColor","rgba(0, 0, 0, 0.45)")};
|
|
368
382
|
font-weight: normal;
|
|
369
383
|
font-size: 14px;
|
|
370
|
-
`,
|
|
371
|
-
color: ${e=>{
|
|
372
|
-
font-size: ${
|
|
373
|
-
`,
|
|
384
|
+
`,sa=bt.default.div`
|
|
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
|
+
font-size: ${t("components.steps.descriptionFontSize","14px")};
|
|
387
|
+
`,ia=bt.default.div`
|
|
374
388
|
display: ${e=>e.direction==="vertical"&&!e.isLast?"block":"none"};
|
|
375
389
|
position: absolute;
|
|
376
|
-
top: ${e=>{let t
|
|
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)`}};
|
|
377
391
|
bottom: 6px;
|
|
378
|
-
left: ${e=>{let t
|
|
392
|
+
left: ${e=>{let o=t("components.steps.iconSize","32px"),r=t("components.steps.dotSize","8px");return`calc(${e.variant==="dot"?r:o} / 2)`}};
|
|
379
393
|
width: 1px;
|
|
380
394
|
padding: 0;
|
|
381
395
|
margin-left: 0;
|
|
@@ -385,123 +399,138 @@
|
|
|
385
399
|
display: inline-block;
|
|
386
400
|
width: 1px;
|
|
387
401
|
height: 100%;
|
|
388
|
-
background: ${
|
|
402
|
+
background: ${t("colors.borderSecondary","#f0f0f0")};
|
|
389
403
|
border-radius: 1px;
|
|
390
404
|
transition: background 0.3s;
|
|
391
405
|
content: '';
|
|
392
406
|
}
|
|
393
|
-
`;var P=require("react/jsx-runtime"),Dn=()=>(0,P.jsx)("span",{role:"img","aria-label":"caret-right",className:"compass-icon compass-icon-caret-right",children:(0,P.jsx)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),bt=()=>(0,P.jsx)("span",{role:"img","aria-label":"info",className:"compass-icon compass-icon-info-circle",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"info-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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=()=>(0,P.jsx)("span",{role:"img","aria-label":"success",className:"compass-icon compass-icon-check-circle",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Ht=()=>(0,P.jsx)("span",{role:"img","aria-label":"error",className:"compass-icon compass-icon-close-circle",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Lt=()=>(0,P.jsx)("span",{role:"img","aria-label":"warning",className:"compass-icon compass-icon-exclamation-circle",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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=()=>(0,P.jsx)("span",{role:"img","aria-label":"loading",className:"compass-icon compass-icon-loading",children:(0,P.jsx)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),tt=()=>(0,P.jsx)("span",{role:"img","aria-label":"close",className:"compass-icon compass-icon-close",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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 En=()=>(0,P.jsx)("span",{role:"img","aria-label":"eye",className:"compass-icon compass-icon-eye",children:(0,P.jsx)("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Nn=()=>(0,P.jsx)("span",{role:"img","aria-label":"eye-invisible",className:"compass-icon compass-icon-eye-invisible",children:(0,P.jsx)("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye-invisible",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Mo=()=>(0,P.jsx)("span",{role:"img","aria-label":"search",className:"compass-icon compass-icon-search",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"search",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),ot=()=>(0,P.jsx)("span",{role:"img","aria-label":"close-circle",className:"compass-icon compass-icon-close-circle",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Ro=()=>(0,P.jsx)("span",{role:"img","aria-label":"check",className:"compass-icon compass-icon-check",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),$t=()=>(0,P.jsx)("span",{role:"img","aria-label":"left",className:"compass-icon compass-icon-left",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Pt=()=>(0,P.jsx)("span",{role:"img","aria-label":"right",className:"compass-icon compass-icon-right",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),xt=()=>(0,P.jsx)("span",{role:"img","aria-label":"double-left",className:"compass-icon compass-icon-double-left",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),yt=()=>(0,P.jsx)("span",{role:"img","aria-label":"double-right",className:"compass-icon compass-icon-double-right",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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=()=>(0,P.jsx)("span",{role:"img","aria-label":"calendar",className:"compass-icon compass-icon-calendar",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"calendar",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Fo=()=>(0,P.jsx)("span",{role:"img","aria-label":"down",className:"compass-icon compass-icon-down",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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 zn=()=>(0,P.jsx)("span",{role:"img","aria-label":"ellipsis",className:"compass-icon compass-icon-ellipsis",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"ellipsis",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})}),Bn=()=>(0,P.jsx)("span",{role:"img","aria-label":"plus-square",className:"compass-icon compass-icon-plus-square",children:(0,P.jsxs)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[(0,P.jsx)("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"}),(0,P.jsx)("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"})]})}),Hn=()=>(0,P.jsx)("span",{role:"img","aria-label":"minus-square",className:"compass-icon compass-icon-minus-square",children:(0,P.jsxs)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[(0,P.jsx)("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"}),(0,P.jsx)("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"})]})}),Ln=()=>(0,P.jsx)("span",{role:"img","aria-label":"file",className:"compass-icon compass-icon-file",children:(0,P.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"file",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,P.jsx)("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"})})});var Ke=require("react/jsx-runtime"),Vn=()=>null,On=({current:e=0,status:t="process",direction:o="horizontal",labelPlacement:n="horizontal",variant:r="default",items:a,children:s,onChange:l,className:c,style:i})=>{let d=(f,p,w)=>f<p?"finish":f===p?w:"wait",g=(f,p,w)=>w||(p==="finish"?(0,Ke.jsx)(Ro,{}):p==="error"?(0,Ke.jsx)(tt,{}):f+1),x=(f,p)=>{l&&!p&&f!==e&&l(f)},h=[];return a?h=a:s&&kr.default.Children.forEach(s,f=>{kr.default.isValidElement(f)&&f.type===Vn&&h.push(f.props)}),(0,Ke.jsx)(wn,{direction:o,labelPlacement:n,className:`compass-steps compass-steps--${o} compass-steps--label-${n} compass-steps--${r} ${c||""}`,style:i,role:"list",children:h.map((f,p)=>{let w=f.status||d(p,e,t),S=!!l&&!f.disabled;return(0,Ke.jsxs)($n,{status:w,active:p===e,disabled:f.disabled,direction:o,labelPlacement:n,variant:r,clickable:S,onClick:()=>x(p,f.disabled),className:`compass-steps-item compass-steps-item--${w} ${p===e?"compass-steps-item--active":""} ${f.disabled?"compass-steps-item--disabled":""} ${f.className||""}`,style:f.style,role:"listitem",children:[(0,Ke.jsx)(Fn,{direction:o,isLast:p===h.length-1,variant:r}),(0,Ke.jsx)(Pn,{status:w,active:p===e,variant:r,className:`compass-steps-icon ${r==="dot"?"compass-steps-icon--dot":""}`,children:r!=="dot"&&g(p,w,f.icon)}),(0,Ke.jsxs)(Tn,{className:"compass-steps-content",children:[(0,Ke.jsxs)(Mn,{status:w,className:"compass-steps-title",isLast:p===h.length-1,direction:o,children:[f.title,f.subTitle&&(0,Ke.jsx)(Rn,{className:"compass-steps-subtitle",children:f.subTitle})]}),f.description&&(0,Ke.jsx)(In,{status:w,className:"compass-steps-description",children:f.description})]})]},p)})})};On.Step=Vn;var Wn=On;var An=Wn;var Tt=require("react"),Zn=require("react-window");var lt=N(require("@emotion/styled")),wr=require("@emotion/react");var Yn=lt.default.div`
|
|
394
|
-
position: relative;
|
|
395
|
-
font-size: ${({theme:e})=>m(e,"tree").fontSize};
|
|
396
|
-
line-height: 1.5;
|
|
397
|
-
color: ${({theme:e})=>m(e,"tree").nodeColor};
|
|
398
|
-
`,Kn=lt.default.div`
|
|
407
|
+
`;var D=require("react/jsx-runtime"),la=()=>(0,D.jsx)("span",{role:"img","aria-label":"caret-right",className:"compass-icon compass-icon-caret-right",children:(0,D.jsx)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Pt=()=>(0,D.jsx)("span",{role:"img","aria-label":"info",className:"compass-icon compass-icon-info-circle",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"info-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Ut=()=>(0,D.jsx)("span",{role:"img","aria-label":"success",className:"compass-icon compass-icon-check-circle",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),qt=()=>(0,D.jsx)("span",{role:"img","aria-label":"error",className:"compass-icon compass-icon-close-circle",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Qt=()=>(0,D.jsx)("span",{role:"img","aria-label":"warning",className:"compass-icon compass-icon-exclamation-circle",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Jt=()=>(0,D.jsx)("span",{role:"img","aria-label":"loading",className:"compass-icon compass-icon-loading",children:(0,D.jsx)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),ct=()=>(0,D.jsx)("span",{role:"img","aria-label":"close",className:"compass-icon compass-icon-close",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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 ca=()=>(0,D.jsx)("span",{role:"img","aria-label":"eye",className:"compass-icon compass-icon-eye",children:(0,D.jsx)("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),pa=()=>(0,D.jsx)("span",{role:"img","aria-label":"eye-invisible",className:"compass-icon compass-icon-eye-invisible",children:(0,D.jsx)("svg",{viewBox:"0 0 14 14",focusable:"false","data-icon":"eye-invisible",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Vo=()=>(0,D.jsx)("span",{role:"img","aria-label":"search",className:"compass-icon compass-icon-search",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"search",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),pt=()=>(0,D.jsx)("span",{role:"img","aria-label":"close-circle",className:"compass-icon compass-icon-close-circle",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Wo=()=>(0,D.jsx)("span",{role:"img","aria-label":"check",className:"compass-icon compass-icon-check",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),zt=()=>(0,D.jsx)("span",{role:"img","aria-label":"left",className:"compass-icon compass-icon-left",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Bt=()=>(0,D.jsx)("span",{role:"img","aria-label":"right",className:"compass-icon compass-icon-right",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Tt=()=>(0,D.jsx)("span",{role:"img","aria-label":"double-left",className:"compass-icon compass-icon-double-left",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Mt=()=>(0,D.jsx)("span",{role:"img","aria-label":"double-right",className:"compass-icon compass-icon-double-right",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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=()=>(0,D.jsx)("span",{role:"img","aria-label":"calendar",className:"compass-icon compass-icon-calendar",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"calendar",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),Ko=()=>(0,D.jsx)("span",{role:"img","aria-label":"down",className:"compass-icon compass-icon-down",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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 da=()=>(0,D.jsx)("span",{role:"img","aria-label":"ellipsis",className:"compass-icon compass-icon-ellipsis",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"ellipsis",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})}),ma=()=>(0,D.jsx)("span",{role:"img","aria-label":"plus-square",className:"compass-icon compass-icon-plus-square",children:(0,D.jsxs)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[(0,D.jsx)("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"}),(0,D.jsx)("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"})]})}),ua=()=>(0,D.jsx)("span",{role:"img","aria-label":"minus-square",className:"compass-icon compass-icon-minus-square",children:(0,D.jsxs)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[(0,D.jsx)("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"}),(0,D.jsx)("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"})]})}),fa=()=>(0,D.jsx)("span",{role:"img","aria-label":"file",className:"compass-icon compass-icon-file",children:(0,D.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"file",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,D.jsx)("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"})})});var Ue=require("react/jsx-runtime"),ga=()=>null,ha=({current:e=0,status:o="process",direction:r="horizontal",labelPlacement:a="horizontal",variant:n="default",items:s,children:i,onChange:l,className:d,style:c,styles:m,classNames:f})=>{let x=(g,u,p)=>g<u?"finish":g===u?p:"wait",b=(g,u,p)=>p||(u==="finish"?(0,Ue.jsx)(Wo,{}):u==="error"?(0,Ue.jsx)(ct,{}):g+1),y=(g,u)=>{l&&!u&&g!==e&&l(g)},w=[];return s?w=s:i&&Vr.default.Children.forEach(i,g=>{Vr.default.isValidElement(g)&&g.type===ga&&w.push(g.props)}),(0,Ue.jsx)(ea,{direction:r,labelPlacement:a,className:`compass-steps compass-steps--${r} compass-steps--label-${a} compass-steps--${n} ${d||""} ${f?.root||""}`,style:{...c,...m?.root},role:"list",children:w.map((g,u)=>{let p=g.status||x(u,e,o),P=!!l&&!g.disabled;return(0,Ue.jsxs)(ta,{status:p,active:u===e,disabled:g.disabled,direction:r,labelPlacement:a,variant:n,clickable:P,onClick:()=>y(u,g.disabled),className:`compass-steps-item compass-steps-item--${p} ${u===e?"compass-steps-item--active":""} ${g.disabled?"compass-steps-item--disabled":""} ${f?.item||""} ${g.className||""}`,style:{...m?.item,...g.style},role:"listitem",children:[(0,Ue.jsx)(ia,{direction:r,isLast:u===w.length-1,variant:n,className:f?.tail,style:m?.tail}),(0,Ue.jsx)(oa,{status:p,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,p,g.icon)}),(0,Ue.jsxs)(ra,{className:`compass-steps-content ${f?.content||""}`,style:m?.content,children:[(0,Ue.jsxs)(na,{status:p,className:`compass-steps-title ${f?.title||""}`,style:m?.title,isLast:u===w.length-1,direction:r,children:[g.title,g.subTitle&&(0,Ue.jsx)(aa,{className:`compass-steps-subtitle ${f?.subtitle||""}`,style:m?.subtitle,children:g.subTitle})]}),g.description&&(0,Ue.jsx)(sa,{status:p,className:`compass-steps-description ${f?.description||""}`,style:m?.description,children:g.description})]})]},u)})})};ha.Step=ga;var ba=ha;var ya=ba;var tr=require("react");var Rt=require("react");var Yo=K(require("@emotion/styled"));var Wr=Yo.default.ul`
|
|
399
408
|
display: flex;
|
|
400
409
|
align-items: center;
|
|
401
|
-
|
|
402
|
-
padding
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
color: ${({selected:e,theme:t})=>e?m(t,"tree").nodeSelectedColor:"inherit"};
|
|
410
|
+
list-style: none;
|
|
411
|
+
padding: 0;
|
|
412
|
+
margin: 0;
|
|
413
|
+
font-size: ${t("components.pagination.fontSize","14px")};
|
|
414
|
+
color: ${t("components.pagination.itemColor","rgba(0, 0, 0, 0.88)")};
|
|
415
|
+
opacity: ${({disabled:e})=>e?.5:1};
|
|
416
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"default"};
|
|
409
417
|
|
|
410
|
-
|
|
411
|
-
|
|
418
|
+
.compass-pagination-simple-input {
|
|
419
|
+
width: ${({size:e})=>e==="small"?"40px":"50px"};
|
|
420
|
+
height: ${({size:e})=>e==="small"?"24px":"32px"};
|
|
421
|
+
margin: 0 8px;
|
|
422
|
+
|
|
423
|
+
.compass-input-field {
|
|
424
|
+
height: 100%;
|
|
425
|
+
padding: 0 6px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
input {
|
|
429
|
+
text-align: center;
|
|
430
|
+
height: 100%;
|
|
431
|
+
}
|
|
412
432
|
}
|
|
413
433
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
434
|
+
/* Hide spin buttons for input type number in Pagination */
|
|
435
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
436
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
437
|
+
-webkit-appearance: none;
|
|
438
|
+
margin: 0;
|
|
439
|
+
}
|
|
440
|
+
input[type='number'] {
|
|
441
|
+
-moz-appearance: textfield;
|
|
442
|
+
}
|
|
443
|
+
`,Ht=Yo.default.li`
|
|
444
|
+
display: inline-flex;
|
|
425
445
|
justify-content: center;
|
|
426
|
-
|
|
446
|
+
align-items: center;
|
|
447
|
+
min-width: ${({size:e})=>e==="small"?"24px":t("components.pagination.itemSize","32px")};
|
|
448
|
+
height: ${({size:e})=>e==="small"?"24px":t("components.pagination.itemSize","32px")};
|
|
449
|
+
margin-right: 8px;
|
|
450
|
+
border-radius: ${t("components.pagination.itemBorderRadius","4px")};
|
|
451
|
+
background-color: ${({active:e})=>e?t("components.pagination.itemActiveBg","#ffffff"):t("components.pagination.itemBg","#ffffff")};
|
|
452
|
+
border: 1px solid
|
|
453
|
+
${({active:e})=>e?t("colors.primary","#1890ff"):t("colors.border","#d9d9d9")};
|
|
454
|
+
color: ${({active:e})=>e?t("components.pagination.itemActiveColor","#1890ff"):t("components.pagination.itemColor","rgba(0, 0, 0, 0.88)")};
|
|
455
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
427
456
|
user-select: none;
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
height: 24px;
|
|
431
|
-
margin-right: 4px;
|
|
432
|
-
cursor: pointer;
|
|
433
|
-
position: relative;
|
|
434
|
-
transform: rotate(
|
|
435
|
-
${({expanded:e,showLine:t})=>t?"0deg":e?"90deg":"0deg"}
|
|
436
|
-
);
|
|
437
|
-
transition: transform 0.2s;
|
|
438
|
-
z-index: 1;
|
|
439
|
-
background: ${({showLine:e})=>e?"#fff":"transparent"};
|
|
440
|
-
color: ${({theme:e})=>m(e,"tree").switcherColor};
|
|
457
|
+
transition: all 0.2s;
|
|
458
|
+
font-weight: ${({active:e})=>e?600:400};
|
|
441
459
|
|
|
442
460
|
&:hover {
|
|
443
|
-
color: ${({
|
|
461
|
+
border-color: ${({active:e,disabled:o})=>o?e?t("colors.primary","#1890ff"):t("colors.border","#d9d9d9"):e?t("colors.primary","#1890ff"):t("colors.primaryHover","#40a9ff")};
|
|
462
|
+
color: ${({active:e,disabled:o})=>o?e?t("components.pagination.itemActiveColor","#1890ff"):t("components.pagination.itemColor","rgba(0, 0, 0, 0.88)"):e?t("components.pagination.itemActiveColor","#1890ff"):t("components.pagination.itemHoverColor","#40a9ff")};
|
|
444
463
|
}
|
|
445
464
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
465
|
+
a {
|
|
466
|
+
color: inherit;
|
|
467
|
+
text-decoration: none;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.compass-icon {
|
|
471
|
+
display: flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: center;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* Jump Item specific styles */
|
|
477
|
+
&.compass-pagination-jump-placeholder {
|
|
478
|
+
position: relative;
|
|
479
|
+
border: none;
|
|
480
|
+
background: transparent;
|
|
481
|
+
|
|
449
482
|
&:hover {
|
|
450
|
-
color:
|
|
483
|
+
color: ${({disabled:e})=>e?t("components.pagination.itemColor","rgba(0, 0, 0, 0.88)"):t("colors.primary","#1890ff")};
|
|
484
|
+
|
|
485
|
+
.compass-pagination-item-ellipsis {
|
|
486
|
+
opacity: ${({disabled:e})=>e?1:0};
|
|
487
|
+
pointer-events: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.compass-pagination-item-link-icon {
|
|
491
|
+
opacity: ${({disabled:e})=>e?0:1};
|
|
492
|
+
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
493
|
+
}
|
|
451
494
|
}
|
|
452
495
|
}
|
|
453
|
-
`,_n=lt.default.span`
|
|
454
|
-
align-self: stretch;
|
|
455
|
-
width: ${({theme:e})=>m(e,"tree").indentSize};
|
|
456
|
-
display: inline-block;
|
|
457
|
-
flex-shrink: 0;
|
|
458
|
-
position: relative;
|
|
459
496
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
flex: 1;
|
|
479
|
-
min-width: 0;
|
|
480
|
-
`,Un=lt.default.div`
|
|
481
|
-
flex: 1;
|
|
482
|
-
min-width: 0;
|
|
483
|
-
margin-left: 4px;
|
|
484
|
-
white-space: nowrap;
|
|
485
|
-
overflow: hidden;
|
|
486
|
-
text-overflow: ellipsis;
|
|
487
|
-
`,qn=lt.default.span`
|
|
497
|
+
.compass-pagination-item-ellipsis,
|
|
498
|
+
.compass-pagination-item-link-icon {
|
|
499
|
+
position: absolute;
|
|
500
|
+
top: 50%;
|
|
501
|
+
left: 50%;
|
|
502
|
+
transform: translate(-50%, -50%);
|
|
503
|
+
transition: all 0.2s;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.compass-pagination-item-ellipsis {
|
|
507
|
+
opacity: 1;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.compass-pagination-item-link-icon {
|
|
511
|
+
opacity: 0;
|
|
512
|
+
font-size: 12px;
|
|
513
|
+
}
|
|
514
|
+
`,ap=Yo.default.li`
|
|
488
515
|
display: inline-flex;
|
|
489
|
-
align-items: center;
|
|
490
516
|
justify-content: center;
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
517
|
+
align-items: center;
|
|
518
|
+
width: 32px;
|
|
519
|
+
height: 32px;
|
|
520
|
+
margin-right: 8px;
|
|
521
|
+
color: ${t("components.pagination.itemColor","rgba(0, 0, 0, 0.25)")};
|
|
522
|
+
cursor: pointer;
|
|
523
|
+
`;var qe=K(require("react")),le=require("@floating-ui/react");var Ar=K(require("react")),Kr=Ar.default.createContext(null),xa=()=>{let e=Ar.default.useContext(Kr);if(!e)throw new Error("Select compounds must be used within a Select component");return e};var Na=require("react");var Ae=K(require("@emotion/styled")),va=require("@emotion/react");var Pl=va.keyframes`
|
|
495
524
|
from {
|
|
496
525
|
transform: rotate(0deg);
|
|
497
526
|
}
|
|
498
527
|
to {
|
|
499
528
|
transform: rotate(360deg);
|
|
500
529
|
}
|
|
501
|
-
`,
|
|
530
|
+
`,Sa=Ae.default.span`
|
|
502
531
|
display: inline-flex;
|
|
503
|
-
animation: ${
|
|
504
|
-
`,
|
|
532
|
+
animation: ${Pl} 1s linear infinite;
|
|
533
|
+
`,Ca=Ae.default.div`
|
|
505
534
|
position: relative;
|
|
506
535
|
display: inline-flex;
|
|
507
536
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
@@ -509,25 +538,25 @@
|
|
|
509
538
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
510
539
|
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
511
540
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
512
|
-
|
|
541
|
+
`,$a=Ae.default.div`
|
|
513
542
|
display: flex;
|
|
514
543
|
align-items: center;
|
|
515
544
|
justify-content: space-between;
|
|
516
545
|
width: 100%;
|
|
517
|
-
padding: ${({size:e
|
|
518
|
-
font-size: ${({size:e
|
|
546
|
+
padding: ${({size:e})=>{switch(e){case"small":return t("components.select.padding.sm","1px 8px");case"large":return t("components.select.padding.lg","6px 16px");default:return t("components.select.padding.md","3px 12px")}}};
|
|
547
|
+
font-size: ${({size:e})=>e==="small"?t("components.select.fontSize.sm","12px"):t("components.select.fontSize.md","14px")};
|
|
519
548
|
line-height: 1.5;
|
|
520
|
-
background-color: ${(
|
|
549
|
+
background-color: ${t("components.select.backgroundColor",t("colors.background","#fff"))};
|
|
521
550
|
border: 1px solid
|
|
522
|
-
${({
|
|
523
|
-
border-radius: ${(
|
|
551
|
+
${({active:e,status:o})=>o==="error"?t("colors.error","#f5222d"):o==="warning"?t("colors.warning","#faad14"):e?t("components.select.activeBorderColor",t("colors.primary","#1890ff")):t("components.select.borderColor",t("colors.border","#d9d9d9"))};
|
|
552
|
+
border-radius: ${t("components.select.borderRadius",t("borderRadius.md","4px"))};
|
|
524
553
|
transition: all 0.3s;
|
|
525
|
-
box-shadow: ${({active:e
|
|
554
|
+
box-shadow: ${({active:e})=>e?`0 0 0 2px ${t("colors.primary","#1890ff")}20`:"none"};
|
|
526
555
|
|
|
527
556
|
&:hover {
|
|
528
|
-
border-color: ${({
|
|
557
|
+
border-color: ${({status:e})=>{if(!e)return t("components.select.hoverBorderColor",t("colors.primary","#1890ff"))}};
|
|
529
558
|
}
|
|
530
|
-
`,
|
|
559
|
+
`,ka=Ae.default.div`
|
|
531
560
|
position: relative;
|
|
532
561
|
flex: 1;
|
|
533
562
|
overflow: hidden;
|
|
@@ -539,12 +568,12 @@
|
|
|
539
568
|
align-items: center;
|
|
540
569
|
gap: 4px;
|
|
541
570
|
min-height: ${({size:e})=>e==="small"?"20px":e==="large"?"26px":"24px"};
|
|
542
|
-
`,
|
|
543
|
-
color: ${(
|
|
544
|
-
`,
|
|
571
|
+
`,xo=Ae.default.span`
|
|
572
|
+
color: ${t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf"))};
|
|
573
|
+
`,wa=Ae.default.div`
|
|
545
574
|
padding: 4px 0;
|
|
546
|
-
background-color: ${(
|
|
547
|
-
border-radius: ${(
|
|
575
|
+
background-color: ${t("colors.background","#fff")};
|
|
576
|
+
border-radius: ${t("borderRadius.md","4px")};
|
|
548
577
|
box-shadow:
|
|
549
578
|
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
550
579
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
@@ -552,17 +581,36 @@
|
|
|
552
581
|
z-index: 1050;
|
|
553
582
|
max-height: 256px;
|
|
554
583
|
overflow-y: auto;
|
|
555
|
-
|
|
556
|
-
|
|
584
|
+
`,Pa=Ae.default.div`
|
|
585
|
+
padding: 0 12px;
|
|
586
|
+
min-height: 32px;
|
|
587
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
588
|
+
transition: all 0.3s;
|
|
589
|
+
background-color: ${({selected:e,active:o})=>e?t("components.select.optionSelectedBg","#e6f7ff"):o?t("components.select.optionHoverBg","#e6e6e6"):"transparent"};
|
|
590
|
+
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)"))};
|
|
591
|
+
|
|
592
|
+
.compass-icon-check {
|
|
593
|
+
color: ${({selected:e})=>e?t("colors.primary","#1890ff"):"inherit"};
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
font-weight: 400;
|
|
597
|
+
display: flex;
|
|
598
|
+
align-items: center;
|
|
599
|
+
justify-content: space-between;
|
|
600
|
+
|
|
601
|
+
&:hover {
|
|
602
|
+
background-color: ${({disabled:e,selected:o})=>e?"transparent":o?t("components.select.optionSelectedBg","#e6f7ff"):t("components.select.optionHoverBg","#e6e6e6")};
|
|
603
|
+
}
|
|
604
|
+
`,Ta=Ae.default.span`
|
|
557
605
|
display: inline-flex;
|
|
558
606
|
align-items: center;
|
|
559
607
|
height: 24px;
|
|
560
608
|
padding: 0 8px;
|
|
561
609
|
font-size: 12px;
|
|
562
610
|
line-height: normal;
|
|
563
|
-
background: ${(
|
|
564
|
-
color: ${(
|
|
565
|
-
border:
|
|
611
|
+
background: ${t("components.select.tagBg",t("colors.backgroundSecondary","#f5f5f5"))};
|
|
612
|
+
color: ${t("components.select.tagColor","inherit")};
|
|
613
|
+
border: 1px solid ${t("components.select.tagBorderColor","transparent")};
|
|
566
614
|
border-radius: 4px;
|
|
567
615
|
margin-right: 4px;
|
|
568
616
|
margin-top: 1px;
|
|
@@ -574,7 +622,7 @@
|
|
|
574
622
|
align-items: center;
|
|
575
623
|
height: 100%;
|
|
576
624
|
}
|
|
577
|
-
`,
|
|
625
|
+
`,Ma=Ae.default.span`
|
|
578
626
|
margin-left: 4px;
|
|
579
627
|
cursor: pointer;
|
|
580
628
|
font-size: 12px;
|
|
@@ -584,20 +632,20 @@
|
|
|
584
632
|
align-items: center;
|
|
585
633
|
justify-content: center;
|
|
586
634
|
border-radius: 50%;
|
|
587
|
-
color: ${(
|
|
635
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
588
636
|
line-height: 0;
|
|
589
637
|
transform: scale(0.8);
|
|
590
638
|
|
|
591
639
|
&:hover {
|
|
592
|
-
color: ${(
|
|
640
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
593
641
|
}
|
|
594
|
-
`,
|
|
642
|
+
`,Ra=Ae.default.span`
|
|
595
643
|
display: flex;
|
|
596
644
|
align-items: center;
|
|
597
|
-
color: ${(
|
|
645
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.25)")};
|
|
598
646
|
font-size: 12px;
|
|
599
647
|
line-height: 0;
|
|
600
|
-
`,
|
|
648
|
+
`,Yr=Ae.default.input`
|
|
601
649
|
margin: 0;
|
|
602
650
|
padding: 0;
|
|
603
651
|
background: transparent;
|
|
@@ -611,79 +659,29 @@
|
|
|
611
659
|
margin-top: 1px;
|
|
612
660
|
margin-bottom: 1px;
|
|
613
661
|
min-width: 4px;
|
|
614
|
-
`,
|
|
662
|
+
`,Ia=Ae.default.div`
|
|
615
663
|
display: inline-block;
|
|
616
664
|
max-width: 100%;
|
|
617
|
-
`,
|
|
618
|
-
position: absolute;
|
|
619
|
-
left: 0;
|
|
620
|
-
top: 50%;
|
|
621
|
-
transform: translateY(-50%);
|
|
622
|
-
pointer-events: none;
|
|
623
|
-
width: 100%;
|
|
624
|
-
overflow: hidden;
|
|
625
|
-
text-overflow: ellipsis;
|
|
626
|
-
color: ${({$isOpen:e,theme:t})=>e?t.components?.select?.placeholderColor||t.colors?.textSecondary||"#bfbfbf":"inherit"};
|
|
627
|
-
`;var q=require("react/jsx-runtime"),Oi=e=>{let{treeData:t=[],value:o,defaultValue:n,onChange:r,disabled:a,loading:s,allowClear:l,placeholder:c,className:i,style:d,multiple:g=!1,treeCheckable:x=!1,treeDefaultExpandedKeys:h=[],size:f="medium",status:p,dropdownStyle:w,dropdownClassName:S,showSearch:y=!1,titleRender:$,switcherIcon:R}=e,[D,G]=(0,Ne.useState)(n||(g||x?[]:"")),H=o!==void 0,u=H?o:D,[b,U]=(0,Ne.useState)(!1),[k,T]=(0,Ne.useState)(""),[O,K]=(0,Ne.useState)(""),z=(0,Ne.useRef)(!1),_=(0,Ne.useRef)(null),[le,Z]=(0,Ne.useState)(h||[]),{keyEntities:me}=(0,Ne.useMemo)(()=>Eo(t),[t]),{x:M,y:W,refs:C,floatingStyles:se,context:F}=(0,fe.useFloating)({open:b,onOpenChange:E=>{a||!E&&(O||k)||(U(E),E?setTimeout(()=>{y&&_.current?.focus()},0):(T(""),K("")))},placement:"bottom-start",middleware:[(0,fe.offset)(4),(0,fe.flip)(),(0,fe.shift)(),(0,fe.size)({apply({rects:E,elements:V}){Object.assign(V.floating.style,{minWidth:`${E.reference.width}px`})}})],whileElementsMounted:fe.autoUpdate}),j=(0,fe.useClick)(F,{enabled:!0,keyboardHandlers:!1}),ce=(0,fe.useDismiss)(F,{escapeKey:!0,outsidePress:!0}),Ie=(0,fe.useRole)(F,{role:"listbox"}),{getReferenceProps:J,getFloatingProps:L}=(0,fe.useInteractions)([j,ce,Ie]),ye=E=>{let V=me[E];return V?V.node.title:E},ee=(E,V,ne)=>{H||G(E),r&&r(E,V,ne)},kt=(E,V)=>{let{node:ne,selected:De}=V,mt=ne.key;if(!x)if(g){let Ee=Array.isArray(u)?u:[],gt=De?[...Ee,mt]:Ee.filter(ht=>ht!==mt),qe=gt.map(ht=>ye(ht));ee(gt,qe,{triggerNode:ne,...V}),T(""),K(""),y&&_.current?.focus()}else ee(mt,ne.title,{triggerNode:ne,...V}),U(!1),U(!1),T(""),K("")},A=(E,V)=>{if(!x)return;let ne=E.map(De=>ye(De));ee(E,ne,V)},oe=(E,V)=>{V.stopPropagation();let De=(Array.isArray(u)?u:[]).filter(Ee=>Ee!==E),mt=De.map(Ee=>ye(Ee));ee(De,mt)},B=E=>{E.stopPropagation(),ee(g||x?[]:void 0,g||x?[]:void 0)},re=()=>{z.current=!0},ut=E=>{let V=E.currentTarget.value;K(V),T(V),z.current=!1},ft=E=>{let V=E.target.value;K(V),z.current||T(V),b||U(!0)},wt=()=>{if(g||x){let E=Array.isArray(u)?u:[];return(0,q.jsxs)(q.Fragment,{children:[E.map(V=>(0,q.jsxs)(ia,{children:[(0,q.jsx)("span",{children:ye(V)}),(0,q.jsx)(la,{onClick:ne=>oe(V,ne),children:(0,q.jsx)(tt,{})})]},V)),y&&(0,q.jsx)(da,{style:{width:O?"auto":"4px",minWidth:"50px",flex:1},children:(0,q.jsx)(Pr,{ref:_,value:O,onChange:ft,onCompositionStart:re,onCompositionEnd:ut,disabled:a})}),E.length===0&&!O&&(0,q.jsx)(oo,{children:c}),E.length===0&&!O&&y&&(0,q.jsx)(oo,{style:{position:"absolute",left:0,pointerEvents:"none"},children:c})]})}return y?(0,q.jsxs)(q.Fragment,{children:[u!==void 0&&u!==""&&u!==null?(0,q.jsx)(pa,{$isOpen:b,style:{opacity:O?0:1,visibility:O?"hidden":"visible"},children:ye(u)}):(0,q.jsx)(oo,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",opacity:O?0:1,visibility:O?"hidden":"visible"},children:c}),(0,q.jsx)(Pr,{ref:_,value:O,onChange:ft,onCompositionStart:re,onCompositionEnd:ut,disabled:a,style:{opacity:b||O?1:0}})]}):u!==void 0&&u!==""&&u!==null?ye(u):(0,q.jsx)(oo,{children:c})},Y=l&&!a&&(Array.isArray(u)?u.length>0:u!==void 0&&u!==""&&u!==null),te={treeData:t,selectable:!x&&e.treeSelectable!==!1,checkable:x,onSelect:kt,onCheck:A,defaultExpandedKeys:h,checkedKeys:x?Array.isArray(u)?u:[]:void 0,selectedKeys:x?[]:Array.isArray(u)?u:u?[u]:[],titleRender:E=>{if($)return $(E,k);let{treeSelectedIcon:V}=e,ne=E.title,De=ne;if(k&&ne&&String(ne).toLowerCase().includes(k.toLowerCase())){let Ee=ne.toLowerCase().indexOf(k.toLowerCase()),gt=ne.substring(0,Ee),qe=ne.substring(Ee,Ee+k.length),ht=ne.substring(Ee+k.length);De=(0,q.jsxs)("span",{children:[gt,(0,q.jsx)("span",{style:{color:"#1677ff"},children:qe}),ht]})}return(Array.isArray(u)?u.includes(E.key):u===E.key)&&V?(0,q.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,q.jsx)("span",{children:De}),(0,q.jsx)("span",{style:{display:"flex",alignItems:"center"},children:V})]}):De},switcherIcon:R},{filteredTreeData:pe,expandedKeysForSearch:Fe}=(0,Ne.useMemo)(()=>{if(!k)return{filteredTreeData:t,expandedKeysForSearch:[]};let E=[],V=(mt,Ee=[])=>{let gt=[];return mt.forEach(qe=>{let ht=qe.title;if(ht&&String(ht).toLowerCase().includes(k.toLowerCase()))E.push(...Ee),gt.push(qe);else if(qe.children){let sn=V(qe.children,[...Ee,qe.key]);sn.length&&(E.push(qe.key),gt.push({...qe,children:sn}))}}),gt},ne=V(t),De=Array.from(new Set(E));return{filteredTreeData:ne,expandedKeysForSearch:De}},[t,k]);return Ne.default.useEffect(()=>{k&&Z(E=>{let V=new Set([...E,...Fe]);return Array.from(V)})},[k,Fe]),(0,q.jsxs)(ra,{ref:C.setReference,fullWidth:!0,disabled:a,className:`compass-tree-select ${i||""} ${b?"compass-tree-select-open":""} ${a?"compass-tree-select-disabled":""}`,style:d,...J({onClick:()=>{y&&_.current?.focus()}}),children:[(0,q.jsxs)(na,{size:f,active:b,status:p,children:[(0,q.jsx)(aa,{size:f,children:wt()}),(0,q.jsx)(ca,{children:s?(0,q.jsx)(oa,{children:(0,q.jsx)(Vt,{})}):Y?(0,q.jsx)("span",{onClick:B,style:{cursor:"pointer"},children:(0,q.jsx)(ot,{})}):y&&b?(0,q.jsx)(Mo,{}):(0,q.jsx)(Fo,{})})]}),b&&(0,q.jsx)(fe.FloatingPortal,{children:(0,q.jsx)(sa,{ref:C.setFloating,style:{...w,...se,opacity:M===null||W===null?0:1,visibility:M===null||W===null?"hidden":"visible"},className:`compass-tree-select-dropdown ${S||""}`,...L(),children:pe.length>0?(0,q.jsx)(No,{...te,treeData:pe,expandedKeys:le,onExpand:E=>{Z(E)}}):(0,q.jsx)("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})})})]})},ua=Oi;var fa=ua;var no=N(require("react")),de=require("@floating-ui/react");var ma=N(require("@emotion/styled")),ga=ma.default.div`
|
|
628
|
-
z-index: ${({theme:e})=>e?.components?.dropdown?.zIndex??1050};
|
|
629
|
-
background-color: ${({theme:e})=>e?.components?.dropdown?.backgroundColor||"#ffffff"};
|
|
630
|
-
box-shadow: ${({theme:e})=>e?.components?.dropdown?.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)"};
|
|
631
|
-
border-radius: ${({theme:e})=>e?.components?.dropdown?.borderRadius||"4px"};
|
|
632
|
-
padding: ${({theme:e})=>e?.components?.dropdown?.padding||"4px 0"};
|
|
633
|
-
outline: 0;
|
|
634
|
-
`;var ro=N(require("react"));var zo=N(require("@emotion/styled")),ha=zo.default.div`
|
|
635
|
-
margin: 0;
|
|
636
|
-
padding: 0;
|
|
637
|
-
list-style: none;
|
|
638
|
-
`,ba=zo.default.div`
|
|
639
|
-
display: flex;
|
|
640
|
-
align-items: center;
|
|
641
|
-
margin: 0;
|
|
642
|
-
padding: ${({theme:e})=>e?.components?.menu?.itemPadding||"0 12px"};
|
|
643
|
-
height: ${({theme:e})=>e?.components?.menu?.itemHeight||"32px"};
|
|
644
|
-
color: ${({theme:e,$danger:t,$selected:o})=>t?e?.colors?.error||"#ff4d4f":o?e?.colors?.primary||"#1677ff":e?.components?.menu?.itemColor||"rgba(0, 0, 0, 0.88)"};
|
|
645
|
-
background-color: ${({theme:e,$selected:t})=>t?e?.components?.menu?.itemSelectedBg||"#e6f7ff":"transparent"};
|
|
646
|
-
font-size: ${({theme:e})=>e?.components?.menu?.fontSize||"14px"};
|
|
647
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
648
|
-
transition: all 0.3s;
|
|
649
|
-
border-radius: ${({theme:e})=>e?.components?.menu?.borderRadius||"4px"};
|
|
650
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
651
|
-
|
|
652
|
-
&:hover {
|
|
653
|
-
background-color: ${({theme:e,$disabled:t,$danger:o,$selected:n})=>t?"transparent":o?"#fff2f0":n?e?.components?.menu?.itemSelectedBg||"#e6f7ff":e?.components?.menu?.itemHoverBg||"#f5f5f5"};
|
|
654
|
-
}
|
|
655
|
-
`,xa=zo.default.span`
|
|
656
|
-
margin-right: 8px;
|
|
657
|
-
display: inline-flex;
|
|
658
|
-
align-items: center;
|
|
659
|
-
`;var ya=require("react"),Wt=(0,ya.createContext)({});var vt=require("react/jsx-runtime"),va=({children:e,items:t,className:o,style:n,onClick:r,selectedKeys:a,defaultSelectedKeys:s=[],onSelect:l})=>{let c=(0,ro.useContext)(Wt),[i,d]=ro.default.useState(s),g=a??i,x=(h,f)=>{r?.(h,f),c.onItemClick?.(h,f),f!==void 0&&(a===void 0&&d([f]),l?.([f]))};return(0,vt.jsx)(Wt.Provider,{value:{onItemClick:x,selectedKeys:g},children:(0,vt.jsx)(ha,{className:`compass-menu ${o||""}`,style:n,children:t?t.map(h=>(0,vt.jsx)(Ca,{eventKey:h.key,onClick:h.onClick,disabled:h.disabled,danger:h.danger,icon:h.icon,className:h.className,style:h.style,children:h.label},h.key)):e})})},Ca=({children:e,onClick:t,disabled:o,icon:n,danger:r,className:a,style:s,eventKey:l})=>{let c=(0,ro.useContext)(Wt),i=l!==void 0&&c.selectedKeys?.includes(l),d=g=>{o||(t?.(g),c.onItemClick?.(g,l))};return(0,vt.jsxs)(ba,{className:`compass-menu-item ${o?"compass-menu-item--disabled":""} ${r?"compass-menu-item--danger":""} ${i?"compass-menu-item--selected":""} ${a||""}`,style:s,onClick:d,$disabled:o,$danger:r,$selected:i,children:[n&&(0,vt.jsx)(xa,{className:"compass-menu-item-icon",children:n}),(0,vt.jsx)("span",{className:"compass-menu-item-content",children:e})]})};va.Item=Ca;var Sa=va;var Bo=Sa;var Qe=require("react/jsx-runtime"),ka=({children:e,overlay:t,menu:o,trigger:n="hover",placement:r="bottom-start",visible:a,onVisibleChange:s,disabled:l,closeOnSelect:c=!0,className:i,style:d})=>{let[g,x]=(0,no.useState)(!1),h=a!==void 0,f=h?a:g,p=K=>{l||(h||x(K),s?.(K))},{refs:w,floatingStyles:S,context:y}=(0,de.useFloating)({open:f,onOpenChange:p,placement:r,middleware:[(0,de.offset)(4),(0,de.flip)(),(0,de.shift)()],whileElementsMounted:de.autoUpdate}),$=(0,de.useHover)(y,{enabled:n==="hover",delay:{open:0,close:100}}),R=(0,de.useClick)(y,{enabled:n==="click"}),D=(0,de.useDismiss)(y),G=(0,de.useRole)(y),{getReferenceProps:H,getFloatingProps:u}=(0,de.useInteractions)([$,R,D,G]),b=no.default.Children.only(e),U=b.ref,k=(0,de.useMergeRefs)([w.setReference,U]),T=()=>{c&&p(!1)},O=t||(o?(0,Qe.jsx)(Bo,{...o}):null);return O?(0,Qe.jsxs)(Qe.Fragment,{children:[no.default.cloneElement(b,{ref:k,...H({className:`compass-dropdown-trigger ${i||""}`,style:d,...b.props})}),f&&(0,Qe.jsx)(de.FloatingPortal,{children:(0,Qe.jsx)(ga,{ref:w.setFloating,style:S,className:`compass-dropdown ${i||""}`,...u(),children:(0,Qe.jsx)(Wt.Provider,{value:{onItemClick:T},children:O})})})]}):(0,Qe.jsx)(Qe.Fragment,{children:e})};ka.displayName="Dropdown";var wa=ka;var $a=wa;var ct=N(require("react"));var Ct=N(require("@emotion/styled"));var ao=Ct.default.div`
|
|
665
|
+
`;var vo=require("react/jsx-runtime"),Tl=({value:e,children:o,disabled:r,className:a,style:n,label:s})=>{let{value:i,onSelect:l,multiple:d,menuItemSelectedIcon:c}=xa(),m=(0,Na.useMemo)(()=>d&&Array.isArray(i)?i.includes(e):i===e,[i,e,d]),f=x=>{if(r)return;x.preventDefault(),x.stopPropagation(),l(e,{value:e,label:s||o,disabled:r})};return(0,vo.jsxs)(Pa,{className:`compass-select-option ${m?"compass-select-option-selected":""} ${a||""}`,style:n,onClick:f,selected:m,disabled:r,role:"option","aria-selected":m,children:[(0,vo.jsx)("span",{className:"compass-select-option-content",children:o}),m&&(c||(0,vo.jsx)(Wo,{}))]})},_o=Tl;var oe=require("react/jsx-runtime"),_r=e=>{let{children:o,options:r,value:a,defaultValue:n,onChange:s,disabled:i,loading:l,allowClear:d,placeholder:c,multiple:m=!1,mode:f,size:x="medium",status:b,dropdownStyle:y,dropdownClassName:w,trigger:g="click",showSearch:u,className:p,style:P,styles:v,classNames:C,optionRender:F,labelRender:E,menuItemSelectedIcon:T}=e,W=m||f==="multiple"||f==="tags",Y=f==="tags",[R,M]=(0,qe.useState)(n||(W?[]:"")),k=a!==void 0,h=k?a:R,[I,H]=(0,qe.useState)(!1),[O,U]=(0,qe.useState)(""),A=(0,qe.useRef)(null),Q=(0,qe.useMemo)(()=>{let $=[];return r?$=r:qe.default.Children.forEach(o,z=>{if(qe.default.isValidElement(z)&&(z.type===_o||typeof z.type=="function"&&z.type.name==="Option")){let{value:q,children:me,disabled:$e,...ce}=z.props;$.push({value:q,label:me,disabled:$e,...ce})}}),$},[o,r]),Z=(0,qe.useMemo)(()=>O?Q.filter($=>String($.label).toLowerCase().includes(O.toLowerCase())):Q,[Q,O]),S=$=>{i||(H($),$?setTimeout(()=>{u&&A.current?.focus()},0):U(""))},{x:B,y:J,refs:N,floatingStyles:ne,context:j}=(0,le.useFloating)({open:I,onOpenChange:S,placement:"bottom-start",middleware:[(0,le.offset)(4),(0,le.flip)(),(0,le.shift)(),(0,le.size)({apply({rects:$,elements:z}){Object.assign(z.floating.style,{minWidth:`${$.reference.width}px`})}})],whileElementsMounted:le.autoUpdate}),_=(0,le.useClick)(j,{enabled:g==="click"}),G=(0,le.useHover)(j,{enabled:g==="hover",handleClose:(0,le.safePolygon)()}),Se=(0,le.useDismiss)(j),se=(0,le.useRole)(j,{role:"listbox"}),{getReferenceProps:ot,getFloatingProps:Ct}=(0,le.useInteractions)([_,G,Se,se]),gt=$=>{let z=Q.find(q=>q.value===$);return z?E?E(z):z.label:$},lt=($,z)=>{k||M($),s?.($,z)},X=($,z)=>{if(W){let q=Array.isArray(h)?h:[],me=q.indexOf($),$e,ce=[];me===-1?$e=[...q,$]:$e=q.filter(Me=>Me!==$),ce=$e.map(Me=>Q.find(Ve=>Ve.value===Me)||{value:Me,label:Me}),lt($e,ce),U(""),u&&A.current?.focus()}else lt($,z),H(!1),U("")},L=$=>{$.stopPropagation(),lt(W?[]:"",W?[]:{})},re=($,z)=>{z.stopPropagation();let me=(Array.isArray(h)?h:[]).filter(ce=>ce!==$),$e=me.map(ce=>Q.find(Me=>Me.value===ce)||{value:ce,label:ce});lt(me,$e)},Ge=$=>{U($.target.value),I||H(!0)},$t=$=>{if($.key==="Enter"&&Y&&O){let z=Q.find(q=>q.value===O);if(z)X(z.value,z);else{let q=O;X(q,{value:q,label:q})}$.preventDefault()}},Et=()=>{if(W){let $=Array.isArray(h)?h:[];return(0,oe.jsxs)(oe.Fragment,{children:[$.map(z=>(0,oe.jsxs)(Ta,{style:v?.tag,className:C?.tag,children:[(0,oe.jsx)("span",{children:gt(z)}),(0,oe.jsx)(Ma,{onClick:q=>re(z,q),children:(0,oe.jsx)(ct,{})})]},z)),(u||Y)&&(0,oe.jsx)(Ia,{style:{width:O?"auto":"4px",minWidth:"50px",flex:1},children:(0,oe.jsx)(Yr,{ref:A,value:O,onChange:Ge,onKeyDown:$t,disabled:i,style:{width:"100%"}})}),!O&&$.length===0&&!u&&!Y&&(0,oe.jsx)(xo,{children:c}),$.length===0&&!O&&(u||Y)&&(0,oe.jsx)(xo,{style:{position:"absolute",left:0,pointerEvents:"none"},children:c})]})}return u?(0,oe.jsxs)(oe.Fragment,{children:[!O&&(h!==void 0&&h!==""?(0,oe.jsx)("span",{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:gt(h)}):(0,oe.jsx)(xo,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:c})),(0,oe.jsx)(Yr,{ref:A,value:O,onChange:Ge,onKeyDown:$t,disabled:i,style:{opacity:I||O?1:0}})]}):!h&&h!==0?(0,oe.jsx)(xo,{children:c}):gt(h)},go=d&&!i&&(W?Array.isArray(h)&&h.length>0:h!==""&&h!==void 0&&h!==null),Kt={value:h,onSelect:X,multiple:W,searchValue:O,activeValue:null,setActiveValue:()=>{},menuItemSelectedIcon:T},kt=N.setReference;return(0,oe.jsx)(Kr.Provider,{value:Kt,children:(0,oe.jsxs)(Ca,{ref:kt,className:`compass-select ${p||""} ${C?.root||""} ${I?"compass-select-open":""} ${i?"compass-select-disabled":""}`,style:{...P,...v?.root},disabled:i,fullWidth:!0,...ot({onClick:()=>{(u||Y)&&A.current?.focus()}}),children:[(0,oe.jsxs)($a,{size:x,active:I,status:b,style:v?.trigger,className:`compass-select-selector ${C?.trigger||""}`,children:[(0,oe.jsx)(ka,{size:x,children:Et()}),(0,oe.jsx)(Ra,{children:l?(0,oe.jsx)(Sa,{children:(0,oe.jsx)(Jt,{})}):go?(0,oe.jsx)("span",{onClick:L,style:{cursor:"pointer"},children:(0,oe.jsx)(pt,{})}):(0,oe.jsx)(Ko,{})})]}),I&&(0,oe.jsx)(le.FloatingPortal,{children:(0,oe.jsx)(wa,{ref:N.setFloating,style:{...y,...ne,opacity:B===null||J===null?0:1,visibility:B===null||J===null?"hidden":"visible",...v?.dropdown},className:`compass-select-dropdown ${w||""} ${C?.dropdown||""}`,...Ct(),children:Z.length>0?Z.map(($,z)=>{let q=W?Array.isArray(h)&&h.includes($.value):h===$.value;return(0,oe.jsx)(_o,{value:$.value,disabled:$.disabled,label:$.label,style:v?.option,className:`${C?.option||""}`,menuItemSelectedIcon:F?(0,oe.jsx)(oe.Fragment,{}):void 0,children:F?F($,{index:z,selected:q}):$.label},$.value)}):(0,oe.jsx)("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})})})]})})};_r.Option=_o;_r.displayName="Select";var Fa=_r;var So=Fa;var rt=K(require("react"));var Go=K(require("@emotion/styled"));var Xt=K(require("@emotion/styled"));var Co=Xt.default.div`
|
|
660
666
|
display: inline-flex;
|
|
661
667
|
flex-direction: column;
|
|
662
668
|
width: ${({fullWidth:e})=>e?"100%":"320px"};
|
|
663
|
-
`,
|
|
664
|
-
font-size: 14px;
|
|
665
|
-
margin-bottom: 4px;
|
|
666
|
-
color: ${({theme:e})=>v(e,"colors").text};
|
|
667
|
-
`,io=Ct.default.div`
|
|
668
|
-
font-size: 12px;
|
|
669
|
-
margin-top: 4px;
|
|
670
|
-
color: ${({theme:e,error:t})=>t?v(e,"colors").error:v(e,"colors").textSecondary};
|
|
671
|
-
`,Mt=Ct.default.span`
|
|
669
|
+
`,Lt=Xt.default.span`
|
|
672
670
|
display: flex;
|
|
673
671
|
align-items: center;
|
|
674
672
|
justify-content: center;
|
|
675
|
-
color: ${(
|
|
673
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
676
674
|
flex-shrink: 0;
|
|
677
675
|
line-height: 0;
|
|
678
676
|
margin-right: ${({$position:e})=>e==="start"?"8px":"0"};
|
|
679
677
|
margin-left: ${({$position:e})=>e==="end"?"8px":"0"};
|
|
680
|
-
`,
|
|
678
|
+
`,jr=Xt.default.button`
|
|
681
679
|
background: none;
|
|
682
680
|
border: none;
|
|
683
681
|
padding: 0;
|
|
684
682
|
margin: 0 4px 0 8px;
|
|
685
683
|
cursor: pointer;
|
|
686
|
-
color: ${(
|
|
684
|
+
color: ${t("colors.textTertiary","rgba(0, 0, 0, 0.25)")};
|
|
687
685
|
display: flex;
|
|
688
686
|
align-items: center;
|
|
689
687
|
justify-content: center;
|
|
@@ -693,25 +691,25 @@
|
|
|
693
691
|
color 0.2s,
|
|
694
692
|
opacity 0.2s;
|
|
695
693
|
visibility: ${({visible:e})=>e?"visible":"hidden"};
|
|
696
|
-
opacity: ${({visible:e,$isHoverShow:
|
|
697
|
-
pointer-events: ${({visible:e,$isHoverShow:
|
|
694
|
+
opacity: ${({visible:e,$isHoverShow:o})=>!e||o?0:1};
|
|
695
|
+
pointer-events: ${({visible:e,$isHoverShow:o})=>!e||o?"none":"auto"};
|
|
698
696
|
|
|
699
697
|
&:hover {
|
|
700
|
-
color: ${(
|
|
698
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
701
699
|
}
|
|
702
|
-
|
|
700
|
+
`,$o=Xt.default.input`
|
|
703
701
|
flex: 1;
|
|
704
702
|
border: none;
|
|
705
703
|
outline: none;
|
|
706
704
|
background: transparent;
|
|
707
705
|
padding: 0;
|
|
708
706
|
margin: 0;
|
|
709
|
-
color: ${(
|
|
710
|
-
font-size: ${({
|
|
707
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
708
|
+
font-size: ${({$size:e})=>{switch(e){case"small":return t("components.input.fontSize.sm",t("fontSize.sm","12px"));case"large":return t("components.input.fontSize.lg",t("fontSize.lg","16px"));default:return t("components.input.fontSize.md",t("fontSize.md","14px"))}}};
|
|
711
709
|
width: 100%;
|
|
712
710
|
|
|
713
711
|
&::placeholder {
|
|
714
|
-
color: ${(
|
|
712
|
+
color: ${t("colors.textDisabled","rgba(0, 0, 0, 0.25)")};
|
|
715
713
|
}
|
|
716
714
|
|
|
717
715
|
&:disabled {
|
|
@@ -733,21 +731,21 @@
|
|
|
733
731
|
width: 0;
|
|
734
732
|
height: 0;
|
|
735
733
|
}
|
|
736
|
-
`,
|
|
734
|
+
`,jo=Xt.default.div`
|
|
737
735
|
display: flex;
|
|
738
736
|
align-items: center;
|
|
739
737
|
position: relative;
|
|
740
738
|
box-sizing: border-box;
|
|
741
739
|
width: 100%;
|
|
742
|
-
background-color: ${(
|
|
740
|
+
background-color: ${t("colors.background","#fff")};
|
|
743
741
|
border: 1px solid
|
|
744
|
-
${({
|
|
745
|
-
border-radius: ${(
|
|
746
|
-
padding: ${({
|
|
742
|
+
${({focused:e,status:o})=>o==="error"?t("colors.error","#ff4d4f"):o==="warning"?t("colors.warning","#faad14"):e?t("components.input.activeBorderColor",t("colors.primary","#1890ff")):t("colors.border","#d9d9d9")};
|
|
743
|
+
border-radius: ${t("components.input.borderRadius",t("borderRadius.md","6px"))};
|
|
744
|
+
padding: ${({size:e})=>{switch(e){case"small":return t("components.input.padding.sm","1px 7px");case"large":return t("components.input.padding.lg","6px 11px");default:return t("components.input.padding.md","4px 11px")}}};
|
|
747
745
|
transition: all 0.2s;
|
|
748
746
|
|
|
749
747
|
&:hover {
|
|
750
|
-
border-color: ${({
|
|
748
|
+
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"))};
|
|
751
749
|
|
|
752
750
|
.compass-input-clear-button[data-visible='true'] {
|
|
753
751
|
opacity: 1;
|
|
@@ -755,210 +753,300 @@
|
|
|
755
753
|
}
|
|
756
754
|
}
|
|
757
755
|
|
|
758
|
-
${({disabled:e
|
|
759
|
-
background-color: ${
|
|
756
|
+
${({disabled:e})=>e&&`
|
|
757
|
+
background-color: ${t("colors.backgroundSecondary","#f5f5f5")};
|
|
760
758
|
cursor: not-allowed;
|
|
761
759
|
opacity: 0.6;
|
|
762
760
|
`}
|
|
763
|
-
`;var
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
to {
|
|
768
|
-
transform: rotate(360deg);
|
|
769
|
-
}
|
|
770
|
-
`,Ma=po.default.div`
|
|
771
|
-
position: fixed;
|
|
772
|
-
top: ${({theme:e})=>e.spacing?.md||16}px;
|
|
773
|
-
left: 0;
|
|
774
|
-
width: 100%;
|
|
775
|
-
pointer-events: none;
|
|
776
|
-
z-index: ${({theme:e})=>e?.components?.message?.zIndex||1010};
|
|
761
|
+
`;var Da=(0,Go.default)(jo)`
|
|
762
|
+
padding-right: ${({size:e,controls:o})=>o?{small:"30px",medium:"34px",large:"38px"}[e||"medium"]:void 0};
|
|
763
|
+
`,Ea=Go.default.div`
|
|
777
764
|
display: flex;
|
|
778
765
|
flex-direction: column;
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
766
|
+
position: absolute;
|
|
767
|
+
right: 0;
|
|
768
|
+
top: 0;
|
|
769
|
+
height: 100%;
|
|
770
|
+
width: 22px;
|
|
771
|
+
border-left: 1px solid ${t("colors.border","#d9d9d9")};
|
|
772
|
+
border-radius: 0 ${t("components.input.borderRadius",t("borderRadius.md","4px"))}
|
|
773
|
+
${t("components.input.borderRadius",t("borderRadius.md","4px"))} 0;
|
|
774
|
+
overflow: hidden;
|
|
775
|
+
opacity: 0;
|
|
776
|
+
transition: opacity 0.2s;
|
|
777
|
+
pointer-events: none;
|
|
778
|
+
z-index: 1; // Ensure it sits above input content area if needed
|
|
784
779
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
&.compass-message-enter-active {
|
|
780
|
+
// Show when InputWrapper (parent) is hovered or focused within
|
|
781
|
+
.compass-input-number:hover &,
|
|
782
|
+
.compass-input-number:focus-within & {
|
|
790
783
|
opacity: 1;
|
|
791
|
-
|
|
792
|
-
transition: ${({theme:e})=>e.transitions?.slow||"all 0.3s ease-in-out"};
|
|
784
|
+
pointer-events: auto;
|
|
793
785
|
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
786
|
+
|
|
787
|
+
// Sync border color with parent hover state
|
|
788
|
+
.compass-input-number:hover & {
|
|
789
|
+
border-left-color: ${t("components.input.hoverBorderColor",t("colors.primary","#4096ff"))};
|
|
797
790
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
791
|
+
|
|
792
|
+
// Sync border color with parent focus state
|
|
793
|
+
.compass-input-number:focus-within & {
|
|
794
|
+
border-left-color: ${t("components.input.activeBorderColor",t("colors.primary","#40a9ff"))};
|
|
802
795
|
}
|
|
803
|
-
`,
|
|
804
|
-
display:
|
|
805
|
-
align-items: center;
|
|
806
|
-
padding: ${({theme:e})=>e?.components?.message?.contentPadding||`${e.spacing?.sm||8}px ${e.spacing?.md||16}px`};
|
|
807
|
-
background: ${({theme:e})=>e.colors?.background||"#fff"};
|
|
808
|
-
border-radius: ${({theme:e})=>e?.components?.message?.borderRadius||`${e.borderRadius?.lg||8}px`};
|
|
809
|
-
box-shadow: ${({theme:e})=>e?.components?.message?.boxShadow||e.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)"};
|
|
810
|
-
font-size: ${({theme:e})=>e.fontSize?.sm||14}px;
|
|
811
|
-
line-height: ${({theme:e})=>e.lineHeight?.normal||1.5715};
|
|
812
|
-
color: ${({theme:e})=>e.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
813
|
-
`,Fa=po.default.span`
|
|
814
|
-
margin-right: ${({theme:e})=>e.spacing?.sm||8}px;
|
|
815
|
-
display: inline-flex;
|
|
796
|
+
`,Gr=Go.default.button`
|
|
797
|
+
display: flex;
|
|
816
798
|
align-items: center;
|
|
817
|
-
|
|
818
|
-
|
|
799
|
+
justify-content: center;
|
|
800
|
+
flex: 1;
|
|
801
|
+
width: 22px;
|
|
802
|
+
padding: 0;
|
|
803
|
+
border: none;
|
|
804
|
+
border-bottom: 1px solid ${t("colors.border","#d9d9d9")};
|
|
805
|
+
background: transparent;
|
|
806
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
807
|
+
color: ${({disabled:e})=>e?t("colors.textTertiary","#bfbfbf"):t("colors.textSecondary","#595959")};
|
|
808
|
+
transition: all 0.2s;
|
|
819
809
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
max-width: ${e=>e.$width?"100%":"500px"};
|
|
848
|
-
margin: auto;
|
|
810
|
+
// Sync separator border color
|
|
811
|
+
.compass-input-number:hover & {
|
|
812
|
+
border-bottom-color: ${t("components.input.hoverBorderColor",t("colors.primary","#4096ff"))};
|
|
813
|
+
}
|
|
814
|
+
.compass-input-number:focus-within & {
|
|
815
|
+
border-bottom-color: ${t("components.input.activeBorderColor",t("colors.primary","#40a9ff"))};
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
&:last-of-type {
|
|
819
|
+
border-bottom: none;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
&:hover:not(:disabled) {
|
|
823
|
+
flex: 1.4; // Expand height on hover (60/40 ratio)
|
|
824
|
+
background: ${t("colors.backgroundSecondary","#f5f5f5")};
|
|
825
|
+
color: ${t("colors.text","#000")};
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
&:active:not(:disabled) {
|
|
829
|
+
background: ${t("colors.backgroundTertiary","#e6e6e6")};
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
svg {
|
|
833
|
+
width: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
834
|
+
height: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
835
|
+
}
|
|
836
|
+
`;var Ee=require("react/jsx-runtime"),za=rt.default.forwardRef((e,o)=>{let{value:r,defaultValue:a,onChange:n,min:s,max:i,step:l=1,precision:d,controls:c=!0,keyboard:m=!0,disabled:f,onBlur:x,onPressEnter:b,onFocus:y,prefix:w,suffix:g,size:u="medium",fullWidth:p=!1,className:P,style:v,status:C,classNames:F,styles:E,...T}=e,W=(0,rt.useRef)(null);rt.default.useImperativeHandle(o,()=>W.current);let[Y,R]=(0,rt.useState)(!1),M=r!==void 0,[k,h]=(0,rt.useState)(a??null),I=M?r===void 0?null:r:k,H=rt.default.useCallback(_=>_===null?"":d!==void 0?_.toFixed(d):String(_),[d]),[O,U]=(0,rt.useState)(()=>H(I)),[A,Q]=(0,rt.useState)(I);I!==A&&!Y&&(U(H(I)),Q(I));let Z=_=>{if(!_.trim())return null;let G=parseFloat(_);return isNaN(G)?null:G},S=_=>{let G=_;return s!==void 0&&G<s&&(G=s),i!==void 0&&G>i&&(G=i),G},B=_=>{R(!0),y?.(_)},J=_=>{let G=Z(O);G!==null&&(G=S(G)),M||h(G),n?.(G);let Se=H(G);U(Se),Q(G),x?.(_),R(!1)},N=_=>{let G=_.target.value.trim();if(/^-?(\d+(\.\d*)?)?$/.test(G)||G===""||G==="-"){if(G==="-"&&s!==void 0&&s>=0)return;let se=Z(G);if(se!==null&&i!==void 0&&se>i)return;U(G),M||h(se),n?.(se)}},ne=_=>{let G=I??0,Se=_==="up"?l:-l,se=G+Se;d!==void 0?se=parseFloat(se.toFixed(d)):se=parseFloat(se.toFixed(10)),se=S(se),M||h(se),n?.(se),U(H(se)),Q(se)},j=_=>{if(_.key==="Enter"){let G=Z(O);G!==null&&(G=S(G)),M||h(G),n?.(G),U(H(G)),Q(G),b?.(_)}m&&!f&&(_.key==="ArrowUp"?(_.preventDefault(),ne("up")):_.key==="ArrowDown"&&(_.preventDefault(),ne("down")))};return(0,Ee.jsx)(Co,{fullWidth:p,className:`compass-input-number ${P||""} ${F?.root||""}`,style:{...v,...E?.root},children:(0,Ee.jsxs)(Da,{disabled:f,focused:Y,size:u,controls:c,status:C,className:`compass-input-number-wrapper compass-input-number--${u} ${F?.inputWrapper||""}`,style:E?.inputWrapper,children:[w&&(0,Ee.jsx)(Lt,{$position:"start",className:`compass-input-number-prefix ${F?.prefix||""}`,style:E?.prefix,children:w}),(0,Ee.jsx)($o,{ref:W,type:"text",role:"spinbutton","aria-valuenow":I??void 0,"aria-valuemin":s,"aria-valuemax":i,inputMode:"decimal",value:O,onChange:N,onBlur:J,onFocus:B,onKeyDown:j,disabled:f,$size:u,className:`compass-input-number-input ${F?.input||""}`,style:E?.input,...T}),g&&(0,Ee.jsx)(Lt,{$position:"end",className:`compass-input-number-suffix ${F?.suffix||""}`,style:E?.suffix,children:g}),c&&!f&&(0,Ee.jsxs)(Ea,{size:u,children:[(0,Ee.jsx)(Gr,{type:"button",disabled:i!==void 0&&I!==null&&I>=i,onClick:()=>ne("up"),onMouseDown:_=>_.preventDefault(),$size:u,className:`compass-input-number-handler-up ${F?.upHandler||""}`,style:E?.upHandler,children:(0,Ee.jsx)("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:(0,Ee.jsx)("path",{d:"M6 3l4 4H2z"})})}),(0,Ee.jsx)(Gr,{type:"button",disabled:s!==void 0&&I!==null&&I<=s,onClick:()=>ne("down"),onMouseDown:_=>_.preventDefault(),$size:u,className:`compass-input-number-handler-down ${F?.downHandler||""}`,style:E?.downHandler,children:(0,Ee.jsx)("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:(0,Ee.jsx)("path",{d:"M6 9l4-4H2z"})})})]})]})})});za.displayName="InputNumber";var Uo=za;var Ur=Uo;var Ba=require("react"),Zt="...",qo=(e,o)=>{let r=o-e+1;return Array.from({length:r},(a,n)=>n+e)},Ha=({total:e,pageSize:o,siblingCount:r=1,current:a})=>(0,Ba.useMemo)(()=>{let s=Math.ceil(e/o),i=r+5;if(s<=i)return qo(1,s);let l=Math.max(a-r,1),d=Math.min(a+r,s),c=l>2,m=d<s-2,f=1,x=s;if(!c&&m){let b=3+2*r;return[...qo(1,b),Zt,s]}if(c&&!m){let b=3+2*r,y=qo(s-b+1,s);return[f,Zt,...y]}if(c&&m){let b=qo(l,d);return[f,Zt,...b,Zt,x]}return[]},[e,o,r,a])||[];var Qo=require("react"),Jo=(0,Qo.createContext)({locale:void 0}),Ke=()=>(0,Qo.useContext)(Jo);var Ml={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"}},La=Ml;var ie=require("react/jsx-runtime"),Rl=({current:e,defaultCurrent:o=1,total:r=0,pageSize:a,defaultPageSize:n=10,onChange:s,disabled:i,size:l="default",showSizeChanger:d,pageSizeOptions:c=[10,20,50,100],showQuickJumper:m,showTotal:f,simple:x,totalAlign:b="left",className:y,style:w,styles:g,classNames:u,...p})=>{let{locale:P}=Ke(),v=P?.Pagination||La.Pagination,[C,F]=(0,Rt.useState)(e||o),[E,T]=(0,Rt.useState)(a||n),[W,Y]=(0,Rt.useState)(String(C));(0,Rt.useEffect)(()=>{e!==void 0&&(F(e),Y(String(e)))},[e]),(0,Rt.useEffect)(()=>{Y(String(C))},[C]),(0,Rt.useEffect)(()=>{a!==void 0&&T(a)},[a]);let R=Math.ceil(r/E),M=Ha({current:C,total:r,pageSize:E,siblingCount:1}),k=S=>{if(i)return;let B=S;B<1&&(B=1),B>R&&(B=R),B!==C&&(e===void 0&&F(B),s?.(B,E))},h=S=>{let B=Number(S);T(B);let J=1;e===void 0&&F(J),s?.(J,B)},I=()=>{k(C-5)},H=()=>{k(C+5)},O=S=>{Y(S===null?"":String(S))},U=()=>{let S=parseInt(W,10);isNaN(S)?S=C:(S<1&&(S=1),S>R&&(S=R)),k(S),Y(String(S))},A=S=>{let B=S.target,J=parseInt(B.value,10);isNaN(J)?J=C:(J<1&&(J=1),J>R&&(J=R)),k(J),Y(String(J)),B.blur()};if(r===0)return null;if(x)return(0,ie.jsxs)(Wr,{className:`compass-pagination compass-pagination-simple ${y||""} ${u?.root||""}`,style:{...w,...g?.root},disabled:i,size:l,...p,"aria-label":"pagination",children:[(0,ie.jsx)(Ht,{disabled:C===1||i,onClick:()=>k(C-1),size:l,className:`compass-pagination-prev ${u?.item||""}`,style:g?.item,title:v.prev_page,children:(0,ie.jsx)(zt,{})}),(0,ie.jsxs)("li",{style:{margin:"0 8px",display:"flex",alignItems:"center"},children:[(0,ie.jsx)(Ur,{value:W?parseInt(W,10):null,onChange:O,onBlur:U,onPressEnter:A,size:l==="small"?"small":"medium",disabled:i,className:"compass-pagination-simple-input",min:1,max:R}),(0,ie.jsx)("span",{style:{margin:"0 8px"},children:"/"}),R]}),(0,ie.jsx)(Ht,{disabled:C===R||i,onClick:()=>k(C+1),size:l,className:`compass-pagination-next ${u?.item||""}`,style:g?.item,title:v.next_page,children:(0,ie.jsx)(Bt,{})})]});let Q=M.map((S,B)=>{if(S===Zt){let J=B===1;return(0,ie.jsxs)(Ht,{className:`compass-pagination-jump-placeholder ${u?.jumpItem||""}`,style:g?.jumpItem,size:l,disabled:i,title:J?v.prev_5:v.next_5,onClick:J?I:H,children:[(0,ie.jsx)("div",{className:"compass-pagination-item-ellipsis",children:(0,ie.jsx)(da,{})}),(0,ie.jsx)("div",{className:"compass-pagination-item-link-icon",children:J?(0,ie.jsx)(Tt,{}):(0,ie.jsx)(Mt,{})})]},`dots-${B}`)}return(0,ie.jsx)(Ht,{active:C===S,disabled:i,size:l,onClick:()=>k(Number(S)),className:`compass-pagination-item compass-pagination-item-${S} ${C===S?`compass-pagination-item-active ${u?.activeItem||""}`:""} ${u?.item||""}`,style:{...g?.item,...C===S?g?.activeItem:{}},children:S},S)}),Z=()=>{if(!f)return null;let S=(C-1)*E+1,B=Math.min(C*E,r);return(0,ie.jsx)("li",{className:`compass-pagination-total-text ${u?.total||""}`,style:{marginRight:b==="left"?8:0,marginLeft:b==="right"?8:0,...g?.total},children:f(r,[S,B])})};return(0,ie.jsxs)(Wr,{className:`compass-pagination ${y||""} ${u?.root||""}`,style:{...w,...g?.root},disabled:i,size:l,...p,"aria-label":"pagination",children:[b==="left"&&Z(),(0,ie.jsx)(Ht,{disabled:C===1||i,onClick:()=>k(C-1),size:l,className:`compass-pagination-prev ${u?.item||""}`,style:g?.item,title:v.prev_page,children:(0,ie.jsx)(zt,{})}),Q,(0,ie.jsx)(Ht,{disabled:C===R||i,onClick:()=>k(C+1),size:l,className:`compass-pagination-next ${u?.item||""}`,style:g?.item,title:v.next_page,children:(0,ie.jsx)(Bt,{})}),d&&(0,ie.jsx)("li",{className:`compass-pagination-options ${u?.options||""}`,style:{marginLeft:16,...g?.options},children:(0,ie.jsx)(So,{size:l==="small"?"small":"medium",value:String(E),onChange:h,disabled:i,styles:{root:{width:l==="small"?90:110}},children:c.map(S=>(0,ie.jsxs)(So.Option,{value:String(S),children:[S," ",v.items_per_page]},S))})}),b==="right"&&Z(),m&&(0,ie.jsxs)("li",{className:`compass-pagination-options compass-pagination-quick-jumper ${u?.options||""}`,style:{marginLeft:16,display:"flex",alignItems:"center",...g?.options},children:[v.jump_to,(0,ie.jsx)(Ur,{size:l==="small"?"small":"medium",disabled:i,style:{width:50,margin:"0 8px"},min:1,max:R,onBlur:S=>{let B=parseInt(S.target.value,10);isNaN(B)||k(B),S.target.value=""},onPressEnter:S=>{let B=S.currentTarget,J=parseInt(B.value,10);isNaN(J)||(k(J),B.value="",B.blur())}})]})]})},Oa=Rl;var Xo=Oa;var Qe=K(require("@emotion/styled")),Va=require("@emotion/react");var Wa=Qe.default.div`
|
|
849
837
|
position: relative;
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
${e=>e
|
|
856
|
-
|
|
838
|
+
width: 100%;
|
|
839
|
+
overflow-x: auto;
|
|
840
|
+
border-radius: 8px;
|
|
841
|
+
border: ${({bordered:e})=>{let o=t("colors.border","#d9d9d9");return e?`1px solid ${o}`:"none"}};
|
|
842
|
+
`,Aa=Qe.default.table`
|
|
843
|
+
width: ${({scrollX:e})=>e?typeof e=="number"?`${e}px`:e:"100%"};
|
|
844
|
+
min-width: 100%;
|
|
845
|
+
border-collapse: collapse;
|
|
846
|
+
text-align: left;
|
|
847
|
+
background-color: ${t("components.table.bodyBg",t("colors.background","#fff"))};
|
|
848
|
+
display: ${({scrollY:e})=>e?"flex":"table"};
|
|
849
|
+
flex-direction: column;
|
|
850
|
+
`,Ka=Qe.default.thead`
|
|
851
|
+
background-color: ${t("components.table.headerBg",t("colors.backgroundSecondary","#fafafa"))};
|
|
852
|
+
${({scrollY:e})=>e?"flex: 0 0 auto;":""}
|
|
853
|
+
`,qr=Qe.default.tbody`
|
|
854
|
+
${({scrollY:e})=>e?`
|
|
855
|
+
display: block;
|
|
856
|
+
overflow-y: auto;
|
|
857
|
+
max-height: ${typeof e=="number"?`${e}px`:e};
|
|
858
|
+
flex: 1 1 auto;
|
|
859
|
+
`:""}
|
|
860
|
+
|
|
861
|
+
& > tr:last-child > td {
|
|
862
|
+
border-bottom: none;
|
|
863
|
+
}
|
|
864
|
+
`,Zo=Qe.default.tr`
|
|
865
|
+
transition: background-color 0.2s;
|
|
866
|
+
${({scrollY:e})=>e?`
|
|
867
|
+
display: table;
|
|
868
|
+
width: 100%;
|
|
869
|
+
table-layout: fixed;
|
|
870
|
+
`:""}
|
|
871
|
+
|
|
872
|
+
&:hover {
|
|
873
|
+
background-color: ${t("components.table.rowHoverBg",t("colors.backgroundSecondary","#f5f5f5"))};
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
border-bottom: 1px solid
|
|
877
|
+
${t("components.table.borderColor",t("colors.border","#d9d9d9"))};
|
|
878
|
+
`,Qr=Qe.default.th`
|
|
879
|
+
padding: ${({size:e})=>e==="small"?"8px 8px":e==="large"?"16px 16px":"12px 16px"};
|
|
880
|
+
color: ${t("components.table.headerColor",t("colors.text","#333"))};
|
|
881
|
+
font-weight: 600;
|
|
882
|
+
text-align: ${({align:e})=>e||"left"};
|
|
883
|
+
width: ${({width:e})=>typeof e=="number"?`${e}px`:e};
|
|
884
|
+
white-space: nowrap;
|
|
885
|
+
${({fixed:e})=>e?`
|
|
886
|
+
position: sticky;
|
|
887
|
+
z-index: 2;
|
|
888
|
+
background-color: ${t("components.table.headerBg",t("colors.backgroundSecondary","#fafafa"))};
|
|
889
|
+
${e==="right"?"right: 0;":"left: 0;"}
|
|
890
|
+
box-shadow: ${e==="right"?"-2px 0 5px rgba(0,0,0,0.05)":"2px 0 5px rgba(0,0,0,0.05)"};
|
|
891
|
+
`:""}
|
|
892
|
+
`,er=Qe.default.td`
|
|
893
|
+
padding: ${({size:e})=>e==="small"?"8px 8px":e==="large"?"16px 16px":"12px 16px"};
|
|
894
|
+
color: ${t("components.table.color",t("colors.text","#333"))};
|
|
895
|
+
text-align: ${({align:e})=>e||"left"};
|
|
896
|
+
${({fixed:e})=>e?`
|
|
897
|
+
position: sticky;
|
|
898
|
+
z-index: 1;
|
|
899
|
+
background-color: ${t("components.table.bodyBg",t("colors.background","#fff"))};
|
|
900
|
+
${e==="right"?"right: 0;":"left: 0;"}
|
|
901
|
+
box-shadow: ${e==="right"?"-2px 0 5px rgba(0,0,0,0.05)":"2px 0 5px rgba(0,0,0,0.05)"};
|
|
902
|
+
`:""}
|
|
903
|
+
`,Ya=Qe.default.div`
|
|
904
|
+
padding: 32px;
|
|
905
|
+
text-align: center;
|
|
906
|
+
color: ${t("colors.textSecondary","#999")};
|
|
907
|
+
`,_a=Qe.default.div`
|
|
908
|
+
display: flex;
|
|
909
|
+
justify-content: flex-end;
|
|
910
|
+
padding: 16px 0;
|
|
911
|
+
`,Jr=Qe.default.div`
|
|
912
|
+
position: absolute;
|
|
913
|
+
top: 0;
|
|
914
|
+
left: 0;
|
|
915
|
+
right: 0;
|
|
916
|
+
bottom: 0;
|
|
917
|
+
background: rgba(255, 255, 255, 0.75);
|
|
918
|
+
backdrop-filter: blur(0.5px);
|
|
857
919
|
display: flex;
|
|
858
920
|
align-items: center;
|
|
859
|
-
justify-content:
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
font-
|
|
863
|
-
|
|
864
|
-
|
|
921
|
+
justify-content: center;
|
|
922
|
+
z-index: 10;
|
|
923
|
+
color: ${t("colors.primary","#1890ff")};
|
|
924
|
+
font-weight: 500;
|
|
925
|
+
max-height: 380px;
|
|
926
|
+
`,Il=Va.keyframes`
|
|
927
|
+
100% {
|
|
928
|
+
transform: rotate(360deg);
|
|
929
|
+
}
|
|
930
|
+
`,Xr=Qe.default.div`
|
|
931
|
+
width: 32px;
|
|
932
|
+
height: 32px;
|
|
933
|
+
border-radius: 50%;
|
|
934
|
+
background:
|
|
935
|
+
radial-gradient(farthest-side, ${t("colors.primary","#1890ff")} 94%, #0000) top/4px 4px
|
|
936
|
+
no-repeat,
|
|
937
|
+
conic-gradient(#0000 30%, ${t("colors.primary","#1890ff")});
|
|
938
|
+
-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 4px), #000 0);
|
|
939
|
+
animation: ${Il} 1s infinite linear;
|
|
940
|
+
`;var ae=require("react/jsx-runtime");function Zr(e){let{dataSource:o=[],columns:r,rowKey:a="key",bordered:n=!1,size:s="medium",loading:i=!1,pagination:l,rowSelection:d,emptyText:c="No Data",scroll:m,onHeaderRow:f,onRow:x,loadingIndicator:b,className:y,style:w,styles:g,classNames:u}=e,[p,P]=(0,tr.useState)(null),v=(h,I)=>typeof a=="function"?a(h):String(h[a])||I.toString(),C=h=>{if(d?.onChange)if(h.target.checked){let I=o.map((H,O)=>v(H,O));d.onChange(I,o)}else d.onChange([],[])},F=(h,I)=>{if(!d?.onChange)return;let H=v(h,I),O=d.selectedRowKeys||[],U=O.includes(H),A=[];U?A=O.filter(Z=>Z!==H):A=[...O,H];let Q=o.filter((Z,S)=>A.includes(v(Z,S)));d.onChange(A,Q)},E=h=>{let I=r.find(H=>(H.key||H.dataIndex)===h);!I||!I.sorter||P(H=>H?.key===h?H.order==="ascend"?{key:h,order:"descend"}:null:{key:h,order:"ascend"})},T=(0,tr.useMemo)(()=>{let h=[...o];if(p&&p.order){let I=r.find(H=>(H.key||H.dataIndex)===p.key);I?.sorter&&h.sort((H,O)=>{let U=I.sorter(H,O);return p.order==="ascend"?U:-U})}return h},[o,p,r]),W=o.length>0&&o.every((h,I)=>d?.selectedRowKeys?.includes(v(h,I))),Y=(d?.selectedRowKeys?.length||0)>0&&!W,R=()=>(0,ae.jsx)(Ka,{scrollY:m?.y,className:`compass-table-thead ${u?.thead||""}`,style:g?.thead,children:(0,ae.jsxs)(Zo,{scrollY:m?.y,className:`compass-table-row ${u?.tr||""}`,style:g?.tr,...f?f(r):{},children:[d&&(0,ae.jsx)(Qr,{size:s,width:50,className:`compass-table-cell compass-table-selection-column ${u?.th||""}`,style:g?.th,fixed:"left",children:(0,ae.jsx)("input",{type:"checkbox",checked:W,ref:h=>{h&&(h.indeterminate=!!Y)},onChange:C})}),r.map(h=>{let I=h.key||h.dataIndex,O=p?.key===I?p.order:null;return(0,ae.jsx)(Qr,{align:h.align,width:h.width,size:s,fixed:h.fixed,className:`compass-table-cell ${u?.th||""}`,style:{cursor:h.sorter?"pointer":"default",...g?.th},onClick:()=>E(I),children:(0,ae.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:h.align==="right"?"flex-end":h.align==="center"?"center":"flex-start"},children:[h.title,h.sorter&&(0,ae.jsxs)("span",{style:{display:"inline-flex",flexDirection:"column",marginLeft:8,fontSize:10,lineHeight:.8,color:"#bfbfbf"},children:[(0,ae.jsx)("span",{style:{color:O==="ascend"?"#1890ff":"inherit"},role:"img","aria-label":"caret-up",children:"\u25B2"}),(0,ae.jsx)("span",{style:{color:O==="descend"?"#1890ff":"inherit"},role:"img","aria-label":"caret-down",children:"\u25BC"})]})]})},I)})]})}),M=()=>{if(T.length===0){let h=i&&o.length===0;return(0,ae.jsx)(qr,{className:`compass-table-tbody ${u?.tbody||""}`,style:g?.tbody,children:(0,ae.jsx)(Zo,{className:`compass-table-row ${u?.tr||""}`,style:g?.tr,children:(0,ae.jsx)(er,{colSpan:r.length+(d?1:0),className:`compass-table-cell ${u?.td||""}`,style:{...h?{textAlign:"center",padding:"32px"}:void 0,...g?.td},children:h?(0,ae.jsx)(Jr,{className:`compass-table-loading-overlay ${u?.loadingOverlay||""}`,style:{position:"static",background:"transparent",...g?.loadingOverlay},children:b||(0,ae.jsx)(Xr,{})}):(0,ae.jsx)(Ya,{className:`compass-table-empty ${u?.empty||""}`,style:g?.empty,children:c})})})})}return(0,ae.jsx)(qr,{scrollY:m?.y,className:`compass-table-tbody ${u?.tbody||""}`,style:g?.tbody,children:T.map((h,I)=>{let H=v(h,I),O=d?.selectedRowKeys?.includes(H);return(0,ae.jsxs)(Zo,{scrollY:m?.y,className:`compass-table-row ${u?.tr||""}`,style:g?.tr,...x?x(h,I):{},children:[d&&(0,ae.jsx)(er,{size:s,className:`compass-table-cell compass-table-selection-column ${u?.td||""}`,style:g?.td,fixed:"left",children:(0,ae.jsx)("input",{type:"checkbox",checked:!!O,onChange:()=>F(h,I)})}),r.map(U=>{let A=U.key||U.dataIndex,Q=U.dataIndex?h[U.dataIndex]:void 0;return(0,ae.jsx)(er,{align:U.align,size:s,fixed:U.fixed,className:`compass-table-cell ${u?.td||""}`,style:g?.td,children:U.render?U.render(Q,h,I):Q},A)})]},H)})})},k=["compass-table",s&&`compass-table--${s}`,n&&"compass-table--bordered"].filter(Boolean).join(" ");return(0,ae.jsxs)("div",{children:[(0,ae.jsxs)(Wa,{bordered:n,className:`${k} ${y||""} ${u?.root||""}`,style:{...w,...g?.root},children:[(0,ae.jsxs)(Aa,{className:`compass-table-container ${u?.table||""}`,scrollY:m?.y,scrollX:m?.x,style:g?.table,children:[R(),M()]}),i&&o.length>0&&(0,ae.jsx)(Jr,{className:`compass-table-loading-overlay ${u?.loadingOverlay||""}`,style:g?.loadingOverlay,children:b||(0,ae.jsx)(Xr,{})})]}),l&&(0,ae.jsx)(_a,{className:`compass-table-pagination ${u?.pagination||""}`,style:g?.pagination,children:(0,ae.jsx)(Xo,{...l})})]})}var Ot=require("react"),os=require("react-window");var yt=K(require("@emotion/styled")),en=require("@emotion/react");var ja=yt.default.div`
|
|
941
|
+
position: relative;
|
|
942
|
+
font-size: ${t("components.tree.fontSize","14px")};
|
|
865
943
|
line-height: 1.5;
|
|
866
|
-
|
|
944
|
+
color: ${t("components.tree.nodeColor","rgba(0, 0, 0, 0.88)")};
|
|
945
|
+
`,Ga=yt.default.div`
|
|
867
946
|
display: flex;
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
947
|
+
align-items: center;
|
|
948
|
+
padding: 0 4px;
|
|
949
|
+
padding-left: ${({level:e})=>`calc(${e} * ${t("components.tree.indentSize","24px")} + 4px)`};
|
|
950
|
+
cursor: pointer;
|
|
951
|
+
transition: background-color 0.2s;
|
|
952
|
+
position: relative;
|
|
953
|
+
background-color: ${({selected:e})=>e?t("components.tree.nodeSelectedBg","#e6f7ff"):"transparent"};
|
|
954
|
+
border-radius: ${t("components.tree.borderRadius","4px")};
|
|
955
|
+
color: ${({selected:e})=>e?t("components.tree.nodeSelectedColor","inherit"):"inherit"};
|
|
956
|
+
|
|
957
|
+
&:hover {
|
|
958
|
+
background-color: ${({selected:e})=>e?t("components.tree.nodeSelectedBg","#e6f7ff"):t("components.tree.nodeHoverBg","#f5f5f5")};
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
${({disabled:e})=>e&&en.css`
|
|
962
|
+
cursor: not-allowed;
|
|
963
|
+
opacity: 0.5;
|
|
964
|
+
&:hover {
|
|
965
|
+
background-color: transparent;
|
|
966
|
+
}
|
|
967
|
+
`}
|
|
968
|
+
`,or=yt.default.span`
|
|
969
|
+
font-size: 12px;
|
|
875
970
|
display: flex;
|
|
876
|
-
align-items:
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
line-height:
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
color: rgba(0, 0, 0, 0.
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
971
|
+
align-items: center;
|
|
972
|
+
justify-content: center;
|
|
973
|
+
flex-shrink: 0;
|
|
974
|
+
user-select: none;
|
|
975
|
+
line-height: 0;
|
|
976
|
+
width: 24px;
|
|
977
|
+
height: 24px;
|
|
978
|
+
margin-right: 4px;
|
|
979
|
+
cursor: pointer;
|
|
980
|
+
position: relative;
|
|
981
|
+
transform: rotate(
|
|
982
|
+
${({expanded:e,showLine:o})=>o?"0deg":e?"90deg":"0deg"}
|
|
983
|
+
);
|
|
984
|
+
z-index: 1;
|
|
985
|
+
background: ${({showLine:e})=>e?"#fff":"transparent"};
|
|
986
|
+
color: ${t("components.tree.switcherColor","rgba(0, 0, 0, 0.45)")};
|
|
987
|
+
|
|
988
|
+
&:hover {
|
|
989
|
+
color: ${t("components.tree.switcherHoverColor","rgba(0, 0, 0, 0.88)")};
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
&.is-noop {
|
|
993
|
+
cursor: default;
|
|
994
|
+
transform: none;
|
|
995
|
+
&:hover {
|
|
996
|
+
color: inherit;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
`,Ua=yt.default.span`
|
|
1000
|
+
align-self: stretch;
|
|
1001
|
+
width: ${t("components.tree.indentSize","24px")};
|
|
1002
|
+
display: inline-block;
|
|
1003
|
+
flex-shrink: 0;
|
|
1004
|
+
position: relative;
|
|
1005
|
+
|
|
1006
|
+
${({active:e})=>e&&en.css`
|
|
1007
|
+
&::before {
|
|
1008
|
+
content: '';
|
|
1009
|
+
position: absolute;
|
|
1010
|
+
top: 0;
|
|
1011
|
+
bottom: 0;
|
|
1012
|
+
left: 50%;
|
|
1013
|
+
border-left: 1px solid #d9d9d9;
|
|
1014
|
+
transform: translateX(-50%);
|
|
1015
|
+
}
|
|
1016
|
+
`}
|
|
1017
|
+
`,qa=yt.default.span`
|
|
1018
|
+
margin-right: 8px;
|
|
895
1019
|
display: flex;
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
margin-top: 24px;
|
|
899
|
-
`;var $e=require("react/jsx-runtime"),ho=e=>{let t=document.createElement("div");document.body.appendChild(t);let o=(0,Xa.createRoot)(t),n={...e,isOpen:!1,confirmLoading:!1},r=()=>{o.unmount(),t.parentNode&&t.parentNode.removeChild(t)},a=s=>{let{onOk:l,onCancel:c,title:i,content:d,icon:g,type:x="confirm",okText:h=Xe.Modal.okText,cancelText:f=Xe.Modal.cancelText,closable:p=!1,confirmLoading:w,...S}=s,y=async()=>{if(l){let H=l();if(H&&typeof H.then=="function"){n={...n,confirmLoading:!0},a(n);try{await H,R()}catch(u){throw n={...n,confirmLoading:!1},a(n),console.error("Modal confirm error",u),u}}else R()}else R()},$=async()=>{c&&await c(),R()},R=()=>{n={...n,isOpen:!1,confirmLoading:!1},a(n),setTimeout(()=>{r()},mo)},G={info:(0,$e.jsx)(bt,{}),success:(0,$e.jsx)(Bt,{}),error:(0,$e.jsx)(Ht,{}),warning:(0,$e.jsx)(Lt,{})}[x]||(0,$e.jsx)(bt,{});o.render((0,$e.jsx)(go,{theme:ve,children:(0,$e.jsx)(Yt,{...S,width:416,closable:p,onCancel:$,footer:(0,$e.jsxs)(Uo,{children:[x==="confirm"?(0,$e.jsx)(Me,{onClick:$,children:f}):null,(0,$e.jsx)(Me,{variant:"primary",onClick:y,loading:w,children:h})]}),children:(0,$e.jsxs)(Yo,{children:[(0,$e.jsx)(Ko,{$type:x,children:g||G}),(0,$e.jsxs)(_o,{children:[i&&(0,$e.jsx)(jo,{children:i}),d&&(0,$e.jsx)(Go,{children:d})]})]})})}))};return a(n),setTimeout(()=>{n={...n,isOpen:!0},a(n)},10),{destroy:close,update:s=>{n={...n,...s},a(n)}}},Za=e=>ho({...e,type:"info"}),es=e=>ho({...e,type:"success"}),ts=e=>ho({...e,type:"error"}),os=e=>ho({...e,type:"warning"}),ol=e=>ho({...e,type:"confirm"}),rs=ol;var nt=N(require("react"));var ge=require("react/jsx-runtime"),rl=({afterClose:e,closeModal:t,onOk:o,onCancel:n,title:r,content:a,icon:s,type:l="info",okText:c="OK",cancelText:i="Cancel",isOpen:d,confirmLoading:g,...x})=>{let[h,f]=(0,nt.useState)(!1),{locale:p}=We(),w=p?.Modal||Xe.Modal,S=c==="OK"?w.okText:c,y=i==="Cancel"?w.cancelText:i,$=async()=>{if(o){let H=o();if(H&&typeof H.then=="function"){f(!0);try{await H,f(!1),t()}catch(u){throw f(!1),console.error(u),u}}else t()}else t()},R=async()=>{n&&await n(),t()},G={info:(0,ge.jsx)(bt,{}),success:(0,ge.jsx)(Bt,{}),error:(0,ge.jsx)(Ht,{}),warning:(0,ge.jsx)(Lt,{})}[l]||(0,ge.jsx)(bt,{});return(0,ge.jsx)(Yt,{...x,afterClose:e,closable:x.closable??!1,width:416,isOpen:!!d,onCancel:R,footer:(0,ge.jsxs)(Uo,{children:[l==="confirm"?(0,ge.jsx)(Me,{onClick:R,children:y}):null,(0,ge.jsx)(Me,{variant:"primary",onClick:$,loading:g||h,children:S})]}),children:(0,ge.jsxs)(Yo,{children:[(0,ge.jsx)(Ko,{$type:l,children:s||G}),(0,ge.jsxs)(_o,{children:[r&&(0,ge.jsx)(jo,{children:r}),a&&(0,ge.jsx)(Go,{children:a})]})]})})},ns=nt.default.forwardRef((e,t)=>{let[o,n]=(0,nt.useState)(new Map);return(0,nt.useImperativeHandle)(t,()=>({patchElement:(r,a)=>{n(s=>{let l=new Map(s);return l.set(r,a),l})},removeElement:r=>{n(a=>{let s=new Map(a);return s.delete(r),s})}})),(0,ge.jsx)(ge.Fragment,{children:Array.from(o.values())})});ns.displayName="ElementsHolder";function Er(){let e=(0,nt.useRef)(null),[t,o]=(0,nt.useState)(null);t||o((0,ge.jsx)(ns,{ref:e}));let n=a=>s=>{let l=Math.random().toString(36).substring(2),i={...a(s),isOpen:!1},d=()=>{i={...i,isOpen:!1},g(i)},g=x=>{e.current&&e.current.patchElement(l,(0,ge.jsx)(rl,{...x,type:x.type||"info",isOpen:!!x.isOpen,closeModal:d,afterClose:()=>{e.current&&e.current.removeElement(l)}},l))};return g(i),setTimeout(()=>{i={...i,isOpen:!0},g(i)},10),{destroy:d,update:x=>{i={...i,...x},g(i)}}};return[{info:n(a=>({...a,type:"info"})),success:n(a=>({...a,type:"success"})),error:n(a=>({...a,type:"error"})),warning:n(a=>({...a,type:"warning"})),confirm:n(a=>({...a,type:"confirm"}))},t]}var It=Yt;It.info=Za;It.success=es;It.error=ts;It.warning=os;It.confirm=rs;It.useModal=Er;var as=It;var bs=N(require("react"));var hs=N(require("react"));var Ze=N(require("@emotion/styled")),ss=Ze.default.div`
|
|
1020
|
+
align-items: center;
|
|
1021
|
+
`,Qa=yt.default.div`
|
|
900
1022
|
display: flex;
|
|
901
1023
|
align-items: center;
|
|
902
|
-
gap: ${({theme:e})=>e?.spacing?.sm||8}px;
|
|
903
|
-
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px;`:""}
|
|
904
|
-
`,is=Ze.default.div`
|
|
905
1024
|
flex: 1;
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px; flex: none;`:""}
|
|
911
|
-
`,ls=Ze.default.div`
|
|
912
|
-
height: 100%;
|
|
913
|
-
border-radius: inherit;
|
|
914
|
-
transition: ${({theme:e})=>e?.transitions?.normal||"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"};
|
|
915
|
-
width: ${({percent:e})=>Math.min(Math.max(e,0),100)}%;
|
|
916
|
-
background: ${({strokeColor:e,status:t,theme:o})=>{if(e)return e;switch(t){case"success":return o?.components?.progress?.successColor||o?.colors?.success||"#52c41a";case"error":return o?.components?.progress?.errorColor||o?.colors?.error||"#ff4d4f";case"warning":return o?.components?.progress?.warningColor||o?.colors?.warning||"#faad14";default:return o?.components?.progress?.infoColor||o?.colors?.primary||"#1890ff"}}};
|
|
917
|
-
`,cs=Ze.default.span`
|
|
918
|
-
font-size: ${({size:e,theme:t})=>{switch(e){case"small":return t?.fontSize?.xs||12;case"large":return t?.fontSize?.md||16;case"medium":default:return t?.fontSize?.sm||14}}}px;
|
|
919
|
-
color: ${({theme:e})=>e?.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
920
|
-
white-space: nowrap;
|
|
921
|
-
min-width: ${({size:e})=>{switch(e){case"small":return"28px";case"large":return"36px";case"medium":default:return"32px"}}};
|
|
922
|
-
text-align: right;
|
|
923
|
-
`,ds=Ze.default.div`
|
|
924
|
-
display: inline-block;
|
|
925
|
-
width: ${({width:e})=>e}px;
|
|
926
|
-
height: ${({width:e})=>e}px;
|
|
927
|
-
`,ps=Ze.default.svg`
|
|
928
|
-
transform: rotate(-90deg);
|
|
929
|
-
width: 100%;
|
|
930
|
-
height: 100%;
|
|
931
|
-
`,us=Ze.default.circle`
|
|
932
|
-
fill: none;
|
|
933
|
-
stroke: ${({theme:e})=>e?.components?.progress?.trackColor||e?.colors?.backgroundSecondary||"#fafafa"};
|
|
934
|
-
`,fs=Ze.default.circle`
|
|
935
|
-
fill: none;
|
|
936
|
-
transition: ${({theme:e})=>e?.transitions?.normal||"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"};
|
|
937
|
-
stroke: ${({strokeColor:e,status:t,theme:o})=>{if(e)return e;switch(t){case"success":return o?.components?.progress?.successColor||o?.colors?.success||"#52c41a";case"error":return o?.components?.progress?.errorColor||o?.colors?.error||"#ff4d4f";case"warning":return o?.components?.progress?.warningColor||o?.colors?.warning||"#faad14";default:return o?.components?.progress?.infoColor||o?.colors?.primary||"#1890ff"}}};
|
|
938
|
-
stroke-linecap: round;
|
|
939
|
-
`,ms=Ze.default.div`
|
|
940
|
-
position: absolute;
|
|
941
|
-
top: 50%;
|
|
942
|
-
left: 50%;
|
|
943
|
-
transform: translate(-50%, -50%);
|
|
944
|
-
text-align: center;
|
|
945
|
-
font-size: ${({size:e,theme:t,width:o})=>e==="small"||o<60?t?.fontSize?.xs||12:e==="large"||o>120?t?.fontSize?.md||16:t?.fontSize?.sm||14}px;
|
|
946
|
-
color: ${({theme:e})=>e?.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
1025
|
+
min-width: 0;
|
|
1026
|
+
`,Ja=yt.default.div`
|
|
1027
|
+
flex: 1;
|
|
1028
|
+
min-width: 0;
|
|
947
1029
|
white-space: nowrap;
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1030
|
+
overflow: hidden;
|
|
1031
|
+
text-overflow: ellipsis;
|
|
1032
|
+
`,Xa=yt.default.span`
|
|
1033
|
+
display: inline-flex;
|
|
1034
|
+
align-items: center;
|
|
1035
|
+
justify-content: center;
|
|
1036
|
+
width: 16px;
|
|
1037
|
+
height: 16px;
|
|
1038
|
+
margin-right: 4px;
|
|
1039
|
+
`;var Pe=require("react/jsx-runtime"),tn=({level:e=0,expanded:o,selected:r,checked:a,halfChecked:n,disabled:s,title:i,icon:l,isLeaf:d,checkable:c,selectable:m,onExpand:f,onSelect:x,onCheck:b,className:y,style:w,switcherIcon:g,showLine:u,showIcon:p,indentLines:P=[],styles:v,classNames:C})=>{let F=R=>{R.stopPropagation(),!d&&f&&f(R)},E=R=>{R.stopPropagation(),!s&&(m!==!1?x&&x(R):!d&&f&&f(R))},T=R=>{R.stopPropagation(),!s&&c!==!1&&b&&b(R)},W=()=>typeof g=="function"?g({expanded:!!o}):u?d?(0,Pe.jsx)(fa,{}):o?(0,Pe.jsx)(ua,{}):(0,Pe.jsx)(ma,{}):g||(0,Pe.jsx)(la,{}),Y=typeof g!="function";return(0,Pe.jsxs)(Ga,{level:u?0:e,selected:r,disabled:s,className:`compass-tree-node ${r?"compass-tree-node--selected":""} ${s?"compass-tree-node--disabled":""} ${d?"compass-tree-node--leaf":""} ${C?.node||""} ${y||""}`,style:{...w,...v?.node},onClick:E,showLine:u,children:[u&&P.map((R,M)=>(0,Pe.jsx)(Ua,{active:R,className:"compass-tree-indent"},M)),d?u?(0,Pe.jsx)(or,{className:`compass-tree-switcher compass-tree-switcher--leaf ${C?.switcher||""}`,showLine:u,style:v?.switcher,children:W()}):(0,Pe.jsx)(or,{className:`compass-tree-switcher compass-tree-switcher--noop ${C?.switcher||""}`,showLine:u,style:v?.switcher,children:(0,Pe.jsx)("span",{style:{width:"16px",display:"inline-block"}})}):(0,Pe.jsx)(or,{expanded:Y?o:void 0,onClick:F,className:`compass-tree-switcher ${C?.switcher||""}`,style:v?.switcher,showLine:u,children:W()}),c&&(0,Pe.jsx)(qa,{onClick:T,className:`compass-tree-checkbox ${C?.checkbox||""}`,style:v?.checkbox,children:(0,Pe.jsx)("input",{type:"checkbox",checked:a,disabled:s,ref:R=>{R&&(R.indeterminate=!!n)},readOnly:!0})}),(0,Pe.jsxs)(Qa,{className:`compass-tree-content ${C?.content||""}`,style:v?.content,children:[p&&l&&(0,Pe.jsx)(Xa,{className:`compass-tree-icon ${C?.icon||""}`,style:v?.icon,children:l}),(0,Pe.jsx)(Ja,{className:`compass-tree-title ${C?.title||""}`,style:v?.title,children:i})]})]})};function Za(e=[],o=[]){let r=new Set(o),a=[];function n(s,i=null,l=0,d="0"){return s.map((c,m)=>{let f=`${d}-${m}`,x={...c,parent:i,children:[],pos:f,data:c,level:l,key:c.key,title:c.title};return a.push(x),r.has(c.key)?x.children=n(c.children||[],x,l+1,f):x.children=[],x})}return n(e),a}function es(e,o,r){let a=[];return e.forEach((n,s)=>{let{key:i,children:l}=n,d=o?`${o.pos}-${s}`:`${s}`,c={node:n,index:s,key:i,pos:d,parent:o||void 0};r.keyEntities[i]=c,a.push(c),l&&(c.children=es(l,c,r))}),a}function rr(e){let o={};return es(e,null,{keyEntities:o}),{keyEntities:o}}function ts(e,o,r,a){let n=new Set(r),s=a[e];if(!s)return{checkedKeys:Array.from(n)};function i(d){o?n.add(d.key):n.delete(d.key),d.children&&d.children.forEach(c=>i(c))}i(s);let l=s.parent;for(;l;)l.children&&(l.children.every(c=>n.has(c.key))?n.add(l.key):n.delete(l.key)),l=l.parent;return{checkedKeys:Array.from(n)}}var eo=require("react/jsx-runtime"),Nl=({treeData:e=[],checkable:o=!1,selectable:r=!0,showLine:a=!1,showIcon:n=!1,defaultExpandedKeys:s=[],expandedKeys:i,onExpand:l,defaultSelectedKeys:d=[],selectedKeys:c,onSelect:m,defaultCheckedKeys:f=[],checkedKeys:x,onCheck:b,height:y,itemHeight:w=28,virtual:g=!1,switcherIcon:u,titleRender:p,expandOnClick:P,className:v,style:C,styles:F,classNames:E})=>{let[T,W]=(0,Ot.useState)(i||s),[Y,R]=(0,Ot.useState)(c||d),[M,k]=(0,Ot.useState)(x||f),h=i||T,I=c||Y,H=x||M,{keyEntities:O}=(0,Ot.useMemo)(()=>rr(e),[e]),U=(0,Ot.useMemo)(()=>Za(e,h),[e,h]),A=(N,ne)=>{let j=h.includes(N)?h.filter(_=>_!==N):[...h,N];i||W(j),l&&l(j,{node:ne,expanded:!h.includes(N)})},Q=(N,ne,j)=>{let _=[N];c||R(_),m&&m(_,{node:ne,selected:!0,event:j}),P&&!ne.isLeaf&&A(N,ne)},Z=(N,ne,j)=>{let _=!H.includes(N),{checkedKeys:G}=ts(N,_,H,O);x||k(G),b&&b(G,{node:ne,checked:_,event:j})},S=N=>{if(!N.parent){let j=e;return j[j.length-1].key===N.key}let ne=N.parent.children;return ne[ne.length-1].key===N.key},B=({index:N,style:ne})=>{let j=U[N];if(!j)return(0,eo.jsx)("div",{style:ne});let _=[],G=j.parent;for(;G;)_.unshift(!S(G)),G=G.parent;return(0,eo.jsx)(tn,{eventKey:j.key,title:p?p(j.data):j.title,level:j.level,expanded:h.includes(j.key),selected:I.includes(j.key),checked:H.includes(j.key),isLeaf:j.isLeaf||!j.data.children||j.data.children.length===0,checkable:o,selectable:j.data.selectable??r,disabled:j.disabled,icon:j.icon,style:ne,onExpand:()=>A(j.key,j.data),onSelect:Se=>Q(j.key,j.data,Se),onCheck:Se=>Z(j.key,j.data,Se),switcherIcon:u,showLine:a,showIcon:n,indentLines:_,styles:F,classNames:E},j.key)},J=()=>g&&y?(0,eo.jsx)(os.List,{defaultHeight:y,rowCount:U.length,rowHeight:w,rowComponent:B,rowProps:{},style:{width:"100%",height:y}}):U.map(N=>{let ne=[],j=N.parent;for(;j;)ne.unshift(!S(j)),j=j.parent;return(0,eo.jsx)(tn,{eventKey:N.key,title:p?p(N.data):N.title,level:N.level,expanded:h.includes(N.key),selected:I.includes(N.key),checked:H.includes(N.key),isLeaf:N.isLeaf||!N.data.children||N.data.children.length===0,checkable:o,selectable:N.data.selectable??r,disabled:N.disabled,icon:N.icon,onExpand:()=>A(N.key,N.data),onSelect:_=>Q(N.key,N.data,_),onCheck:_=>Z(N.key,N.data,_),switcherIcon:u,showLine:a,showIcon:n,indentLines:ne,styles:F,classNames:E},N.key)});return(0,eo.jsx)(ja,{className:`compass-tree ${v||""} ${E?.root||""}`,style:{...C,...F?.root},children:J()})},rs=Nl;var nr=rs;var Ne=K(require("react")),fe=require("@floating-ui/react");var Ye=K(require("@emotion/styled")),ns=require("@emotion/react");var Fl=ns.keyframes`
|
|
952
1040
|
from {
|
|
953
1041
|
transform: rotate(0deg);
|
|
954
1042
|
}
|
|
955
1043
|
to {
|
|
956
1044
|
transform: rotate(360deg);
|
|
957
1045
|
}
|
|
958
|
-
`,
|
|
1046
|
+
`,as=Ye.default.span`
|
|
959
1047
|
display: inline-flex;
|
|
960
|
-
animation: ${
|
|
961
|
-
`,
|
|
1048
|
+
animation: ${Fl} 1s linear infinite;
|
|
1049
|
+
`,ss=Ye.default.div`
|
|
962
1050
|
position: relative;
|
|
963
1051
|
display: inline-flex;
|
|
964
1052
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
@@ -966,25 +1054,25 @@
|
|
|
966
1054
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
967
1055
|
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
968
1056
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
969
|
-
`,
|
|
1057
|
+
`,is=Ye.default.div`
|
|
970
1058
|
display: flex;
|
|
971
1059
|
align-items: center;
|
|
972
1060
|
justify-content: space-between;
|
|
973
1061
|
width: 100%;
|
|
974
|
-
padding: ${({size:e
|
|
975
|
-
font-size: ${({size:e
|
|
1062
|
+
padding: ${({size:e})=>{switch(e){case"small":return t("components.select.padding.sm","1px 8px");case"large":return t("components.select.padding.lg","6px 16px");default:return t("components.select.padding.md","3px 12px")}}};
|
|
1063
|
+
font-size: ${({size:e})=>e==="small"?t("components.select.fontSize.sm","12px"):t("components.select.fontSize.md","14px")};
|
|
976
1064
|
line-height: 1.5;
|
|
977
|
-
background-color: ${(
|
|
1065
|
+
background-color: ${t("components.select.backgroundColor",t("colors.background","#fff"))};
|
|
978
1066
|
border: 1px solid
|
|
979
|
-
${({
|
|
980
|
-
border-radius: ${(
|
|
1067
|
+
${({active:e,status:o})=>o==="error"?t("colors.error","#f5222d"):o==="warning"?t("colors.warning","#faad14"):e?t("components.select.activeBorderColor",t("colors.primary","#1890ff")):t("components.select.borderColor",t("colors.border","#d9d9d9"))};
|
|
1068
|
+
border-radius: ${t("components.select.borderRadius",t("borderRadius.md","4px"))};
|
|
981
1069
|
transition: all 0.3s;
|
|
982
|
-
box-shadow: ${({active:e
|
|
1070
|
+
box-shadow: ${({active:e})=>e?`0 0 0 2px ${t("colors.primary","#1890ff")}20`:"none"};
|
|
983
1071
|
|
|
984
1072
|
&:hover {
|
|
985
|
-
border-color: ${({
|
|
1073
|
+
border-color: ${({status:e})=>{if(!e)return t("components.select.hoverBorderColor",t("colors.primary","#1890ff"))}};
|
|
986
1074
|
}
|
|
987
|
-
`,
|
|
1075
|
+
`,ls=Ye.default.div`
|
|
988
1076
|
position: relative;
|
|
989
1077
|
flex: 1;
|
|
990
1078
|
overflow: hidden;
|
|
@@ -996,12 +1084,12 @@
|
|
|
996
1084
|
align-items: center;
|
|
997
1085
|
gap: 4px;
|
|
998
1086
|
min-height: ${({size:e})=>e==="small"?"20px":e==="large"?"26px":"24px"};
|
|
999
|
-
`,
|
|
1000
|
-
color: ${(
|
|
1001
|
-
|
|
1087
|
+
`,ko=Ye.default.span`
|
|
1088
|
+
color: ${t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf"))};
|
|
1089
|
+
`,cs=Ye.default.div`
|
|
1002
1090
|
padding: 4px 0;
|
|
1003
|
-
background-color: ${(
|
|
1004
|
-
border-radius: ${(
|
|
1091
|
+
background-color: ${t("colors.background","#fff")};
|
|
1092
|
+
border-radius: ${t("borderRadius.md","4px")};
|
|
1005
1093
|
box-shadow:
|
|
1006
1094
|
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
1007
1095
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
@@ -1009,36 +1097,17 @@
|
|
|
1009
1097
|
z-index: 1050;
|
|
1010
1098
|
max-height: 256px;
|
|
1011
1099
|
overflow-y: auto;
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
min-height: 32px;
|
|
1015
|
-
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1016
|
-
transition: all 0.3s;
|
|
1017
|
-
background-color: ${({selected:e,active:t,theme:o})=>e?o.components?.select?.optionSelectedBg||"#e6f7ff":t?o.components?.select?.optionHoverBg||"#e6e6e6":"transparent"};
|
|
1018
|
-
color: ${({selected:e,disabled:t,theme:o})=>t?o.colors?.textDisabled||"#00000040":e?o.components?.select?.optionSelectedColor||o.colors?.text||"rgba(0, 0, 0, 0.88)":o.components?.select?.optionColor||o.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
1019
|
-
|
|
1020
|
-
.compass-icon-check {
|
|
1021
|
-
color: ${({theme:e,selected:t})=>t?e.colors?.primary||"#1890ff":"inherit"};
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
font-weight: 400;
|
|
1025
|
-
display: flex;
|
|
1026
|
-
align-items: center;
|
|
1027
|
-
justify-content: space-between;
|
|
1028
|
-
|
|
1029
|
-
&:hover {
|
|
1030
|
-
background-color: ${({disabled:e,selected:t,theme:o})=>e?"transparent":t?o.components?.select?.optionSelectedBg||"#e6f7ff":o.components?.select?.optionHoverBg||"#e6e6e6"};
|
|
1031
|
-
}
|
|
1032
|
-
`,Ts=Ae.default.span`
|
|
1100
|
+
min-width: 100%;
|
|
1101
|
+
`,ps=Ye.default.span`
|
|
1033
1102
|
display: inline-flex;
|
|
1034
1103
|
align-items: center;
|
|
1035
1104
|
height: 24px;
|
|
1036
1105
|
padding: 0 8px;
|
|
1037
1106
|
font-size: 12px;
|
|
1038
1107
|
line-height: normal;
|
|
1039
|
-
background: ${(
|
|
1040
|
-
color: ${(
|
|
1041
|
-
border:
|
|
1108
|
+
background: ${t("components.select.tagBg",t("colors.backgroundSecondary","#f5f5f5"))};
|
|
1109
|
+
color: ${t("components.select.tagColor","inherit")};
|
|
1110
|
+
border: 1px solid ${t("components.select.tagBorderColor","transparent")};
|
|
1042
1111
|
border-radius: 4px;
|
|
1043
1112
|
margin-right: 4px;
|
|
1044
1113
|
margin-top: 1px;
|
|
@@ -1050,7 +1119,7 @@
|
|
|
1050
1119
|
align-items: center;
|
|
1051
1120
|
height: 100%;
|
|
1052
1121
|
}
|
|
1053
|
-
`,
|
|
1122
|
+
`,ds=Ye.default.span`
|
|
1054
1123
|
margin-left: 4px;
|
|
1055
1124
|
cursor: pointer;
|
|
1056
1125
|
font-size: 12px;
|
|
@@ -1060,20 +1129,20 @@
|
|
|
1060
1129
|
align-items: center;
|
|
1061
1130
|
justify-content: center;
|
|
1062
1131
|
border-radius: 50%;
|
|
1063
|
-
color: ${(
|
|
1132
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1064
1133
|
line-height: 0;
|
|
1065
1134
|
transform: scale(0.8);
|
|
1066
1135
|
|
|
1067
1136
|
&:hover {
|
|
1068
|
-
color: ${(
|
|
1137
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1069
1138
|
}
|
|
1070
|
-
`,
|
|
1139
|
+
`,ms=Ye.default.span`
|
|
1071
1140
|
display: flex;
|
|
1072
1141
|
align-items: center;
|
|
1073
|
-
color: ${(
|
|
1142
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.25)")};
|
|
1074
1143
|
font-size: 12px;
|
|
1075
1144
|
line-height: 0;
|
|
1076
|
-
`,
|
|
1145
|
+
`,on=Ye.default.input`
|
|
1077
1146
|
margin: 0;
|
|
1078
1147
|
padding: 0;
|
|
1079
1148
|
background: transparent;
|
|
@@ -1087,258 +1156,348 @@
|
|
|
1087
1156
|
margin-top: 1px;
|
|
1088
1157
|
margin-bottom: 1px;
|
|
1089
1158
|
min-width: 4px;
|
|
1090
|
-
`,
|
|
1159
|
+
`,us=Ye.default.div`
|
|
1091
1160
|
display: inline-block;
|
|
1092
1161
|
max-width: 100%;
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1162
|
+
`,fs=Ye.default.span`
|
|
1163
|
+
position: absolute;
|
|
1164
|
+
left: 0;
|
|
1165
|
+
top: 50%;
|
|
1166
|
+
transform: translateY(-50%);
|
|
1167
|
+
pointer-events: none;
|
|
1168
|
+
width: 100%;
|
|
1169
|
+
overflow: hidden;
|
|
1170
|
+
text-overflow: ellipsis;
|
|
1171
|
+
color: ${({$isOpen:e})=>e?t("components.select.placeholderColor",t("colors.textSecondary","#bfbfbf")):"inherit"};
|
|
1172
|
+
`;var ee=require("react/jsx-runtime"),Dl=e=>{let{treeData:o=[],value:r,defaultValue:a,onChange:n,disabled:s,loading:i,allowClear:l,placeholder:d,className:c,style:m,multiple:f=!1,treeCheckable:x=!1,treeDefaultExpandedKeys:b=[],size:y="medium",status:w,dropdownStyle:g,dropdownClassName:u,showSearch:p=!1,titleRender:P,switcherIcon:v}=e,[C,F]=(0,Ne.useState)(a||(f||x?[]:"")),E=r!==void 0,T=E?r:C,[W,Y]=(0,Ne.useState)(!1),[R,M]=(0,Ne.useState)(""),[k,h]=(0,Ne.useState)(""),I=(0,Ne.useRef)(!1),H=(0,Ne.useRef)(null),[O,U]=(0,Ne.useState)(b||[]),{keyEntities:A}=(0,Ne.useMemo)(()=>rr(o),[o]),Q=(0,Ne.useMemo)(()=>{if(!e.onlyLeafSelect)return o;let $=z=>z.map(q=>{let me=q.children&&q.children.length>0;return q.isLeaf===!0||!me?q:{...q,selectable:!1,children:q.children?$(q.children):void 0}});return $(o)},[o,e.onlyLeafSelect]),{x:Z,y:S,refs:B,floatingStyles:J,context:N}=(0,fe.useFloating)({open:W,onOpenChange:$=>{s||!$&&(k||R)||(Y($),$?setTimeout(()=>{p&&H.current?.focus()},0):(M(""),h("")))},placement:"bottom-start",middleware:[(0,fe.offset)(4),(0,fe.flip)(),(0,fe.shift)(),(0,fe.size)({apply({rects:$,elements:z}){Object.assign(z.floating.style,{minWidth:`${$.reference.width}px`})}})],whileElementsMounted:fe.autoUpdate}),ne=(0,fe.useClick)(N,{enabled:!0,keyboardHandlers:!1}),j=(0,fe.useDismiss)(N,{escapeKey:!0,outsidePress:!0}),_=(0,fe.useRole)(N,{role:"listbox"}),{getReferenceProps:G,getFloatingProps:Se}=(0,fe.useInteractions)([ne,j,_]),se=$=>{let z=A[$];return z?z.node.title:$},ot=($,z,q)=>{E||F($),n&&n($,z,q)},Ct=($,z)=>{let{node:q,selected:me}=z,$e=q.key;if(!x)if(f){let ce=Array.isArray(T)?T:[],Me=me?[...ce,$e]:ce.filter(wt=>wt!==$e),Ve=Me.map(wt=>se(wt));ot(Me,Ve,{triggerNode:q,...z}),M(""),h(""),p&&H.current?.focus()}else ot($e,q.title,{triggerNode:q,...z}),Y(!1),Y(!1),M(""),h("")},gt=($,z)=>{if(!x)return;let q=$.map(me=>se(me));ot($,q,z)},lt=($,z)=>{z.stopPropagation();let me=(Array.isArray(T)?T:[]).filter(ce=>ce!==$),$e=me.map(ce=>se(ce));ot(me,$e)},X=$=>{$.stopPropagation(),ot(f||x?[]:void 0,f||x?[]:void 0)},L=()=>{I.current=!0},re=$=>{let z=$.currentTarget.value;h(z),M(z),I.current=!1},Ge=$=>{let z=$.target.value;h(z),I.current||M(z),W||Y(!0)},$t=()=>{if(f||x){let $=Array.isArray(T)?T:[];return(0,ee.jsxs)(ee.Fragment,{children:[$.map(z=>(0,ee.jsxs)(ps,{children:[(0,ee.jsx)("span",{children:se(z)}),(0,ee.jsx)(ds,{onClick:q=>lt(z,q),children:(0,ee.jsx)(ct,{})})]},z)),p&&(0,ee.jsx)(us,{style:{width:k?"auto":"4px",minWidth:"50px",flex:1},children:(0,ee.jsx)(on,{ref:H,value:k,onChange:Ge,onCompositionStart:L,onCompositionEnd:re,disabled:s})}),$.length===0&&!k&&!p&&(0,ee.jsx)(ko,{children:d}),$.length===0&&!k&&p&&(0,ee.jsx)(ko,{style:{position:"absolute",left:0,pointerEvents:"none"},children:d})]})}return p?(0,ee.jsxs)(ee.Fragment,{children:[T!==void 0&&T!==""&&T!==null?(0,ee.jsx)(fs,{$isOpen:W,style:{opacity:k?0:1,visibility:k?"hidden":"visible"},children:se(T)}):(0,ee.jsx)(ko,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",opacity:k?0:1,visibility:k?"hidden":"visible"},children:d}),(0,ee.jsx)(on,{ref:H,value:k,onChange:Ge,onCompositionStart:L,onCompositionEnd:re,disabled:s,style:{opacity:W||k?1:0}})]}):T!==void 0&&T!==""&&T!==null?se(T):(0,ee.jsx)(ko,{children:d})},Et=l&&!s&&(Array.isArray(T)?T.length>0:T!==void 0&&T!==""&&T!==null),go={treeData:Q,selectable:!x&&(e.treeSelectable!==void 0?e.treeSelectable:!0),checkable:x,onSelect:Ct,onCheck:gt,defaultExpandedKeys:b,checkedKeys:x?Array.isArray(T)?T:[]:void 0,selectedKeys:x?[]:Array.isArray(T)?T:T?[T]:[],titleRender:$=>{if(P)return P($,R);let{treeSelectedIcon:z}=e,q=$.title,me=q;if(R&&q&&String(q).toLowerCase().includes(R.toLowerCase())){let ce=q.toLowerCase().indexOf(R.toLowerCase()),Me=q.substring(0,ce),Ve=q.substring(ce,ce+R.length),wt=q.substring(ce+R.length);me=(0,ee.jsxs)("span",{children:[Me,(0,ee.jsx)("span",{style:{color:"#1677ff"},children:Ve}),wt]})}return(Array.isArray(T)?T.includes($.key):T===$.key)&&z?(0,ee.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,ee.jsx)("span",{children:me}),(0,ee.jsx)("span",{style:{display:"flex",alignItems:"center"},children:z})]}):me},switcherIcon:v},{filteredTreeData:Kt,expandedKeysForSearch:kt}=(0,Ne.useMemo)(()=>{if(!R)return{filteredTreeData:Q,expandedKeysForSearch:[]};let $=[],z=($e,ce=[])=>{let Me=[];return $e.forEach(Ve=>{let wt=Ve.title;if(wt&&String(wt).toLowerCase().includes(R.toLowerCase()))$.push(...ce),Me.push(Ve);else if(Ve.children){let Dn=z(Ve.children,[...ce,Ve.key]);Dn.length&&($.push(Ve.key),Me.push({...Ve,children:Dn}))}}),Me},q=z(Q),me=Array.from(new Set($));return{filteredTreeData:q,expandedKeysForSearch:me}},[Q,R]);return Ne.default.useEffect(()=>{R&&U($=>{let z=new Set([...$,...kt]);return Array.from(z)})},[R,kt]),(0,ee.jsxs)(ss,{ref:B.setReference,fullWidth:!0,disabled:s,className:`compass-tree-select ${c||""} ${W?"compass-tree-select-open":""} ${s?"compass-tree-select-disabled":""}`,style:m,...G({onClick:()=>{p&&H.current?.focus()}}),children:[(0,ee.jsxs)(is,{size:y,active:W,status:w,children:[(0,ee.jsx)(ls,{size:y,children:$t()}),(0,ee.jsx)(ms,{children:i?(0,ee.jsx)(as,{children:(0,ee.jsx)(Jt,{})}):Et?(0,ee.jsx)("span",{onClick:X,style:{cursor:"pointer"},children:(0,ee.jsx)(pt,{})}):p&&W?(0,ee.jsx)(Vo,{}):(0,ee.jsx)(Ko,{})})]}),W&&(0,ee.jsx)(fe.FloatingPortal,{children:(0,ee.jsx)(cs,{ref:B.setFloating,style:{...g,...J,opacity:Z===null||S===null?0:1,visibility:Z===null||S===null?"hidden":"visible"},className:`compass-tree-select-dropdown ${u||""}`,...Se(),children:Kt.length>0?(0,ee.jsx)(nr,{...go,treeData:Kt,expandedKeys:O,onExpand:$=>{U($)}}):(0,ee.jsx)("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})})})]})},gs=Dl;var hs=gs;var wo=K(require("react")),pe=require("@floating-ui/react");var rn=K(require("@emotion/styled"));var wd=rn.default.div`
|
|
1173
|
+
display: inline-block;
|
|
1174
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1175
|
+
`,bs=rn.default.div`
|
|
1176
|
+
min-width: 120px;
|
|
1177
|
+
padding: ${t("components.dropdown.padding","4px")};
|
|
1178
|
+
background-color: ${t("components.dropdown.backgroundColor",t("colors.background","#ffffff"))};
|
|
1179
|
+
border-radius: ${t("components.dropdown.borderRadius",t("borderRadius.md","4px"))};
|
|
1180
|
+
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)"))};
|
|
1096
1181
|
list-style: none;
|
|
1097
|
-
|
|
1098
|
-
margin: 0;
|
|
1099
|
-
font-size: ${({theme:e})=>e.components?.pagination?.fontSize||"14px"};
|
|
1100
|
-
color: ${({theme:e})=>e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)"};
|
|
1101
|
-
opacity: ${({disabled:e})=>e?.5:1};
|
|
1102
|
-
cursor: ${({disabled:e})=>e?"not-allowed":"default"};
|
|
1103
|
-
|
|
1104
|
-
.compass-pagination-simple-input {
|
|
1105
|
-
width: ${({size:e})=>e==="small"?"40px":"50px"};
|
|
1106
|
-
height: ${({size:e})=>e==="small"?"24px":"32px"};
|
|
1107
|
-
margin: 0 8px;
|
|
1182
|
+
z-index: ${t("components.dropdown.zIndex","1050")};
|
|
1108
1183
|
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1184
|
+
/* Layout fixed properties */
|
|
1185
|
+
display: flex;
|
|
1186
|
+
flex-direction: column;
|
|
1187
|
+
overflow: hidden;
|
|
1113
1188
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
height: 100%;
|
|
1117
|
-
}
|
|
1189
|
+
.compass-dropdown-content {
|
|
1190
|
+
width: 100%;
|
|
1118
1191
|
}
|
|
1192
|
+
`;var Nt=K(require("react"));var ar=K(require("@emotion/styled"));var ys=ar.default.ul`
|
|
1193
|
+
margin: 0;
|
|
1194
|
+
padding: 0;
|
|
1195
|
+
list-style: none;
|
|
1196
|
+
`,xs=ar.default.li`
|
|
1197
|
+
display: flex;
|
|
1198
|
+
align-items: center;
|
|
1199
|
+
margin: 0;
|
|
1200
|
+
padding: ${t("components.menu.itemPadding","0 12px")};
|
|
1201
|
+
height: ${t("components.menu.itemHeight","32px")};
|
|
1202
|
+
color: ${({$danger:e,$selected:o})=>e?t("colors.error","#ff4d4f"):o?t("colors.primary","#1677ff"):t("components.menu.itemColor","rgba(0, 0, 0, 0.88)")};
|
|
1203
|
+
background-color: ${({$selected:e})=>e?t("components.menu.itemSelectedBg","#e6f7ff"):"transparent"};
|
|
1204
|
+
font-size: ${t("components.menu.fontSize","14px")};
|
|
1205
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1206
|
+
transition: all 0.3s;
|
|
1207
|
+
border-radius: ${t("components.menu.borderRadius","4px")};
|
|
1208
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1119
1209
|
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
input[type='number']::-webkit-outer-spin-button {
|
|
1123
|
-
-webkit-appearance: none;
|
|
1124
|
-
margin: 0;
|
|
1125
|
-
}
|
|
1126
|
-
input[type='number'] {
|
|
1127
|
-
-moz-appearance: textfield;
|
|
1210
|
+
&:hover {
|
|
1211
|
+
background-color: ${({$disabled:e,$danger:o,$selected:r})=>e?"transparent":o?"#fff2f0":r?t("components.menu.itemSelectedBg","#e6f7ff"):t("components.menu.itemHoverBg","#f5f5f5")};
|
|
1128
1212
|
}
|
|
1129
|
-
`,
|
|
1213
|
+
`,vs=ar.default.span`
|
|
1214
|
+
margin-right: 8px;
|
|
1130
1215
|
display: inline-flex;
|
|
1131
|
-
justify-content: center;
|
|
1132
1216
|
align-items: center;
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1217
|
+
`;var Ss=require("react"),to=(0,Ss.createContext)({});var It=require("react/jsx-runtime"),Cs=(0,Nt.forwardRef)((e,o)=>{let{children:r,items:a,onClick:n,selectedKeys:s,defaultSelectedKeys:i=[],onSelect:l,className:d,style:c,styles:m,classNames:f,...x}=e,b=(0,Nt.useContext)(to),[y,w]=Nt.default.useState(i),g=s??y,u=(p,P)=>{n?.(p,P),b.onItemClick?.(p,P),P!==void 0&&(s===void 0&&w([P]),l?.([P]))};return(0,It.jsx)(to.Provider,{value:{onItemClick:u,selectedKeys:g,styles:m,classNames:f},children:(0,It.jsx)(ys,{ref:o,className:`compass-menu ${d||""} ${f?.root||""}`,style:{...c,...m?.root},role:"menu",...x,children:a?a.map(p=>(0,It.jsx)(nn,{eventKey:p.key,onClick:p.onClick,disabled:p.disabled,danger:p.danger,icon:p.icon,className:p.className,style:p.style,children:p.label},p.key)):r})})}),nn=(0,Nt.forwardRef)((e,o)=>{let{children:r,onClick:a,disabled:n,icon:s,danger:i,eventKey:l,className:d,style:c,...m}=e,f=(0,Nt.useContext)(to),x=l!==void 0&&f.selectedKeys?.includes(l),b=y=>{n||(a?.(y),f.onItemClick?.(y,l))};return(0,It.jsxs)(xs,{ref:o,className:`compass-menu-item ${n?"compass-menu-item--disabled":""} ${i?"compass-menu-item--danger":""} ${x?"compass-menu-item--selected":""} ${f.classNames?.item||""} ${d||""}`,style:{...f.styles?.item,...c},onClick:b,$disabled:n,$danger:i,$selected:x,role:"menuitem","aria-disabled":n,"aria-selected":x,...m,children:[s&&(0,It.jsx)(vs,{className:`compass-menu-item-icon ${f.classNames?.icon||""}`,style:f.styles?.icon,children:s}),(0,It.jsx)("span",{className:`compass-menu-item-content ${f.classNames?.content||""}`,style:f.styles?.content,children:r})]})});nn.displayName="MenuItem";Cs.displayName="Menu";var $s=Cs;$s.Item=nn;var ks=$s;var sr=ks;var dt=require("react/jsx-runtime"),ws=({children:e,overlay:o,menu:r,trigger:a="hover",placement:n="bottom-start",visible:s,onVisibleChange:i,disabled:l,closeOnSelect:d=!0,className:c,style:m,overlayClassName:f,overlayStyle:x,classNames:b,styles:y})=>{let[w,g]=(0,wo.useState)(!1),u=s!==void 0,p=u?s:w,P=Z=>{l||(u||g(Z),i?.(Z))},{refs:v,floatingStyles:C,context:F}=(0,pe.useFloating)({open:p,onOpenChange:P,placement:n,middleware:[(0,pe.offset)(4),(0,pe.flip)(),(0,pe.shift)()],whileElementsMounted:pe.autoUpdate}),E=(0,pe.useHover)(F,{enabled:a==="hover",delay:{open:0,close:100}}),T=(0,pe.useClick)(F,{enabled:a==="click"}),W=(0,pe.useDismiss)(F),Y=(0,pe.useRole)(F),{getReferenceProps:R,getFloatingProps:M}=(0,pe.useInteractions)([E,T,W,Y]),k=wo.default.Children.only(e),h=k.ref,I=(0,pe.useMergeRefs)([v.setReference,h]),H=()=>{d&&P(!1)},O=o||(r?(0,dt.jsx)(sr,{...r}):null),U=["compass-dropdown-trigger",c,b?.trigger,k.props.className].filter(Boolean).join(" "),A=["compass-dropdown",f,b?.overlay].filter(Boolean).join(" "),Q=wo.default.cloneElement(k,{...R(k.props),className:U,style:{...k.props.style,...m,...y?.trigger},ref:I});return O?(0,dt.jsxs)(dt.Fragment,{children:[Q,p&&(0,dt.jsx)(pe.FloatingPortal,{children:(0,dt.jsx)(bs,{ref:v.setFloating,style:{...C,...x,...y?.overlay},className:A,...M(),children:(0,dt.jsx)(to.Provider,{value:{onItemClick:H},children:(0,dt.jsx)("div",{className:`compass-dropdown-content ${b?.content||""}`,style:y?.content,children:O})})})})]}):Q};ws.displayName="Dropdown";var Ps=ws;var Ts=Ps;var xt=K(require("react"));var _e=require("react/jsx-runtime"),Ms=xt.default.forwardRef((e,o)=>{let{type:r="text",fullWidth:a=!1,prefix:n,suffix:s,size:i="medium",allowClear:l,className:d,style:c,disabled:m,value:f,defaultValue:x,onChange:b,onFocus:y,onBlur:w,onPressEnter:g,onKeyDown:u,status:p,classNames:P,styles:v,...C}=e,F=(0,xt.useRef)(null);xt.default.useImperativeHandle(o,()=>F.current);let[E,T]=(0,xt.useState)(!1),[W,Y]=(0,xt.useState)(!1),[R,M]=(0,xt.useState)(x||""),k=f!==void 0,h=k?f:R,I=N=>{T(!0),y?.(N)},H=N=>{T(!1),w?.(N)},O=N=>{k||M(N.target.value),b?.(N)},U=N=>{N.key==="Enter"&&g?.(N),u?.(N)},A=N=>{N.preventDefault(),N.stopPropagation();let ne={target:{value:""},currentTarget:{value:""}};k||M(""),b?.(ne),F.current?.focus()},Q=N=>{N.preventDefault(),N.stopPropagation(),Y(!W),F.current?.focus()},Z=l&&!m&&h&&String(h).length>0,S=r==="password"&&W?"text":r,B=n,J=s;return r==="password"?J=(0,_e.jsx)(jr,{type:"button",visible:!0,className:`compass-input-field-clear ${P?.clear||""}`,style:{marginLeft:8,...v?.clear},onClick:Q,tabIndex:-1,children:W?(0,_e.jsx)(ca,{}):(0,_e.jsx)(pa,{})}):r==="search"&&!s&&(J=(0,_e.jsx)(Vo,{})),(0,_e.jsx)(Co,{fullWidth:a,className:`compass-input-field ${d||""} ${P?.root||""}`,style:{...c,...v?.root},children:(0,_e.jsxs)(jo,{disabled:m,focused:E,size:i,status:p,className:`compass-input-field-wrapper compass-input-field--${i}`,children:[B&&(0,_e.jsx)(Lt,{$position:"start",className:`compass-input-field-prefix ${P?.prefix||""}`,style:v?.prefix,children:B}),(0,_e.jsx)($o,{ref:F,type:S,disabled:m,value:h,onChange:O,onFocus:I,onBlur:H,onKeyDown:U,$size:i,className:`compass-input-field-input ${P?.input||""}`,style:v?.input,...C}),l&&!m&&(0,_e.jsx)(jr,{type:"button",className:`compass-input-field-clear ${P?.clear||""}`,style:v?.clear,visible:!!Z,$isHoverShow:!0,"data-visible":!!Z,onClick:A,tabIndex:-1,children:(0,_e.jsx)(pt,{})}),J&&(0,_e.jsx)(Lt,{$position:"end",className:`compass-input-field-suffix ${P?.suffix||""}`,style:v?.suffix,children:J})]})})});Ms.displayName="InputField";var Rs=Ms;var oo=Rs;var Je=require("react"),ye=require("@floating-ui/react");var ro=K(require("@emotion/styled"));var Is=ro.default.div`
|
|
1218
|
+
position: relative;
|
|
1219
|
+
display: inline-block;
|
|
1220
|
+
width: ${e=>e.fullWidth?"100%":"auto"};
|
|
1221
|
+
`,Ns=ro.default.div`
|
|
1222
|
+
position: absolute;
|
|
1223
|
+
top: 100%;
|
|
1224
|
+
left: 0;
|
|
1225
|
+
z-index: ${t("components.dropdown.zIndex","1050")};
|
|
1226
|
+
box-sizing: border-box;
|
|
1227
|
+
padding: 4px;
|
|
1228
|
+
overflow: auto;
|
|
1229
|
+
font-size: ${t("fontSize.sm","12px")};
|
|
1230
|
+
max-height: 256px;
|
|
1231
|
+
background-color: ${t("components.select.backgroundColor",t("colors.background","#fff"))};
|
|
1232
|
+
border-radius: ${t("components.select.borderRadius",t("borderRadius.md","4px"))};
|
|
1233
|
+
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
|
+
outline: none;
|
|
1235
|
+
`,Fs=ro.default.div`
|
|
1236
|
+
position: relative;
|
|
1237
|
+
padding: 8px 12px;
|
|
1238
|
+
word-break: break-word;
|
|
1239
|
+
color: ${t("components.select.optionColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
1240
|
+
cursor: pointer;
|
|
1241
|
+
border-radius: 4px;
|
|
1143
1242
|
transition: all 0.2s;
|
|
1144
|
-
|
|
1243
|
+
background-color: ${({active:e})=>e?t("components.select.optionHoverBg","#f5f5f5"):"transparent"};
|
|
1145
1244
|
|
|
1146
1245
|
&:hover {
|
|
1147
|
-
|
|
1148
|
-
color: ${({theme:e,active:t,disabled:o})=>o?t?e.components?.pagination?.itemActiveColor||"#1890ff":e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)":t?e.components?.pagination?.itemActiveColor||"#1890ff":e.components?.pagination?.itemHoverColor||"#40a9ff"};
|
|
1246
|
+
background-color: ${t("components.select.optionHoverBg","#f5f5f5")};
|
|
1149
1247
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1248
|
+
`,Ds=ro.default.div`
|
|
1249
|
+
padding: 8px 12px;
|
|
1250
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1251
|
+
text-align: center;
|
|
1252
|
+
`,Es=ro.default.span`
|
|
1253
|
+
color: ${t("colors.primary","#1890ff")};
|
|
1254
|
+
font-weight: 500;
|
|
1255
|
+
`;var Fe=require("react/jsx-runtime");function El(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var zl=({text:e,searchValue:o})=>{if(!o)return(0,Fe.jsx)(Fe.Fragment,{children:e});let r=e.split(new RegExp(`(${El(o)})`,"gi"));return(0,Fe.jsx)(Fe.Fragment,{children:r.map((a,n)=>a.toLowerCase()===o.toLowerCase()?(0,Fe.jsx)(Es,{children:a},n):a)})};function Bl(e,o){let[r,a]=(0,Je.useState)(o||""),n=e!==void 0;return{currentValue:n?e:r,setInternalValue:a,isControlled:n}}function Hl(e,o,r){return(0,Je.useMemo)(()=>{if(!o)return e;if(typeof o=="function")return e.filter(n=>o(r||"",n));if(!r)return e;let a=r.toLowerCase();return e.filter(n=>{let s=n.label?String(n.label):"",i=String(n.value);return s.toLowerCase().includes(a)||i.toLowerCase().includes(a)})},[e,o,r])}var Ll=e=>{let{value:o,defaultValue:r,options:a=[],onSearch:n,onSelect:s,onChange:i,filterOption:l=!0,dropdownMatchSelectWidth:d=!0,notFoundContent:c,fullWidth:m,style:f,className:x,classNames:b,styles:y,...w}=e,{currentValue:g,setInternalValue:u,isControlled:p}=Bl(o,r),[P,v]=(0,Je.useState)(!1),[C,F]=(0,Je.useState)(-1),E=Hl(a,l,g),{refs:T,strategy:W,context:Y,floatingStyles:R}=(0,ye.useFloating)({open:P,onOpenChange:v,placement:"bottom-start",middleware:[(0,ye.offset)(4),(0,ye.flip)(),(0,ye.shift)(),(0,ye.size)({apply({rects:S,elements:B,availableHeight:J}){let N=d===!0?`${S.reference.width}px`:typeof d=="number"?`${d}px`:"";Object.assign(B.floating.style,{width:N,maxHeight:`${Math.min(J,256)}px`})}})],whileElementsMounted:ye.autoUpdate}),M=(0,ye.useDismiss)(Y),k=(0,ye.useRole)(Y,{role:"listbox"}),{getReferenceProps:h,getFloatingProps:I}=(0,ye.useInteractions)([M,k]),H=(0,Je.useCallback)(S=>{let B=S.target.value;p||u(B),i?.(B),n?.(B),v(!0),F(-1)},[p,u,i,n,v,F]),O=(0,Je.useCallback)(S=>{p||u(S.value),i?.(S.value),s?.(S.value,S),v(!1)},[p,u,i,s,v]),U=(0,Je.useCallback)(S=>{if(E.length===0)return;let B=E.length;S.key==="ArrowDown"?(S.preventDefault(),F(J=>J<B-1?J+1:0)):S.key==="ArrowUp"?(S.preventDefault(),F(J=>J>0?J-1:B-1)):S.key==="Enter"?P&&C>=0&&E[C]?(S.preventDefault(),O(E[C])):v(!1):S.key==="Escape"&&v(!1),w.onKeyDown?.(S)},[E,P,C,O,F,v,w]),A=(0,Je.useCallback)(S=>{g&&E.length>0&&v(!0),w.onFocus?.(S)},[g,E.length,v,w]),Q=(0,Je.useCallback)(S=>{w.onBlur?.(S)},[w]),Z=S=>{let B=S.label||S.value;return typeof B!="string"?B:(0,Fe.jsx)(zl,{text:B,searchValue:g})};return(0,Fe.jsxs)(Is,{ref:S=>T.setReference(S),fullWidth:m,style:{...y?.root,...f},className:`compass-auto-complete ${b?.root||""} ${x||""}`,...h(),children:[(0,Fe.jsx)(oo,{...w,style:y?.input,className:b?.input,value:g,onChange:H,onKeyDown:U,onFocus:A,onBlur:Q,fullWidth:!0,autoComplete:"off"}),P&&(E.length>0||c)&&(0,Fe.jsx)(ye.FloatingPortal,{children:(0,Fe.jsx)(Ns,{ref:S=>T.setFloating(S),className:`compass-auto-complete-dropdown ${b?.dropdown||""}`,style:{...y?.dropdown,position:W,...R},...I(),children:E.length>0?E.map((S,B)=>(0,Fe.jsx)(Fs,{active:B===C,style:y?.option,className:`compass-auto-complete-option ${B===C?"compass-auto-complete-option--active":""} ${b?.option||""}`,onClick:()=>O(S),onMouseEnter:()=>F(B),children:Z(S)},S.value)):c&&(0,Fe.jsx)(Ds,{children:c})})})]})},zs=Ll;var Bs=zs;var ze=K(require("react")),Ws=require("react-dom"),As=require("react-dom/client"),ir=require("react-transition-group");var To=K(require("@emotion/styled")),Po=require("@emotion/react");var Ol=Po.keyframes`
|
|
1256
|
+
from {
|
|
1257
|
+
transform: rotate(0deg);
|
|
1154
1258
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
display: flex;
|
|
1158
|
-
align-items: center;
|
|
1159
|
-
justify-content: center;
|
|
1259
|
+
to {
|
|
1260
|
+
transform: rotate(360deg);
|
|
1160
1261
|
}
|
|
1262
|
+
`,Hs=To.default.div`
|
|
1263
|
+
position: fixed;
|
|
1264
|
+
top: ${t("spacing.md","16px")};
|
|
1265
|
+
left: 0;
|
|
1266
|
+
width: 100%;
|
|
1267
|
+
pointer-events: none;
|
|
1268
|
+
z-index: ${t("components.message.zIndex","1010")};
|
|
1269
|
+
display: flex;
|
|
1270
|
+
flex-direction: column;
|
|
1271
|
+
align-items: center;
|
|
1272
|
+
`,Ls=To.default.div`
|
|
1273
|
+
padding: ${t("spacing.sm","8px")};
|
|
1274
|
+
text-align: center;
|
|
1275
|
+
pointer-events: all;
|
|
1161
1276
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
border: none;
|
|
1166
|
-
background: transparent;
|
|
1167
|
-
|
|
1168
|
-
&:hover {
|
|
1169
|
-
color: ${({theme:e,disabled:t})=>t?e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)":e.colors?.primary||"#1890ff"};
|
|
1170
|
-
|
|
1171
|
-
.compass-pagination-item-ellipsis {
|
|
1172
|
-
opacity: ${({disabled:e})=>e?1:0};
|
|
1173
|
-
pointer-events: none;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
.compass-pagination-item-link-icon {
|
|
1177
|
-
opacity: ${({disabled:e})=>e?0:1};
|
|
1178
|
-
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1277
|
+
&.compass-message-enter {
|
|
1278
|
+
opacity: 0;
|
|
1279
|
+
transform: translateY(-100%);
|
|
1181
1280
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
top: 50%;
|
|
1187
|
-
left: 50%;
|
|
1188
|
-
transform: translate(-50%, -50%);
|
|
1189
|
-
transition: all 0.2s;
|
|
1281
|
+
&.compass-message-enter-active {
|
|
1282
|
+
opacity: 1;
|
|
1283
|
+
transform: translateY(0);
|
|
1284
|
+
transition: ${t("transitions.slow","all 0.3s ease-in-out")};
|
|
1190
1285
|
}
|
|
1191
|
-
|
|
1192
|
-
.compass-pagination-item-ellipsis {
|
|
1286
|
+
&.compass-message-exit {
|
|
1193
1287
|
opacity: 1;
|
|
1288
|
+
transform: translateY(0);
|
|
1194
1289
|
}
|
|
1195
|
-
|
|
1196
|
-
.compass-pagination-item-link-icon {
|
|
1290
|
+
&.compass-message-exit-active {
|
|
1197
1291
|
opacity: 0;
|
|
1198
|
-
|
|
1292
|
+
transform: translateY(-100%);
|
|
1293
|
+
transition: ${t("transitions.slow","all 0.3s ease-in-out")};
|
|
1199
1294
|
}
|
|
1200
|
-
`,
|
|
1295
|
+
`,Os=To.default.div`
|
|
1201
1296
|
display: inline-flex;
|
|
1202
|
-
justify-content: center;
|
|
1203
1297
|
align-items: center;
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
`,
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
height: 100%;
|
|
1218
|
-
width: 22px;
|
|
1219
|
-
border-left: 1px solid ${({theme:e})=>e.colors?.border||"#d9d9d9"};
|
|
1220
|
-
border-radius: 0 ${({theme:e})=>e.components?.input?.borderRadius||"4px"}
|
|
1221
|
-
${({theme:e})=>e.components?.input?.borderRadius||"4px"} 0;
|
|
1222
|
-
overflow: hidden;
|
|
1223
|
-
opacity: 0;
|
|
1224
|
-
transition: opacity 0.2s;
|
|
1225
|
-
pointer-events: none;
|
|
1226
|
-
z-index: 1; // Ensure it sits above input content area if needed
|
|
1227
|
-
|
|
1228
|
-
// Show when InputWrapper (parent) is hovered or focused within
|
|
1229
|
-
.compass-input-number:hover &,
|
|
1230
|
-
.compass-input-number:focus-within & {
|
|
1231
|
-
opacity: 1;
|
|
1232
|
-
pointer-events: auto;
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
// Sync border color with parent hover state
|
|
1236
|
-
.compass-input-number:hover & {
|
|
1237
|
-
border-left-color: ${({theme:e})=>e.components?.input?.hoverBorderColor||"#4096ff"};
|
|
1238
|
-
}
|
|
1298
|
+
padding: ${t("components.message.contentPadding","8px 16px")};
|
|
1299
|
+
background: ${t("components.message.contentBg",t("colors.background","#fff"))};
|
|
1300
|
+
border-radius: ${t("components.message.borderRadius",t("borderRadius.lg","8px"))};
|
|
1301
|
+
box-shadow: ${t("components.message.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)"))};
|
|
1302
|
+
font-size: ${t("fontSize.sm","14px")};
|
|
1303
|
+
line-height: ${t("lineHeight.normal","1.5715")};
|
|
1304
|
+
color: ${t("components.message.contentColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
1305
|
+
`,Vs=To.default.span`
|
|
1306
|
+
margin-right: ${t("spacing.sm","8px")};
|
|
1307
|
+
display: inline-flex;
|
|
1308
|
+
align-items: center;
|
|
1309
|
+
font-size: ${t("fontSize.md","16px")};
|
|
1310
|
+
line-height: 1;
|
|
1239
1311
|
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
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"?Po.css`
|
|
1313
|
+
color: ${o};
|
|
1314
|
+
.anticon {
|
|
1315
|
+
display: inline-block;
|
|
1316
|
+
animation: ${Ol} 1s linear infinite;
|
|
1317
|
+
}
|
|
1318
|
+
`:Po.css`
|
|
1319
|
+
color: ${o};
|
|
1320
|
+
`}}
|
|
1321
|
+
`;var Re=require("react/jsx-runtime"),Vl={info:(0,Re.jsx)(Pt,{}),success:(0,Re.jsx)(Ut,{}),error:(0,Re.jsx)(qt,{}),warning:(0,Re.jsx)(Qt,{}),loading:(0,Re.jsx)(Jt,{})},Ks=(0,ze.forwardRef)(({content:e,type:o="info",icon:r,className:a,style:n,duration:s=3,onClose:i},l)=>{let[d,c]=(0,ze.useState)(!1);return(0,ze.useEffect)(()=>{if(s<=0||d)return;let m=setTimeout(()=>{i?.()},s*1e3);return()=>clearTimeout(m)},[s,d,i]),(0,Re.jsx)(Ls,{ref:l,className:`compass-message compass-message--${o} ${a||""}`,style:n,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:(0,Re.jsxs)(Os,{className:"compass-message-content",children:[(0,Re.jsx)(Vs,{$type:o,children:r||Vl[o]}),e]})})});Ks.displayName="Message";var lr=(0,ze.forwardRef)((e,o)=>{let[r,a]=(0,ze.useState)([]),[n]=(0,ze.useState)(()=>new Map),[s]=(0,ze.useState)(()=>typeof window<"u"?document.body:null);return(0,ze.useImperativeHandle)(o,()=>({add:i=>{i.key&&!n.has(i.key)&&n.set(i.key,ze.default.createRef()),a(l=>[...l,i])},remove:i=>{a(l=>l.filter(d=>d.key!==i)),n.delete(i)}})),s?(0,Ws.createPortal)((0,Re.jsx)(Hs,{children:(0,Re.jsx)(ir.TransitionGroup,{component:null,children:r.map(i=>{let{key:l,...d}=i,c=n.get(l);return(0,Re.jsx)(ir.CSSTransition,{timeout:300,classNames:"compass-message",nodeRef:c,children:(0,Re.jsx)(Ks,{ref:c,...d})},l)})})}),s):null});lr.displayName="MessageContainerWrapper";var no=null,Ro=null,Mo=null,Wl=()=>no?Promise.resolve(no):Mo||(Mo=new Promise(e=>{let o=document.createElement("div");document.body.appendChild(o),Ro=(0,As.createRoot)(o);let r=()=>(0,Re.jsx)(lr,{ref:a=>{a&&(no=a,e(a))}});Ro.render((0,Re.jsx)(r,{}))}),Mo),Al=0,Kl=Date.now(),Yl=()=>`compass-message-${Kl}-${Al++}`,nt=e=>{let{content:o,duration:r=3,type:a="info",onClose:n,key:s=Yl(),...i}=e,l=()=>{no&&no.remove(s),n?.()};Wl().then(d=>{d.add({...i,key:s,content:o,duration:r,type:a,onClose:l})})},Ys={info:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?nt({...e,type:"info"}):nt({content:e,duration:o,type:"info",onClose:r}),success:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?nt({...e,type:"success"}):nt({content:e,duration:o,type:"success",onClose:r}),error:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?nt({...e,type:"error"}):nt({content:e,duration:o,type:"error",onClose:r}),warning:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?nt({...e,type:"warning"}):nt({content:e,duration:o,type:"warning",onClose:r}),loading:(e,o,r)=>typeof e=="object"&&e!==null&&"content"in e?nt({...e,type:"loading"}):nt({content:e,duration:o,type:"loading",onClose:r}),open:nt,destroy:()=>{Ro&&(Ro.unmount(),Ro=null),no=null,Mo=null}};var _s=require("react");var js=require("react/jsx-runtime"),_l=0,jl=Date.now(),Gl=()=>`compass-message-hook-${jl}-${_l++}`;function an(){let e=(0,_s.useRef)(null),o=n=>{if(!e.current)return;let{content:s,duration:i=3,type:l="info",onClose:d,key:c=Gl(),...m}=n,f=()=>{e.current?.remove(c),d?.()};e.current.add({...m,key:c,content:s,duration:i,type:l,onClose:f})};return[{info:(n,s,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"info"}):o({content:n,duration:s,type:"info",onClose:i}),success:(n,s,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"success"}):o({content:n,duration:s,type:"success",onClose:i}),error:(n,s,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"error"}):o({content:n,duration:s,type:"error",onClose:i}),warning:(n,s,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"warning"}):o({content:n,duration:s,type:"warning",onClose:i}),loading:(n,s,i)=>typeof n=="object"&&n!==null&&"content"in n?o({...n,type:"loading"}):o({content:n,duration:s,type:"loading",onClose:i}),open:o,destroy:n=>{n&&e.current?.remove(n)}},(0,js.jsx)(lr,{ref:e},"message-holder")]}var Gs=Ys;Gs.useMessage=an;var Us=Gs;var cn=K(require("react")),ni=K(require("react-dom"));var vt=K(require("@emotion/styled"));var Io=500,qs=vt.default.div`
|
|
1322
|
+
position: fixed;
|
|
1323
|
+
inset: 0;
|
|
1324
|
+
z-index: ${t("components.modal.zIndex","1000")};
|
|
1325
|
+
pointer-events: ${e=>e.$visible?"auto":"none"};
|
|
1326
|
+
`,Qs=vt.default.div`
|
|
1327
|
+
position: fixed;
|
|
1328
|
+
inset: 0;
|
|
1329
|
+
background-color: ${t("components.modal.maskColor","rgba(0, 0, 0, 0.45)")};
|
|
1330
|
+
backdrop-filter: blur(1px);
|
|
1331
|
+
opacity: ${e=>e.$visible?1:0};
|
|
1332
|
+
transition: opacity ${Io}ms;
|
|
1333
|
+
`,Js=vt.default.div`
|
|
1334
|
+
background: ${t("components.modal.contentBg",t("colors.background","#fff"))};
|
|
1335
|
+
padding: ${t("components.modal.padding",t("spacing.lg","24px"))};
|
|
1336
|
+
border-radius: ${t("components.modal.borderRadius",t("borderRadius.lg","8px"))};
|
|
1337
|
+
box-shadow: ${t("components.modal.boxShadow",t("shadows.lg","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)"))};
|
|
1338
|
+
width: ${e=>e.$width?typeof e.$width=="number"?`${e.$width}px`:e.$width:"100%"};
|
|
1339
|
+
max-width: ${e=>e.$width?"100%":"500px"};
|
|
1340
|
+
margin: auto;
|
|
1341
|
+
position: relative;
|
|
1342
|
+
top: 120px;
|
|
1343
|
+
opacity: ${e=>e.$visible?1:0};
|
|
1344
|
+
transition:
|
|
1345
|
+
transform ${Io}ms,
|
|
1346
|
+
opacity ${Io}ms;
|
|
1347
|
+
${e=>e.$visible?"transform: translateY(0)":"transform: translateY(-20px)"}
|
|
1348
|
+
`,Xs=vt.default.div`
|
|
1245
1349
|
display: flex;
|
|
1246
1350
|
align-items: center;
|
|
1247
|
-
justify-content:
|
|
1351
|
+
justify-content: space-between;
|
|
1352
|
+
margin-bottom: ${t("spacing.md","16px")};
|
|
1353
|
+
`,Zs=vt.default.div`
|
|
1354
|
+
font-size: ${t("fontSize.lg","18px")};
|
|
1355
|
+
font-weight: ${t("fontWeight.bold","700")};
|
|
1356
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1357
|
+
line-height: 1.5;
|
|
1358
|
+
`,ei=(0,vt.default)(Ie)``,ti=vt.default.div`
|
|
1359
|
+
display: flex;
|
|
1360
|
+
width: 100%;
|
|
1361
|
+
justify-content: flex-end;
|
|
1362
|
+
margin-top: ${t("spacing.md","16px")};
|
|
1363
|
+
`,sn=(0,vt.default)(Ie)`
|
|
1364
|
+
padding: 4px 18px;
|
|
1365
|
+
margin: 0;
|
|
1366
|
+
`;var ln=require("react/jsx-runtime"),Ul=e=>{let{children:o,locale:r,theme:a}=e;return(0,ln.jsx)(Jo.Provider,{value:{locale:r},children:(0,ln.jsx)(ho,{theme:a?.token,lightTheme:a?.light,darkTheme:a?.dark,defaultMode:a?.defaultMode,global:a?.global,children:o})})},oi=Ul;var ri=oi;var ql={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"}},at=ql;var Be=require("react/jsx-runtime"),Ql=e=>{let{isOpen:o,maskVisible:r=!0,footer:a,onCancel:n,children:s,className:i,style:l,title:d,header:c,closable:m=!0,onOk:f,okText:x="\u786E\u5B9A",cancelText:b="\u53D6\u6D88",confirmLoading:y,afterClose:w,styles:g,classNames:u,...p}=e,{locale:P}=Ke(),v=P?.Modal||at.Modal,C=x==="\u786E\u5B9A"?v.okText:x,F=b==="\u53D6\u6D88"?v.cancelText:b,[E,T]=cn.default.useState(!1);cn.default.useEffect(()=>{o||T(!1)},[o]);let W=async R=>{if(!f)return;let M=f(R);if(M&&typeof M.then=="function"){T(!0);try{await M,T(!1),n&&n(R)}catch(k){throw T(!1),console.error(k),k}}else n&&n(R)},Y=R=>{!o&&R.target===R.currentTarget&&w?.()};return(0,Be.jsxs)(qs,{className:`compass-modal ${i||""} ${u?.root||""}`,$visible:o,style:{zIndex:l?.zIndex,...g?.root},role:"dialog","aria-modal":"true",...p,children:[r&&(0,Be.jsx)(Qs,{className:`compass-modal-mask ${u?.mask||""}`,style:g?.mask,onClick:n,"aria-hidden":"true",$visible:o}),(0,Be.jsxs)(Js,{className:`compass-modal-content ${u?.content||""}`,$visible:o,$width:e.width,onTransitionEnd:Y,style:{...l,...g?.content},children:[c===void 0?(d||m)&&(0,Be.jsxs)(Xs,{className:`compass-modal-header ${u?.header||""}`,style:g?.header,children:[(0,Be.jsx)(Zs,{className:"compass-modal-title",children:d}),m&&(0,Be.jsx)(ei,{className:"compass-modal-close",onClick:n,"aria-label":"Close",variant:"text",shape:"circle",icon:(0,Be.jsx)(ct,{})})]}):c,(0,Be.jsx)("div",{className:`compass-modal-body ${u?.body||""}`,style:g?.body,children:s}),a===void 0?(0,Be.jsxs)(ti,{className:`compass-modal-footer ${u?.footer||""}`,style:g?.footer,children:[(0,Be.jsx)(sn,{onClick:n,"aria-label":"Close modal",children:F}),(0,Be.jsx)(sn,{onClick:W,style:{marginLeft:12},variant:"primary",loading:y||E,children:C})]}):a]})]})},Jl=e=>{let{children:o,...r}=e;return ni.default.createPortal((0,Be.jsx)(Ql,{...r,children:o}),document.body)},ao=Jl;var ai=require("react-dom/client");var Vt=K(require("@emotion/styled")),cr=Vt.default.div`
|
|
1367
|
+
display: flex;
|
|
1368
|
+
align-items: flex-start;
|
|
1369
|
+
`,pr=Vt.default.div`
|
|
1370
|
+
margin-right: 12px;
|
|
1371
|
+
font-size: 22px;
|
|
1372
|
+
line-height: 1;
|
|
1373
|
+
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
|
+
`,dr=Vt.default.div`
|
|
1248
1375
|
flex: 1;
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1376
|
+
`,mr=Vt.default.div`
|
|
1377
|
+
color: rgba(0, 0, 0, 0.88);
|
|
1378
|
+
font-weight: 600;
|
|
1379
|
+
font-size: 16px;
|
|
1380
|
+
line-height: 1.5;
|
|
1381
|
+
margin-bottom: 8px;
|
|
1382
|
+
`,ur=Vt.default.div`
|
|
1383
|
+
color: rgba(0, 0, 0, 0.88);
|
|
1384
|
+
font-size: 14px;
|
|
1385
|
+
line-height: 1.5;
|
|
1386
|
+
`,fr=Vt.default.div`
|
|
1387
|
+
display: flex;
|
|
1388
|
+
justify-content: flex-end;
|
|
1389
|
+
gap: 8px;
|
|
1390
|
+
margin-top: 24px;
|
|
1391
|
+
`;var Te=require("react/jsx-runtime"),No=e=>{let o=document.createElement("div");document.body.appendChild(o);let r=(0,ai.createRoot)(o),a={...e,isOpen:!1,confirmLoading:!1},n=()=>{r.unmount(),o.parentNode&&o.parentNode.removeChild(o)},s=i=>{let{onOk:l,onCancel:d,title:c,content:m,icon:f,type:x="confirm",okText:b=at.Modal.okText,cancelText:y=at.Modal.cancelText,closable:w=!1,confirmLoading:g,...u}=i,p=async()=>{if(l){let E=l();if(E&&typeof E.then=="function"){a={...a,confirmLoading:!0},s(a);try{await E,v()}catch(T){throw a={...a,confirmLoading:!1},s(a),console.error("Modal confirm error",T),T}}else v()}else v()},P=async()=>{d&&await d(),v()},v=()=>{a={...a,isOpen:!1,confirmLoading:!1},s(a),setTimeout(()=>{n()},Io)},F={info:(0,Te.jsx)(Pt,{}),success:(0,Te.jsx)(Ut,{}),error:(0,Te.jsx)(qt,{}),warning:(0,Te.jsx)(Qt,{})}[x]||(0,Te.jsx)(Pt,{});r.render((0,Te.jsx)(ho,{theme:be,children:(0,Te.jsx)(ao,{...u,width:416,closable:w,onCancel:P,footer:(0,Te.jsxs)(fr,{children:[x==="confirm"?(0,Te.jsx)(Ie,{onClick:P,children:y}):null,(0,Te.jsx)(Ie,{variant:"primary",onClick:p,loading:g,children:b})]}),children:(0,Te.jsxs)(cr,{children:[(0,Te.jsx)(pr,{$type:x,children:f||F}),(0,Te.jsxs)(dr,{children:[c&&(0,Te.jsx)(mr,{children:c}),m&&(0,Te.jsx)(ur,{children:m})]})]})})}))};return s(a),setTimeout(()=>{a={...a,isOpen:!0},s(a)},10),{destroy:close,update:i=>{a={...a,...i},s(a)}}},si=e=>No({...e,type:"info"}),ii=e=>No({...e,type:"success"}),li=e=>No({...e,type:"error"}),ci=e=>No({...e,type:"warning"}),Xl=e=>No({...e,type:"confirm"}),pi=Xl;var mt=K(require("react"));var he=require("react/jsx-runtime"),Zl=({afterClose:e,closeModal:o,onOk:r,onCancel:a,title:n,content:s,icon:i,type:l="info",okText:d="OK",cancelText:c="Cancel",isOpen:m,confirmLoading:f,...x})=>{let[b,y]=(0,mt.useState)(!1),{locale:w}=Ke(),g=w?.Modal||at.Modal,u=d==="OK"?g.okText:d,p=c==="Cancel"?g.cancelText:c,P=async()=>{if(r){let E=r();if(E&&typeof E.then=="function"){y(!0);try{await E,y(!1),o()}catch(T){throw y(!1),console.error(T),T}}else o()}else o()},v=async()=>{a&&await a(),o()},F={info:(0,he.jsx)(Pt,{}),success:(0,he.jsx)(Ut,{}),error:(0,he.jsx)(qt,{}),warning:(0,he.jsx)(Qt,{})}[l]||(0,he.jsx)(Pt,{});return(0,he.jsx)(ao,{...x,afterClose:e,closable:x.closable??!1,width:416,isOpen:!!m,onCancel:v,footer:(0,he.jsxs)(fr,{children:[l==="confirm"?(0,he.jsx)(Ie,{onClick:v,children:p}):null,(0,he.jsx)(Ie,{variant:"primary",onClick:P,loading:f||b,children:u})]}),children:(0,he.jsxs)(cr,{children:[(0,he.jsx)(pr,{$type:l,children:i||F}),(0,he.jsxs)(dr,{children:[n&&(0,he.jsx)(mr,{children:n}),s&&(0,he.jsx)(ur,{children:s})]})]})})},di=mt.default.forwardRef((e,o)=>{let[r,a]=(0,mt.useState)(new Map);return(0,mt.useImperativeHandle)(o,()=>({patchElement:(n,s)=>{a(i=>{let l=new Map(i);return l.set(n,s),l})},removeElement:n=>{a(s=>{let i=new Map(s);return i.delete(n),i})}})),(0,he.jsx)(he.Fragment,{children:Array.from(r.values())})});di.displayName="ElementsHolder";function pn(){let e=(0,mt.useRef)(null),[o,r]=(0,mt.useState)(null);o||r((0,he.jsx)(di,{ref:e}));let a=s=>i=>{let l=Math.random().toString(36).substring(2),c={...s(i),isOpen:!1},m=()=>{c={...c,isOpen:!1},f(c)},f=x=>{e.current&&e.current.patchElement(l,(0,he.jsx)(Zl,{...x,type:x.type||"info",isOpen:!!x.isOpen,closeModal:m,afterClose:()=>{e.current&&e.current.removeElement(l)}},l))};return f(c),setTimeout(()=>{c={...c,isOpen:!0},f(c)},10),{destroy:m,update:x=>{c={...c,...x},f(c)}}};return[{info:a(s=>({...s,type:"info"})),success:a(s=>({...s,type:"success"})),error:a(s=>({...s,type:"error"})),warning:a(s=>({...s,type:"warning"})),confirm:a(s=>({...s,type:"confirm"}))},o]}var Wt=ao;Wt.info=si;Wt.success=ii;Wt.error=li;Wt.warning=ci;Wt.confirm=pi;Wt.useModal=pn;var mi=Wt;var ki=K(require("react"));var $i=K(require("react"));var st=K(require("@emotion/styled"));var ui=st.default.div`
|
|
1392
|
+
display: flex;
|
|
1393
|
+
align-items: center;
|
|
1394
|
+
gap: ${t("spacing.sm","8px")};
|
|
1395
|
+
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px;`:""}
|
|
1396
|
+
`,fi=st.default.div`
|
|
1397
|
+
flex: 1;
|
|
1398
|
+
background-color: ${t("components.progress.trackColor",t("colors.backgroundSecondary","#fafafa"))};
|
|
1399
|
+
border-radius: ${t("borderRadius.xl","12px")};
|
|
1400
|
+
overflow: hidden;
|
|
1401
|
+
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
|
+
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px; flex: none;`:""}
|
|
1403
|
+
`,gi=st.default.div`
|
|
1404
|
+
height: 100%;
|
|
1405
|
+
border-radius: inherit;
|
|
1406
|
+
transition: ${t("transitions.normal","all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)")};
|
|
1407
|
+
width: ${({percent:e})=>Math.min(Math.max(e,0),100)}%;
|
|
1408
|
+
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
|
+
`,hi=st.default.span`
|
|
1410
|
+
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
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1412
|
+
white-space: nowrap;
|
|
1413
|
+
min-width: ${({size:e})=>{switch(e){case"small":return"28px";case"large":return"36px";case"medium":default:return"32px"}}};
|
|
1414
|
+
text-align: right;
|
|
1415
|
+
`,bi=st.default.div`
|
|
1416
|
+
display: inline-block;
|
|
1417
|
+
width: ${({width:e})=>e}px;
|
|
1418
|
+
height: ${({width:e})=>e}px;
|
|
1419
|
+
`,yi=st.default.svg`
|
|
1420
|
+
transform: rotate(-90deg);
|
|
1421
|
+
width: 100%;
|
|
1422
|
+
height: 100%;
|
|
1423
|
+
`,xi=st.default.circle`
|
|
1424
|
+
fill: none;
|
|
1425
|
+
stroke: ${t("components.progress.trackColor",t("colors.backgroundSecondary","#fafafa"))};
|
|
1426
|
+
`,vi=st.default.circle`
|
|
1427
|
+
fill: none;
|
|
1428
|
+
transition: ${t("transitions.normal","all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)")};
|
|
1429
|
+
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
|
+
stroke-linecap: round;
|
|
1431
|
+
`,Si=st.default.div`
|
|
1432
|
+
position: absolute;
|
|
1433
|
+
top: 50%;
|
|
1434
|
+
left: 50%;
|
|
1435
|
+
transform: translate(-50%, -50%);
|
|
1436
|
+
text-align: center;
|
|
1437
|
+
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
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1439
|
+
white-space: nowrap;
|
|
1440
|
+
`,Ci=st.default.div`
|
|
1441
|
+
position: relative;
|
|
1442
|
+
display: inline-block;
|
|
1443
|
+
`;var dn=require("react"),gr=e=>Math.min(Math.max(e,0),100),hr=(e,o)=>(0,dn.useMemo)(()=>e!=="normal"?e:o===100?"success":"normal",[e,o]),br=(e,o,r,a)=>(0,dn.useMemo)(()=>r?r(e):o==="success"&&a&&e===100?a:`${Math.round(e)}%`,[r,e,o,a]);var so=require("react/jsx-runtime"),mn=$i.default.forwardRef(({percent:e=0,size:o="medium",status:r="normal",showInfo:a=!0,format:n,strokeColor:s,trailColor:i,success:l,className:d,style:c,...m},f)=>{let x=gr(e),b=hr(r,x),y=br(x,b,n,l);return(0,so.jsxs)(ui,{ref:f,className:`compass-progress compass-progress--line ${d||""}`,style:c,size:o,status:b,role:"progressbar","aria-valuenow":x,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${x}%`,...m,children:[(0,so.jsx)(fi,{size:o,status:b,style:{...i?{backgroundColor:i}:{}},children:(0,so.jsx)(gi,{percent:x,size:o,status:b,strokeColor:typeof s=="string"?s:void 0,style:{background:typeof s=="object"?`linear-gradient(${s.direction||"to right"}, ${s.from}, ${s.to})`:void 0}})}),a&&(0,so.jsx)(hi,{size:o,status:b,children:y})]})});mn.displayName="LinearProgress";var io=K(require("react"));var Xe=require("react/jsx-runtime"),un=io.default.forwardRef(({percent:e=0,size:o="medium",status:r="normal",showInfo:a=!0,format:n,strokeWidth:s,strokeColor:i,trailColor:l,success:d,gapDegree:c,gapPosition:m="top",className:f,style:x,...b},y)=>{let w=gr(e),g=hr(r,w),u=br(w,g,n,d),p=(0,io.useMemo)(()=>{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=s??(o==="small"?4:o==="large"?8:6),v=(p-P)/2,C=2*Math.PI*v,F=C,E=C-w/100*C,T=(0,io.useId)(),W=typeof i=="object",Y=Math.max(0,Math.min(295,c||0)),R=C*((360-Y)/360),M=`${R} ${C}`,k=0,h=R*(1-w/100),I=()=>`rotate(${(m==="bottom"?90:m==="left"?180:m==="right"?0:-90)+Y/2}deg)`;return(0,Xe.jsxs)(Ci,{ref:y,className:`compass-progress compass-progress--circle ${f||""}`,style:x,role:"progressbar","aria-valuenow":w,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${w}%`,...b,children:[(0,Xe.jsx)(bi,{width:p,children:(0,Xe.jsxs)(yi,{style:c?{transform:I()}:void 0,children:[(0,Xe.jsx)(xi,{cx:p/2,cy:p/2,r:v,strokeWidth:P,strokeDasharray:c?M:void 0,strokeDashoffset:c?k:void 0,style:{stroke:l}}),(0,Xe.jsx)(vi,{cx:p/2,cy:p/2,r:v,strokeWidth:P,strokeDasharray:c?M:F,strokeDashoffset:c?h:E,status:g,strokeColor:typeof i=="string"?i:void 0,style:{stroke:W?`url(#${T})`:void 0,transition:"stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s"}}),typeof i=="object"&&(0,Xe.jsx)("defs",{children:(0,Xe.jsxs)("linearGradient",{id:T,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,Xe.jsx)("stop",{offset:"0%",stopColor:i.from}),(0,Xe.jsx)("stop",{offset:"100%",stopColor:i.to})]})})]})}),a&&(0,Xe.jsx)(Si,{width:p,size:o,children:u})]})});un.displayName="CircleProgress";var fn=require("react/jsx-runtime"),gn=ki.default.forwardRef(({type:e="line",...o},r)=>e==="circle"?(0,fn.jsx)(un,{ref:r,...o}):(0,fn.jsx)(mn,{ref:r,...o}));gn.displayName="Progress";var wi=gn;var Ze=K(require("react")),ke=require("@floating-ui/react"),xe=require("date-fns"),Ei=K(require("@emotion/styled"));var Fo=require("react"),de=require("date-fns"),yr=({value:e,defaultValue:o})=>{let[r,a]=(0,Fo.useState)(e||o||new Date),[n,s]=(0,Fo.useState)(e);e&&e!==n&&!(0,de.isSameDay)(r,e)&&(a(e),s(e));let i=(0,Fo.useMemo)(()=>{let b=(0,de.startOfMonth)(r),y=(0,de.endOfMonth)(b),w=(0,de.startOfWeek)(b,{weekStartsOn:1}),g=(0,de.endOfWeek)(y,{weekStartsOn:1});return(0,de.eachDayOfInterval)({start:w,end:g}).map(p=>({date:p,isCurrentMonth:(0,de.isSameMonth)(p,b),isToday:(0,de.isToday)(p),isSelected:e?(0,de.isSameDay)(p,e):!1}))},[r,e]);return{viewDate:r,days:i,nextMonth:()=>a((0,de.addMonths)(r,1)),prevMonth:()=>a((0,de.subMonths)(r,1)),nextYear:()=>a((0,de.addMonths)(r,12)),prevYear:()=>a((0,de.subMonths)(r,12)),setMonth:b=>{let y=new Date(r);y.setMonth(b),a(y)},setYear:b=>{let y=new Date(r);y.setFullYear(b),a(y)},setViewDate:a}};var bn=K(require("@emotion/styled")),Do=require("date-fns");var hn=require("react/jsx-runtime"),ec=bn.default.div`
|
|
1285
1444
|
display: grid;
|
|
1286
1445
|
grid-template-columns: repeat(3, 1fr);
|
|
1287
1446
|
gap: 12px;
|
|
1288
1447
|
padding: 8px 16px;
|
|
1289
|
-
`,
|
|
1448
|
+
`,tc=bn.default.div`
|
|
1290
1449
|
padding: 8px 12px;
|
|
1291
1450
|
text-align: center;
|
|
1292
1451
|
cursor: pointer;
|
|
1293
1452
|
border-radius: 4px;
|
|
1294
1453
|
font-size: 14px;
|
|
1295
|
-
background: ${({theme:e,isSelected:
|
|
1296
|
-
color: ${({theme:e,isSelected:
|
|
1454
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"transparent"};
|
|
1455
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ue(e,"colors").text};
|
|
1297
1456
|
|
|
1298
1457
|
&:hover {
|
|
1299
|
-
background: ${({theme:e,isSelected:
|
|
1458
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1300
1459
|
}
|
|
1301
|
-
`,
|
|
1460
|
+
`,Pi=({viewDate:e,onSelect:o,selectedDate:r})=>{let a=Array.from({length:12},(s,i)=>i),n=s=>{let i=(0,Do.setMonth)(e,s);o(i)};return(0,hn.jsx)(ec,{children:a.map(s=>{let i=(0,Do.setMonth)(e,s),l=r?r.getMonth()===s&&r.getFullYear()===e.getFullYear():!1;return(0,hn.jsx)(tc,{isSelected:l,onClick:()=>n(s),children:(0,Do.format)(i,"MMM")},s)})})};var xn=K(require("@emotion/styled")),Ti=require("date-fns");var yn=require("react/jsx-runtime"),oc=xn.default.div`
|
|
1302
1461
|
display: grid;
|
|
1303
1462
|
grid-template-columns: repeat(3, 1fr);
|
|
1304
1463
|
gap: 12px;
|
|
1305
1464
|
padding: 8px 16px;
|
|
1306
|
-
`,
|
|
1465
|
+
`,rc=xn.default.div`
|
|
1307
1466
|
padding: 8px 12px;
|
|
1308
1467
|
text-align: center;
|
|
1309
1468
|
cursor: pointer;
|
|
1310
1469
|
border-radius: 4px;
|
|
1311
1470
|
font-size: 14px;
|
|
1312
|
-
background: ${({theme:e,isSelected:
|
|
1313
|
-
color: ${({theme:e,isSelected:
|
|
1471
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"transparent"};
|
|
1472
|
+
color: ${({theme:e,isSelected:o,isCurrent:r})=>o?"#fff":r?ue(e,"colors").text:ue(e,"colors").textDisabled};
|
|
1314
1473
|
|
|
1315
1474
|
&:hover {
|
|
1316
|
-
background: ${({theme:e,isSelected:
|
|
1475
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1317
1476
|
}
|
|
1318
|
-
`,
|
|
1477
|
+
`,Mi=({viewDate:e,onSelect:o,selectedDate:r})=>{let a=e.getFullYear(),n=Math.floor(a/10)*10,s=Array.from({length:12},(l,d)=>n-1+d),i=l=>{let d=(0,Ti.setYear)(e,l);o(d)};return(0,yn.jsx)(oc,{children:s.map(l=>{let d=r?r.getFullYear()===l:!1,c=l>=n&&l<=n+9;return(0,yn.jsx)(rc,{isSelected:d,isCurrent:c,onClick:()=>i(l),children:l},l)})})};var vn=K(require("@emotion/styled")),xr=require("date-fns");var vr=require("react/jsx-runtime"),nc=vn.default.div`
|
|
1319
1478
|
display: grid;
|
|
1320
1479
|
grid-template-columns: repeat(4, 1fr);
|
|
1321
1480
|
gap: 12px;
|
|
1322
1481
|
padding: 24px 16px;
|
|
1323
|
-
`,
|
|
1482
|
+
`,ac=vn.default.div`
|
|
1324
1483
|
padding: 16px 12px;
|
|
1325
1484
|
text-align: center;
|
|
1326
1485
|
cursor: pointer;
|
|
1327
1486
|
border-radius: 4px;
|
|
1328
1487
|
font-size: 14px;
|
|
1329
|
-
background: ${({theme:e,isSelected:
|
|
1330
|
-
color: ${({theme:e,isSelected:
|
|
1488
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"transparent"};
|
|
1489
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ue(e,"colors").text};
|
|
1331
1490
|
|
|
1332
1491
|
&:hover {
|
|
1333
|
-
background: ${({theme:e,isSelected:
|
|
1492
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1334
1493
|
}
|
|
1335
|
-
`,
|
|
1494
|
+
`,Ri=({viewDate:e,onSelect:o,selectedDate:r})=>{let a=[1,2,3,4],n=s=>{let i=(0,xr.setMonth)(e,(s-1)*3);o(i)};return(0,vr.jsx)(nc,{children:a.map(s=>{let i=r?(0,xr.getQuarter)(r)===s&&r.getFullYear()===e.getFullYear():!1;return(0,vr.jsxs)(ac,{isSelected:i,onClick:()=>n(s),children:["Q",s]},s)})})};var At=K(require("@emotion/styled")),lo=require("date-fns");var He=require("react/jsx-runtime"),sc=At.default.div`
|
|
1336
1495
|
display: flex;
|
|
1337
1496
|
flex-direction: column;
|
|
1338
1497
|
border-left: 1px solid rgba(0, 0, 0, 0.06);
|
|
1339
1498
|
height: 320px; // Fixed height to match date panel
|
|
1340
1499
|
width: 160px;
|
|
1341
|
-
`,
|
|
1500
|
+
`,Sn=At.default.div`
|
|
1342
1501
|
flex: 1;
|
|
1343
1502
|
overflow-y: auto;
|
|
1344
1503
|
padding: 4px 0;
|
|
@@ -1357,71 +1516,72 @@
|
|
|
1357
1516
|
}
|
|
1358
1517
|
|
|
1359
1518
|
&::-webkit-scrollbar-thumb {
|
|
1360
|
-
background: ${({theme:e})=>
|
|
1519
|
+
background: ${({theme:e})=>ue(e,"colors").border};
|
|
1361
1520
|
border-radius: 3px;
|
|
1362
1521
|
|
|
1363
1522
|
&:hover {
|
|
1364
|
-
background: ${({theme:e})=>
|
|
1523
|
+
background: ${({theme:e})=>ue(e,"colors").textSecondary};
|
|
1365
1524
|
}
|
|
1366
1525
|
}
|
|
1367
|
-
`,
|
|
1526
|
+
`,Cn=At.default.div`
|
|
1368
1527
|
padding: 6px 0;
|
|
1369
1528
|
text-align: center;
|
|
1370
1529
|
cursor: pointer;
|
|
1371
1530
|
font-size: 14px;
|
|
1372
1531
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1373
|
-
background: ${({theme:e,isSelected:
|
|
1374
|
-
color: ${({theme:e,isSelected:
|
|
1532
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primary:"transparent"};
|
|
1533
|
+
color: ${({theme:e,isSelected:o})=>o?"#fff":ue(e,"colors").text};
|
|
1375
1534
|
margin: 0 4px;
|
|
1376
1535
|
border-radius: 4px;
|
|
1377
1536
|
|
|
1378
1537
|
&:hover {
|
|
1379
|
-
background: ${({theme:e,isSelected:
|
|
1538
|
+
background: ${({theme:e,isSelected:o})=>o?ue(e,"colors").primaryHover||ue(e,"colors").primary:ue(e,"colors").backgroundSecondary};
|
|
1380
1539
|
}
|
|
1381
1540
|
|
|
1382
1541
|
&:active {
|
|
1383
1542
|
transform: scale(0.95);
|
|
1384
1543
|
}
|
|
1385
|
-
`,
|
|
1544
|
+
`,ic=At.default.div`
|
|
1386
1545
|
height: 41px;
|
|
1387
1546
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
|
1388
1547
|
box-sizing: border-box;
|
|
1389
1548
|
display: flex;
|
|
1390
1549
|
align-items: center;
|
|
1391
|
-
|
|
1550
|
+
`,$n=At.default.div`
|
|
1392
1551
|
flex: 1;
|
|
1393
1552
|
text-align: center;
|
|
1394
1553
|
font-size: 12px;
|
|
1395
|
-
color: ${({theme:e})=>
|
|
1554
|
+
color: ${({theme:e})=>ue(e,"colors").textSecondary};
|
|
1396
1555
|
font-weight: 400;
|
|
1397
1556
|
line-height: 40px;
|
|
1398
|
-
`,
|
|
1557
|
+
`,lc=At.default.div`
|
|
1399
1558
|
display: flex;
|
|
1400
1559
|
flex: 1;
|
|
1401
1560
|
overflow: hidden;
|
|
1402
|
-
`,
|
|
1561
|
+
`,Sr=({value:e,onChange:o})=>{let{locale:r}=Ke(),a=Array.from({length:24},(m,f)=>f),n=Array.from({length:60},(m,f)=>f),s=Array.from({length:60},(m,f)=>f),i=e||new Date,l=m=>{o((0,lo.setHours)(i,m))},d=m=>{o((0,lo.setMinutes)(i,m))},c=m=>{o((0,lo.setSeconds)(i,m))};return(0,He.jsxs)(sc,{children:[(0,He.jsxs)(ic,{children:[(0,He.jsx)($n,{children:r?.DatePicker.hour||"\u65F6"}),(0,He.jsx)($n,{children:r?.DatePicker.minute||"\u5206"}),(0,He.jsx)($n,{children:r?.DatePicker.second||"\u79D2"})]}),(0,He.jsxs)(lc,{children:[(0,He.jsx)(Sn,{children:a.map(m=>(0,He.jsx)(Cn,{isSelected:i.getHours()===m,onClick:()=>l(m),children:m.toString().padStart(2,"0")},m))}),(0,He.jsx)(Sn,{children:n.map(m=>(0,He.jsx)(Cn,{isSelected:i.getMinutes()===m,onClick:()=>d(m),children:m.toString().padStart(2,"0")},m))}),(0,He.jsx)(Sn,{children:s.map(m=>(0,He.jsx)(Cn,{isSelected:i.getSeconds()===m,onClick:()=>c(m),children:m.toString().padStart(2,"0")},m))})]})]})};var Ce=K(require("@emotion/styled"));var Cr=Ce.default.div`
|
|
1403
1562
|
position: relative;
|
|
1404
1563
|
display: inline-block;
|
|
1405
1564
|
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
1406
|
-
|
|
1407
|
-
background: ${(
|
|
1408
|
-
border: 1px solid ${(
|
|
1409
|
-
border-radius: 8px;
|
|
1410
|
-
box-shadow: ${(
|
|
1565
|
+
`,$r=Ce.default.div`
|
|
1566
|
+
background: ${t("colors.background","#fff")};
|
|
1567
|
+
border: 1px solid ${t("components.datePicker.borderColor",t("colors.border","#d9d9d9"))};
|
|
1568
|
+
border-radius: ${t("borderRadius.lg","8px")};
|
|
1569
|
+
box-shadow: ${t("components.datePicker.boxShadow",t("shadows.lg","0 6px 16px 0 rgba(0, 0, 0, 0.08)"))};
|
|
1411
1570
|
width: auto;
|
|
1412
1571
|
user-select: none;
|
|
1413
1572
|
overflow: hidden;
|
|
1414
|
-
`,
|
|
1573
|
+
`,kr=Ce.default.div`
|
|
1415
1574
|
display: flex;
|
|
1416
|
-
border-top: 1px solid
|
|
1417
|
-
|
|
1575
|
+
border-top: 1px solid
|
|
1576
|
+
${t("components.datePicker.borderColor",t("colors.border","#d9d9d9"))};
|
|
1577
|
+
`,wr=Ce.default.div`
|
|
1418
1578
|
width: 280px;
|
|
1419
|
-
`,
|
|
1579
|
+
`,co=Ce.default.div`
|
|
1420
1580
|
display: flex;
|
|
1421
1581
|
justify-content: space-between;
|
|
1422
1582
|
align-items: center;
|
|
1423
|
-
padding: ${(
|
|
1424
|
-
`,
|
|
1583
|
+
padding: ${t("components.datePicker.headerPadding","11px 16px")};
|
|
1584
|
+
`,po=Ce.default.div`
|
|
1425
1585
|
display: flex;
|
|
1426
1586
|
align-items: center;
|
|
1427
1587
|
gap: 4px;
|
|
@@ -1431,7 +1591,7 @@
|
|
|
1431
1591
|
cursor: pointer;
|
|
1432
1592
|
padding: 4px 8px;
|
|
1433
1593
|
border-radius: 4px;
|
|
1434
|
-
color: ${(
|
|
1594
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1435
1595
|
font-size: 14px;
|
|
1436
1596
|
line-height: 1;
|
|
1437
1597
|
transition: all 0.2s;
|
|
@@ -1441,138 +1601,138 @@
|
|
|
1441
1601
|
justify-content: center;
|
|
1442
1602
|
|
|
1443
1603
|
&:hover {
|
|
1444
|
-
color: ${(
|
|
1445
|
-
background: ${(
|
|
1604
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1605
|
+
background: ${t("colors.backgroundSecondary","rgba(0, 0, 0, 0.04)")};
|
|
1446
1606
|
}
|
|
1447
|
-
`,
|
|
1607
|
+
`,mo=Ce.default.div`
|
|
1448
1608
|
font-weight: 500;
|
|
1449
1609
|
cursor: pointer;
|
|
1450
|
-
font-size: ${(
|
|
1610
|
+
font-size: ${t("components.datePicker.headerFontSize","16px")};
|
|
1451
1611
|
transition: color 0.2s;
|
|
1452
1612
|
|
|
1453
1613
|
&:hover {
|
|
1454
|
-
color: ${(
|
|
1614
|
+
color: ${t("colors.primary","#1890ff")};
|
|
1455
1615
|
}
|
|
1456
|
-
`,
|
|
1616
|
+
`,Pr=Ce.default.div`
|
|
1457
1617
|
display: grid;
|
|
1458
1618
|
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1459
1619
|
padding: 8px 12px 4px;
|
|
1460
1620
|
text-align: center;
|
|
1461
|
-
`,
|
|
1462
|
-
color: ${(
|
|
1463
|
-
font-size: ${(
|
|
1621
|
+
`,Eo=Ce.default.div`
|
|
1622
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1623
|
+
font-size: ${t("components.datePicker.weekDayFontSize","12px")};
|
|
1464
1624
|
padding: 4px 0;
|
|
1465
1625
|
font-weight: 400;
|
|
1466
|
-
`,
|
|
1626
|
+
`,Tr=Ce.default.div`
|
|
1467
1627
|
display: grid;
|
|
1468
1628
|
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1469
1629
|
gap: 0;
|
|
1470
1630
|
padding: 4px 12px 8px;
|
|
1471
|
-
`,
|
|
1472
|
-
height: ${(
|
|
1631
|
+
`,Ii=Ce.default.div`
|
|
1632
|
+
height: ${t("components.datePicker.cellHeight","24px")};
|
|
1473
1633
|
width: 100%;
|
|
1474
|
-
margin: ${(
|
|
1634
|
+
margin: ${t("components.datePicker.cellMargin","3px")} 0;
|
|
1475
1635
|
display: flex;
|
|
1476
1636
|
align-items: center;
|
|
1477
1637
|
justify-content: center;
|
|
1478
|
-
font-size: ${(
|
|
1638
|
+
font-size: ${t("components.datePicker.weekDayFontSize","12px")};
|
|
1479
1639
|
box-sizing: border-box;
|
|
1480
|
-
color: ${({
|
|
1481
|
-
background: ${({
|
|
1482
|
-
border-radius: ${(
|
|
1483
|
-
${(
|
|
1640
|
+
color: ${({isSelected:e,isHovered:o})=>e||o?t("components.datePicker.cellActiveColor",t("colors.primary","#1890ff")):t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1641
|
+
background: ${({isSelected:e,isHovered:o})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):o?t("components.datePicker.cellHoverBg","#f0f0f0"):"transparent"};
|
|
1642
|
+
border-radius: ${t("components.datePicker.cellBorderRadius","2px")} 0 0
|
|
1643
|
+
${t("components.datePicker.cellBorderRadius","2px")};
|
|
1484
1644
|
cursor: pointer;
|
|
1485
1645
|
transition: all 0.2s;
|
|
1486
1646
|
|
|
1487
1647
|
&:hover {
|
|
1488
|
-
background: ${({
|
|
1489
|
-
color: ${({
|
|
1648
|
+
background: ${({isSelected:e})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):t("components.datePicker.cellHoverBg","#f0f0f0")};
|
|
1649
|
+
color: ${({isSelected:e})=>e?t("components.datePicker.cellActiveColor","#1890ff"):t("components.datePicker.cellActiveColor","#1890ff")};
|
|
1490
1650
|
}
|
|
1491
|
-
`,
|
|
1492
|
-
height: ${(
|
|
1493
|
-
width: ${({isWeekMode:e
|
|
1494
|
-
margin: ${({isWeekMode:e
|
|
1651
|
+
`,cc=(e,o)=>{if(!e||!e.startsWith("#"))return e;let r=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return`rgba(${r}, ${a}, ${n}, ${o})`},Mr=Ce.default.div`
|
|
1652
|
+
height: ${t("components.datePicker.cellHeight","24px")};
|
|
1653
|
+
width: ${({isWeekMode:e})=>e?"100%":t("components.datePicker.cellWidth","36px")};
|
|
1654
|
+
margin: ${({isWeekMode:e})=>e?`${t("components.datePicker.cellMargin","3px")} 0`:`${t("components.datePicker.cellMargin","3px")} auto`};
|
|
1495
1655
|
display: flex;
|
|
1496
1656
|
align-items: center;
|
|
1497
1657
|
justify-content: center;
|
|
1498
1658
|
cursor: pointer;
|
|
1499
1659
|
box-sizing: border-box;
|
|
1500
|
-
font-size: ${(
|
|
1501
|
-
color: ${({
|
|
1502
|
-
background: ${({
|
|
1503
|
-
border-radius: ${({isWeekMode:e,isWeekEnd:
|
|
1504
|
-
border: ${({
|
|
1660
|
+
font-size: ${t("components.datePicker.cellFontSize","14px")};
|
|
1661
|
+
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?cc(t("colors.primary","#1890ff"),.2):"transparent"};
|
|
1663
|
+
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
|
+
border: ${({isToday:e,isSelected:o,isWeekMode:r,isHovered:a})=>r&&a?"1px solid transparent":!o&&e?`1px solid ${t("components.datePicker.cellActiveBg","#e6f7ff")}`:"1px solid transparent"};
|
|
1505
1665
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1506
1666
|
|
|
1507
1667
|
&:hover {
|
|
1508
|
-
background: ${({
|
|
1509
|
-
color: ${({
|
|
1668
|
+
background: ${({isSelected:e})=>e?t("components.datePicker.cellActiveBg","#e6f7ff"):t("components.datePicker.cellHoverBg","#f0f0f0")};
|
|
1669
|
+
color: ${({isSelected:e})=>e?t("components.datePicker.cellActiveColor","#1890ff"):t("components.datePicker.cellActiveColor","#1890ff")};
|
|
1510
1670
|
}
|
|
1511
1671
|
|
|
1512
1672
|
&:active {
|
|
1513
1673
|
transform: ${({isWeekMode:e})=>e?"none":"scale(0.95)"};
|
|
1514
1674
|
}
|
|
1515
|
-
`,
|
|
1675
|
+
`,Ni=Ce.default.div`
|
|
1516
1676
|
display: flex;
|
|
1517
1677
|
align-items: center;
|
|
1518
1678
|
position: relative;
|
|
1519
1679
|
box-sizing: border-box;
|
|
1520
1680
|
width: 100%;
|
|
1521
1681
|
min-width: 320px;
|
|
1522
|
-
background-color: ${(
|
|
1682
|
+
background-color: ${t("colors.background","#fff")};
|
|
1523
1683
|
border: 1px solid
|
|
1524
|
-
${({
|
|
1525
|
-
border-radius: ${(
|
|
1684
|
+
${({error:e,focused:o})=>e?t("colors.error","#ff4d4f"):o?t("components.input.activeBorderColor",t("colors.primary","#1890ff")):t("colors.border","#d9d9d9")};
|
|
1685
|
+
border-radius: ${t("components.input.borderRadius","4px")};
|
|
1526
1686
|
padding: 4px 11px;
|
|
1527
1687
|
transition: all 0.2s;
|
|
1528
1688
|
|
|
1529
1689
|
&:hover {
|
|
1530
|
-
border-color: ${({
|
|
1690
|
+
border-color: ${({error:e,focused:o,disabled:r})=>r?t("colors.border","#d9d9d9"):e?t("colors.error","#ff4d4f"):o?t("components.input.activeBorderColor",t("colors.primary","#1890ff")):t("components.input.hoverBorderColor",t("colors.primary","#1890ff"))};
|
|
1531
1691
|
}
|
|
1532
1692
|
|
|
1533
|
-
${({disabled:e
|
|
1534
|
-
background-color: ${
|
|
1693
|
+
${({disabled:e})=>e&&`
|
|
1694
|
+
background-color: ${t("colors.backgroundSecondary","rgba(0, 0, 0, 0.04)")};
|
|
1535
1695
|
cursor: not-allowed;
|
|
1536
1696
|
opacity: 0.6;
|
|
1537
1697
|
`}
|
|
1538
|
-
`,
|
|
1698
|
+
`,kn=Ce.default.input`
|
|
1539
1699
|
flex: 1;
|
|
1540
1700
|
border: none;
|
|
1541
1701
|
outline: none;
|
|
1542
1702
|
background: transparent;
|
|
1543
1703
|
padding: 0;
|
|
1544
1704
|
margin: 0;
|
|
1545
|
-
color: ${(
|
|
1705
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1546
1706
|
font-size: 14px;
|
|
1547
1707
|
width: 100%;
|
|
1548
1708
|
text-align: center;
|
|
1549
1709
|
|
|
1550
1710
|
&::placeholder {
|
|
1551
|
-
color: ${(
|
|
1711
|
+
color: ${t("colors.textDisabled","rgba(0, 0, 0, 0.25)")};
|
|
1552
1712
|
}
|
|
1553
1713
|
|
|
1554
1714
|
&:disabled {
|
|
1555
1715
|
cursor: not-allowed;
|
|
1556
1716
|
}
|
|
1557
|
-
`,
|
|
1558
|
-
color: ${(
|
|
1717
|
+
`,Fi=Ce.default.span`
|
|
1718
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1559
1719
|
margin: 0 8px;
|
|
1560
1720
|
flex-shrink: 0;
|
|
1561
|
-
`,
|
|
1721
|
+
`,Di=Ce.default.div`
|
|
1562
1722
|
position: absolute;
|
|
1563
1723
|
bottom: -1px;
|
|
1564
1724
|
height: 2px;
|
|
1565
|
-
background-color: ${(
|
|
1725
|
+
background-color: ${t("colors.primary","#1890ff")};
|
|
1566
1726
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1567
1727
|
left: ${({position:e})=>e==="left"?"0":"50%"};
|
|
1568
1728
|
width: 50%;
|
|
1569
1729
|
pointer-events: none;
|
|
1570
1730
|
opacity: 1;
|
|
1571
1731
|
z-index: 1;
|
|
1572
|
-
`,
|
|
1732
|
+
`,uo=Ce.default.span`
|
|
1573
1733
|
display: flex;
|
|
1574
1734
|
align-items: center;
|
|
1575
|
-
color: ${(
|
|
1735
|
+
color: ${t("colors.textSecondary","rgba(0, 0, 0, 0.45)")};
|
|
1576
1736
|
margin-left: 8px;
|
|
1577
1737
|
width: 16px;
|
|
1578
1738
|
justify-content: center;
|
|
@@ -1580,73 +1740,118 @@
|
|
|
1580
1740
|
transition: color 0.2s;
|
|
1581
1741
|
|
|
1582
1742
|
&:hover {
|
|
1583
|
-
color: ${(
|
|
1743
|
+
color: ${t("colors.text","rgba(0, 0, 0, 0.88)")};
|
|
1584
1744
|
}
|
|
1585
|
-
`;var
|
|
1745
|
+
`;var V=require("react/jsx-runtime"),pc=Ei.default.div`
|
|
1586
1746
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1587
1747
|
padding: 8px 16px;
|
|
1588
1748
|
display: flex;
|
|
1589
1749
|
justify-content: flex-end;
|
|
1590
1750
|
align-items: center;
|
|
1591
|
-
`,
|
|
1751
|
+
`,zi=Ze.default.forwardRef((e,o)=>{let{value:r,defaultValue:a,onChange:n,picker:s="date",showTime:i=!1,format:l,disabled:d=!1,placeholder:c,clearable:m=!1,className:f,style:x,fullWidth:b=!1,styles:y,classNames:w,...g}=e,[u,p]=(0,Ze.useState)(!1),[P,v]=(0,Ze.useState)(r||a||null),[C,F]=(0,Ze.useState)(s==="week"?"date":s),[E,T]=(0,Ze.useState)(null),[W,Y]=(0,Ze.useState)(!1),R=L=>{L.stopPropagation(),v(null),n?.(null)},{locale:M}=Ke(),k=M?.DatePicker||at.DatePicker;(0,Ze.useEffect)(()=>{r!==void 0&&v(r)},[r]),(0,Ze.useEffect)(()=>{u&&F(s==="week"?"date":s)},[u,s]);let{viewDate:h,days:I,nextMonth:H,prevMonth:O,nextYear:U,prevYear:A,setYear:Q,setViewDate:Z}=yr({value:P}),{refs:S,floatingStyles:B,context:J}=(0,ke.useFloating)({open:u,onOpenChange:p,middleware:[(0,ke.offset)(4),(0,ke.flip)(),(0,ke.shift)()],whileElementsMounted:ke.autoUpdate,placement:"bottom-start"}),N=(0,ke.useDismiss)(J),{getReferenceProps:ne,getFloatingProps:j}=(0,ke.useInteractions)([N]),_=L=>{if(P&&C==="date"&&(L.setHours(P.getHours()),L.setMinutes(P.getMinutes()),L.setSeconds(P.getSeconds())),s==="week"){let re=(0,xe.startOfWeek)(L,{weekStartsOn:1});v(re),n?.(re),p(!1)}else v(L),i&&s==="date"||(n?.(L),p(!1))},G=L=>{v(L)},Se=(L,re)=>{Z(L),s===re?_(L):re==="year"?F(s==="quarter"?"quarter":"month"):re==="month"&&F("date")},se=()=>{n?.(P),p(!1)},Ct=P?(0,xe.format)(P,l||(i&&s==="date"?k.dateTimeFormat||"yyyy-MM-dd HH:mm:ss":s==="year"?k.yearFormat||"yyyy":s==="month"?"yyyy-MM":s==="quarter"?k.quarterFormat||"yyyy-QQQ":s==="week"?k.weekFormat||"yyyy-wo":k.dateFormat||"yyyy-MM-dd")):"",gt=k.shortWeekDays,lt=()=>{switch(C){case"year":{let L=Math.floor(h.getFullYear()/10)*10;return(0,V.jsxs)(co,{className:w?.header,style:y?.header,children:[(0,V.jsx)(Le,{onClick:()=>Q(h.getFullYear()-10),children:(0,V.jsx)(Tt,{})}),(0,V.jsx)(mo,{children:`${L}-${L+9}`}),(0,V.jsx)(Le,{onClick:()=>Q(h.getFullYear()+10),children:(0,V.jsx)(Mt,{})})]})}case"month":case"quarter":return(0,V.jsxs)(co,{className:w?.header,style:y?.header,children:[(0,V.jsx)(Le,{onClick:A,children:(0,V.jsx)(Tt,{})}),(0,V.jsx)(mo,{onClick:()=>F("year"),children:(0,xe.format)(h,k.yearFormat)}),(0,V.jsx)(Le,{onClick:U,children:(0,V.jsx)(Mt,{})})]});default:return(0,V.jsxs)(co,{className:w?.header,style:y?.header,children:[(0,V.jsxs)(po,{children:[(0,V.jsx)(Le,{onClick:A,children:(0,V.jsx)(Tt,{})}),(0,V.jsx)(Le,{onClick:O,children:(0,V.jsx)(zt,{})})]}),(0,V.jsx)(mo,{onClick:()=>F("month"),children:k.monthBeforeYear?`${(0,xe.format)(h,k.monthFormat)} ${(0,xe.format)(h,k.yearFormat)}`:`${(0,xe.format)(h,k.yearFormat)} ${(0,xe.format)(h,k.monthFormat)}`}),(0,V.jsxs)(po,{children:[(0,V.jsx)(Le,{onClick:H,children:(0,V.jsx)(Bt,{})}),(0,V.jsx)(Le,{onClick:U,children:(0,V.jsx)(Mt,{})})]})]})}},X=()=>{switch(C){case"year":return(0,V.jsx)(Mi,{viewDate:h,selectedDate:P,onSelect:L=>Se(L,"year")});case"month":return(0,V.jsx)(Pi,{viewDate:h,selectedDate:P,onSelect:L=>Se(L,"month")});case"quarter":return(0,V.jsx)(Ri,{viewDate:h,selectedDate:P,onSelect:L=>Se(L,"quarter")});default:{let L=s==="week";return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Pr,{showWeekNumber:L,children:[L&&(0,V.jsx)(Eo,{}),gt.map(re=>(0,V.jsx)(Eo,{children:re},re))]}),(0,V.jsx)(Tr,{showWeekNumber:L,onMouseLeave:()=>T(null),children:I.map((re,Ge)=>{let $t=re.isSelected;if(s==="week"&&P){let kt=(0,xe.startOfWeek)(P,{weekStartsOn:1}),$=(0,xe.endOfWeek)(P,{weekStartsOn:1});$t=(0,xe.isWithinInterval)(re.date,{start:kt,end:$})}let Et=!1;if(s==="week"&&E){let kt=(0,xe.startOfWeek)(E,{weekStartsOn:1}),$=(0,xe.endOfWeek)(E,{weekStartsOn:1});Et=(0,xe.isWithinInterval)(re.date,{start:kt,end:$})}let go=Ge%7===0,Kt=Ge%7===6;return(0,V.jsxs)(Ze.default.Fragment,{children:[L&&go&&(0,V.jsx)(Ii,{isSelected:$t,isHovered:Et,onClick:()=>_(re.date),onMouseEnter:()=>T(re.date),children:(0,xe.getISOWeek)(re.date)}),(0,V.jsx)(Mr,{className:w?.day,style:y?.day,isCurrentMonth:re.isCurrentMonth,isToday:re.isToday,isSelected:$t,isWeekMode:L,isWeekEnd:Kt,isHovered:Et,onClick:()=>_(re.date),onMouseEnter:()=>T(re.date),children:(0,xe.format)(re.date,"d")})]},Ge)})})]})}}};return(0,V.jsxs)(Cr,{ref:o,className:`compass-date-picker ${f||""} ${w?.root||""}`,style:{...x,...y?.root},fullWidth:b,children:[(0,V.jsx)("div",{ref:S.setReference,...ne(),onMouseEnter:()=>Y(!0),onMouseLeave:()=>Y(!1),children:(0,V.jsx)(oo,{...g,className:w?.input,style:y?.input,fullWidth:b,placeholder:c||k.dateSelect,value:Ct,readOnly:!0,disabled:d,onClick:()=>!d&&p(!u),onChange:L=>{L.target.value||(v(null),n?.(null))},suffix:m&&W&&Ct?(0,V.jsx)(uo,{onClick:R,style:{cursor:"pointer"},onMouseDown:L=>{L.preventDefault()},children:(0,V.jsx)(pt,{})}):(0,V.jsx)(uo,{children:(0,V.jsx)(Ao,{})})})}),u&&(0,V.jsx)(ke.FloatingPortal,{children:(0,V.jsx)(ke.FloatingFocusManager,{context:J,modal:!1,children:(0,V.jsx)("div",{ref:S.setFloating,style:{...B,zIndex:1e3},...j(),children:(0,V.jsxs)($r,{className:w?.popup,style:y?.popup,children:[lt(),(0,V.jsxs)(kr,{className:w?.body,style:y?.body,children:[(0,V.jsx)(wr,{children:X()}),i&&s==="date"&&C==="date"&&(0,V.jsx)(Sr,{value:P,onChange:G})]}),i&&s==="date"&&(0,V.jsxs)(pc,{className:w?.footer,style:y?.footer,children:[(0,V.jsx)("div",{})," ",(0,V.jsx)(Ie,{size:"small",variant:"primary",onClick:se,children:k.ok})]})]})})})})]})}),Bi=zi;zi.displayName="DatePicker";var et=K(require("react")),we=require("@floating-ui/react"),ve=require("date-fns"),Hi=K(require("@emotion/styled"));var te=require("react/jsx-runtime"),dc=Hi.default.div`
|
|
1592
1752
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1593
1753
|
padding: 8px 16px;
|
|
1594
1754
|
display: flex;
|
|
1595
1755
|
justify-content: flex-end;
|
|
1596
1756
|
align-items: center;
|
|
1597
|
-
`,
|
|
1598
|
-
|
|
1757
|
+
`,Li=et.default.forwardRef((e,o)=>{let{value:r,defaultValue:a,onChange:n,showTime:s=!1,format:i,disabled:l=!1,placeholder:d,clearable:c=!1,className:m,style:f,fullWidth:x=!1,styles:b,classNames:y,status:w}=e,[g,u]=(0,et.useState)(!1),[p,P]=(0,et.useState)(r||a||[null,null]),[v,C]=(0,et.useState)(null),[F,E]=(0,et.useState)(null),[T,W]=(0,et.useState)(!1),Y=(0,et.useRef)(!1);(0,et.useEffect)(()=>{r!==void 0&&P(r)},[r]);let{viewDate:R,days:M,nextMonth:k,prevMonth:h,nextYear:I,prevYear:H,setViewDate:O}=yr({value:p[0]||new Date}),{locale:U}=Ke(),A=U?.DatePicker||at.DatePicker,Q=X=>{!X&&(!p[0]||!p[1])&&(P([null,null]),C(null)),u(X)},{refs:Z,floatingStyles:S,context:B}=(0,we.useFloating)({open:g,onOpenChange:Q,middleware:[(0,we.offset)(4),(0,we.flip)(),(0,we.shift)()],whileElementsMounted:we.autoUpdate,placement:"bottom-start"}),J=(0,we.useDismiss)(B),{getReferenceProps:N,getFloatingProps:ne}=(0,we.useInteractions)([J]),j=X=>{if(v==="start"){let L=[X,p[1]];L[1]&&(0,ve.isAfter)(X,L[1])&&(L[1]=null),P(L),s||(Y.current&&L[0]&&L[1]?(n?.(L),u(!1),C(null)):(Y.current=!0,C("end")))}else if(v==="end"){let L=[p[0],X];L[0]&&(0,ve.isBefore)(X,L[0])&&(L[0]=X,L[1]=p[0]),P(L),s||(Y.current&&L[0]&&L[1]?(n?.(L),u(!1),C(null)):(Y.current=!0,C("start")))}},_=(X,L)=>{let re=[...p];L==="start"?re[0]=X:re[1]=X,P(re)},G=()=>{if(!p[0]){C("start");return}if(!p[1]){C("end");return}n?.(p),u(!1),C(null)},Se=X=>{l||(u(!0),Y.current=!1,C(X),X==="start"&&p[0]?O(p[0]):X==="end"&&p[1]&&O(p[1]))},se=X=>{X.stopPropagation(),P([null,null]),n?.([null,null]),C(null)},ot=()=>i||(s?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"),Ct=X=>{if(p[0]&&p[1])return(0,ve.isWithinInterval)(X,{start:p[0],end:p[1]});if(v==="end"&&p[0]&&F){let L=(0,ve.isBefore)(p[0],F)?p[0]:F,re=(0,ve.isBefore)(p[0],F)?F:p[0];return(0,ve.isWithinInterval)(X,{start:L,end:re})}return!1},gt=X=>p[0]&&(0,ve.isSameDay)(X,p[0])||p[1]&&(0,ve.isSameDay)(X,p[1]),lt=A.shortWeekDays;return(0,te.jsxs)(Cr,{ref:o,className:`compass-date-range-picker ${m||""} ${y?.root||""}`,style:{...f,...b?.root},fullWidth:x,children:[(0,te.jsx)("div",{ref:Z.setReference,...N(),children:(0,te.jsxs)(Ni,{focused:g,disabled:l,error:w==="error",className:y?.input,style:b?.input,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[(0,te.jsx)(kn,{placeholder:d?.[0]||A.startDate,value:p[0]?(0,ve.format)(p[0],ot()):"",readOnly:!0,disabled:l,onClick:()=>Se("start")}),(0,te.jsx)(Fi,{children:"\u2192"}),(0,te.jsx)(kn,{placeholder:d?.[1]||A.endDate,value:p[1]?(0,ve.format)(p[1],ot()):"",readOnly:!0,disabled:l,onClick:()=>Se("end")}),c&&T&&(p[0]||p[1])?(0,te.jsx)(uo,{onClick:se,style:{cursor:"pointer"},role:"button","aria-label":"clear",children:(0,te.jsx)(pt,{})}):(0,te.jsx)(uo,{children:(0,te.jsx)(Ao,{})}),g&&v&&(0,te.jsx)(Di,{position:v==="start"?"left":"right"})]})}),g&&(0,te.jsx)(we.FloatingPortal,{children:(0,te.jsx)(we.FloatingFocusManager,{context:B,modal:!1,children:(0,te.jsx)("div",{ref:Z.setFloating,style:{...S,zIndex:1e3},...ne(),children:(0,te.jsxs)($r,{className:y?.popup,style:b?.popup,children:[(0,te.jsxs)(co,{className:y?.header,style:b?.header,children:[(0,te.jsxs)(po,{children:[(0,te.jsx)(Le,{onClick:H,children:(0,te.jsx)(Tt,{})}),(0,te.jsx)(Le,{onClick:h,children:(0,te.jsx)(zt,{})})]}),(0,te.jsx)(mo,{children:A.monthBeforeYear?`${(0,ve.format)(R,A.monthFormat)} ${(0,ve.format)(R,A.yearFormat)}`:`${(0,ve.format)(R,A.yearFormat)} ${(0,ve.format)(R,A.monthFormat)}`}),(0,te.jsxs)(po,{children:[(0,te.jsx)(Le,{onClick:k,children:(0,te.jsx)(Bt,{})}),(0,te.jsx)(Le,{onClick:I,children:(0,te.jsx)(Mt,{})})]})]}),(0,te.jsxs)(kr,{className:y?.body,style:b?.body,children:[(0,te.jsxs)(wr,{children:[(0,te.jsx)(Pr,{children:lt.map(X=>(0,te.jsx)(Eo,{children:X},X))}),(0,te.jsx)(Tr,{children:M.map((X,L)=>{let re=Ct(X.date),Ge=gt(X.date);return(0,te.jsx)(Mr,{className:y?.day,style:b?.day,isCurrentMonth:X.isCurrentMonth,isToday:X.isToday,isSelected:!!Ge,isInRange:re&&!Ge,onClick:()=>j(X.date),onMouseEnter:()=>E(X.date),onMouseLeave:()=>E(null),children:(0,ve.format)(X.date,"d")},L)})})]}),s&&v&&(0,te.jsx)(Sr,{value:v==="start"?p[0]:p[1],onChange:X=>_(X,v)})]}),s&&(0,te.jsx)(dc,{className:y?.footer,style:b?.footer,children:(0,te.jsx)(Ie,{size:"small",variant:"primary",onClick:G,disabled:v==="start"?!p[0]:!p[1],children:A.ok})})]})})})})]})}),Oi=Li;Li.displayName="DateRangePicker";var Vi=Bi;Vi.RangePicker=Oi;var Wi=Vi;var Ft=K(require("react"));var St=K(require("react"));var De=e=>e?Array.isArray(e)?e:[e]:[],Ai=(e,o)=>{let r=e.map(De),a=De(o);return r.some(n=>ut(n,a))},ut=(e,o)=>e.length!==o.length?!1:e.every((r,a)=>r===o[a]),tt=(e,o)=>{let r=e;for(let a=0;a<o.length;a++){if(r==null)return;r=r[o[a]]}return r},fo=(e,o,r)=>{let a={...e},n=a;for(let s=0;s<o.length;s++){let i=o[s],l=n;if(s===o.length-1)l[i]=r;else{if(!l[i]||typeof l[i]!="object"){let d=o[s+1];l[i]=typeof d=="number"?[]:{}}Array.isArray(l[i])?l[i]=[...l[i]]:l[i]={...l[i]},n=l[i]}}return a};var Rr=class{store={};fieldEntities=[];watchList=[];initialValues={};callbacks={};forceRootUpdate;constructor(o,r={}){this.store={...r},this.initialValues=r,this.forceRootUpdate=o}getFieldValue=o=>{let r=De(o);return tt(this.store,r)};getFieldsValue=()=>({...this.store});getFieldError=o=>{let r=De(o),a=this.getFieldEntity(r);return a?a.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 a=De(r),n=tt(this.store,a),s=tt(this.initialValues,a);return n!==s}):this.fieldEntities.some(r=>{let a=r.getNamePath(),n=tt(this.store,a),s=tt(this.initialValues,a);return n!==s});isFieldTouched=o=>this.isFieldsTouched([o]);isFieldValidating=o=>{if(o){let r=De(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),a=this.fieldEntities.map(n=>{let s=n.getNamePath();return s?this.getFieldData(s):null}).filter(n=>n!==null);this.callbacks.onFieldsChange([r],a)}};resetFields=o=>{let r=o?.map(De)||this.fieldEntities.map(a=>a.getNamePath()).filter(a=>!!a&&a.length>0);r.forEach(a=>{let n=tt(this.initialValues,a);this.store=fo(this.store,a,n);let s=this.getFieldEntity(a);s&&s.setErrors([])}),r.forEach(a=>{this.notify(a)})};setFieldValue=(o,r)=>{let a=De(o);tt(this.store,a)!==r&&(this.store=fo(this.store,a,r),this.notify(a),this.callbacks.onValuesChange&&this.callbacks.onValuesChange({[a.join(".")]:r},this.store))};setFields=o=>{o.forEach(r=>{let{name:a,value:n,errors:s}=r,i=De(a);if(n!==void 0&&(this.store=fo(this.store,i,n)),s!==void 0){let l=this.getFieldEntity(i);l&&l.setErrors(s)}this.notify(i)}),this.callbacks.onValuesChange&&o.forEach(({value:r})=>{r!==void 0&&this.callbacks.onValuesChange?.(this.store,this.store)})};setFieldsValue=o=>{let r=(a,n=[])=>{a&&typeof a=="object"&&!Array.isArray(a)?Object.keys(a).forEach(s=>{r(a[s],[...n,s])}):n.length>0&&(this.store=fo(this.store,n,a),this.notify(n))};r(o),this.callbacks.onValuesChange&&this.callbacks.onValuesChange(o,this.store)};registerField=o=>{this.fieldEntities.push(o);let r=o.getNamePath(),a=tt(this.initialValues,r),n=tt(this.store,r);return r.length>0&&a!==void 0&&n===void 0&&(this.store=fo(this.store,r,a)),()=>{this.fieldEntities=this.fieldEntities.filter(s=>s!==o)}};registerWatch=o=>(this.watchList.push(o),()=>{this.watchList=this.watchList.filter(r=>r!==o)});notify=o=>{this.fieldEntities.forEach(r=>{let{dependencies:a}=r.props,n=r.getNamePath();ut(n,o)?r.onStoreChange():a&&a.some(i=>{let l=De(i);return ut(l,o)||o.length>l.length&&ut(o.slice(0,l.length),l)})&&r.isFieldTouched()&&r.validateRules()}),this.watchList.forEach(r=>r(o))};getFieldEntity=o=>this.fieldEntities.find(r=>ut(r.getNamePath(),o));setCallbacks=o=>{this.callbacks={...this.callbacks,...o}};validateFields=async o=>{let r=this.getFieldsValue(),a=[];if(this.fieldEntities.forEach(d=>{let c=d.getNamePath();c.length&&(!o||Ai(o,c))&&a.push(d.validateRules())}),!(await Promise.all(a)).some(d=>Array.isArray(d)&&d.length>0))return r;let i=this.fieldEntities.map(d=>{let c=d.getNamePath();if(!c.length)return null;let m=d.getErrors();return m.length>0?{name:c,errors:m}:null}).filter(d=>d!==null);throw{values:r,errorFields:i,outOfDate:!1}};setInitialValues=(o,r)=>{this.initialValues=o||{},r&&(this.store={...this.initialValues},this.fieldEntities.forEach(a=>{a.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 wn=(0,St.createContext)(null),Ir=()=>(0,St.useContext)(wn),Nr=e=>{let[,o]=St.default.useState({}),[r]=St.default.useState(()=>new Rr(o));return[(0,St.useMemo)(()=>e||{getFieldValue:n=>r.getFieldValue(n),setFieldValue:(n,s)=>r.setFieldValue(n,s),validateFields:n=>r.validateFields(n),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])]};var Ki=K(require("@emotion/styled"));var Yi=Ki.default.form`
|
|
1758
|
+
&.compass-form-horizontal {
|
|
1759
|
+
.compass-form-item {
|
|
1760
|
+
display: flex;
|
|
1761
|
+
flex-direction: row;
|
|
1762
|
+
align-items: flex-start;
|
|
1763
|
+
|
|
1764
|
+
.compass-form-item-label {
|
|
1765
|
+
flex: 0 0 auto;
|
|
1766
|
+
margin-right: ${t("spacing.md","16px")};
|
|
1767
|
+
margin-bottom: 0;
|
|
1768
|
+
padding-top: 5px;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
> *:not(.compass-form-item-label) {
|
|
1772
|
+
flex: 1;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
&.compass-form-vertical {
|
|
1778
|
+
.compass-form-item {
|
|
1779
|
+
display: flex;
|
|
1780
|
+
flex-direction: column;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
&.compass-form-inline {
|
|
1785
|
+
display: flex;
|
|
1786
|
+
flex-wrap: wrap;
|
|
1787
|
+
gap: ${t("spacing.md","16px")};
|
|
1788
|
+
|
|
1789
|
+
.compass-form-item {
|
|
1790
|
+
display: inline-flex;
|
|
1791
|
+
flex-direction: row;
|
|
1792
|
+
align-items: center;
|
|
1793
|
+
margin-bottom: 0;
|
|
1794
|
+
|
|
1795
|
+
.compass-form-item-label {
|
|
1796
|
+
margin-right: ${t("spacing.sm","8px")};
|
|
1797
|
+
margin-bottom: 0;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
`;var Pn=require("react/jsx-runtime"),Tn=Ft.default.forwardRef(({form:e,layout:o="vertical",initialValues:r,children:a,onFinish:n,onFinishFailed:s,onValuesChange:i,onFieldsChange:l,className:d,style:c,classNames:m,styles:f},x)=>{let[b]=Nr(e),y=b.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS"),w=(0,Ft.useRef)(!1);return(0,Ft.useLayoutEffect)(()=>{!w.current&&r&&y&&(y.setInitialValues(r,!0),w.current=!0)},[r,y]),(0,Ft.useEffect)(()=>{y&&y.setCallbacks({onFinish:n,onFinishFailed:s,onValuesChange:i,onFieldsChange:l})},[n,s,i,l,y]),(0,Pn.jsx)(wn.Provider,{value:{...b,classNames:m,styles:f},children:(0,Pn.jsx)(Yi,{ref:x,className:`compass-form compass-form--${o} ${d||""} ${m?.form||""}`,style:{...c,...f?.form},onSubmit:g=>{g.preventDefault(),g.stopPropagation(),b.submit()},children:a})})});Tn.displayName="Form";var ge=require("react"),Gi=K(require("async-validator"));var zo=K(require("@emotion/styled"));var Mn=zo.default.div`
|
|
1802
|
+
margin-bottom: ${t("spacing.lg","24px")};
|
|
1599
1803
|
position: relative;
|
|
1600
1804
|
display: flex;
|
|
1601
1805
|
flex-direction: column;
|
|
1602
1806
|
width: fit-content;
|
|
1603
|
-
`,
|
|
1807
|
+
`,Rn=zo.default.label`
|
|
1604
1808
|
display: block;
|
|
1605
|
-
margin-bottom: ${(
|
|
1606
|
-
font-size: ${(
|
|
1607
|
-
color: ${(
|
|
1608
|
-
`,
|
|
1609
|
-
color: ${(
|
|
1610
|
-
font-size: ${(
|
|
1611
|
-
margin-top: ${({theme:e})=>m(e,"form").errorMarginTop};
|
|
1809
|
+
margin-bottom: ${t("components.form.labelMarginBottom",t("spacing.xs","8px"))};
|
|
1810
|
+
font-size: ${t("components.form.labelFontSize",t("fontSize.md","14px"))};
|
|
1811
|
+
color: ${t("components.form.labelColor",t("colors.text","rgba(0, 0, 0, 0.88)"))};
|
|
1812
|
+
`,_i=zo.default.div`
|
|
1813
|
+
color: ${t("components.form.errorColor",t("colors.error","#ff4d4f"))};
|
|
1814
|
+
font-size: ${t("components.form.errorFontSize",t("fontSize.sm","12px"))};
|
|
1612
1815
|
margin-bottom: 0;
|
|
1613
|
-
min-height: ${(
|
|
1816
|
+
min-height: ${t("spacing.lg","24px")};
|
|
1614
1817
|
width: 0;
|
|
1615
1818
|
min-width: 100%;
|
|
1616
1819
|
overflow-wrap: break-word;
|
|
1617
|
-
word-break: break-
|
|
1820
|
+
word-break: break-all;
|
|
1618
1821
|
white-space: pre-wrap;
|
|
1619
|
-
|
|
1822
|
+
`,ji=zo.default.div`
|
|
1823
|
+
margin-bottom: calc(-1 * ${t("spacing.lg","24px")});
|
|
1824
|
+
`;var it=require("react/jsx-runtime"),In=e=>{let{name:o,label:r,rules:a=[],children:n,validateTrigger:s="onChange",className:i,style:l,help:d}=e,c=Ir(),{classNames:m,styles:f}=c||{},[x,b]=(0,ge.useState)([]),[y,w]=(0,ge.useState)(!1),g=(0,ge.useRef)(x),u=(0,ge.useRef)(y),p=(0,ge.useMemo)(()=>De(o||[]),[o]);(0,ge.useEffect)(()=>{g.current=x,u.current=y,o&&c&&c.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.notifyFieldChange(p)},[x,y,o,p,c]);let[,P]=(0,ge.useState)({}),v=(0,ge.useCallback)(()=>{P({})},[]),C=(0,ge.useCallback)(async(h={})=>{if(!o||!a||a.length===0)return null;let I=("triggerName"in h,c?.getFieldValue(p)),H=p.join("."),O={[H]:a},U=new Gi.default(O);w(!0);try{return await U.validate({[H]:I},{suppressWarning:!0}),b([]),null}catch(A){if(A&&typeof A=="object"&&"errors"in A){let Q=A.errors.map(Z=>Z.message||"");return b(Q),Q}return console.error("[FormItem] Validation error:",A),[A instanceof Error?A.message:String(A)]}finally{w(!1)}},[c,o,p,a]),F=(0,ge.useCallback)(()=>g.current,[]),E=(0,ge.useCallback)(()=>p,[p]),T=(0,ge.useCallback)(()=>u.current,[]),W=(0,ge.useCallback)(()=>o&&c?.isFieldTouched(p)||!1,[o,p,c]);if((0,ge.useLayoutEffect)(()=>{if(o&&c){let h=c.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.registerField;return h?.({onStoreChange:v,validateRules:C,getNamePath:E,getErrors:F,isFieldValidating:T,isFieldTouched:W,setErrors:H=>b(H),props:e})}},[o,c,v,C,E,F,T,W,e]),!o||!c)return(0,it.jsxs)(Mn,{className:`compass-form-item ${i||""} ${m?.item||""}`,style:{...l,...f?.item},children:[r&&(0,it.jsx)(Rn,{className:`compass-form-item-label ${m?.label||""}`,style:f?.label,children:r}),n]});let Y=c.getFieldValue(p),R=h=>{let I={...h.props};return I.value=Y===void 0?"":Y,I.name=p.join("."),x.length>0&&(I.status="error"),(Array.isArray(s)?s:[s]).forEach(O=>{let U=I[O];I[O]=(...A)=>{U?.(...A);let Q;if(O==="onChange"){let Z=A[0],S=Z;Z&&typeof Z=="object"&&Z.target&&(S=Z.target.value),Q=S,c.setFieldValue(p,Q),c.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS")?.notifyFieldChange(p)}a.length>0&&C(O==="onChange"?{triggerName:"onChange"}:{})}}),(0,ge.cloneElement)(h,I)},M=d!==void 0?d:x.length>0?x[0]:null,k=!!M;return(0,it.jsxs)(Mn,{className:`compass-form-item ${i||""} ${m?.item||""}`,style:{...l,...f?.item},hasError:k,children:[r&&(0,it.jsx)(Rn,{className:`compass-form-item-label ${m?.label||""}`,style:f?.label,children:r}),R(n),k&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(_i,{className:`compass-form-item-error-message ${m?.error||""}`,style:f?.error,children:M}),(0,it.jsx)(ji,{})]})]})};In.displayName="FormItem";var Dt=require("react");var Ui=(e,o)=>{let r=Ir(),a=o||r,n=(0,Dt.useMemo)(()=>De(e),[e]),s=()=>{if(a){let c=a.getFieldsValue();return tt(c,n)}},[i,l]=(0,Dt.useState)(s),d=(0,Dt.useRef)(i);return d.current=i,(0,Dt.useEffect)(()=>{if(!a)return;let c=a.getInternalHooks("COMPASS_FORM_INTERNAL_HOOKS");if(!c)return;let m=b=>{if(ut(b,n)||n.length>b.length&&ut(n.slice(0,b.length),b)||b.length>n.length&&ut(b.slice(0,n.length),n)){let y=a.getFieldValue(n);l(y)}},f=c.registerWatch(m),x=a.getFieldValue(n);return JSON.stringify(x)!==JSON.stringify(d.current)&&l(x),f},[a,n.join(".")]),i};var Fr=Tn;Fr.Item=In;Fr.useForm=Nr;Fr.useWatch=Ui;var qi=Fr;var je=K(require("react"));var ft=K(require("@emotion/styled"));var Qi=ft.default.div`
|
|
1620
1825
|
display: flex;
|
|
1621
|
-
flex-direction: ${({$
|
|
1826
|
+
flex-direction: ${({$tabBarPosition:e})=>e==="left"||e==="right"?"row":"column"};
|
|
1622
1827
|
width: 100%;
|
|
1623
1828
|
overflow: hidden;
|
|
1624
1829
|
|
|
1625
|
-
${({$
|
|
1830
|
+
${({$tabBarPosition:e})=>e==="bottom"&&`
|
|
1626
1831
|
flex-direction: column-reverse;
|
|
1627
1832
|
`}
|
|
1628
1833
|
|
|
1629
|
-
${({$
|
|
1834
|
+
${({$tabBarPosition:e})=>e==="right"&&`
|
|
1630
1835
|
flex-direction: row-reverse;
|
|
1631
1836
|
`}
|
|
1632
|
-
`,
|
|
1837
|
+
`,Ji=ft.default.div`
|
|
1633
1838
|
display: flex;
|
|
1634
1839
|
flex: none;
|
|
1635
1840
|
position: relative;
|
|
1636
1841
|
|
|
1637
|
-
${({$tabPosition:e,$type:
|
|
1842
|
+
${({$tabPosition:e,$type:o})=>{let r=t("components.tabs.tabBarBorderColor","#f0f0f0"),n=`${t("components.tabs.tabBarBorderWidth","1px")} solid ${r}`;return o!=="line"?`
|
|
1638
1843
|
border-bottom: none;
|
|
1639
1844
|
border-top: none;
|
|
1640
1845
|
border-right: none;
|
|
1641
1846
|
border-left: none;
|
|
1642
|
-
`:e==="top"||!e?`border-bottom: ${
|
|
1847
|
+
`:e==="top"||!e?`border-bottom: ${n};`:e==="bottom"?`border-top: ${n};`:e==="left"?`border-right: ${n};`:e==="right"?`border-left: ${n};`:""}}
|
|
1643
1848
|
|
|
1644
|
-
margin-bottom: ${({$
|
|
1645
|
-
margin-top: ${({$
|
|
1646
|
-
margin-right: ${({$
|
|
1647
|
-
margin-left: ${({$
|
|
1849
|
+
margin-bottom: ${({$tabBarPosition:e})=>e==="top"||!e?"16px":"0"};
|
|
1850
|
+
margin-top: ${({$tabBarPosition:e})=>e==="bottom"?"16px":"0"};
|
|
1851
|
+
margin-right: ${({$tabBarPosition:e})=>e==="left"?"16px":"0"};
|
|
1852
|
+
margin-left: ${({$tabBarPosition:e})=>e==="right"?"16px":"0"};
|
|
1648
1853
|
|
|
1649
|
-
background-color: ${(
|
|
1854
|
+
background-color: ${()=>t("components.tabs.tabBarBackgroundColor","#ffffff")};
|
|
1650
1855
|
|
|
1651
1856
|
${({$tabPosition:e})=>(e==="left"||e==="right")&&`
|
|
1652
1857
|
flex-direction: column;
|
|
@@ -1658,7 +1863,7 @@
|
|
|
1658
1863
|
width: 100%;
|
|
1659
1864
|
overflow: hidden;
|
|
1660
1865
|
`}
|
|
1661
|
-
`,
|
|
1866
|
+
`,Xi=ft.default.div`
|
|
1662
1867
|
display: flex;
|
|
1663
1868
|
flex: auto;
|
|
1664
1869
|
align-self: flex-start;
|
|
@@ -1688,7 +1893,7 @@
|
|
|
1688
1893
|
&::-webkit-scrollbar-track {
|
|
1689
1894
|
background-color: transparent;
|
|
1690
1895
|
}
|
|
1691
|
-
`,
|
|
1896
|
+
`,Zi=ft.default.div`
|
|
1692
1897
|
display: flex;
|
|
1693
1898
|
position: relative;
|
|
1694
1899
|
transition: transform 0.3s;
|
|
@@ -1696,39 +1901,39 @@
|
|
|
1696
1901
|
flex-direction: column;
|
|
1697
1902
|
width: 100%;
|
|
1698
1903
|
`}
|
|
1699
|
-
`,
|
|
1904
|
+
`,el=ft.default.div`
|
|
1700
1905
|
position: relative;
|
|
1701
1906
|
display: inline-flex;
|
|
1702
1907
|
align-items: center;
|
|
1703
1908
|
|
|
1704
|
-
${({
|
|
1705
|
-
margin: ${
|
|
1909
|
+
${({$position:e})=>{let o=t("components.tabs.tabItemPadding","12px 16px"),r=t("components.tabs.tabItemVerticalGutter","16px"),a=t("components.tabs.tabItemHorizontalGutter","32px");return`padding: ${o};
|
|
1910
|
+
margin: ${e==="left"||e==="right"?`0 0 ${r} 0`:`0 ${a} 0 0`};`}}
|
|
1706
1911
|
|
|
1707
|
-
font-size: ${({
|
|
1912
|
+
font-size: ${({$size:e})=>{let o=t("components.tabs.tabItemFontSize","14px");return e==="large"?`calc(${o} + 2px)`:e==="small"?`calc(${o} - 2px)`:o}};
|
|
1708
1913
|
background: transparent;
|
|
1709
1914
|
border: 0;
|
|
1710
1915
|
outline: none;
|
|
1711
1916
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1712
1917
|
|
|
1713
|
-
${({
|
|
1918
|
+
${({$active:e,$disabled:o})=>o?`color: ${t("components.tabs.tabItemDisabledColor",t("colors.textDisabled","#ccc"))};`:e?`color: ${t("components.tabs.tabItemActiveColor",t("colors.primary","#1890ff"))};`:`color: ${t("components.tabs.tabItemColor",t("colors.text","#333"))};`}
|
|
1714
1919
|
|
|
1715
|
-
font-weight: ${(
|
|
1920
|
+
font-weight: ${()=>t("fontWeight.normal","400")};
|
|
1716
1921
|
transition: all 0.3s;
|
|
1717
1922
|
|
|
1718
1923
|
&:hover {
|
|
1719
|
-
${({
|
|
1924
|
+
${({$disabled:e})=>e?"":`color: ${t("components.tabs.tabItemHoverColor",t("colors.primaryHover","#40a9ff"))};`}
|
|
1720
1925
|
}
|
|
1721
1926
|
|
|
1722
|
-
${({$type:e,$active:
|
|
1927
|
+
${({$type:e,$active:o})=>{if(e!=="card"&&e!=="editable-card")return"";let r=t("colors.border","#d9d9d9");return`
|
|
1723
1928
|
margin: 0 2px 0 0;
|
|
1724
1929
|
padding: 8px 16px;
|
|
1725
|
-
background: ${
|
|
1726
|
-
border: 1px solid ${
|
|
1727
|
-
border-bottom: ${
|
|
1930
|
+
background: ${o?"#ffffff":"#fafafa"};
|
|
1931
|
+
border: 1px solid ${r};
|
|
1932
|
+
border-bottom: ${o?"1px solid #ffffff":`1px solid ${r}`};
|
|
1728
1933
|
border-radius: 4px 4px 0 0;
|
|
1729
1934
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
1730
1935
|
`}}
|
|
1731
|
-
`,
|
|
1936
|
+
`,tl=ft.default.span`
|
|
1732
1937
|
display: inline-flex;
|
|
1733
1938
|
align-items: center;
|
|
1734
1939
|
justify-content: center;
|
|
@@ -1738,16 +1943,16 @@
|
|
|
1738
1943
|
height: 16px;
|
|
1739
1944
|
line-height: 0;
|
|
1740
1945
|
border-radius: 50%;
|
|
1741
|
-
color: ${(
|
|
1946
|
+
color: ${()=>t("colors.textSecondary","#999")};
|
|
1742
1947
|
transition: all 0.2s;
|
|
1743
1948
|
|
|
1744
1949
|
&:hover {
|
|
1745
1950
|
background-color: rgba(0, 0, 0, 0.06);
|
|
1746
|
-
color: ${(
|
|
1951
|
+
color: ${()=>t("colors.text","#333")};
|
|
1747
1952
|
}
|
|
1748
|
-
`,
|
|
1953
|
+
`,ol=ft.default.div`
|
|
1749
1954
|
position: absolute;
|
|
1750
|
-
background: ${(
|
|
1955
|
+
background: ${()=>t("components.tabs.inkBarColor",t("colors.primary","#1890ff"))};
|
|
1751
1956
|
pointer-events: none;
|
|
1752
1957
|
transition:
|
|
1753
1958
|
width 0.3s,
|
|
@@ -1757,26 +1962,26 @@
|
|
|
1757
1962
|
|
|
1758
1963
|
display: ${({$type:e})=>e==="line"?"block":"none"};
|
|
1759
1964
|
|
|
1760
|
-
${({$position:e,$left:
|
|
1965
|
+
${({$position:e,$left:o,$width:r,$top:a,$height:n})=>{let s=t("components.tabs.inkBarHeight","2px");return e==="left"||e==="right"?`
|
|
1761
1966
|
width: ${s};
|
|
1762
|
-
height: ${
|
|
1763
|
-
top: ${
|
|
1967
|
+
height: ${n}px;
|
|
1968
|
+
top: ${a}px;
|
|
1764
1969
|
${e==="left"?"right: 0;":"left: 0;"}
|
|
1765
1970
|
`:`
|
|
1766
1971
|
height: ${s};
|
|
1767
|
-
width: ${
|
|
1768
|
-
left: ${
|
|
1972
|
+
width: ${r}px;
|
|
1973
|
+
left: ${o}px;
|
|
1769
1974
|
${e==="bottom"?"top: 0;":"bottom: 0;"}
|
|
1770
1975
|
`}}
|
|
1771
|
-
`,
|
|
1976
|
+
`,rl=ft.default.div`
|
|
1772
1977
|
display: flex;
|
|
1773
1978
|
flex: auto;
|
|
1774
1979
|
flex-direction: column;
|
|
1775
1980
|
min-width: 0;
|
|
1776
1981
|
min-height: 0;
|
|
1777
|
-
`,
|
|
1982
|
+
`,Dr=ft.default.div`
|
|
1778
1983
|
flex: none;
|
|
1779
1984
|
width: 100%;
|
|
1780
1985
|
outline: none;
|
|
1781
1986
|
display: ${({$active:e})=>e?"block":"none"};
|
|
1782
|
-
`;var
|
|
1987
|
+
`;var nl=K(require("react"));var sl=require("react/jsx-runtime"),al=nl.default.forwardRef(({children:e,active:o=!1,className:r,style:a,...n},s)=>(0,sl.jsx)(Dr,{ref:s,$active:o,className:r,style:a,role:"tabpanel","aria-hidden":!o,...n,children:e}));al.displayName="TabPane";var Nn=al;var Oe=require("react/jsx-runtime"),Fn=je.default.forwardRef(({activeKey:e,defaultActiveKey:o,onChange:r,onEdit:a,items:n,tabBarExtraContent:s,tabPosition:i="top",tabBarPosition:l,type:d="line",size:c="default",children:m,className:f,style:x,styles:b,classNames:y,...w},g)=>{let u=l||i,p=je.default.useMemo(()=>{if(n)return n;if(m){let M=[];return je.default.Children.forEach(m,k=>{je.default.isValidElement(k)&&k.type===Nn&&M.push({key:k.key,label:k.props.tab,children:k.props.children,disabled:k.props.disabled,...k.props})}),M}return[]},[n,m]),[P,v]=(0,je.useState)(()=>e!==void 0?e:o!==void 0?o:p.length>0?p[0].key:""),C=e!==void 0?e:P,[F,E]=(0,je.useState)({left:0,width:0,top:0,height:0}),T=(0,je.useRef)(null),W=je.default.useCallback(()=>{if(!T.current)return;let M=T.current.querySelector(`[data-key="${C}"]`);M&&E({left:M.offsetLeft,width:M.offsetWidth,top:M.offsetTop,height:M.offsetHeight})},[C]);(0,je.useEffect)(()=>{W()},[W,i,p.length]);let Y=(M,k)=>{k||(e===void 0&&v(M),r?.(M))},R=(M,k,h)=>{M.stopPropagation(),a?.(k,h)};return(0,Oe.jsxs)(Qi,{ref:g,$tabPosition:i,$tabBarPosition:u,className:`compass-tabs compass-tabs--${i} compass-tabs--${c} ${f||""} ${y?.root||""}`,style:{...x,...b?.root},...w,children:[(0,Oe.jsxs)(Ji,{$tabPosition:i,$tabBarPosition:u,$type:d,className:`compass-tabs-nav ${y?.nav||""}`,style:b?.nav,children:[(0,Oe.jsx)(Xi,{$tabPosition:i,className:"compass-tabs-nav-wrap",children:(0,Oe.jsxs)(Zi,{ref:T,$tabPosition:i,className:"compass-tabs-nav-list",children:[p.map(M=>(0,Oe.jsxs)(el,{"data-key":M.key,$active:C===M.key,$disabled:M.disabled,$size:c,$position:i,$type:d,onClick:()=>Y(M.key,M.disabled),role:"tab","aria-selected":C===M.key,"aria-disabled":M.disabled,className:`compass-tabs-tab ${C===M.key?"compass-tabs-tab-active":""} ${M.disabled?"compass-tabs-tab-disabled":""}`,children:[M.icon&&(0,Oe.jsx)("span",{style:{marginRight:8,display:"inline-flex",alignItems:"center"},children:M.icon}),M.label,d==="editable-card"&&M.closable!==!1&&(0,Oe.jsx)(tl,{role:"button","aria-label":"close",onClick:k=>R(k,M.key,"remove"),children:(0,Oe.jsx)(ct,{})})]},M.key)),(0,Oe.jsx)(ol,{$left:F.left,$width:F.width,$top:F.top,$height:F.height,$position:i,$type:d,className:`compass-tabs-ink-bar ${y?.inkBar||""}`,style:b?.inkBar})]})}),s&&(0,Oe.jsx)("div",{style:{marginLeft:"auto"},children:s})]}),(0,Oe.jsx)(rl,{className:`compass-tabs-content ${y?.content||""}`,style:b?.content,children:p.map(M=>(0,Oe.jsx)(Dr,{$active:C===M.key,role:"tabpanel",className:`compass-tabs-tabpane ${C===M.key?"compass-tabs-tabpane-active":""}`,children:M.children},M.key))})]})});Fn.displayName="Tabs";Fn.TabPane=Nn;var il=Fn;var ll=il;0&&(module.exports={AutoComplete,Button,ConfigProvider,DatePicker,Dropdown,Form,InputField,InputNumber,Menu,Message,Modal,Pagination,Progress,Select,Steps,Table,Tabs,Tree,TreeSelect});
|