@xinghunm/compass-ui 0.1.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/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/index.d.mts +1154 -0
- package/dist/index.d.ts +1154 -0
- package/dist/index.js +1468 -0
- package/dist/index.mjs +1468 -0
- package/package.json +81 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1468 @@
|
|
|
1
|
+
import xs from"react";import Mt from"@emotion/styled";import ps from"react";import{useRef as ds}from"react";import us from"@emotion/styled";import{useRef as ar,useState as ns,forwardRef as as,useImperativeHandle as ss}from"react";import is from"@emotion/styled";import{TransitionGroup as ls}from"react-transition-group";import{useState as er,useRef as Ua}from"react";import tr from"@emotion/styled";import{keyframes as or,css as rr}from"@emotion/react";import{Transition as Xa}from"react-transition-group";import{jsx as co}from"react/jsx-runtime";var Ja=e=>or`
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(0);
|
|
4
|
+
opacity: 0.1;
|
|
5
|
+
}
|
|
6
|
+
100% {
|
|
7
|
+
transform: scale(1);
|
|
8
|
+
opacity: ${e};
|
|
9
|
+
}
|
|
10
|
+
`,Za=or`
|
|
11
|
+
0% {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
100% {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
`,es=(e,t)=>{let o=t||.3;return rr`
|
|
18
|
+
opacity: ${o};
|
|
19
|
+
transform: scale(1);
|
|
20
|
+
animation: ${Ja(o)} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
+
`},ts=e=>rr`
|
|
22
|
+
opacity: 0;
|
|
23
|
+
animation: ${Za} ${e}ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
24
|
+
`,os=tr.span`
|
|
25
|
+
width: 50;
|
|
26
|
+
height: 50;
|
|
27
|
+
left: 0;
|
|
28
|
+
top: 0;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
position: absolute;
|
|
31
|
+
${e=>e.$visible&&es(e.$duration,e.$opacity)};
|
|
32
|
+
`,rs=tr.span`
|
|
33
|
+
opacity: 1;
|
|
34
|
+
display: block;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
background-color: ${e=>e.$bgColor||"currentColor"};
|
|
39
|
+
${e=>e.$leaving&&ts(e.$duration)};
|
|
40
|
+
`,nr=e=>{let{rippleX:t,rippleY:o,rippleSize:n,bgColor:a,opacity:r,...s}=e,[c,d]=er(!1),[p,u]=er(!1),f=Ua(null),h=()=>{d(!0)},g=()=>{u(!0)},l={width:n,height:n,top:-(n/2)+o,left:-(n/2)+t};return co(Xa,{...s,nodeRef:f,onEnter:h,onExit:g,children:co(os,{ref:f,$visible:c,$opacity:r,style:l,$duration:s.timeout.enter,children:co(rs,{$bgColor:a,$leaving:p,$duration:s.timeout.exit})})})};import{jsx as po}from"react/jsx-runtime";var cs=is.div`
|
|
41
|
+
display: block;
|
|
42
|
+
position: absolute;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
border-radius: inherit;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
left: 0;
|
|
48
|
+
top: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
z-index: 0;
|
|
51
|
+
`,sr=500,uo=as((e,t)=>{let o=ar(0),[n,a]=ns([]),r=ar(null),s=p=>{let{rippleX:u,rippleY:f,rippleSize:h}=p;a([...n,{num:++o.current,timeout:{exit:sr,enter:sr},rippleX:u,rippleY:f,rippleSize:h}])},c=p=>{let u=r.current;if(!u)return;let f=u.getBoundingClientRect(),h=p.clientX,g=p.clientY,l=Math.round(h-f.left),i=Math.round(g-f.top),k=Math.max(Math.abs(u.clientWidth-l),l)*2+2,v=Math.max(Math.abs(u.clientHeight-i),i)*2+2,C=Math.sqrt(k**2+v**2);s({rippleX:l,rippleY:i,rippleSize:C})},d=()=>{n.length&&a(p=>p.slice(1))};return ss(t,()=>({start:c,stop:d})),po(cs,{ref:r,children:po(ls,{component:"span",children:n.map(({num:p,...u})=>po(nr,{...u,...e},p))})})});uo.displayName="TouchRipple";import{jsx as fs,jsxs as gs}from"react/jsx-runtime";var ms=us.button`
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
position: relative;
|
|
56
|
+
outline: none;
|
|
57
|
+
border: 0;
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
background: transparent;
|
|
62
|
+
`,mo=ps.forwardRef((e,t)=>{let{hasRipple:o=!0,className:n,rippleBgColor:a,rippleOpacity:r,children:s,...c}=e,d=ds(),p=f=>{o&&d.current&&d.current.start(f)},u=f=>{o&&d.current&&d.current.stop(f)};return gs(ms,{ref:t,...c,className:n,onMouseLeave:u,onMouseUp:u,onMouseDown:p,children:[s,fs(uo,{ref:d,bgColor:a,opacity:r})]})});mo.displayName="ButtonBase";var ir=Mt(mo)`
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
border: 1px solid transparent;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
user-select: none;
|
|
69
|
+
outline: none;
|
|
70
|
+
font-family: inherit;
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
position: relative;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
font-weight: ${({theme:e})=>e?.fontWeight?.normal||"400"};
|
|
76
|
+
transition: ${({theme:e})=>e?.transitions?.normal||"all 0.3s"};
|
|
77
|
+
|
|
78
|
+
&:focus {
|
|
79
|
+
outline: 2px solid ${({theme:e})=>e?.colors?.primary||"#007bff"};
|
|
80
|
+
outline-offset: 2px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:disabled {
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
opacity: 0.6;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
${({$size:e,$shape:t,theme:o})=>{let n=t==="circle";switch(e){case"small":return`
|
|
89
|
+
height: 24px;
|
|
90
|
+
padding: ${n?"0":o?.components?.button?.padding?.sm||`0 ${o?.spacing?.sm||8}px`};
|
|
91
|
+
font-size: ${o?.components?.button?.fontSize?.sm||`${o?.fontSize?.xs||12}px`};
|
|
92
|
+
border-radius: ${t==="round"?"999px":n?"50%":o?.components?.button?.borderRadius?.sm||`${o?.borderRadius?.sm||4}px`};
|
|
93
|
+
${n?"width: 24px; min-width: 24px;":""}
|
|
94
|
+
`;case"large":return`
|
|
95
|
+
height: 40px;
|
|
96
|
+
padding: ${n?"0":o?.components?.button?.padding?.md||`0 ${o?.spacing?.md||16}px`};
|
|
97
|
+
font-size: ${o?.components?.button?.fontSize?.lg||`${o?.fontSize?.md||16}px`};
|
|
98
|
+
border-radius: ${t==="round"?"999px":n?"50%":o?.components?.button?.borderRadius?.lg||`${o?.borderRadius?.lg||8}px`};
|
|
99
|
+
${n?"width: 40px; min-width: 40px;":""}
|
|
100
|
+
`;default:return`
|
|
101
|
+
height: 32px;
|
|
102
|
+
padding: ${n?"0":o?.components?.button?.padding?.md||`0 ${o?.spacing?.md||16}px`};
|
|
103
|
+
font-size: ${o?.components?.button?.fontSize?.md||`${o?.fontSize?.sm||14}px`};
|
|
104
|
+
border-radius: ${t==="round"?"999px":n?"50%":o?.components?.button?.borderRadius?.md||`${o?.borderRadius?.md||6}px`};
|
|
105
|
+
${n?"width: 32px; min-width: 32px;":""}
|
|
106
|
+
`}}}
|
|
107
|
+
|
|
108
|
+
${({$variant:e,theme:t})=>{switch(e){case"primary":return`
|
|
109
|
+
background-color: ${t?.colors?.primary||"#007bff"};
|
|
110
|
+
border-color: ${t?.colors?.primary||"#007bff"};
|
|
111
|
+
color: #fff;
|
|
112
|
+
|
|
113
|
+
&:hover:not(:disabled) {
|
|
114
|
+
background-color: ${t?.colors?.primaryHover||"#0056b3"};
|
|
115
|
+
border-color: ${t?.colors?.primaryHover||"#0056b3"};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:active:not(:disabled) {
|
|
119
|
+
background-color: ${t?.colors?.primaryActive||"#004085"};
|
|
120
|
+
border-color: ${t?.colors?.primaryActive||"#004085"};
|
|
121
|
+
}
|
|
122
|
+
`;case"dashed":return`
|
|
123
|
+
background-color: ${t?.colors?.background||"#fff"};
|
|
124
|
+
border-color: ${t?.colors?.border||"#d9d9d9"};
|
|
125
|
+
border-style: dashed;
|
|
126
|
+
color: ${t?.colors?.text||"#000"};
|
|
127
|
+
|
|
128
|
+
&:hover:not(:disabled) {
|
|
129
|
+
border-color: ${t?.colors?.borderHover||"#40a9ff"};
|
|
130
|
+
color: ${t?.colors?.borderHover||"#40a9ff"};
|
|
131
|
+
}
|
|
132
|
+
`;case"text":return`
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
border-color: transparent;
|
|
135
|
+
color: ${t?.colors?.text||"#000"};
|
|
136
|
+
|
|
137
|
+
&:hover:not(:disabled) {
|
|
138
|
+
background-color: ${t?.colors?.backgroundTertiary||"rgba(0, 0, 0, 0.018)"};
|
|
139
|
+
}
|
|
140
|
+
`;case"link":return`
|
|
141
|
+
background-color: transparent;
|
|
142
|
+
border-color: transparent;
|
|
143
|
+
color: ${t?.colors?.primary||"#007bff"};
|
|
144
|
+
|
|
145
|
+
&:hover:not(:disabled) {
|
|
146
|
+
color: ${t?.colors?.primaryHover||"#0056b3"};
|
|
147
|
+
}
|
|
148
|
+
`;default:return`
|
|
149
|
+
background-color: ${t?.colors?.background||"#fff"};
|
|
150
|
+
border-color: ${t?.colors?.border||"#d9d9d9"};
|
|
151
|
+
color: ${t?.colors?.text||"#000"};
|
|
152
|
+
|
|
153
|
+
&:hover:not(:disabled) {
|
|
154
|
+
border-color: ${t?.colors?.borderHover||"#40a9ff"};
|
|
155
|
+
color: ${t?.colors?.borderHover||"#40a9ff"};
|
|
156
|
+
}
|
|
157
|
+
`}}}
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
${({$danger:e,$variant:t,theme:o})=>e&&`
|
|
161
|
+
${t==="primary"?`
|
|
162
|
+
background-color: ${o?.colors?.error||"#ff4d4f"};
|
|
163
|
+
border-color: ${o?.colors?.error||"#ff4d4f"};
|
|
164
|
+
|
|
165
|
+
&:hover:not(:disabled) {
|
|
166
|
+
background-color: #ff7875;
|
|
167
|
+
border-color: #ff7875;
|
|
168
|
+
}
|
|
169
|
+
`:`
|
|
170
|
+
border-color: ${o?.colors?.error||"#ff4d4f"};
|
|
171
|
+
color: ${o?.colors?.error||"#ff4d4f"};
|
|
172
|
+
|
|
173
|
+
&:hover:not(:disabled) {
|
|
174
|
+
${t==="text"?`
|
|
175
|
+
background-color: #fff2f0;
|
|
176
|
+
`:`
|
|
177
|
+
background-color: #fff2f0;
|
|
178
|
+
border-color: #ff7875;
|
|
179
|
+
`}
|
|
180
|
+
color: #ff7875;
|
|
181
|
+
}
|
|
182
|
+
`}
|
|
183
|
+
`}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
${({$loading:e})=>e&&`
|
|
187
|
+
pointer-events: none;
|
|
188
|
+
`}
|
|
189
|
+
|
|
190
|
+
${({$block:e})=>e&&"width: 100%;"}
|
|
191
|
+
`,lr=Mt.span`
|
|
192
|
+
display: inline-flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
|
|
195
|
+
${({$hasText:e})=>e&&"margin-right: 4px;"}
|
|
196
|
+
`,cr=Mt.span`
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
line-height: 1;
|
|
200
|
+
`,pr=Mt.span`
|
|
201
|
+
display: inline-block;
|
|
202
|
+
width: 14px;
|
|
203
|
+
height: 14px;
|
|
204
|
+
border: 2px solid transparent;
|
|
205
|
+
border-top-color: currentColor;
|
|
206
|
+
border-radius: 50%;
|
|
207
|
+
animation: spin 1s linear infinite;
|
|
208
|
+
|
|
209
|
+
@keyframes spin {
|
|
210
|
+
0% {
|
|
211
|
+
transform: rotate(0deg);
|
|
212
|
+
}
|
|
213
|
+
100% {
|
|
214
|
+
transform: rotate(360deg);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`;import{jsx as fo,jsxs as ys}from"react/jsx-runtime";var dr=xs.forwardRef(({children:e,variant:t="default",size:o="default",shape:n="default",disabled:a=!1,loading:r=!1,danger:s=!1,block:c=!1,icon:d,onClick:p,className:u,style:f,...h},g)=>{let l=i=>{r||a||p?.(i)};return fo(ir,{ref:g,className:`compass-button compass-button--${t} ${u||""}`,style:f,$variant:t,$size:o,$shape:n,$danger:s,$loading:r,$block:c,disabled:a||r,onClick:l,...h,children:ys(cr,{$loading:r,children:[(r||d)&&fo(lr,{$hasText:!!e,children:r?fo(pr,{"aria-hidden":!0}):d}),e]})})});dr.displayName="Button";var ur=dr;var le=ur;import Dr from"react";import Te from"@emotion/styled";var ne={colors:{primary:"#1890ff",primaryHover:"#40a9ff",primaryActive:"#096dd9",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",border:"#d9d9d9",borderSecondary:"#f0f0f0",borderHover:"#4096ff"},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"}},message:{contentPadding:"8px 16px",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",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"}}}};var m=(e,t)=>e?.components?.[t]||ne.components[t],y=(e,t)=>e?.[t]||ne[t];var mr=Te.div`
|
|
218
|
+
display: flex;
|
|
219
|
+
width: 100%;
|
|
220
|
+
height: ${e=>e.direction==="vertical"?"100%":"auto"};
|
|
221
|
+
font-size: 0;
|
|
222
|
+
text-align: initial;
|
|
223
|
+
flex-direction: ${e=>e.direction==="vertical"?"column":"row"};
|
|
224
|
+
`,fr=Te.div`
|
|
225
|
+
position: relative;
|
|
226
|
+
display: inline-block;
|
|
227
|
+
flex: 1;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
vertical-align: top;
|
|
230
|
+
margin-right: 16px;
|
|
231
|
+
white-space: nowrap;
|
|
232
|
+
cursor: ${e=>e.clickable&&!e.disabled?"pointer":"default"};
|
|
233
|
+
opacity: ${e=>e.disabled?.5:1};
|
|
234
|
+
|
|
235
|
+
&:last-child {
|
|
236
|
+
flex: none;
|
|
237
|
+
margin-right: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
${e=>{let t=m(e.theme,"steps"),o=y(e.theme,"colors"),n=t.iconSize,a=t.dotSize;return e.direction==="horizontal"&&e.labelPlacement==="vertical"&&`
|
|
241
|
+
text-align: center;
|
|
242
|
+
overflow: visible;
|
|
243
|
+
margin-right: 0;
|
|
244
|
+
|
|
245
|
+
&:last-child {
|
|
246
|
+
flex: 1;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
& .compass-steps-icon {
|
|
250
|
+
margin-left: 0;
|
|
251
|
+
margin-right: 0;
|
|
252
|
+
display: inline-flex;
|
|
253
|
+
position: relative;
|
|
254
|
+
z-index: 1;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
& .compass-steps-content {
|
|
258
|
+
display: block;
|
|
259
|
+
margin-top: 4px;
|
|
260
|
+
text-align: center;
|
|
261
|
+
width: 100%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
& .compass-steps-title {
|
|
265
|
+
padding-right: 0;
|
|
266
|
+
display: block;
|
|
267
|
+
text-align: center;
|
|
268
|
+
|
|
269
|
+
&::after {
|
|
270
|
+
display: none;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&::after {
|
|
275
|
+
position: absolute;
|
|
276
|
+
top: 16px;
|
|
277
|
+
left: 50%;
|
|
278
|
+
display: block;
|
|
279
|
+
width: calc(100% - ${e.variant==="dot"?a:n} - 16px);
|
|
280
|
+
height: 1px;
|
|
281
|
+
background: ${o.border};
|
|
282
|
+
content: '';
|
|
283
|
+
margin-left: calc(${e.variant==="dot"?a:n} / 2 + 8px);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&:last-child::after {
|
|
287
|
+
display: none;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
& .compass-steps-subtitle {
|
|
291
|
+
display: block;
|
|
292
|
+
margin-left: 0;
|
|
293
|
+
margin-top: 2px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
& .compass-steps-description {
|
|
297
|
+
margin: 2px auto 0;
|
|
298
|
+
}
|
|
299
|
+
`}}
|
|
300
|
+
${e=>e.direction==="vertical"&&`
|
|
301
|
+
display: block;
|
|
302
|
+
flex: 1;
|
|
303
|
+
overflow: visible;
|
|
304
|
+
margin-right: 0;
|
|
305
|
+
padding-bottom: 0;
|
|
306
|
+
`}
|
|
307
|
+
`,gr=Te.div`
|
|
308
|
+
position: relative;
|
|
309
|
+
z-index: 1;
|
|
310
|
+
box-sizing: border-box;
|
|
311
|
+
display: inline-flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: center;
|
|
314
|
+
width: ${e=>{let t=m(e.theme,"steps");return e.variant==="dot"?t.dotSize:t.iconSize}};
|
|
315
|
+
height: ${e=>{let t=m(e.theme,"steps");return e.variant==="dot"?t.dotSize:t.iconSize}};
|
|
316
|
+
margin-right: 8px;
|
|
317
|
+
margin-top: ${e=>{let t=m(e.theme,"steps");return`calc((32px - ${e.variant==="dot"?t.dotSize:t.iconSize}) / 2)`}};
|
|
318
|
+
font-size: ${e=>m(e.theme,"steps").titleFontSize};
|
|
319
|
+
line-height: 1;
|
|
320
|
+
text-align: center;
|
|
321
|
+
border: 1px solid;
|
|
322
|
+
border-radius: ${e=>{let t=m(e.theme,"steps");return e.variant==="dot"?t.dotSize:t.iconSize}};
|
|
323
|
+
transition:
|
|
324
|
+
background-color 0.3s,
|
|
325
|
+
border-color 0.3s;
|
|
326
|
+
|
|
327
|
+
& > span {
|
|
328
|
+
display: flex;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
${e=>{let t=m(e.theme,"steps"),o=y(e.theme,"colors");switch(e.status){case"process":return`
|
|
332
|
+
background-color: ${t.processIconColor};
|
|
333
|
+
border-color: ${t.processIconColor};
|
|
334
|
+
color: #fff;
|
|
335
|
+
`;case"wait":return`
|
|
336
|
+
background-color: ${o.background};
|
|
337
|
+
border-color: ${t.waitIconColor};
|
|
338
|
+
color: ${t.waitIconColor};
|
|
339
|
+
`;case"finish":return`
|
|
340
|
+
background-color: ${o.background};
|
|
341
|
+
border-color: ${t.finishIconColor};
|
|
342
|
+
color: ${t.finishIconColor};
|
|
343
|
+
`;case"error":return`
|
|
344
|
+
background-color: ${o.background};
|
|
345
|
+
border-color: ${t.errorIconColor};
|
|
346
|
+
color: ${t.errorIconColor};
|
|
347
|
+
`;default:return""}}}
|
|
348
|
+
`,xr=Te.div`
|
|
349
|
+
display: inline-block;
|
|
350
|
+
vertical-align: top;
|
|
351
|
+
`,yr=Te.div`
|
|
352
|
+
position: relative;
|
|
353
|
+
display: inline-block;
|
|
354
|
+
padding-right: 16px;
|
|
355
|
+
color: ${e=>{let t=m(e.theme,"steps");switch(e.status){case"process":return t.processTitleColor;case"wait":return t.waitTitleColor;case"finish":return t.finishTitleColor;case"error":return t.errorTitleColor;default:return t.titleColor}}};
|
|
356
|
+
font-size: ${e=>m(e.theme,"steps").titleFontSize};
|
|
357
|
+
line-height: 32px;
|
|
358
|
+
|
|
359
|
+
&::after {
|
|
360
|
+
position: absolute;
|
|
361
|
+
top: 16px;
|
|
362
|
+
left: 100%;
|
|
363
|
+
display: ${e=>e.isLast||e.direction==="vertical"?"none":"block"};
|
|
364
|
+
width: 9999px;
|
|
365
|
+
height: 1px;
|
|
366
|
+
background: ${e=>y(e.theme,"colors").borderSecondary};
|
|
367
|
+
content: '';
|
|
368
|
+
}
|
|
369
|
+
`,hr=Te.div`
|
|
370
|
+
display: inline;
|
|
371
|
+
margin-left: 8px;
|
|
372
|
+
color: ${e=>m(e.theme,"steps").subTitleColor};
|
|
373
|
+
font-weight: normal;
|
|
374
|
+
font-size: 14px;
|
|
375
|
+
`,br=Te.div`
|
|
376
|
+
color: ${e=>{let t=m(e.theme,"steps");switch(e.status){case"process":return t.processDescriptionColor;case"wait":return t.waitDescriptionColor;case"finish":return t.finishDescriptionColor;case"error":return t.errorDescriptionColor;default:return t.descriptionColor}}};
|
|
377
|
+
font-size: ${e=>m(e.theme,"steps").descriptionFontSize};
|
|
378
|
+
`,vr=Te.div`
|
|
379
|
+
display: ${e=>e.direction==="vertical"&&!e.isLast?"block":"none"};
|
|
380
|
+
position: absolute;
|
|
381
|
+
top: ${e=>{let t=m(e.theme,"steps");return`calc((32px + ${e.variant==="dot"?t.dotSize:t.iconSize}) / 2 + 6px)`}};
|
|
382
|
+
bottom: 6px;
|
|
383
|
+
left: ${e=>{let t=m(e.theme,"steps");return`calc(${e.variant==="dot"?t.dotSize:t.iconSize} / 2)`}};
|
|
384
|
+
width: 1px;
|
|
385
|
+
padding: 0;
|
|
386
|
+
margin-left: 0;
|
|
387
|
+
transform: translateX(-50%);
|
|
388
|
+
|
|
389
|
+
&::after {
|
|
390
|
+
display: inline-block;
|
|
391
|
+
width: 1px;
|
|
392
|
+
height: 100%;
|
|
393
|
+
background: ${e=>y(e.theme,"colors").borderSecondary};
|
|
394
|
+
border-radius: 1px;
|
|
395
|
+
transition: background 0.3s;
|
|
396
|
+
content: '';
|
|
397
|
+
}
|
|
398
|
+
`;import{jsx as b,jsxs as go}from"react/jsx-runtime";var Sr=()=>b("span",{role:"img","aria-label":"caret-right",className:"compass-icon compass-icon-caret-right",children:b("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Re=()=>b("span",{role:"img","aria-label":"info",className:"compass-icon compass-icon-info-circle",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"info-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Ge=()=>b("span",{role:"img","aria-label":"success",className:"compass-icon compass-icon-check-circle",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Qe=()=>b("span",{role:"img","aria-label":"error",className:"compass-icon compass-icon-close-circle",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Ue=()=>b("span",{role:"img","aria-label":"warning",className:"compass-icon compass-icon-exclamation-circle",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Tt=()=>b("span",{role:"img","aria-label":"loading",className:"compass-icon compass-icon-loading",children:b("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Xe=()=>b("span",{role:"img","aria-label":"close",className:"compass-icon compass-icon-close",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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 Cr=()=>b("span",{role:"img","aria-label":"eye",className:"compass-icon compass-icon-eye",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"eye",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"})})}),kr=()=>b("span",{role:"img","aria-label":"eye-invisible",className:"compass-icon compass-icon-eye-invisible",children:go("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"eye-invisible",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[b("path",{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}),b("path",{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"})]})}),wr=()=>b("span",{role:"img","aria-label":"search",className:"compass-icon compass-icon-search",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"search",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),De=()=>b("span",{role:"img","aria-label":"close-circle",className:"compass-icon compass-icon-close-circle",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Rt=()=>b("span",{role:"img","aria-label":"check",className:"compass-icon compass-icon-check",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Le=()=>b("span",{role:"img","aria-label":"left",className:"compass-icon compass-icon-left",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Oe=()=>b("span",{role:"img","aria-label":"right",className:"compass-icon compass-icon-right",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Ie=()=>b("span",{role:"img","aria-label":"double-left",className:"compass-icon compass-icon-double-left",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),ze=()=>b("span",{role:"img","aria-label":"double-right",className:"compass-icon compass-icon-double-right",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"double-right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Dt=()=>b("span",{role:"img","aria-label":"calendar",className:"compass-icon compass-icon-calendar",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"calendar",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),$r=()=>b("span",{role:"img","aria-label":"down",className:"compass-icon compass-icon-down",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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 Pr=()=>b("span",{role:"img","aria-label":"ellipsis",className:"compass-icon compass-icon-ellipsis",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"ellipsis",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("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"})})}),Mr=()=>b("span",{role:"img","aria-label":"plus-square",className:"compass-icon compass-icon-plus-square",children:go("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"plus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[b("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"}),b("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"})]})}),Tr=()=>b("span",{role:"img","aria-label":"minus-square",className:"compass-icon compass-icon-minus-square",children:go("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"minus-square",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[b("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"}),b("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"})]})}),Rr=()=>b("span",{role:"img","aria-label":"file",className:"compass-icon compass-icon-file",children:b("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"file",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:b("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"})})});import{jsx as We,jsxs as xo}from"react/jsx-runtime";var Ir=()=>null,zr=({current:e=0,status:t="process",direction:o="horizontal",labelPlacement:n="horizontal",variant:a="default",items:r,children:s,onChange:c,className:d,style:p})=>{let u=(l,i,k)=>l<i?"finish":l===i?k:"wait",f=(l,i,k)=>k||(i==="finish"?We(Rt,{}):i==="error"?We(Xe,{}):l+1),h=(l,i)=>{c&&!i&&l!==e&&c(l)},g=[];return r?g=r:s&&Dr.Children.forEach(s,l=>{Dr.isValidElement(l)&&l.type===Ir&&g.push(l.props)}),We(mr,{direction:o,labelPlacement:n,className:`compass-steps compass-steps--${o} compass-steps--label-${n} compass-steps--${a} ${d||""}`,style:p,role:"list",children:g.map((l,i)=>{let k=l.status||u(i,e,t),v=!!c&&!l.disabled;return xo(fr,{status:k,active:i===e,disabled:l.disabled,direction:o,labelPlacement:n,variant:a,clickable:v,onClick:()=>h(i,l.disabled),className:`compass-steps-item compass-steps-item--${k} ${i===e?"compass-steps-item--active":""} ${l.disabled?"compass-steps-item--disabled":""} ${l.className||""}`,style:l.style,role:"listitem",children:[We(vr,{direction:o,isLast:i===g.length-1,variant:a}),We(gr,{status:k,active:i===e,variant:a,className:`compass-steps-icon ${a==="dot"?"compass-steps-icon--dot":""}`,children:a!=="dot"&&f(i,k,l.icon)}),xo(xr,{className:"compass-steps-content",children:[xo(yr,{status:k,className:"compass-steps-title",isLast:i===g.length-1,direction:o,children:[l.title,l.subTitle&&We(hr,{className:"compass-steps-subtitle",children:l.subTitle})]}),l.description&&We(br,{status:k,className:"compass-steps-description",children:l.description})]})]},i)})})};zr.Step=Ir;var Hr=zr;var hs=Hr;import{useState as ho,useMemo as jr}from"react";import{List as bs}from"react-window";import He from"@emotion/styled";import{css as Br}from"@emotion/react";var Nr=He.div`
|
|
399
|
+
position: relative;
|
|
400
|
+
font-size: ${({theme:e})=>m(e,"tree").fontSize};
|
|
401
|
+
line-height: 1.5;
|
|
402
|
+
color: ${({theme:e})=>m(e,"tree").nodeColor};
|
|
403
|
+
`,Fr=He.div`
|
|
404
|
+
display: flex;
|
|
405
|
+
align-items: center;
|
|
406
|
+
padding: 0 4px;
|
|
407
|
+
padding-left: ${({level:e,theme:t})=>`calc(${e} * ${m(t,"tree").indentSize} + 4px)`};
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
transition: all 0.2s;
|
|
410
|
+
position: relative;
|
|
411
|
+
background-color: ${({selected:e,theme:t})=>e?m(t,"tree").nodeSelectedBg:"transparent"};
|
|
412
|
+
border-radius: ${({theme:e})=>m(e,"tree").borderRadius};
|
|
413
|
+
color: ${({selected:e,theme:t})=>e?m(t,"tree").nodeSelectedColor:"inherit"};
|
|
414
|
+
|
|
415
|
+
&:hover {
|
|
416
|
+
background-color: ${({selected:e,theme:t})=>e?m(t,"tree").nodeSelectedBg:m(t,"tree").nodeHoverBg};
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
${({disabled:e})=>e&&Br`
|
|
420
|
+
cursor: not-allowed;
|
|
421
|
+
opacity: 0.5;
|
|
422
|
+
&:hover {
|
|
423
|
+
background-color: transparent;
|
|
424
|
+
}
|
|
425
|
+
`}
|
|
426
|
+
`,It=He.span`
|
|
427
|
+
font-size: 12px;
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
flex-shrink: 0;
|
|
432
|
+
user-select: none;
|
|
433
|
+
line-height: 0;
|
|
434
|
+
width: 24px;
|
|
435
|
+
height: 24px;
|
|
436
|
+
margin-right: 4px;
|
|
437
|
+
cursor: pointer;
|
|
438
|
+
position: relative;
|
|
439
|
+
transform: rotate(
|
|
440
|
+
${({expanded:e,showLine:t})=>t?"0deg":e?"90deg":"0deg"}
|
|
441
|
+
);
|
|
442
|
+
transition: transform 0.2s;
|
|
443
|
+
z-index: 1;
|
|
444
|
+
background: ${({showLine:e})=>e?"#fff":"transparent"};
|
|
445
|
+
color: ${({theme:e})=>m(e,"tree").switcherColor};
|
|
446
|
+
|
|
447
|
+
&:hover {
|
|
448
|
+
color: ${({theme:e})=>m(e,"tree").switcherHoverColor};
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&.is-noop {
|
|
452
|
+
cursor: default;
|
|
453
|
+
transform: none;
|
|
454
|
+
&:hover {
|
|
455
|
+
color: inherit;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
`,Er=He.span`
|
|
459
|
+
align-self: stretch;
|
|
460
|
+
width: ${({theme:e})=>m(e,"tree").indentSize};
|
|
461
|
+
display: inline-block;
|
|
462
|
+
flex-shrink: 0;
|
|
463
|
+
position: relative;
|
|
464
|
+
|
|
465
|
+
${({active:e})=>e&&Br`
|
|
466
|
+
&::before {
|
|
467
|
+
content: '';
|
|
468
|
+
position: absolute;
|
|
469
|
+
top: 0;
|
|
470
|
+
bottom: 0;
|
|
471
|
+
left: 50%;
|
|
472
|
+
border-left: 1px solid #d9d9d9;
|
|
473
|
+
transform: translateX(-50%);
|
|
474
|
+
}
|
|
475
|
+
`}
|
|
476
|
+
`,Lr=He.span`
|
|
477
|
+
margin-right: 8px;
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
`,Or=He.div`
|
|
481
|
+
display: flex;
|
|
482
|
+
align-items: center;
|
|
483
|
+
flex: 1;
|
|
484
|
+
min-width: 0;
|
|
485
|
+
`,Wr=He.div`
|
|
486
|
+
flex: 1;
|
|
487
|
+
min-width: 0;
|
|
488
|
+
margin-left: 4px;
|
|
489
|
+
white-space: nowrap;
|
|
490
|
+
overflow: hidden;
|
|
491
|
+
text-overflow: ellipsis;
|
|
492
|
+
`,Ar=He.span`
|
|
493
|
+
display: inline-flex;
|
|
494
|
+
align-items: center;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
width: 16px;
|
|
497
|
+
height: 16px;
|
|
498
|
+
margin-right: 4px;
|
|
499
|
+
`;import{jsx as de,jsxs as Vr}from"react/jsx-runtime";var yo=({level:e=0,expanded:t,selected:o,checked:n,halfChecked:a,disabled:r,title:s,icon:c,isLeaf:d,checkable:p,selectable:u,onExpand:f,onSelect:h,onCheck:g,className:l,style:i,switcherIcon:k,showLine:v,showIcon:C,indentLines:w=[]})=>{let M=S=>{S.stopPropagation(),!d&&f&&f(S)},H=S=>{S.stopPropagation(),!r&&u!==!1&&h&&h(S)},V=S=>{S.stopPropagation(),!r&&p!==!1&&g&&g(S)},O=()=>typeof k=="function"?k({expanded:!!t}):v?d?de(Rr,{}):t?de(Tr,{}):de(Mr,{}):k||de(Sr,{}),D=typeof k!="function";return Vr(Fr,{level:v?0:e,selected:o,disabled:r,className:`compass-tree-node ${o?"compass-tree-node--selected":""} ${r?"compass-tree-node--disabled":""} ${l||""}`,style:i,onClick:H,showLine:v,children:[v&&w.map((S,Y)=>de(Er,{active:S,className:"compass-tree-indent"},Y)),d?v?de(It,{className:"compass-tree-switcher compass-tree-switcher--leaf",showLine:v,children:O()}):de(It,{className:"compass-tree-switcher compass-tree-switcher--noop",showLine:v,children:de("span",{style:{width:"16px",display:"inline-block"}})}):de(It,{expanded:D?t:void 0,onClick:M,className:"compass-tree-switcher",showLine:v,children:O()}),p&&de(Lr,{onClick:V,className:"compass-tree-checkbox",children:de("input",{type:"checkbox",checked:n,disabled:r,ref:S=>{S&&(S.indeterminate=!!a)},readOnly:!0})}),Vr(Or,{className:"compass-tree-content",children:[C&&c&&de(Ar,{className:"compass-tree-icon",children:c}),de(Wr,{className:"compass-tree-title",children:s})]})]})};function Yr(e=[],t=[]){let o=new Set(t),n=[];function a(r,s=null,c=0,d="0"){return r.map((p,u)=>{let f=`${d}-${u}`,h={...p,parent:s,children:[],pos:f,data:p,level:c,key:p.key,title:p.title};return n.push(h),o.has(p.key)?h.children=a(p.children||[],h,c+1,f):h.children=[],h})}return a(e),n}function Kr(e,t,o){let n=[];return e.forEach((a,r)=>{let{key:s,children:c}=a,d=t?`${t.pos}-${r}`:`${r}`,p={node:a,index:r,key:s,pos:d,parent:t||void 0};o.keyEntities[s]=p,n.push(p),c&&(p.children=Kr(c,p,o))}),n}function _r(e){let t={};return Kr(e,null,{keyEntities:t}),{keyEntities:t}}function qr(e,t,o,n){let a=new Set(o),r=n[e];if(!r)return{checkedKeys:Array.from(a)};function s(d){t?a.add(d.key):a.delete(d.key),d.children&&d.children.forEach(p=>s(p))}s(r);let c=r.parent;for(;c;)c.children&&(c.children.every(p=>a.has(p.key))?a.add(c.key):a.delete(c.key)),c=c.parent;return{checkedKeys:Array.from(a)}}import{jsx as ut}from"react/jsx-runtime";var vs=({treeData:e=[],checkable:t=!1,selectable:o=!0,showLine:n=!1,showIcon:a=!1,defaultExpandedKeys:r=[],expandedKeys:s,onExpand:c,defaultSelectedKeys:d=[],selectedKeys:p,onSelect:u,defaultCheckedKeys:f=[],checkedKeys:h,onCheck:g,height:l,itemHeight:i=28,virtual:k=!1,switcherIcon:v,titleRender:C,className:w,style:M})=>{let[H,V]=ho(s||r),[O,D]=ho(p||d),[S,Y]=ho(h||f),P=s||H,R=p||O,J=h||S,{keyEntities:Q}=jr(()=>_r(e),[e]),A=jr(()=>Yr(e,P),[e,P]),K=(x,U)=>{let T=P.includes(x)?P.filter(L=>L!==x):[...P,x];s||V(T),c&&c(T,{node:U,expanded:!P.includes(x)})},se=(x,U,T)=>{let L=[x];p||D(L),u&&u(L,{node:U,selected:!0,event:T})},te=(x,U,T)=>{let L=!J.includes(x),{checkedKeys:ee}=qr(x,L,J,Q);h||Y(ee),g&&g(ee,{node:U,checked:L,event:T})},ie=x=>{if(!x.parent){let T=e;return T[T.length-1].key===x.key}let U=x.parent.children;return U[U.length-1].key===x.key},$=({index:x,style:U})=>{let T=A[x];if(!T)return ut("div",{style:U});let L=[],ee=T.parent;for(;ee;)L.unshift(!ie(ee)),ee=ee.parent;return ut(yo,{eventKey:T.key,title:C?C(T.data):T.title,level:T.level,expanded:P.includes(T.key),selected:R.includes(T.key),checked:J.includes(T.key),isLeaf:T.isLeaf||!T.children&&!T.data.children,checkable:t,selectable:o,disabled:T.disabled,icon:T.icon,style:U,onExpand:()=>K(T.key,T.data),onSelect:fe=>se(T.key,T.data,fe),onCheck:fe=>te(T.key,T.data,fe),switcherIcon:v,showLine:n,showIcon:a,indentLines:L},T.key)},B=()=>k&&l?ut(bs,{defaultHeight:l,rowCount:A.length,rowHeight:i,rowComponent:$,rowProps:{},style:{width:"100%"}}):A.map(x=>{let U=[],T=x.parent;for(;T;)U.unshift(!ie(T)),T=T.parent;return ut(yo,{eventKey:x.key,title:C?C(x.data):x.title,level:x.level,expanded:P.includes(x.key),selected:R.includes(x.key),checked:J.includes(x.key),isLeaf:x.isLeaf||!x.children&&!x.data.children,checkable:t,selectable:o,disabled:x.disabled,icon:x.icon,onExpand:()=>K(x.key,x.data),onSelect:L=>se(x.key,x.data,L),onCheck:L=>te(x.key,x.data,L),switcherIcon:v,showLine:n,showIcon:a,indentLines:U},x.key)});return ut(Nr,{className:`compass-tree ${w||""}`,style:M,children:B()})},Gr=vs;var Ss=Gr;import on,{useState as ws}from"react";import{useFloating as $s,autoUpdate as Ps,offset as Ms,flip as Ts,shift as Rs,useDismiss as Ds,useRole as Is,useClick as zs,useHover as Hs,useInteractions as Bs,FloatingPortal as Ns,useMergeRefs as Fs}from"@floating-ui/react";import Cs from"@emotion/styled";var Qr=Cs.div`
|
|
500
|
+
z-index: ${({theme:e})=>e?.components?.dropdown?.zIndex??1050};
|
|
501
|
+
background-color: ${({theme:e})=>e?.components?.dropdown?.backgroundColor||"#ffffff"};
|
|
502
|
+
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)"};
|
|
503
|
+
border-radius: ${({theme:e})=>e?.components?.dropdown?.borderRadius||"4px"};
|
|
504
|
+
padding: ${({theme:e})=>e?.components?.dropdown?.padding||"4px 0"};
|
|
505
|
+
outline: 0;
|
|
506
|
+
`;import bo from"@emotion/styled";var Ur=bo.div`
|
|
507
|
+
margin: 0;
|
|
508
|
+
padding: 0;
|
|
509
|
+
list-style: none;
|
|
510
|
+
`,Xr=bo.div`
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
margin: 0;
|
|
514
|
+
padding: ${({theme:e})=>e?.components?.menu?.itemPadding||"0 12px"};
|
|
515
|
+
height: ${({theme:e})=>e?.components?.menu?.itemHeight||"32px"};
|
|
516
|
+
color: ${({theme:e,$danger:t})=>t?e?.colors?.error||"#ff4d4f":e?.components?.menu?.itemColor||"rgba(0, 0, 0, 0.88)"};
|
|
517
|
+
font-size: ${({theme:e})=>e?.components?.menu?.fontSize||"14px"};
|
|
518
|
+
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
519
|
+
transition: all 0.3s;
|
|
520
|
+
border-radius: ${({theme:e})=>e?.components?.menu?.borderRadius||"4px"};
|
|
521
|
+
opacity: ${({$disabled:e})=>e?.5:1};
|
|
522
|
+
|
|
523
|
+
&:hover {
|
|
524
|
+
background-color: ${({theme:e,$disabled:t,$danger:o})=>t?"transparent":o?"#fff2f0":e?.components?.menu?.itemHoverBg||"#f5f5f5"};
|
|
525
|
+
}
|
|
526
|
+
`,Jr=bo.span`
|
|
527
|
+
margin-right: 8px;
|
|
528
|
+
display: inline-flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
`;import{jsx as zt,jsxs as ks}from"react/jsx-runtime";var Zr=({children:e,onClick:t,disabled:o,icon:n,danger:a,className:r,style:s})=>{let c=d=>{o||t?.(d)};return ks(Xr,{className:`compass-menu-item ${o?"compass-menu-item--disabled":""} ${a?"compass-menu-item--danger":""} ${r||""}`,style:s,onClick:c,$disabled:o,$danger:a,children:[n&&zt(Jr,{className:"compass-menu-item-icon",children:n}),zt("span",{className:"compass-menu-item-content",children:e})]})},en=({children:e,items:t,className:o,style:n,onClick:a})=>zt(Ur,{className:`compass-menu ${o||""}`,style:n,children:t?t.map(r=>zt(Zr,{onClick:s=>{r.onClick?.(s),a?.(s,r.key)},disabled:r.disabled,danger:r.danger,icon:r.icon,className:r.className,style:r.style,children:r.label},r.key)):e});en.Item=Zr;var tn=en;var vo=tn;import{Fragment as rn,jsx as Ht,jsxs as Es}from"react/jsx-runtime";var nn=({children:e,overlay:t,menu:o,trigger:n="hover",placement:a="bottom-start",visible:r,onVisibleChange:s,disabled:c,className:d,style:p})=>{let[u,f]=ws(!1),h=r!==void 0,g=h?r:u,l=R=>{c||(h||f(R),s?.(R))},{refs:i,floatingStyles:k,context:v}=$s({open:g,onOpenChange:l,placement:a,middleware:[Ms(4),Ts(),Rs()],whileElementsMounted:Ps}),C=Hs(v,{enabled:n==="hover",delay:{open:0,close:100}}),w=zs(v,{enabled:n==="click"}),M=Ds(v),H=Is(v),{getReferenceProps:V,getFloatingProps:O}=Bs([C,w,M,H]),D=on.Children.only(e),S=D.ref,Y=Fs([i.setReference,S]),P=t||(o?Ht(vo,{...o}):null);return P?Es(rn,{children:[on.cloneElement(D,{ref:Y,...V({className:`compass-dropdown-trigger ${d||""}`,style:p,...D.props})}),g&&Ht(Ns,{children:Ht(Qr,{ref:i.setFloating,style:k,className:`compass-dropdown ${d||""}`,...O(),children:P})})]}):Ht(rn,{children:e})};nn.displayName="Dropdown";var an=nn;var Ls=an;import sn,{useState as Co,useRef as Os}from"react";import Ae from"@emotion/styled";var mt=Ae.div`
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
flex-direction: column;
|
|
533
|
+
width: ${({fullWidth:e})=>e?"100%":"320px"};
|
|
534
|
+
`,ft=Ae.label`
|
|
535
|
+
font-size: 14px;
|
|
536
|
+
margin-bottom: 4px;
|
|
537
|
+
color: ${({theme:e})=>y(e,"colors").text};
|
|
538
|
+
`,gt=Ae.div`
|
|
539
|
+
font-size: 12px;
|
|
540
|
+
margin-top: 4px;
|
|
541
|
+
color: ${({theme:e,error:t})=>t?y(e,"colors").error:y(e,"colors").textSecondary};
|
|
542
|
+
`,Ve=Ae.span`
|
|
543
|
+
display: flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
justify-content: center;
|
|
546
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
547
|
+
flex-shrink: 0;
|
|
548
|
+
line-height: 0;
|
|
549
|
+
margin-right: ${({$position:e})=>e==="start"?"8px":"0"};
|
|
550
|
+
margin-left: ${({$position:e})=>e==="end"?"8px":"0"};
|
|
551
|
+
`,So=Ae.button`
|
|
552
|
+
background: none;
|
|
553
|
+
border: none;
|
|
554
|
+
padding: 0;
|
|
555
|
+
margin: 0 4px 0 8px;
|
|
556
|
+
cursor: pointer;
|
|
557
|
+
color: ${({theme:e})=>y(e,"colors").textTertiary};
|
|
558
|
+
display: flex;
|
|
559
|
+
align-items: center;
|
|
560
|
+
justify-content: center;
|
|
561
|
+
font-size: 14px;
|
|
562
|
+
line-height: 0;
|
|
563
|
+
transition:
|
|
564
|
+
color 0.2s,
|
|
565
|
+
opacity 0.2s;
|
|
566
|
+
visibility: ${({visible:e})=>e?"visible":"hidden"};
|
|
567
|
+
opacity: ${({visible:e,$isHoverShow:t})=>!e||t?0:1};
|
|
568
|
+
pointer-events: ${({visible:e,$isHoverShow:t})=>!e||t?"none":"auto"};
|
|
569
|
+
|
|
570
|
+
&:hover {
|
|
571
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
572
|
+
}
|
|
573
|
+
`,xt=Ae.input`
|
|
574
|
+
flex: 1;
|
|
575
|
+
border: none;
|
|
576
|
+
outline: none;
|
|
577
|
+
background: transparent;
|
|
578
|
+
padding: 0;
|
|
579
|
+
margin: 0;
|
|
580
|
+
color: ${({theme:e})=>y(e,"colors").text};
|
|
581
|
+
font-size: ${({theme:e,$size:t})=>{let o={small:"sm",medium:"md",large:"lg"};return m(e,"input").fontSize[o[t||"medium"]]}};
|
|
582
|
+
width: 100%;
|
|
583
|
+
|
|
584
|
+
&::placeholder {
|
|
585
|
+
color: ${({theme:e})=>y(e,"colors").textDisabled};
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
&:disabled {
|
|
589
|
+
cursor: not-allowed;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
&::-webkit-search-decoration,
|
|
593
|
+
&::-webkit-search-cancel-button,
|
|
594
|
+
&::-webkit-search-results-button,
|
|
595
|
+
&::-webkit-search-results-decoration {
|
|
596
|
+
-webkit-appearance: none;
|
|
597
|
+
appearance: none;
|
|
598
|
+
display: none;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
&::-ms-reveal,
|
|
602
|
+
&::-ms-clear {
|
|
603
|
+
display: none;
|
|
604
|
+
width: 0;
|
|
605
|
+
height: 0;
|
|
606
|
+
}
|
|
607
|
+
`,Bt=Ae.div`
|
|
608
|
+
display: flex;
|
|
609
|
+
align-items: center;
|
|
610
|
+
position: relative;
|
|
611
|
+
box-sizing: border-box;
|
|
612
|
+
width: 100%;
|
|
613
|
+
background-color: ${({theme:e})=>y(e,"colors").background};
|
|
614
|
+
border: 1px solid
|
|
615
|
+
${({theme:e,error:t,focused:o})=>{let n=y(e,"colors"),a=m(e,"input");return t?n.error:o?a.activeBorderColor:n.border}};
|
|
616
|
+
border-radius: ${({theme:e})=>m(e,"input").borderRadius};
|
|
617
|
+
padding: ${({theme:e,size:t})=>{let o={small:"sm",medium:"md",large:"lg"};return m(e,"input").padding[o[t||"medium"]]}};
|
|
618
|
+
transition: all 0.2s;
|
|
619
|
+
|
|
620
|
+
&:hover {
|
|
621
|
+
border-color: ${({theme:e,error:t,focused:o,disabled:n})=>{let a=y(e,"colors"),r=m(e,"input");return n?a.border:t?a.error:o?r.activeBorderColor:r.hoverBorderColor}};
|
|
622
|
+
|
|
623
|
+
.compass-input-clear-button[data-visible='true'] {
|
|
624
|
+
opacity: 1;
|
|
625
|
+
pointer-events: auto;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
${({disabled:e,theme:t})=>e&&`
|
|
630
|
+
background-color: ${y(t,"colors").backgroundSecondary};
|
|
631
|
+
cursor: not-allowed;
|
|
632
|
+
opacity: 0.6;
|
|
633
|
+
`}
|
|
634
|
+
`;import{jsx as ve,jsxs as ln}from"react/jsx-runtime";var cn=sn.forwardRef((e,t)=>{let{label:o,error:n,helperText:a,type:r="text",fullWidth:s=!1,prefix:c,suffix:d,size:p="medium",allowClear:u,className:f,style:h,disabled:g,value:l,defaultValue:i,onChange:k,onFocus:v,onBlur:C,onPressEnter:w,onKeyDown:M,...H}=e,V=Os(null);sn.useImperativeHandle(t,()=>V.current);let[O,D]=Co(!1),[S,Y]=Co(!1),[P,R]=Co(i||""),J=l!==void 0,Q=J?l:P,A=L=>{D(!0),v?.(L)},K=L=>{D(!1),C?.(L)},se=L=>{J||R(L.target.value),k?.(L)},te=L=>{L.key==="Enter"&&w?.(L),M?.(L)},ie=L=>{L.preventDefault(),L.stopPropagation();let ee={target:{value:""},currentTarget:{value:""}};J||R(""),k?.(ee),V.current?.focus()},$=L=>{L.preventDefault(),L.stopPropagation(),Y(!S),V.current?.focus()},B=u&&!g&&Q&&String(Q).length>0,x=r==="password"&&S?"text":r,U=c,T=d;return r==="password"?T=ve(So,{type:"button",visible:!0,onClick:$,tabIndex:-1,style:{marginLeft:8},children:S?ve(Cr,{}):ve(kr,{})}):r==="search"&&!d&&(T=ve(wr,{})),ln(mt,{fullWidth:s,className:f,style:h,children:[o&&ve(ft,{children:o}),ln(Bt,{error:!!n,disabled:g,focused:O,size:p,className:`compass-input-field compass-input-field--${p}`,children:[U&&ve(Ve,{$position:"start",children:U}),ve(xt,{ref:V,type:x,disabled:g,value:Q,onChange:se,onFocus:A,onBlur:K,onKeyDown:te,$size:p,...H}),u&&!g&&ve(So,{type:"button",className:"compass-input-clear-button",visible:!!B,$isHoverShow:!0,"data-visible":!!B,onClick:ie,tabIndex:-1,children:ve(De,{})}),T&&ve(Ve,{$position:"end",children:T})]}),(a||n)&&ve(gt,{error:!!n,children:n&&typeof n!="boolean"?n:a})]})});cn.displayName="InputField";var pn=cn;var ko=pn;import Vs,{useState as Ft,useEffect as Ys,useImperativeHandle as Ks,forwardRef as xn}from"react";import{createPortal as _s}from"react-dom";import{createRoot as qs}from"react-dom/client";import{TransitionGroup as js,CSSTransition as Gs}from"react-transition-group";import Nt from"@emotion/styled";import{keyframes as Ws,css as dn}from"@emotion/react";var As=Ws`
|
|
635
|
+
from {
|
|
636
|
+
transform: rotate(0deg);
|
|
637
|
+
}
|
|
638
|
+
to {
|
|
639
|
+
transform: rotate(360deg);
|
|
640
|
+
}
|
|
641
|
+
`,un=Nt.div`
|
|
642
|
+
position: fixed;
|
|
643
|
+
top: ${({theme:e})=>e.spacing?.md||16}px;
|
|
644
|
+
left: 0;
|
|
645
|
+
width: 100%;
|
|
646
|
+
pointer-events: none;
|
|
647
|
+
z-index: ${({theme:e})=>e?.components?.message?.zIndex||1010};
|
|
648
|
+
display: flex;
|
|
649
|
+
flex-direction: column;
|
|
650
|
+
align-items: center;
|
|
651
|
+
`,mn=Nt.div`
|
|
652
|
+
padding: ${({theme:e})=>e.spacing?.sm||8}px;
|
|
653
|
+
text-align: center;
|
|
654
|
+
pointer-events: all;
|
|
655
|
+
|
|
656
|
+
&.compass-message-enter {
|
|
657
|
+
opacity: 0;
|
|
658
|
+
transform: translateY(-100%);
|
|
659
|
+
}
|
|
660
|
+
&.compass-message-enter-active {
|
|
661
|
+
opacity: 1;
|
|
662
|
+
transform: translateY(0);
|
|
663
|
+
transition: ${({theme:e})=>e.transitions?.slow||"all 0.3s ease-in-out"};
|
|
664
|
+
}
|
|
665
|
+
&.compass-message-exit {
|
|
666
|
+
opacity: 1;
|
|
667
|
+
transform: translateY(0);
|
|
668
|
+
}
|
|
669
|
+
&.compass-message-exit-active {
|
|
670
|
+
opacity: 0;
|
|
671
|
+
transform: translateY(-100%);
|
|
672
|
+
transition: ${({theme:e})=>e.transitions?.slow||"all 0.3s ease-in-out"};
|
|
673
|
+
}
|
|
674
|
+
`,fn=Nt.div`
|
|
675
|
+
display: inline-flex;
|
|
676
|
+
align-items: center;
|
|
677
|
+
padding: ${({theme:e})=>e?.components?.message?.contentPadding||`${e.spacing?.sm||8}px ${e.spacing?.md||16}px`};
|
|
678
|
+
background: ${({theme:e})=>e.colors?.background||"#fff"};
|
|
679
|
+
border-radius: ${({theme:e})=>e?.components?.message?.borderRadius||`${e.borderRadius?.lg||8}px`};
|
|
680
|
+
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)"};
|
|
681
|
+
font-size: ${({theme:e})=>e.fontSize?.sm||14}px;
|
|
682
|
+
line-height: ${({theme:e})=>e.lineHeight?.normal||1.5715};
|
|
683
|
+
color: ${({theme:e})=>e.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
684
|
+
`,gn=Nt.span`
|
|
685
|
+
margin-right: ${({theme:e})=>e.spacing?.sm||8}px;
|
|
686
|
+
display: inline-flex;
|
|
687
|
+
align-items: center;
|
|
688
|
+
font-size: ${({theme:e})=>e.fontSize?.md||16}px;
|
|
689
|
+
line-height: 1;
|
|
690
|
+
|
|
691
|
+
${({$type:e,theme:t})=>{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"?dn`
|
|
692
|
+
color: ${o};
|
|
693
|
+
.anticon {
|
|
694
|
+
display: inline-block;
|
|
695
|
+
animation: ${As} 1s linear infinite;
|
|
696
|
+
}
|
|
697
|
+
`:dn`
|
|
698
|
+
color: ${o};
|
|
699
|
+
`}}
|
|
700
|
+
`;import{jsx as ue,jsxs as ei}from"react/jsx-runtime";var Qs={info:ue(Re,{}),success:ue(Ge,{}),error:ue(Qe,{}),warning:ue(Ue,{}),loading:ue(Tt,{})},yn=xn(({content:e,type:t="info",icon:o,className:n,style:a,duration:r=3,onClose:s},c)=>{let[d,p]=Ft(!1);return Ys(()=>{if(r<=0||d)return;let u=setTimeout(()=>{s?.()},r*1e3);return()=>clearTimeout(u)},[r,d,s]),ue(mn,{ref:c,className:`compass-message compass-message--${t} ${n||""}`,style:a,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:ei(fn,{className:"compass-message-content",children:[ue(gn,{$type:t,children:o||Qs[t]}),e]})})});yn.displayName="Message";var Et=xn((e,t)=>{let[o,n]=Ft([]),[a]=Ft(()=>new Map),[r]=Ft(()=>typeof window<"u"?document.body:null);return Ks(t,()=>({add:s=>{s.key&&!a.has(s.key)&&a.set(s.key,Vs.createRef()),n(c=>[...c,s])},remove:s=>{n(c=>c.filter(d=>d.key!==s)),a.delete(s)}})),r?_s(ue(un,{children:ue(js,{component:null,children:o.map(s=>{let c=a.get(s.key);return ue(Gs,{timeout:300,classNames:"compass-message",nodeRef:c,children:ue(yn,{ref:c,...s})},s.key)})})}),r):null});Et.displayName="MessageContainerWrapper";var Je=null,ht=null,yt=null,Us=()=>Je?Promise.resolve(Je):yt||(yt=new Promise(e=>{let t=document.createElement("div");document.body.appendChild(t),ht=qs(t);let o=()=>ue(Et,{ref:n=>{n&&(Je=n,e(n))}});ht.render(ue(o,{}))}),yt),Xs=0,Js=Date.now(),Zs=()=>`compass-message-${Js}-${Xs++}`,Se=e=>{let{content:t,duration:o=3,type:n="info",onClose:a,key:r=Zs(),...s}=e,c=()=>{Je&&Je.remove(r),a?.()};Us().then(d=>{d.add({...s,key:r,content:t,duration:o,type:n,onClose:c})})},hn={info:(e,t,o)=>typeof e=="object"&&e!==null&&"content"in e?Se({...e,type:"info"}):Se({content:e,duration:t,type:"info",onClose:o}),success:(e,t,o)=>typeof e=="object"&&e!==null&&"content"in e?Se({...e,type:"success"}):Se({content:e,duration:t,type:"success",onClose:o}),error:(e,t,o)=>typeof e=="object"&&e!==null&&"content"in e?Se({...e,type:"error"}):Se({content:e,duration:t,type:"error",onClose:o}),warning:(e,t,o)=>typeof e=="object"&&e!==null&&"content"in e?Se({...e,type:"warning"}):Se({content:e,duration:t,type:"warning",onClose:o}),loading:(e,t,o)=>typeof e=="object"&&e!==null&&"content"in e?Se({...e,type:"loading"}):Se({content:e,duration:t,type:"loading",onClose:o}),open:Se,destroy:()=>{ht&&(ht.unmount(),ht=null),Je=null,yt=null}};import{useRef as ti}from"react";import{jsx as ai}from"react/jsx-runtime";var oi=0,ri=Date.now(),ni=()=>`compass-message-hook-${ri}-${oi++}`;function wo(){let e=ti(null),t=a=>{if(!e.current)return;let{content:r,duration:s=3,type:c="info",onClose:d,key:p=ni(),...u}=a,f=()=>{e.current?.remove(p),d?.()};e.current.add({...u,key:p,content:r,duration:s,type:c,onClose:f})};return[{info:(a,r,s)=>typeof a=="object"&&a!==null&&"content"in a?t({...a,type:"info"}):t({content:a,duration:r,type:"info",onClose:s}),success:(a,r,s)=>typeof a=="object"&&a!==null&&"content"in a?t({...a,type:"success"}):t({content:a,duration:r,type:"success",onClose:s}),error:(a,r,s)=>typeof a=="object"&&a!==null&&"content"in a?t({...a,type:"error"}):t({content:a,duration:r,type:"error",onClose:s}),warning:(a,r,s)=>typeof a=="object"&&a!==null&&"content"in a?t({...a,type:"warning"}):t({content:a,duration:r,type:"warning",onClose:s}),loading:(a,r,s)=>typeof a=="object"&&a!==null&&"content"in a?t({...a,type:"loading"}):t({content:a,duration:r,type:"loading",onClose:s}),open:t,destroy:a=>{a&&e.current?.remove(a)}},ai(Et,{ref:e},"message-holder")]}var bn=hn;bn.useMessage=wo;var si=bn;import zn from"react";import hi from"react-dom";import Be from"@emotion/styled";var bt=500,vn=Be.div`
|
|
701
|
+
position: fixed;
|
|
702
|
+
inset: 0;
|
|
703
|
+
z-index: ${e=>m(e.theme,"modal").zIndex||1e3};
|
|
704
|
+
pointer-events: ${e=>e.$visible?"auto":"none"};
|
|
705
|
+
`,Sn=Be.div`
|
|
706
|
+
position: fixed;
|
|
707
|
+
inset: 0;
|
|
708
|
+
background-color: ${e=>m(e.theme,"modal").maskColor||"rgba(0, 0, 0, 0.3)"};
|
|
709
|
+
backdrop-filter: blur(4px);
|
|
710
|
+
opacity: ${e=>e.$visible?1:0};
|
|
711
|
+
transition: opacity ${bt}ms;
|
|
712
|
+
`,Cn=Be.div`
|
|
713
|
+
background: ${e=>m(e.theme,"modal").contentBg||y(e.theme,"colors").background};
|
|
714
|
+
padding: ${e=>m(e.theme,"modal").bodyPadding||`${y(e.theme,"spacing").lg}px`};
|
|
715
|
+
border-radius: ${e=>m(e.theme,"modal").borderRadius||`${y(e.theme,"borderRadius").md}px`};
|
|
716
|
+
box-shadow: ${e=>m(e.theme,"modal").boxShadow||y(e.theme,"shadows").lg};
|
|
717
|
+
width: ${e=>e.$width?typeof e.$width=="number"?`${e.$width}px`:e.$width:"100%"};
|
|
718
|
+
max-width: ${e=>e.$width?"100%":"500px"};
|
|
719
|
+
margin: auto;
|
|
720
|
+
position: relative;
|
|
721
|
+
top: 120px;
|
|
722
|
+
opacity: ${e=>e.$visible?1:0};
|
|
723
|
+
transition:
|
|
724
|
+
transform ${bt}ms,
|
|
725
|
+
opacity ${bt}ms;
|
|
726
|
+
${e=>e.$visible?"transform: translateY(0)":"transform: translateY(-20px)"}
|
|
727
|
+
`,kn=Be.div`
|
|
728
|
+
display: flex;
|
|
729
|
+
align-items: center;
|
|
730
|
+
justify-content: space-between;
|
|
731
|
+
margin-bottom: ${e=>y(e.theme,"spacing").md}px;
|
|
732
|
+
`,wn=Be.div`
|
|
733
|
+
font-size: ${e=>y(e.theme,"fontSize").lg}px;
|
|
734
|
+
font-weight: ${e=>y(e.theme,"fontWeight").bold};
|
|
735
|
+
color: ${e=>y(e.theme,"colors").text};
|
|
736
|
+
line-height: 1.5;
|
|
737
|
+
`,$n=Be(le)``,Pn=Be.div`
|
|
738
|
+
display: flex;
|
|
739
|
+
width: 100%;
|
|
740
|
+
justify-content: flex-end;
|
|
741
|
+
margin-top: ${e=>y(e.theme,"spacing").md}px;
|
|
742
|
+
`,$o=Be(le)`
|
|
743
|
+
padding: 4px 18px;
|
|
744
|
+
margin: 0;
|
|
745
|
+
`;var Mn={...ne,colors:{...ne.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",border:"#434343",borderSecondary:"#303030",borderHover:"#177ddc",success:"#49aa19",warning:"#d89614",error:"#a61d24",info:"#177ddc"},shadows:{...ne.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:{...ne.components,modal:{...ne.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:{...ne.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:{...ne.components.progress,trackColor:"#303030"},steps:{...ne.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:{...ne.components.input,activeBorderColor:"#177ddc",hoverBorderColor:"#177ddc"}}};import{createContext as ii,useContext as kd,useState as li,useMemo as Tn,useEffect as ci}from"react";import{ThemeProvider as pi}from"@emotion/react";import{jsx as Rn}from"react/jsx-runtime";var di=ii(void 0),ui=({children:e,theme:t,lightTheme:o,darkTheme:n,defaultMode:a="light"})=>{let[r,s]=li(a);ci(()=>{s(a)},[a]);let c=Tn(()=>{let u=r==="dark"?Mn:ne;return((...g)=>{let l={...u};return g.forEach(i=>{i&&(i.colors&&(l.colors={...l.colors,...i.colors}),i.spacing&&(l.spacing={...l.spacing,...i.spacing}),i.borderRadius&&(l.borderRadius={...l.borderRadius,...i.borderRadius}),i.fontSize&&(l.fontSize={...l.fontSize,...i.fontSize}),i.fontWeight&&(l.fontWeight={...l.fontWeight,...i.fontWeight}),i.lineHeight&&(l.lineHeight={...l.lineHeight,...i.lineHeight}),i.shadows&&(l.shadows={...l.shadows,...i.shadows}),i.transitions&&(l.transitions={...l.transitions,...i.transitions}),i.breakpoints&&(l.breakpoints={...l.breakpoints,...i.breakpoints}),i.components&&(l.components={...l.components,button:i.components.button?{...l.components.button,padding:{...l.components.button.padding,...i.components.button.padding},fontSize:{...l.components.button.fontSize,...i.components.button.fontSize},borderRadius:{...l.components.button.borderRadius,...i.components.button.borderRadius}}:l.components.button,message:{...l.components.message,...i.components.message},modal:{...l.components.modal,...i.components.modal},progress:{...l.components.progress,...i.components.progress},steps:{...l.components.steps,...i.components.steps},input:i.components.input?{...l.components.input,...i.components.input,padding:{...l.components.input.padding,...i.components.input.padding},fontSize:{...l.components.input.fontSize,...i.components.input.fontSize}}:l.components.input}),i.components?.dropdown&&(l.components.dropdown={...l.components.dropdown,...i.components.dropdown}),i.components?.menu&&(l.components.menu={...l.components.menu,...i.components.menu}),i.components?.datePicker&&(l.components.datePicker={...l.components.datePicker,...i.components.datePicker}),i.components?.select&&(l.components.select={...l.components.select,...i.components.select,padding:{...l.components.select.padding,...i.components.select?.padding},fontSize:{...l.components.select.fontSize,...i.components.select?.fontSize}}),i.components?.pagination&&(l.components.pagination={...l.components.pagination,...i.components.pagination}),i.components?.tree&&(l.components.tree={...l.components.tree,...i.components.tree}))}),l})(t,r==="dark"?n:o)},[r,t,o,n]),d=()=>{s(u=>u==="light"?"dark":"light")},p=Tn(()=>({mode:r,setMode:s,toggleTheme:d,theme:c}),[r,c]);return Rn(di.Provider,{value:p,children:Rn(pi,{theme:c,children:e})})};var vt=ui;import{createContext as mi,useContext as fi}from"react";var Lt=mi({locale:void 0}),me=()=>fi(Lt);import{jsx as Dn}from"react/jsx-runtime";var gi=e=>{let{children:t,locale:o,theme:n}=e;return Dn(Lt.Provider,{value:{locale:o},children:Dn(vt,{theme:n?.token,lightTheme:n?.light,darkTheme:n?.dark,defaultMode:n?.defaultMode,children:t})})},In=gi;var xi=In;var yi={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"}},Ce=yi;import{jsx as Ne,jsxs as Ot}from"react/jsx-runtime";var bi=e=>{let{isOpen:t,maskVisible:o=!0,footer:n,onCancel:a,children:r,className:s,style:c,title:d,closable:p=!0,onOk:u,okText:f="\u786E\u5B9A",cancelText:h="\u53D6\u6D88",confirmLoading:g,afterClose:l,...i}=e,{locale:k}=me(),v=k?.Modal||Ce.Modal,C=f==="\u786E\u5B9A"?v.okText:f,w=h==="\u53D6\u6D88"?v.cancelText:h,[M,H]=zn.useState(!1);zn.useEffect(()=>{t||H(!1)},[t]);let V=async D=>{if(!u)return;let S=u(D);if(S&&typeof S.then=="function"){H(!0);try{await S,H(!1),a&&a(D)}catch(Y){throw H(!1),console.error(Y),Y}}else a&&a(D)},O=D=>{!t&&D.target===D.currentTarget&&l?.()};return Ot(vn,{className:`compass-modal ${s||""}`,$visible:t,style:c,role:"dialog","aria-modal":"true",...i,children:[o&&Ne(Sn,{className:"compass-modal-mask",onClick:a,"aria-hidden":"true",$visible:t}),Ot(Cn,{className:"compass-modal-content",$visible:t,$width:e.width,onTransitionEnd:O,children:[(d||p)&&Ot(kn,{className:"compass-modal-header",children:[Ne(wn,{className:"compass-modal-title",children:d}),p&&Ne($n,{className:"compass-modal-close",onClick:a,"aria-label":"Close",variant:"text",shape:"circle",icon:Ne(Xe,{})})]}),Ne("div",{className:"compass-modal-body",children:r}),n===void 0?Ot(Pn,{className:"compass-modal-footer",children:[Ne($o,{onClick:a,"aria-label":"Close modal",children:w}),Ne($o,{onClick:V,style:{marginLeft:12},variant:"primary",loading:g||M,children:C})]}):n]})]})},vi=e=>{let{children:t,...o}=e;return hi.createPortal(Ne(bi,{...o,children:t}),document.body)},Ze=vi;import{createRoot as Si}from"react-dom/client";import et from"@emotion/styled";var Wt=et.div`
|
|
746
|
+
display: flex;
|
|
747
|
+
align-items: flex-start;
|
|
748
|
+
`,At=et.div`
|
|
749
|
+
margin-right: 12px;
|
|
750
|
+
font-size: 22px;
|
|
751
|
+
line-height: 1;
|
|
752
|
+
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"}}};
|
|
753
|
+
`,Vt=et.div`
|
|
754
|
+
flex: 1;
|
|
755
|
+
`,Yt=et.div`
|
|
756
|
+
color: rgba(0, 0, 0, 0.88);
|
|
757
|
+
font-weight: 600;
|
|
758
|
+
font-size: 16px;
|
|
759
|
+
line-height: 1.5;
|
|
760
|
+
margin-bottom: 8px;
|
|
761
|
+
`,Kt=et.div`
|
|
762
|
+
color: rgba(0, 0, 0, 0.88);
|
|
763
|
+
font-size: 14px;
|
|
764
|
+
line-height: 1.5;
|
|
765
|
+
`,_t=et.div`
|
|
766
|
+
display: flex;
|
|
767
|
+
justify-content: flex-end;
|
|
768
|
+
gap: 8px;
|
|
769
|
+
margin-top: 24px;
|
|
770
|
+
`;import{jsx as xe,jsxs as Po}from"react/jsx-runtime";var St=e=>{let t=document.createElement("div");document.body.appendChild(t);let o=Si(t),n={...e,isOpen:!1,confirmLoading:!1},a=()=>{o.unmount(),t.parentNode&&t.parentNode.removeChild(t)},r=s=>{let{onOk:c,onCancel:d,title:p,content:u,icon:f,type:h="confirm",okText:g=Ce.Modal.okText,cancelText:l=Ce.Modal.cancelText,closable:i=!1,confirmLoading:k,...v}=s,C=async()=>{if(c){let O=c();if(O&&typeof O.then=="function"){n={...n,confirmLoading:!0},r(n);try{await O,M()}catch(D){throw n={...n,confirmLoading:!1},r(n),console.error("Modal confirm error",D),D}}else M()}else M()},w=async()=>{d&&await d(),M()},M=()=>{n={...n,isOpen:!1,confirmLoading:!1},r(n),setTimeout(()=>{a()},bt)},V={info:xe(Re,{}),success:xe(Ge,{}),error:xe(Qe,{}),warning:xe(Ue,{})}[h]||xe(Re,{});o.render(xe(vt,{theme:ne,children:xe(Ze,{...v,width:416,closable:i,onCancel:w,footer:Po(_t,{children:[h==="confirm"?xe(le,{onClick:w,children:l}):null,xe(le,{variant:"primary",onClick:C,loading:k,children:g})]}),children:Po(Wt,{children:[xe(At,{$type:h,children:f||V}),Po(Vt,{children:[p&&xe(Yt,{children:p}),u&&xe(Kt,{children:u})]})]})})}))};return r(n),setTimeout(()=>{n={...n,isOpen:!0},r(n)},10),{destroy:close,update:s=>{n={...n,...s},r(n)}}},Hn=e=>St({...e,type:"info"}),Bn=e=>St({...e,type:"success"}),Nn=e=>St({...e,type:"error"}),Fn=e=>St({...e,type:"warning"}),Ci=e=>St({...e,type:"confirm"}),En=Ci;import ki,{useRef as wi,useState as To,useImperativeHandle as $i}from"react";import{Fragment as Mi,jsx as ce,jsxs as Mo}from"react/jsx-runtime";var Pi=({afterClose:e,closeModal:t,onOk:o,onCancel:n,title:a,content:r,icon:s,type:c="info",okText:d="OK",cancelText:p="Cancel",isOpen:u,confirmLoading:f,...h})=>{let[g,l]=To(!1),{locale:i}=me(),k=i?.Modal||Ce.Modal,v=d==="OK"?k.okText:d,C=p==="Cancel"?k.cancelText:p,w=async()=>{if(o){let O=o();if(O&&typeof O.then=="function"){l(!0);try{await O,l(!1),t()}catch(D){throw l(!1),console.error(D),D}}else t()}else t()},M=async()=>{n&&await n(),t()},V={info:ce(Re,{}),success:ce(Ge,{}),error:ce(Qe,{}),warning:ce(Ue,{})}[c]||ce(Re,{});return ce(Ze,{...h,afterClose:e,closable:h.closable??!1,width:416,isOpen:!!u,onCancel:M,footer:Mo(_t,{children:[c==="confirm"?ce(le,{onClick:M,children:C}):null,ce(le,{variant:"primary",onClick:w,loading:f||g,children:v})]}),children:Mo(Wt,{children:[ce(At,{$type:c,children:s||V}),Mo(Vt,{children:[a&&ce(Yt,{children:a}),r&&ce(Kt,{children:r})]})]})})},Ln=ki.forwardRef((e,t)=>{let[o,n]=To(new Map);return $i(t,()=>({patchElement:(a,r)=>{n(s=>{let c=new Map(s);return c.set(a,r),c})},removeElement:a=>{n(r=>{let s=new Map(r);return s.delete(a),s})}})),ce(Mi,{children:Array.from(o.values())})});Ln.displayName="ElementsHolder";function Ro(){let e=wi(null),[t,o]=To(null);t||o(ce(Ln,{ref:e}));let n=r=>s=>{let c=Math.random().toString(36).substring(2),p={...r(s),isOpen:!1},u=()=>{p={...p,isOpen:!1},f(p)},f=h=>{e.current&&e.current.patchElement(c,ce(Pi,{...h,type:h.type||"info",isOpen:!!h.isOpen,closeModal:u,afterClose:()=>{e.current&&e.current.removeElement(c)}},c))};return f(p),setTimeout(()=>{p={...p,isOpen:!0},f(p)},10),{destroy:u,update:h=>{p={...p,...h},f(p)}}};return[{info:n(r=>({...r,type:"info"})),success:n(r=>({...r,type:"success"})),error:n(r=>({...r,type:"error"})),warning:n(r=>({...r,type:"warning"})),confirm:n(r=>({...r,type:"confirm"}))},t]}var Ye=Ze;Ye.info=Hn;Ye.success=Bn;Ye.error=Nn;Ye.warning=Fn;Ye.confirm=En;Ye.useModal=Ro;var Ti=Ye;import Bi from"react";import Ri from"react";import $e from"@emotion/styled";var On=$e.div`
|
|
771
|
+
display: flex;
|
|
772
|
+
align-items: center;
|
|
773
|
+
gap: ${({theme:e})=>e?.spacing?.sm||8}px;
|
|
774
|
+
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px;`:""}
|
|
775
|
+
`,Wn=$e.div`
|
|
776
|
+
flex: 1;
|
|
777
|
+
background-color: ${({theme:e})=>e?.components?.progress?.trackColor||e?.colors?.backgroundSecondary||"#fafafa"};
|
|
778
|
+
border-radius: ${({theme:e})=>e?.borderRadius?.xl||12}px;
|
|
779
|
+
overflow: hidden;
|
|
780
|
+
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"}}};
|
|
781
|
+
${({size:e})=>typeof e=="object"&&"width"in e?`width: ${e.width}px; flex: none;`:""}
|
|
782
|
+
`,An=$e.div`
|
|
783
|
+
height: 100%;
|
|
784
|
+
border-radius: inherit;
|
|
785
|
+
transition: ${({theme:e})=>e?.transitions?.normal||"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"};
|
|
786
|
+
width: ${({percent:e})=>Math.min(Math.max(e,0),100)}%;
|
|
787
|
+
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"}}};
|
|
788
|
+
`,Vn=$e.span`
|
|
789
|
+
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;
|
|
790
|
+
color: ${({theme:e})=>e?.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
791
|
+
white-space: nowrap;
|
|
792
|
+
min-width: ${({size:e})=>{switch(e){case"small":return"28px";case"large":return"36px";case"medium":default:return"32px"}}};
|
|
793
|
+
text-align: right;
|
|
794
|
+
`,Yn=$e.div`
|
|
795
|
+
display: inline-block;
|
|
796
|
+
width: ${({width:e})=>e}px;
|
|
797
|
+
height: ${({width:e})=>e}px;
|
|
798
|
+
`,Kn=$e.svg`
|
|
799
|
+
transform: rotate(-90deg);
|
|
800
|
+
width: 100%;
|
|
801
|
+
height: 100%;
|
|
802
|
+
`,_n=$e.circle`
|
|
803
|
+
fill: none;
|
|
804
|
+
stroke: ${({theme:e})=>e?.components?.progress?.trackColor||e?.colors?.backgroundSecondary||"#fafafa"};
|
|
805
|
+
`,qn=$e.circle`
|
|
806
|
+
fill: none;
|
|
807
|
+
transition: ${({theme:e})=>e?.transitions?.normal||"all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"};
|
|
808
|
+
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"}}};
|
|
809
|
+
stroke-linecap: round;
|
|
810
|
+
`,jn=$e.div`
|
|
811
|
+
position: absolute;
|
|
812
|
+
top: 50%;
|
|
813
|
+
left: 50%;
|
|
814
|
+
transform: translate(-50%, -50%);
|
|
815
|
+
text-align: center;
|
|
816
|
+
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;
|
|
817
|
+
color: ${({theme:e})=>e?.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
818
|
+
white-space: nowrap;
|
|
819
|
+
`,Gn=$e.div`
|
|
820
|
+
position: relative;
|
|
821
|
+
display: inline-block;
|
|
822
|
+
`;import{useMemo as Qn}from"react";var qt=e=>Math.min(Math.max(e,0),100),jt=(e,t)=>Qn(()=>e!=="normal"?e:t===100?"success":"normal",[e,t]),Gt=(e,t,o,n)=>Qn(()=>o?o(e):t==="success"&&n&&e===100?n:`${Math.round(e)}%`,[o,e,t,n]);import{jsx as Do,jsxs as Di}from"react/jsx-runtime";var Io=Ri.forwardRef(({percent:e=0,size:t="medium",status:o="normal",showInfo:n=!0,format:a,strokeColor:r,trailColor:s,success:c,className:d,style:p,...u},f)=>{let h=qt(e),g=jt(o,h),l=Gt(h,g,a,c);return Di(On,{ref:f,className:`compass-progress compass-progress--line ${d||""}`,style:p,size:t,status:g,role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${h}%`,...u,children:[Do(Wn,{size:t,status:g,style:{...s?{backgroundColor:s}:{}},children:Do(An,{percent:h,size:t,status:g,strokeColor:typeof r=="string"?r:void 0,style:{background:typeof r=="object"?`linear-gradient(${r.direction||"to right"}, ${r.from}, ${r.to})`:void 0}})}),n&&Do(Vn,{size:t,status:g,children:l})]})});Io.displayName="LinearProgress";import Ii,{useMemo as zi,useId as Hi}from"react";import{jsx as Ke,jsxs as zo}from"react/jsx-runtime";var Ho=Ii.forwardRef(({percent:e=0,size:t="medium",status:o="normal",showInfo:n=!0,format:a,strokeWidth:r,strokeColor:s,trailColor:c,success:d,gapDegree:p,gapPosition:u="top",className:f,style:h,...g},l)=>{let i=qt(e),k=jt(o,i),v=Gt(i,k,a,d),C=zi(()=>{if(typeof t=="number")return t;switch(t){case"small":return 80;case"medium":return 120;case"large":return 160;default:return 120}},[t]),w=r??(t==="small"?4:t==="large"?8:6),M=(C-w)/2,H=2*Math.PI*M,V=H,O=H-i/100*H,D=Hi(),S=typeof s=="object",Y=Math.max(0,Math.min(295,p||0)),P=H*((360-Y)/360),R=`${P} ${H}`,J=0,Q=P*(1-i/100),A=()=>`rotate(${(u==="bottom"?90:u==="left"?180:u==="right"?0:-90)+Y/2}deg)`;return zo(Gn,{ref:l,className:`compass-progress compass-progress--circle ${f||""}`,style:h,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress ${i}%`,...g,children:[Ke(Yn,{width:C,children:zo(Kn,{style:p?{transform:A()}:void 0,children:[Ke(_n,{cx:C/2,cy:C/2,r:M,strokeWidth:w,strokeDasharray:p?R:void 0,strokeDashoffset:p?J:void 0,style:{stroke:c}}),Ke(qn,{cx:C/2,cy:C/2,r:M,strokeWidth:w,strokeDasharray:p?R:V,strokeDashoffset:p?Q:O,status:k,strokeColor:typeof s=="string"?s:void 0,style:{stroke:S?`url(#${D})`:void 0,transition:"stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s"}}),typeof s=="object"&&Ke("defs",{children:zo("linearGradient",{id:D,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[Ke("stop",{offset:"0%",stopColor:s.from}),Ke("stop",{offset:"100%",stopColor:s.to})]})})]})}),n&&Ke(jn,{width:C,size:t,children:v})]})});Ho.displayName="CircleProgress";import{jsx as Un}from"react/jsx-runtime";var Bo=Bi.forwardRef(({type:e="line",...t},o)=>e==="circle"?Un(Ho,{ref:o,...t}):Un(Io,{ref:o,...t}));Bo.displayName="Progress";var Ni=Bo;import pa,{useState as Eo,useRef as Ai,useMemo as da}from"react";import{useFloating as Vi,autoUpdate as Yi,offset as Ki,flip as _i,shift as qi,useDismiss as ji,useRole as Gi,useClick as Qi,useInteractions as Ui,FloatingPortal as Xi,size as Ji,useHover as Zi,safePolygon as el}from"@floating-ui/react";import Xn from"react";var No=Xn.createContext(null),Jn=()=>{let e=Xn.useContext(No);if(!e)throw new Error("Select compounds must be used within a Select component");return e};import{useMemo as Li}from"react";import ye from"@emotion/styled";import{keyframes as Fi}from"@emotion/react";var Ei=Fi`
|
|
823
|
+
from {
|
|
824
|
+
transform: rotate(0deg);
|
|
825
|
+
}
|
|
826
|
+
to {
|
|
827
|
+
transform: rotate(360deg);
|
|
828
|
+
}
|
|
829
|
+
`,Zn=ye.span`
|
|
830
|
+
display: inline-flex;
|
|
831
|
+
animation: ${Ei} 1s linear infinite;
|
|
832
|
+
`,ea=ye.div`
|
|
833
|
+
position: relative;
|
|
834
|
+
display: inline-flex;
|
|
835
|
+
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
836
|
+
min-width: 120px;
|
|
837
|
+
opacity: ${({disabled:e})=>e?.5:1};
|
|
838
|
+
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
839
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
840
|
+
`,ta=ye.div`
|
|
841
|
+
display: flex;
|
|
842
|
+
align-items: center;
|
|
843
|
+
justify-content: space-between;
|
|
844
|
+
width: 100%;
|
|
845
|
+
padding: ${({size:e,theme:t})=>{let o=t.components?.select?.padding;switch(e){case"small":return o?.sm||"1px 8px";case"large":return o?.lg||"6px 16px";default:return o?.md||"3px 12px"}}};
|
|
846
|
+
font-size: ${({size:e,theme:t})=>{let o=t.components?.select?.fontSize;return e==="small"?o?.sm||"12px":o?.md||"14px"}};
|
|
847
|
+
line-height: 1.5;
|
|
848
|
+
background-color: ${({theme:e})=>e.components?.select?.backgroundColor||e.colors?.background||"#fff"};
|
|
849
|
+
border: 1px solid
|
|
850
|
+
${({theme:e,active:t,status:o})=>o==="error"?e.colors?.error||"#f5222d":o==="warning"?e.colors?.warning||"#faad14":t?e.components?.select?.activeBorderColor||e.colors?.primary||"#1890ff":e.components?.select?.borderColor||e.colors?.border||"#d9d9d9"};
|
|
851
|
+
border-radius: ${({theme:e})=>e.components?.select?.borderRadius||(e.borderRadius?.md?`${e.borderRadius.md}px`:"4px")};
|
|
852
|
+
transition: all 0.3s;
|
|
853
|
+
box-shadow: ${({active:e,theme:t})=>e?`0 0 0 2px ${t.colors?.primary||"#1890ff"}20`:"none"};
|
|
854
|
+
|
|
855
|
+
&:hover {
|
|
856
|
+
border-color: ${({theme:e,status:t})=>{if(!t)return e.components?.select?.hoverBorderColor||e.colors?.primary||"#1890ff"}};
|
|
857
|
+
}
|
|
858
|
+
`,oa=ye.div`
|
|
859
|
+
position: relative;
|
|
860
|
+
flex: 1;
|
|
861
|
+
overflow: hidden;
|
|
862
|
+
text-overflow: ellipsis;
|
|
863
|
+
white-space: nowrap;
|
|
864
|
+
margin-right: 8px;
|
|
865
|
+
display: flex;
|
|
866
|
+
flex-wrap: wrap;
|
|
867
|
+
align-items: center;
|
|
868
|
+
gap: 4px;
|
|
869
|
+
min-height: ${({size:e})=>e==="small"?"20px":e==="large"?"26px":"24px"};
|
|
870
|
+
`,Ct=ye.span`
|
|
871
|
+
color: ${({theme:e})=>e.components?.select?.placeholderColor||e.colors?.textSecondary||"#bfbfbf"};
|
|
872
|
+
`,ra=ye.div`
|
|
873
|
+
padding: 4px 0;
|
|
874
|
+
background-color: ${({theme:e})=>e.colors?.background||"#fff"};
|
|
875
|
+
border-radius: ${({theme:e})=>e.borderRadius?.md?`${e.borderRadius.md}px`:"4px"};
|
|
876
|
+
box-shadow:
|
|
877
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
878
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
879
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
880
|
+
z-index: 1050;
|
|
881
|
+
max-height: 256px;
|
|
882
|
+
overflow-y: auto;
|
|
883
|
+
`,na=ye.div`
|
|
884
|
+
padding: 0 12px;
|
|
885
|
+
min-height: 32px;
|
|
886
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
887
|
+
transition: all 0.3s;
|
|
888
|
+
background-color: ${({selected:e,active:t,theme:o})=>e?o.components?.select?.optionSelectedBg||"#e6f7ff":t?o.components?.select?.optionHoverBg||"#e6e6e6":"transparent"};
|
|
889
|
+
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)"};
|
|
890
|
+
|
|
891
|
+
.compass-icon-check {
|
|
892
|
+
color: ${({theme:e,selected:t})=>t?e.colors?.primary||"#1890ff":"inherit"};
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
font-weight: 400;
|
|
896
|
+
display: flex;
|
|
897
|
+
align-items: center;
|
|
898
|
+
justify-content: space-between;
|
|
899
|
+
|
|
900
|
+
&:hover {
|
|
901
|
+
background-color: ${({disabled:e,selected:t,theme:o})=>e?"transparent":t?o.components?.select?.optionSelectedBg||"#e6f7ff":o.components?.select?.optionHoverBg||"#e6e6e6"};
|
|
902
|
+
}
|
|
903
|
+
`,aa=ye.span`
|
|
904
|
+
display: inline-flex;
|
|
905
|
+
align-items: center;
|
|
906
|
+
height: 24px;
|
|
907
|
+
padding: 0 8px;
|
|
908
|
+
font-size: 12px;
|
|
909
|
+
line-height: normal;
|
|
910
|
+
background: ${({theme:e})=>e.components?.select?.tagBg||e.colors?.backgroundSecondary||"#f5f5f5"};
|
|
911
|
+
color: ${({theme:e})=>e.components?.select?.tagColor||"inherit"};
|
|
912
|
+
border: ${({theme:e})=>e.components?.select?.tagBorderColor?`1px solid ${e.components.select.tagBorderColor}`:"none"};
|
|
913
|
+
border-radius: 4px;
|
|
914
|
+
margin-right: 4px;
|
|
915
|
+
margin-top: 1px;
|
|
916
|
+
margin-bottom: 1px;
|
|
917
|
+
|
|
918
|
+
/* Select text span inside */
|
|
919
|
+
& > span {
|
|
920
|
+
display: flex;
|
|
921
|
+
align-items: center;
|
|
922
|
+
height: 100%;
|
|
923
|
+
}
|
|
924
|
+
`,sa=ye.span`
|
|
925
|
+
margin-left: 4px;
|
|
926
|
+
cursor: pointer;
|
|
927
|
+
font-size: 12px;
|
|
928
|
+
width: 16px;
|
|
929
|
+
height: 16px;
|
|
930
|
+
display: flex;
|
|
931
|
+
align-items: center;
|
|
932
|
+
justify-content: center;
|
|
933
|
+
border-radius: 50%;
|
|
934
|
+
color: ${({theme:e})=>e.colors?.textSecondary||"rgba(0, 0, 0, 0.45)"};
|
|
935
|
+
line-height: 0;
|
|
936
|
+
transform: scale(0.8);
|
|
937
|
+
|
|
938
|
+
&:hover {
|
|
939
|
+
color: ${({theme:e})=>e.colors?.text||"rgba(0, 0, 0, 0.88)"};
|
|
940
|
+
}
|
|
941
|
+
`,ia=ye.span`
|
|
942
|
+
display: flex;
|
|
943
|
+
align-items: center;
|
|
944
|
+
color: ${({theme:e})=>e.colors?.textSecondary||"rgba(0, 0, 0, 0.25)"};
|
|
945
|
+
font-size: 12px;
|
|
946
|
+
line-height: 0;
|
|
947
|
+
`,Fo=ye.input`
|
|
948
|
+
margin: 0;
|
|
949
|
+
padding: 0;
|
|
950
|
+
background: transparent;
|
|
951
|
+
border: none;
|
|
952
|
+
outline: none;
|
|
953
|
+
appearance: none;
|
|
954
|
+
font-family: inherit;
|
|
955
|
+
font-size: inherit;
|
|
956
|
+
width: 100%;
|
|
957
|
+
height: 24px;
|
|
958
|
+
margin-top: 1px;
|
|
959
|
+
margin-bottom: 1px;
|
|
960
|
+
min-width: 4px;
|
|
961
|
+
`,la=ye.div`
|
|
962
|
+
display: inline-block;
|
|
963
|
+
max-width: 100%;
|
|
964
|
+
`;import{jsx as ca,jsxs as Wi}from"react/jsx-runtime";var Oi=({value:e,children:t,disabled:o,className:n,style:a,label:r})=>{let{value:s,onSelect:c,multiple:d}=Jn(),p=Li(()=>d&&Array.isArray(s)?s.includes(e):s===e,[s,e,d]),u=f=>{if(o)return;f.preventDefault(),f.stopPropagation(),c(e,{value:e,label:r||t,disabled:o})};return Wi(na,{className:`compass-select-option ${p?"compass-select-option-selected":""} ${n||""}`,style:a,onClick:u,selected:p,disabled:o,role:"option","aria-selected":p,children:[ca("span",{className:"compass-select-option-content",children:t}),p&&ca(Rt,{})]})},Qt=Oi;import{Fragment as ua,jsx as Z,jsxs as kt}from"react/jsx-runtime";var Lo=e=>{let{children:t,options:o,value:n,defaultValue:a,onChange:r,disabled:s,loading:c,allowClear:d,placeholder:p,className:u,style:f,multiple:h=!1,mode:g,size:l="medium",status:i,dropdownStyle:k,dropdownClassName:v,trigger:C="click",showSearch:w}=e,M=h||g==="multiple"||g==="tags",H=g==="tags",[V,O]=Eo(a||(M?[]:"")),D=n!==void 0,S=D?n:V,[Y,P]=Eo(!1),[R,J]=Eo(""),Q=Ai(null),A=da(()=>{let F=[];return o?F=o:pa.Children.forEach(t,_=>{if(pa.isValidElement(_)&&(_.type===Qt||typeof _.type=="function"&&_.type.name==="Option")){let{value:oe,children:be,disabled:Me,...we}=_.props;F.push({value:oe,label:be,disabled:Me,...we})}}),F},[t,o]),K=da(()=>R?A.filter(F=>String(F.label).toLowerCase().includes(R.toLowerCase())):A,[A,R]),se=F=>{s||(P(F),F?setTimeout(()=>{w&&Q.current?.focus()},0):J(""))},{x:te,y:ie,refs:$,floatingStyles:B,context:x}=Vi({open:Y,onOpenChange:se,placement:"bottom-start",middleware:[Ki(4),_i(),qi(),Ji({apply({rects:F,elements:_}){Object.assign(_.floating.style,{minWidth:`${F.reference.width}px`})}})],whileElementsMounted:Yi}),U=Qi(x,{enabled:C==="click"}),T=Zi(x,{enabled:C==="hover",handleClose:el()}),L=ji(x),ee=Gi(x,{role:"listbox"}),{getReferenceProps:fe,getFloatingProps:W}=Ui([U,T,L,ee]),z=F=>{let _=A.find(oe=>oe.value===F);return _?_.label:F},ge=(F,_)=>{D||O(F),r?.(F,_)},X=(F,_)=>{if(M){let oe=Array.isArray(S)?S:[],be=oe.indexOf(F),Me,we=[];be===-1?Me=[...oe,F]:Me=oe.filter(Ee=>Ee!==F),we=Me.map(Ee=>A.find(Qa=>Qa.value===Ee)||{value:Ee,label:Ee}),ge(Me,we),J(""),w&&Q.current?.focus()}else ge(F,_),P(!1),J("")},lt=F=>{F.stopPropagation(),ge(M?[]:"",M?[]:{})},N=(F,_)=>{_.stopPropagation();let be=(Array.isArray(S)?S:[]).filter(we=>we!==F),Me=be.map(we=>A.find(Ee=>Ee.value===we)||{value:we,label:we});ge(be,Me)},j=F=>{J(F.target.value),Y||P(!0)},I=F=>{if(F.key==="Enter"&&H&&R){let _=A.find(oe=>oe.value===R);if(_)X(_.value,_);else{let oe=R;X(oe,{value:oe,label:oe})}F.preventDefault()}},G=()=>{if(M){let F=Array.isArray(S)?S:[];return kt(ua,{children:[F.map(_=>kt(aa,{children:[Z("span",{children:z(_)}),Z(sa,{onClick:oe=>N(_,oe),children:Z(Xe,{})})]},_)),(w||H)&&Z(la,{style:{width:R?"auto":"4px",minWidth:"50px",flex:1},children:Z(Fo,{ref:Q,value:R,onChange:j,onKeyDown:I,disabled:s,style:{width:"100%"}})}),!R&&F.length===0&&!w&&!H&&Z(Ct,{children:p}),F.length===0&&!R&&(w||H)&&Z(Ct,{style:{position:"absolute",left:0,pointerEvents:"none"},children:p})]})}return w?kt(ua,{children:[!R&&(S!==void 0&&S!==""?Z("span",{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:z(S)}):Z(Ct,{style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:p})),Z(Fo,{ref:Q,value:R,onChange:j,onKeyDown:I,disabled:s,style:{opacity:Y||R?1:0}})]}):!S&&S!==0?Z(Ct,{children:p}):z(S)},ct=d&&!s&&(M?Array.isArray(S)&&S.length>0:S!==""&&S!==void 0&&S!==null),pt={value:S,onSelect:X,multiple:M,searchValue:R,activeValue:null,setActiveValue:()=>{}},dt=$.setReference;return Z(No.Provider,{value:pt,children:kt(ea,{ref:dt,className:`compass-select ${u||""} ${Y?"compass-select-open":""} ${s?"compass-select-disabled":""}`,style:f,disabled:s,fullWidth:!0,...fe({onClick:()=>{(w||H)&&Q.current?.focus()}}),children:[kt(ta,{size:l,active:Y,status:i,className:"compass-select-selector",children:[Z(oa,{size:l,children:G()}),Z(ia,{children:c?Z(Zn,{children:Z(Tt,{})}):ct?Z("span",{onClick:lt,style:{cursor:"pointer"},children:Z(De,{})}):Z($r,{})})]}),Y&&Z(Xi,{children:Z(ra,{ref:$.setFloating,style:{...k,...B,opacity:te===null||ie===null?0:1,visibility:te===null||ie===null?"hidden":"visible"},className:`compass-select-dropdown ${v||""}`,...W(),children:K.length>0?K.map(F=>Z(Qt,{...F,children:F.label},F.value)):Z("div",{style:{padding:"8px 12px",color:"#999",textAlign:"center"},children:"No Data"})})})]})})};Lo.Option=Qt;Lo.displayName="Select";var ma=Lo;var Ut=ma;import{useState as _o,useEffect as qo}from"react";import Oo from"@emotion/styled";var Wo=Oo.ul`
|
|
965
|
+
display: flex;
|
|
966
|
+
align-items: center;
|
|
967
|
+
list-style: none;
|
|
968
|
+
padding: 0;
|
|
969
|
+
margin: 0;
|
|
970
|
+
font-size: ${({theme:e})=>e.components?.pagination?.fontSize||"14px"};
|
|
971
|
+
color: ${({theme:e})=>e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)"};
|
|
972
|
+
opacity: ${({disabled:e})=>e?.5:1};
|
|
973
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"default"};
|
|
974
|
+
|
|
975
|
+
.compass-pagination-simple-input {
|
|
976
|
+
width: ${({size:e})=>e==="small"?"40px":"50px"};
|
|
977
|
+
height: ${({size:e})=>e==="small"?"24px":"32px"};
|
|
978
|
+
margin: 0 8px;
|
|
979
|
+
|
|
980
|
+
.compass-input-field {
|
|
981
|
+
height: 100%;
|
|
982
|
+
padding: 0 6px;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
input {
|
|
986
|
+
text-align: center;
|
|
987
|
+
height: 100%;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* Hide spin buttons for input type number in Pagination */
|
|
992
|
+
input[type='number']::-webkit-inner-spin-button,
|
|
993
|
+
input[type='number']::-webkit-outer-spin-button {
|
|
994
|
+
-webkit-appearance: none;
|
|
995
|
+
margin: 0;
|
|
996
|
+
}
|
|
997
|
+
input[type='number'] {
|
|
998
|
+
-moz-appearance: textfield;
|
|
999
|
+
}
|
|
1000
|
+
`,_e=Oo.li`
|
|
1001
|
+
display: inline-flex;
|
|
1002
|
+
justify-content: center;
|
|
1003
|
+
align-items: center;
|
|
1004
|
+
min-width: ${({theme:e,size:t})=>t==="small"?"24px":e.components?.pagination?.itemSize||"32px"};
|
|
1005
|
+
height: ${({theme:e,size:t})=>t==="small"?"24px":e.components?.pagination?.itemSize||"32px"};
|
|
1006
|
+
margin-right: 8px;
|
|
1007
|
+
border-radius: ${({theme:e})=>e.components?.pagination?.itemBorderRadius||"4px"};
|
|
1008
|
+
background-color: ${({theme:e,active:t})=>t?e.components?.pagination?.itemActiveBg||"#ffffff":e.components?.pagination?.itemBg||"#ffffff"};
|
|
1009
|
+
border: 1px solid
|
|
1010
|
+
${({theme:e,active:t})=>t?e.colors?.primary||"#1890ff":e.colors?.border||"#d9d9d9"};
|
|
1011
|
+
color: ${({theme:e,active:t})=>t?e.components?.pagination?.itemActiveColor||"#1890ff":e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)"};
|
|
1012
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1013
|
+
user-select: none;
|
|
1014
|
+
transition: all 0.2s;
|
|
1015
|
+
font-weight: ${({active:e})=>e?600:400};
|
|
1016
|
+
|
|
1017
|
+
&:hover {
|
|
1018
|
+
border-color: ${({theme:e,active:t,disabled:o})=>o?t?e.colors?.primary||"#1890ff":e.colors?.border||"#d9d9d9":t?e.colors?.primary||"#1890ff":e.colors?.primaryHover||"#40a9ff"};
|
|
1019
|
+
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"};
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
a {
|
|
1023
|
+
color: inherit;
|
|
1024
|
+
text-decoration: none;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.compass-icon {
|
|
1028
|
+
display: flex;
|
|
1029
|
+
align-items: center;
|
|
1030
|
+
justify-content: center;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/* Jump Item specific styles */
|
|
1034
|
+
&.compass-pagination-jump-placeholder {
|
|
1035
|
+
position: relative;
|
|
1036
|
+
border: none;
|
|
1037
|
+
background: transparent;
|
|
1038
|
+
|
|
1039
|
+
&:hover {
|
|
1040
|
+
color: ${({theme:e,disabled:t})=>t?e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.88)":e.colors?.primary||"#1890ff"};
|
|
1041
|
+
|
|
1042
|
+
.compass-pagination-item-ellipsis {
|
|
1043
|
+
opacity: ${({disabled:e})=>e?1:0};
|
|
1044
|
+
pointer-events: none;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.compass-pagination-item-link-icon {
|
|
1048
|
+
opacity: ${({disabled:e})=>e?0:1};
|
|
1049
|
+
pointer-events: ${({disabled:e})=>e?"none":"auto"};
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.compass-pagination-item-ellipsis,
|
|
1055
|
+
.compass-pagination-item-link-icon {
|
|
1056
|
+
position: absolute;
|
|
1057
|
+
top: 50%;
|
|
1058
|
+
left: 50%;
|
|
1059
|
+
transform: translate(-50%, -50%);
|
|
1060
|
+
transition: all 0.2s;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.compass-pagination-item-ellipsis {
|
|
1064
|
+
opacity: 1;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.compass-pagination-item-link-icon {
|
|
1068
|
+
opacity: 0;
|
|
1069
|
+
font-size: 12px;
|
|
1070
|
+
}
|
|
1071
|
+
`,fm=Oo.li`
|
|
1072
|
+
display: inline-flex;
|
|
1073
|
+
justify-content: center;
|
|
1074
|
+
align-items: center;
|
|
1075
|
+
width: 32px;
|
|
1076
|
+
height: 32px;
|
|
1077
|
+
margin-right: 8px;
|
|
1078
|
+
color: ${({theme:e})=>e.components?.pagination?.itemColor||"rgba(0, 0, 0, 0.25)"};
|
|
1079
|
+
cursor: pointer;
|
|
1080
|
+
`;import Yo,{useState as Xt,useRef as tl}from"react";import Ao from"@emotion/styled";var fa=Ao(Bt)`
|
|
1081
|
+
padding-right: ${({size:e,controls:t})=>t?{small:"30px",medium:"34px",large:"38px"}[e||"medium"]:void 0};
|
|
1082
|
+
`,ga=Ao.div`
|
|
1083
|
+
display: flex;
|
|
1084
|
+
flex-direction: column;
|
|
1085
|
+
position: absolute;
|
|
1086
|
+
right: 0;
|
|
1087
|
+
top: 0;
|
|
1088
|
+
height: 100%;
|
|
1089
|
+
width: 22px;
|
|
1090
|
+
border-left: 1px solid ${({theme:e})=>e.colors?.border||"#d9d9d9"};
|
|
1091
|
+
border-radius: 0 ${({theme:e})=>e.components?.input?.borderRadius||"4px"}
|
|
1092
|
+
${({theme:e})=>e.components?.input?.borderRadius||"4px"} 0;
|
|
1093
|
+
overflow: hidden;
|
|
1094
|
+
opacity: 0;
|
|
1095
|
+
transition: opacity 0.2s;
|
|
1096
|
+
pointer-events: none;
|
|
1097
|
+
z-index: 1; // Ensure it sits above input content area if needed
|
|
1098
|
+
|
|
1099
|
+
// Show when InputWrapper (parent) is hovered or focused within
|
|
1100
|
+
.compass-input-number:hover &,
|
|
1101
|
+
.compass-input-number:focus-within & {
|
|
1102
|
+
opacity: 1;
|
|
1103
|
+
pointer-events: auto;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// Sync border color with parent hover state
|
|
1107
|
+
.compass-input-number:hover & {
|
|
1108
|
+
border-left-color: ${({theme:e})=>e.components?.input?.hoverBorderColor||"#4096ff"};
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// Sync border color with parent focus state
|
|
1112
|
+
.compass-input-number:focus-within & {
|
|
1113
|
+
border-left-color: ${({theme:e})=>e.components?.input?.activeBorderColor||"#40a9ff"};
|
|
1114
|
+
}
|
|
1115
|
+
`,Vo=Ao.button`
|
|
1116
|
+
display: flex;
|
|
1117
|
+
align-items: center;
|
|
1118
|
+
justify-content: center;
|
|
1119
|
+
flex: 1;
|
|
1120
|
+
width: 22px;
|
|
1121
|
+
padding: 0;
|
|
1122
|
+
border: none;
|
|
1123
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors?.border||"#d9d9d9"};
|
|
1124
|
+
background: transparent;
|
|
1125
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1126
|
+
color: ${({theme:e,disabled:t})=>t?e.colors?.textTertiary||"#bfbfbf":e.colors?.textSecondary||"#595959"};
|
|
1127
|
+
transition: all 0.2s;
|
|
1128
|
+
|
|
1129
|
+
// Sync separator border color
|
|
1130
|
+
.compass-input-number:hover & {
|
|
1131
|
+
border-bottom-color: ${({theme:e})=>e.components?.input?.hoverBorderColor||"#4096ff"};
|
|
1132
|
+
}
|
|
1133
|
+
.compass-input-number:focus-within & {
|
|
1134
|
+
border-bottom-color: ${({theme:e})=>e.components?.input?.activeBorderColor||"#40a9ff"};
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
&:last-of-type {
|
|
1138
|
+
border-bottom: none;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
&:hover:not(:disabled) {
|
|
1142
|
+
flex: 1.4; // Expand height on hover (60/40 ratio)
|
|
1143
|
+
background: ${({theme:e})=>e.colors?.backgroundSecondary||"#f5f5f5"};
|
|
1144
|
+
color: ${({theme:e})=>e.colors?.text||"#000"};
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
&:active:not(:disabled) {
|
|
1148
|
+
background: ${({theme:e})=>e.colors?.backgroundTertiary||"#e6e6e6"};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
svg {
|
|
1152
|
+
width: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
1153
|
+
height: ${({$size:e})=>e==="small"?"9px":"12px"};
|
|
1154
|
+
}
|
|
1155
|
+
`;import{jsx as ke,jsxs as Ko}from"react/jsx-runtime";var xa=Yo.forwardRef((e,t)=>{let{value:o,defaultValue:n,onChange:a,min:r,max:s,step:c=1,precision:d,controls:p=!0,keyboard:u=!0,disabled:f,onBlur:h,onPressEnter:g,onFocus:l,label:i,error:k,helperText:v,prefix:C,suffix:w,size:M="medium",fullWidth:H=!1,className:V,style:O,...D}=e,S=tl(null);Yo.useImperativeHandle(t,()=>S.current);let[Y,P]=Xt(!1),R=o!==void 0,[J,Q]=Xt(n??null),A=R?o===void 0?null:o:J,K=Yo.useCallback(W=>W===null?"":d!==void 0?W.toFixed(d):String(W),[d]),[se,te]=Xt(()=>K(A)),[ie,$]=Xt(A);A!==ie&&!Y&&(te(K(A)),$(A));let B=W=>{if(!W.trim())return null;let z=parseFloat(W);return isNaN(z)?null:z},x=W=>{let z=W;return r!==void 0&&z<r&&(z=r),s!==void 0&&z>s&&(z=s),z},U=W=>{P(!0),l?.(W)},T=W=>{let z=B(se);z!==null&&(z=x(z)),R||Q(z),a?.(z);let ge=K(z);te(ge),$(z),h?.(W),P(!1)},L=W=>{let z=W.target.value.trim();if(/^-?(\d+(\.\d*)?)?$/.test(z)||z===""||z==="-"){if(z==="-"&&r!==void 0&&r>=0)return;let X=B(z);if(X!==null&&s!==void 0&&X>s)return;te(z),R||Q(X),a?.(X)}},ee=W=>{let z=A??0,ge=W==="up"?c:-c,X=z+ge;d!==void 0?X=parseFloat(X.toFixed(d)):X=parseFloat(X.toFixed(10)),X=x(X),R||Q(X),a?.(X),te(K(X)),$(X)},fe=W=>{if(W.key==="Enter"){let z=B(se);z!==null&&(z=x(z)),R||Q(z),a?.(z),te(K(z)),$(z),g?.(W)}u&&!f&&(W.key==="ArrowUp"?(W.preventDefault(),ee("up")):W.key==="ArrowDown"&&(W.preventDefault(),ee("down")))};return Ko(mt,{fullWidth:H,className:V,style:O,children:[i&&ke(ft,{children:i}),Ko(fa,{error:!!k,disabled:f,focused:Y,size:M,controls:p,className:`compass-input-number compass-input-number--${M}`,children:[C&&ke(Ve,{$position:"start",children:C}),ke(xt,{ref:S,type:"text",role:"spinbutton","aria-valuenow":A??void 0,"aria-valuemin":r,"aria-valuemax":s,inputMode:"decimal",value:se,onChange:L,onBlur:T,onFocus:U,onKeyDown:fe,disabled:f,$size:M,...D}),w&&ke(Ve,{$position:"end",children:w}),p&&!f&&Ko(ga,{size:M,children:[ke(Vo,{type:"button",disabled:s!==void 0&&A!==null&&A>=s,onClick:()=>ee("up"),onMouseDown:W=>W.preventDefault(),$size:M,children:ke("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:ke("path",{d:"M6 3l4 4H2z"})})}),ke(Vo,{type:"button",disabled:r!==void 0&&A!==null&&A<=r,onClick:()=>ee("down"),onMouseDown:W=>W.preventDefault(),$size:M,children:ke("svg",{viewBox:"0 0 12 12",fill:"currentColor",children:ke("path",{d:"M6 9l4-4H2z"})})})]})]}),(v||k)&&ke(gt,{error:!!k,children:k&&typeof k!="boolean"?k:v})]})});xa.displayName="InputNumber";var ya=xa;var Jt=ya;import{useMemo as ol}from"react";var tt="...",Zt=(e,t)=>{let o=t-e+1;return Array.from({length:o},(n,a)=>a+e)},ha=({total:e,pageSize:t,siblingCount:o=1,current:n})=>ol(()=>{let r=Math.ceil(e/t),s=o+5;if(r<=s)return Zt(1,r);let c=Math.max(n-o,1),d=Math.min(n+o,r),p=c>2,u=d<r-2,f=1,h=r;if(!p&&u){let g=3+2*o;return[...Zt(1,g),tt,r]}if(p&&!u){let g=3+2*o,l=Zt(r-g+1,r);return[f,tt,...l]}if(p&&u){let g=Zt(c,d);return[f,tt,...g,tt,h]}return[]},[e,t,o,n])||[];var rl={locale:"en-US",Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},DatePicker:{monthBeforeYear:!0,yearFormat:"yyyy",monthFormat:"MMM",quarterFormat:"yyyy-KQ",weekFormat:"yyyy-wo",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",timeSelect:"Select time",dateSelect:"Select date",weekSelect:"Select week",clear:"Clear",month:"Month",year:"Year",previousMonth:"Previous month",nextMonth:"Next month",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dayFormat:"d",dateFormat:"M/d/yyyy",dateTimeFormat:"M/d/yyyy HH:mm:ss",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century",shortWeekDays:["Mo","Tu","We","Th","Fr","Sa","Su"],weekDays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hour:"Hour",minute:"Minute",second:"Second",startDate:"Start date",endDate:"End date"},Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},ba=rl;import{jsx as re,jsxs as ot}from"react/jsx-runtime";var nl=({current:e,defaultCurrent:t=1,total:o=0,pageSize:n,defaultPageSize:a=10,onChange:r,disabled:s,size:c="default",className:d,style:p,showSizeChanger:u,pageSizeOptions:f=[10,20,50,100],showQuickJumper:h,showTotal:g,simple:l,totalAlign:i="left",...k})=>{let{locale:v}=me(),C=v?.Pagination||ba.Pagination,[w,M]=_o(e||t),[H,V]=_o(n||a),[O,D]=_o(String(w));qo(()=>{e!==void 0&&(M(e),D(String(e)))},[e]),qo(()=>{D(String(w))},[w]),qo(()=>{n!==void 0&&V(n)},[n]);let S=Math.ceil(o/H),Y=ha({current:w,total:o,pageSize:H,siblingCount:1}),P=$=>{if(s)return;let B=$;B<1&&(B=1),B>S&&(B=S),B!==w&&(e===void 0&&M(B),r?.(B,H))},R=$=>{let B=Number($);V(B);let x=1;e===void 0&&M(x),r?.(x,B)},J=()=>{P(w-5)},Q=()=>{P(w+5)},A=$=>{D($===null?"":String($))},K=()=>{let $=parseInt(O,10);isNaN($)?$=w:($<1&&($=1),$>S&&($=S)),P($),D(String($))},se=$=>{let B=$.target,x=parseInt(B.value,10);isNaN(x)?x=w:(x<1&&(x=1),x>S&&(x=S)),P(x),D(String(x)),B.blur()};if(o===0)return null;if(l)return ot(Wo,{className:`compass-pagination compass-pagination-simple ${d||""}`,style:p,disabled:s,size:c,...k,"aria-label":"pagination",children:[re(_e,{disabled:w===1||s,onClick:()=>P(w-1),size:c,className:"compass-pagination-prev",title:C.prev_page,children:re(Le,{})}),ot("li",{style:{margin:"0 8px",display:"flex",alignItems:"center"},children:[re(Jt,{value:O?parseInt(O,10):null,onChange:A,onBlur:K,onPressEnter:se,size:c==="small"?"small":"medium",disabled:s,className:"compass-pagination-simple-input",min:1,max:S}),re("span",{style:{margin:"0 8px"},children:"/"}),S]}),re(_e,{disabled:w===S||s,onClick:()=>P(w+1),size:c,className:"compass-pagination-next",title:C.next_page,children:re(Oe,{})})]});let te=Y.map(($,B)=>{if($===tt){let x=B===1;return ot(_e,{className:"compass-pagination-jump-placeholder",size:c,disabled:s,title:x?C.prev_5:C.next_5,onClick:x?J:Q,children:[re("div",{className:"compass-pagination-item-ellipsis",children:re(Pr,{})}),re("div",{className:"compass-pagination-item-link-icon",children:x?re(Ie,{}):re(ze,{})})]},`dots-${B}`)}return re(_e,{active:w===$,disabled:s,size:c,onClick:()=>P(Number($)),className:`compass-pagination-item compass-pagination-item-${$} ${w===$?"compass-pagination-item-active":""}`,children:$},$)}),ie=()=>{if(!g)return null;let $=(w-1)*H+1,B=Math.min(w*H,o);return re("li",{className:"compass-pagination-total-text",style:{marginRight:i==="left"?8:0,marginLeft:i==="right"?8:0},children:g(o,[$,B])})};return ot(Wo,{className:`compass-pagination ${d||""}`,style:p,disabled:s,size:c,...k,"aria-label":"pagination",children:[i==="left"&&ie(),re(_e,{disabled:w===1||s,onClick:()=>P(w-1),size:c,className:"compass-pagination-prev",title:C.prev_page,children:re(Le,{})}),te,re(_e,{disabled:w===S||s,onClick:()=>P(w+1),size:c,className:"compass-pagination-next",title:C.next_page,children:re(Oe,{})}),u&&re("li",{className:"compass-pagination-options",style:{marginLeft:16},children:re(Ut,{size:c==="small"?"small":"medium",value:String(H),onChange:R,disabled:s,style:{width:c==="small"?90:110},children:f.map($=>ot(Ut.Option,{value:String($),children:[$," ",C.items_per_page]},$))})}),i==="right"&&ie(),h&&ot("li",{className:"compass-pagination-options compass-pagination-quick-jumper",style:{marginLeft:16,display:"flex",alignItems:"center"},children:[C.jump_to,re(Jt,{size:c==="small"?"small":"medium",disabled:s,style:{width:50,margin:"0 8px"},min:1,max:S,onBlur:$=>{let B=parseInt($.target.value,10);isNaN(B)||P(B),$.target.value=""},onPressEnter:$=>{let B=$.currentTarget,x=parseInt(B.value,10);isNaN(x)||(P(x),B.value="",B.blur())}})]})]})},va=nl;var al=va;import La,{useState as $t,useEffect as Oa}from"react";import{useFloating as Hl,useDismiss as Bl,useInteractions as Nl,offset as Fl,flip as El,shift as Ll,autoUpdate as Ol,FloatingPortal as Wl,FloatingFocusManager as Al}from"@floating-ui/react";import{format as qe,startOfWeek as Jo,endOfWeek as Wa,isWithinInterval as Aa,getISOWeek as Vl}from"date-fns";import Yl from"@emotion/styled";import{useMemo as sl,useState as Sa}from"react";import{startOfMonth as il,endOfMonth as ll,startOfWeek as cl,endOfWeek as pl,eachDayOfInterval as dl,addMonths as Ca,subMonths as ka,isSameMonth as ul,isSameDay as wa,isToday as ml}from"date-fns";var eo=({value:e,defaultValue:t})=>{let[o,n]=Sa(e||t||new Date),[a,r]=Sa(e);e&&e!==a&&!wa(o,e)&&(n(e),r(e));let s=sl(()=>{let g=il(o),l=ll(g),i=cl(g,{weekStartsOn:1}),k=pl(l,{weekStartsOn:1});return dl({start:i,end:k}).map(C=>({date:C,isCurrentMonth:ul(C,g),isToday:ml(C),isSelected:e?wa(C,e):!1}))},[o,e]);return{viewDate:o,days:s,nextMonth:()=>n(Ca(o,1)),prevMonth:()=>n(ka(o,1)),nextYear:()=>n(Ca(o,12)),prevYear:()=>n(ka(o,12)),setMonth:g=>{let l=new Date(o);l.setMonth(g),n(l)},setYear:g=>{let l=new Date(o);l.setFullYear(g),n(l)},setViewDate:n}};import Ma from"@emotion/styled";import{setMonth as $a,format as fl}from"date-fns";import{jsx as Pa}from"react/jsx-runtime";var gl=Ma.div`
|
|
1156
|
+
display: grid;
|
|
1157
|
+
grid-template-columns: repeat(3, 1fr);
|
|
1158
|
+
gap: 12px;
|
|
1159
|
+
padding: 8px 16px;
|
|
1160
|
+
`,xl=Ma.div`
|
|
1161
|
+
padding: 8px 12px;
|
|
1162
|
+
text-align: center;
|
|
1163
|
+
cursor: pointer;
|
|
1164
|
+
border-radius: 4px;
|
|
1165
|
+
font-size: 14px;
|
|
1166
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"transparent"};
|
|
1167
|
+
color: ${({theme:e,isSelected:t})=>t?"#fff":y(e,"colors").text};
|
|
1168
|
+
|
|
1169
|
+
&:hover {
|
|
1170
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1171
|
+
}
|
|
1172
|
+
`,Ta=({viewDate:e,onSelect:t,selectedDate:o})=>{let n=Array.from({length:12},(r,s)=>s),a=r=>{let s=$a(e,r);t(s)};return Pa(gl,{children:n.map(r=>{let s=$a(e,r),c=o?o.getMonth()===r&&o.getFullYear()===e.getFullYear():!1;return Pa(xl,{isSelected:c,onClick:()=>a(r),children:fl(s,"MMM")},r)})})};import Da from"@emotion/styled";import{setYear as yl}from"date-fns";import{jsx as Ra}from"react/jsx-runtime";var hl=Da.div`
|
|
1173
|
+
display: grid;
|
|
1174
|
+
grid-template-columns: repeat(3, 1fr);
|
|
1175
|
+
gap: 12px;
|
|
1176
|
+
padding: 8px 16px;
|
|
1177
|
+
`,bl=Da.div`
|
|
1178
|
+
padding: 8px 12px;
|
|
1179
|
+
text-align: center;
|
|
1180
|
+
cursor: pointer;
|
|
1181
|
+
border-radius: 4px;
|
|
1182
|
+
font-size: 14px;
|
|
1183
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"transparent"};
|
|
1184
|
+
color: ${({theme:e,isSelected:t,isCurrent:o})=>t?"#fff":o?y(e,"colors").text:y(e,"colors").textDisabled};
|
|
1185
|
+
|
|
1186
|
+
&:hover {
|
|
1187
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1188
|
+
}
|
|
1189
|
+
`,Ia=({viewDate:e,onSelect:t,selectedDate:o})=>{let n=e.getFullYear(),a=Math.floor(n/10)*10,r=Array.from({length:12},(c,d)=>a-1+d),s=c=>{let d=yl(e,c);t(d)};return Ra(hl,{children:r.map(c=>{let d=o?o.getFullYear()===c:!1,p=c>=a&&c<=a+9;return Ra(bl,{isSelected:d,isCurrent:p,onClick:()=>s(c),children:c},c)})})};import za from"@emotion/styled";import{setMonth as vl,getQuarter as Sl}from"date-fns";import{jsx as $l,jsxs as wl}from"react/jsx-runtime";var Cl=za.div`
|
|
1190
|
+
display: grid;
|
|
1191
|
+
grid-template-columns: repeat(4, 1fr);
|
|
1192
|
+
gap: 12px;
|
|
1193
|
+
padding: 24px 16px;
|
|
1194
|
+
`,kl=za.div`
|
|
1195
|
+
padding: 16px 12px;
|
|
1196
|
+
text-align: center;
|
|
1197
|
+
cursor: pointer;
|
|
1198
|
+
border-radius: 4px;
|
|
1199
|
+
font-size: 14px;
|
|
1200
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"transparent"};
|
|
1201
|
+
color: ${({theme:e,isSelected:t})=>t?"#fff":y(e,"colors").text};
|
|
1202
|
+
|
|
1203
|
+
&:hover {
|
|
1204
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"rgba(0, 0, 0, 0.08)"};
|
|
1205
|
+
}
|
|
1206
|
+
`,Ha=({viewDate:e,onSelect:t,selectedDate:o})=>{let n=[1,2,3,4],a=r=>{let s=vl(e,(r-1)*3);t(s)};return $l(Cl,{children:n.map(r=>{let s=o?Sl(o)===r&&o.getFullYear()===e.getFullYear():!1;return wl(kl,{isSelected:s,onClick:()=>a(r),children:["Q",r]},r)})})};import rt from"@emotion/styled";import{setHours as Pl,setMinutes as Ml,setSeconds as Tl}from"date-fns";import{jsx as Pe,jsxs as Uo}from"react/jsx-runtime";var Rl=rt.div`
|
|
1207
|
+
display: flex;
|
|
1208
|
+
flex-direction: column;
|
|
1209
|
+
border-left: 1px solid rgba(0, 0, 0, 0.06);
|
|
1210
|
+
height: 320px; // Fixed height to match date panel
|
|
1211
|
+
width: 160px;
|
|
1212
|
+
`,jo=rt.div`
|
|
1213
|
+
flex: 1;
|
|
1214
|
+
overflow-y: auto;
|
|
1215
|
+
padding: 4px 0;
|
|
1216
|
+
|
|
1217
|
+
&:not(:last-child) {
|
|
1218
|
+
border-right: 1px solid rgba(0, 0, 0, 0.06);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/* Custom scrollbar */
|
|
1222
|
+
&::-webkit-scrollbar {
|
|
1223
|
+
width: 6px;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
&::-webkit-scrollbar-track {
|
|
1227
|
+
background: transparent;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
&::-webkit-scrollbar-thumb {
|
|
1231
|
+
background: ${({theme:e})=>y(e,"colors").border};
|
|
1232
|
+
border-radius: 3px;
|
|
1233
|
+
|
|
1234
|
+
&:hover {
|
|
1235
|
+
background: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
`,Go=rt.div`
|
|
1239
|
+
padding: 6px 0;
|
|
1240
|
+
text-align: center;
|
|
1241
|
+
cursor: pointer;
|
|
1242
|
+
font-size: 14px;
|
|
1243
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1244
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primary:"transparent"};
|
|
1245
|
+
color: ${({theme:e,isSelected:t})=>t?"#fff":y(e,"colors").text};
|
|
1246
|
+
margin: 0 4px;
|
|
1247
|
+
border-radius: 4px;
|
|
1248
|
+
|
|
1249
|
+
&:hover {
|
|
1250
|
+
background: ${({theme:e,isSelected:t})=>t?y(e,"colors").primaryHover||y(e,"colors").primary:y(e,"colors").backgroundSecondary};
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
&:active {
|
|
1254
|
+
transform: scale(0.95);
|
|
1255
|
+
}
|
|
1256
|
+
`,Dl=rt.div`
|
|
1257
|
+
height: 41px;
|
|
1258
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
|
1259
|
+
box-sizing: border-box;
|
|
1260
|
+
display: flex;
|
|
1261
|
+
align-items: center;
|
|
1262
|
+
`,Qo=rt.div`
|
|
1263
|
+
flex: 1;
|
|
1264
|
+
text-align: center;
|
|
1265
|
+
font-size: 12px;
|
|
1266
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1267
|
+
font-weight: 400;
|
|
1268
|
+
line-height: 40px;
|
|
1269
|
+
`,Il=rt.div`
|
|
1270
|
+
display: flex;
|
|
1271
|
+
flex: 1;
|
|
1272
|
+
overflow: hidden;
|
|
1273
|
+
`,to=({value:e,onChange:t})=>{let{locale:o}=me(),n=Array.from({length:24},(u,f)=>f),a=Array.from({length:60},(u,f)=>f),r=Array.from({length:60},(u,f)=>f),s=e||new Date,c=u=>{t(Pl(s,u))},d=u=>{t(Ml(s,u))},p=u=>{t(Tl(s,u))};return Uo(Rl,{children:[Uo(Dl,{children:[Pe(Qo,{children:o?.DatePicker.hour||"\u65F6"}),Pe(Qo,{children:o?.DatePicker.minute||"\u5206"}),Pe(Qo,{children:o?.DatePicker.second||"\u79D2"})]}),Uo(Il,{children:[Pe(jo,{children:n.map(u=>Pe(Go,{isSelected:s.getHours()===u,onClick:()=>c(u),children:u.toString().padStart(2,"0")},u))}),Pe(jo,{children:a.map(u=>Pe(Go,{isSelected:s.getMinutes()===u,onClick:()=>d(u),children:u.toString().padStart(2,"0")},u))}),Pe(jo,{children:r.map(u=>Pe(Go,{isSelected:s.getSeconds()===u,onClick:()=>p(u),children:u.toString().padStart(2,"0")},u))})]})]})};import ae from"@emotion/styled";var oo=ae.div`
|
|
1274
|
+
position: relative;
|
|
1275
|
+
display: inline-block;
|
|
1276
|
+
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
1277
|
+
`,ro=ae.div`
|
|
1278
|
+
background: ${({theme:e})=>y(e,"colors").background};
|
|
1279
|
+
border: 1px solid ${({theme:e})=>m(e,"datePicker").borderColor};
|
|
1280
|
+
border-radius: 8px;
|
|
1281
|
+
box-shadow: ${({theme:e})=>m(e,"datePicker").boxShadow};
|
|
1282
|
+
width: auto;
|
|
1283
|
+
user-select: none;
|
|
1284
|
+
overflow: hidden;
|
|
1285
|
+
`,no=ae.div`
|
|
1286
|
+
display: flex;
|
|
1287
|
+
border-top: 1px solid ${({theme:e})=>m(e,"datePicker").borderColor};
|
|
1288
|
+
`,ao=ae.div`
|
|
1289
|
+
width: 280px;
|
|
1290
|
+
`,nt=ae.div`
|
|
1291
|
+
display: flex;
|
|
1292
|
+
justify-content: space-between;
|
|
1293
|
+
align-items: center;
|
|
1294
|
+
padding: ${({theme:e})=>m(e,"datePicker").headerPadding};
|
|
1295
|
+
`,at=ae.div`
|
|
1296
|
+
display: flex;
|
|
1297
|
+
align-items: center;
|
|
1298
|
+
gap: 4px;
|
|
1299
|
+
`,pe=ae.button`
|
|
1300
|
+
background: none;
|
|
1301
|
+
border: none;
|
|
1302
|
+
cursor: pointer;
|
|
1303
|
+
padding: 4px 8px;
|
|
1304
|
+
border-radius: 4px;
|
|
1305
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1306
|
+
font-size: 14px;
|
|
1307
|
+
line-height: 1;
|
|
1308
|
+
transition: all 0.2s;
|
|
1309
|
+
min-width: 24px;
|
|
1310
|
+
display: flex;
|
|
1311
|
+
align-items: center;
|
|
1312
|
+
justify-content: center;
|
|
1313
|
+
|
|
1314
|
+
&:hover {
|
|
1315
|
+
color: ${({theme:e})=>y(e,"colors").text};
|
|
1316
|
+
background: ${({theme:e})=>y(e,"colors").backgroundSecondary};
|
|
1317
|
+
}
|
|
1318
|
+
`,st=ae.div`
|
|
1319
|
+
font-weight: 500;
|
|
1320
|
+
cursor: pointer;
|
|
1321
|
+
font-size: ${({theme:e})=>m(e,"datePicker").headerFontSize};
|
|
1322
|
+
transition: color 0.2s;
|
|
1323
|
+
|
|
1324
|
+
&:hover {
|
|
1325
|
+
color: ${({theme:e})=>y(e,"colors").primary};
|
|
1326
|
+
}
|
|
1327
|
+
`,so=ae.div`
|
|
1328
|
+
display: grid;
|
|
1329
|
+
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1330
|
+
padding: 8px 12px 4px;
|
|
1331
|
+
text-align: center;
|
|
1332
|
+
`,wt=ae.div`
|
|
1333
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1334
|
+
font-size: ${({theme:e})=>m(e,"datePicker").weekDayFontSize};
|
|
1335
|
+
padding: 4px 0;
|
|
1336
|
+
font-weight: 400;
|
|
1337
|
+
`,io=ae.div`
|
|
1338
|
+
display: grid;
|
|
1339
|
+
grid-template-columns: ${({showWeekNumber:e})=>e?"40px repeat(7, 1fr)":"repeat(7, 1fr)"};
|
|
1340
|
+
gap: 0;
|
|
1341
|
+
padding: 4px 12px 8px;
|
|
1342
|
+
`,Ba=ae.div`
|
|
1343
|
+
height: ${({theme:e})=>m(e,"datePicker").cellHeight};
|
|
1344
|
+
width: 100%;
|
|
1345
|
+
margin: ${({theme:e})=>m(e,"datePicker").cellMargin} 0;
|
|
1346
|
+
display: flex;
|
|
1347
|
+
align-items: center;
|
|
1348
|
+
justify-content: center;
|
|
1349
|
+
font-size: ${({theme:e})=>m(e,"datePicker").weekDayFontSize};
|
|
1350
|
+
box-sizing: border-box;
|
|
1351
|
+
color: ${({theme:e,isSelected:t,isHovered:o})=>t||o?m(e,"datePicker").cellActiveColor:y(e,"colors").textSecondary};
|
|
1352
|
+
background: ${({theme:e,isSelected:t,isHovered:o})=>t?m(e,"datePicker").cellActiveBg:o?m(e,"datePicker").cellHoverBg:"transparent"};
|
|
1353
|
+
border-radius: ${({theme:e})=>m(e,"datePicker").cellBorderRadius} 0 0
|
|
1354
|
+
${({theme:e})=>m(e,"datePicker").cellBorderRadius};
|
|
1355
|
+
cursor: pointer;
|
|
1356
|
+
transition: all 0.2s;
|
|
1357
|
+
|
|
1358
|
+
&:hover {
|
|
1359
|
+
background: ${({theme:e,isSelected:t})=>t?m(e,"datePicker").cellActiveBg:m(e,"datePicker").cellHoverBg};
|
|
1360
|
+
color: ${({theme:e,isSelected:t})=>t?m(e,"datePicker").cellActiveColor:m(e,"datePicker").cellActiveColor};
|
|
1361
|
+
}
|
|
1362
|
+
`,zl=(e,t)=>{if(!e||!e.startsWith("#"))return e;let o=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`rgba(${o}, ${n}, ${a}, ${t})`},lo=ae.div`
|
|
1363
|
+
height: ${({theme:e})=>m(e,"datePicker").cellHeight};
|
|
1364
|
+
width: ${({isWeekMode:e,theme:t})=>e?"100%":m(t,"datePicker").cellWidth};
|
|
1365
|
+
margin: ${({isWeekMode:e,theme:t})=>e?`${m(t,"datePicker").cellMargin} 0`:`${m(t,"datePicker").cellMargin} auto`};
|
|
1366
|
+
display: flex;
|
|
1367
|
+
align-items: center;
|
|
1368
|
+
justify-content: center;
|
|
1369
|
+
cursor: pointer;
|
|
1370
|
+
box-sizing: border-box;
|
|
1371
|
+
font-size: ${({theme:e})=>m(e,"datePicker").cellFontSize};
|
|
1372
|
+
color: ${({theme:e,isCurrentMonth:t,isSelected:o,isHovered:n})=>o||n?m(e,"datePicker").cellActiveColor:t?m(e,"datePicker").cellColor:m(e,"datePicker").cellDisabledColor};
|
|
1373
|
+
background: ${({theme:e,isSelected:t,isHovered:o,isInRange:n})=>t?m(e,"datePicker").cellActiveBg:o?m(e,"datePicker").cellHoverBg:n?zl(y(e,"colors").primary,.2):"transparent"};
|
|
1374
|
+
border-radius: ${({isWeekMode:e,isWeekEnd:t,theme:o})=>e?t?`0 ${m(o,"datePicker").cellBorderRadius} ${m(o,"datePicker").cellBorderRadius} 0`:"0":m(o,"datePicker").cellBorderRadius};
|
|
1375
|
+
border: ${({theme:e,isToday:t,isSelected:o,isWeekMode:n,isHovered:a})=>n&&a?"1px solid transparent":!o&&t?`1px solid ${m(e,"datePicker").cellActiveBg}`:"1px solid transparent"};
|
|
1376
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1377
|
+
|
|
1378
|
+
&:hover {
|
|
1379
|
+
background: ${({theme:e,isSelected:t})=>t?m(e,"datePicker").cellActiveBg:m(e,"datePicker").cellHoverBg};
|
|
1380
|
+
color: ${({theme:e,isSelected:t})=>t?m(e,"datePicker").cellActiveColor:m(e,"datePicker").cellActiveColor};
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
&:active {
|
|
1384
|
+
transform: ${({isWeekMode:e})=>e?"none":"scale(0.95)"};
|
|
1385
|
+
}
|
|
1386
|
+
`,Na=ae.div`
|
|
1387
|
+
display: flex;
|
|
1388
|
+
align-items: center;
|
|
1389
|
+
position: relative;
|
|
1390
|
+
box-sizing: border-box;
|
|
1391
|
+
width: 100%;
|
|
1392
|
+
min-width: 320px;
|
|
1393
|
+
background-color: ${({theme:e})=>y(e,"colors").background};
|
|
1394
|
+
border: 1px solid
|
|
1395
|
+
${({theme:e,error:t,focused:o})=>t?y(e,"colors").error:o?m(e,"input").activeBorderColor:y(e,"colors").border};
|
|
1396
|
+
border-radius: ${({theme:e})=>m(e,"input").borderRadius};
|
|
1397
|
+
padding: 4px 11px;
|
|
1398
|
+
transition: all 0.2s;
|
|
1399
|
+
|
|
1400
|
+
&:hover {
|
|
1401
|
+
border-color: ${({theme:e,error:t,focused:o,disabled:n})=>n?y(e,"colors").border:t?y(e,"colors").error:o?m(e,"input").activeBorderColor:m(e,"input").hoverBorderColor};
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
${({disabled:e,theme:t})=>e&&`
|
|
1405
|
+
background-color: ${y(t,"colors").backgroundSecondary};
|
|
1406
|
+
cursor: not-allowed;
|
|
1407
|
+
opacity: 0.6;
|
|
1408
|
+
`}
|
|
1409
|
+
`,Xo=ae.input`
|
|
1410
|
+
flex: 1;
|
|
1411
|
+
border: none;
|
|
1412
|
+
outline: none;
|
|
1413
|
+
background: transparent;
|
|
1414
|
+
padding: 0;
|
|
1415
|
+
margin: 0;
|
|
1416
|
+
color: ${({theme:e})=>y(e,"colors").text};
|
|
1417
|
+
font-size: 14px;
|
|
1418
|
+
width: 100%;
|
|
1419
|
+
text-align: center;
|
|
1420
|
+
|
|
1421
|
+
&::placeholder {
|
|
1422
|
+
color: ${({theme:e})=>y(e,"colors").textDisabled};
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
&:disabled {
|
|
1426
|
+
cursor: not-allowed;
|
|
1427
|
+
}
|
|
1428
|
+
`,Fa=ae.span`
|
|
1429
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1430
|
+
margin: 0 8px;
|
|
1431
|
+
flex-shrink: 0;
|
|
1432
|
+
`,Ea=ae.div`
|
|
1433
|
+
position: absolute;
|
|
1434
|
+
bottom: -1px;
|
|
1435
|
+
height: 2px;
|
|
1436
|
+
background-color: ${({theme:e})=>y(e,"colors").primary};
|
|
1437
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1438
|
+
left: ${({position:e})=>e==="left"?"0":"50%"};
|
|
1439
|
+
width: 50%;
|
|
1440
|
+
pointer-events: none;
|
|
1441
|
+
opacity: 1;
|
|
1442
|
+
z-index: 1;
|
|
1443
|
+
`,it=ae.span`
|
|
1444
|
+
display: flex;
|
|
1445
|
+
align-items: center;
|
|
1446
|
+
color: ${({theme:e})=>y(e,"colors").textSecondary};
|
|
1447
|
+
margin-left: 8px;
|
|
1448
|
+
width: 16px;
|
|
1449
|
+
justify-content: center;
|
|
1450
|
+
font-size: 14px;
|
|
1451
|
+
transition: color 0.2s;
|
|
1452
|
+
|
|
1453
|
+
&:hover {
|
|
1454
|
+
color: ${({theme:e})=>y(e,"colors").text};
|
|
1455
|
+
}
|
|
1456
|
+
`;import{Fragment as _l,jsx as E,jsxs as he}from"react/jsx-runtime";var Kl=Yl.div`
|
|
1457
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1458
|
+
padding: 8px 16px;
|
|
1459
|
+
display: flex;
|
|
1460
|
+
justify-content: flex-end;
|
|
1461
|
+
align-items: center;
|
|
1462
|
+
`,Va=La.forwardRef((e,t)=>{let{value:o,defaultValue:n,onChange:a,picker:r="date",showTime:s=!1,format:c,disabled:d=!1,placeholder:p,clearable:u=!1,className:f,style:h,fullWidth:g=!1,...l}=e,[i,k]=$t(!1),[v,C]=$t(o||n||null),[w,M]=$t(r==="week"?"date":r),[H,V]=$t(null),[O,D]=$t(!1),S=I=>{I.stopPropagation(),C(null),a?.(null)},{locale:Y}=me(),P=Y?.DatePicker||Ce.DatePicker;Oa(()=>{o!==void 0&&C(o)},[o]),Oa(()=>{i&&M(r==="week"?"date":r)},[i,r]);let{viewDate:R,days:J,nextMonth:Q,prevMonth:A,nextYear:K,prevYear:se,setYear:te,setViewDate:ie}=eo({value:v}),{refs:$,floatingStyles:B,context:x}=Hl({open:i,onOpenChange:k,middleware:[Fl(4),El(),Ll()],whileElementsMounted:Ol,placement:"bottom-start"}),U=Bl(x),{getReferenceProps:T,getFloatingProps:L}=Nl([U]),ee=I=>{if(v&&w==="date"&&(I.setHours(v.getHours()),I.setMinutes(v.getMinutes()),I.setSeconds(v.getSeconds())),r==="week"){let G=Jo(I,{weekStartsOn:1});C(G),a?.(G),k(!1)}else C(I),s&&r==="date"||(a?.(I),k(!1))},fe=I=>{C(I)},W=(I,G)=>{ie(I),r===G?ee(I):G==="year"?M(r==="quarter"?"quarter":"month"):G==="month"&&M("date")},z=()=>{a?.(v),k(!1)},X=v?qe(v,c||(s&&r==="date"?P.dateTimeFormat||"yyyy-MM-dd HH:mm:ss":r==="year"?P.yearFormat||"yyyy":r==="month"?"yyyy-MM":r==="quarter"?P.quarterFormat||"yyyy-QQQ":r==="week"?P.weekFormat||"yyyy-wo":P.dateFormat||"yyyy-MM-dd")):"",lt=P.shortWeekDays,N=()=>{switch(w){case"year":{let I=Math.floor(R.getFullYear()/10)*10;return he(nt,{children:[E(pe,{onClick:()=>te(R.getFullYear()-10),children:E(Ie,{})}),E(st,{children:`${I}-${I+9}`}),E(pe,{onClick:()=>te(R.getFullYear()+10),children:E(ze,{})})]})}case"month":case"quarter":return he(nt,{children:[E(pe,{onClick:se,children:E(Ie,{})}),E(st,{onClick:()=>M("year"),children:qe(R,P.yearFormat)}),E(pe,{onClick:K,children:E(ze,{})})]});default:return he(nt,{children:[he(at,{children:[E(pe,{onClick:se,children:E(Ie,{})}),E(pe,{onClick:A,children:E(Le,{})})]}),E(st,{onClick:()=>M("month"),children:P.monthBeforeYear?`${qe(R,P.monthFormat)} ${qe(R,P.yearFormat)}`:`${qe(R,P.yearFormat)} ${qe(R,P.monthFormat)}`}),he(at,{children:[E(pe,{onClick:Q,children:E(Oe,{})}),E(pe,{onClick:K,children:E(ze,{})})]})]})}},j=()=>{switch(w){case"year":return E(Ia,{viewDate:R,selectedDate:v,onSelect:I=>W(I,"year")});case"month":return E(Ta,{viewDate:R,selectedDate:v,onSelect:I=>W(I,"month")});case"quarter":return E(Ha,{viewDate:R,selectedDate:v,onSelect:I=>W(I,"quarter")});default:{let I=r==="week";return he(_l,{children:[he(so,{showWeekNumber:I,children:[I&&E(wt,{}),lt.map(G=>E(wt,{children:G},G))]}),E(io,{showWeekNumber:I,onMouseLeave:()=>V(null),children:J.map((G,ct)=>{let pt=G.isSelected;if(r==="week"&&v){let oe=Jo(v,{weekStartsOn:1}),be=Wa(v,{weekStartsOn:1});pt=Aa(G.date,{start:oe,end:be})}let dt=!1;if(r==="week"&&H){let oe=Jo(H,{weekStartsOn:1}),be=Wa(H,{weekStartsOn:1});dt=Aa(G.date,{start:oe,end:be})}let F=ct%7===0,_=ct%7===6;return he(La.Fragment,{children:[I&&F&&E(Ba,{isSelected:pt,isHovered:dt,onClick:()=>ee(G.date),onMouseEnter:()=>V(G.date),children:Vl(G.date)}),E(lo,{isCurrentMonth:G.isCurrentMonth,isToday:G.isToday,isSelected:pt,isWeekMode:I,isWeekEnd:_,isHovered:dt,onClick:()=>ee(G.date),onMouseEnter:()=>V(G.date),children:qe(G.date,"d")})]},ct)})})]})}}};return he(oo,{ref:t,className:`compass-date-picker ${f||""}`,style:h,fullWidth:g,children:[E("div",{ref:$.setReference,...T(),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:E(ko,{...l,fullWidth:g,placeholder:p||P.dateSelect,value:X,readOnly:!0,disabled:d,onClick:()=>!d&&k(!i),onChange:I=>{I.target.value||(C(null),a?.(null))},suffix:u&&O&&X?E(it,{onClick:S,style:{cursor:"pointer"},onMouseDown:I=>{I.preventDefault()},children:E(De,{})}):E(it,{children:E(Dt,{})})})}),i&&E(Wl,{children:E(Al,{context:x,modal:!1,children:E("div",{ref:$.setFloating,style:{...B,zIndex:1e3},...L(),children:he(ro,{children:[N(),he(no,{children:[E(ao,{children:j()}),s&&r==="date"&&w==="date"&&E(to,{value:v,onChange:fe})]}),s&&r==="date"&&he(Kl,{children:[E("div",{})," ",E(le,{size:"small",variant:"primary",onClick:z,children:P.ok})]})]})})})})]})}),Ya=Va;Va.displayName="DatePicker";import ql,{useState as Pt,useEffect as jl,useRef as Gl}from"react";import{useFloating as Ql,useDismiss as Ul,useInteractions as Xl,offset as Jl,flip as Zl,shift as ec,autoUpdate as tc,FloatingPortal as oc,FloatingFocusManager as rc}from"@floating-ui/react";import{format as je,isSameDay as Ka,isWithinInterval as _a,isBefore as Zo,isAfter as nc}from"date-fns";import ac from"@emotion/styled";import{jsx as q,jsxs as Fe}from"react/jsx-runtime";var sc=ac.div`
|
|
1463
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1464
|
+
padding: 8px 16px;
|
|
1465
|
+
display: flex;
|
|
1466
|
+
justify-content: flex-end;
|
|
1467
|
+
align-items: center;
|
|
1468
|
+
`,qa=ql.forwardRef((e,t)=>{let{value:o,defaultValue:n,onChange:a,showTime:r=!1,format:s,disabled:c=!1,placeholder:d,clearable:p=!1,className:u,style:f,fullWidth:h=!1}=e,[g,l]=Pt(!1),[i,k]=Pt(o||n||[null,null]),[v,C]=Pt(null),[w,M]=Pt(null),[H,V]=Pt(!1),O=Gl(!1);jl(()=>{o!==void 0&&k(o)},[o]);let{viewDate:D,days:S,nextMonth:Y,prevMonth:P,nextYear:R,prevYear:J,setViewDate:Q}=eo({value:i[0]||new Date}),{locale:A}=me(),K=A?.DatePicker||Ce.DatePicker,se=N=>{!N&&(!i[0]||!i[1])&&(k([null,null]),C(null)),l(N)},{refs:te,floatingStyles:ie,context:$}=Ql({open:g,onOpenChange:se,middleware:[Jl(4),Zl(),ec()],whileElementsMounted:tc,placement:"bottom-start"}),B=Ul($),{getReferenceProps:x,getFloatingProps:U}=Xl([B]),T=N=>{if(v==="start"){let j=[N,i[1]];j[1]&&nc(N,j[1])&&(j[1]=null),k(j),r||(O.current&&j[0]&&j[1]?(a?.(j),l(!1),C(null)):(O.current=!0,C("end")))}else if(v==="end"){let j=[i[0],N];j[0]&&Zo(N,j[0])&&(j[0]=N,j[1]=i[0]),k(j),r||(O.current&&j[0]&&j[1]?(a?.(j),l(!1),C(null)):(O.current=!0,C("start")))}},L=(N,j)=>{let I=[...i];j==="start"?I[0]=N:I[1]=N,k(I)},ee=()=>{if(!i[0]){C("start");return}if(!i[1]){C("end");return}a?.(i),l(!1),C(null)},fe=N=>{c||(l(!0),O.current=!1,C(N),N==="start"&&i[0]?Q(i[0]):N==="end"&&i[1]&&Q(i[1]))},W=N=>{N.stopPropagation(),k([null,null]),a?.([null,null]),C(null)},z=()=>s||(r?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"),ge=N=>{if(i[0]&&i[1])return _a(N,{start:i[0],end:i[1]});if(v==="end"&&i[0]&&w){let j=Zo(i[0],w)?i[0]:w,I=Zo(i[0],w)?w:i[0];return _a(N,{start:j,end:I})}return!1},X=N=>i[0]&&Ka(N,i[0])||i[1]&&Ka(N,i[1]),lt=K.shortWeekDays;return Fe(oo,{ref:t,className:`compass-date-range-picker ${u||""}`,style:f,fullWidth:h,children:[q("div",{ref:te.setReference,...x(),children:Fe(Na,{focused:g,disabled:c,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),children:[q(Xo,{placeholder:d?.[0]||K.startDate,value:i[0]?je(i[0],z()):"",readOnly:!0,disabled:c,onClick:()=>fe("start")}),q(Fa,{children:"\u2192"}),q(Xo,{placeholder:d?.[1]||K.endDate,value:i[1]?je(i[1],z()):"",readOnly:!0,disabled:c,onClick:()=>fe("end")}),p&&H&&(i[0]||i[1])?q(it,{onClick:W,style:{cursor:"pointer"},role:"button","aria-label":"clear",children:q(De,{})}):q(it,{children:q(Dt,{})}),g&&v&&q(Ea,{position:v==="start"?"left":"right"})]})}),g&&q(oc,{children:q(rc,{context:$,modal:!1,children:q("div",{ref:te.setFloating,style:{...ie,zIndex:1e3},...U(),children:Fe(ro,{children:[Fe(nt,{children:[Fe(at,{children:[q(pe,{onClick:J,children:q(Ie,{})}),q(pe,{onClick:P,children:q(Le,{})})]}),q(st,{children:K.monthBeforeYear?`${je(D,K.monthFormat)} ${je(D,K.yearFormat)}`:`${je(D,K.yearFormat)} ${je(D,K.monthFormat)}`}),Fe(at,{children:[q(pe,{onClick:Y,children:q(Oe,{})}),q(pe,{onClick:R,children:q(ze,{})})]})]}),Fe(no,{children:[Fe(ao,{children:[q(so,{children:lt.map(N=>q(wt,{children:N},N))}),q(io,{children:S.map((N,j)=>{let I=ge(N.date),G=X(N.date);return q(lo,{isCurrentMonth:N.isCurrentMonth,isToday:N.isToday,isSelected:!!G,isInRange:I&&!G,onClick:()=>T(N.date),onMouseEnter:()=>M(N.date),onMouseLeave:()=>M(null),children:je(N.date,"d")},j)})})]}),r&&v&&q(to,{value:v==="start"?i[0]:i[1],onChange:N=>L(N,v)})]}),r&&q(sc,{children:q(le,{size:"small",variant:"primary",onClick:ee,disabled:v==="start"?!i[0]:!i[1],children:K.ok})})]})})})})]})}),ja=qa;qa.displayName="DateRangePicker";var Ga=Ya;Ga.RangePicker=ja;var ic=Ga;export{le as Button,xi as ConfigProvider,ic as DatePicker,Ls as Dropdown,ko as InputField,Jt as InputNumber,vo as Menu,si as Message,Ti as Modal,al as Pagination,Ni as Progress,Ut as Select,hs as Steps,Ss as Tree};
|