@gobolt/genesis 0.1.2 → 0.1.3

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 (348) hide show
  1. package/README.md +7 -7
  2. package/dist/{AntdIcon-nCNB0J1E.js → AntdIcon-DP6hPDqu.js} +40 -39
  3. package/dist/CSSMotionList-DB0khM6h.js +22193 -0
  4. package/dist/{CheckCircleFilled-BKgizvyl.js → CheckCircleFilled-B-wrMduA.js} +2 -2
  5. package/dist/{CheckOutlined-cEBrx_Ag.js → CheckOutlined-DTEHi_xG.js} +2 -2
  6. package/dist/{ClockCircleOutlined-BaXQuLIn.js → ClockCircleOutlined-DGGcYjVd.js} +2 -2
  7. package/dist/{CloseCircleFilled-B9e7yFwo.js → CloseCircleFilled-WEQ0SaSW.js} +2 -2
  8. package/dist/{CloseOutlined-ogxnm7Oy.js → CloseOutlined-DzgBOns1.js} +2 -2
  9. package/dist/{Compact-Du9689ax.js → Compact-DFcWZrNo.js} +49 -49
  10. package/dist/Context-2_suFYDs.js +5 -0
  11. package/dist/{ContextIsolator-BmfhJgG0.js → ContextIsolator-CUJnq-4F.js} +2 -2
  12. package/dist/{DownOutlined-Dcq69ZKM.js → DownOutlined-Bv7ua5i8.js} +23 -22
  13. package/dist/EllipsisOutlined-BodkguEc.js +1118 -0
  14. package/dist/{ExclamationCircleFilled-BHELVsTg.js → ExclamationCircleFilled-x8Sr29BN.js} +2 -2
  15. package/dist/Input--qsU-6vp.js +424 -0
  16. package/dist/KeyCode-B3vHb2gY.js +155 -0
  17. package/dist/{Keyframes-C9_aCDvn.js → Keyframes-CyO2Aeq-.js} +7 -7
  18. package/dist/{LoadingOutlined-C1qu6ymP.js → LoadingOutlined-DOi5EGOl.js} +2 -2
  19. package/dist/{MinusCircleOutlined-Shz0RRQV.js → MinusCircleOutlined-BcKxYRyN.js} +2 -2
  20. package/dist/{Overflow-DWf4XIal.js → Overflow-CVbsx7Gn.js} +95 -95
  21. package/dist/{SearchOutlined-DNj-7b_h.js → SearchOutlined-DJ3uHFwq.js} +2 -2
  22. package/dist/{Skeleton-BVN4pcVe.js → Skeleton-CudViN0a.js} +166 -163
  23. package/dist/TextArea-CHo3cxKw.js +404 -0
  24. package/dist/{Typography-CoZ5qD-t.js → Typography-B2J8CPnt.js} +263 -247
  25. package/dist/_baseIsEqual-VdxFOa4v.js +1084 -0
  26. package/dist/{_commonjsHelpers-BkfeUUK-.js → _commonjsHelpers-B4e78b8K.js} +1 -1
  27. package/dist/{asyncToGenerator-CKP9bEZn.js → asyncToGenerator-CVBdSr4C.js} +27 -27
  28. package/dist/button-CYVlK7G0.js +1430 -0
  29. package/dist/components/Avatar/Avatar.js +8 -7
  30. package/dist/components/Avatar/__stories__/Avatar.stories.d.ts +0 -1
  31. package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
  32. package/dist/components/Avatar/styles.d.ts +1 -2
  33. package/dist/components/Avatar/styles.js +161 -159
  34. package/dist/components/Badge/Badge.js +8 -7
  35. package/dist/components/Badge/__stories__/Badge.stories.d.ts +0 -1
  36. package/dist/components/Badge/__tests__/Badge.test.js +1 -1
  37. package/dist/components/Badge/styles.d.ts +0 -1
  38. package/dist/components/Badge/styles.js +1 -1
  39. package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -1
  40. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  41. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +0 -1
  42. package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +0 -1
  43. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +3 -3
  44. package/dist/components/Breadcrumb/styles.d.ts +0 -1
  45. package/dist/components/Breadcrumb/styles.js +58 -58
  46. package/dist/components/Button/Button.d.ts +0 -1
  47. package/dist/components/Button/__stories__/Button.stories.d.ts +0 -1
  48. package/dist/components/Button/__tests__/Button.test.js +5 -4
  49. package/dist/components/Button/styles.d.ts +0 -1
  50. package/dist/components/Button/styles.js +2 -2
  51. package/dist/components/Card/__stories__/Card.stories.d.ts +0 -1
  52. package/dist/components/Card/__tests__/Card.test.js +1 -1
  53. package/dist/components/Card/styles.d.ts +0 -1
  54. package/dist/components/Card/styles.js +2 -2
  55. package/dist/components/Checkbox/Checkbox.d.ts +0 -1
  56. package/dist/components/Checkbox/Checkbox.js +11 -11
  57. package/dist/components/Checkbox/__stories__/Checkbox.stories.d.ts +0 -1
  58. package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -15
  59. package/dist/components/Checkbox/styles.d.ts +3 -4
  60. package/dist/components/Checkbox/styles.js +2 -2
  61. package/dist/components/Dashboard/__mocks__/dashboard-data.d.ts +0 -1
  62. package/dist/components/Dashboard/__stories__/Dashboard.stories.d.ts +0 -1
  63. package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +222 -223
  64. package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +13 -12
  65. package/dist/components/Dashboard/__stories__/DashboardLayoutStory.d.ts +0 -1
  66. package/dist/components/Dashboard/__stories__/DashboardLayoutStory.js +10 -9
  67. package/dist/components/Dashboard/__stories__/charts/LineChart.js +72 -74
  68. package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
  69. package/dist/components/Dashboard/styles.d.ts +0 -1
  70. package/dist/components/Dashboard/styles.js +1 -1
  71. package/dist/components/DatePicker/DatePicker.d.ts +0 -1
  72. package/dist/components/DatePicker/DatePicker.js +1 -1
  73. package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +0 -1
  74. package/dist/components/DatePicker/__tests__/DatePicker.test.js +2 -2
  75. package/dist/components/DateRangePicker/DateRangePicker.d.ts +0 -1
  76. package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
  77. package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +0 -1
  78. package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +2 -2
  79. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +2 -2
  80. package/dist/components/ErrorBoundary/ErrorBoundary.js +8 -7
  81. package/dist/components/ErrorBoundary/__stories__/ErrorBoundary.stories.d.ts +0 -1
  82. package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +25 -20
  83. package/dist/components/ErrorBoundary/styles.d.ts +0 -1
  84. package/dist/components/ErrorBoundary/styles.js +1 -1
  85. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +16 -15
  86. package/dist/components/ErrorBoundaryFallback/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -1
  87. package/dist/components/ErrorBoundaryFallback/styles.js +13 -13
  88. package/dist/components/Form/Form.d.ts +0 -1
  89. package/dist/components/Form/Form.js +2 -2
  90. package/dist/components/Form/__stories__/Form.stories.d.ts +0 -1
  91. package/dist/components/Form/__stories__/FormStory.js +11 -10
  92. package/dist/components/Form/__tests__/form.test.js +7 -6
  93. package/dist/components/Form/index.js +1 -1
  94. package/dist/components/Form/styles.d.ts +0 -1
  95. package/dist/components/Form/styles.js +10 -2
  96. package/dist/components/FormBrandon/Form.d.ts +25 -0
  97. package/dist/components/FormBrandon/Form.js +18 -0
  98. package/dist/components/FormBrandon/__stories__/Form.stories.d.ts +6 -0
  99. package/dist/components/FormBrandon/__stories__/FormStory.d.ts +1 -0
  100. package/dist/components/FormBrandon/__stories__/FormStory.js +172 -0
  101. package/dist/components/FormBrandon/__tests__/form.test.js +19 -0
  102. package/dist/components/FormBrandon/index.d.ts +2 -0
  103. package/dist/components/FormBrandon/index.js +4 -0
  104. package/dist/components/FormBrandon/styles.d.ts +2 -0
  105. package/dist/components/FormBrandon/styles.js +13 -0
  106. package/dist/components/Glyph/Glyph.js +2 -2
  107. package/dist/components/Glyph/__stories__/Glyph.stories.d.ts +0 -1
  108. package/dist/components/Glyph/styles.d.ts +0 -1
  109. package/dist/components/Glyph/styles.js +1 -1
  110. package/dist/components/Input/Input.d.ts +0 -1
  111. package/dist/components/Input/Input.js +9 -10
  112. package/dist/components/Input/__stories__/Input.stories.d.ts +0 -1
  113. package/dist/components/Input/__tests__/Input.test.js +21 -20
  114. package/dist/components/Input/styles.d.ts +5 -6
  115. package/dist/components/Input/styles.js +4 -119
  116. package/dist/components/Layout/Content/Content.d.ts +0 -1
  117. package/dist/components/Layout/Content/ResponsiveContent.js +14 -13
  118. package/dist/components/Layout/Content/styles.d.ts +0 -1
  119. package/dist/components/Layout/Content/styles.js +1 -1
  120. package/dist/components/Layout/MainLayout/MainLayout.d.ts +0 -1
  121. package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
  122. package/dist/components/Layout/MainLayout/__stories__/MainLayout.stories.d.ts +0 -1
  123. package/dist/components/Layout/MainLayout/styles.js +1 -1
  124. package/dist/components/Layout/__stories__/Layout.stories.d.ts +0 -1
  125. package/dist/components/Layout/__tests__/Layout.test.js +1 -1
  126. package/dist/components/Message/Message.d.ts +0 -1
  127. package/dist/components/Message/Message.js +13 -12
  128. package/dist/components/Message/__stories__/Message.stories.d.ts +0 -1
  129. package/dist/components/Message/__tests__/Message.test.js +6 -5
  130. package/dist/components/Message/styles.js +1 -1
  131. package/dist/components/Notification/Notification.js +122 -55
  132. package/dist/components/Notification/NotificationBadge/NotificationBadge.js +2 -2
  133. package/dist/components/Notification/NotificationBadge/__stories__/NotificationBadge.stories.d.ts +0 -1
  134. package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +4 -4
  135. package/dist/components/Notification/NotificationBadge/styles.js +1 -1
  136. package/dist/components/Notification/__stories__/Notification.stories.d.ts +0 -1
  137. package/dist/components/Notification/__tests__/Notification.test.js +3 -3
  138. package/dist/components/Notification/styles.js +1 -1
  139. package/dist/components/Popover/Popover.d.ts +1 -1
  140. package/dist/components/Popover/Popover.js +14 -11
  141. package/dist/components/Popover/__stories__/Popover.stories.d.ts +0 -1
  142. package/dist/components/Popover/__tests__/Popover.test.js +19 -26
  143. package/dist/components/Popover/styles.d.ts +0 -1
  144. package/dist/components/Popover/styles.js +2 -2
  145. package/dist/components/Progress/Progress.js +29 -27
  146. package/dist/components/Progress/Progress.util.d.ts +0 -1
  147. package/dist/components/Progress/Progress.util.js +8 -7
  148. package/dist/components/Progress/ProgressText.d.ts +0 -1
  149. package/dist/components/Progress/ProgressText.js +8 -7
  150. package/dist/components/Progress/__stories__/Progress.stories.d.ts +0 -1
  151. package/dist/components/Progress/__tests__/Progress.test.js +4 -4
  152. package/dist/components/Progress/styles.d.ts +0 -1
  153. package/dist/components/Progress/styles.js +217 -214
  154. package/dist/components/Radio/Radio.d.ts +0 -1
  155. package/dist/components/Radio/Radio.js +9 -8
  156. package/dist/components/Radio/RadioGroup.js +1 -1
  157. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +0 -1
  158. package/dist/components/Radio/__tests__/RadioGroup.test.js +8 -7
  159. package/dist/components/Row/Row.d.ts +0 -1
  160. package/dist/components/Row/Row.js +29 -26
  161. package/dist/components/Row/RowActions/RowActions.js +8 -7
  162. package/dist/components/Row/RowActions/styles.js +1 -1
  163. package/dist/components/Row/RowLabelValue/RowLabelValue.d.ts +0 -1
  164. package/dist/components/Row/RowLabelValue/RowLabelValue.js +7 -6
  165. package/dist/components/Row/RowLabelValue/styles.js +2 -2
  166. package/dist/components/Row/__stories__/Row.stories.d.ts +0 -1
  167. package/dist/components/Row/__tests__/Row.test.js +3 -3
  168. package/dist/components/Row/styles.d.ts +0 -1
  169. package/dist/components/Row/styles.js +1 -1
  170. package/dist/components/SegmentedControls/__stories__/SegmentedControls.stories.d.ts +0 -1
  171. package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
  172. package/dist/components/SegmentedControls/styles.d.ts +1 -2
  173. package/dist/components/SegmentedControls/styles.js +214 -203
  174. package/dist/components/Select/Select.d.ts +0 -1
  175. package/dist/components/Select/Select.js +10 -11
  176. package/dist/components/Select/__stories__/Select.stories.d.ts +0 -1
  177. package/dist/components/Select/__tests__/Select.test.js +49 -10754
  178. package/dist/components/Select/styles.d.ts +0 -1
  179. package/dist/components/Select/styles.js +2 -2
  180. package/dist/components/Shapes/__stories__/Shapes.stories.d.ts +0 -1
  181. package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
  182. package/dist/components/Switch/__stories__/Switch.stories.d.ts +0 -1
  183. package/dist/components/Switch/__tests__/Switch.test.js +3 -3
  184. package/dist/components/Switch/styles.d.ts +0 -1
  185. package/dist/components/Switch/styles.js +74 -74
  186. package/dist/components/Table/Table.js +1 -1
  187. package/dist/components/Table/__mocks__/table-mocks.d.ts +0 -1
  188. package/dist/components/Table/__mocks__/table-mocks.js +10 -9
  189. package/dist/components/Table/__stories__/Table.stories.d.ts +0 -1
  190. package/dist/components/Table/__tests__/Table.test.js +1 -1
  191. package/dist/components/Table/styles.d.ts +0 -1
  192. package/dist/components/Table/styles.js +2 -2
  193. package/dist/components/Tabs/__stories__/Tabs.stories.d.ts +0 -1
  194. package/dist/components/Tabs/__tests__/Tabs.test.js +3 -3
  195. package/dist/components/Tabs/styles.d.ts +0 -1
  196. package/dist/components/Tabs/styles.js +2 -2
  197. package/dist/components/Tile/__stories__/Tile.stories.d.ts +0 -1
  198. package/dist/components/Tile/__tests__/Tile.test.js +1 -1
  199. package/dist/components/Tile/styles.d.ts +0 -1
  200. package/dist/components/Tile/styles.js +1 -1
  201. package/dist/components/Toast/Toast.d.ts +0 -1
  202. package/dist/components/Toast/Toast.js +9 -8
  203. package/dist/components/Toast/__stories__/Toast.stories.d.ts +0 -1
  204. package/dist/components/Toast/__tests__/Toast.test.js +6 -5
  205. package/dist/components/Toast/index.js +1 -1
  206. package/dist/components/Toast/styles.js +1 -1
  207. package/dist/components/Tooltip/Tooltip.js +8 -7
  208. package/dist/components/Tooltip/__stories__/Tooltip.stories.d.ts +0 -1
  209. package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
  210. package/dist/components/Tooltip/styles.d.ts +0 -1
  211. package/dist/components/Tooltip/styles.js +2 -2
  212. package/dist/components/Typography/Typography.d.ts +0 -1
  213. package/dist/components/Typography/Typography.js +1 -1
  214. package/dist/components/Typography/__stories__/Typography.stories.d.ts +0 -1
  215. package/dist/components/Typography/__tests__/Typography.test.js +14 -13
  216. package/dist/components/Typography/index.js +1 -1
  217. package/dist/components/Typography/styles.d.ts +0 -1
  218. package/dist/components/Typography/styles.js +2 -2
  219. package/dist/components/index.d.ts +0 -2
  220. package/dist/components/index.js +46 -48
  221. package/dist/{context-DIFtNa4d.js → context-CQfFkrkv.js} +285 -278
  222. package/dist/{dropdown-Dp_PTQ2u.js → dropdown-BlRB2LxQ.js} +492 -491
  223. package/dist/{generateCategoricalChart-7ceYaiZ2.js → generateCategoricalChart-CqByWmje.js} +7189 -6383
  224. package/dist/genesis/GenesisThemeBreakdown.d.ts +0 -1
  225. package/dist/genesis/GenesisThemeBreakdown.js +9 -8
  226. package/dist/genesis/GenesisThemeDemo.d.ts +0 -1
  227. package/dist/genesis/GenesisThemeDemo.stories.d.ts +0 -1
  228. package/dist/genesis/{labs/Lab.stories.d.ts → Lab.stories.d.ts} +0 -1
  229. package/dist/genesis/styles.d.ts +0 -1
  230. package/dist/genesis/styles.js +3 -3
  231. package/dist/{iconBase-LROS5hdG.js → iconBase-DSKTHwal.js} +9 -9
  232. package/dist/index-B7FXyiY_.js +104 -0
  233. package/dist/{index-B_1Ge8na.js → index-BHCqeC4j.js} +190 -183
  234. package/dist/index-BZ050Dyl.js +292 -0
  235. package/dist/{index-BpZSuIUV.js → index-Br3D3cFM.js} +23 -23
  236. package/dist/{index-DOsPeIWJ.js → index-Bxbr727t.js} +260 -265
  237. package/dist/index-C2K1BzmJ.js +3400 -0
  238. package/dist/{styles-D1vKDy9V.js → index-CupwdUIJ.js} +596 -603
  239. package/dist/{index-BQM5OniU.js → index-CzMIlMTV.js} +111 -111
  240. package/dist/index-DCopujxC.js +772 -0
  241. package/dist/index-DRGbc-fW.js +780 -0
  242. package/dist/index-DavB5GQ3.js +5221 -0
  243. package/dist/index-RAH9f-qb.js +540 -0
  244. package/dist/{index-BPVue1Yd.js → index-RtWhGOwR.js} +152 -150
  245. package/dist/index-Y0KgiFZb.js +909 -0
  246. package/dist/{index-DRGX1Wem.js → index-sX7KZ-nU.js} +414 -402
  247. package/dist/index.js +53 -55
  248. package/dist/interface/appointment.d.ts +0 -1
  249. package/dist/interface/appointmentV2.d.ts +0 -1
  250. package/dist/interface/appointmentsState.d.ts +0 -1
  251. package/dist/interface/deliveryPartner.d.ts +0 -1
  252. package/dist/interface/route.d.ts +0 -1
  253. package/dist/interface/routeAnalysis.d.ts +0 -1
  254. package/dist/interface/routeAutomationJob.d.ts +0 -1
  255. package/dist/interface/routeAutomationLog.d.ts +0 -1
  256. package/dist/interface/serviceArea.d.ts +0 -1
  257. package/dist/interface/vehicle.d.ts +0 -1
  258. package/dist/{magic-string.es-BKBb7z-1.js → magic-string.es-D4UQQyt0.js} +265 -264
  259. package/dist/{motion-CUN72xsH.js → motion-C-XpKcZG.js} +6 -5
  260. package/dist/{pickAttrs-CleuMJFR.js → pickAttrs-yFE4_vFd.js} +1 -1
  261. package/dist/{presets-Djh_L_6R.js → presets-CSXMiWyc.js} +176 -176
  262. package/dist/providers/BreakpointThemeProvider.d.ts +0 -1
  263. package/dist/providers/BreakpointThemeProvider.js +5 -5
  264. package/dist/providers/GenesisProvider.d.ts +0 -1
  265. package/dist/providers/GenesisProvider.js +1 -1
  266. package/dist/providers/ToastProvider.d.ts +0 -1
  267. package/dist/providers/ToastProvider.js +10 -9
  268. package/dist/providers/__stories__/GenesisProvider.stories.d.ts +0 -1
  269. package/dist/providers/index.js +1 -1
  270. package/dist/providers/useGenesis.d.ts +0 -1
  271. package/dist/providers/useGenesis.js +2 -2
  272. package/dist/{roundedArrow-DI_Q-xdU.js → roundedArrow-BxPlu4Hq.js} +2 -2
  273. package/dist/setup-aZdxWCJq.js +13976 -0
  274. package/dist/setup.types-CgFq66QX.js +9261 -0
  275. package/dist/shadow-9lsz-71t.js +13 -0
  276. package/dist/statusUtils-Kj9kMuVg.js +15 -0
  277. package/dist/{styleChecker-Cotu61d0.js → styleChecker-CSH9LQtm.js} +3 -3
  278. package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-C47QHsU4.js} +371 -304
  279. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +11 -10
  280. package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +0 -1
  281. package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +0 -1
  282. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +9 -8
  283. package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +0 -1
  284. package/dist/styles/design-tokens/typography-tokens/TypographyTokens.stories.d.ts +0 -1
  285. package/dist/styles/global-styles.d.ts +0 -1
  286. package/dist/styles/global-styles.js +1 -1
  287. package/dist/styles/theme/genesis-theme.d.ts +0 -1
  288. package/dist/styles/theme/genesis-theme.js +285 -337
  289. package/dist/styles/theme/genesis-theme.test.d.ts +1 -0
  290. package/dist/styles/theme/genesis-theme.test.js +69 -0
  291. package/dist/styles/theme/theme-tree/ThemeTree.js +488 -488
  292. package/dist/styles/theme/theme-tree/ThemeTree.stories.d.ts +0 -1
  293. package/dist/styles-DNay6iFa.js +292 -0
  294. package/dist/styles-Wpm1RiGr.js +9212 -0
  295. package/dist/styles-XuoEGUZZ.js +549 -0
  296. package/dist/test/setup.d.ts +0 -1
  297. package/dist/test/setup.js +35 -35
  298. package/dist/test/setup.types.d.ts +0 -1
  299. package/dist/test/setup.types.js +1 -1
  300. package/dist/{toArray-U3Az44CO.js → toArray-D5kvYi_U.js} +1 -1
  301. package/dist/useBreakpoint-ByLol0R9.js +88 -0
  302. package/dist/useCSSVarCls-YfJY1twF.js +10 -0
  303. package/dist/{useIcons-Ck4JP1m9.js → useIcons-CoxuumP_.js} +16 -16
  304. package/dist/{useId-D2tzlufo.js → useId-DLf1xVuv.js} +3 -3
  305. package/dist/useLocale-BQ3mKRyJ.js +16 -0
  306. package/dist/{useMergedState-D6toxSxh.js → useMergedState-D1-TbeEv.js} +2 -2
  307. package/dist/useSize-Ct1guc-z.js +9 -0
  308. package/dist/useVariants-C6UAAu9f.js +19 -0
  309. package/dist/{useZIndex-DhyHuZTN.js → useZIndex-tgX56o1r.js} +7 -6
  310. package/dist/utils/icon-util.js +48 -44
  311. package/dist/vi.B5EKKJdE-BsDIxc7v.js +14087 -0
  312. package/package.json +33 -24
  313. package/dist/EllipsisOutlined-DGMph0Bj.js +0 -1115
  314. package/dist/KeyCode-DM2sFh3-.js +0 -517
  315. package/dist/TextArea-Bkf9hh7l.js +0 -708
  316. package/dist/_baseIsEqual-L0-w1QRI.js +0 -598
  317. package/dist/button-BwqpCxVM.js +0 -1406
  318. package/dist/clsx-OuTLNxxd.js +0 -16
  319. package/dist/index-BRUI9igj.js +0 -11
  320. package/dist/index-BbTV2Cw5.js +0 -22638
  321. package/dist/index-BeGv28kJ.js +0 -5173
  322. package/dist/index-BvOLXELm.js +0 -102
  323. package/dist/index-CLSrpQRW.js +0 -416
  324. package/dist/index-CbVOl2U6.js +0 -288
  325. package/dist/index-D0U6r5O7.js +0 -780
  326. package/dist/index-DEu2PVzQ.js +0 -538
  327. package/dist/index-DLdU7Tpd.js +0 -183
  328. package/dist/index-DNQ-jnBx.js +0 -3321
  329. package/dist/index-DWjq9XYj.js +0 -899
  330. package/dist/responsiveObserver-dCkpy7Cb.js +0 -73
  331. package/dist/setup-DwHFLWUb.js +0 -24713
  332. package/dist/setup.types-dBtAXXGp.js +0 -8824
  333. package/dist/shadow-BoMGMNn3.js +0 -13
  334. package/dist/styles-CWdUpZom.js +0 -289
  335. package/dist/styles-qerRs7Rn.js +0 -9196
  336. package/dist/useBreakpoint-TkMv121M.js +0 -22
  337. package/dist/useCSSVarCls-Dau77fzS.js +0 -11
  338. package/dist/useLocale-CTfNpakL.js +0 -16
  339. package/dist/useSize-DSq4r6zy.js +0 -9
  340. package/dist/useVariants-DrLzUVLU.js +0 -30
  341. package/dist/utils/getAppointmentColor.d.ts +0 -4
  342. package/dist/utils/getAppointmentColor.js +0 -91
  343. package/dist/utils/isAllEnglishString.d.ts +0 -1
  344. package/dist/utils/isAllEnglishString.js +0 -8
  345. package/dist/utils/isAllEnglishString.test.js +0 -8
  346. package/dist/utils/parseAddress.d.ts +0 -3
  347. package/dist/utils/parseAddress.js +0 -19
  348. /package/dist/{utils/isAllEnglishString.test.d.ts → components/FormBrandon/__tests__/form.test.d.ts} +0 -0
@@ -1,1406 +0,0 @@
1
- import * as X from "react";
2
- import s, { forwardRef as oe, useState as xe, useRef as j, useEffect as k, useMemo as ee, useContext as he, Children as vr } from "react";
3
- import { e as N, g as Ue, _ as I, F as Je, f as yr, a as Y, b as $e, d as pe } from "./presets-Djh_L_6R.js";
4
- import { o as Sr } from "./omit-B_u6A-HL.js";
5
- import { C as Qe, c as xr, g as Ze, o as $r, s as Er, x as Br, y as Hr, e as Ke, _ as ke, a as er, m as ne, M as be, j as Or, f as te, r as Rr, p as Nr, N as Pr, D as jr, B as wr } from "./index-BbTV2Cw5.js";
6
- import { W as Ir } from "./index-BpZSuIUV.js";
7
- import { u as Dr } from "./useSize-DSq4r6zy.js";
8
- import { u as Lr } from "./Compact-Du9689ax.js";
9
- import "./index-DLdU7Tpd.js";
10
- import { c as Tr, i as zr } from "./reactNode-sKPeiqPL.js";
11
- import { P as rr } from "./presetColors-Cl8UP3Nw.js";
12
- import { R as Ar } from "./LoadingOutlined-C1qu6ymP.js";
13
- import { u as _r } from "./useMergedState-D6toxSxh.js";
14
- import { g as Mr } from "./compact-item-DH13cl8A.js";
15
- var Gr = function(e, r) {
16
- var t = {};
17
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
18
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
19
- r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
20
- return t;
21
- };
22
- const tr = /* @__PURE__ */ X.createContext(void 0), Fr = (e) => {
23
- const {
24
- getPrefixCls: r,
25
- direction: t
26
- } = X.useContext(Qe), {
27
- prefixCls: o,
28
- size: n,
29
- className: a
30
- } = e, l = Gr(e, ["prefixCls", "size", "className"]), i = r("btn-group", o), [, , c] = xr(), u = X.useMemo(() => {
31
- switch (n) {
32
- case "large":
33
- return "lg";
34
- case "small":
35
- return "sm";
36
- default:
37
- return "";
38
- }
39
- }, [n]);
40
- if (process.env.NODE_ENV !== "production") {
41
- const g = Ze("Button.Group");
42
- process.env.NODE_ENV !== "production" && g(!n || ["large", "small", "middle"].includes(n), "usage", "Invalid prop `size`.");
43
- }
44
- const d = N(i, {
45
- [`${i}-${u}`]: u,
46
- [`${i}-rtl`]: t === "rtl"
47
- }, a, c);
48
- return /* @__PURE__ */ X.createElement(tr.Provider, {
49
- value: n
50
- }, /* @__PURE__ */ X.createElement("div", Object.assign({}, l, {
51
- className: d
52
- })));
53
- }, We = /^[\u4E00-\u9FA5]{2}$/, Ee = We.test.bind(We);
54
- function Qt(e) {
55
- return e === "danger" ? {
56
- danger: !0
57
- } : {
58
- type: e
59
- };
60
- }
61
- function Xe(e) {
62
- return typeof e == "string";
63
- }
64
- function re(e) {
65
- return e === "text" || e === "link";
66
- }
67
- function Vr(e, r) {
68
- if (e == null)
69
- return;
70
- const t = r ? " " : "";
71
- return typeof e != "string" && typeof e != "number" && Xe(e.type) && Ee(e.props.children) ? Tr(e, {
72
- children: e.props.children.split("").join(t)
73
- }) : Xe(e) ? Ee(e) ? /* @__PURE__ */ s.createElement("span", null, e.split("").join(t)) : /* @__PURE__ */ s.createElement("span", null, e) : zr(e) ? /* @__PURE__ */ s.createElement("span", null, e) : e;
74
- }
75
- function Wr(e, r) {
76
- let t = !1;
77
- const o = [];
78
- return s.Children.forEach(e, (n) => {
79
- const a = typeof n, l = a === "string" || a === "number";
80
- if (t && l) {
81
- const i = o.length - 1, c = o[i];
82
- o[i] = `${c}${n}`;
83
- } else
84
- o.push(n);
85
- t = l;
86
- }), s.Children.map(o, (n) => Vr(n, r));
87
- }
88
- ["default", "primary", "danger"].concat($r(rr));
89
- const Be = /* @__PURE__ */ oe((e, r) => {
90
- const {
91
- className: t,
92
- style: o,
93
- children: n,
94
- prefixCls: a
95
- } = e, l = N(`${a}-icon`, t);
96
- return /* @__PURE__ */ s.createElement("span", {
97
- ref: r,
98
- className: l,
99
- style: o
100
- }, n);
101
- }), qe = /* @__PURE__ */ oe((e, r) => {
102
- const {
103
- prefixCls: t,
104
- className: o,
105
- style: n,
106
- iconClassName: a
107
- } = e, l = N(`${t}-loading-icon`, o);
108
- return /* @__PURE__ */ s.createElement(Be, {
109
- prefixCls: t,
110
- className: l,
111
- style: n,
112
- ref: r
113
- }, /* @__PURE__ */ s.createElement(Ar, {
114
- className: a
115
- }));
116
- }), ve = () => ({
117
- width: 0,
118
- opacity: 0,
119
- transform: "scale(0)"
120
- }), ye = (e) => ({
121
- width: e.scrollWidth,
122
- opacity: 1,
123
- transform: "scale(1)"
124
- }), Xr = (e) => {
125
- const {
126
- prefixCls: r,
127
- loading: t,
128
- existIcon: o,
129
- className: n,
130
- style: a,
131
- mount: l
132
- } = e, i = !!t;
133
- return o ? /* @__PURE__ */ s.createElement(qe, {
134
- prefixCls: r,
135
- className: n,
136
- style: a
137
- }) : /* @__PURE__ */ s.createElement(Er, {
138
- visible: i,
139
- // Used for minus flex gap style only
140
- motionName: `${r}-loading-icon-motion`,
141
- motionAppear: !l,
142
- motionEnter: !l,
143
- motionLeave: !l,
144
- removeOnLeave: !0,
145
- onAppearStart: ve,
146
- onAppearActive: ye,
147
- onEnterStart: ve,
148
- onEnterActive: ye,
149
- onLeaveStart: ye,
150
- onLeaveActive: ve
151
- }, (c, u) => {
152
- let {
153
- className: d,
154
- style: g
155
- } = c;
156
- const p = Object.assign(Object.assign({}, a), g);
157
- return /* @__PURE__ */ s.createElement(qe, {
158
- prefixCls: r,
159
- className: N(n, d),
160
- style: p,
161
- ref: u
162
- });
163
- });
164
- }, Ye = (e, r) => ({
165
- // Border
166
- [`> span, > ${e}`]: {
167
- "&:not(:last-child)": {
168
- [`&, & > ${e}`]: {
169
- "&:not(:disabled)": {
170
- borderInlineEndColor: r
171
- }
172
- }
173
- },
174
- "&:not(:first-child)": {
175
- [`&, & > ${e}`]: {
176
- "&:not(:disabled)": {
177
- borderInlineStartColor: r
178
- }
179
- }
180
- }
181
- }
182
- }), qr = (e) => {
183
- const {
184
- componentCls: r,
185
- fontSize: t,
186
- lineWidth: o,
187
- groupBorderColor: n,
188
- colorErrorHover: a
189
- } = e;
190
- return {
191
- [`${r}-group`]: [
192
- {
193
- position: "relative",
194
- display: "inline-flex",
195
- // Border
196
- [`> span, > ${r}`]: {
197
- "&:not(:last-child)": {
198
- [`&, & > ${r}`]: {
199
- borderStartEndRadius: 0,
200
- borderEndEndRadius: 0
201
- }
202
- },
203
- "&:not(:first-child)": {
204
- marginInlineStart: e.calc(o).mul(-1).equal(),
205
- [`&, & > ${r}`]: {
206
- borderStartStartRadius: 0,
207
- borderEndStartRadius: 0
208
- }
209
- }
210
- },
211
- [r]: {
212
- position: "relative",
213
- zIndex: 1,
214
- "&:hover, &:focus, &:active": {
215
- zIndex: 2
216
- },
217
- "&[disabled]": {
218
- zIndex: 0
219
- }
220
- },
221
- [`${r}-icon-only`]: {
222
- fontSize: t
223
- }
224
- },
225
- // Border Color
226
- Ye(`${r}-primary`, n),
227
- Ye(`${r}-danger`, a)
228
- ]
229
- };
230
- };
231
- var Yr = ["b"], Ur = ["v"], Se = function(r) {
232
- return Math.round(Number(r || 0));
233
- }, Jr = function(r) {
234
- if (r instanceof Je)
235
- return r;
236
- if (r && yr(r) === "object" && "h" in r && "b" in r) {
237
- var t = r, o = t.b, n = Ue(t, Yr);
238
- return I(I({}, n), {}, {
239
- v: o
240
- });
241
- }
242
- return typeof r == "string" && /hsb/.test(r) ? r.replace(/hsb/, "hsv") : r;
243
- }, D = /* @__PURE__ */ function(e) {
244
- Br(t, e);
245
- var r = Hr(t);
246
- function t(o) {
247
- return Ke(this, t), r.call(this, Jr(o));
248
- }
249
- return ke(t, [{
250
- key: "toHsbString",
251
- value: function() {
252
- var n = this.toHsb(), a = Se(n.s * 100), l = Se(n.b * 100), i = Se(n.h), c = n.a, u = "hsb(".concat(i, ", ").concat(a, "%, ").concat(l, "%)"), d = "hsba(".concat(i, ", ").concat(a, "%, ").concat(l, "%, ").concat(c.toFixed(c === 0 ? 0 : 2), ")");
253
- return c === 1 ? u : d;
254
- }
255
- }, {
256
- key: "toHsb",
257
- value: function() {
258
- var n = this.toHsv(), a = n.v, l = Ue(n, Ur);
259
- return I(I({}, l), {}, {
260
- b: a,
261
- a: this.a
262
- });
263
- }
264
- }]), t;
265
- }(Je), Qr = "rc-color-picker", q = function(r) {
266
- return r instanceof D ? r : new D(r);
267
- }, Zr = q("#1677ff"), or = function(r) {
268
- var t = r.offset, o = r.targetRef, n = r.containerRef, a = r.color, l = r.type, i = n.current.getBoundingClientRect(), c = i.width, u = i.height, d = o.current.getBoundingClientRect(), g = d.width, p = d.height, m = g / 2, C = p / 2, y = (t.x + m) / c, E = 1 - (t.y + C) / u, H = a.toHsb(), B = y, S = (t.x + m) / c * 360;
269
- if (l)
270
- switch (l) {
271
- case "hue":
272
- return q(I(I({}, H), {}, {
273
- h: S <= 0 ? 0 : S
274
- }));
275
- case "alpha":
276
- return q(I(I({}, H), {}, {
277
- a: B <= 0 ? 0 : B
278
- }));
279
- }
280
- return q({
281
- h: H.h,
282
- s: y <= 0 ? 0 : y,
283
- b: E >= 1 ? 1 : E,
284
- a: H.a
285
- });
286
- }, nr = function(r, t) {
287
- var o = r.toHsb();
288
- switch (t) {
289
- case "hue":
290
- return {
291
- x: o.h / 360 * 100,
292
- y: 50
293
- };
294
- case "alpha":
295
- return {
296
- x: r.a * 100,
297
- y: 50
298
- };
299
- default:
300
- return {
301
- x: o.s * 100,
302
- y: (1 - o.b) * 100
303
- };
304
- }
305
- }, Kr = function(r) {
306
- var t = r.color, o = r.prefixCls, n = r.className, a = r.style, l = r.onClick, i = "".concat(o, "-color-block");
307
- return /* @__PURE__ */ s.createElement("div", {
308
- className: N(i, n),
309
- style: a,
310
- onClick: l
311
- }, /* @__PURE__ */ s.createElement("div", {
312
- className: "".concat(i, "-inner"),
313
- style: {
314
- background: t
315
- }
316
- }));
317
- };
318
- function kr(e) {
319
- var r = "touches" in e ? e.touches[0] : e, t = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset, o = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
320
- return {
321
- pageX: r.pageX - t,
322
- pageY: r.pageY - o
323
- };
324
- }
325
- function ar(e) {
326
- var r = e.targetRef, t = e.containerRef, o = e.direction, n = e.onDragChange, a = e.onDragChangeComplete, l = e.calculate, i = e.color, c = e.disabledDrag, u = xe({
327
- x: 0,
328
- y: 0
329
- }), d = Y(u, 2), g = d[0], p = d[1], m = j(null), C = j(null);
330
- k(function() {
331
- p(l());
332
- }, [i]), k(function() {
333
- return function() {
334
- document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", m.current), document.removeEventListener("touchend", C.current), m.current = null, C.current = null;
335
- };
336
- }, []);
337
- var y = function(f) {
338
- var h = kr(f), U = h.pageX, J = h.pageY, O = t.current.getBoundingClientRect(), G = O.x, L = O.y, Q = O.width, F = O.height, T = r.current.getBoundingClientRect(), z = T.width, R = T.height, V = z / 2, M = R / 2, P = Math.max(0, Math.min(U - G, Q)) - V, b = Math.max(0, Math.min(J - L, F)) - M, x = {
339
- x: P,
340
- y: o === "x" ? g.y : b
341
- };
342
- if (z === 0 && R === 0 || z !== R)
343
- return !1;
344
- n == null || n(x);
345
- }, E = function(f) {
346
- f.preventDefault(), y(f);
347
- }, H = function(f) {
348
- f.preventDefault(), document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", m.current), document.removeEventListener("touchend", C.current), m.current = null, C.current = null, a == null || a();
349
- }, B = function(f) {
350
- document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), !c && (y(f), document.addEventListener("mousemove", E), document.addEventListener("mouseup", H), document.addEventListener("touchmove", E), document.addEventListener("touchend", H), m.current = E, C.current = H);
351
- };
352
- return [g, B];
353
- }
354
- var lr = function(r) {
355
- var t = r.size, o = t === void 0 ? "default" : t, n = r.color, a = r.prefixCls;
356
- return /* @__PURE__ */ s.createElement("div", {
357
- className: N("".concat(a, "-handler"), $e({}, "".concat(a, "-handler-sm"), o === "small")),
358
- style: {
359
- backgroundColor: n
360
- }
361
- });
362
- }, ir = function(r) {
363
- var t = r.children, o = r.style, n = r.prefixCls;
364
- return /* @__PURE__ */ s.createElement("div", {
365
- className: "".concat(n, "-palette"),
366
- style: I({
367
- position: "relative"
368
- }, o)
369
- }, t);
370
- }, cr = /* @__PURE__ */ oe(function(e, r) {
371
- var t = e.children, o = e.x, n = e.y;
372
- return /* @__PURE__ */ s.createElement("div", {
373
- ref: r,
374
- style: {
375
- position: "absolute",
376
- left: "".concat(o, "%"),
377
- top: "".concat(n, "%"),
378
- zIndex: 1,
379
- transform: "translate(-50%, -50%)"
380
- }
381
- }, t);
382
- }), et = function(r) {
383
- var t = r.color, o = r.onChange, n = r.prefixCls, a = r.onChangeComplete, l = r.disabled, i = j(), c = j(), u = j(t), d = er(function(y) {
384
- var E = or({
385
- offset: y,
386
- targetRef: c,
387
- containerRef: i,
388
- color: t
389
- });
390
- u.current = E, o(E);
391
- }), g = ar({
392
- color: t,
393
- containerRef: i,
394
- targetRef: c,
395
- calculate: function() {
396
- return nr(t);
397
- },
398
- onDragChange: d,
399
- onDragChangeComplete: function() {
400
- return a == null ? void 0 : a(u.current);
401
- },
402
- disabledDrag: l
403
- }), p = Y(g, 2), m = p[0], C = p[1];
404
- return /* @__PURE__ */ s.createElement("div", {
405
- ref: i,
406
- className: "".concat(n, "-select"),
407
- onMouseDown: C,
408
- onTouchStart: C
409
- }, /* @__PURE__ */ s.createElement(ir, {
410
- prefixCls: n
411
- }, /* @__PURE__ */ s.createElement(cr, {
412
- x: m.x,
413
- y: m.y,
414
- ref: c
415
- }, /* @__PURE__ */ s.createElement(lr, {
416
- color: t.toRgbString(),
417
- prefixCls: n
418
- })), /* @__PURE__ */ s.createElement("div", {
419
- className: "".concat(n, "-saturation"),
420
- style: {
421
- backgroundColor: "hsl(".concat(t.toHsb().h, ",100%, 50%)"),
422
- backgroundImage: "linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"
423
- }
424
- })));
425
- }, rt = function(r, t) {
426
- var o = _r(r, {
427
- value: t
428
- }), n = Y(o, 2), a = n[0], l = n[1], i = ee(function() {
429
- return q(a);
430
- }, [a]);
431
- return [i, l];
432
- }, tt = function(r) {
433
- var t = r.colors, o = r.children, n = r.direction, a = n === void 0 ? "to right" : n, l = r.type, i = r.prefixCls, c = ee(function() {
434
- return t.map(function(u, d) {
435
- var g = q(u);
436
- return l === "alpha" && d === t.length - 1 && (g = new D(g.setA(1))), g.toRgbString();
437
- }).join(",");
438
- }, [t, l]);
439
- return /* @__PURE__ */ s.createElement("div", {
440
- className: "".concat(i, "-gradient"),
441
- style: {
442
- position: "absolute",
443
- inset: 0,
444
- background: "linear-gradient(".concat(a, ", ").concat(c, ")")
445
- }
446
- }, o);
447
- }, ot = function(r) {
448
- var t = r.prefixCls, o = r.colors, n = r.disabled, a = r.onChange, l = r.onChangeComplete, i = r.color, c = r.type, u = j(), d = j(), g = j(i), p = function(h) {
449
- return c === "hue" ? h.getHue() : h.a * 100;
450
- }, m = er(function(f) {
451
- var h = or({
452
- offset: f,
453
- targetRef: d,
454
- containerRef: u,
455
- color: i,
456
- type: c
457
- });
458
- g.current = h, a(p(h));
459
- }), C = ar({
460
- color: i,
461
- targetRef: d,
462
- containerRef: u,
463
- calculate: function() {
464
- return nr(i, c);
465
- },
466
- onDragChange: m,
467
- onDragChangeComplete: function() {
468
- l(p(g.current));
469
- },
470
- direction: "x",
471
- disabledDrag: n
472
- }), y = Y(C, 2), E = y[0], H = y[1], B = s.useMemo(function() {
473
- if (c === "hue") {
474
- var f = i.toHsb();
475
- f.s = 1, f.b = 1, f.a = 1;
476
- var h = new D(f);
477
- return h;
478
- }
479
- return i;
480
- }, [i, c]), S = s.useMemo(function() {
481
- return o.map(function(f) {
482
- return "".concat(f.color, " ").concat(f.percent, "%");
483
- });
484
- }, [o]);
485
- return /* @__PURE__ */ s.createElement("div", {
486
- ref: u,
487
- className: N("".concat(t, "-slider"), "".concat(t, "-slider-").concat(c)),
488
- onMouseDown: H,
489
- onTouchStart: H
490
- }, /* @__PURE__ */ s.createElement(ir, {
491
- prefixCls: t
492
- }, /* @__PURE__ */ s.createElement(cr, {
493
- x: E.x,
494
- y: E.y,
495
- ref: d
496
- }, /* @__PURE__ */ s.createElement(lr, {
497
- size: "small",
498
- color: B.toHexString(),
499
- prefixCls: t
500
- })), /* @__PURE__ */ s.createElement(tt, {
501
- colors: S,
502
- type: c,
503
- prefixCls: t
504
- })));
505
- };
506
- function nt(e) {
507
- return X.useMemo(function() {
508
- var r = e || {}, t = r.slider;
509
- return [t || ot];
510
- }, [e]);
511
- }
512
- var at = [{
513
- color: "rgb(255, 0, 0)",
514
- percent: 0
515
- }, {
516
- color: "rgb(255, 255, 0)",
517
- percent: 17
518
- }, {
519
- color: "rgb(0, 255, 0)",
520
- percent: 33
521
- }, {
522
- color: "rgb(0, 255, 255)",
523
- percent: 50
524
- }, {
525
- color: "rgb(0, 0, 255)",
526
- percent: 67
527
- }, {
528
- color: "rgb(255, 0, 255)",
529
- percent: 83
530
- }, {
531
- color: "rgb(255, 0, 0)",
532
- percent: 100
533
- }], lt = /* @__PURE__ */ oe(function(e, r) {
534
- var t = e.value, o = e.defaultValue, n = e.prefixCls, a = n === void 0 ? Qr : n, l = e.onChange, i = e.onChangeComplete, c = e.className, u = e.style, d = e.panelRender, g = e.disabledAlpha, p = g === void 0 ? !1 : g, m = e.disabled, C = m === void 0 ? !1 : m, y = e.components, E = nt(y), H = Y(E, 1), B = H[0], S = rt(o || Zr, t), f = Y(S, 2), h = f[0], U = f[1], J = ee(function() {
535
- return h.setA(1).toRgbString();
536
- }, [h]), O = function(b, x) {
537
- t || U(b), l == null || l(b, x);
538
- }, G = function(b) {
539
- return new D(h.setHue(b));
540
- }, L = function(b) {
541
- return new D(h.setA(b / 100));
542
- }, Q = function(b) {
543
- O(G(b), {
544
- type: "hue",
545
- value: b
546
- });
547
- }, F = function(b) {
548
- O(L(b), {
549
- type: "alpha",
550
- value: b
551
- });
552
- }, T = function(b) {
553
- i && i(G(b));
554
- }, z = function(b) {
555
- i && i(L(b));
556
- }, R = N("".concat(a, "-panel"), c, $e({}, "".concat(a, "-panel-disabled"), C)), V = {
557
- prefixCls: a,
558
- disabled: C,
559
- color: h
560
- }, M = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(et, pe({
561
- onChange: O
562
- }, V, {
563
- onChangeComplete: i
564
- })), /* @__PURE__ */ s.createElement("div", {
565
- className: "".concat(a, "-slider-container")
566
- }, /* @__PURE__ */ s.createElement("div", {
567
- className: N("".concat(a, "-slider-group"), $e({}, "".concat(a, "-slider-group-disabled-alpha"), p))
568
- }, /* @__PURE__ */ s.createElement(B, pe({}, V, {
569
- type: "hue",
570
- colors: at,
571
- min: 0,
572
- max: 359,
573
- value: h.getHue(),
574
- onChange: Q,
575
- onChangeComplete: T
576
- })), !p && /* @__PURE__ */ s.createElement(B, pe({}, V, {
577
- type: "alpha",
578
- colors: [{
579
- percent: 0,
580
- color: "rgba(255, 0, 4, 0)"
581
- }, {
582
- percent: 100,
583
- color: J
584
- }],
585
- min: 0,
586
- max: 100,
587
- value: h.a * 100,
588
- onChange: F,
589
- onChangeComplete: z
590
- }))), /* @__PURE__ */ s.createElement(Kr, {
591
- color: h.toRgbString(),
592
- prefixCls: a
593
- })));
594
- return /* @__PURE__ */ s.createElement("div", {
595
- className: R,
596
- style: u,
597
- ref: r
598
- }, typeof d == "function" ? d(M) : M);
599
- });
600
- process.env.NODE_ENV !== "production" && (lt.displayName = "ColorPicker");
601
- const it = (e, r) => (e == null ? void 0 : e.replace(/[^\w/]/g, "").slice(0, r ? 8 : 6)) || "", ct = (e, r) => e ? it(e, r) : "";
602
- let st = /* @__PURE__ */ function() {
603
- function e(r) {
604
- Ke(this, e);
605
- var t;
606
- if (this.cleared = !1, r instanceof e) {
607
- this.metaColor = r.metaColor.clone(), this.colors = (t = r.colors) === null || t === void 0 ? void 0 : t.map((n) => ({
608
- color: new e(n.color),
609
- percent: n.percent
610
- })), this.cleared = r.cleared;
611
- return;
612
- }
613
- const o = Array.isArray(r);
614
- o && r.length ? (this.colors = r.map((n) => {
615
- let {
616
- color: a,
617
- percent: l
618
- } = n;
619
- return {
620
- color: new e(a),
621
- percent: l
622
- };
623
- }), this.metaColor = new D(this.colors[0].color.metaColor)) : this.metaColor = new D(o ? "" : r), (!r || o && !this.colors) && (this.metaColor = this.metaColor.setA(0), this.cleared = !0);
624
- }
625
- return ke(e, [{
626
- key: "toHsb",
627
- value: function() {
628
- return this.metaColor.toHsb();
629
- }
630
- }, {
631
- key: "toHsbString",
632
- value: function() {
633
- return this.metaColor.toHsbString();
634
- }
635
- }, {
636
- key: "toHex",
637
- value: function() {
638
- return ct(this.toHexString(), this.metaColor.a < 1);
639
- }
640
- }, {
641
- key: "toHexString",
642
- value: function() {
643
- return this.metaColor.toHexString();
644
- }
645
- }, {
646
- key: "toRgb",
647
- value: function() {
648
- return this.metaColor.toRgb();
649
- }
650
- }, {
651
- key: "toRgbString",
652
- value: function() {
653
- return this.metaColor.toRgbString();
654
- }
655
- }, {
656
- key: "isGradient",
657
- value: function() {
658
- return !!this.colors && !this.cleared;
659
- }
660
- }, {
661
- key: "getColors",
662
- value: function() {
663
- return this.colors || [{
664
- color: this,
665
- percent: 0
666
- }];
667
- }
668
- }, {
669
- key: "toCssString",
670
- value: function() {
671
- const {
672
- colors: t
673
- } = this;
674
- return t ? `linear-gradient(90deg, ${t.map((n) => `${n.color.toRgbString()} ${n.percent}%`).join(", ")})` : this.metaColor.toRgbString();
675
- }
676
- }, {
677
- key: "equals",
678
- value: function(t) {
679
- return !t || this.isGradient() !== t.isGradient() ? !1 : this.isGradient() ? this.colors.length === t.colors.length && this.colors.every((o, n) => {
680
- const a = t.colors[n];
681
- return o.percent === a.percent && o.color.equals(a.color);
682
- }) : this.toHexString() === t.toHexString();
683
- }
684
- }]);
685
- }();
686
- const ut = (e, r) => {
687
- const {
688
- r: t,
689
- g: o,
690
- b: n,
691
- a
692
- } = e.toRgb(), l = new D(e.toRgbString()).onBackground(r).toHsv();
693
- return a <= 0.5 ? l.v > 0.5 : t * 0.299 + o * 0.587 + n * 0.114 > 192;
694
- }, sr = (e) => {
695
- const {
696
- paddingInline: r,
697
- onlyIconSize: t
698
- } = e;
699
- return ne(e, {
700
- buttonPaddingHorizontal: r,
701
- buttonPaddingVertical: 0,
702
- buttonIconOnlyFontSize: t
703
- });
704
- }, ur = (e) => {
705
- var r, t, o, n, a, l;
706
- const i = (r = e.contentFontSize) !== null && r !== void 0 ? r : e.fontSize, c = (t = e.contentFontSizeSM) !== null && t !== void 0 ? t : e.fontSize, u = (o = e.contentFontSizeLG) !== null && o !== void 0 ? o : e.fontSizeLG, d = (n = e.contentLineHeight) !== null && n !== void 0 ? n : be(i), g = (a = e.contentLineHeightSM) !== null && a !== void 0 ? a : be(c), p = (l = e.contentLineHeightLG) !== null && l !== void 0 ? l : be(u), m = ut(new st(e.colorBgSolid), "#fff") ? "#000" : "#fff";
707
- return {
708
- fontWeight: 400,
709
- defaultShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,
710
- primaryShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,
711
- dangerShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,
712
- primaryColor: e.colorTextLightSolid,
713
- dangerColor: e.colorTextLightSolid,
714
- borderColorDisabled: e.colorBorder,
715
- defaultGhostColor: e.colorBgContainer,
716
- ghostBg: "transparent",
717
- defaultGhostBorderColor: e.colorBgContainer,
718
- paddingInline: e.paddingContentHorizontal - e.lineWidth,
719
- paddingInlineLG: e.paddingContentHorizontal - e.lineWidth,
720
- paddingInlineSM: 8 - e.lineWidth,
721
- onlyIconSize: "inherit",
722
- onlyIconSizeSM: "inherit",
723
- onlyIconSizeLG: "inherit",
724
- groupBorderColor: e.colorPrimaryHover,
725
- linkHoverBg: "transparent",
726
- textTextColor: e.colorText,
727
- textTextHoverColor: e.colorText,
728
- textTextActiveColor: e.colorText,
729
- textHoverBg: e.colorFillTertiary,
730
- defaultColor: e.colorText,
731
- defaultBg: e.colorBgContainer,
732
- defaultBorderColor: e.colorBorder,
733
- defaultBorderColorDisabled: e.colorBorder,
734
- defaultHoverBg: e.colorBgContainer,
735
- defaultHoverColor: e.colorPrimaryHover,
736
- defaultHoverBorderColor: e.colorPrimaryHover,
737
- defaultActiveBg: e.colorBgContainer,
738
- defaultActiveColor: e.colorPrimaryActive,
739
- defaultActiveBorderColor: e.colorPrimaryActive,
740
- solidTextColor: m,
741
- contentFontSize: i,
742
- contentFontSizeSM: c,
743
- contentFontSizeLG: u,
744
- contentLineHeight: d,
745
- contentLineHeightSM: g,
746
- contentLineHeightLG: p,
747
- paddingBlock: Math.max((e.controlHeight - i * d) / 2 - e.lineWidth, 0),
748
- paddingBlockSM: Math.max((e.controlHeightSM - c * g) / 2 - e.lineWidth, 0),
749
- paddingBlockLG: Math.max((e.controlHeightLG - u * p) / 2 - e.lineWidth, 0)
750
- };
751
- }, dt = (e) => {
752
- const {
753
- componentCls: r,
754
- iconCls: t,
755
- fontWeight: o,
756
- opacityLoading: n,
757
- motionDurationSlow: a,
758
- motionEaseInOut: l,
759
- marginXS: i,
760
- calc: c
761
- } = e;
762
- return {
763
- [r]: {
764
- outline: "none",
765
- position: "relative",
766
- display: "inline-flex",
767
- gap: e.marginXS,
768
- alignItems: "center",
769
- justifyContent: "center",
770
- fontWeight: o,
771
- whiteSpace: "nowrap",
772
- textAlign: "center",
773
- backgroundImage: "none",
774
- background: "transparent",
775
- border: `${te(e.lineWidth)} ${e.lineType} transparent`,
776
- cursor: "pointer",
777
- transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
778
- userSelect: "none",
779
- touchAction: "manipulation",
780
- color: e.colorText,
781
- "&:disabled > *": {
782
- pointerEvents: "none"
783
- },
784
- // https://github.com/ant-design/ant-design/issues/51380
785
- [`${r}-icon > svg`]: Rr(),
786
- "> a": {
787
- color: "currentColor"
788
- },
789
- "&:not(:disabled)": Nr(e),
790
- [`&${r}-two-chinese-chars::first-letter`]: {
791
- letterSpacing: "0.34em"
792
- },
793
- [`&${r}-two-chinese-chars > *:not(${t})`]: {
794
- marginInlineEnd: "-0.34em",
795
- letterSpacing: "0.34em"
796
- },
797
- [`&${r}-icon-only`]: {
798
- paddingInline: 0,
799
- // make `btn-icon-only` not too narrow
800
- [`&${r}-compact-item`]: {
801
- flex: "none"
802
- },
803
- [`&${r}-round`]: {
804
- width: "auto"
805
- }
806
- },
807
- // Loading
808
- [`&${r}-loading`]: {
809
- opacity: n,
810
- cursor: "default"
811
- },
812
- [`${r}-loading-icon`]: {
813
- transition: ["width", "opacity", "margin"].map((u) => `${u} ${a} ${l}`).join(",")
814
- },
815
- // iconPosition
816
- [`&:not(${r}-icon-end)`]: {
817
- [`${r}-loading-icon-motion`]: {
818
- "&-appear-start, &-enter-start": {
819
- marginInlineEnd: c(i).mul(-1).equal()
820
- },
821
- "&-appear-active, &-enter-active": {
822
- marginInlineEnd: 0
823
- },
824
- "&-leave-start": {
825
- marginInlineEnd: 0
826
- },
827
- "&-leave-active": {
828
- marginInlineEnd: c(i).mul(-1).equal()
829
- }
830
- }
831
- },
832
- "&-icon-end": {
833
- flexDirection: "row-reverse",
834
- [`${r}-loading-icon-motion`]: {
835
- "&-appear-start, &-enter-start": {
836
- marginInlineStart: c(i).mul(-1).equal()
837
- },
838
- "&-appear-active, &-enter-active": {
839
- marginInlineStart: 0
840
- },
841
- "&-leave-start": {
842
- marginInlineStart: 0
843
- },
844
- "&-leave-active": {
845
- marginInlineStart: c(i).mul(-1).equal()
846
- }
847
- }
848
- }
849
- }
850
- };
851
- }, dr = (e, r, t) => ({
852
- [`&:not(:disabled):not(${e}-disabled)`]: {
853
- "&:hover": r,
854
- "&:active": t
855
- }
856
- }), gt = (e) => ({
857
- minWidth: e.controlHeight,
858
- paddingInlineStart: 0,
859
- paddingInlineEnd: 0,
860
- borderRadius: "50%"
861
- }), ft = (e) => ({
862
- borderRadius: e.controlHeight,
863
- paddingInlineStart: e.calc(e.controlHeight).div(2).equal(),
864
- paddingInlineEnd: e.calc(e.controlHeight).div(2).equal()
865
- }), mt = (e) => ({
866
- cursor: "not-allowed",
867
- borderColor: e.borderColorDisabled,
868
- color: e.colorTextDisabled,
869
- background: e.colorBgContainerDisabled,
870
- boxShadow: "none"
871
- }), He = (e, r, t, o, n, a, l, i) => ({
872
- [`&${e}-background-ghost`]: Object.assign(Object.assign({
873
- color: t || void 0,
874
- background: r,
875
- borderColor: o || void 0,
876
- boxShadow: "none"
877
- }, dr(e, Object.assign({
878
- background: r
879
- }, l), Object.assign({
880
- background: r
881
- }, i))), {
882
- "&:disabled": {
883
- cursor: "not-allowed",
884
- color: n || void 0,
885
- borderColor: a || void 0
886
- }
887
- })
888
- }), Ct = (e) => ({
889
- [`&:disabled, &${e.componentCls}-disabled`]: Object.assign({}, mt(e))
890
- }), ht = (e) => ({
891
- [`&:disabled, &${e.componentCls}-disabled`]: {
892
- cursor: "not-allowed",
893
- color: e.colorTextDisabled
894
- }
895
- }), ae = (e, r, t, o) => {
896
- const a = o && ["link", "text"].includes(o) ? ht : Ct;
897
- return Object.assign(Object.assign({}, a(e)), dr(e.componentCls, r, t));
898
- }, le = (e, r, t, o, n) => ({
899
- [`&${e.componentCls}-variant-solid`]: Object.assign({
900
- color: r,
901
- background: t
902
- }, ae(e, o, n))
903
- }), ie = (e, r, t, o, n) => ({
904
- [`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]: Object.assign({
905
- borderColor: r,
906
- background: t
907
- }, ae(e, o, n))
908
- }), ce = (e) => ({
909
- [`&${e.componentCls}-variant-dashed`]: {
910
- borderStyle: "dashed"
911
- }
912
- }), se = (e, r, t, o) => ({
913
- [`&${e.componentCls}-variant-filled`]: Object.assign({
914
- boxShadow: "none",
915
- background: r
916
- }, ae(e, t, o))
917
- }), _ = (e, r, t, o, n) => ({
918
- [`&${e.componentCls}-variant-${t}`]: Object.assign({
919
- color: r,
920
- boxShadow: "none"
921
- }, ae(e, o, n, t))
922
- }), pt = (e) => {
923
- const {
924
- componentCls: r
925
- } = e;
926
- return rr.reduce((t, o) => {
927
- const n = e[`${o}6`], a = e[`${o}1`], l = e[`${o}5`], i = e[`${o}2`], c = e[`${o}3`], u = e[`${o}7`], d = `0 ${te(e.controlOutlineWidth)} 0 ${e[`${o}1`]}`;
928
- return Object.assign(Object.assign({}, t), {
929
- [`&${r}-color-${o}`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
930
- color: n,
931
- boxShadow: d
932
- }, le(e, e.colorTextLightSolid, n, {
933
- background: l
934
- }, {
935
- background: u
936
- })), ie(e, n, e.colorBgContainer, {
937
- color: l,
938
- borderColor: l,
939
- background: e.colorBgContainer
940
- }, {
941
- color: u,
942
- borderColor: u,
943
- background: e.colorBgContainer
944
- })), ce(e)), se(e, a, {
945
- background: i
946
- }, {
947
- background: c
948
- })), _(e, n, "link", {
949
- color: l
950
- }, {
951
- color: u
952
- })), _(e, n, "text", {
953
- color: l,
954
- background: a
955
- }, {
956
- color: u,
957
- background: c
958
- }))
959
- });
960
- }, {});
961
- }, bt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
962
- color: e.defaultColor,
963
- boxShadow: e.defaultShadow
964
- }, le(e, e.solidTextColor, e.colorBgSolid, {
965
- color: e.solidTextColor,
966
- background: e.colorBgSolidHover
967
- }, {
968
- color: e.solidTextColor,
969
- background: e.colorBgSolidActive
970
- })), ce(e)), se(e, e.colorFillTertiary, {
971
- background: e.colorFillSecondary
972
- }, {
973
- background: e.colorFill
974
- })), _(e, e.textTextColor, "link", {
975
- color: e.colorLinkHover,
976
- background: e.linkHoverBg
977
- }, {
978
- color: e.colorLinkActive
979
- })), He(e.componentCls, e.ghostBg, e.defaultGhostColor, e.defaultGhostBorderColor, e.colorTextDisabled, e.colorBorder)), vt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
980
- color: e.colorPrimary,
981
- boxShadow: e.primaryShadow
982
- }, ie(e, e.colorPrimary, e.colorBgContainer, {
983
- color: e.colorPrimaryTextHover,
984
- borderColor: e.colorPrimaryHover,
985
- background: e.colorBgContainer
986
- }, {
987
- color: e.colorPrimaryTextActive,
988
- borderColor: e.colorPrimaryActive,
989
- background: e.colorBgContainer
990
- })), ce(e)), se(e, e.colorPrimaryBg, {
991
- background: e.colorPrimaryBgHover
992
- }, {
993
- background: e.colorPrimaryBorder
994
- })), _(e, e.colorLink, "text", {
995
- color: e.colorPrimaryTextHover,
996
- background: e.colorPrimaryBg
997
- }, {
998
- color: e.colorPrimaryTextActive,
999
- background: e.colorPrimaryBorder
1000
- })), He(e.componentCls, e.ghostBg, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
1001
- color: e.colorPrimaryHover,
1002
- borderColor: e.colorPrimaryHover
1003
- }, {
1004
- color: e.colorPrimaryActive,
1005
- borderColor: e.colorPrimaryActive
1006
- })), yt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
1007
- color: e.colorError,
1008
- boxShadow: e.dangerShadow
1009
- }, le(e, e.dangerColor, e.colorError, {
1010
- background: e.colorErrorHover
1011
- }, {
1012
- background: e.colorErrorActive
1013
- })), ie(e, e.colorError, e.colorBgContainer, {
1014
- color: e.colorErrorHover,
1015
- borderColor: e.colorErrorBorderHover
1016
- }, {
1017
- color: e.colorErrorActive,
1018
- borderColor: e.colorErrorActive
1019
- })), ce(e)), se(e, e.colorErrorBg, {
1020
- background: e.colorErrorBgFilledHover
1021
- }, {
1022
- background: e.colorErrorBgActive
1023
- })), _(e, e.colorError, "text", {
1024
- color: e.colorErrorHover,
1025
- background: e.colorErrorBg
1026
- }, {
1027
- color: e.colorErrorHover,
1028
- background: e.colorErrorBgActive
1029
- })), _(e, e.colorError, "link", {
1030
- color: e.colorErrorHover
1031
- }, {
1032
- color: e.colorErrorActive
1033
- })), He(e.componentCls, e.ghostBg, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
1034
- color: e.colorErrorHover,
1035
- borderColor: e.colorErrorHover
1036
- }, {
1037
- color: e.colorErrorActive,
1038
- borderColor: e.colorErrorActive
1039
- })), St = (e) => {
1040
- const {
1041
- componentCls: r
1042
- } = e;
1043
- return Object.assign({
1044
- [`${r}-color-default`]: bt(e),
1045
- [`${r}-color-primary`]: vt(e),
1046
- [`${r}-color-dangerous`]: yt(e)
1047
- }, pt(e));
1048
- }, xt = (e) => Object.assign(Object.assign(Object.assign(Object.assign({}, ie(e, e.defaultBorderColor, e.defaultBg, {
1049
- color: e.defaultHoverColor,
1050
- borderColor: e.defaultHoverBorderColor,
1051
- background: e.defaultHoverBg
1052
- }, {
1053
- color: e.defaultActiveColor,
1054
- borderColor: e.defaultActiveBorderColor,
1055
- background: e.defaultActiveBg
1056
- })), _(e, e.textTextColor, "text", {
1057
- color: e.textTextHoverColor,
1058
- background: e.textHoverBg
1059
- }, {
1060
- color: e.textTextActiveColor,
1061
- background: e.colorBgTextActive
1062
- })), le(e, e.primaryColor, e.colorPrimary, {
1063
- background: e.colorPrimaryHover,
1064
- color: e.primaryColor
1065
- }, {
1066
- background: e.colorPrimaryActive,
1067
- color: e.primaryColor
1068
- })), _(e, e.colorLink, "link", {
1069
- color: e.colorLinkHover,
1070
- background: e.linkHoverBg
1071
- }, {
1072
- color: e.colorLinkActive
1073
- })), Oe = function(e) {
1074
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1075
- const {
1076
- componentCls: t,
1077
- controlHeight: o,
1078
- fontSize: n,
1079
- borderRadius: a,
1080
- buttonPaddingHorizontal: l,
1081
- iconCls: i,
1082
- buttonPaddingVertical: c,
1083
- buttonIconOnlyFontSize: u
1084
- } = e;
1085
- return [
1086
- {
1087
- [r]: {
1088
- fontSize: n,
1089
- height: o,
1090
- padding: `${te(c)} ${te(l)}`,
1091
- borderRadius: a,
1092
- [`&${t}-icon-only`]: {
1093
- width: o,
1094
- [i]: {
1095
- fontSize: u
1096
- }
1097
- }
1098
- }
1099
- },
1100
- // Shape - patch prefixCls again to override solid border radius style
1101
- {
1102
- [`${t}${t}-circle${r}`]: gt(e)
1103
- },
1104
- {
1105
- [`${t}${t}-round${r}`]: ft(e)
1106
- }
1107
- ];
1108
- }, $t = (e) => {
1109
- const r = ne(e, {
1110
- fontSize: e.contentFontSize
1111
- });
1112
- return Oe(r, e.componentCls);
1113
- }, Et = (e) => {
1114
- const r = ne(e, {
1115
- controlHeight: e.controlHeightSM,
1116
- fontSize: e.contentFontSizeSM,
1117
- padding: e.paddingXS,
1118
- buttonPaddingHorizontal: e.paddingInlineSM,
1119
- buttonPaddingVertical: 0,
1120
- borderRadius: e.borderRadiusSM,
1121
- buttonIconOnlyFontSize: e.onlyIconSizeSM
1122
- });
1123
- return Oe(r, `${e.componentCls}-sm`);
1124
- }, Bt = (e) => {
1125
- const r = ne(e, {
1126
- controlHeight: e.controlHeightLG,
1127
- fontSize: e.contentFontSizeLG,
1128
- buttonPaddingHorizontal: e.paddingInlineLG,
1129
- buttonPaddingVertical: 0,
1130
- borderRadius: e.borderRadiusLG,
1131
- buttonIconOnlyFontSize: e.onlyIconSizeLG
1132
- });
1133
- return Oe(r, `${e.componentCls}-lg`);
1134
- }, Ht = (e) => {
1135
- const {
1136
- componentCls: r
1137
- } = e;
1138
- return {
1139
- [r]: {
1140
- [`&${r}-block`]: {
1141
- width: "100%"
1142
- }
1143
- }
1144
- };
1145
- }, Ot = Or("Button", (e) => {
1146
- const r = sr(e);
1147
- return [
1148
- // Shared
1149
- dt(r),
1150
- // Size
1151
- $t(r),
1152
- Et(r),
1153
- Bt(r),
1154
- // Block
1155
- Ht(r),
1156
- // Color
1157
- St(r),
1158
- // https://github.com/ant-design/ant-design/issues/50969
1159
- xt(r),
1160
- // Button Group
1161
- qr(r)
1162
- ];
1163
- }, ur, {
1164
- unitless: {
1165
- fontWeight: !0,
1166
- contentLineHeight: !0,
1167
- contentLineHeightSM: !0,
1168
- contentLineHeightLG: !0
1169
- }
1170
- });
1171
- function Rt(e, r) {
1172
- return {
1173
- // border collapse
1174
- [`&-item:not(${r}-last-item)`]: {
1175
- marginBottom: e.calc(e.lineWidth).mul(-1).equal()
1176
- },
1177
- "&-item": {
1178
- "&:hover,&:focus,&:active": {
1179
- zIndex: 2
1180
- },
1181
- "&[disabled]": {
1182
- zIndex: 0
1183
- }
1184
- }
1185
- };
1186
- }
1187
- function Nt(e, r) {
1188
- return {
1189
- [`&-item:not(${r}-first-item):not(${r}-last-item)`]: {
1190
- borderRadius: 0
1191
- },
1192
- [`&-item${r}-first-item:not(${r}-last-item)`]: {
1193
- [`&, &${e}-sm, &${e}-lg`]: {
1194
- borderEndEndRadius: 0,
1195
- borderEndStartRadius: 0
1196
- }
1197
- },
1198
- [`&-item${r}-last-item:not(${r}-first-item)`]: {
1199
- [`&, &${e}-sm, &${e}-lg`]: {
1200
- borderStartStartRadius: 0,
1201
- borderStartEndRadius: 0
1202
- }
1203
- }
1204
- };
1205
- }
1206
- function Pt(e) {
1207
- const r = `${e.componentCls}-compact-vertical`;
1208
- return {
1209
- [r]: Object.assign(Object.assign({}, Rt(e, r)), Nt(e.componentCls, r))
1210
- };
1211
- }
1212
- const jt = (e) => {
1213
- const {
1214
- componentCls: r,
1215
- colorPrimaryHover: t,
1216
- lineWidth: o,
1217
- calc: n
1218
- } = e, a = n(o).mul(-1).equal(), l = (i) => {
1219
- const c = `${r}-compact${i ? "-vertical" : ""}-item${r}-primary:not([disabled])`;
1220
- return {
1221
- [`${c} + ${c}::before`]: {
1222
- position: "absolute",
1223
- top: i ? a : 0,
1224
- insetInlineStart: i ? 0 : a,
1225
- backgroundColor: t,
1226
- content: '""',
1227
- width: i ? "100%" : o,
1228
- height: i ? o : "100%"
1229
- }
1230
- };
1231
- };
1232
- return Object.assign(Object.assign({}, l()), l(!0));
1233
- }, wt = Pr(["Button", "compact"], (e) => {
1234
- const r = sr(e);
1235
- return [
1236
- // Space Compact
1237
- Mr(r),
1238
- Pt(r),
1239
- jt(r)
1240
- ];
1241
- }, ur);
1242
- var It = function(e, r) {
1243
- var t = {};
1244
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
1245
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
1246
- r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
1247
- return t;
1248
- };
1249
- function Dt(e) {
1250
- if (typeof e == "object" && e) {
1251
- let r = e == null ? void 0 : e.delay;
1252
- return r = !Number.isNaN(r) && typeof r == "number" ? r : 0, {
1253
- loading: r <= 0,
1254
- delay: r
1255
- };
1256
- }
1257
- return {
1258
- loading: !!e,
1259
- delay: 0
1260
- };
1261
- }
1262
- const Lt = {
1263
- default: ["default", "outlined"],
1264
- primary: ["primary", "solid"],
1265
- dashed: ["default", "dashed"],
1266
- link: ["primary", "link"],
1267
- text: ["default", "text"]
1268
- }, Tt = /* @__PURE__ */ s.forwardRef((e, r) => {
1269
- var t, o, n, a;
1270
- const {
1271
- loading: l = !1,
1272
- prefixCls: i,
1273
- color: c,
1274
- variant: u,
1275
- type: d,
1276
- danger: g = !1,
1277
- shape: p = "default",
1278
- size: m,
1279
- styles: C,
1280
- disabled: y,
1281
- className: E,
1282
- rootClassName: H,
1283
- children: B,
1284
- icon: S,
1285
- iconPosition: f = "start",
1286
- ghost: h = !1,
1287
- block: U = !1,
1288
- // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
1289
- htmlType: J = "button",
1290
- classNames: O,
1291
- style: G = {},
1292
- autoInsertSpace: L,
1293
- autoFocus: Q
1294
- } = e, F = It(e, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]), T = d || "default", [z, R] = ee(() => {
1295
- if (c && u)
1296
- return [c, u];
1297
- const $ = Lt[T] || [];
1298
- return g ? ["danger", $[1]] : $;
1299
- }, [d, c, u, g]), M = z === "danger" ? "dangerous" : z, {
1300
- getPrefixCls: P,
1301
- direction: b,
1302
- button: x
1303
- } = he(Qe), ue = (t = L ?? (x == null ? void 0 : x.autoInsertSpace)) !== null && t !== void 0 ? t : !0, v = P("btn", i), [Ne, gr, fr] = Ot(v), mr = he(jr), W = y ?? mr, Cr = he(tr), Z = ee(() => Dt(l), [l]), [A, Pe] = xe(Z.loading), [de, je] = xe(!1), K = j(null), we = wr(r, K), Ie = vr.count(B) === 1 && !S && !re(R), ge = j(!0);
1304
- s.useEffect(() => (ge.current = !1, () => {
1305
- ge.current = !0;
1306
- }), []), k(() => {
1307
- let $ = null;
1308
- Z.delay > 0 ? $ = setTimeout(() => {
1309
- $ = null, Pe(!0);
1310
- }, Z.delay) : Pe(Z.loading);
1311
- function w() {
1312
- $ && (clearTimeout($), $ = null);
1313
- }
1314
- return w;
1315
- }, [Z]), k(() => {
1316
- if (!K.current || !ue)
1317
- return;
1318
- const $ = K.current.textContent || "";
1319
- Ie && Ee($) ? de || je(!0) : de && je(!1);
1320
- }), k(() => {
1321
- Q && K.current && K.current.focus();
1322
- }, []);
1323
- const De = s.useCallback(($) => {
1324
- var w;
1325
- if (A || W) {
1326
- $.preventDefault();
1327
- return;
1328
- }
1329
- (w = e.onClick) === null || w === void 0 || w.call(e, $);
1330
- }, [e.onClick, A, W]);
1331
- if (process.env.NODE_ENV !== "production") {
1332
- const $ = Ze("Button");
1333
- process.env.NODE_ENV !== "production" && $(!(typeof S == "string" && S.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${S}\` at https://ant.design/components/icon`), process.env.NODE_ENV !== "production" && $(!(h && re(R)), "usage", "`link` or `text` button can't be a `ghost` button.");
1334
- }
1335
- const {
1336
- compactSize: hr,
1337
- compactItemClassnames: Le
1338
- } = Lr(v, b), pr = {
1339
- large: "lg",
1340
- small: "sm",
1341
- middle: void 0
1342
- }, Te = Dr(($) => {
1343
- var w, Ce;
1344
- return (Ce = (w = m ?? hr) !== null && w !== void 0 ? w : Cr) !== null && Ce !== void 0 ? Ce : $;
1345
- }), ze = Te && (o = pr[Te]) !== null && o !== void 0 ? o : "", br = A ? "loading" : S, fe = Sr(F, ["navigate"]), Ae = N(v, gr, fr, {
1346
- [`${v}-${p}`]: p !== "default" && p,
1347
- // line(253 - 254): Compatible with versions earlier than 5.21.0
1348
- [`${v}-${T}`]: T,
1349
- [`${v}-dangerous`]: g,
1350
- [`${v}-color-${M}`]: M,
1351
- [`${v}-variant-${R}`]: R,
1352
- [`${v}-${ze}`]: ze,
1353
- [`${v}-icon-only`]: !B && B !== 0 && !!br,
1354
- [`${v}-background-ghost`]: h && !re(R),
1355
- [`${v}-loading`]: A,
1356
- [`${v}-two-chinese-chars`]: de && ue && !A,
1357
- [`${v}-block`]: U,
1358
- [`${v}-rtl`]: b === "rtl",
1359
- [`${v}-icon-end`]: f === "end"
1360
- }, Le, E, H, x == null ? void 0 : x.className), _e = Object.assign(Object.assign({}, x == null ? void 0 : x.style), G), Me = N(O == null ? void 0 : O.icon, (n = x == null ? void 0 : x.classNames) === null || n === void 0 ? void 0 : n.icon), Ge = Object.assign(Object.assign({}, (C == null ? void 0 : C.icon) || {}), ((a = x == null ? void 0 : x.styles) === null || a === void 0 ? void 0 : a.icon) || {}), Fe = S && !A ? /* @__PURE__ */ s.createElement(Be, {
1361
- prefixCls: v,
1362
- className: Me,
1363
- style: Ge
1364
- }, S) : l && typeof l == "object" && l.icon ? /* @__PURE__ */ s.createElement(Be, {
1365
- prefixCls: v,
1366
- className: Me,
1367
- style: Ge
1368
- }, l.icon) : /* @__PURE__ */ s.createElement(Xr, {
1369
- existIcon: !!S,
1370
- prefixCls: v,
1371
- loading: A,
1372
- mount: ge.current
1373
- }), Ve = B || B === 0 ? Wr(B, Ie && ue) : null;
1374
- if (fe.href !== void 0)
1375
- return Ne(/* @__PURE__ */ s.createElement("a", Object.assign({}, fe, {
1376
- className: N(Ae, {
1377
- [`${v}-disabled`]: W
1378
- }),
1379
- href: W ? void 0 : fe.href,
1380
- style: _e,
1381
- onClick: De,
1382
- ref: we,
1383
- tabIndex: W ? -1 : 0
1384
- }), Fe, Ve));
1385
- let me = /* @__PURE__ */ s.createElement("button", Object.assign({}, F, {
1386
- type: J,
1387
- className: Ae,
1388
- style: _e,
1389
- onClick: De,
1390
- disabled: W,
1391
- ref: we
1392
- }), Fe, Ve, Le && /* @__PURE__ */ s.createElement(wt, {
1393
- prefixCls: v
1394
- }));
1395
- return re(R) || (me = /* @__PURE__ */ s.createElement(Ir, {
1396
- component: "Button",
1397
- disabled: A
1398
- }, me)), Ne(me);
1399
- }), Re = Tt;
1400
- Re.Group = Fr;
1401
- Re.__ANT_BUTTON = !0;
1402
- process.env.NODE_ENV !== "production" && (Re.displayName = "Button");
1403
- export {
1404
- Re as B,
1405
- Qt as c
1406
- };