@tiny-codes/react-easy 1.1.2 → 1.2.0

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 (140) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/es/components/BreakLines/index.d.ts +13 -19
  3. package/es/components/BreakLines/index.js +2 -3
  4. package/es/components/BreakLines/index.js.map +1 -1
  5. package/es/components/ConfigProvider/context.d.ts +20 -26
  6. package/es/components/ConfigProvider/context.js.map +1 -1
  7. package/es/components/ConfigProvider/index.d.ts +5 -7
  8. package/es/components/ConfigProvider/index.js +2 -3
  9. package/es/components/ConfigProvider/index.js.map +1 -1
  10. package/es/components/ConfirmAction/index.d.ts +66 -89
  11. package/es/components/ConfirmAction/index.js +27 -18
  12. package/es/components/ConfirmAction/index.js.map +1 -1
  13. package/es/components/ContextMenu/index.d.ts +42 -0
  14. package/es/components/ContextMenu/index.js +188 -0
  15. package/es/components/ContextMenu/index.js.map +1 -0
  16. package/es/components/ContextMenu/style/index.d.ts +3 -0
  17. package/es/components/ContextMenu/style/index.js +25 -0
  18. package/es/components/ContextMenu/style/index.js.map +1 -0
  19. package/es/components/DeleteConfirmAction/index.d.ts +2 -3
  20. package/es/components/DeleteConfirmAction/index.js +8 -12
  21. package/es/components/DeleteConfirmAction/index.js.map +1 -1
  22. package/es/components/EditableText/form.d.ts +150 -0
  23. package/es/components/EditableText/form.js +359 -0
  24. package/es/components/EditableText/form.js.map +1 -0
  25. package/es/components/EditableText/index.d.ts +160 -0
  26. package/es/components/EditableText/index.js +222 -0
  27. package/es/components/EditableText/index.js.map +1 -0
  28. package/es/components/EditableText/style/index.d.ts +3 -0
  29. package/es/components/EditableText/style/index.js +76 -0
  30. package/es/components/EditableText/style/index.js.map +1 -0
  31. package/es/components/FloatDrawer/index.d.ts +89 -86
  32. package/es/components/FloatDrawer/index.js +43 -20
  33. package/es/components/FloatDrawer/index.js.map +1 -1
  34. package/es/components/FloatDrawer/style/index.js +42 -21
  35. package/es/components/FloatDrawer/style/index.js.map +1 -1
  36. package/es/components/Loading/index.d.ts +9 -14
  37. package/es/components/Loading/index.js +7 -6
  38. package/es/components/Loading/index.js.map +1 -1
  39. package/es/components/Loading/style/index.js +1 -1
  40. package/es/components/Loading/style/index.js.map +1 -1
  41. package/es/components/ModalAction/index.d.ts +98 -139
  42. package/es/components/ModalAction/index.js +25 -37
  43. package/es/components/ModalAction/index.js.map +1 -1
  44. package/es/components/OverflowTags/index.d.ts +30 -8
  45. package/es/components/OverflowTags/index.js +26 -7
  46. package/es/components/OverflowTags/index.js.map +1 -1
  47. package/es/components/OverflowTags/style/index.js +1 -1
  48. package/es/components/OverflowTags/style/index.js.map +1 -1
  49. package/es/components/index.d.ts +4 -0
  50. package/es/components/index.js +2 -0
  51. package/es/components/index.js.map +1 -1
  52. package/es/hooks/useRefFunction.d.ts +4 -5
  53. package/es/hooks/useRefFunction.js +6 -7
  54. package/es/hooks/useRefFunction.js.map +1 -1
  55. package/es/hooks/useRefValue.d.ts +2 -3
  56. package/es/hooks/useRefValue.js +2 -3
  57. package/es/hooks/useRefValue.js.map +1 -1
  58. package/es/hooks/useT.js +1 -2
  59. package/es/hooks/useT.js.map +1 -1
  60. package/es/hooks/useValidator.d.ts +2 -3
  61. package/es/hooks/useValidator.js +2 -3
  62. package/es/hooks/useValidator.js.map +1 -1
  63. package/es/hooks/useValidatorBuilder.d.ts +41 -61
  64. package/es/hooks/useValidatorBuilder.js +4 -6
  65. package/es/hooks/useValidatorBuilder.js.map +1 -1
  66. package/es/hooks/useValidators.d.ts +62 -83
  67. package/es/hooks/useValidators.js +3 -4
  68. package/es/hooks/useValidators.js.map +1 -1
  69. package/es/locales/index.d.ts +15 -0
  70. package/es/locales/langs/en-US.d.ts +5 -0
  71. package/es/locales/langs/en-US.js +5 -0
  72. package/es/locales/langs/en-US.js.map +1 -1
  73. package/es/locales/langs/zh-CN.d.ts +5 -0
  74. package/es/locales/langs/zh-CN.js +5 -0
  75. package/es/locales/langs/zh-CN.js.map +1 -1
  76. package/lib/components/BreakLines/index.d.ts +13 -19
  77. package/lib/components/BreakLines/index.js.map +2 -2
  78. package/lib/components/ConfigProvider/context.d.ts +20 -26
  79. package/lib/components/ConfigProvider/context.js.map +2 -2
  80. package/lib/components/ConfigProvider/index.d.ts +5 -7
  81. package/lib/components/ConfigProvider/index.js.map +2 -2
  82. package/lib/components/ConfirmAction/index.d.ts +66 -89
  83. package/lib/components/ConfirmAction/index.js +9 -0
  84. package/lib/components/ConfirmAction/index.js.map +2 -2
  85. package/lib/components/ContextMenu/index.d.ts +42 -0
  86. package/lib/components/ContextMenu/index.js +190 -0
  87. package/lib/components/ContextMenu/index.js.map +7 -0
  88. package/lib/components/ContextMenu/style/index.d.ts +3 -0
  89. package/lib/components/ContextMenu/style/index.js +48 -0
  90. package/lib/components/ContextMenu/style/index.js.map +7 -0
  91. package/lib/components/DeleteConfirmAction/index.d.ts +2 -3
  92. package/lib/components/DeleteConfirmAction/index.js.map +2 -2
  93. package/lib/components/EditableText/form.d.ts +150 -0
  94. package/lib/components/EditableText/form.js +253 -0
  95. package/lib/components/EditableText/form.js.map +7 -0
  96. package/lib/components/EditableText/index.d.ts +160 -0
  97. package/lib/components/EditableText/index.js +181 -0
  98. package/lib/components/EditableText/index.js.map +7 -0
  99. package/lib/components/EditableText/style/index.d.ts +3 -0
  100. package/lib/components/EditableText/style/index.js +118 -0
  101. package/lib/components/EditableText/style/index.js.map +7 -0
  102. package/lib/components/FloatDrawer/index.d.ts +89 -86
  103. package/lib/components/FloatDrawer/index.js +64 -39
  104. package/lib/components/FloatDrawer/index.js.map +2 -2
  105. package/lib/components/FloatDrawer/style/index.js +60 -23
  106. package/lib/components/FloatDrawer/style/index.js.map +2 -2
  107. package/lib/components/Loading/index.d.ts +9 -14
  108. package/lib/components/Loading/index.js +13 -4
  109. package/lib/components/Loading/index.js.map +2 -2
  110. package/lib/components/Loading/style/index.js +1 -1
  111. package/lib/components/Loading/style/index.js.map +2 -2
  112. package/lib/components/ModalAction/index.d.ts +98 -139
  113. package/lib/components/ModalAction/index.js.map +2 -2
  114. package/lib/components/OverflowTags/index.d.ts +30 -8
  115. package/lib/components/OverflowTags/index.js +7 -5
  116. package/lib/components/OverflowTags/index.js.map +2 -2
  117. package/lib/components/OverflowTags/style/index.js +1 -1
  118. package/lib/components/OverflowTags/style/index.js.map +2 -2
  119. package/lib/components/index.d.ts +4 -0
  120. package/lib/components/index.js +6 -0
  121. package/lib/components/index.js.map +2 -2
  122. package/lib/hooks/useRefFunction.d.ts +4 -5
  123. package/lib/hooks/useRefFunction.js.map +2 -2
  124. package/lib/hooks/useRefValue.d.ts +2 -3
  125. package/lib/hooks/useRefValue.js.map +2 -2
  126. package/lib/hooks/useT.js.map +2 -2
  127. package/lib/hooks/useValidator.d.ts +2 -3
  128. package/lib/hooks/useValidator.js.map +2 -2
  129. package/lib/hooks/useValidatorBuilder.d.ts +41 -61
  130. package/lib/hooks/useValidatorBuilder.js.map +2 -2
  131. package/lib/hooks/useValidators.d.ts +62 -83
  132. package/lib/hooks/useValidators.js.map +2 -2
  133. package/lib/locales/index.d.ts +15 -0
  134. package/lib/locales/langs/en-US.d.ts +5 -0
  135. package/lib/locales/langs/en-US.js +5 -0
  136. package/lib/locales/langs/en-US.js.map +2 -2
  137. package/lib/locales/langs/zh-CN.d.ts +5 -0
  138. package/lib/locales/langs/zh-CN.js +5 -0
  139. package/lib/locales/langs/zh-CN.js.map +2 -2
  140. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"names":["genStyleHooks","getColorLuminance","genStyle","token","_componentCls","componentCls","_defineProperty","position","display","overflow","left","top","bottom","right","concat","pointerEvents","transition","height","width","transform","boxShadow","colorFill","zIndex","cursor","color","colorTextTertiary","backgroundColor","colorBgBase","alignItems","justifyContent","colorText","borderRadius","userSelect","lineHeight","border","colorBgTextHover","colorBgTextActive","flexDirection","antCls","flex","minHeight"],"sources":["../../../../src/components/FloatDrawer/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n boxShadow: `2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n boxShadow: `-2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n boxShadow: `0 2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n boxShadow: `0 -2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(100%)',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(100%)',\n },\n [`${componentCls}-expand-handle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-expand-handle,\n &${componentCls}-right ${componentCls}-expand-handle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle,\n &${componentCls}-bottom ${componentCls}-expand-handle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-expand-handle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n boxShadow: `2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-right ${componentCls}-expand-handle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n boxShadow: `-2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n boxShadow: `0 2px 5px ${token.colorFill}`,\n },\n [`&${componentCls}-bottom ${componentCls}-expand-handle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n boxShadow: `0 -2px 5px ${token.colorFill}`,\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n overflow: 'auto',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('easy-float-drawer' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAItD,SAASC,iBAAiB;AAI1B,IAAMC,QAA2C,GAAG,SAA9CA,QAA2CA,CAAIC,KAAK,EAAgB;EAAA,IAAAC,aAAA;EACxE,IAAQC,YAAY,GAAKF,KAAK,CAAtBE,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,GAAAD,aAAA;IACXG,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EAAS,GAAAH,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,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AE;EACV,CAAC,OAAAT,MAAA,CACIT,YAAY,aAAAS,MAAA,CAAUT,YAAY,qBAAmB;IACxDK,IAAI,EAAE,CAAC;IACPQ,KAAK,EAAE,CAAC;IACRD,MAAM,EAAE,MAAM;IACdM,MAAM,EAAE;EACV,CAAC,OAAAT,MAAA,CACIT,YAAY,WAAAS,MAAA,CAAQT,YAAY,qBAAmB;IACtDO,MAAM,EAAE,CAAC;IACTK,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,MAAM;IACbK,MAAM,EAAE;EACV,CAAC,GAAAjB,eAAA,CAAAA,eAAA,CAAAF,aAAA,MAAAU,MAAA,CACIT,YAAY,cAAAS,MAAA,CAAWT,YAAY,qBAAmB;IACzDM,GAAG,EAAE,CAAC;IACNM,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,MAAM;IACbK,MAAM,EAAE;EACV,CAAC,MAAAT,MAAA,CACGT,YAAY,eAAAC,eAAA;IACdW,MAAM,EAAE;EAAM,MAAAH,MAAA,CACVT,YAAY,YAAAC,eAAA;IACdE,OAAO,EAAE,MAAM;IACf6B,aAAa,EAAE,QAAQ;IACvBpB,MAAM,EAAE;EAAM,MAAAH,MAAA,CAEVX,KAAK,CAACmC,MAAM,iBAAe;IAC7BC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZ/B,QAAQ,EAAE;EACZ,CAAC;AAKX,CAAC;AAED,eAAeT,aAAa,CAAC,mBAAmB,EAAWE,QAAQ,CAAC"}
1
+ {"version":3,"names":["genStyleHooks","FastColor","getColorLuminance","genStyle","token","_componentCls","componentCls","_defineProperty","position","display","overflow","left","top","bottom","right","concat","pointerEvents","transition","height","width","transform","boxShadow","colorTextBase","setA","toRgbString","zIndex","cursor","color","colorTextTertiary","backgroundColor","colorBgBase","alignItems","justifyContent","colorText","borderRadius","userSelect","lineHeight","border","colorBgTextHover","colorBgTextActive","flexDirection","antCls","flex","minHeight"],"sources":["../../../../src/components/FloatDrawer/style/index.ts"],"sourcesContent":["import type { AliasToken, GenerateStyle } from 'antd/es/theme/interface';\nimport { genStyleHooks } from 'antd/es/theme/util/genStyleUtils';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { FastColor } from '@ant-design/fast-color';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n // On the left side: the shadow casts to the right\n boxShadow: `2px 0 12px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, 1.5px 0 6px ${new FastColor(token.colorTextBase).setA(0.02).toRgbString()}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n // On the right side: the shadow casts to the left\n boxShadow: `-2px 0 12px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, -1.5px 0 6px ${new FastColor(token.colorTextBase).setA(0.02).toRgbString()}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n // On the top side: the shadow casts downward\n boxShadow: `0 2px 12px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, 0 1.5px 6px ${new FastColor(token.colorTextBase).setA(0.02).toRgbString()}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n // On the bottom side: the shadow casts upward\n boxShadow: `0 -2px 12px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, 0 -1.5px 6px ${new FastColor(token.colorTextBase).setA(0.02).toRgbString()}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(calc(-100% - var(--edge-offset, 0px)))',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(calc(100% + var(--edge-offset, 0px)))',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(calc(-100% - var(--edge-offset, 0px)))',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(calc(100% + var(--edge-offset, 0px)))',\n },\n [`${componentCls}-toggle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-toggle,\n &${componentCls}-right ${componentCls}-toggle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-toggle,\n &${componentCls}-bottom ${componentCls}-toggle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-toggle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n // On the left side: the shadow casts to the right and upward/downward in half size\n boxShadow: `0px 2px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n 0px -2px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n 4px 0px 8px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}`,\n '&:hover': {\n boxShadow: `0px 2px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n 0px -2px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n 4px 0px 8px ${new FastColor(token.colorTextBase).setA(0.12).toRgbString()}`,\n },\n },\n [`&${componentCls}-right ${componentCls}-toggle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n // On the right side: the shadow casts to the left and upward/downward in half size\n boxShadow: `0px 2px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n 0px -2px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n -4px 0px 8px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}`,\n '&:hover': {\n boxShadow: `0px 2px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n 0px -2px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n -4px 0px 8px ${new FastColor(token.colorTextBase).setA(0.12).toRgbString()}`,\n },\n },\n [`&${componentCls}-top ${componentCls}-toggle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n // On the top side: the shadow casts downward and left/right in half size\n boxShadow: `2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n -2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n 0px 4px 8px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}`,\n '&:hover': {\n boxShadow: `2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n -2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n 0px 4px 8px ${new FastColor(token.colorTextBase).setA(0.12).toRgbString()}`,\n },\n },\n [`&${componentCls}-bottom ${componentCls}-toggle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n // On the bottom side: the shadow casts upward and left/right in half size\n boxShadow: `2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n -2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.08).toRgbString()}, \n 0px -4px 8px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}`,\n '&:hover': {\n boxShadow: `2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n -2px 0px 4px ${new FastColor(token.colorTextBase).setA(0.1).toRgbString()}, \n 0px -4px 8px ${new FastColor(token.colorTextBase).setA(0.12).toRgbString()}`,\n },\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n overflow: 'auto',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('EasyFloatDrawer' as never, genStyle);\n"],"mappings":";;;;AACA,SAASA,aAAa,QAAQ,kCAAkC;AAGhE,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,iBAAiB;AAI1B,IAAMC,QAA2C,GAAG,SAA9CA,QAA2CA,CAAIC,KAAK,EAAgB;EAAA,IAAAC,aAAA;EACxE,IAAQC,YAAY,GAAKF,KAAK,CAAtBE,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,GAAAD,aAAA;IACXG,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EAAS,GAAAH,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAF,aAAA,EAClB,QAAQ,EAAG;IACVM,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,SAAS,EAAG;IACXC,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,OAAO,EAAG;IACTF,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE;EACP,CAAC,GACA,UAAU,EAAG;IACZD,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRD,MAAM,EAAE;EACV,CAAC,OAAAE,MAAA,CAEIT,YAAY,YAAU;IACzB;EAAA,CACD,OAAAS,MAAA,CACIT,YAAY,cAAY;IAC3BU,aAAa,EAAE;EACjB,CAA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AAH,MAAA,CACVT,YAAY,YAAAC,eAAA;IACdE,OAAO,EAAE,MAAM;IACf+B,aAAa,EAAE,QAAQ;IACvBtB,MAAM,EAAE;EAAM,MAAAH,MAAA,CAEVX,KAAK,CAACqC,MAAM,iBAAe;IAC7BC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZjC,QAAQ,EAAE;EACZ,CAAC;AAKX,CAAC;AAED,eAAeV,aAAa,CAAC,iBAAiB,EAAWG,QAAQ,CAAC"}
@@ -2,15 +2,12 @@ import { type CSSProperties, type FC } from 'react';
2
2
  import type { SpinProps } from 'antd';
3
3
  export type LoadingProps = SpinProps & {
4
4
  /**
5
- * **EN:** When used independently, the positioning method of the animation:
6
- *
5
+ * - **EN:** When used independently, the positioning method of the animation:
7
6
  * - **absolute** - Uses absolute positioning, and the animation will automatically center itself
8
7
  * within the parent container.
9
8
  * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
10
9
  * and center itself.
11
- *
12
- * **CN:** 独立使用时,动画的定位方式:
13
- *
10
+ * - **CN:** 独立使用时,动画的定位方式:
14
11
  * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
15
12
  * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
16
13
  *
@@ -18,18 +15,16 @@ export type LoadingProps = SpinProps & {
18
15
  */
19
16
  mode?: 'absolute' | 'flex';
20
17
  /**
21
- * **EN:** When used independently, set the class name for the mask parent container of the
22
- * animation
23
- *
24
- * **CN:** 在独立使用时,设置动画遮罩父容器的样式类名
18
+ * - **EN:** When used independently, set the class name for the mask parent container of the
19
+ * animation
20
+ * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名
25
21
  */
26
- maskClassName?: string;
22
+ rootClassName?: string;
27
23
  /**
28
- * **EN:** When used independently, set the style for the mask parent container of the animation
29
- *
30
- * **CN:** 在独立使用时,设置动画遮罩父容器的样式
24
+ * - **EN:** When used independently, set the style for the mask parent container of the animation
25
+ * - **CN:** 在独立使用时,设置动画遮罩父容器的样式
31
26
  */
32
- maskStyle?: CSSProperties;
27
+ rootStyle?: CSSProperties;
33
28
  };
34
29
  /**
35
30
  * **EN:** Page loading animation component, providing two usage methods:
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["maskClassName", "maskStyle", "mode", "children", "spinning", "className"];
2
+ var _excluded = ["prefixCls", "mode", "rootClassName", "rootStyle", "children", "spinning", "className"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -55,10 +55,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
55
55
  * ```
56
56
  */
57
57
  var Loading = function Loading(props) {
58
- var maskClassName = props.maskClassName,
59
- maskStyle = props.maskStyle,
58
+ var prefixClsInProps = props.prefixCls,
60
59
  _props$mode = props.mode,
61
60
  mode = _props$mode === void 0 ? 'flex' : _props$mode,
61
+ rootClassName = props.rootClassName,
62
+ rootStyle = props.rootStyle,
62
63
  children = props.children,
63
64
  _props$spinning = props.spinning,
64
65
  spinning = _props$spinning === void 0 ? true : _props$spinning,
@@ -66,7 +67,7 @@ var Loading = function Loading(props) {
66
67
  spinProps = _objectWithoutProperties(props, _excluded);
67
68
  var _useContext = useContext(ConfigProvider.ConfigContext),
68
69
  getPrefixCls = _useContext.getPrefixCls;
69
- var prefixCls = getPrefixCls('easy-loading');
70
+ var prefixCls = getPrefixCls('easy-loading', prefixClsInProps);
70
71
  var _useStyle = useStyle(prefixCls),
71
72
  _useStyle2 = _slicedToArray(_useStyle, 3),
72
73
  wrapCSSVar = _useStyle2[0],
@@ -84,8 +85,8 @@ var Loading = function Loading(props) {
84
85
  // Show the loading animation in a wrapper that fills the parent container and centers the animation,
85
86
  // and hides the entire component when the animation is off.
86
87
  spinning && wrapCSSVar( /*#__PURE__*/_jsx("div", {
87
- className: classNames(hashId, cssVarCls, prefixCls, maskClassName, mode === 'absolute' ? "".concat(prefixCls, "-absolute") : "".concat(prefixCls, "-flex")),
88
- style: maskStyle,
88
+ className: classNames(hashId, cssVarCls, prefixCls, rootClassName, mode === 'absolute' ? "".concat(prefixCls, "-absolute") : "".concat(prefixCls, "-flex")),
89
+ style: rootStyle,
89
90
  children: /*#__PURE__*/_jsx(Spin, _objectSpread({
90
91
  className: className,
91
92
  spinning: spinning
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","ConfigProvider","Spin","classNames","useStyle","jsx","_jsx","Loading","props","maskClassName","maskStyle","_props$mode","mode","children","_props$spinning","spinning","className","spinProps","_objectWithoutProperties","_excluded","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_objectSpread","concat","style"],"sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n *\n * **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n maskClassName?: string;\n /**\n * **EN:** When used independently, set the style for the mask parent container of the animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n maskStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const { maskClassName, maskStyle, mode = 'flex', children, spinning = true, className, ...spinProps } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n maskClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={maskStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAsCA,UAAU,QAAQ,OAAO;AAE/D,SAASC,cAAc,EAAEC,IAAI,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAkC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,OAAyB,GAAG,SAA5BA,OAAyBA,CAAIC,KAAK,EAAK;EAC3C,IAAQC,aAAa,GAAmFD,KAAK,CAArGC,aAAa;IAAEC,SAAS,GAAwEF,KAAK,CAAtFE,SAAS;IAAAC,WAAA,GAAwEH,KAAK,CAA3EI,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,MAAM,GAAAA,WAAA;IAAEE,QAAQ,GAA+CL,KAAK,CAA5DK,QAAQ;IAAAC,eAAA,GAA+CN,KAAK,CAAlDO,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,IAAI,GAAAA,eAAA;IAAEE,SAAS,GAAmBR,KAAK,CAAjCQ,SAAS;IAAKC,SAAS,GAAAC,wBAAA,CAAKV,KAAK,EAAAW,SAAA;EAE7G,IAAAC,WAAA,GAAyBpB,UAAU,CAACC,cAAc,CAACoB,aAAa,CAAC;IAAzDC,YAAY,GAAAF,WAAA,CAAZE,YAAY;EACpB,IAAMC,SAAS,GAAGD,YAAY,CAAC,cAAc,CAAC;EAC9C,IAAAE,SAAA,GAAwCpB,QAAQ,CAACmB,SAAS,CAAC;IAAAE,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAApDG,UAAU,GAAAF,UAAA;IAAEG,MAAM,GAAAH,UAAA;IAAEI,SAAS,GAAAJ,UAAA;EAEpC,OAAOZ,QAAQ;EACX;EACA;EACAc,UAAU,eACRrB,IAAA,CAACJ,IAAI,EAAA4B,aAAA,CAAAA,aAAA;IAACd,SAAS,EAAEb,UAAU,CAACyB,MAAM,EAAEC,SAAS,EAAEN,SAAS,EAAEP,SAAS,CAAE;IAACD,QAAQ,EAAEA;EAAS,GAAKE,SAAS;IAAAJ,QAAA,EACpGA;EAAQ,EACL,CACR,CAAC;EACD;EACA;EACAE,QAAQ,IACNY,UAAU,eACRrB,IAAA;IACEU,SAAS,EAAEb,UAAU,CACnByB,MAAM,EACNC,SAAS,EACTN,SAAS,EACTd,aAAa,EACbG,IAAI,KAAK,UAAU,MAAAmB,MAAA,CAAMR,SAAS,oBAAAQ,MAAA,CAAiBR,SAAS,UAC9D,CAAE;IACFS,KAAK,EAAEtB,SAAU;IAAAG,QAAA,eAEjBP,IAAA,CAACJ,IAAI,EAAA4B,aAAA;MAACd,SAAS,EAAEA,SAAU;MAACD,QAAQ,EAAEA;IAAS,GAAKE,SAAS,CAAG;EAAC,CAC9D,CACP,CAAC;AACT,CAAC;AAED,eAAeV,OAAO"}
1
+ {"version":3,"names":["useContext","ConfigProvider","Spin","classNames","useStyle","jsx","_jsx","Loading","props","prefixClsInProps","prefixCls","_props$mode","mode","rootClassName","rootStyle","children","_props$spinning","spinning","className","spinProps","_objectWithoutProperties","_excluded","_useContext","ConfigContext","getPrefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_objectSpread","concat","style"],"sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * - **EN:** When used independently, the positioning method of the animation:\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n * - **CN:** 独立使用时,动画的定位方式:\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * - **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n rootClassName?: string;\n /**\n * - **EN:** When used independently, set the style for the mask parent container of the animation\n * - **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n rootStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const {\n prefixCls: prefixClsInProps,\n mode = 'flex',\n rootClassName,\n rootStyle,\n children,\n spinning = true,\n className,\n ...spinProps\n } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading', prefixClsInProps);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n rootClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={rootStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAsCA,UAAU,QAAQ,OAAO;AAE/D,SAASC,cAAc,EAAEC,IAAI,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AA6B/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,OAAyB,GAAG,SAA5BA,OAAyBA,CAAIC,KAAK,EAAK;EAC3C,IACaC,gBAAgB,GAQzBD,KAAK,CARPE,SAAS;IAAAC,WAAA,GAQPH,KAAK,CAPPI,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,MAAM,GAAAA,WAAA;IACbE,aAAa,GAMXL,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,QAAQ,EAAEA;IAAS,GAAKE,SAAS,CAAG;EAAC,CAC9D,CACP,CAAC;AACT,CAAC;AAED,eAAeZ,OAAO"}
@@ -23,5 +23,5 @@ var genStyle = function genStyle(token) {
23
23
  lineHeight: 0
24
24
  }));
25
25
  };
26
- export default genStyleHooks('easy-loading', genStyle);
26
+ export default genStyleHooks('EasyLoading', genStyle);
27
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","display","alignItems","justifyContent","width","height","position","top","left","transform","concat","antCls","lineHeight"],"sources":["../../../../src/components/Loading/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('easy-loading' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAAC,eAAA;IACX,QAAQ,EAAE;MACRC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE;IACV,CAAC;IACD,YAAY,EAAE;MACZC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,KAAK;MACVC,IAAI,EAAE,KAAK;MACXC,SAAS,EAAE;IACb;EAAC,eAAAC,MAAA,CACYZ,KAAK,CAACa,MAAM,aAAW;IAClCC,UAAU,EAAE;EACd,CAAC;AAGP,CAAC;AAED,eAAehB,aAAa,CAAC,cAAc,EAAWC,QAAQ,CAAC"}
1
+ {"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","display","alignItems","justifyContent","width","height","position","top","left","transform","concat","antCls","lineHeight"],"sources":["../../../../src/components/Loading/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('EasyLoading' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAAC,eAAA;IACX,QAAQ,EAAE;MACRC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE;IACV,CAAC;IACD,YAAY,EAAE;MACZC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,KAAK;MACVC,IAAI,EAAE,KAAK;MACXC,SAAS,EAAE;IACb;EAAC,eAAAC,MAAA,CACYZ,KAAK,CAACa,MAAM,aAAW;IAClCC,UAAU,EAAE;EACd,CAAC;AAGP,CAAC;AAED,eAAehB,aAAa,CAAC,aAAa,EAAWC,QAAQ,CAAC"}
@@ -2,123 +2,107 @@ import type { ComponentType, FC, ForwardedRef, ReactElement, ReactNode, RefAttri
2
2
  import type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';
3
3
  import type { LinkProps } from 'antd/es/typography/Link';
4
4
  /**
5
- * **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
6
- * returning in the `onSave` event of the editing form component
7
- *
8
- * **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
5
+ * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
6
+ * returning in the `onSave` event of the editing form component
7
+ * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
9
8
  */
10
9
  export declare const SubmitWithoutClosingSymbol: unique symbol;
11
10
  export type ModalActionProps<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object> = Omit<ModalProps, 'onOk'> & ModalActionTrigger<FD, CP, TP, E> & {
12
11
  /**
13
- * **EN:** Form editing component, do not use the Form component inside the component, the form
14
- * component and form instance are automatically created by the parent component
15
- *
16
- * **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
12
+ * - **EN:** Form editing component, do not use the Form component inside the component, the form
13
+ * component and form instance are automatically created by the parent component
14
+ * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
17
15
  */
18
16
  formComp: ComponentType<CP & RefAttributes<CRef>>;
19
17
  /**
20
- * **EN:** Props of the form editing component
21
- *
22
- * **CN:** 表单编辑组件的Props属性
18
+ * - **EN:** Props of the form editing component
19
+ * - **CN:** 表单编辑组件的Props属性
23
20
  */
24
21
  formProps?: Omit<CP, keyof FormCompPropsConstraint<FD>>;
25
22
  /**
26
- * **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
27
- * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will be
28
- * passed to the `afterOk` event, if any
29
- *
30
- * **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
23
+ * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
24
+ * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will
25
+ * be passed to the `afterOk` event, if any
26
+ * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
31
27
  */
32
28
  onOk?: (formData: FD, ...args: Parameters<TP[E]>) => unknown | Promise<unknown>;
33
29
  /**
34
- * **EN:** The callback after the confirmation event is completed, it will not be triggered when
35
- * it fails, the parameter is the return value of `onOk`
36
- *
37
- * **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
30
+ * - **EN:** The callback after the confirmation event is completed, it will not be triggered when
31
+ * it fails, the parameter is the return value of `onOk`
32
+ * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
38
33
  */
39
34
  afterOk?: (data?: any) => void;
40
35
  };
41
36
  export interface FormCompPropsConstraint<FD> {
42
37
  /**
43
- * **EN:** Automatically generated form instance, use this form instance in FormComp, do not
44
- * create a new instance
45
- *
46
- * **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例
38
+ * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not
39
+ * create a new instance
40
+ * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例
47
41
  */
48
42
  form: FormInstance<FD>;
49
43
  /**
50
- * **EN:** Register the form save event, the callback function passed in will be called when the
51
- * confirm button is clicked, support asynchronous saving
52
- *
53
- * **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存
44
+ * - **EN:** Register the form save event, the callback function passed in will be called when the
45
+ * confirm button is clicked, support asynchronous saving
46
+ * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存
54
47
  *
55
48
  * @param handler Event handler | 事件处理函数
56
49
  */
57
50
  onSave: (handler: (
58
51
  /**
59
- * **EN:** Form data
60
- *
61
- * **CN:** 表单数据
52
+ * - **EN:** Form data
53
+ * - **CN:** 表单数据
62
54
  */
63
55
  formData: FD,
64
56
  /**
65
- * **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get
66
- * the value of the switch; for the `Button` type trigger, you can get the click event object
67
- * of the button
68
- *
69
- * **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象
57
+ * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get
58
+ * the value of the switch; for the `Button` type trigger, you can get the click event
59
+ * object of the button
60
+ * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象
70
61
  */
71
62
  ...triggerEventData: any[]) => unknown | Promise<unknown>) => void;
72
63
  /**
73
- * **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to
74
- * false, the form component instance is cached, and the dialog can only be listened to in this
75
- * way
76
- *
77
- * **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框
64
+ * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to
65
+ * false, the form component instance is cached, and the dialog can only be listened to in this
66
+ * way
67
+ * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框
78
68
  *
79
69
  * @param handler Event handler | 事件处理函数
80
70
  */
81
71
  onOpenChange: (handler: ModalProps['afterOpenChange']) => void;
82
72
  /**
83
- * **EN:** Set the dialog open status
84
- *
85
- * **CN:** 设置弹框打开状态
73
+ * - **EN:** Set the dialog open status
74
+ * - **CN:** 设置弹框打开状态
86
75
  *
87
76
  * @param open Whether is open or not | 弹窗是否打开
88
77
  */
89
78
  setOpen: (open: boolean) => void;
90
79
  /**
91
- * **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.
92
- *
93
- * **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等
80
+ * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.
81
+ * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等
94
82
  */
95
83
  updateModalProps: (props: Partial<ModalProps>) => void;
96
84
  /**
97
- * **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the
98
- * value of the switch; for the `Button` type trigger, you can get the click event object of the
99
- * button
100
- *
101
- * **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象
85
+ * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the
86
+ * value of the switch; for the `Button` type trigger, you can get the click event object of the
87
+ * button
88
+ * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象
102
89
  */
103
90
  triggerEventData?: any[];
104
91
  }
105
92
  export interface ModalActionTrigger<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP> {
106
93
  /**
107
- * **EN:** Trigger component, click to show the dialog
108
- *
109
- * **CN:** 弹窗触发器组件,点击触发显示弹框
94
+ * - **EN:** Trigger component, click to show the dialog
95
+ * - **CN:** 弹窗触发器组件,点击触发显示弹框
110
96
  */
111
97
  triggerComponent?: ComponentType<TP> | FC<TP>;
112
98
  /**
113
- * **EN:** Props of the trigger component
114
- *
115
- * **CN:** 触发器组件的Props属性
99
+ * - **EN:** Props of the trigger component
100
+ * - **CN:** 触发器组件的Props属性
116
101
  */
117
102
  triggerProps?: TP & {
118
103
  /**
119
- * **EN:** Set a custom function to determine whether to show the trigger button
120
- *
121
- * **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮
104
+ * - **EN:** Set a custom function to determine whether to show the trigger button
105
+ * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮
122
106
  *
123
107
  * @default true
124
108
  *
@@ -127,168 +111,143 @@ export interface ModalActionTrigger<FD extends object, CP extends FormCompPropsC
127
111
  show?: boolean | ((formProps?: Omit<CP, keyof FormCompPropsConstraint<FD>>) => boolean);
128
112
  };
129
113
  /**
130
- * **EN:** The event name that triggers the dialog
131
- *
132
- * **CN:** 触发弹窗的事件名称
133
- *
114
+ * - **EN:** The event name that triggers the dialog
115
+ * - **CN:** 触发弹窗的事件名称
134
116
  * - `Button`: 'onClick'
135
117
  * - `Switch`: 'onChange'
136
118
  * - `Link`: 'onClick'
137
119
  */
138
120
  triggerEvent?: E;
139
121
  /**
140
- * **EN:** Custom trigger content
141
- *
142
- * **CN:** 自定义触发器内容
122
+ * - **EN:** Custom trigger content
123
+ * - **CN:** 自定义触发器内容
143
124
  */
144
125
  children?: ReactNode;
145
126
  }
146
127
  export type ModalActionRef<R> = R & {
147
128
  /**
148
- * **EN:** Show the dialog
149
- *
150
- * **CN:** 显示弹框
129
+ * - **EN:** Show the dialog
130
+ * - **CN:** 显示弹框
151
131
  */
152
132
  show: () => void;
153
133
  };
154
134
  export declare const genModalActionRenderer: (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(props: ModalActionProps<FD, CP, TP, E, CRef>, ref: ForwardedRef<ModalActionRef<CRef>>) => import("react/jsx-runtime").JSX.Element;
155
135
  /**
156
- * **EN:** Add default properties to the ModalAction component
157
- *
158
- * **CN:** 给ModalAction组件添加默认属性
136
+ * - **EN:** Add default properties to the ModalAction component
137
+ * - **CN:** 给ModalAction组件添加默认属性
159
138
  *
160
139
  * @param WrappedComponent ModalAction component | ModalAction组件
161
140
  * @param defaultProps Default properties | 默认属性
162
141
  */
163
142
  export declare const withDefaultModalActionProps: <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(WrappedComponent: ComponentType<ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>>, defaultProps?: Partial<ModalActionProps<FD, CP, TP, E, CRef>> | (() => Partial<ModalActionProps<FD, CP, TP, E, CRef>>)) => import("react").ForwardRefExoticComponent<Omit<ModalProps, "onOk"> & ModalActionTrigger<FD, CP, TP, E> & {
164
143
  /**
165
- * **EN:** Form editing component, do not use the Form component inside the component, the form
166
- * component and form instance are automatically created by the parent component
167
- *
168
- * **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
144
+ * - **EN:** Form editing component, do not use the Form component inside the component, the form
145
+ * component and form instance are automatically created by the parent component
146
+ * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
169
147
  */
170
148
  formComp: ComponentType<CP & RefAttributes<CRef>>;
171
149
  /**
172
- * **EN:** Props of the form editing component
173
- *
174
- * **CN:** 表单编辑组件的Props属性
150
+ * - **EN:** Props of the form editing component
151
+ * - **CN:** 表单编辑组件的Props属性
175
152
  */
176
153
  formProps?: Omit<CP, keyof FormCompPropsConstraint<FD_1>> | undefined;
177
154
  /**
178
- * **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
179
- * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will be
180
- * passed to the `afterOk` event, if any
181
- *
182
- * **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
155
+ * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
156
+ * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will
157
+ * be passed to the `afterOk` event, if any
158
+ * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
183
159
  */
184
160
  onOk?: ((formData: FD, ...args: Parameters<TP[E]>) => unknown | Promise<unknown>) | undefined;
185
161
  /**
186
- * **EN:** The callback after the confirmation event is completed, it will not be triggered when
187
- * it fails, the parameter is the return value of `onOk`
188
- *
189
- * **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
162
+ * - **EN:** The callback after the confirmation event is completed, it will not be triggered when
163
+ * it fails, the parameter is the return value of `onOk`
164
+ * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
190
165
  */
191
166
  afterOk?: ((data?: any) => void) | undefined;
192
167
  } & RefAttributes<ModalActionRef<CRef>>>;
193
168
  /**
194
- * **EN:** ModalAction component type
195
- *
196
- * **CN:** ModalAction组件的类型
169
+ * - **EN:** ModalAction component type
170
+ * - **CN:** ModalAction组件的类型
197
171
  */
198
172
  export type ModalActionInterface<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object> = ComponentType<ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>>;
199
173
  /**
200
- * **EN:** ModalAction component with generic type
201
- *
202
- * **CN:** ModalAction泛型组件的类型
174
+ * - **EN:** ModalAction component with generic type
175
+ * - **CN:** ModalAction泛型组件的类型
203
176
  */
204
177
  export type GenericModalActionInterface = <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(props: ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>) => ReactElement;
205
178
  /**
206
- * **EN:** ModalAction with specified trigger type (specified form component)
207
- *
208
- * **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
179
+ * - **EN:** ModalAction with specified trigger type (specified form component)
180
+ * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
209
181
  */
210
182
  type ModalActionWithTrigger<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object, OMIT extends string = never> = ComponentType<Omit<ModalActionProps<FD, CP, TP, E, CRef>, 'triggerComponent' | 'triggerEvent' | OMIT> & RefAttributes<ModalActionRef<CRef>>>;
211
183
  /**
212
- * **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
213
- *
214
- * **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
184
+ * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
185
+ * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
215
186
  */
216
187
  type GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object>(props: Omit<ModalActionProps<FD, CP, TP, E, CRef>, 'triggerComponent' | 'triggerEvent' | OMIT> & RefAttributes<ModalActionRef<CRef>>) => ReactElement;
217
188
  /**
218
- * **EN:** Built-in trigger types (specified form components)
219
- *
220
- * **CN:** 内置的几种触发器类型(已指定表单组件)
189
+ * - **EN:** Built-in trigger types (specified form components)
190
+ * - **CN:** 内置的几种触发器类型(已指定表单组件)
221
191
  */
222
192
  interface TypedTriggers<FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object, OMIT extends string = never> {
223
193
  /**
224
- * **EN:** Dialog with button type trigger
225
- *
226
- * **CN:** 按钮类型的弹窗
194
+ * - **EN:** Dialog with button type trigger
195
+ * - **CN:** 按钮类型的弹窗
227
196
  */
228
197
  Button: ModalActionWithTrigger<FD, CP, ButtonProps, 'onClick', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
229
198
  /**
230
- * **EN:** Dialog with switch type trigger
231
- *
232
- * **CN:** 开关类型的弹窗
199
+ * - **EN:** Dialog with switch type trigger
200
+ * - **CN:** 开关类型的弹窗
233
201
  */
234
202
  Switch: ModalActionWithTrigger<FD, CP, SwitchProps, 'onChange', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
235
203
  /**
236
- * **EN:** Dialog with link type trigger
237
- *
238
- * **CN:** 链接类型的弹窗
204
+ * - **EN:** Dialog with link type trigger
205
+ * - **CN:** 链接类型的弹窗
239
206
  */
240
207
  Link: ModalActionWithTrigger<FD, CP, LinkProps, 'onClick', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
241
208
  }
242
209
  /**
243
- * **EN:** Built-in trigger types (generic types, unspecified form components)
244
- *
245
- * **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
210
+ * - **EN:** Built-in trigger types (generic types, unspecified form components)
211
+ * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
246
212
  */
247
213
  interface GenericTypedTriggers<OMIT extends string = never> {
248
214
  /**
249
- * **EN:** Dialog with button type trigger
250
- *
251
- * **CN:** 按钮类型的弹窗
215
+ * - **EN:** Dialog with button type trigger
216
+ * - **CN:** 按钮类型的弹窗
252
217
  */
253
218
  Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;
254
219
  /**
255
- * **EN:** Dialog with switch type trigger
256
- *
257
- * **CN:** 开关类型的弹窗
220
+ * - **EN:** Dialog with switch type trigger
221
+ * - **CN:** 开关类型的弹窗
258
222
  */
259
223
  Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;
260
224
  /**
261
- * **EN:** Dialog with link type trigger
262
- *
263
- * **CN:** 链接类型的弹窗
225
+ * - **EN:** Dialog with link type trigger
226
+ * - **CN:** 链接类型的弹窗
264
227
  */
265
228
  Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;
266
229
  }
267
230
  type WithGenericTriggers<FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object, OMIT extends string = never> = (<TP extends object, E extends keyof TP>(props: Omit<ModalActionProps<FD, CP, TP, E, CRef>, OMIT> & RefAttributes<ModalActionRef<CRef>>) => ReactElement) & (CP extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FD, CP, CRef, OMIT>);
268
231
  /**
269
- * **EN:** Dialog component with trigger
270
- *
271
- * **CN:** 带触发器的弹窗组件
232
+ * - **EN:** Dialog component with trigger
233
+ * - **CN:** 带触发器的弹窗组件
272
234
  */
273
235
  declare const ModalAction: WithGenericTriggers<object, FormCompPropsConstraint<object>, object, never>;
274
236
  /**
275
- * **EN:** Dialog component with trigger
276
- *
277
- * **CN:** 带触发器的弹窗组件
237
+ * - **EN:** Dialog component with trigger
238
+ * - **CN:** 带触发器的弹窗组件
278
239
  */
279
240
  export type ModalActionWithStatic = typeof ModalAction & {
280
241
  /**
281
- * **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
282
- * returning in the `onSave` event of the editing form component
283
- *
284
- * **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
242
+ * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
243
+ * returning in the `onSave` event of the editing form component
244
+ * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
285
245
  */
286
246
  SubmitWithoutClosing: symbol;
287
247
  };
288
248
  /**
289
- * **EN:** Generate a dialog component based on the editing form component
290
- *
291
- * **CN:** 基于编辑表单组件生成一个弹框组件
249
+ * - **EN:** Generate a dialog component based on the editing form component
250
+ * - **CN:** 基于编辑表单组件生成一个弹框组件
292
251
  *
293
252
  * @param formComp Component of dialog content | 弹窗内容组件
294
253
  * @param defaultProps Default properties of the dialog | 弹窗的默认属性