@vef-framework/components 1.0.130 → 1.0.132

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.
Files changed (148) hide show
  1. package/cjs/helpers/icons.cjs +2 -0
  2. package/cjs/helpers/index.cjs +2 -0
  3. package/cjs/helpers/message.cjs +2 -0
  4. package/cjs/index.cjs +1 -1
  5. package/cjs/internal/base.css.cjs +10 -6
  6. package/cjs/vef-access-denied/index.cjs +1 -27
  7. package/cjs/vef-button/index.cjs +1 -1
  8. package/cjs/vef-chart-container/index.cjs +3 -54
  9. package/cjs/vef-chart-legend-content/index.cjs +1 -16
  10. package/cjs/vef-chart-tooltip-content/index.cjs +1 -42
  11. package/cjs/vef-checkbox/index.cjs +1 -3
  12. package/cjs/vef-config-provider/global-style.cjs +2 -1
  13. package/cjs/vef-config-provider/index.cjs +1 -5
  14. package/cjs/vef-crud-page/components/crud-footer.cjs +1 -7
  15. package/cjs/vef-crud-page/hooks/use-operation-buttons.cjs +1 -1
  16. package/cjs/vef-crud-page/store.cjs +1 -1
  17. package/cjs/vef-drawer/index.cjs +1 -8
  18. package/cjs/vef-error/index.cjs +1 -28
  19. package/cjs/vef-filter/components/action-buttons.cjs +1 -19
  20. package/cjs/vef-filter/components/advanced-filter.cjs +1 -9
  21. package/cjs/vef-filter/components/basic-filter.cjs +1 -19
  22. package/cjs/vef-filter/hooks/use-action-handlers.cjs +1 -1
  23. package/cjs/vef-filter/hooks/use-label-config.cjs +1 -1
  24. package/cjs/vef-filter/index.cjs +1 -8
  25. package/cjs/vef-form/components/form-actions.cjs +1 -3
  26. package/cjs/vef-form/components/form-content.cjs +1 -4
  27. package/cjs/vef-form/components/form-group.cjs +1 -11
  28. package/cjs/vef-form/hooks/use-action-handlers.cjs +1 -1
  29. package/cjs/vef-form/hooks/use-label-width.cjs +1 -1
  30. package/cjs/vef-form/index.cjs +1 -3
  31. package/cjs/vef-grid/index.cjs +1 -1
  32. package/cjs/vef-icon/index.cjs +1 -1
  33. package/cjs/vef-icon-select/index.cjs +2 -28
  34. package/cjs/vef-intellisense-code-editor/styles.cjs +1 -20
  35. package/cjs/vef-layout/common-styles.cjs +1 -4
  36. package/cjs/vef-layout/components/header-action-icons.cjs +1 -15
  37. package/cjs/vef-layout/components/header.cjs +1 -12
  38. package/cjs/vef-layout/components/menu-groups.cjs +1 -32
  39. package/cjs/vef-layout/components/sider.cjs +1 -49
  40. package/cjs/vef-layout/components/title.cjs +1 -36
  41. package/cjs/vef-layout/components/user-avatar.cjs +1 -16
  42. package/cjs/vef-layout/index.cjs +1 -5
  43. package/cjs/vef-loading-placeholder/index.cjs +1 -7
  44. package/cjs/vef-login/index.cjs +1 -54
  45. package/cjs/vef-menu/index.cjs +1 -6
  46. package/cjs/vef-modal/index.cjs +1 -4
  47. package/cjs/vef-not-found/index.cjs +1 -28
  48. package/cjs/vef-page/index.cjs +1 -58
  49. package/cjs/vef-pie-chart/index.cjs +1 -8
  50. package/cjs/vef-popconfirm/index.cjs +1 -1
  51. package/cjs/vef-radio/index.cjs +1 -3
  52. package/cjs/vef-responsive-container/index.cjs +1 -5
  53. package/cjs/vef-responsive-item/index.cjs +1 -3
  54. package/cjs/vef-scroll-area/index.cjs +1 -11
  55. package/cjs/vef-select/components/option.cjs +1 -9
  56. package/cjs/vef-select/hooks/use-render-label.cjs +1 -1
  57. package/cjs/vef-sortable-list/components/overlay-item.cjs +1 -5
  58. package/cjs/vef-sortable-list/components/sortable-item.cjs +1 -5
  59. package/cjs/vef-table/components/columns-settings.cjs +1 -52
  60. package/cjs/vef-table/components/operation-buttons.cjs +1 -10
  61. package/cjs/vef-table/components/table-footer.cjs +1 -17
  62. package/cjs/vef-table/index.cjs +1 -54
  63. package/cjs/vef-title/index.cjs +1 -13
  64. package/cjs/vef-virtual-grid/index.cjs +1 -12
  65. package/cjs/vef-virtual-list/index.cjs +1 -18
  66. package/esm/helpers/icons.js +2 -0
  67. package/esm/helpers/index.js +2 -0
  68. package/esm/helpers/message.js +2 -0
  69. package/esm/index.js +1 -1
  70. package/esm/internal/base.css.js +10 -6
  71. package/esm/vef-access-denied/index.js +1 -27
  72. package/esm/vef-approval-flow-editor/components/node-content.js +1 -1
  73. package/esm/vef-approval-flow-editor/components/node-selector.js +2 -2
  74. package/esm/vef-approval-flow-editor/components/node-toolbar.js +1 -1
  75. package/esm/vef-button/index.js +1 -1
  76. package/esm/vef-chart-container/index.js +2 -53
  77. package/esm/vef-chart-legend-content/index.js +1 -16
  78. package/esm/vef-chart-tooltip-content/index.js +1 -42
  79. package/esm/vef-checkbox/index.js +1 -3
  80. package/esm/vef-config-provider/global-style.js +2 -1
  81. package/esm/vef-config-provider/index.js +1 -5
  82. package/esm/vef-crud-page/components/crud-footer.js +1 -7
  83. package/esm/vef-crud-page/hooks/use-action-buttons.js +1 -1
  84. package/esm/vef-crud-page/hooks/use-operation-buttons.js +1 -1
  85. package/esm/vef-crud-page/store.js +1 -1
  86. package/esm/vef-drawer/index.js +1 -8
  87. package/esm/vef-dynamic-icon/index.js +1 -1
  88. package/esm/vef-error/index.js +1 -28
  89. package/esm/vef-filter/components/action-buttons.js +1 -19
  90. package/esm/vef-filter/components/advanced-filter.js +1 -9
  91. package/esm/vef-filter/components/basic-filter.js +1 -19
  92. package/esm/vef-filter/hooks/use-action-handlers.js +1 -1
  93. package/esm/vef-filter/hooks/use-label-config.js +1 -1
  94. package/esm/vef-filter/index.js +1 -8
  95. package/esm/vef-form/components/form-actions.js +1 -3
  96. package/esm/vef-form/components/form-content.js +1 -4
  97. package/esm/vef-form/components/form-group.js +1 -11
  98. package/esm/vef-form/hooks/use-action-handlers.js +1 -1
  99. package/esm/vef-form/hooks/use-label-width.js +1 -1
  100. package/esm/vef-form/index.js +1 -3
  101. package/esm/vef-generic-select/index.js +1 -1
  102. package/esm/vef-grid/index.js +1 -1
  103. package/esm/vef-icon/index.js +1 -1
  104. package/esm/vef-icon-select/index.js +2 -28
  105. package/esm/vef-intellisense-code-editor/styles.js +1 -20
  106. package/esm/vef-layout/common-styles.js +1 -4
  107. package/esm/vef-layout/components/font-size.js +1 -1
  108. package/esm/vef-layout/components/fullscreen.js +1 -1
  109. package/esm/vef-layout/components/header-action-icons.js +1 -15
  110. package/esm/vef-layout/components/header.js +1 -12
  111. package/esm/vef-layout/components/menu-groups.js +1 -32
  112. package/esm/vef-layout/components/sider.js +1 -49
  113. package/esm/vef-layout/components/title.js +1 -36
  114. package/esm/vef-layout/components/user-avatar.js +1 -16
  115. package/esm/vef-layout/index.js +1 -5
  116. package/esm/vef-loading-placeholder/index.js +1 -7
  117. package/esm/vef-login/index.js +1 -54
  118. package/esm/vef-menu/index.js +1 -6
  119. package/esm/vef-modal/index.js +1 -4
  120. package/esm/vef-not-found/index.js +1 -28
  121. package/esm/vef-page/index.js +1 -58
  122. package/esm/vef-pie-chart/index.js +1 -8
  123. package/esm/vef-popconfirm/index.js +1 -1
  124. package/esm/vef-radio/index.js +1 -3
  125. package/esm/vef-responsive-container/index.js +1 -5
  126. package/esm/vef-responsive-item/index.js +1 -3
  127. package/esm/vef-scroll-area/index.js +1 -11
  128. package/esm/vef-select/components/option.js +1 -9
  129. package/esm/vef-sortable-list/components/overlay-item.js +1 -5
  130. package/esm/vef-sortable-list/components/sortable-item.js +1 -5
  131. package/esm/vef-table/components/columns-settings.js +1 -52
  132. package/esm/vef-table/components/operation-buttons.js +1 -10
  133. package/esm/vef-table/components/settings-icon.js +1 -1
  134. package/esm/vef-table/components/table-footer.js +1 -17
  135. package/esm/vef-table/hooks/use-helper-columns.js +1 -1
  136. package/esm/vef-table/index.js +1 -54
  137. package/esm/vef-title/index.js +1 -13
  138. package/esm/vef-virtual-grid/index.js +1 -12
  139. package/esm/vef-virtual-list/index.js +1 -18
  140. package/package.json +18 -18
  141. package/types/helpers/icons.d.ts +7 -0
  142. package/types/helpers/index.d.ts +2 -0
  143. package/types/helpers/message.d.ts +372 -0
  144. package/types/index.d.ts +1 -0
  145. package/types/vef-dynamic-icon/props.d.ts +1 -1
  146. package/types/vef-icon/props.d.ts +2 -3
  147. package/types/vef-scroll-area/components/scrollbar.d.ts +2 -1
  148. package/types/vef-scroll-area/props.d.ts +4 -4
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{showWarningMessage as o}from"@vef-framework/shared";import{useMemo as r}from"react";function i(e,t){return r(()=>{if(!(e==="top"||!t))return(t<60||t>120)&&o("The labelWidth of VefForm component must be between 60 and 120, otherwise it will be 60 or 120."),Math.min(Math.max(t,60),120)},[e,t])}export{i as useLabelWidth};
2
+ import{useMemo as o}from"react";import"../../helpers/index.js";import{showWarningMessage as r}from"../../helpers/message.js";function i(e,t){return o(()=>{if(!(e==="top"||!t))return(t<60||t>120)&&r("The labelWidth of VefForm component must be between 60 and 120, otherwise it will be 60 or 120."),Math.min(Math.max(t,60),120)},[e,t])}export{i as useLabelWidth};
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as L,jsx as a}from"@emotion/react/jsx-runtime";import{css as j}from"@emotion/react";import{useContextDisabled as D,useSingleton as O,useUnmount as U}from"@vef-framework/hooks";import{isNumber as q,isDeepEqual as K,omit as x}from"@vef-framework/shared";import{Form as B}from"antd";import{useMemo as b,forwardRef as C,memo as k}from"react";import"../internal/index.js";import G from"./components/form-actions.js";import J from"./components/form-content.js";import{FormEventBus as Q}from"./event.js";import{useActionHandlers as X}from"./hooks/use-action-handlers.js";import{useFormContextSelector as Y,FormContextProvider as Z}from"./hooks/use-form-context.js";import{useFormInitialization as _}from"./hooks/use-form-initialization.js";import{useFormInstance as $}from"./hooks/use-form-instance.js";import{useFormValuesChange as ee}from"./hooks/use-form-values-change.js";import{useLabelWidth as ie}from"./hooks/use-label-width.js";import{useFormStore as oe,FormStoreProvider as te}from"./store.js";import{convertBasicSizeToUiSize as se}from"../internal/utils.js";const{useForm:re}=B,ae={scrollMode:"if-needed",behavior:"smooth"};function ne({schema:t,labelAlign:o="right",variant:n,showTabs:s=!1,height:e="auto",size:p,disabled:l=!1,onChange:f,submissionButton:F,resetButton:m,submitApi:r,submitTip:u,onBeforeSubmit:S,onSubmit:d,onSubmitSuccess:h,onSubmitFailure:c,onReset:g},y){const[z,v]=Y(i=>[i.labelPosition,i.labelWidth]),[E,N,W]=oe(i=>[i.form,i.initialValues,i.isLoading]),{handleValuesChange:A}=ee(f),{handleReset:V,handleSubmit:P,handleSubmitFailed:R}=X({submitApi:r,submitTip:u,onBeforeSubmit:S,onSubmit:d,onSubmitSuccess:h,onSubmitFailure:c,onReset:g});$(y,V);const I=b(()=>{if(v)return{flex:`0 0 ${v}px`}},[v]),M=b(()=>{let i=e;return e==="full"?i="100%":q(e)&&(i=`${e}px`),j`
3
- height: ${i};
4
- `},[e]),H=D()||l||W;return L(B,{labelWrap:!0,colon:!1,css:M,disabled:H,form:E,initialValues:N,labelAlign:o,labelCol:I,layout:z==="top"?"vertical":"horizontal",scrollToFirstError:ae,size:se(p),variant:n,onFinish:P,onFinishFailed:R,onValuesChange:A,children:[a(J,{height:e,schema:t,showTabs:s===!0?"switch":s}),a(G,{handleReset:V,resetButton:m,submissionButton:F})]})}const T=C(ne);T.displayName="VefFormBase";function le({initialValues:t,scene:o,layoutMode:n="responsive",autoExpand:s=!1,labelPosition:e="top",labelWidth:p,...l},f){const{schema:F}=l,[m]=re(),r=O(()=>new Q);U(()=>{r.clear()});const u=ie(e,p),S=b(()=>({labelPosition:e,labelWidth:u,autoExpand:s,layoutMode:n}),[n,s,e,u]),{mergedInitialValues:d,valueChangeHandlers:h,virtualFieldNames:c}=_(F,t),g=b(()=>({eventBus:r,form:m,initialValues:d,scene:o,valueChangeHandlers:h,virtualFieldNames:c}),[r,m,d,o,h,c]);return a(te,{initialState:g,children:a(Z,{value:S,children:a(T,{ref:f,...l})})})}const w=k(C(le),(t,o)=>K(x(t,["initialValues","schema"]),x(o,["initialValues","schema"])));w.displayName="VefForm";export{w as default};
2
+ import{jsxs as L,jsx as a}from"@emotion/react/jsx-runtime";import{css as j}from"@emotion/react";import{useContextDisabled as D,useSingleton as O,useUnmount as U}from"@vef-framework/hooks";import{isNumber as q,isDeepEqual as K,omit as x}from"@vef-framework/shared";import{Form as B}from"antd";import{useMemo as b,forwardRef as C,memo as k}from"react";import"../internal/index.js";import G from"./components/form-actions.js";import J from"./components/form-content.js";import{FormEventBus as Q}from"./event.js";import{useActionHandlers as X}from"./hooks/use-action-handlers.js";import{useFormContextSelector as Y,FormContextProvider as Z}from"./hooks/use-form-context.js";import{useFormInitialization as _}from"./hooks/use-form-initialization.js";import{useFormInstance as $}from"./hooks/use-form-instance.js";import{useFormValuesChange as ee}from"./hooks/use-form-values-change.js";import{useLabelWidth as ie}from"./hooks/use-label-width.js";import{useFormStore as oe,FormStoreProvider as te}from"./store.js";import{convertBasicSizeToUiSize as se}from"../internal/utils.js";const{useForm:re}=B,ae={scrollMode:"if-needed",behavior:"smooth"};function ne({schema:t,labelAlign:o="right",variant:n,showTabs:s=!1,height:e="auto",size:p,disabled:l=!1,onChange:f,submissionButton:F,resetButton:m,submitApi:r,submitTip:u,onBeforeSubmit:S,onSubmit:d,onSubmitSuccess:h,onSubmitFailure:c,onReset:g},y){const[z,v]=Y(i=>[i.labelPosition,i.labelWidth]),[E,N,W]=oe(i=>[i.form,i.initialValues,i.isLoading]),{handleValuesChange:A}=ee(f),{handleReset:V,handleSubmit:P,handleSubmitFailed:R}=X({submitApi:r,submitTip:u,onBeforeSubmit:S,onSubmit:d,onSubmitSuccess:h,onSubmitFailure:c,onReset:g});$(y,V);const I=b(()=>{if(v)return{flex:`0 0 ${v}px`}},[v]),M=b(()=>{let i=e;return e==="full"?i="100%":q(e)&&(i=`${e}px`),j({height:i})},[e]),H=D()||l||W;return L(B,{labelWrap:!0,colon:!1,css:M,disabled:H,form:E,initialValues:N,labelAlign:o,labelCol:I,layout:z==="top"?"vertical":"horizontal",scrollToFirstError:ae,size:se(p),variant:n,onFinish:P,onFinishFailed:R,onValuesChange:A,children:[a(J,{height:e,schema:t,showTabs:s===!0?"switch":s}),a(G,{handleReset:V,resetButton:m,submissionButton:F})]})}const T=C(ne);T.displayName="VefFormBase";function le({initialValues:t,scene:o,layoutMode:n="responsive",autoExpand:s=!1,labelPosition:e="top",labelWidth:p,...l},f){const{schema:F}=l,[m]=re(),r=O(()=>new Q);U(()=>{r.clear()});const u=ie(e,p),S=b(()=>({labelPosition:e,labelWidth:u,autoExpand:s,layoutMode:n}),[n,s,e,u]),{mergedInitialValues:d,valueChangeHandlers:h,virtualFieldNames:c}=_(F,t),g=b(()=>({eventBus:r,form:m,initialValues:d,scene:o,valueChangeHandlers:h,virtualFieldNames:c}),[r,m,d,o,h,c]);return a(te,{initialState:g,children:a(Z,{value:S,children:a(T,{ref:f,...l})})})}const w=k(C(le),(t,o)=>K(x(t,["initialValues","schema"]),x(o,["initialValues","schema"])));w.displayName="VefForm";export{w as default};
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{jsx as e}from"@emotion/react/jsx-runtime";import{SearchOutlined as I}from"@ant-design/icons";import{isFunction as k,styles as B}from"@vef-framework/shared";import{Select as D}from"antd";import{LeafIcon as L}from"lucide-react";import{useState as r,useDeferredValue as M,useCallback as l,useMemo as O,cloneElement as R}from"react";import"../internal/index.js";import T from"../vef-icon/index.js";import{convertBasicSizeToUiSize as W}from"../internal/utils.js";const j={"--vef-select-option-padding":0};function E({value:c,size:s,renderLabel:o,placeholder:d,disabled:u,clearable:m,loading:p,variant:f,children:h,onClear:S}){const[n,t]=r(!1),[C,a]=r(!1),[i,b]=r(),v=M(i),w=l(()=>{a(!1)},[]),g=l(()=>{a(!0)},[]),y=l(()=>{t(!1)},[]),z=O(()=>{if(k(o))return({value:x})=>o?.(x)},[o]),F=C&&n?e(I,{}):e(T,{children:e(L,{})}),V=R(h,{keyword:v,onConfirm:y});return e(D,{showSearch:!0,allowClear:m,css:B.fullWidth,disabled:u,dropdownStyle:j,labelRender:z,loading:p,notFoundContent:V,open:n,placeholder:d,popupMatchSelectWidth:!1,searchValue:i,size:W(s),suffixIcon:F,value:c,variant:f,onBlur:w,onClear:S,onDropdownVisibleChange:t,onFocus:g,onSearch:b})}export{E as default};
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{SearchOutlined as I}from"@ant-design/icons";import{isFunction as k,styles as B}from"@vef-framework/shared";import{Select as D}from"antd";import{LeafIcon as L}from"lucide-react";import{useState as r,useDeferredValue as M,useCallback as l,useMemo as O,cloneElement as R}from"react";import"../internal/index.js";import T from"../vef-icon/index.js";import{convertBasicSizeToUiSize as W}from"../internal/utils.js";const j={"--vef-select-option-padding":0};function E({value:c,size:s,renderLabel:o,placeholder:d,disabled:u,clearable:p,loading:m,variant:f,children:h,onClear:S}){const[n,t]=r(!1),[C,a]=r(!1),[i,b]=r(),v=M(i),w=l(()=>{a(!1)},[]),g=l(()=>{a(!0)},[]),y=l(()=>{t(!1)},[]),z=O(()=>{if(k(o))return({value:x})=>o?.(x)},[o]),F=C&&n?e(I,{}):e(T,{children:e(L,{})}),V=R(h,{keyword:v,onConfirm:y});return e(D,{showSearch:!0,allowClear:p,css:B.fullWidth,disabled:u,dropdownStyle:j,labelRender:z,loading:m,notFoundContent:V,open:n,placeholder:d,popupMatchSelectWidth:!1,searchValue:i,size:W(s),suffixIcon:F,value:c,variant:f,onBlur:w,onClear:S,onDropdownVisibleChange:t,onFocus:g,onSearch:b})}export{E as default};
@@ -2,7 +2,7 @@
2
2
  import{jsx as h}from"@emotion/react/jsx-runtime";import{css as $}from"@emotion/react";import{useGapSizeNormalizer as g,useElementSize as x}from"@vef-framework/hooks";import{breakpoints as v,isArray as W}from"@vef-framework/shared";import y from"clsx";import{useMemo as s,useRef as w,useEffect as z}from"react";import{useContainerQuery as A}from"react-container-query";const r=24,b=$`
3
3
  display: grid;
4
4
  grid: auto-flow / repeat(${r}, minmax(0, 1fr));
5
-
5
+
6
6
  > * {
7
7
  grid-column: span ${r};
8
8
  }
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{jsx as a}from"@emotion/react/jsx-runtime";import d from"@ant-design/icons";import{useColorTokens as S}from"@vef-framework/hooks";import{themeVariables as n,omit as z}from"@vef-framework/shared";import{forwardRef as g,useMemo as h,Suspense as y,cloneElement as i,memo as x}from"react";const V=g(({size:e,color:m,children:r,...f},c)=>{const s=S(),p=h(()=>{const o={},t=e==="small"?n.fontSizeSm:e==="medium"?n.fontSize:e==="large"?n.fontSizeLg:e==="huge"?n.fontSizeXl:void 0;return t&&(o.fontSize=t),m&&(o.color=s.get(m)),o},[e,m,s]);return a(d,{ref:c,style:p,component:o=>{const t=z(o,["fill"]);if(r.type===y){const{children:u}=r.props;return i(r,{children:i(u,t)})}return i(r,t)},...f})}),l=x(V);l.displayName="VefIcon";export{l as default};
2
+ import{jsx as g}from"@emotion/react/jsx-runtime";import{css as u}from"@emotion/react";import{useColorTokens as S}from"@vef-framework/hooks";import{themeVariables as o}from"@vef-framework/shared";import y from"clsx";import{forwardRef as z,useMemo as x,Suspense as b,cloneElement as s,memo as v}from"react";const w=u({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased"}),N=z(({size:e,color:n,children:i,className:f,style:l,...p},h)=>{const m=S(),d=x(()=>{const t={...l},a=e==="small"?o.fontSizeSm:e==="medium"?o.fontSize:e==="large"?o.fontSizeLg:e==="huge"?o.fontSizeXl:void 0;return a&&(t.fontSize=a),n&&(t.color=m.get(n)),t},[e,n,m,l]);let r;if(i.type===b){const{children:t}=i.props;r=s(i,{children:s(t,{width:"1em",height:"1em"})})}else r=s(i,{width:"1em",height:"1em"});return g("span",{ref:h,className:y(f,"vef-icon"),css:w,style:d,...p,children:r})}),c=v(N);c.displayName="VefIcon";export{c as default};
@@ -1,31 +1,5 @@
1
1
  "use strict";
2
- import{jsx as r,jsxs as N}from"@emotion/react/jsx-runtime";import{css as g}from"@emotion/react";import{useThemeTokens as X}from"@vef-framework/hooks";import{themeVariables as o,trim as z,cluster as C,isUndefined as k}from"@vef-framework/shared";import{useMemo as v,useCallback as b,memo as S,useState as j}from"react";import w from"../vef-dynamic-icon/index.js";import{dynamicIconNames as F}from"../vef-dynamic-icon/props.js";import H from"../vef-empty-placeholder/index.js";import T from"../vef-generic-select/index.js";import V from"../vef-space/index.js";import B from"../vef-text/index.js";import E from"../vef-virtual-grid/index.js";const $=g`
3
- color: ${o.colorTextSlate};
4
-
5
- .vef-icon-select-wrapper {
6
- padding: calc(${o.paddingXxs} + 2px) ${o.paddingXs};
7
- }
8
- `,L=g`
9
- height: 100%;
10
- display: flex;
11
- justify-content: center;
12
- align-items: center;
13
- background-color: ${o.colorFillContent};
14
- border-radius: ${o.borderRadius};
15
- transition: background-color ${o.motionDurationMid} ${o.motionEaseInOut};
16
- &:hover {
17
- cursor: pointer;
18
- background-color: ${o.colorFillContentHover};
19
- }
20
-
21
- &.vef-icon-select-item-selected {
22
- background-color: ${o.colorPrimaryBg};
23
- }
24
-
25
- .vef-icon {
26
- font-size: 28px;
27
- }
28
- `,u=60,x=Array.from(F);function M({value:t,onChange:i,keyword:s,onConfirm:a}){const{paddingXS:d,paddingXXS:m}=X(),f=v(()=>{const e=z(s);return e?C(x.filter(c=>c.includes(e)),6):C(x,6)},[s]),[n,l]=v(()=>[6*u+12*5+d*2,5*u+12*4+(m+2)*2],[m,d]),p=b(({item:e})=>{const c=e===t;return r("div",{className:c?"vef-icon-select-item-selected":void 0,css:L,title:e,onClick:()=>{if(c){a?.();return}i(e),a?.()},children:r(w,{name:e})})},[i,a,t]),h=v(()=>({width:n,height:l}),[n,l]);return f.length===0?r("div",{css:$,children:r("div",{className:"vef-icon-select-wrapper",style:h,children:r(H,{description:"暂无图标",presetIcon:"simple"})})}):r("div",{css:$,children:r(E,{className:"vef-icon-select-wrapper",columnWidth:u,gap:"small",height:l,items:f,renderItem:p,rowHeight:u,width:n})})}const I=S(M);I.displayName="VefIconsContent";const P=g`
2
+ import{jsx as r,jsxs as S}from"@emotion/react/jsx-runtime";import{css as g}from"@emotion/react";import{useThemeTokens as X}from"@vef-framework/hooks";import{themeVariables as o,trim as $,cluster as y,isUndefined as k}from"@vef-framework/shared";import{useMemo as v,useCallback as C,memo as z,useState as j}from"react";import w from"../vef-dynamic-icon/index.js";import{dynamicIconNames as H}from"../vef-dynamic-icon/props.js";import R from"../vef-empty-placeholder/index.js";import T from"../vef-generic-select/index.js";import V from"../vef-space/index.js";import B from"../vef-text/index.js";import E from"../vef-virtual-grid/index.js";const x=g({color:o.colorTextSlate,".vef-icon-select-wrapper":{padding:`calc(${o.paddingXxs} + 2px) ${o.paddingXs}`}}),F=g({height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:o.colorFillContent,borderRadius:o.borderRadius,transition:`background-color ${o.motionDurationMid} ${o.motionEaseInOut}`,"&:hover":{cursor:"pointer",backgroundColor:o.colorFillContentHover},"&.vef-icon-select-item-selected":{backgroundColor:o.colorPrimaryBg},".vef-icon":{fontSize:"28px"}}),u=60,I=Array.from(H);function L({value:t,onChange:i,keyword:c,onConfirm:s}){const{paddingXS:d,paddingXXS:m}=X(),f=v(()=>{const e=$(c);return e?y(I.filter(a=>a.includes(e)),6):y(I,6)},[c]),[n,l]=v(()=>[6*u+12*5+d*2,5*u+12*4+(m+2)*2],[m,d]),p=C(({item:e})=>{const a=e===t;return r("div",{className:a?"vef-icon-select-item-selected":void 0,css:F,title:e,onClick:()=>{if(a){s?.();return}i(e),s?.()},children:r(w,{name:e})})},[i,s,t]),h=v(()=>({width:n,height:l}),[n,l]);return f.length===0?r("div",{css:x,children:r("div",{className:"vef-icon-select-wrapper",style:h,children:r(R,{description:"暂无图标",presetIcon:"simple"})})}):r("div",{css:x,children:r(E,{className:"vef-icon-select-wrapper",columnWidth:u,gap:"small",height:l,items:f,renderItem:p,rowHeight:u,width:n})})}const N=z(L);N.displayName="VefIconsContent";const M=g`
29
3
  width: 100%;
30
4
 
31
5
  .vef-space-item:last-of-type {
@@ -38,4 +12,4 @@ import{jsx as r,jsxs as N}from"@emotion/react/jsx-runtime";import{css as g}from"
38
12
  font-family: inherit;
39
13
  color: inherit;
40
14
  }
41
- `;function R(t){return N(V,{css:P,children:[r(w,{name:t}),r(B,{ellipsis:!0,children:t})]})}function A({defaultValue:t,value:i,size:s,placeholder:a,disabled:d,clearable:m,variant:f,onChange:n,onClear:l}){const[p,h]=j(t??null),e=b(y=>{if(k(i)){h(y);return}n?.(y)},[n,i]),c=b(()=>{e(null),l?.()},[e,l]);return r(T,{clearable:m,disabled:d,placeholder:a,renderLabel:R,size:s,value:i??p,variant:f,onClear:c,children:r(I,{value:k(i)?p:i,onChange:e})})}export{A as default};
15
+ `;function P(t){return S(V,{css:M,children:[r(w,{name:t}),r(B,{ellipsis:!0,children:t})]})}function A({defaultValue:t,value:i,size:c,placeholder:s,disabled:d,clearable:m,variant:f,onChange:n,onClear:l}){const[p,h]=j(t??null),e=C(b=>{if(k(i)){h(b);return}n?.(b)},[n,i]),a=C(()=>{e(null),l?.()},[e,l]);return r(T,{clearable:m,disabled:d,placeholder:s,renderLabel:P,size:c,value:i??p,variant:f,onClear:a,children:r(N,{value:k(i)?p:i,onChange:e})})}export{A as default};
@@ -1,21 +1,2 @@
1
1
  "use strict";
2
- import{css as r}from"@emotion/react";import{themeVariables as o}from"@vef-framework/shared";const e=r`
3
- border-width: ${o.lineWidth};
4
- border-style: ${o.lineType};
5
- border-color: ${o.colorBorder};
6
- border-radius: ${o.borderRadius};
7
- overflow: hidden;
8
-
9
- &:not(:has(> .monaco-editor.focused)) {
10
- border-color: ${o.colorBorder};
11
-
12
- &:hover {
13
- border-color: ${o.colorPrimaryHover};
14
- }
15
- }
16
-
17
- &:has(.monaco-editor.focused) {
18
- border-color: ${o.colorPrimary};
19
- box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
20
- }
21
- `;export{e as editorStyle};
2
+ import{css as r}from"@emotion/react";import{themeVariables as o}from"@vef-framework/shared";const e=r({borderWidth:o.lineWidth,borderStyle:o.lineType,borderColor:o.colorBorder,borderRadius:o.borderRadius,overflow:"hidden","&:not(:has(> .monaco-editor.focused))":{borderColor:o.colorBorder,"&:hover":{borderColor:o.colorPrimaryHover}},"&:has(.monaco-editor.focused)":{borderColor:o.colorPrimary,boxShadow:"0 0 0 2px rgba(5, 145, 255, 0.1)"}});export{e as editorStyle};
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
- import{css as e}from"@emotion/react";import{themeVariables as t,styles as s}from"@vef-framework/shared";const r=e`
3
- padding: ${t.paddingXs};
4
- ${s.flexCenter}
5
- `;export{r as iconStyle};
2
+ import{css as e}from"@emotion/react";import{styles as t,themeVariables as s}from"@vef-framework/shared";const r=e(t.flexCenter,{padding:s.paddingXs});export{r as iconStyle};
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{jsx as l,jsxs as n}from"@emotion/react/jsx-runtime";import{useConfigStore as i}from"../../vef-config-provider/store.js";import s from"../../vef-dropdown/index.js";import o from"../../vef-icon/index.js";import{iconStyle as h}from"../common-styles.js";function c(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:n("g",{fill:"none",fillRule:"evenodd",children:[l("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),l("path",{d:"M21 12a1 1 0 0 1 1 1v6a1 1 0 0 1-1.911.412a4 4 0 1 1 0-6.824A1 1 0 0 1 21 12M8 4c.732 0 1.381.473 1.605 1.17l4.347 13.524a1 1 0 0 1-1.904.612L10.664 15H5.336l-1.384 4.306a1 1 0 0 1-1.904-.612L6.395 5.17A1.69 1.69 0 0 1 8 4m10 10a2 2 0 1 0 0 4a2 2 0 0 0 0-4M8 6.712L5.979 13h4.042z",fill:"currentColor"})]})})}function m(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:l("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m10-1h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}function d(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:l("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m7-4v6m3-3h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}const a=[{key:"medium",type:"item",label:"默认字号",icon:l(o,{children:l(m,{})})},{key:"large",type:"item",label:"大字号",icon:l(o,{children:l(d,{})})}];function u(){const[e,r]=i(t=>[t.fontSize,t.setFontSize]);return l(s,{selectable:!0,items:a,selectedKeys:[e],onChange:([t])=>r(t),children:l("div",{css:h,children:l(o,{size:"large",children:l(c,{})})})})}export{u as default};
2
+ import{jsx as l,jsxs as n}from"@emotion/react/jsx-runtime";import{useConfigStore as i}from"../../vef-config-provider/store.js";import s from"../../vef-dropdown/index.js";import o from"../../vef-icon/index.js";import{iconStyle as h}from"../common-styles.js";function c(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:n("g",{fill:"none",fillRule:"evenodd",children:[l("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),l("path",{d:"M21 12a1 1 0 0 1 1 1v6a1 1 0 0 1-1.911.412a4 4 0 1 1 0-6.824A1 1 0 0 1 21 12M8 4c.732 0 1.381.473 1.605 1.17l4.347 13.524a1 1 0 0 1-1.904.612L10.664 15H5.336l-1.384 4.306a1 1 0 0 1-1.904-.612L6.395 5.17A1.69 1.69 0 0 1 8 4m10 10a2 2 0 1 0 0 4a2 2 0 0 0 0-4M8 6.712L5.979 13h4.042z",fill:"currentColor"})]})})}function d(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:l("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m10-1h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}function m(e){return l("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e,children:l("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m7-4v6m3-3h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}const a=[{key:"medium",type:"item",label:"默认字号",icon:l(o,{children:l(d,{})})},{key:"large",type:"item",label:"大字号",icon:l(o,{children:l(m,{})})}];function p(){const[e,r]=i(t=>[t.fontSize,t.setFontSize]);return l(s,{selectable:!0,items:a,selectedKeys:[e],onChange:([t])=>r(t),children:l("div",{css:h,children:l(o,{size:"large",children:l(c,{})})})})}export{p as default};
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{jsx as e}from"@emotion/react/jsx-runtime";import{MinimizeIcon as i,MaximizeIcon as m}from"lucide-react";import{useState as n,useCallback as c}from"react";import l from"../../vef-icon/index.js";import s from"../../vef-tooltip/index.js";import{iconStyle as u}from"../common-styles.js";function d(){const[o,r]=n(!1),t=c(()=>{o?(document.exitFullscreen(),r(!1)):(document.body.requestFullscreen(),r(!0))},[o]);return e(s,{content:o?"退出全屏":"全屏",delay:.5,children:e("div",{css:u,onClick:t,children:e(l,{size:"large",children:o?e(i,{}):e(m,{})})})})}export{d as default};
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{MinimizeIcon as i,MaximizeIcon as n}from"lucide-react";import{useState as c,useCallback as m}from"react";import l from"../../vef-icon/index.js";import s from"../../vef-tooltip/index.js";import{iconStyle as u}from"../common-styles.js";function d(){const[o,r]=c(!1),t=m(()=>{o?(document.exitFullscreen(),r(!1)):(document.body.requestFullscreen(),r(!0))},[o]);return e(s,{content:o?"退出全屏":"全屏",delay:.5,children:e("div",{css:u,onClick:t,children:e(l,{size:"large",children:o?e(i,{}):e(n,{})})})})}export{d as default};
@@ -1,16 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as i,jsx as r}from"@emotion/react/jsx-runtime";import{css as t}from"@emotion/react";import{themeVariables as o}from"@vef-framework/shared";import m from"../../vef-divider/index.js";import e from"./font-size.js";import n from"./fullscreen.js";import s from"./message.js";import a from"./search.js";import c from"./user-avatar.js";const d=t`
3
- display: flex;
4
- align-items: center;
5
- column-gap: ${o.marginXxs};
6
-
7
- > div:not(.vef-divider) {
8
- border-radius: ${o.borderRadius};
9
- transition: background-color ${o.motionDurationMid} ${o.motionEaseInOut};
10
-
11
- &:hover {
12
- cursor: pointer;
13
- background-color: ${o.colorFillTertiary};
14
- }
15
- }
16
- `;function f(){return i("div",{css:d,children:[r(m,{orientation:"vertical"}),r(a,{}),r(e,{}),r(n,{}),r(s,{}),r(c,{})]})}export{f as default};
2
+ import{jsxs as i,jsx as r}from"@emotion/react/jsx-runtime";import{css as t}from"@emotion/react";import{themeVariables as o}from"@vef-framework/shared";import m from"../../vef-divider/index.js";import e from"./font-size.js";import n from"./fullscreen.js";import s from"./message.js";import a from"./search.js";import c from"./user-avatar.js";const d=t({display:"flex",alignItems:"center",columnGap:o.marginXxs,"> div:not(.vef-divider)":{borderRadius:o.borderRadius,transition:`background-color ${o.motionDurationMid} ${o.motionEaseInOut}`,"&:hover":{cursor:"pointer",backgroundColor:o.colorFillTertiary}}});function f(){return i("div",{css:d,children:[r(m,{orientation:"vertical"}),r(a,{}),r(e,{}),r(n,{}),r(s,{}),r(c,{})]})}export{f as default};
@@ -1,13 +1,2 @@
1
1
  "use strict";
2
- import{jsx as r,jsxs as o}from"@emotion/react/jsx-runtime";import{css as c}from"@emotion/react";import{themeVariables as e,styles as d}from"@vef-framework/shared";import{Layout as s}from"antd";import{memo as h}from"react";import n from"../../vef-button/index.js";import m from"../../vef-icon/index.js";import p from"../../vef-popover/index.js";import{useLayoutStore as f}from"../store.js";import g from"./header-action-icons.js";import u from"./header-content.js";import x from"./icon-menu-fold-left.js";import y from"./icon-menu-unfold-left.js";import $ from"./menu-groups.js";const{Header:v}=s,w=c`
3
- --vef-layout-header-height: 60px;
4
- --vef-layout-header-padding: 0 ${e.paddingSm};
5
-
6
- line-height: unset;
7
- background-color: ${e.colorBgContainer};
8
- border-bottom: ${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary};
9
- display: grid;
10
- grid-template-columns: max-content minmax(min-content, 1fr) max-content;
11
- align-items: center;
12
- column-gap: ${e.margin};
13
- `;function k(t){return r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t,children:o("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,children:[r("rect",{height:6.5,rx:2,width:6.5,x:3.75,y:3.75}),r("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"}),r("rect",{height:6.5,rx:1.5,width:6.5,x:3.75,y:13.75}),r("rect",{height:6.5,rx:2,width:6.5,x:13.75,y:13.75})]})})}function C(){const[t,l]=f(i=>[i.siderCollapsed,i.setSiderCollapsed]);return o(v,{css:w,children:[o("div",{css:d.flexCenter,children:[r(n,{color:"default",variant:"text",icon:r(m,{size:"huge",children:t?r(y,{}):r(x,{})}),onClick:()=>l(!t)}),r(p,{content:r($,{}),placement:"bottomRight",trigger:"click",children:r(n,{color:"default",variant:"text",icon:r(m,{size:"huge",children:r(k,{})})})})]}),r(u,{}),r(g,{})]})}const a=h(C);a.displayName="VefHeader";export{a as default};
2
+ import{jsx as r,jsxs as o}from"@emotion/react/jsx-runtime";import{css as d}from"@emotion/react";import{themeVariables as e,styles as c}from"@vef-framework/shared";import{Layout as s}from"antd";import{memo as p}from"react";import n from"../../vef-button/index.js";import m from"../../vef-icon/index.js";import h from"../../vef-popover/index.js";import{useLayoutStore as f}from"../store.js";import g from"./header-action-icons.js";import u from"./header-content.js";import x from"./icon-menu-fold-left.js";import y from"./icon-menu-unfold-left.js";import v from"./menu-groups.js";const{Header:w}=s,C=d({"--vef-layout-header-height":"60px","--vef-layout-header-padding":`0 ${e.paddingSm}`,lineHeight:"unset",backgroundColor:e.colorBgContainer,borderBottom:`${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary}`,display:"grid",gridTemplateColumns:"max-content minmax(min-content, 1fr) max-content",alignItems:"center",columnGap:e.margin});function $(t){return r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t,children:o("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,children:[r("rect",{height:6.5,rx:2,width:6.5,x:3.75,y:3.75}),r("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"}),r("rect",{height:6.5,rx:1.5,width:6.5,x:3.75,y:13.75}),r("rect",{height:6.5,rx:2,width:6.5,x:13.75,y:13.75})]})})}function k(){const[t,l]=f(i=>[i.siderCollapsed,i.setSiderCollapsed]);return o(w,{css:C,children:[o("div",{css:c.flexCenter,children:[r(n,{color:"default",variant:"text",icon:r(m,{size:"huge",children:t?r(y,{}):r(x,{})}),onClick:()=>l(!t)}),r(h,{content:r(v,{}),placement:"bottomRight",trigger:"click",children:r(n,{color:"default",variant:"text",icon:r(m,{size:"huge",children:r($,{})})})})]}),r(u,{}),r(g,{})]})}const a=p(k);a.displayName="VefHeader";export{a as default};
@@ -1,33 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as i,jsx as c}from"@emotion/react/jsx-runtime";import{css as s}from"@emotion/react";import{useThemeTokens as e}from"@vef-framework/hooks";import{themeVariables as n,styles as h}from"@vef-framework/shared";import r from"../../vef-text/index.js";const p=s`
3
- display: grid;
4
- grid-template-columns: 320px 320px;
5
- `,t=s`
6
- display: flex;
7
- align-items: center;
8
- gap: ${n.padding};
9
- padding: ${n.padding};
10
- border-radius: ${n.borderRadiusLg};
11
- cursor: pointer;
12
- user-select: none;
13
- transition: background-color ${n.motionDurationMid} ${n.motionEaseInOut};
14
-
15
- &:hover {
16
- background-color: ${n.colorFillContent};
17
- }
18
- `,o=s`
19
- flex: none;
20
- ${h.flexCenter}
21
- `,d=s`
22
- flex: auto;
23
- display: flex;
24
- flex-direction: column;
25
- gap: ${n.paddingXxs};
26
- color: ${n.colorText};
27
- min-width: 0;
28
-
29
- > span:last-of-type {
30
- color: ${n.colorTextSecondary};
31
- font-size: ${n.fontSizeSm};
32
- }
33
- `;function v(){const{controlHeightLG:l}=e();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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:l}=e();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 g(){const{controlHeightLG:l}=e();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 m(){const{controlHeightLG:l}=e();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 f(){return i("div",{css:p,children:[i("div",{css:t,children:[c("span",{css:o,children:c(v,{})}),i("div",{css:d,children:[c(r,{children:"系统管理"}),c(r,{color:"secondary",children:"系统全局相关配置"})]})]}),i("div",{css:t,children:[c("span",{css:o,children:c(a,{})}),i("div",{css:d,children:[c(r,{children:"主数据管理"}),c(r,{ellipsis:!0,color:"secondary",children:"医院、科室、医生、患者等主数据管理"})]})]}),i("div",{css:t,children:[c("span",{css:o,children:c(g,{})}),i("div",{css:d,children:[c(r,{children:"流程管理"}),c(r,{children:"系统整体涉及的所有流程管理"})]})]}),i("div",{css:t,children:[c("span",{css:o,children:c(m,{})}),i("div",{css:d,children:[c(r,{children:"业务管理"}),c(r,{color:"secondary",children:"医疗业务相关管理"})]})]})]})}export{f as default};
2
+ import{jsxs as i,jsx as c}from"@emotion/react/jsx-runtime";import{css as e}from"@emotion/react";import{useThemeTokens as s}from"@vef-framework/hooks";import{themeVariables as n,styles as h}from"@vef-framework/shared";import r from"../../vef-text/index.js";const p=e({display:"grid",gridTemplateColumns:"320px 320px"}),o=e({display:"flex",alignItems:"center",gap:n.padding,padding:n.padding,borderRadius:n.borderRadiusLg,cursor:"pointer",userSelect:"none",transition:`background-color ${n.motionDurationMid} ${n.motionEaseInOut}`,"&:hover":{backgroundColor:n.colorFillContent}}),t=e(h.flexCenter,{flex:"none"}),d=e({flex:"auto",display:"flex",flexDirection:"column",gap:n.paddingXxs,color:n.colorText,minWidth:0,"> span:last-of-type":{color:n.colorTextSecondary,fontSize:n.fontSizeSm}});function v(){const{controlHeightLG:l}=s();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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:l}=s();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 g(){const{controlHeightLG:l}=s();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 m(){const{controlHeightLG:l}=s();return i("svg",{height:l,viewBox:"0 0 1024 1024",width:l,xmlns:"http://www.w3.org/2000/svg",children:[c("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"}),c("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 f(){return i("div",{css:p,children:[i("div",{css:o,children:[c("span",{css:t,children:c(v,{})}),i("div",{css:d,children:[c(r,{children:"系统管理"}),c(r,{color:"secondary",children:"系统全局相关配置"})]})]}),i("div",{css:o,children:[c("span",{css:t,children:c(a,{})}),i("div",{css:d,children:[c(r,{children:"主数据管理"}),c(r,{ellipsis:!0,color:"secondary",children:"医院、科室、医生、患者等主数据管理"})]})]}),i("div",{css:o,children:[c("span",{css:t,children:c(g,{})}),i("div",{css:d,children:[c(r,{children:"流程管理"}),c(r,{children:"系统整体涉及的所有流程管理"})]})]}),i("div",{css:o,children:[c("span",{css:t,children:c(m,{})}),i("div",{css:d,children:[c(r,{children:"业务管理"}),c(r,{color:"secondary",children:"医疗业务相关管理"})]})]})]})}export{f as default};
@@ -1,50 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as a,jsx as t}from"@emotion/react/jsx-runtime";import{css as u}from"@emotion/react";import{themeVariables as i}from"@vef-framework/shared";import{Layout as p}from"antd";import{memo as f}from"react";import c from"../../vef-menu/index.js";import h from"../../vef-scroll-area/index.js";import{useLayoutContextSelector as v}from"../hooks/use-layout-context.js";import{useLayoutStore as y}from"../store.js";import b from"./title.js";const{Sider:g}=p,x=u`
3
- border-right: ${i.lineWidth} ${i.lineType} ${i.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.fontSize} * 0.8);
41
- border-inline-start: 4px ${i.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 S(){const[l,s,o,d]=v(e=>[e.menuItems,e.defaultOpenedMenuKeys,e.activeMenuKey,e.onActiveMenuKeyChange]),[n,m]=y(e=>[e.siderCollapsed,e.setSiderCollapsed]);return a(g,{collapsible:!0,breakpoint:"lg",collapsed:n,collapsedWidth:80,css:x,theme:"light",trigger:null,width:220,onCollapse:m,children:[t(b,{}),t("div",{className:"vef-layout-sider-menu",children:t(h,{scrollbarSize:"small",children:t(c,{inlineExpansion:!0,defaultOpenedKeys:s,inlineCollapsed:n,items:l??[],selectedKeys:o?[o]:[],onSelect:d})})})]})}const r=f(S);r.displayName="VefSider";export{r as default};
2
+ import{jsxs as a,jsx as t}from"@emotion/react/jsx-runtime";import{css as u}from"@emotion/react";import{themeVariables as i}from"@vef-framework/shared";import{Layout as p}from"antd";import{memo as f}from"react";import c from"../../vef-menu/index.js";import v from"../../vef-scroll-area/index.js";import{useLayoutContextSelector as h}from"../hooks/use-layout-context.js";import{useLayoutStore as y}from"../store.js";import b from"./title.js";const{Sider:g}=p,x=u({borderRight:`${i.lineWidth} ${i.lineType} ${i.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(${i.fontSize} * 0.8)`,borderInlineStart:`4px ${i.lineType} var(--vef-menu-item-selected-color)`,borderRadius:"var(--vef-menu-item-border-radius)"}}}}}}}});function S(){const[l,s,o,m]=h(e=>[e.menuItems,e.defaultOpenedMenuKeys,e.activeMenuKey,e.onActiveMenuKeyChange]),[n,d]=y(e=>[e.siderCollapsed,e.setSiderCollapsed]);return a(g,{collapsible:!0,breakpoint:"lg",collapsed:n,collapsedWidth:80,css:x,theme:"light",trigger:null,width:220,onCollapse:d,children:[t(b,{}),t("div",{className:"vef-layout-sider-menu",children:t(v,{scrollbarSize:"small",children:t(c,{inlineExpansion:!0,defaultOpenedKeys:s,inlineCollapsed:n,items:l??[],selectedKeys:o?[o]:[],onSelect:m})})})]})}const r=f(S);r.displayName="VefSider";export{r as default};
@@ -1,37 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as l,jsx as o}from"@emotion/react/jsx-runtime";import{css as s}from"@emotion/react";import{themeVariables as e,styles as d}from"@vef-framework/shared";import{AnimatePresence as m,motion as c}from"motion/react";import{memo as h}from"react";import{useLayoutContextSelector as f}from"../hooks/use-layout-context.js";import p from"../logo.svg.js";import{useLayoutStore as x}from"../store.js";const g=s`
3
- flex: none;
4
- height: var(--vef-layout-header-height);
5
- border-bottom: ${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary};
6
- display: flex;
7
- align-items: center;
8
- padding: 0 ${e.paddingSm};
9
- overflow: hidden;
10
- user-select: none;
11
-
12
- > div {
13
- flex: none;
14
- width: 55px;
15
- height: calc(${e.controlHeight} * 1.2);
16
- font-size: 0;
17
- ${d.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.fontSizeLg};
30
- color: ${e.colorTextSlate};
31
- max-width: 156px;
32
- white-space: nowrap;
33
- overflow: hidden;
34
- text-align: center;
35
- text-overflow: ellipsis;
36
- }
37
- `,u="VEF中后台系统";function y(){const[r,n]=f(t=>[t.logo,t.title]),a=x(t=>t.siderCollapsed);return l("div",{css:g,children:[o("div",{children:r||o("img",{alt:"VEF",src:p})}),o(m,{initial:!1,children:!a&&o(c.h3,{layout:!0,animate:{opacity:1,x:0},exit:{opacity:0,x:32},initial:{opacity:0,x:-32},transition:{duration:.2,ease:"easeIn"},children:n||u})})]})}const i=h(y);i.displayName="VefTitle";export{i as default};
2
+ import{jsxs as a,jsx as o}from"@emotion/react/jsx-runtime";import{css as s}from"@emotion/react";import{themeVariables as e,styles as d}from"@vef-framework/shared";import{AnimatePresence as m,motion as c}from"motion/react";import{memo as h}from"react";import{useLayoutContextSelector as f}from"../hooks/use-layout-context.js";import p from"../logo.svg.js";import{useLayoutStore as x}from"../store.js";const g=s({flex:"none",height:"var(--vef-layout-header-height)",borderBottom:`${e.lineWidth} ${e.lineType} ${e.colorBorderSecondary}`,display:"flex",alignItems:"center",padding:`0 ${e.paddingSm}`,overflow:"hidden",userSelect:"none","> div":[d.flexCenter,{flex:"none",width:"55px",height:`calc(${e.controlHeight} * 1.2)`,fontSize:0,"> img":{height:"100%",width:"auto"}}],"> h3":{flex:"auto",margin:0,fontWeight:"bold",fontSize:e.fontSizeLg,color:e.colorTextSlate,maxWidth:"156px",whiteSpace:"nowrap",overflow:"hidden",textAlign:"center",textOverflow:"ellipsis"}}),u="VEF中后台系统";function y(){const[r,n]=f(t=>[t.logo,t.title]),l=x(t=>t.siderCollapsed);return a("div",{css:g,children:[o("div",{children:r||o("img",{alt:"VEF",src:p})}),o(m,{initial:!1,children:!l&&o(c.h3,{layout:!0,animate:{opacity:1,x:0},exit:{opacity:0,x:32},initial:{opacity:0,x:-32},transition:{duration:.2,ease:"easeIn"},children:n||u})})]})}const i=h(y);i.displayName="VefTitle";export{i as default};
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
- import{jsx as e,jsxs as t}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{themeVariables as i,showConfirmation as d}from"@vef-framework/shared";import{UserRoundIcon as f,LockKeyholeIcon as u,LogOutIcon as g}from"lucide-react";import{useCallback as h}from"react";import y from"../../vef-avatar/index.js";import x from"../../vef-dropdown/index.js";import s from"../../vef-icon/index.js";import{useLayoutContextSelector as b}from"../hooks/use-layout-context.js";import k from"./icon-boy.js";import $ from"./icon-girl.js";const C=n`
3
- display: flex;
4
- align-items: center;
5
- column-gap: ${i.marginSm};
6
- padding: ${i.paddingXs};
7
- `,L=n`
8
- display: flex;
9
- flex-direction: column;
10
- align-items: center;
11
- row-gap: calc(${i.marginXxs} + 2px);
12
- user-select: none;
13
- line-height: 1;
14
- `,S=n`
15
- font-size: ${i.fontSizeSm};
16
- color: ${i.colorTextDescription};
17
- `,v=[{type:"item",key:"userInfo",label:"个人信息",icon:e(s,{children:e(f,{})})},{type:"item",key:"passwordModification",label:"修改密码",icon:e(s,{children:e(u,{})})},{type:"item",key:"logout",label:"退出登录",icon:e(s,{children:e(g,{})})}],w=e(k,{}),I=e($,{});function z(){const[r,c,l,a,m]=b(o=>[o.onLogout,o.userName,o.userGender,o.userAvatar,o.userDescription]),p=h(o=>{o==="logout"&&r&&d("登出提示","确定要退出登录吗?",r)},[r]);return e(x,{items:v,onClick:p,children:t("div",{css:C,children:[e(y,{size:"medium",src:a||(l==="female"?I:w)}),t("div",{css:L,children:[e("span",{children:c??"佚名"}),m&&t("span",{css:S,children:["[",m,"]"]})]})]})})}export{z as default};
2
+ import{jsx as e,jsxs as t}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{themeVariables as r}from"@vef-framework/shared";import{UserRoundIcon as f,LockKeyholeIcon as d,LogOutIcon as u}from"lucide-react";import{useCallback as h}from"react";import"../../helpers/index.js";import g from"../../vef-avatar/index.js";import y from"../../vef-dropdown/index.js";import m from"../../vef-icon/index.js";import{useLayoutContextSelector as x}from"../hooks/use-layout-context.js";import b from"./icon-boy.js";import k from"./icon-girl.js";import{showConfirmation as I}from"../../helpers/message.js";const S=n({display:"flex",alignItems:"center",columnGap:r.marginSm,padding:r.paddingXs}),C=n({display:"flex",flexDirection:"column",alignItems:"center",rowGap:`calc(${r.marginXxs} + 2px)`,userSelect:"none",lineHeight:1}),v=n({fontSize:r.fontSizeSm,color:r.colorTextDescription}),w=[{type:"item",key:"userInfo",label:"个人信息",icon:e(m,{children:e(f,{})})},{type:"item",key:"passwordModification",label:"修改密码",icon:e(m,{children:e(d,{})})},{type:"item",key:"logout",label:"退出登录",icon:e(m,{children:e(u,{})})}],D=e(b,{}),G=e(k,{});function L(){const[i,c,l,a,s]=x(o=>[o.onLogout,o.userName,o.userGender,o.userAvatar,o.userDescription]),p=h(o=>{o==="logout"&&i&&I("登出提示","确定要退出登录吗?",i)},[i]);return e(y,{items:w,onClick:p,children:t("div",{css:S,children:[e(g,{size:"medium",src:a||(l==="female"?G:D)}),t("div",{css:C,children:[e("span",{children:c??"佚名"}),s&&t("span",{css:v,children:["[",s,"]"]})]})]})})}export{L as default};
@@ -1,6 +1,2 @@
1
1
  "use strict";
2
- import{jsxs as t,jsx as r}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{isShallowEqual as a}from"@vef-framework/shared";import{Layout as e}from"antd";import{memo as l}from"react";import s from"./components/content.js";import c from"./components/header.js";import d from"./components/sider.js";import{LayoutContextProvider as h}from"./hooks/use-layout-context.js";import{LayoutStoreProvider as f}from"./store.js";const u=n`
3
- height: 100%;
4
- min-height: initial;
5
- overflow: hidden;
6
- `;function p({children:i}){return t(e,{hasSider:!0,css:u,children:[r(d,{}),t(e,{hasSider:!1,children:[r(c,{}),r(s,{children:i})]})]})}function y({children:i,...o}){return r(f,{initialState:null,children:r(h,{value:o,children:r(p,{children:i})})})}const m=l(y,(i,o)=>a(i.activeMenuKey,o.activeMenuKey));m.displayName="VefLayout";export{m as default};
2
+ import{jsxs as t,jsx as r}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{isShallowEqual as a}from"@vef-framework/shared";import{Layout as e}from"antd";import{memo as l}from"react";import s from"./components/content.js";import c from"./components/header.js";import d from"./components/sider.js";import{LayoutContextProvider as f}from"./hooks/use-layout-context.js";import{LayoutStoreProvider as h}from"./store.js";const u=n({height:"100%",minHeight:"initial",overflow:"hidden"});function p({children:i}){return t(e,{hasSider:!0,css:u,children:[r(d,{}),t(e,{hasSider:!1,children:[r(c,{}),r(s,{children:i})]})]})}function y({children:i,...o}){return r(h,{initialState:null,children:r(f,{value:o,children:r(p,{children:i})})})}const m=l(y,(i,o)=>a(i.activeMenuKey,o.activeMenuKey));m.displayName="VefLayout";export{m as default};
@@ -1,8 +1,2 @@
1
1
  "use strict";
2
- import{jsx as t,jsxs as s}from"@emotion/react/jsx-runtime";import{css as a}from"@emotion/react";import{themeVariables as n,styles as o,isString as m}from"@vef-framework/shared";import{motion as p}from"motion/react";import c from"../vef-spin/index.js";import d from"../vef-text/index.js";const l=a`
3
- height: 100%;
4
- padding: ${n.paddingLg};
5
- ${o.flexCenter}
6
- flex-direction: column;
7
- row-gap: ${n.marginLg};
8
- `;function f({text:r}){return t("div",{css:o.flexCenter,children:String(r).split("").map((e,i)=>t(p.span,{animate:{y:[2,-2]},initial:{y:0},transition:{duration:.6,repeat:1/0,delay:i*.1,ease:"easeInOut",repeatType:"reverse"},children:e},i))})}function g({tip:r,...e}){return s("div",{css:l,children:[t(c,{...e}),r&&m(r)&&t(d,{color:"secondary",children:t(f,{text:r})})||r]})}export{g as default};
2
+ import{jsx as t,jsxs as s}from"@emotion/react/jsx-runtime";import{css as a}from"@emotion/react";import{styles as n,themeVariables as o,isString as m}from"@vef-framework/shared";import{motion as p}from"motion/react";import c from"../vef-spin/index.js";import l from"../vef-text/index.js";const d=a(n.flexCenter,{height:"100%",padding:o.paddingLg,flexDirection:"column",rowGap:o.marginLg});function f({text:r}){return t("div",{css:n.flexCenter,children:String(r).split("").map((e,i)=>t(p.span,{animate:{y:[2,-2]},initial:{y:0},transition:{duration:.6,repeat:1/0,delay:i*.1,ease:"easeInOut",repeatType:"reverse"},children:e},i))})}function u({tip:r,...e}){return s("div",{css:d,children:[t(c,{...e}),r&&m(r)&&t(l,{color:"secondary",children:t(f,{text:r})})||r]})}export{u as default};
@@ -1,55 +1,2 @@
1
1
  "use strict";
2
- import{jsx as e,jsxs as o}from"@emotion/react/jsx-runtime";import{UserOutlined as k,LockOutlined as S}from"@ant-design/icons";import{css as i}from"@emotion/react";import{useApiContext as j}from"@vef-framework/core";import{themeVariables as t,bmq as p,encryptRsa as B,showSuccessMessage as C,getTodayString as m,styles as E}from"@vef-framework/shared";import{useCallback as g,useState as I,useEffect as V}from"react";import a from"../vef-flex/index.js";import X from"../vef-form/index.js";import{isRequired as u}from"../vef-form/validation-rules.js";import n from"../vef-text/index.js";import h from"../vef-title/index.js";import q from"./login-icon.js";const A=i`
3
- position: relative;
4
- height: 100%;
5
- overflow: hidden;
6
-
7
- .vef-typography {
8
- --vef-typography-title-margin-bottom: 0.2em;
9
- }
10
- `,F=i`
11
- flex: none;
12
- padding-top: calc(${t.paddingXl} * 3);
13
- text-align: center;
14
- `,L=i`
15
- position: absolute;
16
- top: 0;
17
- left: 0;
18
- padding: ${t.padding};
19
- `,O=i`
20
- flex: 1;
21
- height: 100%;
22
- display: none;
23
- background-image: linear-gradient(154deg, ${t.blue1} 30%, ${t.geekblue3} 48%, ${t.blue1} 64%);
24
- ${p.md} {
25
- display: flex;
26
- }
27
- `,z=i`
28
- flex: auto;
29
- min-height: 0;
30
- width: 40%;
31
- `,D=i`
32
- position: relative;
33
- height: 100%;
34
- width: 360px;
35
- padding: 0 ${t.paddingLg};
36
- ${p.lg} {
37
- width: 480px;
38
- padding: 0 calc(${t.paddingXl} * 2);
39
- }
40
-
41
- .vef-form {
42
- margin-top: ${t.marginXl};
43
- }
44
- `,K=i`
45
- position: absolute;
46
- bottom: ${t.margin};
47
- left: 0;
48
- right: 0;
49
- text-align: center;
50
- `,M=i`
51
- position: absolute;
52
- top: ${t.margin};
53
- right: ${t.margin};
54
- left: ${t.margin};
55
- `,P=[{key:"default",rows:[{key:"1",columns:[{key:"1",items:[{name:"account",type:"Input",placeholder:"账号",prefix:e(k,{}),rules:[u("请输入账号")]},{name:"password",type:"Password",placeholder:"密码",prefix:e(S,{}),rules:[u("请输入密码")]}]}]}]}];function R(s,l){return B(s,l)}function T({logo:s,title:l="VEF 中后台管理系统",description:f="一款极度快速的超能系统",publicKey:c,onLoginSuccess:d}){const b=g(r=>c?{...r,password:R(r.password,c)}:r,[c]),y=g(({message:r,data:w})=>{C(r),d?.(w)},[d]),[v,x]=I(m());V(()=>{const r=setInterval(()=>{x(m())},1e3);return()=>{clearInterval(r)}},[]);const{loginApi:$}=j();return o(a,{css:A,justify:"center",children:[s&&e("div",{css:L,children:s}),o(a,{vertical:!0,align:"center",css:O,children:[o("div",{css:F,children:[e(h,{children:l}),e(n,{children:f})]}),e("div",{css:[z,E.flexCenter],children:e(q,{})})]}),o(a,{vertical:!0,css:D,justify:"center",children:[o("div",{css:M,children:[e(n,{color:"secondary",children:"🕰️ 今天是 "}),e(n,{bold:!0,color:"green",children:v})]}),e(h,{level:2,children:"身份认证 🔑"}),e(n,{color:"secondary",children:"请输入您的账号和密码进行登录"}),e(X,{labelPosition:"left",resetButton:!1,scene:"login",schema:P,size:"large",submitApi:$,submitTip:"登录中...",submissionButton:{text:"登录",block:!0},onBeforeSubmit:b,onSubmitSuccess:y}),e("div",{css:K,children:o(n,{color:"secondary",children:["Copyright ©"," ",new Date().getFullYear()," ","VEF."]})})]})]})}export{T as default};
2
+ import{jsx as e,jsxs as o}from"@emotion/react/jsx-runtime";import{UserOutlined as S,LockOutlined as $}from"@ant-design/icons";import{css as t}from"@emotion/react";import{useApiContext as j}from"@vef-framework/core";import{themeVariables as i,bmq as p,encryptRsa as A,getTodayString as m,styles as I}from"@vef-framework/shared";import{useCallback as g,useState as B,useEffect as C}from"react";import"../helpers/index.js";import a from"../vef-flex/index.js";import E from"../vef-form/index.js";import{isRequired as u}from"../vef-form/validation-rules.js";import n from"../vef-text/index.js";import f from"../vef-title/index.js";import T from"./login-icon.js";import{showSuccessMessage as V}from"../helpers/message.js";const X=t({position:"relative",height:"100%",overflow:"hidden",".vef-typography":{"--vef-typography-title-margin-bottom":"0.2em"}}),q=t({flex:"none",paddingTop:`calc(${i.paddingXl} * 3)`,textAlign:"center"}),F=t({position:"absolute",top:0,left:0,padding:i.padding}),L=t({flex:1,height:"100%",display:"none",backgroundImage:`linear-gradient(154deg, ${i.blue1} 30%, ${i.geekblue3} 48%, ${i.blue1} 64%)`,[p.md]:{display:"flex"}}),O=t({flex:"auto",minHeight:0,width:"40%"}),z=t({position:"relative",height:"100%",width:"360px",padding:`0 ${i.paddingLg}`,[p.lg]:{width:"480px",padding:`0 calc(${i.paddingXl} * 2)`},".vef-form":{marginTop:i.marginXl}}),D=t({position:"absolute",bottom:i.margin,left:0,right:0,textAlign:"center"}),H=t({position:"absolute",top:i.margin,right:i.margin,left:i.margin}),K=[{key:"default",rows:[{key:"1",columns:[{key:"1",items:[{name:"account",type:"Input",placeholder:"账号",prefix:e(S,{}),rules:[u("请输入账号")]},{name:"password",type:"Password",placeholder:"密码",prefix:e($,{}),rules:[u("请输入密码")]}]}]}]}];function M(s,l){return A(s,l)}function P({logo:s,title:l="VEF 中后台管理系统",description:h="一款极度快速的超能系统",publicKey:c,onLoginSuccess:d}){const b=g(r=>c?{...r,password:M(r.password,c)}:r,[c]),y=g(({message:r,data:k})=>{V(r),d?.(k)},[d]),[v,x]=B(m());C(()=>{const r=setInterval(()=>{x(m())},1e3);return()=>{clearInterval(r)}},[]);const{loginApi:w}=j();return o(a,{css:X,justify:"center",children:[s&&e("div",{css:F,children:s}),o(a,{vertical:!0,align:"center",css:L,children:[o("div",{css:q,children:[e(f,{children:l}),e(n,{children:h})]}),e("div",{css:[O,I.flexCenter],children:e(T,{})})]}),o(a,{vertical:!0,css:z,justify:"center",children:[o("div",{css:H,children:[e(n,{color:"secondary",children:"🕰️ 今天是 "}),e(n,{bold:!0,color:"green",children:v})]}),e(f,{level:2,children:"身份认证 🔑"}),e(n,{color:"secondary",children:"请输入您的账号和密码进行登录"}),e(E,{labelPosition:"left",resetButton:!1,scene:"login",schema:K,size:"large",submitApi:w,submitTip:"登录中...",submissionButton:{text:"登录",block:!0},onBeforeSubmit:b,onSubmitSuccess:y}),e("div",{css:D,children:o(n,{color:"secondary",children:["Copyright ©"," ",new Date().getFullYear()," ","VEF."]})})]})]})}export{P as default};
@@ -1,7 +1,2 @@
1
1
  "use strict";
2
- import{jsx as L}from"@emotion/react/jsx-runtime";import{css as O}from"@emotion/react";import{useNormalizedMenuItems as V}from"@vef-framework/hooks";import{themeVariables as m,isFunction as l}from"@vef-framework/shared";import{Menu as $}from"antd";import{useMemo as j}from"react";const w=O`
3
- &.vef-menu {
4
- --vef-menu-icon-size: ${m.fontSizeLg};
5
- --vef-menu-collapsed-icon-size: calc(${m.fontSizeLg} + 2px);
6
- }
7
- `;function E({defaultOpenedKeys:d,openedKeys:r,orientation:p="vertical",inlineCollapsed:u=!1,inlineIndent:f=20,inlineExpansion:y=!1,items:K,selectable:k=!0,deselectable:v=!1,multiple:h=!1,defaultSelectedKeys:S,selectedKeys:z,appearance:C,onClick:i,onChange:t,onSelect:o,onDeselect:s}){const b=V(K),[x,I,g]=j(()=>{const D=l(i)?({key:e,keyPath:n})=>i(e,n):void 0,a=l(t),M=l(o)||a?({key:e,keyPath:n,selectedKeys:c})=>{t?.(c),o?.(e,n)}:void 0,P=l(s)||a?({key:e,keyPath:n,selectedKeys:c})=>{t?.(c),s?.(e,n)}:void 0;return[D,M,P]},[i,t,o,s]);return L($,{css:w,defaultOpenKeys:d,defaultSelectedKeys:S,inlineCollapsed:u,inlineIndent:f,items:b,mode:p==="vertical"?y?"inline":"vertical":"horizontal",multiple:h,openKeys:r,selectable:k,selectedKeys:z,theme:C,unselectable:v?"on":"off",onClick:x,onDeselect:g,onSelect:I})}export{E as default};
2
+ import{jsx as F}from"@emotion/react/jsx-runtime";import{css as L}from"@emotion/react";import{useNormalizedMenuItems as O}from"@vef-framework/hooks";import{themeVariables as m,isFunction as l}from"@vef-framework/shared";import{Menu as V}from"antd";import{useMemo as j}from"react";const E=L({"&.vef-menu":{"--vef-menu-icon-size":m.fontSizeLg,"--vef-menu-collapsed-icon-size":`calc(${m.fontSizeLg} + 2px)`}});function N({defaultOpenedKeys:d,openedKeys:r,orientation:p="vertical",inlineCollapsed:u=!1,inlineIndent:f=20,inlineExpansion:y=!1,items:K,selectable:k=!0,deselectable:v=!1,multiple:h=!1,defaultSelectedKeys:S,selectedKeys:z,appearance:C,onClick:i,onChange:t,onSelect:o,onDeselect:s}){const b=O(K),[x,I,g]=j(()=>{const D=l(i)?({key:e,keyPath:n})=>i(e,n):void 0,a=l(t),M=l(o)||a?({key:e,keyPath:n,selectedKeys:c})=>{t?.(c),o?.(e,n)}:void 0,P=l(s)||a?({key:e,keyPath:n,selectedKeys:c})=>{t?.(c),s?.(e,n)}:void 0;return[D,M,P]},[i,t,o,s]);return F(V,{css:E,defaultOpenKeys:d,defaultSelectedKeys:S,inlineCollapsed:u,inlineIndent:f,items:b,mode:p==="vertical"?y?"inline":"vertical":"horizontal",multiple:h,openKeys:r,selectable:k,selectedKeys:z,theme:C,unselectable:v?"on":"off",onClick:x,onDeselect:g,onSelect:I})}export{N as default};
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
- import{jsx as l,jsxs as Y,Fragment as Z}from"@emotion/react/jsx-runtime";import{css as _}from"@emotion/react";import{useWindowSize as N,useElementSize as $}from"@vef-framework/hooks";import{isFunction as F}from"@vef-framework/shared";import{Modal as ee}from"antd";import{useDragControls as te,motion as oe}from"motion/react";import{useCallback as r,useState as E,useMemo as i,useEffect as ne,memo as le}from"react";import se from"./components/cancel-action-button.js";import re from"./components/ok-action-button.js";import{ModalContextProvider as ie}from"./context.js";import{default as ve}from"./components/action-button-wrapper.js";const ae=_`
3
- cursor: move;
4
- user-select: none;
5
- `;function ce({title:A,open:f,closable:j=!0,closeOnEscPress:I=!0,closeOnMaskClick:S=!1,destroyOnClose:V=!1,showCancelButton:B=!0,cancelButtonText:u="取消",okButtonText:p="提交",actions:a,width:n,loading:P=!1,cancelOnClose:T=!0,onClose:h,onOk:C,onCancel:k,onAfterOpen:g,onAfterClose:w,children:W}){const c=te(),L=r(e=>{e.stopPropagation(),c.start(e)},[c]),{width:O,height:x}=N(),[q,G]=E(null),b=$(q),M=i(()=>{if(!b)return{left:0,top:0,right:0,bottom:0};const{width:e,height:t}=b;return{left:-(O/2-e/2),top:-(x/2-t/2),right:O/2-e/2,bottom:x/2-t/2}},[b,x,O]),H=i(()=>n==="small"?378:n==="medium"?736:n==="narrow"?"25vw":n==="half"?"50vw":n==="wide"?"75vw":n==="full"?"100vw":n,[n]),J=r(e=>l(oe.div,{ref:t=>G(t),drag:!0,dragConstraints:M,dragControls:c,dragElastic:.3,dragListener:!1,dragMomentum:!1,children:e}),[M,c]),K=i(()=>l("div",{css:ae,onPointerDown:L,children:A}),[A,L]),[v,z]=E(!1),[y,d]=E({isFullyOpened:!1,isFullyClosed:!1}),Q=i(()=>({isDisabled:v,setIsDisabled:z,...y}),[v,z,y]),D=P||v;ne(()=>{f&&y.isFullyClosed&&d(e=>({...e,isFullyClosed:!1}))},[f]);const m=r(e=>{if(!D){if(d(t=>({...t,isFullyOpened:!1})),T){h?.(),k?.();return}e?k?.():h?.()}},[D,T,h,k]),R=i(()=>{const e=l(se,{text:u,onClick:()=>m(!0)},"cancelActionButton"),t=l(re,{text:p,onClick:C},"okActionButton");return F(a)?a([e,t]):a||(B?Y(Z,{children:[e,t]}):t)},[u,p,C,a,B,m]),U=r(({type:e,target:t})=>{let s=!0;if(e==="click"){let o=t.parentElement;for(;o;){if(o.classList.contains("vef-modal-content")){s=!0;break}if(o.classList.contains("vef-modal-footer")){s=!1;break}o=o.parentElement}}m(!s)},[m]),X=r(e=>{const t=F(g),s=F(w);e?(t&&g(),d(o=>({...o,isFullyOpened:!0}))):(s&&w(),d(o=>({...o,isFullyClosed:!0})))},[g,w]);return l(ie,{value:Q,children:l(ee,{centered:!0,afterOpenChange:X,cancelText:u,closable:j,destroyOnClose:V,footer:R,keyboard:I,loading:P,maskClosable:S,modalRender:J,okText:p,open:f,title:K,width:H,zIndex:10,onCancel:U,onOk:C,children:W})})}const de=le(ce);export{ve as VefModalActionButtonWrapper,de as default};
2
+ import{jsx as l,jsxs as Y,Fragment as Z}from"@emotion/react/jsx-runtime";import{css as _}from"@emotion/react";import{useWindowSize as N,useElementSize as $}from"@vef-framework/hooks";import{isFunction as F}from"@vef-framework/shared";import{Modal as ee}from"antd";import{useDragControls as te,motion as oe}from"motion/react";import{useCallback as r,useState as E,useMemo as i,useEffect as ne,memo as le}from"react";import se from"./components/cancel-action-button.js";import re from"./components/ok-action-button.js";import{ModalContextProvider as ie}from"./context.js";import{default as ve}from"./components/action-button-wrapper.js";const ae=_({cursor:"move",userSelect:"none"});function ce({title:A,open:f,closable:S=!0,closeOnEscPress:j=!0,closeOnMaskClick:I=!1,destroyOnClose:V=!1,showCancelButton:B=!0,cancelButtonText:u="取消",okButtonText:p="提交",actions:a,width:n,loading:P=!1,cancelOnClose:T=!0,onClose:h,onOk:C,onCancel:k,onAfterOpen:g,onAfterClose:w,children:W}){const c=te(),L=r(e=>{e.stopPropagation(),c.start(e)},[c]),{width:O,height:x}=N(),[q,G]=E(null),b=$(q),M=i(()=>{if(!b)return{left:0,top:0,right:0,bottom:0};const{width:e,height:t}=b;return{left:-(O/2-e/2),top:-(x/2-t/2),right:O/2-e/2,bottom:x/2-t/2}},[b,x,O]),H=i(()=>n==="small"?378:n==="medium"?736:n==="narrow"?"25vw":n==="half"?"50vw":n==="wide"?"75vw":n==="full"?"100vw":n,[n]),J=r(e=>l(oe.div,{ref:t=>G(t),drag:!0,dragConstraints:M,dragControls:c,dragElastic:.3,dragListener:!1,dragMomentum:!1,children:e}),[M,c]),K=i(()=>l("div",{css:ae,onPointerDown:L,children:A}),[A,L]),[v,z]=E(!1),[y,d]=E({isFullyOpened:!1,isFullyClosed:!1}),Q=i(()=>({isDisabled:v,setIsDisabled:z,...y}),[v,z,y]),D=P||v;ne(()=>{f&&y.isFullyClosed&&d(e=>({...e,isFullyClosed:!1}))},[f]);const m=r(e=>{if(!D){if(d(t=>({...t,isFullyOpened:!1})),T){h?.(),k?.();return}e?k?.():h?.()}},[D,T,h,k]),R=i(()=>{const e=l(se,{text:u,onClick:()=>m(!0)},"cancelActionButton"),t=l(re,{text:p,onClick:C},"okActionButton");return F(a)?a([e,t]):a||(B?Y(Z,{children:[e,t]}):t)},[u,p,C,a,B,m]),U=r(({type:e,target:t})=>{let s=!0;if(e==="click"){let o=t.parentElement;for(;o;){if(o.classList.contains("vef-modal-content")){s=!0;break}if(o.classList.contains("vef-modal-footer")){s=!1;break}o=o.parentElement}}m(!s)},[m]),X=r(e=>{const t=F(g),s=F(w);e?(t&&g(),d(o=>({...o,isFullyOpened:!0}))):(s&&w(),d(o=>({...o,isFullyClosed:!0})))},[g,w]);return l(ie,{value:Q,children:l(ee,{centered:!0,afterOpenChange:X,cancelText:u,closable:S,destroyOnClose:V,footer:R,keyboard:j,loading:P,maskClosable:I,modalRender:J,okText:p,open:f,title:K,width:H,zIndex:10,onCancel:U,onOk:C,children:W})})}const de=le(ce);export{ve as VefModalActionButtonWrapper,de as default};
@@ -1,29 +1,2 @@
1
1
  "use strict";
2
- import{jsx as r,jsxs as o}from"@emotion/react/jsx-runtime";import{css as t}from"@emotion/react";import{styles as l,themeVariables as i}from"@vef-framework/shared";import{ArrowLeftIcon as c}from"lucide-react";import a from"../vef-button/index.js";import m from"../vef-icon/index.js";import f from"./not-found-icon.js";const p=t`
3
- height: 100%;
4
- ${l.flexCenter}
5
- `,d=t`
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: ${i.margin};
14
-
15
- > svg {
16
- width: 70%;
17
- }
18
-
19
- > span {
20
- font-size: ${i.fontSizeLg};
21
- font-weight: 500;
22
- color: ${i.colorTextTertiary};
23
- }
24
-
25
- span.vef-not-found-uri {
26
- padding-left: ${i.paddingSm};
27
- color: ${i.colorWarningText};
28
- }
29
- `;function h({uri:e,title:n="抱歉,您访问的页面不存在~~~",onNavigateHome:s}){return r("div",{css:p,children:o("div",{css:d,children:[r(f,{}),r("span",{children:n}),e&&o("span",{children:["路径:",r("span",{className:"vef-not-found-uri",children:e})]}),r(a,{color:"primary",size:"large",icon:r(m,{children:r(c,{})}),onClick:s,children:"回到首页"})]})})}export{h as default};
2
+ import{jsx as r,jsxs as o}from"@emotion/react/jsx-runtime";import{css as t}from"@emotion/react";import{styles as l,themeVariables as e}from"@vef-framework/shared";import{ArrowLeftIcon as c}from"lucide-react";import a from"../vef-button/index.js";import m from"../vef-icon/index.js";import f from"./not-found-icon.js";const p=t(l.flexCenter,{height:"100%"}),d=t({width:"40%",position:"relative",top:"-60px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",rowGap:e.margin,"> svg":{width:"70%"},"> span":{fontSize:e.fontSizeLg,fontWeight:500,color:e.colorTextTertiary},"span.vef-not-found-uri":{paddingLeft:e.paddingSm,color:e.colorWarningText}});function h({uri:i,title:n="抱歉,您访问的页面不存在~~~",onNavigateHome:s}){return r("div",{css:p,children:o("div",{css:d,children:[r(f,{}),r("span",{children:n}),i&&o("span",{children:["路径:",r("span",{className:"vef-not-found-uri",children:i})]}),r(a,{color:"primary",size:"large",icon:r(m,{children:r(c,{})}),onClick:s,children:"回到首页"})]})})}export{h as default};