@swiftcrab/crab 0.0.3 → 0.0.4

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 (380) hide show
  1. package/es/_util/ActionButton.js +1 -1
  2. package/es/_util/ContextIsolator.js +1 -1
  3. package/es/_util/PurePanel.js +1 -1
  4. package/es/_util/hooks/useZIndex.js +1 -1
  5. package/es/_util/motion.js +1 -1
  6. package/es/_util/responsiveObserver.js +1 -1
  7. package/es/_util/wave/WaveEffect.js +1 -1
  8. package/es/_util/wave/index.js +1 -1
  9. package/es/_util/wave/interface.js +1 -1
  10. package/es/_util/wave/style.js +1 -1
  11. package/es/_util/wave/useWave.js +1 -1
  12. package/es/affix/index.js +1 -1
  13. package/es/affix/style/index.js +1 -1
  14. package/es/alert/Alert.js +1 -1
  15. package/es/alert/ErrorBoundary.js +1 -1
  16. package/es/alert/index.js +1 -1
  17. package/es/alert/style/index.js +1 -1
  18. package/es/anchor/Anchor.js +1 -1
  19. package/es/anchor/AnchorLink.js +1 -1
  20. package/es/anchor/index.js +1 -1
  21. package/es/anchor/style/index.js +1 -1
  22. package/es/app/index.js +1 -1
  23. package/es/app/style/index.js +1 -1
  24. package/es/auto-complete/index.js +1 -1
  25. package/es/avatar/avatar.js +1 -1
  26. package/es/avatar/group.js +1 -1
  27. package/es/avatar/index.js +1 -1
  28. package/es/avatar/style/index.js +1 -1
  29. package/es/badge/Ribbon.js +1 -1
  30. package/es/badge/ScrollNumber.js +1 -1
  31. package/es/badge/index.js +1 -1
  32. package/es/badge/style/index.js +1 -1
  33. package/es/badge/style/ribbon.js +1 -1
  34. package/es/breadcrumb/Breadcrumb.js +1 -1
  35. package/es/breadcrumb/BreadcrumbItem.js +1 -1
  36. package/es/breadcrumb/BreadcrumbSeparator.js +1 -1
  37. package/es/breadcrumb/index.js +1 -1
  38. package/es/breadcrumb/style/index.js +1 -1
  39. package/es/button/button-group.js +1 -1
  40. package/es/button/button.js +1 -1
  41. package/es/button/index.js +1 -1
  42. package/es/button/style/compact.js +1 -1
  43. package/es/button/style/index.js +1 -1
  44. package/es/button/style/token.js +1 -1
  45. package/es/calendar/Header.js +1 -1
  46. package/es/calendar/generateCalendar.js +1 -1
  47. package/es/calendar/index.js +1 -1
  48. package/es/calendar/style/index.js +1 -1
  49. package/es/calendar-panel/index.d.ts +7 -0
  50. package/es/calendar-panel/index.js +40 -0
  51. package/es/calendar-panel/style/index.d.ts +4 -0
  52. package/es/calendar-panel/style/index.js +35 -0
  53. package/es/calendar-panel/style/style.d.ts +1 -0
  54. package/es/calendar-panel/style/style.js +639 -0
  55. package/es/calendar-panel/types.d.ts +158 -0
  56. package/es/calendar-panel/types.js +0 -0
  57. package/es/calendar-panel/utils.d.ts +39 -0
  58. package/es/calendar-panel/utils.js +1 -0
  59. package/es/card/Card.js +1 -1
  60. package/es/card/Grid.js +1 -1
  61. package/es/card/Meta.js +1 -1
  62. package/es/card/index.js +1 -1
  63. package/es/card/style/index.js +1 -1
  64. package/es/carousel/index.js +1 -1
  65. package/es/carousel/style/index.js +1 -1
  66. package/es/cascader/Panel.js +1 -1
  67. package/es/cascader/hooks/useBase.js +1 -1
  68. package/es/cascader/index.js +1 -1
  69. package/es/cascader/style/columns.js +1 -1
  70. package/es/cascader/style/index.js +1 -1
  71. package/es/cascader/style/panel.js +1 -1
  72. package/es/checkbox/Checkbox.js +1 -1
  73. package/es/checkbox/Group.js +1 -1
  74. package/es/checkbox/index.js +1 -1
  75. package/es/checkbox/style/index.js +1 -1
  76. package/es/clap-overflow/index.d.ts +19 -0
  77. package/es/clap-overflow/index.js +40 -0
  78. package/es/clap-overflow/style/index.d.ts +16 -0
  79. package/es/clap-overflow/style/index.js +35 -0
  80. package/es/col/index.js +1 -1
  81. package/es/collapse/Collapse.js +1 -1
  82. package/es/collapse/CollapsePanel.js +1 -1
  83. package/es/collapse/index.js +1 -1
  84. package/es/collapse/style/index.js +1 -1
  85. package/es/color-picker/ColorPicker.js +1 -1
  86. package/es/color-picker/ColorPickerPanel.js +1 -1
  87. package/es/color-picker/components/ColorAlphaInput.js +1 -1
  88. package/es/color-picker/components/ColorHexInput.js +1 -1
  89. package/es/color-picker/components/ColorHsbInput.js +1 -1
  90. package/es/color-picker/components/ColorInput.js +1 -1
  91. package/es/color-picker/components/ColorPresets.js +1 -1
  92. package/es/color-picker/components/ColorRgbInput.js +1 -1
  93. package/es/color-picker/components/ColorSlider.js +1 -1
  94. package/es/color-picker/components/ColorSteppers.js +1 -1
  95. package/es/color-picker/components/PanelPicker/GradientColorBar.js +1 -1
  96. package/es/color-picker/components/PanelPicker/index.js +1 -1
  97. package/es/color-picker/components/PanelPresets.js +1 -1
  98. package/es/color-picker/index.js +1 -1
  99. package/es/color-picker/style/index.js +1 -1
  100. package/es/config-provider/MotionWrapper.js +1 -1
  101. package/es/config-provider/defaultRenderEmpty.js +1 -1
  102. package/es/config-provider/hooks/useCSSVarCls.js +1 -1
  103. package/es/config-provider/hooks/useTheme.js +1 -1
  104. package/es/config-provider/index.js +1 -1
  105. package/es/config-provider/style/index.js +1 -1
  106. package/es/date-picker/PickerButton.js +1 -1
  107. package/es/date-picker/generatePicker/generateRangePicker.js +1 -1
  108. package/es/date-picker/generatePicker/generateSinglePicker.js +1 -1
  109. package/es/date-picker/generatePicker/index.js +1 -1
  110. package/es/date-picker/generatePicker/useComponents.js +1 -1
  111. package/es/date-picker/index.js +1 -1
  112. package/es/date-picker/style/index.js +1 -1
  113. package/es/date-picker/style/multiple.js +1 -1
  114. package/es/date-picker/style/token.js +1 -1
  115. package/es/date-picker/style/variants.js +1 -1
  116. package/es/descriptions/hooks/useItems.js +1 -1
  117. package/es/descriptions/index.js +1 -1
  118. package/es/descriptions/style/index.js +1 -1
  119. package/es/divider/index.js +1 -1
  120. package/es/divider/style/index.js +1 -1
  121. package/es/drawer/DrawerPanel.js +1 -1
  122. package/es/drawer/index.js +1 -1
  123. package/es/drawer/style/index.js +1 -1
  124. package/es/dropdown/dropdown-button.js +1 -1
  125. package/es/dropdown/dropdown.js +1 -1
  126. package/es/dropdown/index.js +1 -1
  127. package/es/dropdown/style/index.js +1 -1
  128. package/es/empty/empty.js +1 -1
  129. package/es/empty/index.js +1 -1
  130. package/es/empty/simple.js +1 -1
  131. package/es/empty/style/index.js +1 -1
  132. package/es/flex/index.js +1 -1
  133. package/es/flex/style/index.js +1 -1
  134. package/es/form/ErrorList.js +1 -1
  135. package/es/form/Form.js +1 -1
  136. package/es/form/FormItem/ItemHolder.js +1 -1
  137. package/es/form/FormItem/index.js +1 -1
  138. package/es/form/FormItemInput.js +1 -1
  139. package/es/form/FormItemLabel.js +1 -1
  140. package/es/form/FormList.js +1 -1
  141. package/es/form/hooks/useVariants.js +1 -1
  142. package/es/form/index.js +1 -1
  143. package/es/form/style/fallbackCmp.js +1 -1
  144. package/es/form/style/index.js +1 -1
  145. package/es/form-area/ValidateTooltip.js +102 -102
  146. package/es/form-area/index.js +102 -102
  147. package/es/form-area/renderItemMap.js +102 -102
  148. package/es/gantt/index.d.ts +4 -0
  149. package/es/gantt/index.js +101 -0
  150. package/es/gantt/style/index.d.ts +4 -0
  151. package/es/gantt/style/index.js +35 -0
  152. package/es/gantt/style/style.d.ts +1 -0
  153. package/es/gantt/style/style.js +372 -0
  154. package/es/gantt/type.d.ts +138 -0
  155. package/es/gantt/type.js +0 -0
  156. package/es/gantt/utils.d.ts +36 -0
  157. package/es/gantt/utils.js +1 -0
  158. package/es/grid/col.js +1 -1
  159. package/es/grid/hooks/useBreakpoint.js +1 -1
  160. package/es/grid/index.js +1 -1
  161. package/es/grid/row.js +1 -1
  162. package/es/grid/style/index.js +1 -1
  163. package/es/hooks/index.js +102 -102
  164. package/es/hooks/useForm.d.ts +12 -33
  165. package/es/hooks/useForm.js +102 -102
  166. package/es/hour-panel/index.d.ts +4 -0
  167. package/es/hour-panel/index.js +99 -0
  168. package/es/hour-panel/style/index.d.ts +12 -0
  169. package/es/hour-panel/style/index.js +35 -0
  170. package/es/hour-panel/style/style.d.ts +1 -0
  171. package/es/hour-panel/style/style.js +351 -0
  172. package/es/hour-panel/types.d.ts +145 -0
  173. package/es/hour-panel/types.js +1 -0
  174. package/es/hour-panel/utils.d.ts +31 -0
  175. package/es/hour-panel/utils.js +1 -0
  176. package/es/image/PreviewGroup.js +1 -1
  177. package/es/image/index.js +1 -1
  178. package/es/image/style/index.js +1 -1
  179. package/es/index.d.ts +11 -1
  180. package/es/index.js +89 -89
  181. package/es/input/Group.js +1 -1
  182. package/es/input/Input.js +1 -1
  183. package/es/input/OTP/OTPInput.js +1 -1
  184. package/es/input/OTP/index.js +1 -1
  185. package/es/input/Password.js +1 -1
  186. package/es/input/Search.js +1 -1
  187. package/es/input/TextArea.js +1 -1
  188. package/es/input/index.js +1 -1
  189. package/es/input/style/index.js +1 -1
  190. package/es/input/style/otp.js +1 -1
  191. package/es/input/style/token.js +1 -1
  192. package/es/input/style/variants.js +1 -1
  193. package/es/input-number/index.js +1 -1
  194. package/es/input-number/style/index.js +1 -1
  195. package/es/input-number/style/token.js +1 -1
  196. package/es/layout/Sider.js +1 -1
  197. package/es/layout/hooks/useHasSider.js +1 -1
  198. package/es/layout/index.js +1 -1
  199. package/es/layout/layout.js +1 -1
  200. package/es/layout/style/index.js +1 -1
  201. package/es/layout/style/sider.js +1 -1
  202. package/es/list/Item.js +1 -1
  203. package/es/list/index.js +1 -1
  204. package/es/list/style/index.js +1 -1
  205. package/es/mentions/index.js +1 -1
  206. package/es/mentions/style/index.js +1 -1
  207. package/es/menu/MenuDivider.js +1 -1
  208. package/es/menu/MenuItem.js +1 -1
  209. package/es/menu/OverrideContext.js +1 -1
  210. package/es/menu/SubMenu.js +1 -1
  211. package/es/menu/index.js +1 -1
  212. package/es/menu/menu.js +1 -1
  213. package/es/menu/style/index.js +1 -1
  214. package/es/message/PurePanel.js +1 -1
  215. package/es/message/index.js +1 -1
  216. package/es/message/style/index.js +1 -1
  217. package/es/message/useMessage.js +1 -1
  218. package/es/modal/ConfirmDialog.js +1 -1
  219. package/es/modal/Modal.js +1 -1
  220. package/es/modal/PurePanel.js +1 -1
  221. package/es/modal/components/ConfirmCancelBtn.js +1 -1
  222. package/es/modal/components/ConfirmOkBtn.js +1 -1
  223. package/es/modal/components/NormalCancelBtn.js +1 -1
  224. package/es/modal/components/NormalOkBtn.js +1 -1
  225. package/es/modal/confirm.js +1 -1
  226. package/es/modal/index.js +1 -1
  227. package/es/modal/shared.js +1 -1
  228. package/es/modal/style/confirm.js +1 -1
  229. package/es/modal/style/index.js +1 -1
  230. package/es/modal/useModal/HookModal.js +1 -1
  231. package/es/modal/useModal/index.js +1 -1
  232. package/es/notification/PurePanel.js +1 -1
  233. package/es/notification/index.js +1 -1
  234. package/es/notification/style/index.js +1 -1
  235. package/es/notification/style/pure-panel.js +1 -1
  236. package/es/notification/useNotification.js +1 -1
  237. package/es/pagination/Pagination.js +1 -1
  238. package/es/pagination/index.js +1 -1
  239. package/es/pagination/style/bordered.js +1 -1
  240. package/es/pagination/style/index.js +1 -1
  241. package/es/popconfirm/PurePanel.js +1 -1
  242. package/es/popconfirm/index.js +1 -1
  243. package/es/popconfirm/style/index.js +1 -1
  244. package/es/popover/PurePanel.js +1 -1
  245. package/es/popover/index.js +1 -1
  246. package/es/popover/style/index.js +1 -1
  247. package/es/progress/Circle.js +1 -1
  248. package/es/progress/Line.js +1 -1
  249. package/es/progress/index.js +1 -1
  250. package/es/progress/progress.js +1 -1
  251. package/es/progress/style/index.js +1 -1
  252. package/es/qr-code/QrcodeStatus.js +1 -1
  253. package/es/qr-code/index.js +1 -1
  254. package/es/qr-code/style/index.js +1 -1
  255. package/es/qrcode/index.js +1 -1
  256. package/es/qrcode/style/index.js +1 -1
  257. package/es/radio/group.js +1 -1
  258. package/es/radio/index.js +1 -1
  259. package/es/radio/radio.js +1 -1
  260. package/es/radio/radioButton.js +1 -1
  261. package/es/radio/style/index.js +1 -1
  262. package/es/rate/index.js +1 -1
  263. package/es/rate/style/index.js +1 -1
  264. package/es/result/index.js +1 -1
  265. package/es/result/style/index.js +1 -1
  266. package/es/row/index.js +1 -1
  267. package/es/search-area/index.js +102 -102
  268. package/es/segmented/index.js +1 -1
  269. package/es/segmented/style/index.js +1 -1
  270. package/es/select/index.js +1 -1
  271. package/es/select/style/index.js +1 -1
  272. package/es/select/style/multiple.js +1 -1
  273. package/es/select/style/single.js +1 -1
  274. package/es/skeleton/Avatar.js +1 -1
  275. package/es/skeleton/Button.js +1 -1
  276. package/es/skeleton/Image.js +1 -1
  277. package/es/skeleton/Input.js +1 -1
  278. package/es/skeleton/Node.js +1 -1
  279. package/es/skeleton/Skeleton.js +1 -1
  280. package/es/skeleton/index.js +1 -1
  281. package/es/skeleton/style/index.js +1 -1
  282. package/es/slider/SliderTooltip.js +1 -1
  283. package/es/slider/index.js +1 -1
  284. package/es/slider/style/index.js +1 -1
  285. package/es/space/Compact.js +1 -1
  286. package/es/space/index.js +1 -1
  287. package/es/space/style/index.js +1 -1
  288. package/es/spin/index.js +1 -1
  289. package/es/spin/style/index.js +1 -1
  290. package/es/splitter/Splitter.js +1 -1
  291. package/es/splitter/index.js +1 -1
  292. package/es/splitter/style/index.js +1 -1
  293. package/es/statistic/Countdown.js +1 -1
  294. package/es/statistic/Statistic.js +1 -1
  295. package/es/statistic/index.js +1 -1
  296. package/es/statistic/style/index.js +1 -1
  297. package/es/steps/index.js +1 -1
  298. package/es/steps/style/index.js +1 -1
  299. package/es/switch/index.js +1 -1
  300. package/es/switch/style/index.js +1 -1
  301. package/es/table/InternalTable.js +1 -1
  302. package/es/table/Table.js +1 -1
  303. package/es/table/hooks/useFilter/FilterDropdown.js +1 -1
  304. package/es/table/hooks/useFilter/FilterSearch.js +1 -1
  305. package/es/table/hooks/useFilter/index.js +1 -1
  306. package/es/table/hooks/useSelection.js +1 -1
  307. package/es/table/hooks/useSorter.js +1 -1
  308. package/es/table/index.js +1 -1
  309. package/es/table/style/index.js +1 -1
  310. package/es/tabs/hooks/useAnimateConfig.js +1 -1
  311. package/es/tabs/index.js +1 -1
  312. package/es/tabs/style/index.js +1 -1
  313. package/es/tag/CheckableTag.js +1 -1
  314. package/es/tag/index.js +1 -1
  315. package/es/tag/style/index.js +1 -1
  316. package/es/tag/style/presetCmp.js +1 -1
  317. package/es/tag/style/statusCmp.js +1 -1
  318. package/es/theme/index.js +1 -1
  319. package/es/theme/interface/components.d.ts +11 -2
  320. package/es/theme/internal.js +1 -1
  321. package/es/theme/useToken.js +1 -1
  322. package/es/theme/util/genStyleUtils.js +1 -1
  323. package/es/theme/util/useResetIconStyle.js +1 -1
  324. package/es/time-out/index.d.ts +18 -0
  325. package/es/time-out/index.js +40 -0
  326. package/es/time-out/style/index.d.ts +31 -0
  327. package/es/time-out/style/index.js +35 -0
  328. package/es/time-out/style/style.d.ts +1 -0
  329. package/es/time-out/style/style.js +104 -0
  330. package/es/time-picker/index.js +1 -1
  331. package/es/timeline/Timeline.js +1 -1
  332. package/es/timeline/TimelineItem.js +1 -1
  333. package/es/timeline/TimelineItemList.js +1 -1
  334. package/es/timeline/index.js +1 -1
  335. package/es/timeline/style/index.js +1 -1
  336. package/es/tooltip/PurePanel.js +1 -1
  337. package/es/tooltip/index.js +1 -1
  338. package/es/tooltip/style/index.js +1 -1
  339. package/es/tour/PurePanel.js +1 -1
  340. package/es/tour/index.js +1 -1
  341. package/es/tour/panelRender.js +1 -1
  342. package/es/tour/style/index.js +1 -1
  343. package/es/transfer/ListBody.js +1 -1
  344. package/es/transfer/ListItem.js +1 -1
  345. package/es/transfer/index.js +1 -1
  346. package/es/transfer/list.js +1 -1
  347. package/es/transfer/operation.js +1 -1
  348. package/es/transfer/search.js +1 -1
  349. package/es/transfer/style/index.js +1 -1
  350. package/es/tree/DirectoryTree.js +1 -1
  351. package/es/tree/Tree.js +1 -1
  352. package/es/tree/index.js +1 -1
  353. package/es/tree/style/index.js +1 -1
  354. package/es/tree-select/index.js +1 -1
  355. package/es/tree-select/style/index.js +1 -1
  356. package/es/type/index.js +89 -89
  357. package/es/typography/Base/CopyBtn.js +1 -1
  358. package/es/typography/Base/EllipsisTooltip.js +1 -1
  359. package/es/typography/Base/index.js +1 -1
  360. package/es/typography/Editable.js +1 -1
  361. package/es/typography/Link.js +1 -1
  362. package/es/typography/Paragraph.js +1 -1
  363. package/es/typography/Text.js +1 -1
  364. package/es/typography/Title.js +1 -1
  365. package/es/typography/Typography.js +1 -1
  366. package/es/typography/index.js +1 -1
  367. package/es/typography/style/index.js +1 -1
  368. package/es/upload/Dragger.js +1 -1
  369. package/es/upload/Upload.js +1 -1
  370. package/es/upload/UploadList/ListItem.js +1 -1
  371. package/es/upload/UploadList/index.js +1 -1
  372. package/es/upload/index.js +1 -1
  373. package/es/upload/style/index.js +1 -1
  374. package/es/utils/common.d.ts +41 -0
  375. package/es/utils/common.js +4 -4
  376. package/es/utils/index.js +4 -4
  377. package/es/version/index.js +1 -1
  378. package/es/watermark/index.js +1 -1
  379. package/package.json +1 -1
  380. package/umd/index.min.js +147 -147
@@ -0,0 +1,372 @@
1
+ import t from'styled-components';var o=t.div`
2
+ /* ==================== CSS 变量 ==================== */
3
+ --gantt-color-border: #f0f0f0;
4
+ --gantt-color-bg: #ffffff;
5
+ --gantt-color-fill-quaternary: #fafafa;
6
+ --gantt-color-text: rgba(0, 0, 0, 0.88);
7
+ --gantt-color-text-secondary: rgba(0, 0, 0, 0.45);
8
+ --gantt-color-primary: #1677ff;
9
+
10
+ --gantt-border-radius-lg: 8px;
11
+ --gantt-border-radius-sm: 4px;
12
+
13
+ --gantt-font-size: 14px;
14
+ --gantt-font-size-sm: 12px;
15
+ --gantt-line-height: 1.5714285714285714;
16
+
17
+ --gantt-padding-xxs: 4px;
18
+ --gantt-padding-xs: 8px;
19
+ --gantt-padding-sm: 12px;
20
+
21
+ --gantt-motion-duration-mid: 0.2s;
22
+
23
+ .gantt {
24
+ display: flex;
25
+ flex-direction: column;
26
+ width: fit-content;
27
+ max-width: 100%;
28
+ border: 1px solid var(--gantt-color-border);
29
+ border-radius: var(--gantt-border-radius-lg);
30
+ overflow: hidden;
31
+ background-color: var(--gantt-color-bg);
32
+ font-size: var(--gantt-font-size);
33
+ box-sizing: border-box;
34
+ }
35
+
36
+ .gantt *,
37
+ .gantt *::before,
38
+ .gantt *::after {
39
+ box-sizing: border-box;
40
+ }
41
+
42
+ /* ==================== 顶部工具栏 ==================== */
43
+ .gantt-toolbar {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: flex-end;
47
+ padding: var(--gantt-padding-xs) var(--gantt-padding-sm);
48
+ border-bottom: 1px solid var(--gantt-color-border);
49
+ background-color: var(--gantt-color-bg);
50
+ }
51
+
52
+ /* ==================== 主内容区域 ==================== */
53
+ .gantt-content {
54
+ display: flex;
55
+ width: 100%;
56
+ overflow: hidden;
57
+ }
58
+
59
+ /* ==================== 左侧固定面板 ==================== */
60
+ .gantt-left {
61
+ flex-shrink: 0;
62
+ border-right: 1px solid var(--gantt-color-border);
63
+ display: flex;
64
+ flex-direction: column;
65
+ z-index: 2;
66
+ background-color: var(--gantt-color-bg);
67
+ }
68
+
69
+ .gantt-left-header {
70
+ display: flex;
71
+ align-items: flex-end;
72
+ border-bottom: 1px solid var(--gantt-color-border);
73
+ min-height: 65px;
74
+ padding: var(--gantt-padding-xs) 0;
75
+ }
76
+
77
+ .gantt-left-header-cell {
78
+ padding: 0 var(--gantt-padding-sm);
79
+ color: var(--gantt-color-text-secondary);
80
+ font-weight: 500;
81
+ font-size: var(--gantt-font-size);
82
+ white-space: nowrap;
83
+ }
84
+
85
+ .gantt-left-header-cell.is-group {
86
+ width: 100px;
87
+ text-align: left;
88
+ }
89
+
90
+ .gantt-left-header-cell.is-name {
91
+ flex: 1;
92
+ width: 200px;
93
+ text-align: left;
94
+ }
95
+
96
+ /* 合并列:竖向分隔线与下方单元格保持贯通(负外边距抵消表头上下内边距) */
97
+ .gantt-left-header-cell.is-merged {
98
+ align-self: stretch;
99
+ display: flex;
100
+ align-items: flex-end;
101
+ margin: calc(-1 * var(--gantt-padding-xs)) 0;
102
+ padding-bottom: var(--gantt-padding-xs);
103
+ border-right: 1px solid var(--gantt-color-border);
104
+ }
105
+
106
+ .gantt-left-body {
107
+ flex: 1;
108
+ overflow: hidden;
109
+ }
110
+
111
+ /* ==================== 左侧行 ==================== */
112
+ .gantt-row {
113
+ display: flex;
114
+ align-items: center;
115
+ border-bottom: 1px solid var(--gantt-color-border);
116
+ transition: background-color var(--gantt-motion-duration-mid);
117
+ }
118
+
119
+ .gantt-row:last-child {
120
+ border-bottom: none;
121
+ }
122
+
123
+ .gantt-row.is-clickable {
124
+ cursor: pointer;
125
+ }
126
+
127
+ .gantt-row.is-clickable:hover {
128
+ background-color: var(--gantt-color-fill-quaternary);
129
+ }
130
+
131
+ /* 存在合并列时,分隔线由单元格绘制,合并列可单独隐藏组内分隔线 */
132
+ .gantt-row.is-cell-border {
133
+ align-items: stretch;
134
+ border-bottom: none;
135
+ }
136
+
137
+ .gantt-row.is-cell-border .gantt-row-cell {
138
+ border-bottom: 1px solid var(--gantt-color-border);
139
+ }
140
+
141
+ .gantt-row.is-cell-border .gantt-row-cell-merged.is-merged-inner {
142
+ border-bottom: none;
143
+ }
144
+
145
+ .gantt-row.is-cell-border.is-last-row .gantt-row-cell {
146
+ border-bottom: none;
147
+ }
148
+
149
+ /* 左侧底部占位(高度等于右侧横向滚动条),仅用于让合并列竖线走到底 */
150
+ .gantt-row-filler {
151
+ display: flex;
152
+ align-items: stretch;
153
+ }
154
+
155
+ .gantt-row-group {
156
+ width: 100px;
157
+ padding: 0 var(--gantt-padding-sm);
158
+ color: var(--gantt-color-text);
159
+ font-weight: 500;
160
+ text-align: left;
161
+ flex-shrink: 0;
162
+ }
163
+
164
+ .gantt-row-name {
165
+ flex: 1;
166
+ width: 200px;
167
+ padding: 0 var(--gantt-padding-sm);
168
+ color: var(--gantt-color-text);
169
+ overflow: hidden;
170
+ text-overflow: ellipsis;
171
+ white-space: nowrap;
172
+ }
173
+
174
+ /* ==================== 动态列通用单元格 ==================== */
175
+ .gantt-row-cell {
176
+ padding: 0 var(--gantt-padding-sm);
177
+ color: var(--gantt-color-text);
178
+ overflow: hidden;
179
+ text-overflow: ellipsis;
180
+ white-space: nowrap;
181
+ flex-shrink: 0;
182
+ }
183
+
184
+ .gantt-row-cell a {
185
+ color: var(--gantt-color-primary);
186
+ text-decoration: none;
187
+ }
188
+
189
+ .gantt-row-cell a:hover {
190
+ text-decoration: underline;
191
+ }
192
+
193
+ /* ==================== 合并行单元格 ==================== */
194
+ .gantt-row-cell-merged {
195
+ position: relative;
196
+ overflow: visible;
197
+ /* 合并列与相邻列之间的竖向分隔线 */
198
+ border-right: 1px solid var(--gantt-color-border);
199
+ }
200
+
201
+ /* 合并行内容:纵向跨越整个分组高度并水平垂直居中 */
202
+ .gantt-row-cell-merged-content {
203
+ position: absolute;
204
+ top: 0;
205
+ left: 0;
206
+ right: 0;
207
+ display: flex;
208
+ align-items: center;
209
+ justify-content: center;
210
+ padding: 0 var(--gantt-padding-sm);
211
+ text-align: center;
212
+ line-height: var(--gantt-line-height);
213
+ overflow: hidden;
214
+ pointer-events: none;
215
+ }
216
+
217
+ /* ==================== 右侧时间轴面板 ==================== */
218
+ .gantt-right {
219
+ flex: 0 1 auto;
220
+ overflow: auto;
221
+ position: relative;
222
+ min-width: 0;
223
+ }
224
+
225
+ .gantt-timeline {
226
+ position: relative;
227
+ }
228
+
229
+ /* ==================== 时间轴表头 ==================== */
230
+ .gantt-timeline-header {
231
+ position: sticky;
232
+ top: 0;
233
+ z-index: 1;
234
+ background-color: var(--gantt-color-bg);
235
+ border-bottom: 1px solid var(--gantt-color-border);
236
+ }
237
+
238
+ .gantt-month-row {
239
+ display: flex;
240
+ }
241
+
242
+ .gantt-month-cell {
243
+ display: flex;
244
+ align-items: center;
245
+ justify-content: center;
246
+ height: 28px;
247
+ color: var(--gantt-color-text);
248
+ font-weight: 500;
249
+ font-size: var(--gantt-font-size-sm);
250
+ border-right: 1px solid var(--gantt-color-border);
251
+ background-color: var(--gantt-color-fill-quaternary);
252
+ flex-shrink: 0;
253
+ }
254
+
255
+ .gantt-month-cell:last-child {
256
+ border-right: none;
257
+ }
258
+
259
+ .gantt-date-row {
260
+ display: flex;
261
+ }
262
+
263
+ .gantt-date-cell {
264
+ display: flex;
265
+ flex-direction: column;
266
+ align-items: center;
267
+ justify-content: center;
268
+ height: 36px;
269
+ color: var(--gantt-color-text-secondary);
270
+ font-size: var(--gantt-font-size-sm);
271
+ flex-shrink: 0;
272
+ border-right: 1px solid var(--gantt-color-border);
273
+ }
274
+
275
+ .gantt-date-cell:last-child {
276
+ border-right: none;
277
+ }
278
+
279
+ .gantt-date-cell.is-today {
280
+ font-weight: 600;
281
+ }
282
+
283
+ .gantt-date-cell.is-weekend {
284
+ background-color: var(--gantt-color-fill-quaternary);
285
+ }
286
+
287
+ .gantt-date-day {
288
+ line-height: 1.2;
289
+ }
290
+
291
+ .gantt-date-week {
292
+ line-height: 1.2;
293
+ font-size: 11px;
294
+ }
295
+
296
+ /* ==================== 时间轴主体 ==================== */
297
+ .gantt-timeline-body {
298
+ position: relative;
299
+ }
300
+
301
+ .gantt-timeline-row {
302
+ display: flex;
303
+ align-items: center;
304
+ position: relative;
305
+ border-bottom: 1px solid var(--gantt-color-border);
306
+ }
307
+
308
+ .gantt-timeline-row:last-child {
309
+ border-bottom: none;
310
+ }
311
+
312
+ .gantt-timeline-cell {
313
+ flex-shrink: 0;
314
+ height: 100%;
315
+ border-right: 1px solid var(--gantt-color-border);
316
+ }
317
+
318
+ .gantt-timeline-cell:nth-last-child(2) {
319
+ border-right: none;
320
+ }
321
+
322
+ .gantt-timeline-cell.is-weekend {
323
+ background-color: var(--gantt-color-fill-quaternary);
324
+ }
325
+
326
+ .gantt-bars-container {
327
+ position: absolute;
328
+ top: 0;
329
+ left: 0;
330
+ right: 0;
331
+ bottom: 0;
332
+ display: flex;
333
+ align-items: center;
334
+ pointer-events: none;
335
+ }
336
+
337
+ .gantt-bar {
338
+ position: absolute;
339
+ height: 20px;
340
+ border-radius: var(--gantt-border-radius-sm);
341
+ display: flex;
342
+ align-items: center;
343
+ justify-content: center;
344
+ font-size: 11px;
345
+ color: var(--gantt-color-text);
346
+ font-weight: 400;
347
+ overflow: hidden;
348
+ text-overflow: ellipsis;
349
+ white-space: nowrap;
350
+ padding: 0 var(--gantt-padding-xxs);
351
+ pointer-events: auto;
352
+ transition: opacity var(--gantt-motion-duration-mid);
353
+ }
354
+
355
+ .gantt-bar.is-clickable {
356
+ cursor: pointer;
357
+ }
358
+
359
+ .gantt-bar.is-clickable:hover {
360
+ opacity: 0.8;
361
+ }
362
+
363
+ /* ==================== 今日线 ==================== */
364
+ .gantt-today-line {
365
+ position: absolute;
366
+ top: 0;
367
+ bottom: 0;
368
+ width: 1px;
369
+ z-index: 1;
370
+ pointer-events: none;
371
+ }
372
+ `;export{o as GanttWrapper};
@@ -0,0 +1,138 @@
1
+ import type { ReactNode } from 'react';
2
+ import { RangePickerProps } from '../date-picker';
3
+ /** 甘特图任务条(阶段条) */
4
+ export interface IGanttBar {
5
+ /** 开始日期,格式 YYYY-MM-DD */
6
+ startDate: string;
7
+ /** 结束日期,格式 YYYY-MM-DD */
8
+ endDate: string;
9
+ /** 阶段名称/标签 */
10
+ name?: ReactNode;
11
+ /** 条颜色 */
12
+ color?: string;
13
+ }
14
+ /** 甘特图任务行 */
15
+ export interface IGanttTask {
16
+ /** 唯一标识 */
17
+ id?: string;
18
+ /** 任务名称 */
19
+ name: ReactNode;
20
+ /** 任务条数组(一个任务可能有多个阶段条) */
21
+ bars: IGanttBar[];
22
+ /** 自定义附加数据 */
23
+ meta?: Record<string, any>;
24
+ }
25
+ /** 甘特图分组 */
26
+ export interface IGanttGroup {
27
+ /** 分组唯一标识 */
28
+ id?: string;
29
+ /** 分组名称(负责人) */
30
+ name: ReactNode;
31
+ /** 分组下的任务列表 */
32
+ tasks: IGanttTask[];
33
+ }
34
+ /** 点击行回调参数 */
35
+ export interface IGanttRowClickInfo {
36
+ /** 当前行所属分组信息 */
37
+ group: IGanttGroup;
38
+ /** 当前行任务信息 */
39
+ task: IGanttTask;
40
+ /** 任务在分组中的索引 */
41
+ taskIndex: number;
42
+ }
43
+ /** 点击任务条回调参数 */
44
+ export interface IGanttBarClickInfo {
45
+ /** 当前行所属分组信息 */
46
+ group: IGanttGroup;
47
+ /** 当前行任务信息 */
48
+ task: IGanttTask;
49
+ /** 当前点击的条信息 */
50
+ bar: IGanttBar;
51
+ /** 条在任务中的索引 */
52
+ barIndex: number;
53
+ }
54
+ /** 日期列信息 */
55
+ export interface IGanttDateColumn {
56
+ /** 日期字符串 YYYY-MM-DD */
57
+ date: string;
58
+ /** 日 */
59
+ day: number;
60
+ /** 星期几(一, 二, 三...) */
61
+ weekDay: string;
62
+ /** 是否为今日线标记的日期 */
63
+ isToday: boolean;
64
+ /** 是否周末 */
65
+ isWeekend: boolean;
66
+ }
67
+ /** 月份分组信息 */
68
+ export interface IGanttMonthGroup {
69
+ /** 月份文本,如 '7月' */
70
+ label: string;
71
+ /** 该月份包含的天数 */
72
+ days: number;
73
+ }
74
+ /** 甘特图左侧列配置 */
75
+ export interface IGanttColumn {
76
+ /** 列唯一标识 */
77
+ key: string;
78
+ /** 列标题 */
79
+ title: ReactNode;
80
+ /** 列宽度,可为数字(px)或字符串,默认 auto */
81
+ width?: number | string;
82
+ /** 内容对齐方式,默认 left */
83
+ align?: 'left' | 'center' | 'right';
84
+ /** 自定义渲染单元格内容 */
85
+ render: (task: IGanttTask, group: IGanttGroup, info: {
86
+ taskIndex: number;
87
+ isGroupFirst: boolean;
88
+ }) => ReactNode;
89
+ /** 控制该列是否可见,默认 true */
90
+ visible?: boolean;
91
+ /** 是否合并行:同一分组内该列的多行合并为一个单元格,仅在分组首行调用 render,默认 false */
92
+ rowMerge?: boolean;
93
+ /** 合并行的内容是否在水平和垂直方向都居中,默认 false(内容展示在分组第一行的位置),仅 rowMerge 为 true 时生效 */
94
+ textCenter?: boolean;
95
+ }
96
+ /** 甘特图预设颜色主题 */
97
+ export type GanttBarColorPreset = 'blue' | 'green' | 'orange' | 'red' | 'yellow' | 'purple' | 'gray' | 'lightBlue';
98
+ /** 甘特图组件 Props */
99
+ export interface IGanttProps {
100
+ /** 甘特图分组数据 */
101
+ dataSource: IGanttGroup[];
102
+ /** 左侧列配置,传入时 showGroup/showLinks/renderLinks 将被忽略 */
103
+ columns?: IGanttColumn[];
104
+ /** 是否显示日期范围选择器,默认 false */
105
+ showDateRangePicker?: boolean;
106
+ /** 日期范围选择器的属性 */
107
+ dateRangePickerProps?: RangePickerProps;
108
+ /** 时间范围-开始日期,格式 YYYY-MM-DD,同时作为日期范围选择器的默认起始值 */
109
+ startDate?: string;
110
+ /** 时间范围-结束日期,格式 YYYY-MM-DD,同时作为日期范围选择器的默认结束值 */
111
+ endDate?: string;
112
+ /** 每列(天)的宽度,默认 36 */
113
+ columnWidth?: number;
114
+ /** 行高,默认 40 */
115
+ rowHeight?: number;
116
+ /** 是否高亮今天(今日线与日期表头高亮),默认 true */
117
+ highlightToday?: boolean;
118
+ /** 今日线标记的日期,格式 YYYY-MM-DD,默认为当前日期 */
119
+ todayDate?: string;
120
+ /** 今日线颜色,默认 #ff4d4f */
121
+ todayLineColor?: string;
122
+ /** 分组列标题,默认 '负责人' */
123
+ groupTitle?: string;
124
+ /** 任务列标题,默认 '任务名' */
125
+ taskTitle?: string;
126
+ /** 自定义类名 */
127
+ className?: string;
128
+ /** 自定义样式 */
129
+ style?: React.CSSProperties;
130
+ /** 日期范围变更回调 */
131
+ onDateRangeChange?: (startDate: string, endDate: string) => void;
132
+ /** 点击行时触发 */
133
+ onRowClick?: (info: IGanttRowClickInfo) => void;
134
+ /** 点击任务条时触发 */
135
+ onBarClick?: (info: IGanttBarClickInfo) => void;
136
+ /** 自定义渲染任务条 */
137
+ renderBar?: (bar: IGanttBar, task: IGanttTask) => ReactNode;
138
+ }
File without changes
@@ -0,0 +1,36 @@
1
+ import type { IGanttGroup, IGanttDateColumn, IGanttMonthGroup, IGanttBar } from './type';
2
+ /**
3
+ * 归一化今日线日期,非法或未传入时回退到当前日期
4
+ */
5
+ export declare function resolveTodayDate(todayDate?: string): string;
6
+ /**
7
+ * 生成日期列数组
8
+ */
9
+ export declare function buildDateColumns(startDate: string, endDate: string, todayDate?: string): IGanttDateColumn[];
10
+ /**
11
+ * 生成月份分组(用于表头上方的月份标记)
12
+ */
13
+ export declare function buildMonthGroups(columns: IGanttDateColumn[]): IGanttMonthGroup[];
14
+ /**
15
+ * 根据数据自动计算时间范围
16
+ */
17
+ export declare function autoDateRange(data: IGanttGroup[]): [string, string];
18
+ /**
19
+ * 计算任务条在时间轴上的位置和宽度
20
+ */
21
+ export declare function calcBarPosition(bar: IGanttBar, startDate: string, columnWidth: number): {
22
+ left: number;
23
+ width: number;
24
+ } | null;
25
+ /**
26
+ * 计算今日线的位置
27
+ */
28
+ export declare function calcTodayPosition(startDate: string, endDate: string, columnWidth: number, todayDate?: string): number | null;
29
+ /**
30
+ * 预设颜色映射
31
+ */
32
+ export declare const COLOR_PRESETS: Record<string, string>;
33
+ /**
34
+ * 获取条的实际颜色值
35
+ */
36
+ export declare function resolveBarColor(color?: string): string;
@@ -0,0 +1 @@
1
+ import n from'dayjs';var y={0:"\u65E5",1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D"};function c(t){let e=t?n(t):n();return (e.isValid()?e:n()).format("YYYY-MM-DD")}function p(t,e,a){let i=n(t),o=n(e),d=[],s=c(a),r=i;for(;r.isBefore(o)||r.isSame(o,"day");){let u=r.format("YYYY-MM-DD"),f=r.day();d.push({date:u,day:r.date(),weekDay:y[f],isToday:u===s,isWeekend:f===0||f===6}),r=r.add(1,"day");}return d}function g(t){if(t.length===0)return [];let e=[],a=n(t[0].date).year(),i=n(t[0].date).month(),o=0;for(let d of t){let s=n(d.date),r=s.year(),u=s.month();u!==i||r!==a?(e.push({label:`${a}\u5E74${i+1}\u6708`,days:o}),a=r,i=u,o=1):o++;}return e.push({label:`${a}\u5E74${i+1}\u6708`,days:o}),e}function m(t){let e=n().subtract(3,"day"),a=n().add(30,"day");for(let i of t)for(let o of i.tasks)for(let d of o.bars){let s=n(d.startDate),r=n(d.endDate);s.isValid()&&s.isBefore(e)&&(e=s),r.isValid()&&r.isAfter(a)&&(a=r);}return [e.subtract(3,"day").format("YYYY-MM-DD"),a.add(3,"day").format("YYYY-MM-DD")]}function Y(t,e,a){let i=n(e),o=n(t.startDate),d=n(t.endDate);if(!o.isValid()||!d.isValid())return null;let s=o.diff(i,"day"),r=d.diff(o,"day")+1;return {left:s*a,width:r*a}}function b(t,e,a,i){let o=n(t),d=n(e),s=n(c(i)).startOf("day");return s.isBefore(o,"day")||s.isAfter(d,"day")?null:s.diff(o,"day")*a+a/2}var l={blue:"#8BBFFF",green:"#95DE64",orange:"#FFB347",red:"#FF7875",yellow:"#FFE58F",purple:"#B37FEB",gray:"#D9D9D9",lightBlue:"#BAE7FF"};function G(t){return t?l[t]||t:l.blue}export{l as COLOR_PRESETS,m as autoDateRange,p as buildDateColumns,g as buildMonthGroups,Y as calcBarPosition,b as calcTodayPosition,G as resolveBarColor,c as resolveTodayDate};
package/es/grid/col.js CHANGED
@@ -5,7 +5,7 @@ import*as g from'react';import g__default,{createContext,useContext}from'react';
5
5
  ${Object.keys(r).map(i=>`--${e}-${i}: ${r[i]};`).join(`
6
6
  `)}
7
7
  }
8
- `.trim()}function so(e,o){let r=Zt(e,o);Qt()?updateCSS(r,`${Jt}-dynamic-theme`):_();}var Ie=g.createContext(false),co=({children:e,disabled:o})=>{let r=g.useContext(Ie);return g.createElement(Ie.Provider,{value:o??r},e)},po=Ie;var ze=g.createContext(void 0),mo=({children:e,size:o})=>{let r=g.useContext(ze);return g.createElement(ze.Provider,{value:o||r},e)},Y=ze;function er(){let e=useContext(po),o=useContext(Y);return {componentDisabled:e,componentSize:o}}var go=er;var uo={version:"0.0.2"};var yo=uo.version;function De(e){return e>=0&&e<=255}function tr(e,o){let{r,g:n,b:t,a:l}=new TinyColor(e).toRgb();if(l<1)return e;let{r:i,g:s,b:p}=new TinyColor(o).toRgb();for(let a=.01;a<=1;a+=.01){let c=Math.round((r-i*(1-a))/a),f=Math.round((n-s*(1-a))/a),d=Math.round((t-p*(1-a))/a);if(De(c)&&De(f)&&De(d))return new TinyColor({r:c,g:f,b:d,a:Math.round(a*100)/100}).toRgbString()}return new TinyColor({r,g:n,b:t,a:1}).toRgbString()}var J=tr;function me(e){let{override:o,...r}=e,n={...o};Object.keys(M).forEach(d=>{delete n[d];});let t={...r,...n},l=480,i=576,s=768,p=992,a=1200,c=1600;return t.motion===false&&(t.motionDurationFast="0s",t.motionDurationMid="0s",t.motionDurationSlow="0s"),{...t,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:J(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:J(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:J(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidthFocus:t.lineWidth*3,lineWidth:t.lineWidth,controlOutlineWidth:t.lineWidth*2,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:J(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
8
+ `.trim()}function so(e,o){let r=Zt(e,o);Qt()?updateCSS(r,`${Jt}-dynamic-theme`):_();}var Ie=g.createContext(false),co=({children:e,disabled:o})=>{let r=g.useContext(Ie);return g.createElement(Ie.Provider,{value:o??r},e)},po=Ie;var ze=g.createContext(void 0),mo=({children:e,size:o})=>{let r=g.useContext(ze);return g.createElement(ze.Provider,{value:o||r},e)},Y=ze;function er(){let e=useContext(po),o=useContext(Y);return {componentDisabled:e,componentSize:o}}var go=er;var uo={version:"0.0.3"};var yo=uo.version;function De(e){return e>=0&&e<=255}function tr(e,o){let{r,g:n,b:t,a:l}=new TinyColor(e).toRgb();if(l<1)return e;let{r:i,g:s,b:p}=new TinyColor(o).toRgb();for(let a=.01;a<=1;a+=.01){let c=Math.round((r-i*(1-a))/a),f=Math.round((n-s*(1-a))/a),d=Math.round((t-p*(1-a))/a);if(De(c)&&De(f)&&De(d))return new TinyColor({r:c,g:f,b:d,a:Math.round(a*100)/100}).toRgbString()}return new TinyColor({r,g:n,b:t,a:1}).toRgbString()}var J=tr;function me(e){let{override:o,...r}=e,n={...o};Object.keys(M).forEach(d=>{delete n[d];});let t={...r,...n},l=480,i=576,s=768,p=992,a=1200,c=1600;return t.motion===false&&(t.motionDurationFast="0s",t.motionDurationMid="0s",t.motionDurationSlow="0s"),{...t,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:J(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:J(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:J(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidthFocus:t.lineWidth*3,lineWidth:t.lineWidth,controlOutlineWidth:t.lineWidth*2,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:J(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
9
9
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
10
10
  0 3px 6px -4px rgba(0, 0, 0, 0.12),
11
11
  0 9px 28px 8px rgba(0, 0, 0, 0.05)
@@ -1,4 +1,4 @@
1
- import*as $ from'react';import $__default,{useContext,useRef}from'react';import Re from'rc-util/lib/hooks/useLayoutEffect';import {createTheme,useCacheToken}from'@ant-design/cssinjs';import {genStyleUtils}from'@ant-design/cssinjs-utils';import {presetPrimaryColors,presetPalettes,generate}from'@ant-design/colors';import {TinyColor}from'@ctrl/tinycolor';function P(){let[,e]=$.useReducer(r=>r+1,0);return e}function W(e){return (e+8)/e}function M(e){let r=new Array(10).fill(null).map((t,n)=>{let o=n-1,a=e*Math.E**(o/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return r[1]=e,r.map(t=>({size:t,lineHeight:W(t)}))}var N={version:"0.0.2"};var U=N.version;var v={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},pe={...v,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
1
+ import*as $ from'react';import $__default,{useContext,useRef}from'react';import Re from'rc-util/lib/hooks/useLayoutEffect';import {createTheme,useCacheToken}from'@ant-design/cssinjs';import {genStyleUtils}from'@ant-design/cssinjs-utils';import {presetPrimaryColors,presetPalettes,generate}from'@ant-design/colors';import {TinyColor}from'@ctrl/tinycolor';function P(){let[,e]=$.useReducer(r=>r+1,0);return e}function W(e){return (e+8)/e}function M(e){let r=new Array(10).fill(null).map((t,n)=>{let o=n-1,a=e*Math.E**(o/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return r[1]=e,r.map(t=>({size:t,lineHeight:W(t)}))}var N={version:"0.0.3"};var U=N.version;var v={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},pe={...v,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
2
2
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
3
3
  'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:false,motion:true},C=pe;function H(e,{generateColorPalettes:r,generateNeutralColorPalettes:t}){let{colorSuccess:n,colorWarning:o,colorError:a,colorInfo:i,colorPrimary:s,colorBgBase:p,colorTextBase:c}=e,l=r(s),m=r(n),g=r(o),f=r(a),u=r(i),ae=t(p,c),se=e.colorLink||e.colorInfo,h=r(se),le=new TinyColor(f[1]).mix(new TinyColor(f[3]),50).toHexString();return {...ae,colorPrimaryBg:l[1],colorPrimaryBgHover:l[2],colorPrimaryBorder:l[3],colorPrimaryBorderHover:l[4],colorPrimaryHover:l[5],colorPrimary:l[6],colorPrimaryActive:l[7],colorPrimaryTextHover:l[8],colorPrimaryText:l[9],colorPrimaryTextActive:l[10],colorSuccessBg:m[1],colorSuccessBgHover:m[2],colorSuccessBorder:m[3],colorSuccessBorderHover:m[4],colorSuccessHover:m[4],colorSuccess:m[6],colorSuccessActive:m[7],colorSuccessTextHover:m[8],colorSuccessText:m[9],colorSuccessTextActive:m[10],colorErrorBg:f[1],colorErrorBgHover:f[2],colorErrorBgFilledHover:le,colorErrorBgActive:f[3],colorErrorBorder:f[3],colorErrorBorderHover:f[4],colorErrorHover:f[5],colorError:f[6],colorErrorActive:f[7],colorErrorTextHover:f[8],colorErrorText:f[9],colorErrorTextActive:f[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:u[1],colorInfoBgHover:u[2],colorInfoBorder:u[3],colorInfoBorderHover:u[4],colorInfoHover:u[4],colorInfo:u[6],colorInfoActive:u[7],colorInfoTextHover:u[8],colorInfoText:u[9],colorInfoTextActive:u[10],colorLinkHover:h[4],colorLink:h[6],colorLinkActive:h[7],colorBgMask:new TinyColor("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}var me=e=>{let r=e,t=e,n=e,o=e;return e<6&&e>=5?r=e+1:e<16&&e>=6?r=e+2:e>=16&&(r=16),e<7&&e>=5?t=4:e<8&&e>=7?t=5:e<14&&e>=8?t=6:e<16&&e>=14?t=7:e>=16&&(t=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:t,borderRadiusLG:r,borderRadiusOuter:o}},V=me;function z(e){let{motionUnit:r,motionBase:t,borderRadius:n,lineWidth:o}=e;return {motionDurationFast:`${(t+r).toFixed(1)}s`,motionDurationMid:`${(t+r*2).toFixed(1)}s`,motionDurationSlow:`${(t+r*3).toFixed(1)}s`,lineWidthBold:o+1,...V(n)}}var ge=e=>{let{controlHeight:r}=e;return {controlHeightSM:r*.75,controlHeightXS:r*.5,controlHeightLG:r*1.25}},Q=ge;var fe=e=>{let r=M(e),t=r.map(l=>l.size),n=r.map(l=>l.lineHeight),o=t[1],a=t[0],i=t[2],s=n[1],p=n[0],c=n[2];return {fontSizeSM:a,fontSize:o,fontSizeLG:i,fontSizeXL:t[3],fontSizeHeading1:t[6],fontSizeHeading2:t[5],fontSizeHeading3:t[4],fontSizeHeading4:t[3],fontSizeHeading5:t[2],lineHeight:s,lineHeightLG:c,lineHeightSM:p,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*i),fontHeightSM:Math.round(p*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},q=fe;function A(e){let{sizeUnit:r,sizeStep:t}=e;return {sizeXXL:r*(t+8),sizeXL:r*(t+4),sizeLG:r*(t+2),sizeMD:r*(t+1),sizeMS:r*t,size:r*t,sizeSM:r*(t-1),sizeXS:r*(t-2),sizeXXS:r*(t-3)}}var d=(e,r)=>new TinyColor(e).setAlpha(r).toRgbString(),S=(e,r)=>new TinyColor(e).darken(r).toHexString();var K=e=>{let r=generate(e);return {1:r[0],2:r[1],3:r[2],4:r[3],5:r[4],6:r[5],7:r[6],8:r[4],9:r[5],10:r[6]}},J=(e,r)=>{let t=e||"#fff",n=r||"#000";return {colorBgBase:t,colorTextBase:n,colorText:d(n,.88),colorTextSecondary:d(n,.65),colorTextTertiary:d(n,.45),colorTextQuaternary:d(n,.25),colorFill:d(n,.15),colorFillSecondary:d(n,.06),colorFillTertiary:d(n,.04),colorFillQuaternary:d(n,.02),colorBgSolid:d(n,1),colorBgSolidHover:d(n,.75),colorBgSolidActive:d(n,.95),colorBgLayout:S(t,4),colorBgContainer:S(t,0),colorBgElevated:S(t,0),colorBgSpotlight:d(n,.85),colorBgBlur:"transparent",colorBorder:S(t,15),colorBorderSecondary:S(t,6)}};function I(e){presetPrimaryColors.pink=presetPrimaryColors.magenta,presetPalettes.pink=presetPalettes.magenta;let r=Object.keys(v).map(t=>{let n=e[t]===presetPrimaryColors[t]?presetPalettes[t]:generate(e[t]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${t}-${i+1}`]=n[i],o[`${t}${i+1}`]=n[i],o),{})}).reduce((t,n)=>(t={...t,...n},t),{});return {...e,...r,...H(e,{generateColorPalettes:K,generateNeutralColorPalettes:J}),...q(e.fontSize),...A(e),...Q(e),...z(e)}}var Y=createTheme(I),Z={token:C,override:{override:C},hashed:true},R=$__default.createContext(Z);function D(e){return e>=0&&e<=255}function Se(e,r){let{r:t,g:n,b:o,a}=new TinyColor(e).toRgb();if(a<1)return e;let{r:i,g:s,b:p}=new TinyColor(r).toRgb();for(let c=.01;c<=1;c+=.01){let l=Math.round((t-i*(1-c))/c),m=Math.round((n-s*(1-c))/c),g=Math.round((o-p*(1-c))/c);if(D(l)&&D(m)&&D(g))return new TinyColor({r:l,g:m,b:g,a:Math.round(c*100)/100}).toRgbString()}return new TinyColor({r:t,g:n,b:o,a:1}).toRgbString()}var x=Se;function T(e){let{override:r,...t}=e,n={...r};Object.keys(C).forEach(g=>{delete n[g];});let o={...t,...n},a=480,i=576,s=768,p=992,c=1200,l=1600;return o.motion===false&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:x(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:x(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:x(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:x(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
4
4
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
package/es/grid/index.js CHANGED
@@ -5,7 +5,7 @@ import*as g from'react';import g__default,{createContext,useContext,useRef}from'
5
5
  ${Object.keys(r).map(i=>`--${e}-${i}: ${r[i]};`).join(`
6
6
  `)}
7
7
  }
8
- `.trim()}function vo(e,o){let r=sr(e,o);nr()?updateCSS(r,`${ar}-dynamic-theme`):ae();}var Ue=g.createContext(false),Mo=({children:e,disabled:o})=>{let r=g.useContext(Ue);return g.createElement(Ue.Provider,{value:o??r},e)},Ro=Ue;var Ke=g.createContext(void 0),wo=({children:e,size:o})=>{let r=g.useContext(Ke);return g.createElement(Ke.Provider,{value:o||r},e)},me=Ke;function lr(){let e=useContext(Ro),o=useContext(me);return {componentDisabled:e,componentSize:o}}var $o=lr;var Eo={version:"0.0.2"};var zo=Eo.version;function Qe(e){return e>=0&&e<=255}function pr(e,o){let{r,g:n,b:t,a}=new TinyColor(e).toRgb();if(a<1)return e;let{r:i,g:s,b:c}=new TinyColor(o).toRgb();for(let l=.01;l<=1;l+=.01){let p=Math.round((r-i*(1-l))/l),f=Math.round((n-s*(1-l))/l),u=Math.round((t-c*(1-l))/l);if(Qe(p)&&Qe(f)&&Qe(u))return new TinyColor({r:p,g:f,b:u,a:Math.round(l*100)/100}).toRgbString()}return new TinyColor({r,g:n,b:t,a:1}).toRgbString()}var fe=pr;function ve(e){let{override:o,...r}=e,n={...o};Object.keys(A).forEach(u=>{delete n[u];});let t={...r,...n},a=480,i=576,s=768,c=992,l=1200,p=1600;return t.motion===false&&(t.motionDurationFast="0s",t.motionDurationMid="0s",t.motionDurationSlow="0s"),{...t,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:fe(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:fe(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:fe(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidthFocus:t.lineWidth*3,lineWidth:t.lineWidth,controlOutlineWidth:t.lineWidth*2,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:fe(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
8
+ `.trim()}function vo(e,o){let r=sr(e,o);nr()?updateCSS(r,`${ar}-dynamic-theme`):ae();}var Ue=g.createContext(false),Mo=({children:e,disabled:o})=>{let r=g.useContext(Ue);return g.createElement(Ue.Provider,{value:o??r},e)},Ro=Ue;var Ke=g.createContext(void 0),wo=({children:e,size:o})=>{let r=g.useContext(Ke);return g.createElement(Ke.Provider,{value:o||r},e)},me=Ke;function lr(){let e=useContext(Ro),o=useContext(me);return {componentDisabled:e,componentSize:o}}var $o=lr;var Eo={version:"0.0.3"};var zo=Eo.version;function Qe(e){return e>=0&&e<=255}function pr(e,o){let{r,g:n,b:t,a}=new TinyColor(e).toRgb();if(a<1)return e;let{r:i,g:s,b:c}=new TinyColor(o).toRgb();for(let l=.01;l<=1;l+=.01){let p=Math.round((r-i*(1-l))/l),f=Math.round((n-s*(1-l))/l),u=Math.round((t-c*(1-l))/l);if(Qe(p)&&Qe(f)&&Qe(u))return new TinyColor({r:p,g:f,b:u,a:Math.round(l*100)/100}).toRgbString()}return new TinyColor({r,g:n,b:t,a:1}).toRgbString()}var fe=pr;function ve(e){let{override:o,...r}=e,n={...o};Object.keys(A).forEach(u=>{delete n[u];});let t={...r,...n},a=480,i=576,s=768,c=992,l=1200,p=1600;return t.motion===false&&(t.motionDurationFast="0s",t.motionDurationMid="0s",t.motionDurationSlow="0s"),{...t,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:fe(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:fe(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:fe(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidthFocus:t.lineWidth*3,lineWidth:t.lineWidth,controlOutlineWidth:t.lineWidth*2,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:fe(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
9
9
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
10
10
  0 3px 6px -4px rgba(0, 0, 0, 0.12),
11
11
  0 9px 28px 8px rgba(0, 0, 0, 0.05)
package/es/grid/row.js CHANGED
@@ -1,4 +1,4 @@
1
- import*as m from'react';import m__default,{useContext,createContext}from'react';import Xr from'classnames';import {createTheme,useCacheToken,unit,useStyleRegister}from'@ant-design/cssinjs';import {genStyleUtils,mergeToken}from'@ant-design/cssinjs-utils';import {presetPrimaryColors,presetPalettes,generate}from'@ant-design/colors';import {TinyColor}from'@ctrl/tinycolor';import vr from'@ant-design/icons/lib/components/Context';import kr from'rc-util/lib/hooks/useMemo';import {merge}from'rc-util/lib/utils/set';import'rc-util/lib/warning';import'rc-pagination/lib/locale/en_US';import ar from'rc-picker/lib/locale/en_US';import dr from'rc-util/lib/Dom/canUseDom';import {updateCSS}from'rc-util/lib/Dom/dynamicCSS';import Pr from'rc-util/lib/isEqual';import {Provider}from'rc-motion';function no(o){return (o+8)/o}function Ee(o){let e=new Array(10).fill(null).map((r,n)=>{let t=n-1,a=o*Math.E**(t/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return e[1]=o,e.map(r=>({size:r,lineHeight:no(r)}))}var io={version:"0.0.2"};var ao=io.version;var Ie={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},It={...Ie,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
1
+ import*as m from'react';import m__default,{useContext,createContext}from'react';import Xr from'classnames';import {createTheme,useCacheToken,unit,useStyleRegister}from'@ant-design/cssinjs';import {genStyleUtils,mergeToken}from'@ant-design/cssinjs-utils';import {presetPrimaryColors,presetPalettes,generate}from'@ant-design/colors';import {TinyColor}from'@ctrl/tinycolor';import vr from'@ant-design/icons/lib/components/Context';import kr from'rc-util/lib/hooks/useMemo';import {merge}from'rc-util/lib/utils/set';import'rc-util/lib/warning';import'rc-pagination/lib/locale/en_US';import ar from'rc-picker/lib/locale/en_US';import dr from'rc-util/lib/Dom/canUseDom';import {updateCSS}from'rc-util/lib/Dom/dynamicCSS';import Pr from'rc-util/lib/isEqual';import {Provider}from'rc-motion';function no(o){return (o+8)/o}function Ee(o){let e=new Array(10).fill(null).map((r,n)=>{let t=n-1,a=o*Math.E**(t/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return e[1]=o,e.map(r=>({size:r,lineHeight:no(r)}))}var io={version:"0.0.3"};var ao=io.version;var Ie={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},It={...Ie,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
2
2
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
3
3
  'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:false,motion:true},w=It;function ze(o,{generateColorPalettes:e,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:t,colorError:a,colorInfo:i,colorPrimary:s,colorBgBase:c,colorTextBase:l}=o,p=e(s),f=e(n),d=e(t),g=e(a),x=e(i),A=r(c,l),V=o.colorLink||o.colorInfo,S=e(V),E=new TinyColor(g[1]).mix(new TinyColor(g[3]),50).toHexString();return {...A,colorPrimaryBg:p[1],colorPrimaryBgHover:p[2],colorPrimaryBorder:p[3],colorPrimaryBorderHover:p[4],colorPrimaryHover:p[5],colorPrimary:p[6],colorPrimaryActive:p[7],colorPrimaryTextHover:p[8],colorPrimaryText:p[9],colorPrimaryTextActive:p[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBgFilledHover:E,colorErrorBgActive:g[3],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:d[1],colorWarningBgHover:d[2],colorWarningBorder:d[3],colorWarningBorderHover:d[4],colorWarningHover:d[4],colorWarning:d[6],colorWarningActive:d[7],colorWarningTextHover:d[8],colorWarningText:d[9],colorWarningTextActive:d[10],colorInfoBg:x[1],colorInfoBgHover:x[2],colorInfoBorder:x[3],colorInfoBorderHover:x[4],colorInfoHover:x[4],colorInfo:x[6],colorInfoActive:x[7],colorInfoTextHover:x[8],colorInfoText:x[9],colorInfoTextActive:x[10],colorLinkHover:S[4],colorLink:S[6],colorLinkActive:S[7],colorBgMask:new TinyColor("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}var Dt=o=>{let e=o,r=o,n=o,t=o;return o<6&&o>=5?e=o+1:o<16&&o>=6?e=o+2:o>=16&&(e=16),o<7&&o>=5?r=4:o<8&&o>=7?r=5:o<14&&o>=8?r=6:o<16&&o>=14?r=7:o>=16&&(r=8),o<6&&o>=2?n=1:o>=6&&(n=2),o>4&&o<8?t=4:o>=8&&(t=6),{borderRadius:o,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:e,borderRadiusOuter:t}},so=Dt;function He(o){let{motionUnit:e,motionBase:r,borderRadius:n,lineWidth:t}=o;return {motionDurationFast:`${(r+e).toFixed(1)}s`,motionDurationMid:`${(r+e*2).toFixed(1)}s`,motionDurationSlow:`${(r+e*3).toFixed(1)}s`,lineWidthBold:t+1,...so(n)}}var zt=o=>{let{controlHeight:e}=o;return {controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}},lo=zt;var Ht=o=>{let e=Ee(o),r=e.map(p=>p.size),n=e.map(p=>p.lineHeight),t=r[1],a=r[0],i=r[2],s=n[1],c=n[0],l=n[2];return {fontSizeSM:a,fontSize:t,fontSizeLG:i,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:l,lineHeightSM:c,fontHeight:Math.round(s*t),fontHeightLG:Math.round(l*i),fontHeightSM:Math.round(c*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},co=Ht;function Ge(o){let{sizeUnit:e,sizeStep:r}=o;return {sizeXXL:e*(r+8),sizeXL:e*(r+4),sizeLG:e*(r+2),sizeMD:e*(r+1),sizeMS:e*r,size:e*r,sizeSM:e*(r-1),sizeXS:e*(r-2),sizeXXS:e*(r-3)}}var b=(o,e)=>new TinyColor(o).setAlpha(e).toRgbString(),O=(o,e)=>new TinyColor(o).darken(e).toHexString();var mo=o=>{let e=generate(o);return {1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},fo=(o,e)=>{let r=o||"#fff",n=e||"#000";return {colorBgBase:r,colorTextBase:n,colorText:b(n,.88),colorTextSecondary:b(n,.65),colorTextTertiary:b(n,.45),colorTextQuaternary:b(n,.25),colorFill:b(n,.15),colorFillSecondary:b(n,.06),colorFillTertiary:b(n,.04),colorFillQuaternary:b(n,.02),colorBgSolid:b(n,1),colorBgSolidHover:b(n,.75),colorBgSolidActive:b(n,.95),colorBgLayout:O(r,4),colorBgContainer:O(r,0),colorBgElevated:O(r,0),colorBgSpotlight:b(n,.85),colorBgBlur:"transparent",colorBorder:O(r,15),colorBorderSecondary:O(r,6)}};function Fe(o){presetPrimaryColors.pink=presetPrimaryColors.magenta,presetPalettes.pink=presetPalettes.magenta;let e=Object.keys(Ie).map(r=>{let n=o[r]===presetPrimaryColors[r]?presetPalettes[r]:generate(o[r]);return new Array(10).fill(1).reduce((t,a,i)=>(t[`${r}-${i+1}`]=n[i],t[`${r}${i+1}`]=n[i],t),{})}).reduce((r,n)=>(r={...r,...n},r),{});return {...o,...e,...ze(o,{generateColorPalettes:mo,generateNeutralColorPalettes:fo}),...co(o.fontSize),...Ge(o),...lo(o),...He(o)}}var me=createTheme(Fe),Z={token:w,override:{override:w},hashed:true},ee=m__default.createContext(Z);function Be(o){return o>=0&&o<=255}function Bt(o,e){let{r,g:n,b:t,a}=new TinyColor(o).toRgb();if(a<1)return o;let{r:i,g:s,b:c}=new TinyColor(e).toRgb();for(let l=.01;l<=1;l+=.01){let p=Math.round((r-i*(1-l))/l),f=Math.round((n-s*(1-l))/l),d=Math.round((t-c*(1-l))/l);if(Be(p)&&Be(f)&&Be(d))return new TinyColor({r:p,g:f,b:d,a:Math.round(l*100)/100}).toRgbString()}return new TinyColor({r,g:n,b:t,a:1}).toRgbString()}var oe=Bt;function de(o){let{override:e,...r}=o,n={...e};Object.keys(w).forEach(d=>{delete n[d];});let t={...r,...n},a=480,i=576,s=768,c=992,l=1200,p=1600;return t.motion===false&&(t.motionDurationFast="0s",t.motionDurationMid="0s",t.motionDurationSlow="0s"),{...t,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:oe(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:oe(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:oe(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidthFocus:t.lineWidth*3,lineWidth:t.lineWidth,controlOutlineWidth:t.lineWidth*2,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:oe(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
4
4
  0 6px 16px 0 rgba(0, 0, 0, 0.08),