@ant-design/pro-components 3.1.0-0 → 3.1.1-1

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 (714) hide show
  1. package/README.es-PR.md +1 -3
  2. package/README.md +8 -10
  3. package/README.zh-CN.md +11 -11
  4. package/dist/pro-components.min.js +1 -1
  5. package/es/card/ProCard.js +8 -10
  6. package/es/card/components/Actions/index.js +25 -25
  7. package/es/card/components/Actions/style.js +79 -71
  8. package/es/card/components/Card/index.js +157 -142
  9. package/es/card/components/Card/style.js +249 -192
  10. package/es/card/components/CheckCard/Group.js +94 -115
  11. package/es/card/components/CheckCard/index.js +85 -79
  12. package/es/card/components/CheckCard/style.js +184 -168
  13. package/es/card/components/Divider/index.js +19 -15
  14. package/es/card/components/Divider/style.js +32 -29
  15. package/es/card/components/Loading/index.js +19 -16
  16. package/es/card/components/Loading/style.js +34 -31
  17. package/es/card/components/Operation/index.js +16 -13
  18. package/es/card/components/Operation/style.js +19 -18
  19. package/es/card/components/Statistic/index.js +46 -41
  20. package/es/card/components/Statistic/style.js +89 -70
  21. package/es/card/components/StatisticCard/index.js +46 -41
  22. package/es/card/components/StatisticCard/style.js +37 -35
  23. package/es/descriptions/index.js +214 -225
  24. package/es/descriptions/useFetchData.js +53 -91
  25. package/es/field/AllProField.js +265 -216
  26. package/es/field/FieldHOC/index.js +9 -14
  27. package/es/field/PureProField.js +82 -80
  28. package/es/field/ValueTypeToComponent.js +517 -618
  29. package/es/field/components/Cascader/index.d.ts +3 -3
  30. package/es/field/components/Cascader/index.js +66 -84
  31. package/es/field/components/Checkbox/index.d.ts +2 -2
  32. package/es/field/components/Checkbox/index.js +75 -72
  33. package/es/field/components/Code/index.js +40 -39
  34. package/es/field/components/ColorPicker/index.d.ts +2 -2
  35. package/es/field/components/ColorPicker/index.js +38 -32
  36. package/es/field/components/DatePicker/index.d.ts +2 -2
  37. package/es/field/components/DatePicker/index.js +49 -53
  38. package/es/field/components/Digit/index.js +41 -42
  39. package/es/field/components/DigitRange/index.js +71 -77
  40. package/es/field/components/FromNow/index.js +27 -25
  41. package/es/field/components/Image/index.js +28 -24
  42. package/es/field/components/IndexColumn/index.js +22 -16
  43. package/es/field/components/Money/index.js +107 -116
  44. package/es/field/components/Options/index.js +34 -33
  45. package/es/field/components/Password/index.js +35 -38
  46. package/es/field/components/Percent/index.js +40 -44
  47. package/es/field/components/Percent/util.js +3 -5
  48. package/es/field/components/Progress/index.js +29 -27
  49. package/es/field/components/Radio/index.d.ts +1 -1
  50. package/es/field/components/Radio/index.js +61 -62
  51. package/es/field/components/RangePicker/index.d.ts +2 -2
  52. package/es/field/components/RangePicker/index.js +52 -63
  53. package/es/field/components/Rate/index.js +24 -21
  54. package/es/field/components/Second/index.js +36 -33
  55. package/es/field/components/Segmented/index.d.ts +1 -1
  56. package/es/field/components/Segmented/index.js +37 -46
  57. package/es/field/components/Select/LightSelect/index.d.ts +1 -1
  58. package/es/field/components/Select/LightSelect/index.js +102 -109
  59. package/es/field/components/Select/SearchSelect/index.js +129 -155
  60. package/es/field/components/Select/index.d.ts +2 -2
  61. package/es/field/components/Select/index.js +193 -219
  62. package/es/field/components/Slider/index.js +25 -22
  63. package/es/field/components/Status/index.js +67 -78
  64. package/es/field/components/Switch/index.d.ts +1 -1
  65. package/es/field/components/Switch/index.js +32 -30
  66. package/es/field/components/Text/index.js +34 -37
  67. package/es/field/components/TextArea/index.js +26 -21
  68. package/es/field/components/TextArea/readonly.js +24 -21
  69. package/es/field/components/TimePicker/index.js +96 -105
  70. package/es/field/components/TreeSelect/index.d.ts +3 -3
  71. package/es/field/components/TreeSelect/index.js +107 -125
  72. package/es/form/BaseForm/BaseForm.js +416 -502
  73. package/es/form/BaseForm/EditOrReadOnlyContext.js +1 -1
  74. package/es/form/BaseForm/LightWrapper/index.js +56 -65
  75. package/es/form/BaseForm/LightWrapper/style.js +17 -13
  76. package/es/form/BaseForm/Submitter/index.js +44 -43
  77. package/es/form/FieldContext.js +1 -1
  78. package/es/form/components/Captcha/index.js +74 -134
  79. package/es/form/components/Cascader/index.d.ts +1 -1
  80. package/es/form/components/Cascader/index.js +26 -28
  81. package/es/form/components/Checkbox/index.js +60 -61
  82. package/es/form/components/ColorPicker/index.d.ts +1 -1
  83. package/es/form/components/ColorPicker/index.js +24 -26
  84. package/es/form/components/DatePicker/BaseDatePicker.js +32 -30
  85. package/es/form/components/DatePicker/DatePicker.js +14 -13
  86. package/es/form/components/DatePicker/DateTimePicker.js +11 -12
  87. package/es/form/components/DatePicker/MonthPicker.js +14 -13
  88. package/es/form/components/DatePicker/QuarterPicker.js +14 -13
  89. package/es/form/components/DatePicker/TimePicker.js +26 -27
  90. package/es/form/components/DatePicker/WeekPicker.js +14 -13
  91. package/es/form/components/DatePicker/YearPicker.js +14 -13
  92. package/es/form/components/DatePicker/index.js +1 -1
  93. package/es/form/components/DateRangePicker/BaseDateRanger.js +34 -34
  94. package/es/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
  95. package/es/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
  96. package/es/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
  97. package/es/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
  98. package/es/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
  99. package/es/form/components/DateRangePicker/TimeRangePicker.js +26 -29
  100. package/es/form/components/DateRangePicker/index.js +15 -16
  101. package/es/form/components/Dependency/index.js +31 -34
  102. package/es/form/components/Digit/DigitRange.d.ts +2 -2
  103. package/es/form/components/Digit/DigitRange.js +23 -24
  104. package/es/form/components/Digit/index.d.ts +1 -1
  105. package/es/form/components/Digit/index.js +27 -29
  106. package/es/form/components/Field/index.js +55 -63
  107. package/es/form/components/FieldSet/index.js +68 -76
  108. package/es/form/components/FormItem/FormItemRender/index.js +58 -48
  109. package/es/form/components/FormItem/Group/index.js +95 -95
  110. package/es/form/components/FormItem/Group/style.js +46 -40
  111. package/es/form/components/FormItem/index.js +135 -141
  112. package/es/form/components/FormItem/warpField.js +165 -149
  113. package/es/form/components/List/ListContainer.js +98 -189
  114. package/es/form/components/List/ListItem.js +151 -198
  115. package/es/form/components/List/index.js +97 -107
  116. package/es/form/components/List/style.js +71 -47
  117. package/es/form/components/Money/index.d.ts +1 -1
  118. package/es/form/components/Money/index.js +28 -30
  119. package/es/form/components/Radio/index.d.ts +2 -2
  120. package/es/form/components/Radio/index.js +45 -49
  121. package/es/form/components/Rate/index.d.ts +1 -1
  122. package/es/form/components/Rate/index.js +17 -20
  123. package/es/form/components/SchemaForm/index.js +58 -72
  124. package/es/form/components/SchemaForm/layoutType/Embed.js +5 -6
  125. package/es/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
  126. package/es/form/components/SchemaForm/valueType/dependency.js +11 -11
  127. package/es/form/components/SchemaForm/valueType/divider.js +4 -5
  128. package/es/form/components/SchemaForm/valueType/field.js +45 -44
  129. package/es/form/components/SchemaForm/valueType/formList.js +8 -7
  130. package/es/form/components/SchemaForm/valueType/formSet.js +8 -7
  131. package/es/form/components/SchemaForm/valueType/group.js +7 -8
  132. package/es/form/components/SchemaForm/valueType/ignore.js +2 -2
  133. package/es/form/components/SchemaForm/valueType/index.js +5 -5
  134. package/es/form/components/Segmented/index.js +20 -23
  135. package/es/form/components/Select/index.js +69 -73
  136. package/es/form/components/Slider/index.d.ts +1 -1
  137. package/es/form/components/Slider/index.js +33 -35
  138. package/es/form/components/Switch/index.js +24 -26
  139. package/es/form/components/Text/index.js +75 -86
  140. package/es/form/components/TextArea/index.d.ts +1 -1
  141. package/es/form/components/TextArea/index.js +17 -20
  142. package/es/form/components/TreeSelect/index.js +20 -23
  143. package/es/form/components/UploadButton/index.js +56 -103
  144. package/es/form/components/UploadDragger/index.js +37 -44
  145. package/es/form/helpers/grid.js +65 -67
  146. package/es/form/layouts/DrawerForm/index.js +150 -241
  147. package/es/form/layouts/DrawerForm/style.js +26 -25
  148. package/es/form/layouts/LightFilter/index.d.ts +12 -1
  149. package/es/form/layouts/LightFilter/index.js +158 -140
  150. package/es/form/layouts/LightFilter/style.js +52 -48
  151. package/es/form/layouts/LoginForm/index.js +44 -47
  152. package/es/form/layouts/LoginForm/style.js +71 -67
  153. package/es/form/layouts/LoginFormPage/index.js +45 -48
  154. package/es/form/layouts/LoginFormPage/style.js +136 -126
  155. package/es/form/layouts/ModalForm/index.js +119 -203
  156. package/es/form/layouts/ProForm/index.d.ts +2 -2
  157. package/es/form/layouts/ProForm/index.js +5 -5
  158. package/es/form/layouts/QueryFilter/Actions.js +23 -22
  159. package/es/form/layouts/QueryFilter/index.js +178 -203
  160. package/es/form/layouts/QueryFilter/style.js +45 -37
  161. package/es/form/layouts/StepsForm/StepForm.d.ts +2 -3
  162. package/es/form/layouts/StepsForm/StepForm.js +50 -71
  163. package/es/form/layouts/StepsForm/index.js +175 -217
  164. package/es/form/layouts/StepsForm/style.js +30 -28
  165. package/es/form/layouts/index.js +1 -1
  166. package/es/layout/ProLayout.js +281 -292
  167. package/es/layout/WrapContent.js +16 -12
  168. package/es/layout/assert/Logo.js +95 -97
  169. package/es/layout/components/AppsLogoComponents/AppsLogo.js +10 -12
  170. package/es/layout/components/AppsLogoComponents/DefaultContent.js +17 -16
  171. package/es/layout/components/AppsLogoComponents/SimpleContent.js +19 -18
  172. package/es/layout/components/AppsLogoComponents/index.js +33 -38
  173. package/es/layout/components/AppsLogoComponents/style/default.js +2 -2
  174. package/es/layout/components/AppsLogoComponents/style/index.js +52 -50
  175. package/es/layout/components/AppsLogoComponents/style/simple.js +1 -1
  176. package/es/layout/components/CollapsedIcon/index.js +18 -15
  177. package/es/layout/components/CollapsedIcon/style.js +40 -40
  178. package/es/layout/components/Footer.js +22 -21
  179. package/es/layout/components/FooterToolbar/index.js +58 -52
  180. package/es/layout/components/FooterToolbar/style/index.js +38 -37
  181. package/es/layout/components/FooterToolbar/style/stylish.js +11 -9
  182. package/es/layout/components/GlobalFooter/index.js +25 -25
  183. package/es/layout/components/GlobalFooter/style.js +31 -30
  184. package/es/layout/components/GlobalHeader/ActionsContent.js +62 -78
  185. package/es/layout/components/GlobalHeader/index.js +59 -47
  186. package/es/layout/components/GlobalHeader/rightContentStyle.js +49 -49
  187. package/es/layout/components/GlobalHeader/style.js +58 -54
  188. package/es/layout/components/GridContent/index.js +24 -19
  189. package/es/layout/components/GridContent/style.js +14 -13
  190. package/es/layout/components/Header/index.js +63 -57
  191. package/es/layout/components/Header/style/header.js +49 -47
  192. package/es/layout/components/Header/style/stylish.js +15 -11
  193. package/es/layout/components/Help/AsyncContentPanel.js +13 -18
  194. package/es/layout/components/Help/HelpProvide.js +1 -1
  195. package/es/layout/components/Help/ProHelpContentPanel.js +64 -83
  196. package/es/layout/components/Help/ProHelpDrawer.js +25 -31
  197. package/es/layout/components/Help/ProHelpModal.d.ts +1 -1
  198. package/es/layout/components/Help/ProHelpModal.js +24 -27
  199. package/es/layout/components/Help/ProHelpPanel.js +86 -94
  200. package/es/layout/components/Help/ProHelpPopover.js +18 -16
  201. package/es/layout/components/Help/RenderContentPanel.js +34 -24
  202. package/es/layout/components/Help/Search.js +52 -78
  203. package/es/layout/components/Help/index.js +9 -11
  204. package/es/layout/components/Help/style.js +82 -75
  205. package/es/layout/components/PageContainer/index.js +168 -149
  206. package/es/layout/components/PageContainer/style/index.js +95 -78
  207. package/es/layout/components/PageContainer/style/stylish.js +11 -9
  208. package/es/layout/components/PageHeader/index.js +96 -97
  209. package/es/layout/components/PageHeader/style/index.js +142 -122
  210. package/es/layout/components/PageLoading/index.js +17 -20
  211. package/es/layout/components/SettingDrawer/BlockCheckbox.js +29 -32
  212. package/es/layout/components/SettingDrawer/LayoutChange.js +22 -22
  213. package/es/layout/components/SettingDrawer/RegionalChange.js +14 -15
  214. package/es/layout/components/SettingDrawer/ThemeColor.js +32 -35
  215. package/es/layout/components/SettingDrawer/index.js +137 -168
  216. package/es/layout/components/SettingDrawer/style/index.js +141 -137
  217. package/es/layout/components/SiderMenu/BaseMenu.js +235 -221
  218. package/es/layout/components/SiderMenu/SiderMenu.js +125 -115
  219. package/es/layout/components/SiderMenu/index.js +47 -42
  220. package/es/layout/components/SiderMenu/style/index.js +179 -161
  221. package/es/layout/components/SiderMenu/style/menu.js +148 -110
  222. package/es/layout/components/SiderMenu/style/stylish.js +15 -11
  223. package/es/layout/components/TopNavHeader/index.js +71 -60
  224. package/es/layout/components/TopNavHeader/style.js +64 -63
  225. package/es/layout/context/RouteContext.js +1 -1
  226. package/es/layout/defaultSettings.js +1 -1
  227. package/es/layout/getPageTitle.js +23 -24
  228. package/es/layout/locales/en-US.js +3 -2
  229. package/es/layout/locales/index.js +5 -5
  230. package/es/layout/locales/it-IT.js +3 -2
  231. package/es/layout/locales/ko-KR.js +3 -2
  232. package/es/layout/locales/zh-CN.js +3 -2
  233. package/es/layout/locales/zh-TW.js +3 -2
  234. package/es/layout/style/index.js +48 -42
  235. package/es/layout/utils/getBreadcrumbProps.js +60 -60
  236. package/es/layout/utils/getMenuData.js +7 -11
  237. package/es/layout/utils/pathTools.js +2 -6
  238. package/es/layout/utils/useCurrentMenuLayoutProps.js +4 -9
  239. package/es/layout/utils/utils.js +15 -17
  240. package/es/list/Item.js +157 -137
  241. package/es/list/ListView.js +106 -115
  242. package/es/list/constants.js +2 -2
  243. package/es/list/index.js +72 -70
  244. package/es/list/style/index.js +281 -213
  245. package/es/provider/index.js +122 -115
  246. package/es/provider/intl.js +53 -55
  247. package/es/provider/typing/layoutToken.js +26 -23
  248. package/es/provider/useStyle/index.js +51 -59
  249. package/es/provider/utils/merge.js +10 -12
  250. package/es/skeleton/components/Descriptions/index.js +211 -229
  251. package/es/skeleton/components/List/index.js +208 -223
  252. package/es/skeleton/components/Result/index.js +45 -47
  253. package/es/skeleton/index.js +13 -10
  254. package/es/table/Store/Provide.d.ts +4 -4
  255. package/es/table/Store/Provide.js +102 -117
  256. package/es/table/Table.d.ts +5 -2
  257. package/es/table/Table.js +526 -691
  258. package/es/table/TableSearch.d.ts +24 -0
  259. package/es/table/TableSearch.js +54 -0
  260. package/es/table/TableToolbar.d.ts +22 -0
  261. package/es/table/TableToolbar.js +47 -0
  262. package/es/table/components/Alert/index.js +41 -40
  263. package/es/table/components/Alert/style.js +28 -27
  264. package/es/table/components/ColumnSetting/index.js +228 -223
  265. package/es/table/components/ColumnSetting/style.js +86 -71
  266. package/es/table/components/DragSortTable/index.js +65 -79
  267. package/es/table/components/DragSortTable/style.js +20 -19
  268. package/es/table/components/Dropdown/index.js +42 -47
  269. package/es/table/components/EditableTable/CellEditorTable.js +24 -32
  270. package/es/table/components/EditableTable/RowEditorTable.js +23 -28
  271. package/es/table/components/EditableTable/index.js +295 -329
  272. package/es/table/components/Form/FormRender.js +99 -103
  273. package/es/table/components/Form/index.d.ts +4 -19
  274. package/es/table/components/Form/index.js +112 -159
  275. package/es/table/components/ListToolBar/HeaderMenu.js +44 -52
  276. package/es/table/components/ListToolBar/index.js +122 -147
  277. package/es/table/components/ListToolBar/style.js +127 -117
  278. package/es/table/components/ToolBar/DensityIcon.js +10 -9
  279. package/es/table/components/ToolBar/FullscreenIcon.js +5 -9
  280. package/es/table/components/ToolBar/index.d.ts +2 -8
  281. package/es/table/components/ToolBar/index.js +155 -195
  282. package/es/table/style/index.js +144 -112
  283. package/es/table/typing.d.ts +4 -0
  284. package/es/table/useFetchData.js +199 -338
  285. package/es/table/utils/cellRenderToFromItem.js +105 -119
  286. package/es/table/utils/columnRender.js +63 -54
  287. package/es/table/utils/columnSort.js +22 -22
  288. package/es/table/utils/genProColumnToColumn.d.ts +13 -9
  289. package/es/table/utils/genProColumnToColumn.js +121 -98
  290. package/es/table/utils/index.d.ts +10 -0
  291. package/es/table/utils/index.js +112 -178
  292. package/es/table/utils/useDragSort.d.ts +1 -1
  293. package/es/table/utils/useDragSort.js +99 -92
  294. package/es/table/utils/usePageInfo.d.ts +6 -0
  295. package/es/table/utils/usePageInfo.js +55 -0
  296. package/es/utils/components/DropdownFooter/index.js +23 -21
  297. package/es/utils/components/DropdownFooter/style.js +16 -15
  298. package/es/utils/components/ErrorBoundary/index.js +27 -50
  299. package/es/utils/components/FieldLabel/index.js +70 -70
  300. package/es/utils/components/FieldLabel/style.js +104 -81
  301. package/es/utils/components/FilterDropdown/index.d.ts +11 -0
  302. package/es/utils/components/FilterDropdown/index.js +43 -32
  303. package/es/utils/components/FilterDropdown/style.js +19 -16
  304. package/es/utils/components/InlineErrorFormItem/index.js +78 -78
  305. package/es/utils/components/InlineErrorFormItem/style.js +56 -49
  306. package/es/utils/components/LabelIconTip/index.js +30 -31
  307. package/es/utils/components/LabelIconTip/style.js +36 -35
  308. package/es/utils/components/ProFormContext/index.js +1 -1
  309. package/es/utils/conversionMomentValue/index.js +19 -22
  310. package/es/utils/dateArrayFormatter/index.js +9 -14
  311. package/es/utils/genCopyable/index.js +74 -32
  312. package/es/utils/getFieldPropsOrFormItemProps/index.js +1 -1
  313. package/es/utils/hooks/useDebounceFn/index.js +18 -51
  314. package/es/utils/hooks/useDebounceValue/index.js +7 -16
  315. package/es/utils/hooks/useDeepCompareEffect/index.js +6 -18
  316. package/es/utils/hooks/useDocumentTitle/index.js +2 -2
  317. package/es/utils/hooks/useFetchData/index.js +36 -65
  318. package/es/utils/hooks/useForceRender/index.js +2 -9
  319. package/es/utils/hooks/useLatest/index.js +2 -2
  320. package/es/utils/hooks/usePrevious/index.js +3 -3
  321. package/es/utils/hooks/useReactiveRef/index.js +2 -2
  322. package/es/utils/hooks/useRefCallback/index.js +3 -3
  323. package/es/utils/hooks/useRefFunction/index.js +4 -9
  324. package/es/utils/index.d.ts +1 -2
  325. package/es/utils/index.js +1 -2
  326. package/es/utils/isBrowser/index.js +2 -2
  327. package/es/utils/isDeepEqualReact/index.js +9 -44
  328. package/es/utils/isDropdownValueType/index.js +2 -2
  329. package/es/utils/isNil/index.js +1 -3
  330. package/es/utils/isUrl/index.js +2 -2
  331. package/es/utils/merge/index.js +10 -12
  332. package/es/utils/nanoid/index.js +5 -6
  333. package/es/utils/omitBoolean/index.js +1 -1
  334. package/es/utils/omitUndefined/index.js +3 -3
  335. package/es/utils/omitUndefinedAndEmptyArr/index.js +4 -5
  336. package/es/utils/parseValueToMoment/index.js +3 -7
  337. package/es/utils/pickProFormItemProps/index.js +3 -3
  338. package/es/utils/pickProProps/index.js +6 -7
  339. package/es/utils/proFieldParsingText/index.js +85 -98
  340. package/es/utils/runFunction/index.js +2 -5
  341. package/es/utils/stringify/index.js +1 -1
  342. package/es/utils/transformKeySubmitValue/index.js +99 -116
  343. package/es/utils/useEditableArray/index.d.ts +6 -1
  344. package/es/utils/useEditableArray/index.js +579 -735
  345. package/es/utils/useEditableMap/index.d.ts +1 -1
  346. package/es/utils/useEditableMap/index.js +89 -135
  347. package/es/utils/useMediaQuery/index.d.ts +2 -2
  348. package/es/utils/useMediaQuery/index.js +37 -34
  349. package/es/utils/useMediaQuery/query.js +7 -17
  350. package/es/version.js +1 -1
  351. package/guidelines/Guidelines.md +33 -0
  352. package/guidelines/components/drawer-form.md +90 -0
  353. package/guidelines/components/editable-pro-table.md +150 -0
  354. package/guidelines/components/modal-form.md +88 -0
  355. package/guidelines/components/pro-card.md +90 -0
  356. package/guidelines/components/pro-form.md +96 -0
  357. package/guidelines/components/pro-layout.md +84 -0
  358. package/guidelines/components/pro-table.md +142 -0
  359. package/guidelines/components/steps-form.md +105 -0
  360. package/guidelines/design-tokens/colors.md +58 -0
  361. package/guidelines/design-tokens/layout.md +53 -0
  362. package/guidelines/design-tokens/typography.md +49 -0
  363. package/guidelines/overview-components.md +55 -0
  364. package/guidelines/overview-icons.md +23 -0
  365. package/lib/card/ProCard.js +8 -10
  366. package/lib/card/components/Actions/index.js +25 -25
  367. package/lib/card/components/Actions/style.js +79 -72
  368. package/lib/card/components/Card/index.js +154 -139
  369. package/lib/card/components/Card/style.js +249 -193
  370. package/lib/card/components/CheckCard/Group.js +97 -115
  371. package/lib/card/components/CheckCard/index.js +85 -78
  372. package/lib/card/components/CheckCard/style.js +184 -169
  373. package/lib/card/components/Divider/index.js +20 -16
  374. package/lib/card/components/Divider/style.js +32 -30
  375. package/lib/card/components/Loading/index.js +19 -16
  376. package/lib/card/components/Loading/style.js +34 -32
  377. package/lib/card/components/Operation/index.js +16 -14
  378. package/lib/card/components/Operation/style.js +19 -19
  379. package/lib/card/components/Statistic/index.js +46 -42
  380. package/lib/card/components/Statistic/style.js +89 -71
  381. package/lib/card/components/StatisticCard/index.js +46 -41
  382. package/lib/card/components/StatisticCard/style.js +37 -36
  383. package/lib/card/index.js +4 -4
  384. package/lib/descriptions/index.js +219 -225
  385. package/lib/descriptions/useFetchData.js +51 -90
  386. package/lib/field/AllProField.js +267 -217
  387. package/lib/field/FieldHOC/index.js +9 -15
  388. package/lib/field/PureProField.js +84 -82
  389. package/lib/field/ValueTypeToComponent.js +517 -618
  390. package/lib/field/components/Cascader/index.d.ts +2 -2
  391. package/lib/field/components/Cascader/index.js +66 -85
  392. package/lib/field/components/Checkbox/index.d.ts +1 -1
  393. package/lib/field/components/Checkbox/index.js +75 -73
  394. package/lib/field/components/Code/index.js +40 -39
  395. package/lib/field/components/ColorPicker/index.js +38 -33
  396. package/lib/field/components/DatePicker/index.d.ts +1 -1
  397. package/lib/field/components/DatePicker/index.js +49 -53
  398. package/lib/field/components/Digit/index.js +41 -43
  399. package/lib/field/components/DigitRange/index.js +69 -76
  400. package/lib/field/components/FromNow/index.js +27 -25
  401. package/lib/field/components/Image/index.js +28 -24
  402. package/lib/field/components/IndexColumn/index.js +22 -17
  403. package/lib/field/components/Money/index.js +106 -116
  404. package/lib/field/components/Options/index.js +34 -34
  405. package/lib/field/components/Password/index.js +35 -38
  406. package/lib/field/components/Percent/index.js +40 -45
  407. package/lib/field/components/Percent/util.js +3 -6
  408. package/lib/field/components/Progress/index.js +29 -28
  409. package/lib/field/components/Radio/index.d.ts +1 -1
  410. package/lib/field/components/Radio/index.js +61 -63
  411. package/lib/field/components/RangePicker/index.d.ts +1 -1
  412. package/lib/field/components/RangePicker/index.js +52 -63
  413. package/lib/field/components/Rate/index.js +24 -21
  414. package/lib/field/components/Second/index.js +36 -33
  415. package/lib/field/components/Segmented/index.d.ts +1 -1
  416. package/lib/field/components/Segmented/index.js +37 -48
  417. package/lib/field/components/Select/LightSelect/index.d.ts +1 -1
  418. package/lib/field/components/Select/LightSelect/index.js +103 -110
  419. package/lib/field/components/Select/SearchSelect/index.js +133 -156
  420. package/lib/field/components/Select/index.d.ts +1 -1
  421. package/lib/field/components/Select/index.js +194 -218
  422. package/lib/field/components/Slider/index.js +25 -22
  423. package/lib/field/components/Status/index.js +69 -79
  424. package/lib/field/components/Switch/index.d.ts +1 -1
  425. package/lib/field/components/Switch/index.js +32 -31
  426. package/lib/field/components/Text/index.js +34 -38
  427. package/lib/field/components/TextArea/index.js +26 -21
  428. package/lib/field/components/TextArea/readonly.js +24 -22
  429. package/lib/field/components/TimePicker/index.js +96 -105
  430. package/lib/field/components/TreeSelect/index.d.ts +2 -2
  431. package/lib/field/components/TreeSelect/index.js +105 -124
  432. package/lib/field/index.js +34 -34
  433. package/lib/form/BaseForm/BaseForm.js +413 -499
  434. package/lib/form/BaseForm/EditOrReadOnlyContext.js +1 -1
  435. package/lib/form/BaseForm/LightWrapper/index.js +57 -66
  436. package/lib/form/BaseForm/LightWrapper/style.js +17 -14
  437. package/lib/form/BaseForm/Submitter/index.js +44 -44
  438. package/lib/form/BaseForm/index.js +3 -3
  439. package/lib/form/FieldContext.js +1 -1
  440. package/lib/form/components/Captcha/index.js +74 -135
  441. package/lib/form/components/Cascader/index.js +26 -29
  442. package/lib/form/components/Checkbox/index.js +60 -61
  443. package/lib/form/components/ColorPicker/index.js +24 -26
  444. package/lib/form/components/DatePicker/BaseDatePicker.js +32 -30
  445. package/lib/form/components/DatePicker/DatePicker.js +14 -13
  446. package/lib/form/components/DatePicker/DateTimePicker.js +11 -12
  447. package/lib/form/components/DatePicker/MonthPicker.js +14 -13
  448. package/lib/form/components/DatePicker/QuarterPicker.js +14 -13
  449. package/lib/form/components/DatePicker/TimePicker.js +26 -27
  450. package/lib/form/components/DatePicker/WeekPicker.js +14 -13
  451. package/lib/form/components/DatePicker/YearPicker.js +14 -13
  452. package/lib/form/components/DatePicker/index.js +1 -1
  453. package/lib/form/components/DateRangePicker/BaseDateRanger.js +34 -34
  454. package/lib/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
  455. package/lib/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
  456. package/lib/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
  457. package/lib/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
  458. package/lib/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
  459. package/lib/form/components/DateRangePicker/TimeRangePicker.js +26 -29
  460. package/lib/form/components/DateRangePicker/index.js +15 -16
  461. package/lib/form/components/Dependency/index.js +31 -35
  462. package/lib/form/components/Digit/DigitRange.js +23 -24
  463. package/lib/form/components/Digit/index.js +27 -29
  464. package/lib/form/components/Field/index.js +55 -63
  465. package/lib/form/components/FieldSet/index.js +68 -76
  466. package/lib/form/components/FormItem/FormItemRender/index.js +58 -48
  467. package/lib/form/components/FormItem/Group/index.js +95 -95
  468. package/lib/form/components/FormItem/Group/style.js +46 -41
  469. package/lib/form/components/FormItem/index.js +135 -141
  470. package/lib/form/components/FormItem/warpField.js +165 -149
  471. package/lib/form/components/List/ListContainer.js +100 -191
  472. package/lib/form/components/List/ListItem.js +153 -200
  473. package/lib/form/components/List/index.js +97 -107
  474. package/lib/form/components/List/style.js +71 -48
  475. package/lib/form/components/Money/index.js +28 -30
  476. package/lib/form/components/Radio/index.js +45 -49
  477. package/lib/form/components/Rate/index.js +17 -21
  478. package/lib/form/components/SchemaForm/index.js +54 -68
  479. package/lib/form/components/SchemaForm/layoutType/Embed.js +5 -6
  480. package/lib/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
  481. package/lib/form/components/SchemaForm/layoutType/index.js +2 -2
  482. package/lib/form/components/SchemaForm/valueType/dependency.js +13 -12
  483. package/lib/form/components/SchemaForm/valueType/divider.js +6 -7
  484. package/lib/form/components/SchemaForm/valueType/field.js +47 -45
  485. package/lib/form/components/SchemaForm/valueType/formList.js +10 -9
  486. package/lib/form/components/SchemaForm/valueType/formSet.js +10 -8
  487. package/lib/form/components/SchemaForm/valueType/group.js +9 -10
  488. package/lib/form/components/SchemaForm/valueType/ignore.js +4 -3
  489. package/lib/form/components/SchemaForm/valueType/index.js +7 -6
  490. package/lib/form/components/Segmented/index.js +20 -24
  491. package/lib/form/components/Select/index.js +69 -73
  492. package/lib/form/components/Slider/index.js +33 -35
  493. package/lib/form/components/Switch/index.js +24 -26
  494. package/lib/form/components/Text/index.js +73 -84
  495. package/lib/form/components/TextArea/index.js +17 -21
  496. package/lib/form/components/TreeSelect/index.js +20 -23
  497. package/lib/form/components/UploadButton/index.js +56 -103
  498. package/lib/form/components/UploadDragger/index.js +37 -44
  499. package/lib/form/components/index.js +42 -42
  500. package/lib/form/helpers/grid.js +68 -69
  501. package/lib/form/helpers/index.js +1 -1
  502. package/lib/form/index.js +8 -8
  503. package/lib/form/layouts/DrawerForm/index.js +149 -241
  504. package/lib/form/layouts/DrawerForm/style.js +26 -26
  505. package/lib/form/layouts/LightFilter/index.d.ts +12 -1
  506. package/lib/form/layouts/LightFilter/index.js +158 -141
  507. package/lib/form/layouts/LightFilter/style.js +52 -49
  508. package/lib/form/layouts/LoginForm/index.js +44 -48
  509. package/lib/form/layouts/LoginForm/style.js +71 -68
  510. package/lib/form/layouts/LoginFormPage/index.js +45 -49
  511. package/lib/form/layouts/LoginFormPage/style.js +136 -127
  512. package/lib/form/layouts/ModalForm/index.js +118 -203
  513. package/lib/form/layouts/ProForm/index.d.ts +1 -1
  514. package/lib/form/layouts/ProForm/index.js +5 -5
  515. package/lib/form/layouts/QueryFilter/Actions.js +23 -22
  516. package/lib/form/layouts/QueryFilter/index.js +177 -202
  517. package/lib/form/layouts/QueryFilter/style.js +45 -38
  518. package/lib/form/layouts/StepsForm/StepForm.d.ts +2 -3
  519. package/lib/form/layouts/StepsForm/StepForm.js +50 -72
  520. package/lib/form/layouts/StepsForm/index.js +174 -216
  521. package/lib/form/layouts/StepsForm/style.js +30 -29
  522. package/lib/form/layouts/index.js +9 -9
  523. package/lib/index.js +11 -11
  524. package/lib/layout/ProLayout.js +281 -292
  525. package/lib/layout/WrapContent.js +18 -14
  526. package/lib/layout/assert/Logo.js +96 -97
  527. package/lib/layout/components/AppsLogoComponents/AppsLogo.js +11 -12
  528. package/lib/layout/components/AppsLogoComponents/DefaultContent.js +19 -17
  529. package/lib/layout/components/AppsLogoComponents/SimpleContent.js +22 -19
  530. package/lib/layout/components/AppsLogoComponents/index.js +36 -40
  531. package/lib/layout/components/AppsLogoComponents/style/default.js +4 -3
  532. package/lib/layout/components/AppsLogoComponents/style/index.js +52 -51
  533. package/lib/layout/components/AppsLogoComponents/style/simple.js +3 -2
  534. package/lib/layout/components/CollapsedIcon/index.js +20 -17
  535. package/lib/layout/components/CollapsedIcon/style.js +40 -41
  536. package/lib/layout/components/Footer.js +23 -22
  537. package/lib/layout/components/FooterToolbar/index.js +59 -53
  538. package/lib/layout/components/FooterToolbar/style/index.js +38 -38
  539. package/lib/layout/components/FooterToolbar/style/stylish.js +11 -10
  540. package/lib/layout/components/GlobalFooter/index.js +27 -27
  541. package/lib/layout/components/GlobalFooter/style.js +31 -31
  542. package/lib/layout/components/GlobalHeader/ActionsContent.js +65 -81
  543. package/lib/layout/components/GlobalHeader/index.js +61 -49
  544. package/lib/layout/components/GlobalHeader/rightContentStyle.js +49 -50
  545. package/lib/layout/components/GlobalHeader/style.js +58 -55
  546. package/lib/layout/components/GridContent/index.js +26 -21
  547. package/lib/layout/components/GridContent/style.js +14 -14
  548. package/lib/layout/components/Header/index.js +65 -59
  549. package/lib/layout/components/Header/style/header.js +49 -48
  550. package/lib/layout/components/Header/style/stylish.js +15 -12
  551. package/lib/layout/components/Help/AsyncContentPanel.js +15 -20
  552. package/lib/layout/components/Help/HelpProvide.js +1 -1
  553. package/lib/layout/components/Help/ProHelpContentPanel.js +66 -85
  554. package/lib/layout/components/Help/ProHelpDrawer.js +27 -32
  555. package/lib/layout/components/Help/ProHelpModal.d.ts +1 -1
  556. package/lib/layout/components/Help/ProHelpModal.js +26 -28
  557. package/lib/layout/components/Help/ProHelpPanel.js +86 -94
  558. package/lib/layout/components/Help/ProHelpPopover.js +20 -18
  559. package/lib/layout/components/Help/RenderContentPanel.js +36 -26
  560. package/lib/layout/components/Help/Search.js +55 -80
  561. package/lib/layout/components/Help/index.js +19 -20
  562. package/lib/layout/components/Help/style.js +82 -76
  563. package/lib/layout/components/PageContainer/index.js +172 -151
  564. package/lib/layout/components/PageContainer/style/index.js +95 -79
  565. package/lib/layout/components/PageContainer/style/stylish.js +11 -10
  566. package/lib/layout/components/PageHeader/index.js +99 -99
  567. package/lib/layout/components/PageHeader/style/index.js +142 -123
  568. package/lib/layout/components/PageLoading/index.js +18 -20
  569. package/lib/layout/components/SettingDrawer/BlockCheckbox.js +31 -34
  570. package/lib/layout/components/SettingDrawer/LayoutChange.js +25 -23
  571. package/lib/layout/components/SettingDrawer/RegionalChange.js +16 -16
  572. package/lib/layout/components/SettingDrawer/ThemeColor.js +34 -36
  573. package/lib/layout/components/SettingDrawer/index.js +138 -168
  574. package/lib/layout/components/SettingDrawer/style/index.js +141 -138
  575. package/lib/layout/components/SiderMenu/BaseMenu.js +235 -221
  576. package/lib/layout/components/SiderMenu/SiderMenu.js +128 -117
  577. package/lib/layout/components/SiderMenu/index.js +49 -44
  578. package/lib/layout/components/SiderMenu/style/index.js +179 -162
  579. package/lib/layout/components/SiderMenu/style/menu.js +148 -111
  580. package/lib/layout/components/SiderMenu/style/stylish.js +15 -12
  581. package/lib/layout/components/TopNavHeader/index.js +73 -62
  582. package/lib/layout/components/TopNavHeader/style.js +64 -64
  583. package/lib/layout/context/RouteContext.js +1 -1
  584. package/lib/layout/defaultSettings.js +1 -1
  585. package/lib/layout/getPageTitle.js +27 -26
  586. package/lib/layout/index.js +16 -16
  587. package/lib/layout/locales/en-US.js +3 -2
  588. package/lib/layout/locales/index.js +8 -6
  589. package/lib/layout/locales/it-IT.js +3 -2
  590. package/lib/layout/locales/ko-KR.js +3 -2
  591. package/lib/layout/locales/zh-CN.js +3 -2
  592. package/lib/layout/locales/zh-TW.js +3 -2
  593. package/lib/layout/style/index.js +48 -43
  594. package/lib/layout/utils/getBreadcrumbProps.js +65 -62
  595. package/lib/layout/utils/getMenuData.js +9 -13
  596. package/lib/layout/utils/pathTools.js +2 -6
  597. package/lib/layout/utils/useCurrentMenuLayoutProps.js +6 -11
  598. package/lib/layout/utils/utils.js +16 -18
  599. package/lib/list/Item.js +155 -136
  600. package/lib/list/ListView.js +110 -119
  601. package/lib/list/constants.js +2 -2
  602. package/lib/list/index.js +72 -70
  603. package/lib/list/style/index.js +281 -214
  604. package/lib/provider/index.js +128 -118
  605. package/lib/provider/intl.js +56 -56
  606. package/lib/provider/typing/layoutToken.js +28 -25
  607. package/lib/provider/useStyle/index.js +55 -60
  608. package/lib/provider/utils/merge.js +12 -14
  609. package/lib/skeleton/components/Descriptions/index.js +213 -229
  610. package/lib/skeleton/components/List/index.js +211 -221
  611. package/lib/skeleton/components/Result/index.js +45 -47
  612. package/lib/skeleton/index.js +23 -19
  613. package/lib/table/Store/Provide.d.ts +4 -4
  614. package/lib/table/Store/Provide.js +103 -117
  615. package/lib/table/Table.d.ts +5 -2
  616. package/lib/table/Table.js +524 -689
  617. package/lib/table/TableSearch.d.ts +24 -0
  618. package/lib/table/TableSearch.js +61 -0
  619. package/lib/table/TableToolbar.d.ts +22 -0
  620. package/lib/table/TableToolbar.js +55 -0
  621. package/lib/table/components/Alert/index.js +41 -40
  622. package/lib/table/components/Alert/style.js +28 -28
  623. package/lib/table/components/ColumnSetting/index.js +228 -224
  624. package/lib/table/components/ColumnSetting/style.js +86 -72
  625. package/lib/table/components/DragSortTable/index.js +64 -78
  626. package/lib/table/components/DragSortTable/style.js +20 -20
  627. package/lib/table/components/Dropdown/index.js +42 -48
  628. package/lib/table/components/EditableTable/CellEditorTable.js +24 -32
  629. package/lib/table/components/EditableTable/RowEditorTable.js +23 -28
  630. package/lib/table/components/EditableTable/index.js +293 -327
  631. package/lib/table/components/Form/FormRender.js +99 -104
  632. package/lib/table/components/Form/index.d.ts +4 -19
  633. package/lib/table/components/Form/index.js +113 -159
  634. package/lib/table/components/ListToolBar/HeaderMenu.js +42 -51
  635. package/lib/table/components/ListToolBar/index.js +123 -148
  636. package/lib/table/components/ListToolBar/style.js +127 -118
  637. package/lib/table/components/ToolBar/DensityIcon.js +10 -9
  638. package/lib/table/components/ToolBar/FullscreenIcon.js +5 -10
  639. package/lib/table/components/ToolBar/index.d.ts +2 -8
  640. package/lib/table/components/ToolBar/index.js +154 -194
  641. package/lib/table/index.js +27 -27
  642. package/lib/table/style/index.js +144 -113
  643. package/lib/table/typing.d.ts +4 -0
  644. package/lib/table/useFetchData.js +197 -337
  645. package/lib/table/utils/cellRenderToFromItem.js +106 -120
  646. package/lib/table/utils/columnRender.js +65 -54
  647. package/lib/table/utils/columnSort.js +24 -23
  648. package/lib/table/utils/genProColumnToColumn.d.ts +13 -9
  649. package/lib/table/utils/genProColumnToColumn.js +121 -99
  650. package/lib/table/utils/index.d.ts +10 -0
  651. package/lib/table/utils/index.js +127 -181
  652. package/lib/table/utils/useDragSort.d.ts +1 -1
  653. package/lib/table/utils/useDragSort.js +99 -93
  654. package/lib/table/utils/usePageInfo.d.ts +6 -0
  655. package/lib/table/utils/usePageInfo.js +61 -0
  656. package/lib/utils/components/DropdownFooter/index.js +25 -23
  657. package/lib/utils/components/DropdownFooter/style.js +16 -16
  658. package/lib/utils/components/ErrorBoundary/index.js +28 -50
  659. package/lib/utils/components/FieldLabel/index.js +70 -71
  660. package/lib/utils/components/FieldLabel/style.js +104 -82
  661. package/lib/utils/components/FilterDropdown/index.d.ts +11 -0
  662. package/lib/utils/components/FilterDropdown/index.js +44 -33
  663. package/lib/utils/components/FilterDropdown/style.js +19 -17
  664. package/lib/utils/components/InlineErrorFormItem/index.js +80 -80
  665. package/lib/utils/components/InlineErrorFormItem/style.js +56 -50
  666. package/lib/utils/components/LabelIconTip/index.js +30 -32
  667. package/lib/utils/components/LabelIconTip/style.js +36 -36
  668. package/lib/utils/components/ProFormContext/index.js +1 -1
  669. package/lib/utils/conversionMomentValue/index.js +22 -23
  670. package/lib/utils/dateArrayFormatter/index.js +11 -15
  671. package/lib/utils/genCopyable/index.js +75 -33
  672. package/lib/utils/getFieldPropsOrFormItemProps/index.js +3 -2
  673. package/lib/utils/hooks/useDebounceFn/index.js +18 -52
  674. package/lib/utils/hooks/useDebounceValue/index.js +7 -17
  675. package/lib/utils/hooks/useDeepCompareEffect/index.js +7 -19
  676. package/lib/utils/hooks/useDocumentTitle/index.js +2 -2
  677. package/lib/utils/hooks/useFetchData/index.js +36 -65
  678. package/lib/utils/hooks/useForceRender/index.js +2 -10
  679. package/lib/utils/hooks/useLatest/index.js +4 -3
  680. package/lib/utils/hooks/usePrevious/index.js +5 -4
  681. package/lib/utils/hooks/useReactiveRef/index.js +2 -2
  682. package/lib/utils/hooks/useRefCallback/index.js +3 -3
  683. package/lib/utils/hooks/useRefFunction/index.js +6 -11
  684. package/lib/utils/index.d.ts +1 -2
  685. package/lib/utils/index.js +57 -65
  686. package/lib/utils/isBrowser/index.js +4 -3
  687. package/lib/utils/isDeepEqualReact/index.js +9 -45
  688. package/lib/utils/isDropdownValueType/index.js +4 -3
  689. package/lib/utils/isNil/index.js +2 -3
  690. package/lib/utils/isUrl/index.js +4 -3
  691. package/lib/utils/merge/index.js +12 -14
  692. package/lib/utils/nanoid/index.js +7 -7
  693. package/lib/utils/omitBoolean/index.js +3 -2
  694. package/lib/utils/omitUndefined/index.js +5 -4
  695. package/lib/utils/omitUndefinedAndEmptyArr/index.js +6 -6
  696. package/lib/utils/parseValueToMoment/index.js +5 -8
  697. package/lib/utils/pickProFormItemProps/index.js +3 -3
  698. package/lib/utils/pickProProps/index.js +6 -7
  699. package/lib/utils/proFieldParsingText/index.js +89 -99
  700. package/lib/utils/runFunction/index.js +2 -5
  701. package/lib/utils/stringify/index.js +2 -2
  702. package/lib/utils/transformKeySubmitValue/index.js +101 -117
  703. package/lib/utils/useEditableArray/index.d.ts +6 -1
  704. package/lib/utils/useEditableArray/index.js +582 -735
  705. package/lib/utils/useEditableMap/index.d.ts +1 -1
  706. package/lib/utils/useEditableMap/index.js +88 -135
  707. package/lib/utils/useMediaQuery/index.js +40 -35
  708. package/lib/utils/useMediaQuery/query.js +7 -18
  709. package/lib/version.js +1 -1
  710. package/package.json +20 -31
  711. package/es/utils/useMountMergeState/index.d.ts +0 -2
  712. package/es/utils/useMountMergeState/index.js +0 -2
  713. package/lib/utils/useMountMergeState/index.d.ts +0 -2
  714. package/lib/utils/useMountMergeState/index.js +0 -12
@@ -1,16 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.proLayoutTitleHide = void 0;
8
7
  exports.useStyle = useStyle;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
8
  var _cssinjs = require("@ant-design/cssinjs");
12
9
  var _provider = require("../../../../provider");
13
- var proLayoutTitleHide = exports.proLayoutTitleHide = new _cssinjs.Keyframes('antBadgeLoadingCircle', {
10
+ const proLayoutTitleHide = exports.proLayoutTitleHide = new _cssinjs.Keyframes('antBadgeLoadingCircle', {
14
11
  '0%': {
15
12
  display: 'none',
16
13
  opacity: 0,
@@ -24,170 +21,190 @@ var proLayoutTitleHide = exports.proLayoutTitleHide = new _cssinjs.Keyframes('an
24
21
  opacity: 1
25
22
  }
26
23
  });
27
- var genSiderMenuStyle = function genSiderMenuStyle(token) {
28
- var _token$layout, _token$layout2, _token$layout3, _token$layout4, _token$layout5, _token$layout6, _token$layout7, _token$layout8, _token$layout9, _token$layout10, _token$layout11, _token$layout12;
29
- return (0, _defineProperty2.default)({}, "".concat(token.proComponentsCls, "-layout"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-layout-sider").concat(token.componentCls), {
30
- background: ((_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.sider) === null || _token$layout === void 0 ? void 0 : _token$layout.colorMenuBackground) || 'transparent'
31
- }), token.componentCls, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
32
- position: 'relative',
33
- boxSizing: 'border-box',
34
- '&-menu': {
35
- position: 'relative',
36
- zIndex: 10,
37
- minHeight: '100%'
38
- }
39
- }, "& ".concat(token.antCls, "-layout-sider-children"), {
40
- position: 'relative',
41
- display: 'flex',
42
- flexDirection: 'column',
43
- height: '100%',
44
- paddingInline: (_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.sider) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.paddingInlineLayoutMenu,
45
- paddingBlock: (_token$layout3 = token.layout) === null || _token$layout3 === void 0 || (_token$layout3 = _token$layout3.sider) === null || _token$layout3 === void 0 ? void 0 : _token$layout3.paddingBlockLayoutMenu,
46
- borderInlineEnd: "1px solid ".concat(token.colorSplit),
47
- marginInlineEnd: -1
48
- }), "".concat(token.antCls, "-menu"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-item-group-title"), {
49
- fontSize: token.fontSizeSM,
50
- paddingBottom: 4
51
- }), "".concat(token.antCls, "-menu-item:not(").concat(token.antCls, "-menu-item-selected):hover"), {
52
- color: (_token$layout4 = token.layout) === null || _token$layout4 === void 0 || (_token$layout4 = _token$layout4.sider) === null || _token$layout4 === void 0 ? void 0 : _token$layout4.colorTextMenuItemHover
53
- })), '&-logo', {
54
- position: 'relative',
55
- display: 'flex',
56
- alignItems: 'center',
57
- justifyContent: 'space-between',
58
- paddingInline: 12,
59
- paddingBlock: 16,
60
- color: (_token$layout5 = token.layout) === null || _token$layout5 === void 0 || (_token$layout5 = _token$layout5.sider) === null || _token$layout5 === void 0 ? void 0 : _token$layout5.colorTextMenu,
61
- cursor: 'pointer',
62
- borderBlockEnd: "1px solid ".concat((_token$layout6 = token.layout) === null || _token$layout6 === void 0 || (_token$layout6 = _token$layout6.sider) === null || _token$layout6 === void 0 ? void 0 : _token$layout6.colorMenuItemDivider),
63
- '> a': {
64
- display: 'flex',
65
- alignItems: 'center',
66
- justifyContent: 'center',
67
- minHeight: 22,
68
- fontSize: 22,
69
- '> img': {
70
- display: 'inline-block',
71
- height: 22,
72
- verticalAlign: 'middle'
73
- },
74
- '> h1': {
75
- display: 'inline-block',
76
- height: 22,
77
- marginBlock: 0,
78
- marginInlineEnd: 0,
79
- marginInlineStart: 6,
80
- color: (_token$layout7 = token.layout) === null || _token$layout7 === void 0 || (_token$layout7 = _token$layout7.sider) === null || _token$layout7 === void 0 ? void 0 : _token$layout7.colorTextMenuTitle,
81
- animationName: proLayoutTitleHide,
82
- animationDuration: '.4s',
83
- animationTimingFunction: 'ease',
84
- fontWeight: 600,
85
- fontSize: 16,
86
- lineHeight: '22px',
87
- verticalAlign: 'middle'
88
- }
89
- },
90
- '&-collapsed': (0, _defineProperty2.default)({
91
- flexDirection: 'column-reverse',
92
- margin: 0,
93
- padding: 12
94
- }, "".concat(token.proComponentsCls, "-layout-apps-icon"), {
95
- marginBlockEnd: 8,
96
- fontSize: 16,
97
- transition: 'font-size 0.2s ease-in-out,color 0.2s ease-in-out'
98
- })
99
- }), '&-actions', {
100
- display: 'flex',
101
- alignItems: 'center',
102
- justifyContent: 'space-between',
103
- marginBlock: 4,
104
- marginInline: 0,
105
- color: (_token$layout8 = token.layout) === null || _token$layout8 === void 0 || (_token$layout8 = _token$layout8.sider) === null || _token$layout8 === void 0 ? void 0 : _token$layout8.colorTextMenu,
106
- '&-collapsed': {
107
- flexDirection: 'column-reverse',
108
- paddingBlock: 0,
109
- paddingInline: 8,
110
- fontSize: 16,
111
- transition: 'font-size 0.3s ease-in-out'
112
- },
113
- '&-list': {
114
- color: (_token$layout9 = token.layout) === null || _token$layout9 === void 0 || (_token$layout9 = _token$layout9.sider) === null || _token$layout9 === void 0 ? void 0 : _token$layout9.colorTextMenuSecondary,
115
- '&-collapsed': {
116
- marginBlockEnd: 8,
117
- animationName: 'none'
24
+ const genSiderMenuStyle = token => {
25
+ return {
26
+ [`${token.proComponentsCls}-layout`]: {
27
+ [`${token.antCls}-layout-sider${token.componentCls}`]: {
28
+ background: token.layout?.sider?.colorMenuBackground || 'transparent'
118
29
  },
119
- '&-item': {
120
- paddingInline: 6,
121
- paddingBlock: 6,
122
- lineHeight: '16px',
123
- fontSize: 16,
124
- cursor: 'pointer',
125
- borderRadius: token.borderRadius,
126
- '&:hover': {
127
- background: token.colorBgTextHover
30
+ [token.componentCls]: {
31
+ position: 'relative',
32
+ boxSizing: 'border-box',
33
+ '&-menu': {
34
+ position: 'relative',
35
+ zIndex: 10,
36
+ minHeight: '100%'
37
+ },
38
+ [`& ${token.antCls}-layout-sider-children`]: {
39
+ position: 'relative',
40
+ display: 'flex',
41
+ flexDirection: 'column',
42
+ height: '100%',
43
+ paddingInline: token.layout?.sider?.paddingInlineLayoutMenu,
44
+ paddingBlock: token.layout?.sider?.paddingBlockLayoutMenu,
45
+ borderInlineEnd: `1px solid ${token.colorSplit}`,
46
+ marginInlineEnd: -1
47
+ },
48
+ [`${token.antCls}-menu`]: {
49
+ [`${token.antCls}-menu-item-group-title`]: {
50
+ fontSize: token.fontSizeSM,
51
+ paddingBottom: 4
52
+ },
53
+ [`${token.antCls}-menu-item:not(${token.antCls}-menu-item-selected):hover`]: {
54
+ color: token.layout?.sider?.colorTextMenuItemHover
55
+ }
56
+ },
57
+ '&-logo': {
58
+ position: 'relative',
59
+ display: 'flex',
60
+ alignItems: 'center',
61
+ justifyContent: 'space-between',
62
+ paddingInline: 12,
63
+ paddingBlock: 16,
64
+ color: token.layout?.sider?.colorTextMenu,
65
+ cursor: 'pointer',
66
+ borderBlockEnd: `1px solid ${token.layout?.sider?.colorMenuItemDivider}`,
67
+ '> a': {
68
+ display: 'flex',
69
+ alignItems: 'center',
70
+ justifyContent: 'center',
71
+ minHeight: 22,
72
+ fontSize: 22,
73
+ '> img': {
74
+ display: 'inline-block',
75
+ height: 22,
76
+ verticalAlign: 'middle'
77
+ },
78
+ '> h1': {
79
+ display: 'inline-block',
80
+ height: 22,
81
+ marginBlock: 0,
82
+ marginInlineEnd: 0,
83
+ marginInlineStart: 6,
84
+ color: token.layout?.sider?.colorTextMenuTitle,
85
+ animationName: proLayoutTitleHide,
86
+ animationDuration: '.4s',
87
+ animationTimingFunction: 'ease',
88
+ fontWeight: 600,
89
+ fontSize: 16,
90
+ lineHeight: '22px',
91
+ verticalAlign: 'middle'
92
+ }
93
+ },
94
+ '&-collapsed': {
95
+ flexDirection: 'column-reverse',
96
+ margin: 0,
97
+ padding: 12,
98
+ [`${token.proComponentsCls}-layout-apps-icon`]: {
99
+ marginBlockEnd: 8,
100
+ fontSize: 16,
101
+ transition: 'font-size 0.2s ease-in-out,color 0.2s ease-in-out'
102
+ }
103
+ }
104
+ },
105
+ '&-actions': {
106
+ display: 'flex',
107
+ alignItems: 'center',
108
+ justifyContent: 'space-between',
109
+ marginBlock: 4,
110
+ marginInline: 0,
111
+ color: token.layout?.sider?.colorTextMenu,
112
+ '&-collapsed': {
113
+ flexDirection: 'column-reverse',
114
+ paddingBlock: 0,
115
+ paddingInline: 8,
116
+ fontSize: 16,
117
+ transition: 'font-size 0.3s ease-in-out'
118
+ },
119
+ '&-list': {
120
+ color: token.layout?.sider?.colorTextMenuSecondary,
121
+ '&-collapsed': {
122
+ marginBlockEnd: 8,
123
+ animationName: 'none'
124
+ },
125
+ '&-item': {
126
+ paddingInline: 6,
127
+ paddingBlock: 6,
128
+ lineHeight: '16px',
129
+ fontSize: 16,
130
+ cursor: 'pointer',
131
+ borderRadius: token.borderRadius,
132
+ '&:hover': {
133
+ background: token.colorBgTextHover
134
+ }
135
+ }
136
+ },
137
+ '&-avatar': {
138
+ fontSize: 14,
139
+ paddingInline: 8,
140
+ paddingBlock: 8,
141
+ display: 'flex',
142
+ alignItems: 'center',
143
+ gap: token.marginXS,
144
+ borderRadius: token.borderRadius,
145
+ '& *': {
146
+ cursor: 'pointer'
147
+ },
148
+ '&:hover': {
149
+ background: token.colorBgTextHover
150
+ }
151
+ }
152
+ },
153
+ '&-hide-menu-collapsed': {
154
+ insetInlineStart: `-${token.proLayoutCollapsedWidth - 12}px`,
155
+ position: 'absolute'
156
+ },
157
+ '&-extra': {
158
+ marginBlockEnd: 16,
159
+ marginBlock: 0,
160
+ marginInline: 16,
161
+ '&-no-logo': {
162
+ marginBlockStart: 16
163
+ }
164
+ },
165
+ '&-links': {
166
+ width: '100%',
167
+ ul: {
168
+ height: 'auto'
169
+ }
170
+ },
171
+ '&-link-menu': {
172
+ border: 'none',
173
+ boxShadow: 'none',
174
+ background: 'transparent'
175
+ },
176
+ '&-footer': {
177
+ color: token.layout?.sider?.colorTextMenuSecondary,
178
+ paddingBlockEnd: 16,
179
+ fontSize: token.fontSize,
180
+ animationName: proLayoutTitleHide,
181
+ animationDuration: '.4s',
182
+ animationTimingFunction: 'ease'
128
183
  }
129
- }
130
- },
131
- '&-avatar': {
132
- fontSize: 14,
133
- paddingInline: 8,
134
- paddingBlock: 8,
135
- display: 'flex',
136
- alignItems: 'center',
137
- gap: token.marginXS,
138
- borderRadius: token.borderRadius,
139
- '& *': {
140
- cursor: 'pointer'
141
184
  },
142
- '&:hover': {
143
- background: token.colorBgTextHover
185
+ [`${token.componentCls}${token.componentCls}-fixed`]: {
186
+ position: 'fixed',
187
+ insetBlockStart: 0,
188
+ insetInlineStart: 0,
189
+ zIndex: '100',
190
+ height: '100%',
191
+ '&-mix': {
192
+ height: `calc(100% - ${token.layout?.header?.heightLayoutHeader || 56}px)`,
193
+ insetBlockStart: `${token.layout?.header?.heightLayoutHeader || 56}px`
194
+ }
144
195
  }
145
196
  }
146
- }), '&-hide-menu-collapsed', {
147
- insetInlineStart: "-".concat(token.proLayoutCollapsedWidth - 12, "px"),
148
- position: 'absolute'
149
- }), '&-extra', {
150
- marginBlockEnd: 16,
151
- marginBlock: 0,
152
- marginInline: 16,
153
- '&-no-logo': {
154
- marginBlockStart: 16
155
- }
156
- }), '&-links', {
157
- width: '100%',
158
- ul: {
159
- height: 'auto'
160
- }
161
- }), '&-link-menu', {
162
- border: 'none',
163
- boxShadow: 'none',
164
- background: 'transparent'
165
- }), '&-footer', {
166
- color: (_token$layout10 = token.layout) === null || _token$layout10 === void 0 || (_token$layout10 = _token$layout10.sider) === null || _token$layout10 === void 0 ? void 0 : _token$layout10.colorTextMenuSecondary,
167
- paddingBlockEnd: 16,
168
- fontSize: token.fontSize,
169
- animationName: proLayoutTitleHide,
170
- animationDuration: '.4s',
171
- animationTimingFunction: 'ease'
172
- })), "".concat(token.componentCls).concat(token.componentCls, "-fixed"), {
173
- position: 'fixed',
174
- insetBlockStart: 0,
175
- insetInlineStart: 0,
176
- zIndex: '100',
177
- height: '100%',
178
- '&-mix': {
179
- height: "calc(100% - ".concat(((_token$layout11 = token.layout) === null || _token$layout11 === void 0 || (_token$layout11 = _token$layout11.header) === null || _token$layout11 === void 0 ? void 0 : _token$layout11.heightLayoutHeader) || 56, "px)"),
180
- insetBlockStart: "".concat(((_token$layout12 = token.layout) === null || _token$layout12 === void 0 || (_token$layout12 = _token$layout12.header) === null || _token$layout12 === void 0 ? void 0 : _token$layout12.heightLayoutHeader) || 56, "px")
181
- }
182
- }));
197
+ };
183
198
  };
184
- function useStyle(prefixCls, _ref2) {
185
- var proLayoutCollapsedWidth = _ref2.proLayoutCollapsedWidth;
186
- return (0, _provider.useStyle)('ProLayoutSiderMenu', function (token) {
187
- var siderMenuToken = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, token), {}, {
188
- componentCls: ".".concat(prefixCls),
189
- proLayoutCollapsedWidth: proLayoutCollapsedWidth
190
- });
199
+ function useStyle(prefixCls, {
200
+ proLayoutCollapsedWidth
201
+ }) {
202
+ return (0, _provider.useStyle)('ProLayoutSiderMenu', token => {
203
+ const siderMenuToken = {
204
+ ...token,
205
+ componentCls: `.${prefixCls}`,
206
+ proLayoutCollapsedWidth
207
+ };
191
208
  return [genSiderMenuStyle(siderMenuToken)];
192
209
  });
193
210
  }
@@ -1,124 +1,161 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.useStyle = useStyle;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _objectSpread4 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
7
  var _provider = require("../../../../provider");
11
- var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token, mode) {
12
- var _token$layout, _token$layout2;
13
- var menuToken = mode.includes('horizontal') ? (_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : _token$layout.header : (_token$layout2 = token.layout) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.sider;
14
- return (0, _objectSpread4.default)((0, _objectSpread4.default)((0, _defineProperty2.default)({}, "".concat(token.componentCls), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
15
- background: 'transparent',
16
- color: menuToken === null || menuToken === void 0 ? void 0 : menuToken.colorTextMenu,
17
- border: 'none'
18
- }, "".concat(token.componentCls, "-menu-item"), {
19
- transition: 'none !important'
20
- }), "".concat(token.componentCls, "-submenu-has-icon"), (0, _defineProperty2.default)({}, "> ".concat(token.antCls, "-menu-sub"), {
21
- paddingInlineStart: 10
22
- })), "".concat(token.antCls, "-menu-title-content"), {
23
- width: '100%',
24
- height: '100%',
25
- display: 'inline-flex'
26
- }), "".concat(token.antCls, "-menu-title-content"), {
27
- '&:first-child': {
28
- width: '100%'
8
+ const genProLayoutBaseMenuStyle = (token, mode) => {
9
+ const menuToken = mode.includes('horizontal') ? token.layout?.header : token.layout?.sider;
10
+ return {
11
+ [`${token.componentCls}`]: {
12
+ background: 'transparent',
13
+ color: menuToken?.colorTextMenu,
14
+ border: 'none',
15
+ [`${token.componentCls}-menu-item`]: {
16
+ transition: 'none !important'
17
+ },
18
+ [`${token.componentCls}-submenu-has-icon`]: {
19
+ [`> ${token.antCls}-menu-sub`]: {
20
+ paddingInlineStart: 10
21
+ }
22
+ },
23
+ [`${token.antCls}-menu-title-content`]: {
24
+ width: '100%',
25
+ height: '100%',
26
+ display: 'inline-flex',
27
+ '&:first-child': {
28
+ width: '100%'
29
+ }
30
+ },
31
+ [`${token.componentCls}-item-icon`]: {
32
+ display: 'flex',
33
+ alignItems: 'center'
34
+ },
35
+ [`&&-collapsed`]: {
36
+ [`${token.antCls}-menu-item,
37
+ ${token.antCls}-menu-item-group > ${token.antCls}-menu-item-group-list > ${token.antCls}-menu-item,
38
+ ${token.antCls}-menu-item-group > ${token.antCls}-menu-item-group-list > ${token.antCls}-menu-submenu > ${token.antCls}-menu-submenu-title,
39
+ ${token.antCls}-menu-submenu > ${token.antCls}-menu-submenu-title`]: {
40
+ paddingInline: '0 !important',
41
+ marginBlock: '4px !important'
42
+ },
43
+ [`${token.antCls}-menu-item-group > ${token.antCls}-menu-item-group-list > ${token.antCls}-menu-submenu-selected > ${token.antCls}-menu-submenu-title,
44
+ ${token.antCls}-menu-submenu-selected > ${token.antCls}-menu-submenu-title`]: {
45
+ backgroundColor: menuToken?.colorBgMenuItemSelected,
46
+ borderRadius: token.borderRadiusLG
47
+ },
48
+ [`${token.componentCls}-group`]: {
49
+ [`${token.antCls}-menu-item-group-title`]: {
50
+ paddingInline: 0
51
+ }
52
+ }
53
+ },
54
+ '&-item-title': {
55
+ display: 'flex',
56
+ flexDirection: 'row',
57
+ alignItems: 'center',
58
+ gap: token.marginXS,
59
+ width: '100%',
60
+ [`${token.componentCls}-item-text`]: {
61
+ maxWidth: '100%',
62
+ textOverflow: 'ellipsis',
63
+ overflow: 'hidden',
64
+ wordBreak: 'break-all',
65
+ whiteSpace: 'nowrap'
66
+ },
67
+ '&-collapsed': {
68
+ minWidth: 40,
69
+ height: 40,
70
+ [`${token.componentCls}-item-icon`]: {
71
+ height: '16px',
72
+ width: '16px',
73
+ lineHeight: '16px !important',
74
+ '.anticon': {
75
+ lineHeight: '16px !important',
76
+ height: '16px'
77
+ }
78
+ },
79
+ [`${token.componentCls}-item-text-has-icon`]: {
80
+ display: 'none !important'
81
+ }
82
+ },
83
+ '&-collapsed-level-0': {
84
+ flexDirection: 'column',
85
+ justifyContent: 'center'
86
+ },
87
+ [`&${token.componentCls}-group-item-title`]: {
88
+ gap: token.marginXS,
89
+ height: 18,
90
+ overflow: 'hidden'
91
+ },
92
+ [`&${token.componentCls}-item-collapsed-show-title`]: {
93
+ lineHeight: '16px',
94
+ gap: 0,
95
+ [`&${token.componentCls}-item-title-collapsed`]: {
96
+ display: 'flex',
97
+ [`${token.componentCls}-item-icon`]: {
98
+ height: '16px',
99
+ width: '16px',
100
+ lineHeight: '16px !important',
101
+ '.anticon': {
102
+ lineHeight: '16px!important',
103
+ height: '16px'
104
+ }
105
+ },
106
+ [`${token.componentCls}-item-text`]: {
107
+ opacity: '1 !important',
108
+ display: 'inline !important',
109
+ textAlign: 'center',
110
+ fontSize: 12,
111
+ height: 12,
112
+ lineHeight: '12px',
113
+ overflow: 'hidden',
114
+ textOverflow: 'ellipsis',
115
+ whiteSpace: 'nowrap',
116
+ width: '100%',
117
+ margin: 0,
118
+ padding: 0,
119
+ marginBlockStart: 4
120
+ }
121
+ }
122
+ }
123
+ },
124
+ '&-group': {
125
+ [`${token.antCls}-menu-item-group-title`]: {
126
+ fontSize: 12,
127
+ color: token.colorTextLabel,
128
+ '.anticon': {
129
+ marginInlineEnd: 8
130
+ }
131
+ }
132
+ },
133
+ '&-group-divider': {
134
+ color: token.colorTextSecondary,
135
+ fontSize: 12,
136
+ lineHeight: 20
137
+ }
138
+ },
139
+ ...(mode.includes('horizontal') ? {} : {
140
+ [`${token.antCls}-menu-submenu${token.antCls}-menu-submenu-popup`]: {
141
+ [`${token.componentCls}-item-title`]: {
142
+ alignItems: 'flex-start'
143
+ }
144
+ }
145
+ }),
146
+ [`${token.antCls}-menu-submenu-popup`]: {
147
+ backgroundColor: 'rgba(255, 255, 255, 0.42)',
148
+ '-webkit-backdrop-filter': 'blur(8px)',
149
+ backdropFilter: 'blur(8px)'
29
150
  }
30
- }), "".concat(token.componentCls, "-item-icon"), {
31
- display: 'flex',
32
- alignItems: 'center'
33
- }), "&&-collapsed", (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-item, \n ").concat(token.antCls, "-menu-item-group > ").concat(token.antCls, "-menu-item-group-list > ").concat(token.antCls, "-menu-item, \n ").concat(token.antCls, "-menu-item-group > ").concat(token.antCls, "-menu-item-group-list > ").concat(token.antCls, "-menu-submenu > ").concat(token.antCls, "-menu-submenu-title, \n ").concat(token.antCls, "-menu-submenu > ").concat(token.antCls, "-menu-submenu-title"), {
34
- paddingInline: '0 !important',
35
- marginBlock: '4px !important'
36
- }), "".concat(token.antCls, "-menu-item-group > ").concat(token.antCls, "-menu-item-group-list > ").concat(token.antCls, "-menu-submenu-selected > ").concat(token.antCls, "-menu-submenu-title, \n ").concat(token.antCls, "-menu-submenu-selected > ").concat(token.antCls, "-menu-submenu-title"), {
37
- backgroundColor: menuToken === null || menuToken === void 0 ? void 0 : menuToken.colorBgMenuItemSelected,
38
- borderRadius: token.borderRadiusLG
39
- }), "".concat(token.componentCls, "-group"), (0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-item-group-title"), {
40
- paddingInline: 0
41
- }))), '&-item-title', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
42
- display: 'flex',
43
- flexDirection: 'row',
44
- alignItems: 'center',
45
- gap: token.marginXS
46
- }, "".concat(token.componentCls, "-item-text"), {
47
- maxWidth: '100%',
48
- textOverflow: 'ellipsis',
49
- overflow: 'hidden',
50
- wordBreak: 'break-all',
51
- whiteSpace: 'nowrap'
52
- }), '&-collapsed', (0, _defineProperty2.default)((0, _defineProperty2.default)({
53
- minWidth: 40,
54
- height: 40
55
- }, "".concat(token.componentCls, "-item-icon"), {
56
- height: '16px',
57
- width: '16px',
58
- lineHeight: '16px !important',
59
- '.anticon': {
60
- lineHeight: '16px !important',
61
- height: '16px'
62
- }
63
- }), "".concat(token.componentCls, "-item-text-has-icon"), {
64
- display: 'none !important'
65
- })), '&-collapsed-level-0', {
66
- flexDirection: 'column',
67
- justifyContent: 'center'
68
- }), "&".concat(token.componentCls, "-group-item-title"), {
69
- gap: token.marginXS,
70
- height: 18,
71
- overflow: 'hidden'
72
- }), "&".concat(token.componentCls, "-item-collapsed-show-title"), (0, _defineProperty2.default)({
73
- lineHeight: '16px',
74
- gap: 0
75
- }, "&".concat(token.componentCls, "-item-title-collapsed"), (0, _defineProperty2.default)((0, _defineProperty2.default)({
76
- display: 'flex'
77
- }, "".concat(token.componentCls, "-item-icon"), {
78
- height: '16px',
79
- width: '16px',
80
- lineHeight: '16px !important',
81
- '.anticon': {
82
- lineHeight: '16px!important',
83
- height: '16px'
84
- }
85
- }), "".concat(token.componentCls, "-item-text"), {
86
- opacity: '1 !important',
87
- display: 'inline !important',
88
- textAlign: 'center',
89
- fontSize: 12,
90
- height: 12,
91
- lineHeight: '12px',
92
- overflow: 'hidden',
93
- textOverflow: 'ellipsis',
94
- whiteSpace: 'nowrap',
95
- width: '100%',
96
- margin: 0,
97
- padding: 0,
98
- marginBlockStart: 4
99
- })))), '&-group', (0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-item-group-title"), {
100
- fontSize: 12,
101
- color: token.colorTextLabel,
102
- '.anticon': {
103
- marginInlineEnd: 8
104
- }
105
- })), '&-group-divider', {
106
- color: token.colorTextSecondary,
107
- fontSize: 12,
108
- lineHeight: 20
109
- })), mode.includes('horizontal') ? {} : (0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-submenu").concat(token.antCls, "-menu-submenu-popup"), (0, _defineProperty2.default)({}, "".concat(token.componentCls, "-item-title"), {
110
- alignItems: 'flex-start'
111
- }))), {}, (0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-submenu-popup"), {
112
- backgroundColor: 'rgba(255, 255, 255, 0.42)',
113
- '-webkit-backdrop-filter': 'blur(8px)',
114
- backdropFilter: 'blur(8px)'
115
- }));
151
+ };
116
152
  };
117
153
  function useStyle(prefixCls, mode) {
118
- return (0, _provider.useStyle)('ProLayoutBaseMenu' + mode, function (token) {
119
- var proLayoutMenuToken = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, token), {}, {
120
- componentCls: ".".concat(prefixCls)
121
- });
154
+ return (0, _provider.useStyle)('ProLayoutBaseMenu' + mode, token => {
155
+ const proLayoutMenuToken = {
156
+ ...token,
157
+ componentCls: `.${prefixCls}`
158
+ };
122
159
  return [genProLayoutBaseMenuStyle(proLayoutMenuToken, mode || 'inline')];
123
160
  });
124
161
  }
@@ -1,22 +1,25 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.useStylish = useStylish;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
7
  var _provider = require("../../../../provider");
11
- function useStylish(prefixCls, _ref) {
12
- var stylish = _ref.stylish,
13
- proLayoutCollapsedWidth = _ref.proLayoutCollapsedWidth;
14
- return (0, _provider.useStyle)('ProLayoutSiderMenuStylish', function (token) {
15
- var siderMenuToken = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, token), {}, {
16
- componentCls: ".".concat(prefixCls),
17
- proLayoutCollapsedWidth: proLayoutCollapsedWidth
18
- });
8
+ function useStylish(prefixCls, {
9
+ stylish,
10
+ proLayoutCollapsedWidth
11
+ }) {
12
+ return (0, _provider.useStyle)('ProLayoutSiderMenuStylish', token => {
13
+ const siderMenuToken = {
14
+ ...token,
15
+ componentCls: `.${prefixCls}`,
16
+ proLayoutCollapsedWidth
17
+ };
19
18
  if (!stylish) return [];
20
- return [(0, _defineProperty2.default)({}, "div".concat(token.proComponentsCls, "-layout"), (0, _defineProperty2.default)({}, "".concat(siderMenuToken.componentCls), stylish === null || stylish === void 0 ? void 0 : stylish(siderMenuToken)))];
19
+ return [{
20
+ [`div${token.proComponentsCls}-layout`]: {
21
+ [`${siderMenuToken.componentCls}`]: stylish?.(siderMenuToken)
22
+ }
23
+ }];
21
24
  });
22
25
  }