第7项:按路由加载页面并核验登录和开单冷启动预算
This commit is contained in:
1 parent
cb705d296e
commit
ea891570a9
71 files changed
+1250
-454
No files matched your search
+34
@@ -0,0 +1,34 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,$t as n,An as r,Bt as i,Dn as a,Dt as o,En as s,Fn as c,Ft as l,Hn as u,In as d,It as f,Kn as p,Nt as m,On as h,Ot as g,Pn as _,Qn as v,Qt as y,Rt as b,Sn as x,St as S,U as C,V as w,Vn as T,Wn as E,Wt as D,Xn as O,Xt as k,Yn as A,Z as j,Zn as M,Zt as N,_t as P,bn as F,cn as I,er as ee,fn as L,ft as te,gt as R,in as ne,kn as z,kt as B,lt as re,nn as ie,on as V,pn as H,qn as U,tn as ae,tr as W,un as oe,wn as G,wt as K,xn as se,xt as ce}from"./index-D422TGjj.js";import{C as le,S as ue,T as de,b as fe,v as pe,x as me,y as he}from"./TextArea-C-bIgxlu.js";import{_ as ge,d as _e,f as q,g as J,h as ve,m as ye,p as be}from"./input-CKrxaItg.js";var Y=e(W()),xe=e(ee()),X=e(t()),Se=e=>typeof e==`object`&&!!e&&e.nodeType===1,Ce=(e,t)=>(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`,Z=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Ce(n.overflowY,t)||Ce(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Q=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,we=e=>e.parentElement??(e.getRootNode().host||null),Te=(e,t)=>{if(typeof document>`u`)return[];let{scrollMode:n,block:r,inline:i,boundary:a,skipOverflowHiddenElements:o}=t,s=typeof a==`function`?a:e=>e!==a;if(!Se(e))throw TypeError(`Invalid target`);let c=document.scrollingElement||document.documentElement,l=[],u=e;for(;Se(u)&&s(u);){if(u=we(u),u===c){l.push(u);break}u!=null&&u===document.body&&Z(u)&&!Z(document.documentElement)||u!=null&&Z(u,o)&&l.push(u)}let d=window.visualViewport?.width??innerWidth,f=window.visualViewport?.height??innerHeight,{scrollX:p,scrollY:m}=window,{height:h,width:g,top:_,right:v,bottom:y,left:b}=e.getBoundingClientRect(),{top:x,right:S,bottom:C,left:w}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),T=r===`start`||r===`nearest`?_-x:r===`end`?y+C:_+h/2-x+C,E=i===`center`?b+g/2-w+S:i===`end`?v+S:b-w,D=[];for(let e=0;e<l.length;e++){let t=l[e],{height:a,width:o,top:s,right:u,bottom:x,left:S}=t.getBoundingClientRect();if(n===`if-needed`&&_>=0&&b>=0&&y<=f&&v<=d&&(t===c&&!Z(t)||_>=s&&y<=x&&b>=S&&v<=u))return D;let C=getComputedStyle(t),w=parseInt(C.borderLeftWidth,10),O=parseInt(C.borderTopWidth,10),k=parseInt(C.borderRightWidth,10),A=parseInt(C.borderBottomWidth,10),j=0,M=0,N=`offsetWidth`in t?t.offsetWidth-t.clientWidth-w-k:0,P=`offsetHeight`in t?t.offsetHeight-t.clientHeight-O-A:0,F=`offsetWidth`in t?t.offsetWidth===0?0:o/t.offsetWidth:0,I=`offsetHeight`in t?t.offsetHeight===0?0:a/t.offsetHeight:0;if(c===t)j=r===`start`?T:r===`end`?T-f:r===`nearest`?Q(m,m+f,f,O,A,m+T,m+T+h,h):T-f/2,M=i===`start`?E:i===`center`?E-d/2:i===`end`?E-d:Q(p,p+d,d,w,k,p+E,p+E+g,g),j=Math.max(0,j+m),M=Math.max(0,M+p);else{j=r===`start`?T-s-O:r===`end`?T-x+A+P:r===`nearest`?Q(s,x,a,O,A+P,T,T+h,h):T-(s+a/2)+P/2,M=i===`start`?E-S-w:i===`center`?E-(S+o/2)+N/2:i===`end`?E-u+k+N:Q(S,u,o,w,k+N,E,E+g,g);let{scrollLeft:e,scrollTop:n}=t;j=I===0?0:Math.max(0,Math.min(n+j/I,t.scrollHeight-a/I+P)),M=F===0?0:Math.max(0,Math.min(e+M/F,t.scrollWidth-o/F+N)),T+=n-j,E+=e-M}D.push({el:t,top:j,left:M})}return D},Ee=e=>!1===e?{block:`end`,inline:`nearest`}:(e=>e===Object(e)&&Object.keys(e).length!==0)(e)?e:{block:`start`,inline:`nearest`};function De(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>typeof e==`object`&&typeof e.behavior==`function`)(t))return t.behavior(Te(e,t));let r=typeof t==`boolean`||t==null?void 0:t.behavior;for(let{el:i,top:a,left:o}of Te(e,Ee(t))){let e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var Oe=()=>Y.useReducer(e=>e+1,0),ke=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Ae=new se(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),je=new se(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),Me=new se(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Ne=new se(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Pe=new se(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Fe=new se(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Ie={"move-up":{inKeyframes:new se(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new se(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:Ae,outKeyframes:je},"move-left":{inKeyframes:Me,outKeyframes:Ne},"move-right":{inKeyframes:Pe,outKeyframes:Fe}},Le=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Ie[t];return[te(r,i,a,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};function Re(e){return t=>Y.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},Y.createElement(e,Object.assign({},t)))}var ze=(e,t,n,r,i)=>Re(a=>{let{prefixCls:o,style:s}=a,c=Y.useRef(null),[l,u]=Y.useState(0),[d,f]=Y.useState(0),[p,m]=ie(!1,{value:a.open}),{getPrefixCls:h}=Y.useContext(I),g=h(r||`select`,o);Y.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let _=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},s),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});n&&(_=n(_)),t&&Object.assign(_,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});let v={paddingBottom:l,position:`relative`,minWidth:d};return Y.createElement(`div`,{ref:c,style:v},Y.createElement(e,Object.assign({},_)))}),Be=function(e){var t=e.className,n=e.customizeIcon,r=e.customizeIconProps,i=e.children,a=e.onMouseDown,o=e.onClick,s=typeof n==`function`?n(r):n;return Y.createElement(`span`,{className:t,onMouseDown:function(e){e.preventDefault(),a?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`},unselectable:`on`,onClick:o,"aria-hidden":!0},s===void 0?Y.createElement(`span`,{className:(0,X.default)(t.split(/\s+/).map(function(e){return`${e}-icon`}))},i):s)},Ve=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0&&arguments[5],o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,c=Y.useMemo(function(){if(M(r)===`object`)return r.clearIcon;if(i)return i},[r,i]);return{allowClear:Y.useMemo(function(){return!(a||!r||!n.length&&!o||s===`combobox`&&o===``)},[r,a,n.length,o,s]),clearIcon:Y.createElement(Be,{className:`${e}-clear`,onMouseDown:t,customizeIcon:c},`×`)}},He=Y.createContext(null);function Ue(){return Y.useContext(He)}function We(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=Y.useState(!1),n=h(t,2),r=n[0],i=n[1],a=Y.useRef(null),o=function(){window.clearTimeout(a.current)};return Y.useEffect(function(){return o},[]),[r,function(t,n){o(),a.current=window.setTimeout(function(){i(t),n&&n()},e)},o]}function Ge(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=Y.useRef(null),n=Y.useRef(null);Y.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function Ke(e,t,n,r){var i=Y.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},Y.useEffect(function(){function t(t){var n;if(!((n=i.current)!=null&&n.customizedTrigger)){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),i.current.open&&e().filter(function(e){return e}).every(function(e){return!e.contains(r)&&e!==r})&&i.current.triggerOpen(!1)}}return window.addEventListener(`mousedown`,t),function(){return window.removeEventListener(`mousedown`,t)}},[])}function qe(e){return e&&![g.ESC,g.SHIFT,g.BACKSPACE,g.TAB,g.WIN_KEY,g.ALT,g.META,g.WIN_KEY_RIGHT,g.CTRL,g.SEMICOLON,g.EQUALS,g.CAPS_LOCK,g.CONTEXT_MENU,g.F1,g.F2,g.F3,g.F4,g.F5,g.F6,g.F7,g.F8,g.F9,g.F10,g.F11,g.F12].includes(e)}function Je(e,t,n){var r=p(p({},e),n?t:{});return Object.keys(t).forEach(function(n){var i=t[n];typeof i==`function`&&(r[n]=function(){var t,r=[...arguments];return i.apply(void 0,r),(t=e[n])?.call.apply(t,[e].concat(r))})}),r}var Ye=[`prefixCls`,`id`,`inputElement`,`autoFocus`,`autoComplete`,`editable`,`activeDescendantId`,`value`,`open`,`attrs`],$=Y.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.inputElement,a=e.autoFocus,o=e.autoComplete,c=e.editable,l=e.activeDescendantId,u=e.value,f=e.open,m=e.attrs,h=s(e,Ye),g=i||Y.createElement(`input`,null),_=g,v=_.ref,y=_.props;return`maxLength`in g.props,g=Y.cloneElement(g,p(p(p({type:`search`},Je(h,y,!0)),{},{id:r,ref:d(t,v),autoComplete:o||`off`,autoFocus:a,className:(0,X.default)(`${n}-selection-search-input`,y?.className),role:`combobox`,"aria-expanded":f||!1,"aria-haspopup":`listbox`,"aria-owns":`${r}_list`,"aria-autocomplete":`list`,"aria-controls":`${r}_list`,"aria-activedescendant":f?l:void 0},m),{},{value:c?u:``,readOnly:!c,unselectable:c?null:`on`,style:p(p({},y.style),{},{opacity:c?null:0})})),g});function Xe(e){return Array.isArray(e)?e:e===void 0?[]:[e]}var Ze=typeof window<`u`&&window.document&&window.document.documentElement;function Qe(e){return e!=null}function $e(e){return!e&&e!==0}function et(e){return[`string`,`number`].includes(M(e))}function tt(e){var t=void 0;return e&&(et(e.title)?t=e.title.toString():et(e.label)&&(t=e.label.toString())),t}function nt(e,t){Ze?Y.useLayoutEffect(e,t):Y.useEffect(e,t)}function
Line truncated
|
||||
`,`\r
|
||||
`].includes(e)})},[L]),et=Y.useContext(_t)||{},tt=et.maxCount,nt=et.rawValues,rt=function(e,t,n){if(!(q&&ft(tt)&&nt?.size>=tt)){var r=!0,i=e;M?.(null);var a=gt(e,L,ft(tt)?tt-nt.size:void 0),o=n?null:a;return S!==`combobox`&&o&&(i=``,ee?.(o),Qe(!1),r=!1),I&&Me!==i&&I(i,{source:t?`typing`:`effect`}),r}},it=function(e){e&&e.trim()&&I(e,{source:`submit`})};Y.useEffect(function(){!$&&!q&&S!==`combobox`&&rt(``,!1,!1)},[$]),Y.useEffect(function(){Je&&C&&Ye(!1),C&&!Ee.current&&Ae(!1)},[C]);var at=Ge(),ot=h(at,2),ct=ot[0],lt=ot[1],dt=Y.useRef(!1),pt=function(e){var t=ct(),n=e.key,i=n===`Enter`;if(i&&(S!==`combobox`&&e.preventDefault(),$||Qe(!0)),lt(!!Me),n===`Backspace`&&!t&&q&&!Me&&f.length){for(var a=r(f),o=null,s=a.length-1;s>=0;--s){var c=a[s];if(!c.disabled){a.splice(s,1),o=c;break}}o&&m(a,{type:`remove`,values:[o]})}var l=[...arguments].slice(1);if($&&(!i||!dt.current)){var u;i&&(dt.current=!0),(u=Te.current)==null||u.onKeyDown.apply(u,[e].concat(l))}he?.apply(void 0,[e].concat(l))},mt=function(e){var t=[...arguments].slice(1);if($){var n;(n=Te.current)==null||n.onKeyUp.apply(n,[e].concat(t))}e.key===`Enter`&&(dt.current=!1),me?.apply(void 0,[e].concat(t))},ht=function(e){m(f.filter(function(t){return t!==e}),{type:`remove`,values:[e]})},St=function(){dt.current=!1},Ct=Y.useRef(!1),wt=function(){Ae(!0),C||(fe&&!Ct.current&&fe.apply(void 0,arguments),de.includes(`focus`)&&Qe(!0)),Ct.current=!0},Tt=function(){Ee.current=!0,Ae(!1,function(){Ct.current=!1,Ee.current=!1,Qe(!1)}),C||(Me&&(S===`tags`?I(Me,{source:`submit`}):S===`multiple`&&I(``,{source:`blur`})),pe&&pe.apply(void 0,arguments))},Et=[];Y.useEffect(function(){return function(){Et.forEach(function(e){return clearTimeout(e)}),Et.splice(0,Et.length)}},[]);var Dt=function(e){var t=e.target,n=Q.current?.getPopupElement();if(n&&n.contains(t)){var r=setTimeout(function(){var e=Et.indexOf(r);if(e!==-1&&Et.splice(e,1),je(),!xe&&!n.contains(document.activeElement)){var t;(t=we.current)==null||t.focus()}});Et.push(r)}var i=[...arguments].slice(1);ge?.apply(void 0,[e].concat(i))},Ot=Y.useState({}),kt=h(Ot,2)[1];function At(){kt({})}var jt;Pe&&(jt=function(e){Qe(e)}),Ke(function(){return[Ce.current,Q.current?.getPopupElement()]},Ze,Qe,!!Pe);var Mt=Y.useMemo(function(){return p(p({},e),{},{notFoundContent:y,open:$,triggerOpen:Ze,id:i,showSearch:J,multiple:q,toggleOpen:Qe})},[e,y,Ze,$,i,J,q,Qe]),Nt=!!ne||w,Pt;Nt&&(Pt=Y.createElement(Be,{className:(0,X.default)(`${a}-arrow`,U({},`${a}-arrow-loading`,w)),customizeIcon:ne,customizeIconProps:{loading:w,searchValue:Me,open:$,focused:ke,showSearch:J}}));var Ft=Ve(a,function(){var e;b?.(),(e=we.current)==null||e.focus(),m([],{type:`clear`,values:f}),rt(``,!1,!1)},f,te,z,C,Me,S),It=Ft.allowClear,Lt=Ft.clearIcon,Rt=Y.createElement(B,{ref:Te}),zt=(0,X.default)(a,o,U(U(U(U(U(U(U(U(U(U({},`${a}-focused`,ke),`${a}-multiple`,q),`${a}-single`,!q),`${a}-allow-clear`,te),`${a}-show-arrow`,Nt),`${a}-disabled`,C),`${a}-loading`,w),`${a}-open`,$),`${a}-customize-input`,Ne),`${a}-show-search`,J)),Bt=Y.createElement(ut,{ref:Q,disabled:C,prefixCls:a,visible:Ze,popupElement:Rt,animation:re,transitionName:V,dropdownStyle:H,dropdownClassName:ae,direction:u,dropdownMatchSelectWidth:W,dropdownRender:oe,dropdownAlign:G,placement:K,builtinPlacements:se,getPopupContainer:ce,empty:g,getTriggerDOMNode:function(e){return Z.current||e},onPopupVisibleChange:jt,onPopupMouseEnter:At},Pe?Y.cloneElement(Pe,{ref:Fe}):Y.createElement(st,v({},e,{domRef:Z,prefixCls:a,inputElement:Ne,ref:we,id:i,prefix:R,showSearch:J,autoClearSearchValue:F,mode:S,activeDescendantId:N,tagRender:l,values:f,open:$,onToggleOpen:Qe,activeValue:j,searchValue:Me,onSearch:rt,onSearchSubmit:it,onRemove:ht,tokenWithEnter:$e,onInputBlur:St}))),Vt=Pe?Bt:Y.createElement(`div`,v({className:zt},ve,{ref:Ce,onMouseDown:Dt,onKeyDown:pt,onKeyUp:mt,onFocus:wt,onBlur:Tt}),Y.createElement(vt,{visible:ke&&!$,values:f}),Bt,Pt,It&&Lt);return Y.createElement(He.Provider,{value:Mt},Vt)}),Ct=function(){return null};Ct.isSelectOptGroup=!0;var wt=function(){return null};wt.isSelectOption=!0;var Tt=Y.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,a=e.children,o=e.prefixCls,s=e.onInnerResize,c=e.innerProps,l=e.rtl,u=e.extra,d={},f={display:`flex`,flexDirection:`column`};return r!==void 0&&(d={height:n,position:`relative`,overflow:`hidden`},f=p(p({},f),{},U(U(U(U(U({transform:`translateY(${r}px)`},l?`marginRight`:`marginLeft`,-i),`position`,`absolute`),`left`,0),`right`,0),`top`,0))),Y.createElement(`div`,{style:d},Y.createElement(de,{onResize:function(e){e.offsetHeight&&s&&s()}},Y.createElement(`div`,v({style:f,className:(0,X.default)(U({},`${o}-holder-inner`,o)),ref:t},c),a,u)))});Tt.displayName=`Filler`;function Et(e){var t=e.children,n=e.setRef,r=Y.useCallback(function(e){n(e)},[]);return Y.cloneElement(t,{ref:r})}function Dt(e,t,n,r,i,a,o,s){var c=s.getKey;return e.slice(t,n+1).map(function(e,n){var s=o(e,t+n,{style:{width:r},offsetX:i}),l=c(e);return Y.createElement(Et,{key:l,setRef:func
Line truncated
|
||||
${i}${s}bottomLeft,
|
||||
${a}${s}bottomLeft
|
||||
`]:{animationName:J},[`
|
||||
${i}${s}topLeft,
|
||||
${a}${s}topLeft,
|
||||
${i}${s}topRight,
|
||||
${a}${s}topRight
|
||||
`]:{animationName:ye},[`${o}${s}bottomLeft`]:{animationName:ge},[`
|
||||
${o}${s}topLeft,
|
||||
${o}${s}topRight
|
||||
`]:{animationName:ve},"&-hidden":{display:`none`},[r]:Object.assign(Object.assign({},Nn(e)),{cursor:`pointer`,transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":Object.assign({flex:`auto`},y),"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Nn(e)),{color:e.colorTextDisabled})}),[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}})},be(e,`slide-up`),be(e,`slide-down`),Le(e,`move-up`),Le(e,`move-down`)]},Fn=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:G(t),itemLineHeight:G(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},In=e=>{let{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},Ln=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":Object.assign(Object.assign({},N()),{display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}})}}}},Rn=(e,t)=>{let{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,a=e.multipleSelectItemHeight,o=In(e),s=t?`${n}-${t}`:``,c=Fn(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},Ln(e)),{[`${n}-selector`]:{display:`flex`,alignItems:`center`,width:`100%`,height:`100%`,paddingInline:c.basePadding,paddingBlock:c.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:`not-allowed`},"&:after":{display:`inline-block`,width:0,margin:`${G(r)} 0`,lineHeight:G(a),visibility:`hidden`,content:`"\\a0"`}},[`${n}-selection-item`]:{height:c.itemHeight,lineHeight:G(c.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:`flex-start`,"&:after":{lineHeight:G(a),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal()},[`${i}-item + ${i}-item,
|
||||
${n}-prefix + ${n}-selection-wrap
|
||||
`]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:c.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:`inline-flex`,position:`relative`,maxWidth:`100%`,marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(o).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:G(a),transition:`all ${e.motionDurationSlow}`},"&-input":{width:`100%`,minWidth:4.1},"&-mirror":{position:`absolute`,top:0,insetInlineStart:0,insetInlineEnd:`auto`,zIndex:999,whiteSpace:`pre`,visibility:`hidden`}},[`${n}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`}})}};function zn(e,t){let{componentCls:n}=e,r={[`${n}-multiple${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:`text`}},[`
|
||||
&${n}-show-arrow ${n}-selector,
|
||||
&${n}-allow-clear ${n}-selector
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[Rn(e,t),r]}var Bn=e=>{let{componentCls:t}=e,n=ae(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=ae(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[zn(e),zn(n,`sm`),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},zn(r,`lg`)]};function Vn(e,t){let{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal();return{[`${n}-single${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},k(e,!0)),{display:`flex`,borderRadius:i,flex:`1 1 auto`,[`${n}-selection-wrap:after`]:{lineHeight:G(a)},[`${n}-selection-search`]:{position:`absolute`,inset:0,width:`100%`,"&-input":{width:`100%`,WebkitAppearance:`textfield`}},[`
|
||||
${n}-selection-item,
|
||||
${n}-selection-placeholder
|
||||
`]:{display:`block`,padding:0,lineHeight:G(a),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:`center`},[`${n}-selection-placeholder`]:{transition:`none`,pointerEvents:`none`},[[`&:after`,`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(`,`)]:{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`}}),[`
|
||||
&${n}-show-arrow ${n}-selection-item,
|
||||
&${n}-show-arrow ${n}-selection-search,
|
||||
&${n}-show-arrow ${n}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:`100%`,height:`100%`,alignItems:`center`,padding:`0 ${G(r)}`,[`${n}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:G(a)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:`none`},[`${n}-selection-search`]:{position:`static`,width:`100%`},[`${n}-selection-placeholder`]:{position:`absolute`,insetInlineStart:0,insetInlineEnd:0,padding:`0 ${G(r)}`,"&:after":{display:`none`}}}}}}}function Hn(e){let{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Vn(e),Vn(ae(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),`sm`),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${G(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
|
||||
&${t}-show-arrow ${t}-selection-item,
|
||||
&${t}-show-arrow ${t}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Vn(ae(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),`lg`)]}var Un=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},Wn=(e,t)=>{let{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${G(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${G(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},Gn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Wn(e,t))}),Kn=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Wn(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Gn(e,{status:`error`,borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Gn(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${G(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),qn=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${G(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},Jn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},qn(e,t))}),Yn=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},qn(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Jn(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Jn(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${G(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Xn=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:`transparent`,border:`${G(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${G(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Zn=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${G(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.bLine truncated
|
||||
Reference in new issue
Block a user