合入主线登录和营业时段策略,对齐旧界面与 React 访问流程
This commit is contained in:
commit
42395de23a
113 files changed
+1915
-558
No files matched your search
+8
@@ -0,0 +1,8 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,An as n,At as r,Dn as i,Gt as a,Jn as o,Jt as s,Ln as c,Pt as l,St as u,Tn as d,W as f,Zt as p,bt as m,er as h,it as g,jn as _,kn as v,ln as y,nn as b,nr as x,qn as S,rn as C,sn as w,vt as T,yt as E,zt as D}from"./index-BvkDlq1y.js";import{t as O}from"./useForm-vGBHLiDP.js";var k=e(x()),A={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{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.96 31.96 0 000-50.4z`}}]},name:`right`,theme:`outlined`},j=k.forwardRef(function(e,n){return k.createElement(D,t({},e,{ref:n,icon:A}))}),M=e(h()),N=k.createContext(null),P=N.Provider,F=k.createContext(null),I=F.Provider,L=[`prefixCls`,`className`,`style`,`checked`,`disabled`,`defaultChecked`,`type`,`title`,`onChange`],R=(0,k.forwardRef)(function(e,n){var r=e.prefixCls,a=r===void 0?`rc-checkbox`:r,s=e.className,c=e.style,l=e.checked,u=e.disabled,d=e.defaultChecked,f=d!==void 0&&d,p=e.type,m=p===void 0?`checkbox`:p,h=e.title,g=e.onChange,_=i(e,L),y=(0,k.useRef)(null),b=(0,k.useRef)(null),x=C(f,{value:l}),w=v(x,2),T=w[0],E=w[1];(0,k.useImperativeHandle)(n,function(){return{focus:function(e){var t;(t=y.current)==null||t.focus(e)},blur:function(){var e;(e=y.current)==null||e.blur()},input:y.current,nativeElement:b.current}});var D=(0,M.default)(a,s,o(o({},`${a}-checked`,T),`${a}-disabled`,u));return k.createElement(`span`,{className:D,title:h,style:c,ref:b},k.createElement(`input`,t({},_,{className:`${a}-input`,ref:y,onChange:function(t){u||(`checked`in e||E(t.target.checked),g?.({target:S(S({},e),{},{type:m,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:u,checked:!!T,type:m})),k.createElement(`span`,{className:`${a}-inner`}))});function z(e){let t=k.useRef(null),r=()=>{n.cancel(t.current),t.current=null};return[()=>{r(),t.current=n(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e?.(n)}]}var B=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},p(e)),{display:`inline-block`,fontSize:0,[`&${r}-rtl`]:{direction:`rtl`},[`&${r}-block`]:{display:`flex`},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:`none`}})}},V=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:i,motionDurationSlow:a,motionDurationMid:o,motionEaseInOutCirc:c,colorBgContainer:l,colorBorder:u,lineWidth:f,colorBgContainerDisabled:m,colorTextDisabled:h,paddingXS:g,dotColorDisabled:_,lineType:v,radioColor:y,radioBgColor:b,calc:x}=e,S=`${t}-inner`,C=x(i).sub(x(4).mul(2)),w=x(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},p(e)),{display:`inline-flex`,alignItems:`baseline`,marginInlineStart:0,marginInlineEnd:n,cursor:`pointer`,"&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:`rtl`},"&-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled},"&::after":{display:`inline-block`,width:0,overflow:`hidden`,content:`"\\a0"`},"&-block":{flex:1,justifyContent:`center`},[`${t}-checked::after`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:`100%`,height:`100%`,border:`${d(f)} ${v} ${r}`,borderRadius:`50%`,visibility:`hidden`,opacity:0,content:`""`},[t]:Object.assign(Object.assign({},p(e)),{position:`relative`,display:`inline-block`,outline:`none`,cursor:`pointer`,alignSelf:`center`,borderRadius:`50%`}),[`${t}-wrapper:hover &,
|
||||
&:hover ${S}`]:{borderColor:r},[`${t}-input:focus-visible + ${S}`]:s(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:`visible`},[`${t}-inner`]:{"&::after":{boxSizing:`border-box`,position:`absolute`,insetBlockStart:`50%`,insetInlineStart:`50%`,display:`block`,width:w,height:w,marginBlockStart:x(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:x(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:y,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:`scale(0)`,opacity:0,transition:`all ${a} ${c}`,content:`""`},boxSizing:`border-box`,position:`relative`,insetBlockStart:0,insetInlineStart:0,display:`block`,width:w,height:w,backgroundColor:l,borderColor:u,borderStyle:`solid`,borderWidth:f,borderRadius:`50%`,transition:`all ${o}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0},[`${t}-checked`]:{[S]:{borderColor:r,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${a} ${c}`}}},[`${t}-disabled`]:{cursor:`not-allowed`,[S]:{backgroundColor:m,borderColor:u,cursor:`not-allowed`,"&::after":{backgroundColor:_}},[`${t}-input`]:{cursor:`not-allowed`},[`${t}-disabled + span`]:{color:h,cursor:`not-allowed`},[`&${t}-checked`]:{[S]:{"&::after":{transform:`scale(${x(C).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:g,paddingInlineEnd:g}})}},H=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:c,buttonPaddingInline:l,fontSize:u,buttonBg:f,fontSizeLG:p,controlHeightLG:m,controlHeightSM:h,paddingXS:g,borderRadius:_,borderRadiusSM:v,borderRadiusLG:y,buttonCheckedBg:b,buttonSolidCheckedColor:x,colorTextDisabled:S,colorBgContainerDisabled:C,buttonCheckedBgDisabled:w,buttonCheckedColorDisabled:T,colorPrimary:E,colorPrimaryHover:D,colorPrimaryActive:O,buttonSolidCheckedBg:k,buttonSolidCheckedHoverBg:A,buttonSolidCheckedActiveBg:j,calc:M}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:l,paddingBlock:0,color:t,fontSize:u,lineHeight:d(M(n).sub(M(i).mul(2)).equal()),background:f,border:`${d(i)} ${a} ${o}`,borderBlockStartWidth:M(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color ${c}`,`background ${c}`,`box-shadow ${c}`].join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:M(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${d(i)} ${a} ${o}`,borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_},"&:first-child:last-child":{borderRadius:_},[`${r}-group-large &`]:{height:m,fontSize:p,lineHeight:d(M(m).sub(M(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${r}-group-small &`]:{height:h,paddingInline:M(g).sub(i).equal(),paddingBlock:0,lineHeight:d(M(h).sub(M(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:`relative`,color:E},"&:has(:focus-visible)":s(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:E,background:b,borderColor:E,"&::before":{backgroundColor:E},"&:first-child":{borderColor:E},"&:hover":{color:D,borderColor:D,"&::before":{backgroundColor:D}},"&:active":{color:O,borderColor:O,"&::before":{backgroundColor:O}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:k,borderColor:k,"&:hover":{color:x,background:A,borderColor:A},"&:active":{color:x,background:j,borderColor:j}},"&-disabled":{color:S,backgroundColor:C,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:S,backgroundColor:C,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:T,backgroundColor:w,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},U=a(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${d(n)} ${t}`,i=b(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[B(i),V(i),H(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),W=function(e,t){var n={};for(var r in e)Object.prototy
Line truncated
|
||||
${n}:not(${n}-disabled),
|
||||
${t}:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
||||
${n}-checked:not(${n}-disabled),
|
||||
${t}-checked:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Q(e,t){return Z(b(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var ee=a(`Checkbox`,(e,{prefixCls:t})=>[Q(t,e)]),te=k.createContext(null),ne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},re=k.forwardRef((e,t)=>{let{prefixCls:n,className:i,rootClassName:a,children:o,indeterminate:s=!1,style:l,onMouseEnter:u,onMouseLeave:d,skipGroup:p=!1,disabled:h}=e,g=ne(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:_,direction:v,checkbox:b}=k.useContext(y),x=k.useContext(te),{isFormItemInput:S}=k.useContext(f),C=k.useContext(w),T=(x?.disabled||h)??C,D=k.useRef(g.value),O=k.useRef(null),A=c(t,O);k.useEffect(()=>{x?.registerValue(g.value)},[]),k.useEffect(()=>{if(!p)return g.value!==D.current&&(x?.cancelValue(D.current),x?.registerValue(g.value),D.current=g.value),()=>x?.cancelValue(g.value)},[g.value]),k.useEffect(()=>{O.current?.input&&(O.current.input.indeterminate=s)},[s]);let j=_(`checkbox`,n),N=r(j),[P,F,I]=ee(j,N),L=Object.assign({},g);x&&!p&&(L.onChange=(...e)=>{g.onChange&&g.onChange.apply(g,e),x.toggleOption&&x.toggleOption({label:o,value:g.value})},L.name=x.name,L.checked=x.value.includes(g.value));let B=(0,M.default)(`${j}-wrapper`,{[`${j}-rtl`]:v===`rtl`,[`${j}-wrapper-checked`]:L.checked,[`${j}-wrapper-disabled`]:T,[`${j}-wrapper-in-form-item`]:S},b?.className,i,a,I,N,F),V=(0,M.default)({[`${j}-indeterminate`]:s},m,F),[H,U]=z(L.onClick);return P(k.createElement(E,{component:`Checkbox`,disabled:T},k.createElement(`label`,{className:B,style:Object.assign(Object.assign({},b?.style),l),onMouseEnter:u,onMouseLeave:d,onClick:H},k.createElement(R,Object.assign({},L,{onClick:U,prefixCls:j,className:V,disabled:T,ref:A})),o!=null&&k.createElement(`span`,{className:`${j}-label`},o))))}),ie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ae=k.forwardRef((e,t)=>{let{defaultValue:n,children:i,options:a=[],prefixCls:o,className:s,rootClassName:c,style:l,onChange:d}=e,f=ie(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:p,direction:m}=k.useContext(y),[h,g]=k.useState(f.value||n||[]),[v,b]=k.useState([]);k.useEffect(()=>{`value`in f&&g(f.value||[])},[f.value]);let x=k.useMemo(()=>a.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[a]),S=e=>{b(t=>t.filter(t=>t!==e))},C=e=>{b(t=>[].concat(_(t),[e]))},w=e=>{let t=h.indexOf(e.value),n=_(h);t===-1?n.push(e.value):n.splice(t,1),`value`in f||g(n),d?.(n.filter(e=>v.includes(e)).sort((e,t)=>x.findIndex(t=>t.value===e)-x.findIndex(e=>e.value===t)))},T=p(`checkbox`,o),E=`${T}-group`,D=r(T),[O,A,j]=ee(T,D),N=u(f,[`value`,`disabled`]),P=a.length?x.map(e=>k.createElement(re,{prefixCls:T,key:e.value.toString(),disabled:`disabled`in e?e.disabled:f.disabled,value:e.value,checked:h.includes(e.value),onChange:e.onChange,className:(0,M.default)(`${E}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):i,F=k.useMemo(()=>({toggleOption:w,value:h,disabled:f.disabled,name:f.name,registerValue:C,cancelValue:S}),[w,h,f.disabled,f.name,C,S]),I=(0,M.default)(E,{[`${E}-rtl`]:m===`rtl`},s,c,j,D,A);return O(k.createElement(`div`,Object.assign({className:I,style:l},N,{ref:t}),k.createElement(te.Provider,{value:F},P)))}),$=re;$.Group=ae,$.__ANT_CHECKBOX=!0;export{j as i,Q as n,X as r,$ as t};
|
||||
Reference in new issue
Block a user