3 lines
10 KiB
JavaScript
3 lines
10 KiB
JavaScript
module.exports=[5522,a=>{"use strict";var b=a.i(87924),c=a.i(97895);function d({className:a,type:d,...e}){return(0,b.jsx)("input",{type:d,"data-slot":"input",className:(0,c.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...e})}a.s(["Input",()=>d])},3130,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(97895);let e=c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("div",{ref:e,className:(0,d.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...c}));e.displayName="Card";let f=c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("div",{ref:e,className:(0,d.cn)("flex flex-col space-y-1.5 p-6",a),...c}));f.displayName="CardHeader";let g=c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("h3",{ref:e,className:(0,d.cn)("font-semibold leading-none tracking-tight",a),...c}));g.displayName="CardTitle";let h=c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("p",{ref:e,className:(0,d.cn)("text-sm text-muted-foreground",a),...c}));h.displayName="CardDescription";let i=c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("div",{ref:e,className:(0,d.cn)("p-6 pt-0",a),...c}));i.displayName="CardContent",c.forwardRef(({className:a,...c},e)=>(0,b.jsx)("div",{ref:e,className:(0,d.cn)("flex items-center p-6 pt-0",a),...c})).displayName="CardFooter",a.s(["Card",()=>e,"CardContent",()=>i,"CardDescription",()=>h,"CardHeader",()=>f,"CardTitle",()=>g])},17171,30553,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(11011),f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((a,d)=>{let f=c.forwardRef((a,c)=>{let{asChild:f,...g}=a,h=f?e.Slot:d;return(0,b.jsx)(h,{...g,ref:c})});return f.displayName=`Primitive.${d}`,{...a,[d]:f}},{});function g(a,b){a&&d.flushSync(()=>a.dispatchEvent(b))}a.s(["Primitive",()=>f,"dispatchDiscreteCustomEvent",()=>g],30553);var h=c.forwardRef((a,c)=>(0,b.jsx)(f.label,{...a,ref:c,onMouseDown:b=>{b.target.closest("button, input, select, textarea")||(a.onMouseDown?.(b),!b.defaultPrevented&&b.detail>1&&b.preventDefault())}}));h.displayName="Label";var i=a.i(97895);let j=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(h,{ref:d,className:(0,i.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",a),...c}));j.displayName=h.displayName,a.s(["Label",()=>j],17171)},7554,50104,a=>{"use strict";function b(a,c,{checkForDefaultPrevented:d=!0}={}){return function(b){if(a?.(b),!1===d||!b.defaultPrevented)return c?.(b)}}a.s(["composeEventHandlers",()=>b],7554);var c=a.i(72131),d=a.i(87924);function e(a,b=[]){let f=[],g=()=>{let b=f.map(a=>c.createContext(a));return function(d){let e=d?.[a]||b;return c.useMemo(()=>({[`__scope${a}`]:{...d,[a]:e}}),[d,e])}};return g.scopeName=a,[function(b,e){let g=c.createContext(e),h=f.length;f=[...f,e];let i=b=>{let{scope:e,children:f,...i}=b,j=e?.[a]?.[h]||g,k=c.useMemo(()=>i,Object.values(i));return(0,d.jsx)(j.Provider,{value:k,children:f})};return i.displayName=b+"Provider",[i,function(d,f){let i=f?.[a]?.[h]||g,j=c.useContext(i);if(j)return j;if(void 0!==e)return e;throw Error(`\`${d}\` must be used within \`${b}\``)}]},function(...a){let b=a[0];if(1===a.length)return b;let d=()=>{let d=a.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){let e=d.reduce((b,{useScope:c,scopeName:d})=>{let e=c(a)[`__scope${d}`];return{...b,...e}},{});return c.useMemo(()=>({[`__scope${b.scopeName}`]:e}),[e])}};return d.scopeName=b.scopeName,d}(g,...b)]}a.s(["createContextScope",()=>e],50104)},25152,46872,a=>{"use strict";var b=a.i(72131);function c(a){let c=b.useRef(a);return b.useEffect(()=>{c.current=a}),b.useMemo(()=>(...a)=>c.current?.(...a),[])}function d({prop:a,defaultProp:d,onChange:e=()=>{}}){let[f,g]=function({defaultProp:a,onChange:d}){let e=b.useState(a),[f]=e,g=b.useRef(f),h=c(d);return b.useEffect(()=>{g.current!==f&&(h(f),g.current=f)},[f,g,h]),e}({defaultProp:d,onChange:e}),h=void 0!==a,i=h?a:f,j=c(e);return[i,b.useCallback(b=>{if(h){let c="function"==typeof b?b(a):b;c!==a&&j(c)}else g(b)},[h,a,g,j])]}a.s(["useCallbackRef",()=>c],46872),a.s(["useControllableState",()=>d],25152)},77994,a=>{"use strict";var b=a.i(72131);function c(a){let c=b.useRef({value:a,previous:a});return b.useMemo(()=>(c.current.value!==a&&(c.current.previous=c.current.value,c.current.value=a),c.current.previous),[a])}a.s(["usePrevious",()=>c])},72752,a=>{"use strict";var b=a.i(72131),c=globalThis?.document?b.useLayoutEffect:()=>{};a.s(["useLayoutEffect",()=>c])},3688,a=>{"use strict";var b=a.i(72131),c=a.i(72752);function d(a){let[d,e]=b.useState(void 0);return(0,c.useLayoutEffect)(()=>{if(a){e({width:a.offsetWidth,height:a.offsetHeight});let b=new ResizeObserver(b=>{let c,d;if(!Array.isArray(b)||!b.length)return;let f=b[0];if("borderBoxSize"in f){let a=f.borderBoxSize,b=Array.isArray(a)?a[0]:a;c=b.inlineSize,d=b.blockSize}else c=a.offsetWidth,d=a.offsetHeight;e({width:c,height:d})});return b.observe(a,{box:"border-box"}),()=>b.unobserve(a)}e(void 0)},[a]),d}a.s(["useSize",()=>d])},80281,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(7554),e=a.i(70121),f=a.i(50104),g=a.i(25152),h=a.i(77994),i=a.i(3688),j=a.i(30553),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:k,defaultChecked:l,required:m,disabled:o,value:p="on",onCheckedChange:q,form:r,...u}=a,[v,w]=c.useState(null),x=(0,e.useComposedRefs)(f,a=>w(a)),y=c.useRef(!1),z=!v||r||!!v.closest("form"),[A=!1,B]=(0,g.useControllableState)({prop:k,defaultProp:l,onChange:q});return(0,b.jsxs)(n,{scope:h,checked:A,disabled:o,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":A,"aria-required":m,"data-state":t(A),"data-disabled":o?"":void 0,disabled:o,value:p,...u,ref:x,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{B(a=>!a),z&&(y.current=a.isPropagationStopped(),y.current||a.stopPropagation())})}),z&&(0,b.jsx)(s,{control:v,bubbles:!y.current,name:i,value:p,checked:A,required:m,disabled:o,form:r,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=a=>{let{control:d,checked:e,bubbles:f=!0,...g}=a,j=c.useRef(null),k=(0,h.usePrevious)(e),l=(0,i.useSize)(d);return c.useEffect(()=>{let a=j.current,b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(k!==e&&b){let c=new Event("click",{bubbles:f});b.call(a,e),a.dispatchEvent(c)}},[k,e,f]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...g,tabIndex:-1,ref:j,style:{...a.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function t(a){return a?"checked":"unchecked"}var u=a.i(97895);let v=c.forwardRef(({className:a,...c},d)=>(0,b.jsx)(p,{className:(0,u.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...c,ref:d,children:(0,b.jsx)(r,{className:(0,u.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));v.displayName=p.displayName,a.s(["Switch",()=>v],80281)},81502,a=>{"use strict";var b=a.i(87924),c=a.i(3130),d=a.i(17171),e=a.i(5522),f=a.i(40695),g=a.i(80281);function h(){return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-3xl font-bold tracking-tight",children:"系统设置"}),(0,b.jsx)("p",{className:"text-muted-foreground",children:"配置全站基础参数与开关。"})]}),(0,b.jsxs)(c.Card,{children:[(0,b.jsxs)(c.CardHeader,{children:[(0,b.jsx)(c.CardTitle,{children:"基础信息"}),(0,b.jsx)(c.CardDescription,{children:"网站显示的基本信息配置。"})]}),(0,b.jsxs)(c.CardContent,{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsx)(d.Label,{htmlFor:"site-name",children:"网站名称"}),(0,b.jsx)(e.Input,{id:"site-name",defaultValue:"一场Soul的创业实验"})]}),(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsx)(d.Label,{htmlFor:"author",children:"主理人"}),(0,b.jsx)(e.Input,{id:"author",defaultValue:"卡若"})]}),(0,b.jsx)(f.Button,{children:"保存基础信息"})]})]}),(0,b.jsxs)(c.Card,{children:[(0,b.jsxs)(c.CardHeader,{children:[(0,b.jsx)(c.CardTitle,{children:"功能开关"}),(0,b.jsx)(c.CardDescription,{children:"控制系统核心模块的启用状态。"})]}),(0,b.jsxs)(c.CardContent,{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between space-x-2",children:[(0,b.jsxs)(d.Label,{htmlFor:"maintenance-mode",className:"flex flex-col space-y-1",children:[(0,b.jsx)("span",{children:"维护模式"}),(0,b.jsx)("span",{className:"font-normal text-xs text-muted-foreground",children:"启用后前台将显示维护中页面"})]}),(0,b.jsx)(g.Switch,{id:"maintenance-mode"})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between space-x-2",children:[(0,b.jsxs)(d.Label,{htmlFor:"payment-enabled",className:"flex flex-col space-y-1",children:[(0,b.jsx)("span",{children:"全站支付"}),(0,b.jsx)("span",{className:"font-normal text-xs text-muted-foreground",children:"关闭后所有支付功能将暂停"})]}),(0,b.jsx)(g.Switch,{id:"payment-enabled",defaultChecked:!0})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between space-x-2",children:[(0,b.jsxs)(d.Label,{htmlFor:"referral-enabled",className:"flex flex-col space-y-1",children:[(0,b.jsx)("span",{children:"分销系统"}),(0,b.jsx)("span",{className:"font-normal text-xs text-muted-foreground",children:"是否允许用户生成邀请链接"})]}),(0,b.jsx)(g.Switch,{id:"referral-enabled",defaultChecked:!0})]})]})]})]})}a.s(["default",()=>h])}];
|
|
|
|
//# sourceMappingURL=_2cec52d1._.js.map
|