@vef-framework/components 1.0.129 → 1.0.131
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/cjs/helpers/icons.cjs +2 -0
- package/cjs/helpers/index.cjs +2 -0
- package/cjs/helpers/message.cjs +2 -0
- package/cjs/index.cjs +1 -1
- package/cjs/vef-access-denied/index.cjs +1 -27
- package/cjs/vef-button/index.cjs +1 -1
- package/cjs/vef-chart-container/index.cjs +3 -54
- package/cjs/vef-chart-legend-content/index.cjs +1 -16
- package/cjs/vef-chart-tooltip-content/index.cjs +1 -42
- package/cjs/vef-checkbox/index.cjs +1 -3
- package/cjs/vef-code-editor/index.cjs +1 -1
- package/cjs/vef-config-provider/global-style.cjs +2 -1
- package/cjs/vef-config-provider/index.cjs +1 -5
- package/cjs/vef-crud-page/components/crud-footer.cjs +1 -7
- package/cjs/vef-crud-page/hooks/use-operation-buttons.cjs +1 -1
- package/cjs/vef-crud-page/store.cjs +1 -1
- package/cjs/vef-drawer/index.cjs +1 -8
- package/cjs/vef-error/index.cjs +1 -28
- package/cjs/vef-filter/components/action-buttons.cjs +1 -19
- package/cjs/vef-filter/components/advanced-filter.cjs +1 -9
- package/cjs/vef-filter/components/basic-filter.cjs +1 -19
- package/cjs/vef-filter/hooks/use-action-handlers.cjs +1 -1
- package/cjs/vef-filter/hooks/use-label-config.cjs +1 -1
- package/cjs/vef-filter/index.cjs +1 -8
- package/cjs/vef-form/components/form-actions.cjs +1 -3
- package/cjs/vef-form/components/form-content.cjs +1 -4
- package/cjs/vef-form/components/form-group.cjs +1 -11
- package/cjs/vef-form/hooks/use-action-handlers.cjs +1 -1
- package/cjs/vef-form/hooks/use-label-width.cjs +1 -1
- package/cjs/vef-form/index.cjs +1 -3
- package/cjs/vef-grid/index.cjs +1 -1
- package/cjs/vef-icon/index.cjs +1 -1
- package/cjs/vef-icon-select/index.cjs +2 -28
- package/cjs/vef-intellisense-code-editor/styles.cjs +1 -20
- package/cjs/vef-layout/common-styles.cjs +1 -4
- package/cjs/vef-layout/components/header-action-icons.cjs +1 -15
- package/cjs/vef-layout/components/header.cjs +1 -12
- package/cjs/vef-layout/components/menu-groups.cjs +1 -32
- package/cjs/vef-layout/components/sider.cjs +1 -49
- package/cjs/vef-layout/components/title.cjs +1 -36
- package/cjs/vef-layout/components/user-avatar.cjs +1 -16
- package/cjs/vef-layout/index.cjs +1 -5
- package/cjs/vef-loading-placeholder/index.cjs +1 -7
- package/cjs/vef-login/index.cjs +1 -54
- package/cjs/vef-menu/index.cjs +1 -6
- package/cjs/vef-modal/index.cjs +1 -4
- package/cjs/vef-not-found/index.cjs +1 -28
- package/cjs/vef-page/index.cjs +1 -58
- package/cjs/vef-pie-chart/index.cjs +1 -8
- package/cjs/vef-popconfirm/index.cjs +1 -1
- package/cjs/vef-radio/index.cjs +1 -3
- package/cjs/vef-responsive-container/index.cjs +1 -5
- package/cjs/vef-responsive-item/index.cjs +1 -3
- package/cjs/vef-scroll-area/index.cjs +1 -11
- package/cjs/vef-select/components/option.cjs +1 -9
- package/cjs/vef-select/hooks/use-render-label.cjs +1 -1
- package/cjs/vef-sortable-list/components/overlay-item.cjs +1 -5
- package/cjs/vef-sortable-list/components/sortable-item.cjs +1 -5
- package/cjs/vef-table/components/columns-settings.cjs +1 -52
- package/cjs/vef-table/components/operation-buttons.cjs +1 -10
- package/cjs/vef-table/components/table-footer.cjs +1 -17
- package/cjs/vef-table/index.cjs +1 -54
- package/cjs/vef-title/index.cjs +1 -13
- package/cjs/vef-virtual-grid/index.cjs +1 -12
- package/cjs/vef-virtual-list/index.cjs +1 -18
- package/esm/helpers/icons.js +2 -0
- package/esm/helpers/index.js +2 -0
- package/esm/helpers/message.js +2 -0
- package/esm/index.js +1 -1
- package/esm/vef-access-denied/index.js +1 -27
- package/esm/vef-approval-flow-editor/components/node-content.js +1 -1
- package/esm/vef-approval-flow-editor/components/node-selector.js +2 -2
- package/esm/vef-approval-flow-editor/components/node-toolbar.js +1 -1
- package/esm/vef-button/index.js +1 -1
- package/esm/vef-chart-container/index.js +2 -53
- package/esm/vef-chart-legend-content/index.js +1 -16
- package/esm/vef-chart-tooltip-content/index.js +1 -42
- package/esm/vef-checkbox/index.js +1 -3
- package/esm/vef-code-editor/index.js +1 -1
- package/esm/vef-config-provider/global-style.js +2 -1
- package/esm/vef-config-provider/index.js +1 -5
- package/esm/vef-crud-page/components/crud-footer.js +1 -7
- package/esm/vef-crud-page/hooks/use-action-buttons.js +1 -1
- package/esm/vef-crud-page/hooks/use-operation-buttons.js +1 -1
- package/esm/vef-crud-page/store.js +1 -1
- package/esm/vef-drawer/index.js +1 -8
- package/esm/vef-dynamic-icon/index.js +1 -1
- package/esm/vef-error/index.js +1 -28
- package/esm/vef-filter/components/action-buttons.js +1 -19
- package/esm/vef-filter/components/advanced-filter.js +1 -9
- package/esm/vef-filter/components/basic-filter.js +1 -19
- package/esm/vef-filter/hooks/use-action-handlers.js +1 -1
- package/esm/vef-filter/hooks/use-label-config.js +1 -1
- package/esm/vef-filter/index.js +1 -8
- package/esm/vef-form/components/form-actions.js +1 -3
- package/esm/vef-form/components/form-content.js +1 -4
- package/esm/vef-form/components/form-group.js +1 -11
- package/esm/vef-form/hooks/use-action-handlers.js +1 -1
- package/esm/vef-form/hooks/use-label-width.js +1 -1
- package/esm/vef-form/index.js +1 -3
- package/esm/vef-generic-select/index.js +1 -1
- package/esm/vef-grid/index.js +1 -1
- package/esm/vef-icon/index.js +1 -1
- package/esm/vef-icon-select/index.js +2 -28
- package/esm/vef-intellisense-code-editor/styles.js +1 -20
- package/esm/vef-layout/common-styles.js +1 -4
- package/esm/vef-layout/components/font-size.js +1 -1
- package/esm/vef-layout/components/fullscreen.js +1 -1
- package/esm/vef-layout/components/header-action-icons.js +1 -15
- package/esm/vef-layout/components/header.js +1 -12
- package/esm/vef-layout/components/menu-groups.js +1 -32
- package/esm/vef-layout/components/sider.js +1 -49
- package/esm/vef-layout/components/title.js +1 -36
- package/esm/vef-layout/components/user-avatar.js +1 -16
- package/esm/vef-layout/index.js +1 -5
- package/esm/vef-loading-placeholder/index.js +1 -7
- package/esm/vef-login/index.js +1 -54
- package/esm/vef-menu/index.js +1 -6
- package/esm/vef-modal/index.js +1 -4
- package/esm/vef-not-found/index.js +1 -28
- package/esm/vef-page/index.js +1 -58
- package/esm/vef-pie-chart/index.js +1 -8
- package/esm/vef-popconfirm/index.js +1 -1
- package/esm/vef-radio/index.js +1 -3
- package/esm/vef-responsive-container/index.js +1 -5
- package/esm/vef-responsive-item/index.js +1 -3
- package/esm/vef-scroll-area/index.js +1 -11
- package/esm/vef-select/components/option.js +1 -9
- package/esm/vef-sortable-list/components/overlay-item.js +1 -5
- package/esm/vef-sortable-list/components/sortable-item.js +1 -5
- package/esm/vef-table/components/columns-settings.js +1 -52
- package/esm/vef-table/components/operation-buttons.js +1 -10
- package/esm/vef-table/components/settings-icon.js +1 -1
- package/esm/vef-table/components/table-footer.js +1 -17
- package/esm/vef-table/hooks/use-helper-columns.js +1 -1
- package/esm/vef-table/index.js +1 -54
- package/esm/vef-title/index.js +1 -13
- package/esm/vef-virtual-grid/index.js +1 -12
- package/esm/vef-virtual-list/index.js +1 -18
- package/package.json +4 -4
- package/types/helpers/icons.d.ts +7 -0
- package/types/helpers/index.d.ts +2 -0
- package/types/helpers/message.d.ts +372 -0
- package/types/index.d.ts +1 -0
- package/types/vef-dynamic-icon/props.d.ts +1 -1
- package/types/vef-icon/props.d.ts +2 -3
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=require("@emotion/react/jsx-runtime"),f=require("@emotion/react"),t=require("@vef-framework/shared"),d=require("react"),p=require("../../vef-empty-placeholder/index.cjs"),v=require("../../vef-title/index.cjs"),h=require("../hooks/use-computed-values.cjs"),w=require("./form-row.cjs");const x=f.css`
|
|
3
|
-
margin-bottom: ${t.themeVariables.margin};
|
|
4
|
-
|
|
5
|
-
&:last-child {
|
|
6
|
-
margin-bottom: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.vef-form-group-content {
|
|
10
|
-
padding: 0 2px;
|
|
11
|
-
}
|
|
12
|
-
`;function b({title:s,disabled:u,rows:o},m){const i=h.useComputedValues([...o.map(({key:e,show:r})=>({key:`show-${e}`,rawValue:r,defaultValue:!0})),...o.map(({key:e,disabled:r})=>({key:`disabled-${e}`,rawValue:r,defaultValue:u}))],!0),l=d.useMemo(()=>o.filter(({key:e})=>i[`show-${e}`]),[i,o]);return a.jsxs("div",{ref:m,css:x,children:[s&&a.jsx(v.default,{showBottomLine:!0,showLeftBar:!0,level:4,children:s}),a.jsx("div",{className:"vef-form-group-content",children:l.length===0?a.jsx(p.default,{description:"空表单组"}):l.map(({key:e,autoExpand:r,columns:c})=>a.jsx(w.default,{autoExpand:r,columns:c,disabled:i[`disabled-${e}`],rowKey:e},e))})]})}const n=d.memo(d.forwardRef(b),(s,u)=>t.isDeepEqual(t.omit(s,["rows"]),t.omit(u,["rows"])));n.displayName="VefFormGroup",exports.default=n;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=require("@emotion/react/jsx-runtime"),f=require("@emotion/react"),t=require("@vef-framework/shared"),d=require("react"),p=require("../../vef-empty-placeholder/index.cjs"),v=require("../../vef-title/index.cjs"),h=require("../hooks/use-computed-values.cjs"),w=require("./form-row.cjs");const x=f.css({marginBottom:t.themeVariables.margin,"&:last-child":{marginBottom:0},".vef-form-group-content":{padding:"0 2px"}});function q({title:s,disabled:u,rows:o},m){const i=h.useComputedValues([...o.map(({key:e,show:r})=>({key:`show-${e}`,rawValue:r,defaultValue:!0})),...o.map(({key:e,disabled:r})=>({key:`disabled-${e}`,rawValue:r,defaultValue:u}))],!0),l=d.useMemo(()=>o.filter(({key:e})=>i[`show-${e}`]),[i,o]);return a.jsxs("div",{ref:m,css:x,children:[s&&a.jsx(v.default,{showBottomLine:!0,showLeftBar:!0,level:4,children:s}),a.jsx("div",{className:"vef-form-group-content",children:l.length===0?a.jsx(p.default,{description:"空表单组"}):l.map(({key:e,autoExpand:r,columns:c})=>a.jsx(w.default,{autoExpand:r,columns:c,disabled:i[`disabled-${e}`],rowKey:e},e))})]})}const n=d.memo(d.forwardRef(q),(s,u)=>t.isDeepEqual(t.omit(s,["rows"]),t.omit(u,["rows"])));n.displayName="VefFormGroup",exports.default=n;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var E=require("@vef-framework/core"),s=require("@vef-framework/shared"),h=require("react");require("../../helpers/index.cjs");var L=require("../store.cjs"),F=require("../../helpers/message.cjs");function B({submitApi:c,submitTip:o="提交中...",onBeforeSubmit:r,onSubmit:m,onSubmitSuccess:p,onSubmitFailure:b,onReset:w}){const[g,t,n,l,d,f,v,V]=L.useFormStore(e=>[e.form,e.scene,e.eventBus,e.setIsLoading,e.virtualFieldNames,e.getValues,e.initialValues,e.invokeValueChangeHandlers]),{useApiMutation:M,stubMutationApi:R}=E.useApiContext(),{mutate:A}=M(c??R);if(!s.isFunction(m)&&!c)throw new s.VefError(-1,"'onSubmit' or 'submitApi' prop is required for VefForm component");const q=h.useCallback(()=>{const e=f();g.resetFields(),V(),n.emitChange(v),w?.(e,t)},[g,f,w,t,V,v,n]),y=h.useMemo(()=>s.isFunction(m)?(c&&console.warn("'submitApi' prop is ignored when 'onSubmit' prop is provided in VefForm component"),async e=>{l(!0);let i=e,u=null;try{const a=s.isFunction(o)?o(e,t):o;u=F.showLoadingMessage(a),s.isFunction(r)&&(i=await r(i,t));const S=s.omit(i,d);await m(S,t),n.emitSubmitResult(!0)}catch(a){throw n.emitSubmitResult(!1),a}finally{l(!1),u?.()}}):async e=>{l(!0);let i=e,u=null;try{const a=s.isFunction(o)?o(e,t):o;u=F.showLoadingMessage(a),s.isFunction(r)&&(i=await r(e,t));const S=s.omit(i,d),k=await A(S);(p??(({message:H})=>{F.showSuccessMessage(H)}))(k,i,t),n.emitSubmitResult(!0)}catch(a){n.emitSubmitResult(!1),b?.(a,i,t)}finally{l(!1),u?.()}},[m,c,l,o,t,r,d,n,A,p,b]),C=h.useCallback(({values:e,errorFields:i})=>{n.emitSubmitResult(!1),b?.(new s.VefError(-1,i.flatMap(u=>u.errors).join(", ")),e,t)},[n,b,t]);return{handleReset:q,handleSubmit:y,handleSubmitFailed:C}}exports.useActionHandlers=B;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var t=require("react");require("../../helpers/index.cjs");var i=require("../../helpers/message.cjs");function s(r,e){return t.useMemo(()=>{if(!(r==="top"||!e))return(e<60||e>120)&&i.showWarningMessage("The labelWidth of VefForm component must be between 60 and 120, otherwise it will be 60 or 120."),Math.min(Math.max(e,60),120)},[r,e])}exports.useLabelWidth=s;
|
package/cjs/vef-form/index.cjs
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@emotion/react/jsx-runtime"),L=require("@emotion/react"),p=require("@vef-framework/hooks"),v=require("@vef-framework/shared"),C=require("antd"),r=require("react");require("../internal/index.cjs");var $=require("./components/form-actions.cjs"),D=require("./components/form-content.cjs"),O=require("./event.cjs"),U=require("./hooks/use-action-handlers.cjs"),B=require("./hooks/use-form-context.cjs"),_=require("./hooks/use-form-initialization.cjs"),k=require("./hooks/use-form-instance.cjs"),K=require("./hooks/use-form-values-change.cjs"),G=require("./hooks/use-label-width.cjs"),j=require("./store.cjs"),J=require("../internal/utils.cjs");const{useForm:Q}=C.Form,X={scrollMode:"if-needed",behavior:"smooth"};function Y({schema:a,labelAlign:s="right",variant:u,showTabs:o=!1,height:e="auto",size:F,disabled:l=!1,onChange:f,submissionButton:S,resetButton:m,submitApi:n,submitTip:d,onBeforeSubmit:q,onSubmit:c,onSubmitSuccess:h,onSubmitFailure:b,onReset:g},y){const[z,x]=B.useFormContextSelector(i=>[i.labelPosition,i.labelWidth]),[A,R,T]=j.useFormStore(i=>[i.form,i.initialValues,i.isLoading]),{handleValuesChange:W}=K.useFormValuesChange(f),{handleReset:V,handleSubmit:E,handleSubmitFailed:I}=U.useActionHandlers({submitApi:n,submitTip:d,onBeforeSubmit:q,onSubmit:c,onSubmitSuccess:h,onSubmitFailure:b,onReset:g});k.useFormInstance(y,V);const N=r.useMemo(()=>{if(x)return{flex:`0 0 ${x}px`}},[x]),P=r.useMemo(()=>{let i=e;return e==="full"?i="100%":v.isNumber(e)&&(i=`${e}px`),L.css
|
|
3
|
-
height: ${i};
|
|
4
|
-
`},[e]),H=p.useContextDisabled()||l||T;return t.jsxs(C.Form,{labelWrap:!0,colon:!1,css:P,disabled:H,form:A,initialValues:R,labelAlign:s,labelCol:N,layout:z==="top"?"vertical":"horizontal",scrollToFirstError:X,size:J.convertBasicSizeToUiSize(F),variant:u,onFinish:E,onFinishFailed:I,onValuesChange:W,children:[t.jsx(D.default,{height:e,schema:a,showTabs:o===!0?"switch":o}),t.jsx($.default,{handleReset:V,resetButton:m,submissionButton:S})]})}const M=r.forwardRef(Y);M.displayName="VefFormBase";function Z({initialValues:a,scene:s,layoutMode:u="responsive",autoExpand:o=!1,labelPosition:e="top",labelWidth:F,...l},f){const{schema:S}=l,[m]=Q(),n=p.useSingleton(()=>new O.FormEventBus);p.useUnmount(()=>{n.clear()});const d=G.useLabelWidth(e,F),q=r.useMemo(()=>({labelPosition:e,labelWidth:d,autoExpand:o,layoutMode:u}),[u,o,e,d]),{mergedInitialValues:c,valueChangeHandlers:h,virtualFieldNames:b}=_.useFormInitialization(S,a),g=r.useMemo(()=>({eventBus:n,form:m,initialValues:c,scene:s,valueChangeHandlers:h,virtualFieldNames:b}),[n,m,c,s,h,b]);return t.jsx(j.FormStoreProvider,{initialState:g,children:t.jsx(B.FormContextProvider,{value:q,children:t.jsx(M,{ref:f,...l})})})}const w=r.memo(r.forwardRef(Z),(a,s)=>v.isDeepEqual(v.omit(a,["initialValues","schema"]),v.omit(s,["initialValues","schema"])));w.displayName="VefForm",exports.default=w;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@emotion/react/jsx-runtime"),L=require("@emotion/react"),p=require("@vef-framework/hooks"),v=require("@vef-framework/shared"),C=require("antd"),r=require("react");require("../internal/index.cjs");var $=require("./components/form-actions.cjs"),D=require("./components/form-content.cjs"),O=require("./event.cjs"),U=require("./hooks/use-action-handlers.cjs"),B=require("./hooks/use-form-context.cjs"),_=require("./hooks/use-form-initialization.cjs"),k=require("./hooks/use-form-instance.cjs"),K=require("./hooks/use-form-values-change.cjs"),G=require("./hooks/use-label-width.cjs"),j=require("./store.cjs"),J=require("../internal/utils.cjs");const{useForm:Q}=C.Form,X={scrollMode:"if-needed",behavior:"smooth"};function Y({schema:a,labelAlign:s="right",variant:u,showTabs:o=!1,height:e="auto",size:F,disabled:l=!1,onChange:f,submissionButton:S,resetButton:m,submitApi:n,submitTip:d,onBeforeSubmit:q,onSubmit:c,onSubmitSuccess:h,onSubmitFailure:b,onReset:g},y){const[z,x]=B.useFormContextSelector(i=>[i.labelPosition,i.labelWidth]),[A,R,T]=j.useFormStore(i=>[i.form,i.initialValues,i.isLoading]),{handleValuesChange:W}=K.useFormValuesChange(f),{handleReset:V,handleSubmit:E,handleSubmitFailed:I}=U.useActionHandlers({submitApi:n,submitTip:d,onBeforeSubmit:q,onSubmit:c,onSubmitSuccess:h,onSubmitFailure:b,onReset:g});k.useFormInstance(y,V);const N=r.useMemo(()=>{if(x)return{flex:`0 0 ${x}px`}},[x]),P=r.useMemo(()=>{let i=e;return e==="full"?i="100%":v.isNumber(e)&&(i=`${e}px`),L.css({height:i})},[e]),H=p.useContextDisabled()||l||T;return t.jsxs(C.Form,{labelWrap:!0,colon:!1,css:P,disabled:H,form:A,initialValues:R,labelAlign:s,labelCol:N,layout:z==="top"?"vertical":"horizontal",scrollToFirstError:X,size:J.convertBasicSizeToUiSize(F),variant:u,onFinish:E,onFinishFailed:I,onValuesChange:W,children:[t.jsx(D.default,{height:e,schema:a,showTabs:o===!0?"switch":o}),t.jsx($.default,{handleReset:V,resetButton:m,submissionButton:S})]})}const M=r.forwardRef(Y);M.displayName="VefFormBase";function Z({initialValues:a,scene:s,layoutMode:u="responsive",autoExpand:o=!1,labelPosition:e="top",labelWidth:F,...l},f){const{schema:S}=l,[m]=Q(),n=p.useSingleton(()=>new O.FormEventBus);p.useUnmount(()=>{n.clear()});const d=G.useLabelWidth(e,F),q=r.useMemo(()=>({labelPosition:e,labelWidth:d,autoExpand:o,layoutMode:u}),[u,o,e,d]),{mergedInitialValues:c,valueChangeHandlers:h,virtualFieldNames:b}=_.useFormInitialization(S,a),g=r.useMemo(()=>({eventBus:n,form:m,initialValues:c,scene:s,valueChangeHandlers:h,virtualFieldNames:b}),[n,m,c,s,h,b]);return t.jsx(j.FormStoreProvider,{initialState:g,children:t.jsx(B.FormContextProvider,{value:q,children:t.jsx(M,{ref:f,...l})})})}const w=r.memo(r.forwardRef(Z),(a,s)=>v.isDeepEqual(v.omit(a,["initialValues","schema"]),v.omit(s,["initialValues","schema"])));w.displayName="VefForm",exports.default=w;
|
package/cjs/vef-grid/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var $=require("@emotion/react/jsx-runtime"),g=require("@emotion/react"),f=require("@vef-framework/hooks"),l=require("@vef-framework/shared"),x=require("clsx"),t=require("react"),y=require("react-container-query");const i=24,q=g.css`
|
|
3
3
|
display: grid;
|
|
4
4
|
grid: auto-flow / repeat(${i}, minmax(0, 1fr));
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
> * {
|
|
7
7
|
grid-column: span ${i};
|
|
8
8
|
}
|
package/cjs/vef-icon/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("@emotion/react/jsx-runtime"),p=require("@emotion/react"),v=require("@vef-framework/hooks"),n=require("@vef-framework/shared"),S=require("clsx"),e=require("react");const y=p.css({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased"}),b=e.forwardRef(({size:t,color:l,children:r,className:h,style:a,...u},d)=>{const o=v.useColorTokens(),f=e.useMemo(()=>{const i={...a},c=t==="small"?n.themeVariables.fontSizeSm:t==="medium"?n.themeVariables.fontSize:t==="large"?n.themeVariables.fontSizeLg:t==="huge"?n.themeVariables.fontSizeXl:void 0;return c&&(i.fontSize=c),l&&(i.color=o.get(l)),i},[t,l,o,a]);let s;if(r.type===e.Suspense){const{children:i}=r.props;s=e.cloneElement(r,{children:e.cloneElement(i,{width:"1em",height:"1em"})})}else s=e.cloneElement(r,{width:"1em",height:"1em"});return g.jsx("span",{ref:d,className:S(h,"vef-icon"),css:y,style:f,...u,children:s})}),m=e.memo(b);m.displayName="VefIcon",exports.default=m;
|
|
@@ -1,31 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),b=require("@emotion/react"),
|
|
3
|
-
color: ${e.themeVariables.colorTextSlate};
|
|
4
|
-
|
|
5
|
-
.vef-icon-select-wrapper {
|
|
6
|
-
padding: calc(${e.themeVariables.paddingXxs} + 2px) ${e.themeVariables.paddingXs};
|
|
7
|
-
}
|
|
8
|
-
`,N=b.css`
|
|
9
|
-
height: 100%;
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: ${e.themeVariables.colorFillContent};
|
|
14
|
-
border-radius: ${e.themeVariables.borderRadius};
|
|
15
|
-
transition: background-color ${e.themeVariables.motionDurationMid} ${e.themeVariables.motionEaseInOut};
|
|
16
|
-
&:hover {
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
background-color: ${e.themeVariables.colorFillContentHover};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.vef-icon-select-item-selected {
|
|
22
|
-
background-color: ${e.themeVariables.colorPrimaryBg};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.vef-icon {
|
|
26
|
-
font-size: 28px;
|
|
27
|
-
}
|
|
28
|
-
`,v=60,y=Array.from(q.dynamicIconNames);function X({value:s,onChange:a,keyword:d,onConfirm:c}){const{paddingXS:u,paddingXXS:h}=C.useThemeTokens(),m=t.useMemo(()=>{const i=e.trim(d);return i?e.cluster(y.filter(o=>o.includes(i)),6):e.cluster(y,6)},[d]),[l,n]=t.useMemo(()=>[6*v+12*5+u*2,5*v+12*4+(h+2)*2],[h,u]),f=t.useCallback(({item:i})=>{const o=i===s;return r.jsx("div",{className:o?"vef-icon-select-item-selected":void 0,css:N,title:i,onClick:()=>{if(o){c?.();return}a(i),c?.()},children:r.jsx(g.default,{name:i})})},[a,c,s]),p=t.useMemo(()=>({width:l,height:n}),[l,n]);return m.length===0?r.jsx("div",{css:j,children:r.jsx("div",{className:"vef-icon-select-wrapper",style:p,children:r.jsx(k.default,{description:"暂无图标",presetIcon:"simple"})})}):r.jsx("div",{css:j,children:r.jsx(M.default,{className:"vef-icon-select-wrapper",columnWidth:v,gap:"small",height:n,items:m,renderItem:f,rowHeight:v,width:l})})}const $=t.memo(X);$.displayName="VefIconsContent";const z=b.css`
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),b=require("@emotion/react"),q=require("@vef-framework/hooks"),e=require("@vef-framework/shared"),t=require("react"),g=require("../vef-dynamic-icon/index.cjs"),k=require("../vef-dynamic-icon/props.cjs"),V=require("../vef-empty-placeholder/index.cjs"),$=require("../vef-generic-select/index.cjs"),w=require("../vef-space/index.cjs"),I=require("../vef-text/index.cjs"),N=require("../vef-virtual-grid/index.cjs");const C=b.css({color:e.themeVariables.colorTextSlate,".vef-icon-select-wrapper":{padding:`calc(${e.themeVariables.paddingXxs} + 2px) ${e.themeVariables.paddingXs}`}}),M=b.css({height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.themeVariables.colorFillContent,borderRadius:e.themeVariables.borderRadius,transition:`background-color ${e.themeVariables.motionDurationMid} ${e.themeVariables.motionEaseInOut}`,"&:hover":{cursor:"pointer",backgroundColor:e.themeVariables.colorFillContentHover},"&.vef-icon-select-item-selected":{backgroundColor:e.themeVariables.colorPrimaryBg},".vef-icon":{fontSize:"28px"}}),v=60,j=Array.from(k.dynamicIconNames);function S({value:s,onChange:a,keyword:d,onConfirm:c}){const{paddingXS:u,paddingXXS:h}=q.useThemeTokens(),m=t.useMemo(()=>{const i=e.trim(d);return i?e.cluster(j.filter(o=>o.includes(i)),6):e.cluster(j,6)},[d]),[l,n]=t.useMemo(()=>[6*v+12*5+u*2,5*v+12*4+(h+2)*2],[h,u]),f=t.useCallback(({item:i})=>{const o=i===s;return r.jsx("div",{className:o?"vef-icon-select-item-selected":void 0,css:M,title:i,onClick:()=>{if(o){c?.();return}a(i),c?.()},children:r.jsx(g.default,{name:i})})},[a,c,s]),p=t.useMemo(()=>({width:l,height:n}),[l,n]);return m.length===0?r.jsx("div",{css:C,children:r.jsx("div",{className:"vef-icon-select-wrapper",style:p,children:r.jsx(V.default,{description:"暂无图标",presetIcon:"simple"})})}):r.jsx("div",{css:C,children:r.jsx(N.default,{className:"vef-icon-select-wrapper",columnWidth:v,gap:"small",height:n,items:m,renderItem:f,rowHeight:v,width:l})})}const y=t.memo(S);y.displayName="VefIconsContent";const X=b.css`
|
|
29
3
|
width: 100%;
|
|
30
4
|
|
|
31
5
|
.vef-space-item:last-of-type {
|
|
@@ -38,4 +12,4 @@
|
|
|
38
12
|
font-family: inherit;
|
|
39
13
|
color: inherit;
|
|
40
14
|
}
|
|
41
|
-
`;function
|
|
15
|
+
`;function z(s){return r.jsxs(w.default,{css:X,children:[r.jsx(g.default,{name:s}),r.jsx(I.default,{ellipsis:!0,children:s})]})}function H({defaultValue:s,value:a,size:d,placeholder:c,disabled:u,clearable:h,variant:m,onChange:l,onClear:n}){const[f,p]=t.useState(s??null),i=t.useCallback(x=>{if(e.isUndefined(a)){p(x);return}l?.(x)},[l,a]),o=t.useCallback(()=>{i(null),n?.()},[i,n]);return r.jsx($.default,{clearable:h,disabled:u,placeholder:c,renderLabel:z,size:d,value:a??f,variant:m,onClear:o,children:r.jsx(y,{value:e.isUndefined(a)?f:a,onChange:i})})}exports.default=H;
|
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";var e=require("@emotion/react"),r=require("@vef-framework/shared");const o=e.css
|
|
3
|
-
border-width: ${r.themeVariables.lineWidth};
|
|
4
|
-
border-style: ${r.themeVariables.lineType};
|
|
5
|
-
border-color: ${r.themeVariables.colorBorder};
|
|
6
|
-
border-radius: ${r.themeVariables.borderRadius};
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
|
|
9
|
-
&:not(:has(> .monaco-editor.focused)) {
|
|
10
|
-
border-color: ${r.themeVariables.colorBorder};
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
border-color: ${r.themeVariables.colorPrimaryHover};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&:has(.monaco-editor.focused) {
|
|
18
|
-
border-color: ${r.themeVariables.colorPrimary};
|
|
19
|
-
box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
|
|
20
|
-
}
|
|
21
|
-
`;exports.editorStyle=o;
|
|
2
|
+
"use strict";var e=require("@emotion/react"),r=require("@vef-framework/shared");const o=e.css({borderWidth:r.themeVariables.lineWidth,borderStyle:r.themeVariables.lineType,borderColor:r.themeVariables.colorBorder,borderRadius:r.themeVariables.borderRadius,overflow:"hidden","&:not(:has(> .monaco-editor.focused))":{borderColor:r.themeVariables.colorBorder,"&:hover":{borderColor:r.themeVariables.colorPrimaryHover}},"&:has(.monaco-editor.focused)":{borderColor:r.themeVariables.colorPrimary,boxShadow:"0 0 0 2px rgba(5, 145, 255, 0.1)"}});exports.editorStyle=o;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";var r=require("@emotion/react"),e=require("@vef-framework/shared");const s=r.css
|
|
3
|
-
padding: ${e.themeVariables.paddingXs};
|
|
4
|
-
${e.styles.flexCenter}
|
|
5
|
-
`;exports.iconStyle=s;
|
|
2
|
+
"use strict";var r=require("@emotion/react"),e=require("@vef-framework/shared");const s=r.css(e.styles.flexCenter,{padding:e.themeVariables.paddingXs});exports.iconStyle=s;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),r=require("@vef-framework/shared"),i=require("../../vef-divider/index.cjs"),t=require("./font-size.cjs"),s=require("./fullscreen.cjs"),u=require("./message.cjs"),o=require("./search.cjs"),l=require("./user-avatar.cjs");const n=a.css
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
column-gap: ${r.themeVariables.marginXxs};
|
|
6
|
-
|
|
7
|
-
> div:not(.vef-divider) {
|
|
8
|
-
border-radius: ${r.themeVariables.borderRadius};
|
|
9
|
-
transition: background-color ${r.themeVariables.motionDurationMid} ${r.themeVariables.motionEaseInOut};
|
|
10
|
-
|
|
11
|
-
&:hover {
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
background-color: ${r.themeVariables.colorFillTertiary};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`;function d(){return e.jsxs("div",{css:n,children:[e.jsx(i.default,{orientation:"vertical"}),e.jsx(o.default,{}),e.jsx(t.default,{}),e.jsx(s.default,{}),e.jsx(u.default,{}),e.jsx(l.default,{})]})}exports.default=d;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),r=require("@vef-framework/shared"),i=require("../../vef-divider/index.cjs"),t=require("./font-size.cjs"),s=require("./fullscreen.cjs"),u=require("./message.cjs"),o=require("./search.cjs"),l=require("./user-avatar.cjs");const n=a.css({display:"flex",alignItems:"center",columnGap:r.themeVariables.marginXxs,"> div:not(.vef-divider)":{borderRadius:r.themeVariables.borderRadius,transition:`background-color ${r.themeVariables.motionDurationMid} ${r.themeVariables.motionEaseInOut}`,"&:hover":{cursor:"pointer",backgroundColor:r.themeVariables.colorFillTertiary}}});function d(){return e.jsxs("div",{css:n,children:[e.jsx(i.default,{orientation:"vertical"}),e.jsx(o.default,{}),e.jsx(t.default,{}),e.jsx(s.default,{}),e.jsx(u.default,{}),e.jsx(l.default,{})]})}exports.default=d;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),l=require("@emotion/react"),r=require("@vef-framework/shared"),d=require("antd"),u=require("react"),i=require("../../vef-button/index.cjs"),n=require("../../vef-icon/index.cjs"),c=require("../../vef-popover/index.cjs"),
|
|
3
|
-
--vef-layout-header-height: 60px;
|
|
4
|
-
--vef-layout-header-padding: 0 ${r.themeVariables.paddingSm};
|
|
5
|
-
|
|
6
|
-
line-height: unset;
|
|
7
|
-
background-color: ${r.themeVariables.colorBgContainer};
|
|
8
|
-
border-bottom: ${r.themeVariables.lineWidth} ${r.themeVariables.lineType} ${r.themeVariables.colorBorderSecondary};
|
|
9
|
-
display: grid;
|
|
10
|
-
grid-template-columns: max-content minmax(min-content, 1fr) max-content;
|
|
11
|
-
align-items: center;
|
|
12
|
-
column-gap: ${r.themeVariables.margin};
|
|
13
|
-
`;function q(t){return e.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,children:[e.jsx("rect",{height:6.5,rx:2,width:6.5,x:3.75,y:3.75}),e.jsx("path",{d:"M15.586 3.818a2 2 0 0 1 2.828 0l1.768 1.768a2 2 0 0 1 0 2.828l-1.768 1.768a2 2 0 0 1-2.828 0l-1.768-1.768a2 2 0 0 1 0-2.828z"}),e.jsx("rect",{height:6.5,rx:1.5,width:6.5,x:3.75,y:13.75}),e.jsx("rect",{height:6.5,rx:2,width:6.5,x:13.75,y:13.75})]})})}function y(){const[t,o]=h.useLayoutStore(a=>[a.siderCollapsed,a.setSiderCollapsed]);return e.jsxs(j,{css:p,children:[e.jsxs("div",{css:r.styles.flexCenter,children:[e.jsx(i.default,{color:"default",variant:"text",icon:e.jsx(n.default,{size:"huge",children:t?e.jsx(v.default,{}):e.jsx(f.default,{})}),onClick:()=>o(!t)}),e.jsx(c.default,{content:e.jsx(g.default,{}),placement:"bottomRight",trigger:"click",children:e.jsx(i.default,{color:"default",variant:"text",icon:e.jsx(n.default,{size:"huge",children:e.jsx(q,{})})})})]}),e.jsx(m.default,{}),e.jsx(x.default,{})]})}const s=u.memo(y);s.displayName="VefHeader",exports.default=s;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),l=require("@emotion/react"),r=require("@vef-framework/shared"),d=require("antd"),u=require("react"),i=require("../../vef-button/index.cjs"),n=require("../../vef-icon/index.cjs"),c=require("../../vef-popover/index.cjs"),x=require("../store.cjs"),h=require("./header-action-icons.cjs"),m=require("./header-content.cjs"),f=require("./icon-menu-fold-left.cjs"),v=require("./icon-menu-unfold-left.cjs"),g=require("./menu-groups.cjs");const{Header:j}=d.Layout,p=l.css({"--vef-layout-header-height":"60px","--vef-layout-header-padding":`0 ${r.themeVariables.paddingSm}`,lineHeight:"unset",backgroundColor:r.themeVariables.colorBgContainer,borderBottom:`${r.themeVariables.lineWidth} ${r.themeVariables.lineType} ${r.themeVariables.colorBorderSecondary}`,display:"grid",gridTemplateColumns:"max-content minmax(min-content, 1fr) max-content",alignItems:"center",columnGap:r.themeVariables.margin});function q(t){return e.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,children:[e.jsx("rect",{height:6.5,rx:2,width:6.5,x:3.75,y:3.75}),e.jsx("path",{d:"M15.586 3.818a2 2 0 0 1 2.828 0l1.768 1.768a2 2 0 0 1 0 2.828l-1.768 1.768a2 2 0 0 1-2.828 0l-1.768-1.768a2 2 0 0 1 0-2.828z"}),e.jsx("rect",{height:6.5,rx:1.5,width:6.5,x:3.75,y:13.75}),e.jsx("rect",{height:6.5,rx:2,width:6.5,x:13.75,y:13.75})]})})}function y(){const[t,o]=x.useLayoutStore(a=>[a.siderCollapsed,a.setSiderCollapsed]);return e.jsxs(j,{css:p,children:[e.jsxs("div",{css:r.styles.flexCenter,children:[e.jsx(i.default,{color:"default",variant:"text",icon:e.jsx(n.default,{size:"huge",children:t?e.jsx(v.default,{}):e.jsx(f.default,{})}),onClick:()=>o(!t)}),e.jsx(c.default,{content:e.jsx(g.default,{}),placement:"bottomRight",trigger:"click",children:e.jsx(i.default,{color:"default",variant:"text",icon:e.jsx(n.default,{size:"huge",children:e.jsx(q,{})})})})]}),e.jsx(m.default,{}),e.jsx(h.default,{})]})}const s=u.memo(y);s.displayName="VefHeader",exports.default=s;
|
|
@@ -1,33 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@emotion/react/jsx-runtime"),l=require("@emotion/react"),r=require("@vef-framework/hooks"),c=require("@vef-framework/shared"),i=require("../../vef-text/index.cjs");const h=l.css
|
|
3
|
-
display: grid;
|
|
4
|
-
grid-template-columns: 320px 320px;
|
|
5
|
-
`,t=l.css`
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
gap: ${c.themeVariables.padding};
|
|
9
|
-
padding: ${c.themeVariables.padding};
|
|
10
|
-
border-radius: ${c.themeVariables.borderRadiusLg};
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
user-select: none;
|
|
13
|
-
transition: background-color ${c.themeVariables.motionDurationMid} ${c.themeVariables.motionEaseInOut};
|
|
14
|
-
|
|
15
|
-
&:hover {
|
|
16
|
-
background-color: ${c.themeVariables.colorFillContent};
|
|
17
|
-
}
|
|
18
|
-
`,n=l.css`
|
|
19
|
-
flex: none;
|
|
20
|
-
${c.styles.flexCenter}
|
|
21
|
-
`,d=l.css`
|
|
22
|
-
flex: auto;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
gap: ${c.themeVariables.paddingXxs};
|
|
26
|
-
color: ${c.themeVariables.colorText};
|
|
27
|
-
min-width: 0;
|
|
28
|
-
|
|
29
|
-
> span:last-of-type {
|
|
30
|
-
color: ${c.themeVariables.colorTextSecondary};
|
|
31
|
-
font-size: ${c.themeVariables.fontSizeSm};
|
|
32
|
-
}
|
|
33
|
-
`;function o(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#10C7C1","p-id":"1234"}),s.jsx("path",{d:"M757.333333 364.8L725.333333 394.666667c-32 32-85.333333 32-117.333333 0s-32-85.333333 0-119.466667l29.866667-29.866667c17.066667-17.066667 6.4-36.266667-25.6-32-32 4.266667-61.866667 19.2-85.333334 42.666667-36.266667 36.266667-51.2 89.6-40.533333 140.8l-256 258.133333c-32 32-32 85.333333 0 119.466667 32 32 85.333333 32 117.333333 0l256-258.133333c83.2 17.066667 164.266667-34.133333 181.333334-117.333334 0-2.133333 2.133333-6.4 2.133333-8.533333 6.4-32-12.8-42.666667-29.866667-25.6z m-448 369.066667c-10.666667 10.666667-27.733333 10.666667-38.4 0s-10.666667-27.733333 0-40.533334c10.666667-10.666667 29.866667-10.666667 38.4 2.133334 10.666667 10.666667 10.666667 27.733333 0 38.4z m-27.733333-364.8l96 96 38.4-40.533334-96-96-21.333333-40.533333-68.266667-49.066667L192 279.466667l49.066667 68.266666 40.533333 21.333334zM605.866667 576c-6.4-6.4-14.933333-6.4-19.2 0l-59.733334 59.733333c-6.4 6.4-6.4 14.933333 0 19.2l138.666667 140.8c21.333333 21.333333 57.6 21.333333 78.933333 0s21.333333-57.6 0-78.933333c0-2.133333-138.666667-140.8-138.666666-140.8z",fill:"#FFFFFF","p-id":"1235"})]})}function a(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#9F53E6","p-id":"1388"}),s.jsx("path",{d:"M567.466667 780.8c-4.266667 0-8.533333-2.133333-12.8-6.4l-102.4-162.133333-204.8-14.933334c-6.4 0-10.666667-6.4-12.8-12.8-2.133333-6.4 0-12.8 6.4-17.066666l452.266666-285.866667c4.266667-2.133333 8.533333-4.266667 12.8-2.133333 8.533333 2.133333 10.666667 10.666667 10.666667 17.066666l-132.266667 469.333334c-2.133333 6.4-6.4 10.666667-12.8 12.8-2.133333 2.133333-2.133333 2.133333-4.266666 2.133333z",fill:"#FFFFFF","p-id":"1389"})]})}function x(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#0EB4F6","p-id":"1696"}),s.jsx("path",{d:"M785.066667 627.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2H682.666667c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-14.933333 6.4-27.733333 14.933333-36.266667 8.533333-8.533333 21.333333-14.933333 36.266667-14.933333 4.266667 0 8.533333-4.266667 8.533333-8.533333v-40.533334c0-8.533333-8.533333-17.066667-17.066667-17.066666h-136.533333c-4.266667 0-8.533333 4.266667-8.533333 8.533333v51.2c0 4.266667 4.266667 8.533333 8.533333 8.533333 27.733333 0 51.2 23.466667 51.2 51.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2h-51.2c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-27.733333 23.466667-51.2 51.2-51.2 4.266667 0 8.533333-4.266667 8.533333-8.533333v-51.2c0-4.266667-4.266667-8.533333-8.533333-8.533333h-136.533333c-8.533333 0-17.066667 8.533333-17.066667 17.066666v40.533334c0 2.133333 0 4.266667 2.133333 6.4s4.266667 2.133333 6.4 2.133333c27.733333 0 51.2 23.466667 51.2 51.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2h-51.2c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-14.933333 6.4-27.733333 14.933334-36.266667 8.533333-8.533333 21.333333-14.933333 36.266666-14.933333 4.266667 0 8.533333-4.266667 8.533334-8.533333v-40.533334c0-27.733333 23.466667-51.2 51.2-51.2h136.533333c4.266667 0 8.533333-4.266667 8.533333-8.533333v-51.2c0-4.266667-4.266667-8.533333-8.533333-8.533333h-25.6c-27.733333 0-51.2-23.466667-51.2-51.2v-102.4c0-27.733333 23.466667-51.2 51.2-51.2h102.4c27.733333 0 51.2 23.466667 51.2 51.2v102.4c0 27.733333-23.466667 51.2-51.2 51.2h-25.6c-4.266667 0-8.533333 4.266667-8.533333 8.533333v51.2c0 4.266667 4.266667 8.533333 8.533333 8.533333h136.533333c27.733333 0 51.2 23.466667 51.2 51.2v40.533334c0 4.266667 4.266667 8.533333 8.533334 8.533333 29.866667 0 51.2 23.466667 51.2 51.2z",fill:"#FFFFFF","p-id":"1697"})]})}function v(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#10C7C1","p-id":"1850"}),s.jsx("path",{d:"M708.266667 258.133333H300.8c-17.066667 0-34.133333 14.933333-34.133333 32v441.6c0 19.2 14.933333 32 34.133333 32h407.466667c19.2 0 34.133333-14.933333 34.133333-32V290.133333c2.133333-17.066667-14.933333-32-34.133333-32zM377.6 512c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666 25.6 10.666667 25.6 23.466666c0 12.8-12.8 23.466667-25.6 23.466667z m0-115.2c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666 25.6 10.666667 25.6 23.466666c0 12.8-12.8 23.466667-25.6 23.466667z m256 115.2h-170.666667c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666h170.666667c12.8 0 25.6 10.666667 25.6 23.466666-2.133333 12.8-12.8 23.466667-25.6 23.466667z m0-115.2h-170.666667c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666h170.666667c12.8 0 25.6 10.666667 25.6 23.466666-2.133333 12.8-12.8 23.466667-25.6 23.466667z",fill:"#FFFFFF","p-id":"1851"})]})}function u(){return s.jsxs("div",{css:h,children:[s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(o,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"系统管理"}),s.jsx(i.default,{color:"secondary",children:"系统全局相关配置"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(a,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"主数据管理"}),s.jsx(i.default,{ellipsis:!0,color:"secondary",children:"医院、科室、医生、患者等主数据管理"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(x,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"流程管理"}),s.jsx(i.default,{children:"系统整体涉及的所有流程管理"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(v,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"业务管理"}),s.jsx(i.default,{color:"secondary",children:"医疗业务相关管理"})]})]})]})}exports.default=u;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@emotion/react/jsx-runtime"),l=require("@emotion/react"),r=require("@vef-framework/hooks"),c=require("@vef-framework/shared"),i=require("../../vef-text/index.cjs");const h=l.css({display:"grid",gridTemplateColumns:"320px 320px"}),t=l.css({display:"flex",alignItems:"center",gap:c.themeVariables.padding,padding:c.themeVariables.padding,borderRadius:c.themeVariables.borderRadiusLg,cursor:"pointer",userSelect:"none",transition:`background-color ${c.themeVariables.motionDurationMid} ${c.themeVariables.motionEaseInOut}`,"&:hover":{backgroundColor:c.themeVariables.colorFillContent}}),n=l.css(c.styles.flexCenter,{flex:"none"}),d=l.css({flex:"auto",display:"flex",flexDirection:"column",gap:c.themeVariables.paddingXxs,color:c.themeVariables.colorText,minWidth:0,"> span:last-of-type":{color:c.themeVariables.colorTextSecondary,fontSize:c.themeVariables.fontSizeSm}});function o(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#10C7C1","p-id":"1234"}),s.jsx("path",{d:"M757.333333 364.8L725.333333 394.666667c-32 32-85.333333 32-117.333333 0s-32-85.333333 0-119.466667l29.866667-29.866667c17.066667-17.066667 6.4-36.266667-25.6-32-32 4.266667-61.866667 19.2-85.333334 42.666667-36.266667 36.266667-51.2 89.6-40.533333 140.8l-256 258.133333c-32 32-32 85.333333 0 119.466667 32 32 85.333333 32 117.333333 0l256-258.133333c83.2 17.066667 164.266667-34.133333 181.333334-117.333334 0-2.133333 2.133333-6.4 2.133333-8.533333 6.4-32-12.8-42.666667-29.866667-25.6z m-448 369.066667c-10.666667 10.666667-27.733333 10.666667-38.4 0s-10.666667-27.733333 0-40.533334c10.666667-10.666667 29.866667-10.666667 38.4 2.133334 10.666667 10.666667 10.666667 27.733333 0 38.4z m-27.733333-364.8l96 96 38.4-40.533334-96-96-21.333333-40.533333-68.266667-49.066667L192 279.466667l49.066667 68.266666 40.533333 21.333334zM605.866667 576c-6.4-6.4-14.933333-6.4-19.2 0l-59.733334 59.733333c-6.4 6.4-6.4 14.933333 0 19.2l138.666667 140.8c21.333333 21.333333 57.6 21.333333 78.933333 0s21.333333-57.6 0-78.933333c0-2.133333-138.666667-140.8-138.666666-140.8z",fill:"#FFFFFF","p-id":"1235"})]})}function a(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#9F53E6","p-id":"1388"}),s.jsx("path",{d:"M567.466667 780.8c-4.266667 0-8.533333-2.133333-12.8-6.4l-102.4-162.133333-204.8-14.933334c-6.4 0-10.666667-6.4-12.8-12.8-2.133333-6.4 0-12.8 6.4-17.066666l452.266666-285.866667c4.266667-2.133333 8.533333-4.266667 12.8-2.133333 8.533333 2.133333 10.666667 10.666667 10.666667 17.066666l-132.266667 469.333334c-2.133333 6.4-6.4 10.666667-12.8 12.8-2.133333 2.133333-2.133333 2.133333-4.266666 2.133333z",fill:"#FFFFFF","p-id":"1389"})]})}function x(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#0EB4F6","p-id":"1696"}),s.jsx("path",{d:"M785.066667 627.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2H682.666667c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-14.933333 6.4-27.733333 14.933333-36.266667 8.533333-8.533333 21.333333-14.933333 36.266667-14.933333 4.266667 0 8.533333-4.266667 8.533333-8.533333v-40.533334c0-8.533333-8.533333-17.066667-17.066667-17.066666h-136.533333c-4.266667 0-8.533333 4.266667-8.533333 8.533333v51.2c0 4.266667 4.266667 8.533333 8.533333 8.533333 27.733333 0 51.2 23.466667 51.2 51.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2h-51.2c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-27.733333 23.466667-51.2 51.2-51.2 4.266667 0 8.533333-4.266667 8.533333-8.533333v-51.2c0-4.266667-4.266667-8.533333-8.533333-8.533333h-136.533333c-8.533333 0-17.066667 8.533333-17.066667 17.066666v40.533334c0 2.133333 0 4.266667 2.133333 6.4s4.266667 2.133333 6.4 2.133333c27.733333 0 51.2 23.466667 51.2 51.2v70.4c0 27.733333-23.466667 51.2-51.2 51.2h-51.2c-27.733333 0-51.2-23.466667-51.2-51.2v-70.4c0-14.933333 6.4-27.733333 14.933334-36.266667 8.533333-8.533333 21.333333-14.933333 36.266666-14.933333 4.266667 0 8.533333-4.266667 8.533334-8.533333v-40.533334c0-27.733333 23.466667-51.2 51.2-51.2h136.533333c4.266667 0 8.533333-4.266667 8.533333-8.533333v-51.2c0-4.266667-4.266667-8.533333-8.533333-8.533333h-25.6c-27.733333 0-51.2-23.466667-51.2-51.2v-102.4c0-27.733333 23.466667-51.2 51.2-51.2h102.4c27.733333 0 51.2 23.466667 51.2 51.2v102.4c0 27.733333-23.466667 51.2-51.2 51.2h-25.6c-4.266667 0-8.533333 4.266667-8.533333 8.533333v51.2c0 4.266667 4.266667 8.533333 8.533333 8.533333h136.533333c27.733333 0 51.2 23.466667 51.2 51.2v40.533334c0 4.266667 4.266667 8.533333 8.533334 8.533333 29.866667 0 51.2 23.466667 51.2 51.2z",fill:"#FFFFFF","p-id":"1697"})]})}function v(){const{controlHeightLG:e}=r.useThemeTokens();return s.jsxs("svg",{height:e,viewBox:"0 0 1024 1024",width:e,xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M768 1024H256C115.2 1024 0 908.8 0 768V256C0 115.2 115.2 0 256 0h512c140.8 0 256 115.2 256 256v512c0 140.8-115.2 256-256 256z",fill:"#10C7C1","p-id":"1850"}),s.jsx("path",{d:"M708.266667 258.133333H300.8c-17.066667 0-34.133333 14.933333-34.133333 32v441.6c0 19.2 14.933333 32 34.133333 32h407.466667c19.2 0 34.133333-14.933333 34.133333-32V290.133333c2.133333-17.066667-14.933333-32-34.133333-32zM377.6 512c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666 25.6 10.666667 25.6 23.466666c0 12.8-12.8 23.466667-25.6 23.466667z m0-115.2c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666 25.6 10.666667 25.6 23.466666c0 12.8-12.8 23.466667-25.6 23.466667z m256 115.2h-170.666667c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666h170.666667c12.8 0 25.6 10.666667 25.6 23.466666-2.133333 12.8-12.8 23.466667-25.6 23.466667z m0-115.2h-170.666667c-12.8 0-25.6-10.666667-25.6-23.466667s12.8-23.466667 25.6-23.466666h170.666667c12.8 0 25.6 10.666667 25.6 23.466666-2.133333 12.8-12.8 23.466667-25.6 23.466667z",fill:"#FFFFFF","p-id":"1851"})]})}function u(){return s.jsxs("div",{css:h,children:[s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(o,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"系统管理"}),s.jsx(i.default,{color:"secondary",children:"系统全局相关配置"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(a,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"主数据管理"}),s.jsx(i.default,{ellipsis:!0,color:"secondary",children:"医院、科室、医生、患者等主数据管理"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(x,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"流程管理"}),s.jsx(i.default,{children:"系统整体涉及的所有流程管理"})]})]}),s.jsxs("div",{css:t,children:[s.jsx("span",{css:n,children:s.jsx(v,{})}),s.jsxs("div",{css:d,children:[s.jsx(i.default,{children:"业务管理"}),s.jsx(i.default,{color:"secondary",children:"医疗业务相关管理"})]})]})]})}exports.default=u;
|
|
@@ -1,50 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),d=require("@emotion/react"),
|
|
3
|
-
border-right: ${i.themeVariables.lineWidth} ${i.themeVariables.lineType} ${i.themeVariables.colorBorderSecondary};
|
|
4
|
-
|
|
5
|
-
> .vef-layout-sider-children {
|
|
6
|
-
--vef-layout-header-height: 60px;
|
|
7
|
-
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
|
|
11
|
-
.vef-layout-sider-menu {
|
|
12
|
-
flex: auto;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
padding: 6px 0;
|
|
15
|
-
|
|
16
|
-
> div {
|
|
17
|
-
padding: 0 6px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.vef-menu-submenu-title, .vef-menu-item {
|
|
21
|
-
user-select: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vef-menu.vef-menu-root.vef-menu-light {
|
|
25
|
-
border-inline-end: none;
|
|
26
|
-
|
|
27
|
-
&.vef-menu-inline-collapsed {
|
|
28
|
-
width: 67px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.vef-menu-inline {
|
|
32
|
-
.vef-menu-item {
|
|
33
|
-
&.vef-menu-item-selected {
|
|
34
|
-
&::before {
|
|
35
|
-
content: "";
|
|
36
|
-
position: absolute;
|
|
37
|
-
inset-inline-start: 0;
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
width: 0;
|
|
40
|
-
height: calc(${i.themeVariables.fontSize} * 0.8);
|
|
41
|
-
border-inline-start: 4px ${i.themeVariables.lineType} var(--vef-menu-item-selected-color);
|
|
42
|
-
border-radius: var(--vef-menu-item-border-radius);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`;function g(){const[a,s,t,o]=h.useLayoutContextSelector(e=>[e.menuItems,e.defaultOpenedMenuKeys,e.activeMenuKey,e.onActiveMenuKeyChange]),[n,u]=p.useLayoutStore(e=>[e.siderCollapsed,e.setSiderCollapsed]);return r.jsxs(y,{collapsible:!0,breakpoint:"lg",collapsed:n,collapsedWidth:80,css:b,theme:"light",trigger:null,width:220,onCollapse:u,children:[r.jsx(x.default,{}),r.jsx("div",{className:"vef-layout-sider-menu",children:r.jsx(f.default,{scrollbarSize:"small",children:r.jsx(v.default,{inlineExpansion:!0,defaultOpenedKeys:s,inlineCollapsed:n,items:a??[],selectedKeys:t?[t]:[],onSelect:o})})})]})}const l=m.memo(g);l.displayName="VefSider",exports.default=l;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),d=require("@emotion/react"),t=require("@vef-framework/shared"),c=require("antd"),m=require("react"),v=require("../../vef-menu/index.cjs"),f=require("../../vef-scroll-area/index.cjs"),h=require("../hooks/use-layout-context.cjs"),p=require("../store.cjs"),x=require("./title.cjs");const{Sider:y}=c.Layout,b=d.css({borderRight:`${t.themeVariables.lineWidth} ${t.themeVariables.lineType} ${t.themeVariables.colorBorderSecondary}`,"> .vef-layout-sider-children":{"--vef-layout-header-height":"60px",display:"flex",flexDirection:"column",".vef-layout-sider-menu":{flex:"auto",minHeight:0,padding:"6px 0","> div":{padding:"0 6px"},".vef-menu-submenu-title, .vef-menu-item":{userSelect:"none"},".vef-menu.vef-menu-root.vef-menu-light":{borderInlineEnd:"none","&.vef-menu-inline-collapsed":{width:"67px"},"&.vef-menu-inline":{".vef-menu-item":{"&.vef-menu-item-selected":{"&::before":{content:'""',position:"absolute",insetInlineStart:0,pointerEvents:"none",width:0,height:`calc(${t.themeVariables.fontSize} * 0.8)`,borderInlineStart:`4px ${t.themeVariables.lineType} var(--vef-menu-item-selected-color)`,borderRadius:"var(--vef-menu-item-border-radius)"}}}}}}}});function g(){const[a,s,i,o]=h.useLayoutContextSelector(e=>[e.menuItems,e.defaultOpenedMenuKeys,e.activeMenuKey,e.onActiveMenuKeyChange]),[n,u]=p.useLayoutStore(e=>[e.siderCollapsed,e.setSiderCollapsed]);return r.jsxs(y,{collapsible:!0,breakpoint:"lg",collapsed:n,collapsedWidth:80,css:b,theme:"light",trigger:null,width:220,onCollapse:u,children:[r.jsx(x.default,{}),r.jsx("div",{className:"vef-layout-sider-menu",children:r.jsx(f.default,{scrollbarSize:"small",children:r.jsx(v.default,{inlineExpansion:!0,defaultOpenedKeys:s,inlineCollapsed:n,items:a??[],selectedKeys:i?[i]:[],onSelect:o})})})]})}const l=m.memo(g);l.displayName="VefSider",exports.default=l;
|
|
@@ -1,37 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@emotion/react/jsx-runtime"),s=require("@emotion/react"),e=require("@vef-framework/shared"),r=require("motion/react"),d=require("react"),c=require("../hooks/use-layout-context.cjs"),h=require("../logo.svg.cjs"),u=require("../store.cjs");const x=s.css
|
|
3
|
-
flex: none;
|
|
4
|
-
height: var(--vef-layout-header-height);
|
|
5
|
-
border-bottom: ${e.themeVariables.lineWidth} ${e.themeVariables.lineType} ${e.themeVariables.colorBorderSecondary};
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
padding: 0 ${e.themeVariables.paddingSm};
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
user-select: none;
|
|
11
|
-
|
|
12
|
-
> div {
|
|
13
|
-
flex: none;
|
|
14
|
-
width: 55px;
|
|
15
|
-
height: calc(${e.themeVariables.controlHeight} * 1.2);
|
|
16
|
-
font-size: 0;
|
|
17
|
-
${e.styles.flexCenter}
|
|
18
|
-
|
|
19
|
-
> img {
|
|
20
|
-
height: 100%;
|
|
21
|
-
width: auto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
> h3 {
|
|
26
|
-
flex: auto;
|
|
27
|
-
margin: 0;
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
font-size: ${e.themeVariables.fontSizeLg};
|
|
30
|
-
color: ${e.themeVariables.colorTextSlate};
|
|
31
|
-
max-width: 156px;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
text-align: center;
|
|
35
|
-
text-overflow: ellipsis;
|
|
36
|
-
}
|
|
37
|
-
`,m="VEF中后台系统";function f(){const[o,l]=c.useLayoutContextSelector(i=>[i.logo,i.title]),n=u.useLayoutStore(i=>i.siderCollapsed);return t.jsxs("div",{css:x,children:[t.jsx("div",{children:o||t.jsx("img",{alt:"VEF",src:h.default})}),t.jsx(r.AnimatePresence,{initial:!1,children:!n&&t.jsx(r.motion.h3,{layout:!0,animate:{opacity:1,x:0},exit:{opacity:0,x:32},initial:{opacity:0,x:-32},transition:{duration:.2,ease:"easeIn"},children:l||m})})]})}const a=d.memo(f);a.displayName="VefTitle",exports.default=a;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@emotion/react/jsx-runtime"),s=require("@emotion/react"),e=require("@vef-framework/shared"),r=require("motion/react"),d=require("react"),c=require("../hooks/use-layout-context.cjs"),h=require("../logo.svg.cjs"),u=require("../store.cjs");const x=s.css({flex:"none",height:"var(--vef-layout-header-height)",borderBottom:`${e.themeVariables.lineWidth} ${e.themeVariables.lineType} ${e.themeVariables.colorBorderSecondary}`,display:"flex",alignItems:"center",padding:`0 ${e.themeVariables.paddingSm}`,overflow:"hidden",userSelect:"none","> div":[e.styles.flexCenter,{flex:"none",width:"55px",height:`calc(${e.themeVariables.controlHeight} * 1.2)`,fontSize:0,"> img":{height:"100%",width:"auto"}}],"> h3":{flex:"auto",margin:0,fontWeight:"bold",fontSize:e.themeVariables.fontSizeLg,color:e.themeVariables.colorTextSlate,maxWidth:"156px",whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis"}}),m="VEF中后台系统";function f(){const[o,l]=c.useLayoutContextSelector(i=>[i.logo,i.title]),n=u.useLayoutStore(i=>i.siderCollapsed);return t.jsxs("div",{css:x,children:[t.jsx("div",{children:o||t.jsx("img",{alt:"VEF",src:h.default})}),t.jsx(r.AnimatePresence,{initial:!1,children:!n&&t.jsx(r.motion.h3,{layout:!0,animate:{opacity:1,x:0},exit:{opacity:0,x:32},initial:{opacity:0,x:-32},transition:{duration:.2,ease:"easeIn"},children:l||m})})]})}const a=d.memo(f);a.displayName="VefTitle",exports.default=a;
|
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),i=require("@vef-framework/shared"),t=require("lucide-react"),x=require("react")
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
column-gap: ${i.themeVariables.marginSm};
|
|
6
|
-
padding: ${i.themeVariables.paddingXs};
|
|
7
|
-
`,g=a.css`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
align-items: center;
|
|
11
|
-
row-gap: calc(${i.themeVariables.marginXxs} + 2px);
|
|
12
|
-
user-select: none;
|
|
13
|
-
line-height: 1;
|
|
14
|
-
`,y=a.css`
|
|
15
|
-
font-size: ${i.themeVariables.fontSizeSm};
|
|
16
|
-
color: ${i.themeVariables.colorTextDescription};
|
|
17
|
-
`,b=[{type:"item",key:"userInfo",label:"个人信息",icon:e.jsx(n.default,{children:e.jsx(t.UserRoundIcon,{})})},{type:"item",key:"passwordModification",label:"修改密码",icon:e.jsx(n.default,{children:e.jsx(t.LockKeyholeIcon,{})})},{type:"item",key:"logout",label:"退出登录",icon:e.jsx(n.default,{children:e.jsx(t.LogOutIcon,{})})}],q=e.jsx(j.default,{}),$=e.jsx(p.default,{});function k(){const[s,c,o,u,l]=h.useLayoutContextSelector(r=>[r.onLogout,r.userName,r.userGender,r.userAvatar,r.userDescription]),d=x.useCallback(r=>{r==="logout"&&s&&i.showConfirmation("登出提示","确定要退出登录吗?",s)},[s]);return e.jsx(f.default,{items:b,onClick:d,children:e.jsxs("div",{css:v,children:[e.jsx(m.default,{size:"medium",src:u||(o==="female"?$:q)}),e.jsxs("div",{css:g,children:[e.jsx("span",{children:c??"佚名"}),l&&e.jsxs("span",{css:y,children:["[",l,"]"]})]})]})})}exports.default=k;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),i=require("@vef-framework/shared"),t=require("lucide-react"),x=require("react");require("../../helpers/index.cjs");var m=require("../../vef-avatar/index.cjs"),f=require("../../vef-dropdown/index.cjs"),n=require("../../vef-icon/index.cjs"),h=require("../hooks/use-layout-context.cjs"),j=require("./icon-boy.cjs"),p=require("./icon-girl.cjs"),v=require("../../helpers/message.cjs");const q=a.css({display:"flex",alignItems:"center",columnGap:i.themeVariables.marginSm,padding:i.themeVariables.paddingXs}),y=a.css({display:"flex",flexDirection:"column",alignItems:"center",rowGap:`calc(${i.themeVariables.marginXxs} + 2px)`,userSelect:"none",lineHeight:1}),g=a.css({fontSize:i.themeVariables.fontSizeSm,color:i.themeVariables.colorTextDescription}),b=[{type:"item",key:"userInfo",label:"个人信息",icon:e.jsx(n.default,{children:e.jsx(t.UserRoundIcon,{})})},{type:"item",key:"passwordModification",label:"修改密码",icon:e.jsx(n.default,{children:e.jsx(t.LockKeyholeIcon,{})})},{type:"item",key:"logout",label:"退出登录",icon:e.jsx(n.default,{children:e.jsx(t.LogOutIcon,{})})}],k=e.jsx(j.default,{}),C=e.jsx(p.default,{});function I(){const[s,c,u,o,l]=h.useLayoutContextSelector(r=>[r.onLogout,r.userName,r.userGender,r.userAvatar,r.userDescription]),d=x.useCallback(r=>{r==="logout"&&s&&v.showConfirmation("登出提示","确定要退出登录吗?",s)},[s]);return e.jsx(f.default,{items:b,onClick:d,children:e.jsxs("div",{css:q,children:[e.jsx(m.default,{size:"medium",src:o||(u==="female"?C:k)}),e.jsxs("div",{css:y,children:[e.jsx("span",{children:c??"佚名"}),l&&e.jsxs("span",{css:g,children:["[",l,"]"]})]})]})})}exports.default=I;
|
package/cjs/vef-layout/index.cjs
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),u=require("@emotion/react"),n=require("@vef-framework/shared"),t=require("antd"),s=require("react"),d=require("./components/content.cjs"),l=require("./components/header.cjs"),o=require("./components/sider.cjs"),c=require("./hooks/use-layout-context.cjs"),h=require("./store.cjs");const v=u.css
|
|
3
|
-
height: 100%;
|
|
4
|
-
min-height: initial;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
`;function q({children:r}){return e.jsxs(t.Layout,{hasSider:!0,css:v,children:[e.jsx(o.default,{}),e.jsxs(t.Layout,{hasSider:!1,children:[e.jsx(l.default,{}),e.jsx(d.default,{children:r})]})]})}function x({children:r,...i}){return e.jsx(h.LayoutStoreProvider,{initialState:null,children:e.jsx(c.LayoutContextProvider,{value:i,children:e.jsx(q,{children:r})})})}const a=s.memo(x,(r,i)=>n.isShallowEqual(r.activeMenuKey,i.activeMenuKey));a.displayName="VefLayout",exports.default=a;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),u=require("@emotion/react"),n=require("@vef-framework/shared"),t=require("antd"),s=require("react"),d=require("./components/content.cjs"),l=require("./components/header.cjs"),o=require("./components/sider.cjs"),c=require("./hooks/use-layout-context.cjs"),h=require("./store.cjs");const v=u.css({height:"100%",minHeight:"initial",overflow:"hidden"});function q({children:r}){return e.jsxs(t.Layout,{hasSider:!0,css:v,children:[e.jsx(o.default,{}),e.jsxs(t.Layout,{hasSider:!1,children:[e.jsx(l.default,{}),e.jsx(d.default,{children:r})]})]})}function x({children:r,...i}){return e.jsx(h.LayoutStoreProvider,{initialState:null,children:e.jsx(c.LayoutContextProvider,{value:i,children:e.jsx(q,{children:r})})})}const a=s.memo(x,(r,i)=>n.isShallowEqual(r.activeMenuKey,i.activeMenuKey));a.displayName="VefLayout",exports.default=a;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),t=require("@vef-framework/shared"),n=require("motion/react"),
|
|
3
|
-
height: 100%;
|
|
4
|
-
padding: ${t.themeVariables.paddingLg};
|
|
5
|
-
${t.styles.flexCenter}
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
row-gap: ${t.themeVariables.marginLg};
|
|
8
|
-
`;function c({text:e}){return r.jsx("div",{css:t.styles.flexCenter,children:String(e).split("").map((i,s)=>r.jsx(n.motion.span,{animate:{y:[2,-2]},initial:{y:0},transition:{duration:.6,repeat:1/0,delay:s*.1,ease:"easeInOut",repeatType:"reverse"},children:i},s))})}function o({tip:e,...i}){return r.jsxs("div",{css:l,children:[r.jsx(d.default,{...i}),e&&t.isString(e)&&r.jsx(u.default,{color:"secondary",children:r.jsx(c,{text:e})})||e]})}exports.default=o;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),a=require("@emotion/react"),t=require("@vef-framework/shared"),n=require("motion/react"),u=require("../vef-spin/index.cjs"),d=require("../vef-text/index.cjs");const l=a.css(t.styles.flexCenter,{height:"100%",padding:t.themeVariables.paddingLg,flexDirection:"column",rowGap:t.themeVariables.marginLg});function c({text:e}){return r.jsx("div",{css:t.styles.flexCenter,children:String(e).split("").map((i,s)=>r.jsx(n.motion.span,{animate:{y:[2,-2]},initial:{y:0},transition:{duration:.6,repeat:1/0,delay:s*.1,ease:"easeInOut",repeatType:"reverse"},children:i},s))})}function o({tip:e,...i}){return r.jsxs("div",{css:l,children:[r.jsx(u.default,{...i}),e&&t.isString(e)&&r.jsx(d.default,{color:"secondary",children:r.jsx(c,{text:e})})||e]})}exports.default=o;
|
package/cjs/vef-login/index.cjs
CHANGED
|
@@ -1,55 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),u=require("@ant-design/icons"),
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100%;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
|
|
7
|
-
.vef-typography {
|
|
8
|
-
--vef-typography-title-margin-bottom: 0.2em;
|
|
9
|
-
}
|
|
10
|
-
`,w=i.css`
|
|
11
|
-
flex: none;
|
|
12
|
-
padding-top: calc(${s.themeVariables.paddingXl} * 3);
|
|
13
|
-
text-align: center;
|
|
14
|
-
`,k=i.css`
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 0;
|
|
17
|
-
left: 0;
|
|
18
|
-
padding: ${s.themeVariables.padding};
|
|
19
|
-
`,S=i.css`
|
|
20
|
-
flex: 1;
|
|
21
|
-
height: 100%;
|
|
22
|
-
display: none;
|
|
23
|
-
background-image: linear-gradient(154deg, ${s.themeVariables.blue1} 30%, ${s.themeVariables.geekblue3} 48%, ${s.themeVariables.blue1} 64%);
|
|
24
|
-
${s.bmq.md} {
|
|
25
|
-
display: flex;
|
|
26
|
-
}
|
|
27
|
-
`,C=i.css`
|
|
28
|
-
flex: auto;
|
|
29
|
-
min-height: 0;
|
|
30
|
-
width: 40%;
|
|
31
|
-
`,I=i.css`
|
|
32
|
-
position: relative;
|
|
33
|
-
height: 100%;
|
|
34
|
-
width: 360px;
|
|
35
|
-
padding: 0 ${s.themeVariables.paddingLg};
|
|
36
|
-
${s.bmq.lg} {
|
|
37
|
-
width: 480px;
|
|
38
|
-
padding: 0 calc(${s.themeVariables.paddingXl} * 2);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.vef-form {
|
|
42
|
-
margin-top: ${s.themeVariables.marginXl};
|
|
43
|
-
}
|
|
44
|
-
`,R=i.css`
|
|
45
|
-
position: absolute;
|
|
46
|
-
bottom: ${s.themeVariables.margin};
|
|
47
|
-
left: 0;
|
|
48
|
-
right: 0;
|
|
49
|
-
text-align: center;
|
|
50
|
-
`,B=i.css`
|
|
51
|
-
position: absolute;
|
|
52
|
-
top: ${s.themeVariables.margin};
|
|
53
|
-
right: ${s.themeVariables.margin};
|
|
54
|
-
left: ${s.themeVariables.margin};
|
|
55
|
-
`,E=[{key:"default",rows:[{key:"1",columns:[{key:"1",items:[{name:"account",type:"Input",placeholder:"账号",prefix:e.jsx(u.UserOutlined,{}),rules:[h.isRequired("请输入账号")]},{name:"password",type:"Password",placeholder:"密码",prefix:e.jsx(u.LockOutlined,{}),rules:[h.isRequired("请输入密码")]}]}]}]}];function O(a,n){return s.encryptRsa(a,n)}function X({logo:a,title:n="VEF 中后台管理系统",description:p="一款极度快速的超能系统",publicKey:d,onLoginSuccess:c}){const m=l.useCallback(r=>d?{...r,password:O(r.password,d)}:r,[d]),f=l.useCallback(({message:r,data:j})=>{s.showSuccessMessage(r),c?.(j)},[c]),[x,b]=l.useState(s.getTodayString());l.useEffect(()=>{const r=setInterval(()=>{b(s.getTodayString())},1e3);return()=>{clearInterval(r)}},[]);const{loginApi:v}=y.useApiContext();return e.jsxs(o.default,{css:V,justify:"center",children:[a&&e.jsx("div",{css:k,children:a}),e.jsxs(o.default,{vertical:!0,align:"center",css:S,children:[e.jsxs("div",{css:w,children:[e.jsx(g.default,{children:n}),e.jsx(t.default,{children:p})]}),e.jsx("div",{css:[C,s.styles.flexCenter],children:e.jsx(q.default,{})})]}),e.jsxs(o.default,{vertical:!0,css:I,justify:"center",children:[e.jsxs("div",{css:B,children:[e.jsx(t.default,{color:"secondary",children:"🕰️ 今天是 "}),e.jsx(t.default,{bold:!0,color:"green",children:x})]}),e.jsx(g.default,{level:2,children:"身份认证 🔑"}),e.jsx(t.default,{color:"secondary",children:"请输入您的账号和密码进行登录"}),e.jsx($.default,{labelPosition:"left",resetButton:!1,scene:"login",schema:E,size:"large",submitApi:v,submitTip:"登录中...",submissionButton:{text:"登录",block:!0},onBeforeSubmit:m,onSubmitSuccess:f}),e.jsx("div",{css:R,children:e.jsxs(t.default,{color:"secondary",children:["Copyright ©"," ",new Date().getFullYear()," ","VEF."]})})]})]})}exports.default=X;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),u=require("@ant-design/icons"),r=require("@emotion/react"),y=require("@vef-framework/core"),s=require("@vef-framework/shared"),l=require("react");require("../helpers/index.cjs");var c=require("../vef-flex/index.cjs"),q=require("../vef-form/index.cjs"),g=require("../vef-form/validation-rules.cjs"),t=require("../vef-text/index.cjs"),h=require("../vef-title/index.cjs"),V=require("./login-icon.cjs"),w=require("../helpers/message.cjs");const $=r.css({position:"relative",height:"100%",overflow:"hidden",".vef-typography":{"--vef-typography-title-margin-bottom":"0.2em"}}),k=r.css({flex:"none",paddingTop:`calc(${s.themeVariables.paddingXl} * 3)`,textAlign:"center"}),S=r.css({position:"absolute",top:0,left:0,padding:s.themeVariables.padding}),I=r.css({flex:1,height:"100%",display:"none",backgroundImage:`linear-gradient(154deg, ${s.themeVariables.blue1} 30%, ${s.themeVariables.geekblue3} 48%, ${s.themeVariables.blue1} 64%)`,[s.bmq.md]:{display:"flex"}}),A=r.css({flex:"auto",minHeight:0,width:"40%"}),C=r.css({position:"relative",height:"100%",width:"360px",padding:`0 ${s.themeVariables.paddingLg}`,[s.bmq.lg]:{width:"480px",padding:`0 calc(${s.themeVariables.paddingXl} * 2)`},".vef-form":{marginTop:s.themeVariables.marginXl}}),R=r.css({position:"absolute",bottom:s.themeVariables.margin,left:0,right:0,textAlign:"center"}),T=r.css({position:"absolute",top:s.themeVariables.margin,right:s.themeVariables.margin,left:s.themeVariables.margin}),B=[{key:"default",rows:[{key:"1",columns:[{key:"1",items:[{name:"account",type:"Input",placeholder:"账号",prefix:e.jsx(u.UserOutlined,{}),rules:[g.isRequired("请输入账号")]},{name:"password",type:"Password",placeholder:"密码",prefix:e.jsx(u.LockOutlined,{}),rules:[g.isRequired("请输入密码")]}]}]}]}];function E(a,n){return s.encryptRsa(a,n)}function O({logo:a,title:n="VEF 中后台管理系统",description:p="一款极度快速的超能系统",publicKey:d,onLoginSuccess:o}){const m=l.useCallback(i=>d?{...i,password:E(i.password,d)}:i,[d]),x=l.useCallback(({message:i,data:j})=>{w.showSuccessMessage(i),o?.(j)},[o]),[f,b]=l.useState(s.getTodayString());l.useEffect(()=>{const i=setInterval(()=>{b(s.getTodayString())},1e3);return()=>{clearInterval(i)}},[]);const{loginApi:v}=y.useApiContext();return e.jsxs(c.default,{css:$,justify:"center",children:[a&&e.jsx("div",{css:S,children:a}),e.jsxs(c.default,{vertical:!0,align:"center",css:I,children:[e.jsxs("div",{css:k,children:[e.jsx(h.default,{children:n}),e.jsx(t.default,{children:p})]}),e.jsx("div",{css:[A,s.styles.flexCenter],children:e.jsx(V.default,{})})]}),e.jsxs(c.default,{vertical:!0,css:C,justify:"center",children:[e.jsxs("div",{css:T,children:[e.jsx(t.default,{color:"secondary",children:"🕰️ 今天是 "}),e.jsx(t.default,{bold:!0,color:"green",children:f})]}),e.jsx(h.default,{level:2,children:"身份认证 🔑"}),e.jsx(t.default,{color:"secondary",children:"请输入您的账号和密码进行登录"}),e.jsx(q.default,{labelPosition:"left",resetButton:!1,scene:"login",schema:B,size:"large",submitApi:v,submitTip:"登录中...",submissionButton:{text:"登录",block:!0},onBeforeSubmit:m,onSubmitSuccess:x}),e.jsx("div",{css:R,children:e.jsxs(t.default,{color:"secondary",children:["Copyright ©"," ",new Date().getFullYear()," ","VEF."]})})]})]})}exports.default=O;
|
package/cjs/vef-menu/index.cjs
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var P=require("@emotion/react/jsx-runtime"),g=require("@emotion/react"),j=require("@vef-framework/hooks"),e=require("@vef-framework/shared"),D=require("antd"),O=require("react");const V=g.css`
|
|
3
|
-
&.vef-menu {
|
|
4
|
-
--vef-menu-icon-size: ${e.themeVariables.fontSizeLg};
|
|
5
|
-
--vef-menu-collapsed-icon-size: calc(${e.themeVariables.fontSizeLg} + 2px);
|
|
6
|
-
}
|
|
7
|
-
`;function $({defaultOpenedKeys:r,openedKeys:u,orientation:d="vertical",inlineCollapsed:y=!1,inlineIndent:v=20,inlineExpansion:m=!1,items:f,selectable:p=!0,deselectable:K=!1,multiple:h=!1,defaultSelectedKeys:k,selectedKeys:b,appearance:S,onClick:l,onChange:i,onSelect:s,onDeselect:a}){const q=j.useNormalizedMenuItems(f),[z,C,x]=O.useMemo(()=>{const F=e.isFunction(l)?({key:n,keyPath:t})=>l(n,t):void 0,o=e.isFunction(i),I=e.isFunction(s)||o?({key:n,keyPath:t,selectedKeys:c})=>{i?.(c),s?.(n,t)}:void 0,M=e.isFunction(a)||o?({key:n,keyPath:t,selectedKeys:c})=>{i?.(c),a?.(n,t)}:void 0;return[F,I,M]},[l,i,s,a]);return P.jsx(D.Menu,{css:V,defaultOpenKeys:r,defaultSelectedKeys:k,inlineCollapsed:y,inlineIndent:v,items:q,mode:d==="vertical"?m?"inline":"vertical":"horizontal",multiple:h,openKeys:u,selectable:p,selectedKeys:b,theme:S,unselectable:K?"on":"off",onClick:z,onDeselect:x,onSelect:C})}exports.default=$;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var P=require("@emotion/react/jsx-runtime"),g=require("@emotion/react"),j=require("@vef-framework/hooks"),e=require("@vef-framework/shared"),D=require("antd"),O=require("react");const V=g.css({"&.vef-menu":{"--vef-menu-icon-size":e.themeVariables.fontSizeLg,"--vef-menu-collapsed-icon-size":`calc(${e.themeVariables.fontSizeLg} + 2px)`}});function L({defaultOpenedKeys:r,openedKeys:u,orientation:d="vertical",inlineCollapsed:y=!1,inlineIndent:v=20,inlineExpansion:m=!1,items:f,selectable:p=!0,deselectable:K=!1,multiple:h=!1,defaultSelectedKeys:k,selectedKeys:b,appearance:S,onClick:l,onChange:i,onSelect:s,onDeselect:a}){const q=j.useNormalizedMenuItems(f),[z,C,x]=O.useMemo(()=>{const F=e.isFunction(l)?({key:n,keyPath:t})=>l(n,t):void 0,o=e.isFunction(i),I=e.isFunction(s)||o?({key:n,keyPath:t,selectedKeys:c})=>{i?.(c),s?.(n,t)}:void 0,M=e.isFunction(a)||o?({key:n,keyPath:t,selectedKeys:c})=>{i?.(c),a?.(n,t)}:void 0;return[F,I,M]},[l,i,s,a]);return P.jsx(D.Menu,{css:V,defaultOpenKeys:r,defaultSelectedKeys:k,inlineCollapsed:y,inlineIndent:v,items:q,mode:d==="vertical"?m?"inline":"vertical":"horizontal",multiple:h,openKeys:u,selectable:p,selectedKeys:b,theme:S,unselectable:K?"on":"off",onClick:z,onDeselect:x,onSelect:C})}exports.default=L;
|
package/cjs/vef-modal/index.cjs
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),U=require("@emotion/react"),
|
|
3
|
-
cursor: move;
|
|
4
|
-
user-select: none;
|
|
5
|
-
`;function ne({title:y,open:d,closable:S=!0,closeOnEscPress:z=!0,closeOnMaskClick:D=!1,destroyOnClose:W=!1,showCancelButton:F=!0,cancelButtonText:f="取消",okButtonText:m="提交",actions:a,width:s,loading:j=!1,cancelOnClose:B=!0,onClose:C,onOk:h,onCancel:k,onAfterOpen:v,onAfterClose:p,children:I}){const i=L.useDragControls(),M=t.useCallback(e=>{e.stopPropagation(),i.start(e)},[i]),{width:x,height:g}=T.useWindowSize(),[R,V]=t.useState(null),b=T.useElementSize(R),A=t.useMemo(()=>{if(!b)return{left:0,top:0,right:0,bottom:0};const{width:e,height:n}=b;return{left:-(x/2-e/2),top:-(g/2-n/2),right:x/2-e/2,bottom:g/2-n/2}},[b,g,x]),_=t.useMemo(()=>s==="small"?378:s==="medium"?736:s==="narrow"?"25vw":s==="half"?"50vw":s==="wide"?"75vw":s==="full"?"100vw":s,[s]),$=t.useCallback(e=>r.jsx(L.motion.div,{ref:n=>V(n),drag:!0,dragConstraints:A,dragControls:i,dragElastic:.3,dragListener:!1,dragMomentum:!1,children:e}),[A,i]),G=t.useMemo(()=>r.jsx("div",{css:te,onPointerDown:M,children:y}),[y,M]),[O,E]=t.useState(!1),[w,u]=t.useState({isFullyOpened:!1,isFullyClosed:!1}),H=t.useMemo(()=>({isDisabled:O,setIsDisabled:E,...w}),[O,E,w]),P=j||O;t.useEffect(()=>{d&&w.isFullyClosed&&u(e=>({...e,isFullyClosed:!1}))},[d]);const c=t.useCallback(e=>{if(!P){if(u(n=>({...n,isFullyOpened:!1})),B){C?.(),k?.();return}e?k?.():C?.()}},[P,B,C,k]),J=t.useMemo(()=>{const e=r.jsx(Y.default,{text:f,onClick:()=>c(!0)},"cancelActionButton"),n=r.jsx(Z.default,{text:m,onClick:h},"okActionButton");return q.isFunction(a)?a([e,n]):a||(F?r.jsxs(r.Fragment,{children:[e,n]}):n)},[f,m,h,a,F,c]),K=t.useCallback(({type:e,target:n})=>{let l=!0;if(e==="click"){let o=n.parentElement;for(;o;){if(o.classList.contains("vef-modal-content")){l=!0;break}if(o.classList.contains("vef-modal-footer")){l=!1;break}o=o.parentElement}}c(!l)},[c]),Q=t.useCallback(e=>{const n=q.isFunction(v),l=q.isFunction(p);e?(n&&v(),u(o=>({...o,isFullyOpened:!0}))):(l&&p(),u(o=>({...o,isFullyClosed:!0})))},[v,p]);return r.jsx(N.ModalContextProvider,{value:H,children:r.jsx(X.Modal,{centered:!0,afterOpenChange:Q,cancelText:f,closable:S,destroyOnClose:W,footer:J,keyboard:z,loading:j,maskClosable:D,modalRender:$,okText:m,open:d,title:G,width:_,zIndex:10,onCancel:K,onOk:h,children:I})})}const oe=t.memo(ne);exports.VefModalActionButtonWrapper=ee.default,exports.default=oe;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@emotion/react/jsx-runtime"),U=require("@emotion/react"),S=require("@vef-framework/hooks"),q=require("@vef-framework/shared"),X=require("antd"),T=require("motion/react"),t=require("react"),Y=require("./components/cancel-action-button.cjs"),Z=require("./components/ok-action-button.cjs"),N=require("./context.cjs"),ee=require("./components/action-button-wrapper.cjs");const te=U.css({cursor:"move",userSelect:"none"});function ne({title:y,open:d,closable:L=!0,closeOnEscPress:z=!0,closeOnMaskClick:D=!1,destroyOnClose:W=!1,showCancelButton:F=!0,cancelButtonText:f="取消",okButtonText:m="提交",actions:a,width:s,loading:j=!1,cancelOnClose:B=!0,onClose:C,onOk:h,onCancel:k,onAfterOpen:v,onAfterClose:p,children:I}){const i=T.useDragControls(),M=t.useCallback(e=>{e.stopPropagation(),i.start(e)},[i]),{width:x,height:g}=S.useWindowSize(),[R,V]=t.useState(null),b=S.useElementSize(R),A=t.useMemo(()=>{if(!b)return{left:0,top:0,right:0,bottom:0};const{width:e,height:n}=b;return{left:-(x/2-e/2),top:-(g/2-n/2),right:x/2-e/2,bottom:g/2-n/2}},[b,g,x]),_=t.useMemo(()=>s==="small"?378:s==="medium"?736:s==="narrow"?"25vw":s==="half"?"50vw":s==="wide"?"75vw":s==="full"?"100vw":s,[s]),$=t.useCallback(e=>r.jsx(T.motion.div,{ref:n=>V(n),drag:!0,dragConstraints:A,dragControls:i,dragElastic:.3,dragListener:!1,dragMomentum:!1,children:e}),[A,i]),G=t.useMemo(()=>r.jsx("div",{css:te,onPointerDown:M,children:y}),[y,M]),[O,E]=t.useState(!1),[w,u]=t.useState({isFullyOpened:!1,isFullyClosed:!1}),H=t.useMemo(()=>({isDisabled:O,setIsDisabled:E,...w}),[O,E,w]),P=j||O;t.useEffect(()=>{d&&w.isFullyClosed&&u(e=>({...e,isFullyClosed:!1}))},[d]);const c=t.useCallback(e=>{if(!P){if(u(n=>({...n,isFullyOpened:!1})),B){C?.(),k?.();return}e?k?.():C?.()}},[P,B,C,k]),J=t.useMemo(()=>{const e=r.jsx(Y.default,{text:f,onClick:()=>c(!0)},"cancelActionButton"),n=r.jsx(Z.default,{text:m,onClick:h},"okActionButton");return q.isFunction(a)?a([e,n]):a||(F?r.jsxs(r.Fragment,{children:[e,n]}):n)},[f,m,h,a,F,c]),K=t.useCallback(({type:e,target:n})=>{let l=!0;if(e==="click"){let o=n.parentElement;for(;o;){if(o.classList.contains("vef-modal-content")){l=!0;break}if(o.classList.contains("vef-modal-footer")){l=!1;break}o=o.parentElement}}c(!l)},[c]),Q=t.useCallback(e=>{const n=q.isFunction(v),l=q.isFunction(p);e?(n&&v(),u(o=>({...o,isFullyOpened:!0}))):(l&&p(),u(o=>({...o,isFullyClosed:!0})))},[v,p]);return r.jsx(N.ModalContextProvider,{value:H,children:r.jsx(X.Modal,{centered:!0,afterOpenChange:Q,cancelText:f,closable:L,destroyOnClose:W,footer:J,keyboard:z,loading:j,maskClosable:D,modalRender:$,okText:m,open:d,title:G,width:_,zIndex:10,onCancel:K,onOk:h,children:I})})}const oe=t.memo(ne);exports.VefModalActionButtonWrapper=ee.default,exports.default=oe;
|
|
@@ -1,29 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),r=require("@vef-framework/shared"),a=require("lucide-react"),l=require("../vef-button/index.cjs"),o=require("../vef-icon/index.cjs"),c=require("./not-found-icon.cjs");const d=t.css
|
|
3
|
-
height: 100%;
|
|
4
|
-
${r.styles.flexCenter}
|
|
5
|
-
`,u=t.css`
|
|
6
|
-
width: 40%;
|
|
7
|
-
position: relative;
|
|
8
|
-
top: -60px;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
row-gap: ${r.themeVariables.margin};
|
|
14
|
-
|
|
15
|
-
> svg {
|
|
16
|
-
width: 70%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
> span {
|
|
20
|
-
font-size: ${r.themeVariables.fontSizeLg};
|
|
21
|
-
font-weight: 500;
|
|
22
|
-
color: ${r.themeVariables.colorTextTertiary};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
span.vef-not-found-uri {
|
|
26
|
-
padding-left: ${r.themeVariables.paddingSm};
|
|
27
|
-
color: ${r.themeVariables.colorWarningText};
|
|
28
|
-
}
|
|
29
|
-
`;function f({uri:i,title:s="抱歉,您访问的页面不存在~~~",onNavigateHome:n}){return e.jsx("div",{css:d,children:e.jsxs("div",{css:u,children:[e.jsx(c.default,{}),e.jsx("span",{children:s}),i&&e.jsxs("span",{children:["路径:",e.jsx("span",{className:"vef-not-found-uri",children:i})]}),e.jsx(l.default,{color:"primary",size:"large",icon:e.jsx(o.default,{children:e.jsx(a.ArrowLeftIcon,{})}),onClick:n,children:"回到首页"})]})})}exports.default=f;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),r=require("@vef-framework/shared"),a=require("lucide-react"),l=require("../vef-button/index.cjs"),o=require("../vef-icon/index.cjs"),c=require("./not-found-icon.cjs");const d=t.css(r.styles.flexCenter,{height:"100%"}),u=t.css({width:"40%",position:"relative",top:"-60px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",rowGap:r.themeVariables.margin,"> svg":{width:"70%"},"> span":{fontSize:r.themeVariables.fontSizeLg,fontWeight:500,color:r.themeVariables.colorTextTertiary},"span.vef-not-found-uri":{paddingLeft:r.themeVariables.paddingSm,color:r.themeVariables.colorWarningText}});function f({uri:i,title:n="抱歉,您访问的页面不存在~~~",onNavigateHome:s}){return e.jsx("div",{css:d,children:e.jsxs("div",{css:u,children:[e.jsx(c.default,{}),e.jsx("span",{children:n}),i&&e.jsxs("span",{children:["路径:",e.jsx("span",{className:"vef-not-found-uri",children:i})]}),e.jsx(l.default,{color:"primary",size:"large",icon:e.jsx(o.default,{children:e.jsx(a.ArrowLeftIcon,{})}),onClick:s,children:"回到首页"})]})})}exports.default=f;
|