@zjpcy/simple-design 1.6.0 → 1.8.2

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 (293) hide show
  1. package/README.md +178 -26
  2. package/dist/cjs/components/Anchor/index.js +1 -0
  3. package/dist/cjs/components/Breadcrumb/index.js +1 -0
  4. package/dist/cjs/components/Button/Button.js +1 -0
  5. package/dist/cjs/components/Calendar/index.js +1 -0
  6. package/dist/cjs/components/Carousel/index.js +1 -0
  7. package/dist/cjs/components/Cascader/index.js +1 -0
  8. package/dist/cjs/components/Checkbox/index.js +1 -0
  9. package/dist/cjs/components/ColorPicker/ColorPickerPanel.js +1 -0
  10. package/dist/cjs/components/ColorPicker/index.js +1 -0
  11. package/dist/cjs/components/CopyToClipboard/index.js +1 -0
  12. package/dist/cjs/components/DatePicker/RangePicker.js +1 -0
  13. package/dist/cjs/components/DatePicker/index.js +1 -0
  14. package/dist/cjs/components/DatePicker/styles.js +1 -0
  15. package/dist/cjs/components/Divider/index.js +1 -0
  16. package/dist/cjs/components/Drawer/index.js +1 -0
  17. package/dist/cjs/components/Dropdown/index.js +1 -0
  18. package/dist/cjs/components/Empty/index.js +1 -0
  19. package/dist/cjs/components/Flex/index.js +1 -0
  20. package/dist/cjs/components/Form/index.js +1 -0
  21. package/dist/cjs/components/Form/styles.js +1 -0
  22. package/dist/cjs/components/Grid/index.js +1 -0
  23. package/dist/cjs/components/Grid/styles.js +1 -0
  24. package/dist/cjs/components/Hooks/useClickOutside.js +1 -0
  25. package/dist/cjs/components/Hooks/useCopy.js +1 -0
  26. package/dist/cjs/components/Icon/Icon.js +1 -0
  27. package/dist/cjs/components/Icon/index.js +1 -0
  28. package/dist/cjs/components/Icon/path.js +1 -0
  29. package/dist/cjs/components/Input/InputBase.js +1 -0
  30. package/dist/cjs/components/Input/Number.js +1 -0
  31. package/dist/cjs/components/Input/Password.js +1 -0
  32. package/dist/cjs/components/Input/Search.js +1 -0
  33. package/dist/cjs/components/Input/Textarea.js +1 -0
  34. package/dist/cjs/components/Input/index.js +1 -0
  35. package/dist/cjs/components/Label/index.js +1 -0
  36. package/dist/cjs/components/Label/styles.js +1 -0
  37. package/dist/cjs/components/Layout/LayoutContext.js +1 -0
  38. package/dist/cjs/components/Layout/index.js +1 -0
  39. package/dist/cjs/components/Layout/styles.js +1 -0
  40. package/dist/cjs/components/Marquee/index.js +1 -0
  41. package/dist/cjs/components/Masonry/index.js +1 -0
  42. package/dist/cjs/components/Menu/index.js +1 -0
  43. package/dist/cjs/components/Message/Message.js +1 -0
  44. package/dist/cjs/components/Message/index.js +1 -0
  45. package/dist/cjs/components/Modal/index.js +1 -0
  46. package/dist/cjs/components/Notification/Notification.js +1 -0
  47. package/dist/cjs/components/Pagination/index.js +1 -0
  48. package/dist/cjs/components/Popconfirm/index.js +1 -0
  49. package/dist/cjs/components/Progress/index.js +1 -0
  50. package/dist/cjs/components/Radio/index.js +1 -0
  51. package/dist/cjs/components/Rate/index.js +1 -0
  52. package/dist/cjs/components/Select/index.js +1 -0
  53. package/dist/cjs/components/Select/styles.js +1 -0
  54. package/dist/cjs/components/Slider/index.js +1 -0
  55. package/dist/cjs/components/Space/index.js +1 -0
  56. package/dist/cjs/components/Spin/index.js +1 -0
  57. package/dist/cjs/components/Splitter/index.js +1 -0
  58. package/dist/cjs/components/Splitter/styles.js +1 -0
  59. package/dist/cjs/components/Steps/index.js +1 -0
  60. package/dist/cjs/components/Switch/index.js +1 -0
  61. package/dist/cjs/components/Switch/styles.js +1 -0
  62. package/dist/cjs/components/Table/SortableRow.js +1 -0
  63. package/dist/cjs/components/Table/index.js +1 -0
  64. package/dist/cjs/components/Tabs/index.js +1 -0
  65. package/dist/cjs/components/Tag/index.js +1 -0
  66. package/dist/cjs/components/TimePicker/RangePicker.js +1 -0
  67. package/dist/cjs/components/TimePicker/TimePickerPanel.js +1 -0
  68. package/dist/cjs/components/TimePicker/index.js +1 -0
  69. package/dist/cjs/components/Tooltip/Tooltip.js +1 -0
  70. package/dist/cjs/components/Top/index.js +1 -0
  71. package/dist/cjs/components/Transfer/index.js +1 -0
  72. package/dist/cjs/components/Transfer/styles.js +1 -0
  73. package/dist/cjs/components/Tree/index.js +1 -0
  74. package/dist/cjs/components/TreeSelect/index.js +1 -0
  75. package/dist/cjs/components/TreeSelect/styles.js +1 -0
  76. package/dist/cjs/components/Typography/index.js +1 -0
  77. package/dist/cjs/components/Upload/index.js +1 -0
  78. package/dist/cjs/components/Upload/useChunkUpload.js +1 -0
  79. package/dist/cjs/components/index.js +1 -0
  80. package/dist/cjs/i18n/I18nProvider.js +1 -0
  81. package/dist/cjs/i18n/index.js +1 -0
  82. package/dist/cjs/i18n/locales/en-US.json.js +1 -0
  83. package/dist/cjs/i18n/locales/zh-CN.json.js +1 -0
  84. package/dist/cjs/index.css +11725 -6076
  85. package/dist/es/components/Anchor/index.js +1 -0
  86. package/dist/es/components/Button/Button.js +1 -0
  87. package/dist/es/components/Calendar/index.js +1 -0
  88. package/dist/es/components/Carousel/index.js +1 -0
  89. package/dist/es/components/Cascader/index.js +1 -0
  90. package/dist/es/components/Checkbox/index.js +1 -0
  91. package/dist/es/components/ColorPicker/ColorPickerPanel.js +1 -0
  92. package/dist/es/components/ColorPicker/index.js +1 -0
  93. package/dist/es/components/CopyToClipboard/index.js +1 -0
  94. package/dist/es/components/DatePicker/RangePicker.js +1 -0
  95. package/dist/es/components/DatePicker/index.js +1 -0
  96. package/dist/es/components/DatePicker/styles.js +1 -0
  97. package/dist/es/components/Divider/index.js +1 -0
  98. package/dist/es/components/Drawer/index.js +1 -0
  99. package/dist/es/components/Flex/index.js +1 -0
  100. package/dist/es/components/Form/index.js +1 -0
  101. package/dist/es/components/Form/styles.js +1 -0
  102. package/dist/es/components/Grid/index.js +1 -0
  103. package/dist/es/components/Grid/styles.js +1 -0
  104. package/dist/es/components/Hooks/useCopy.js +1 -0
  105. package/dist/es/components/Icon/Icon.js +1 -0
  106. package/dist/es/components/Input/InputBase.js +1 -0
  107. package/dist/es/components/Input/Number.js +1 -0
  108. package/dist/es/components/Input/Password.js +1 -0
  109. package/dist/es/components/Input/Search.js +1 -0
  110. package/dist/es/components/Input/Textarea.js +1 -0
  111. package/dist/es/components/Label/index.js +1 -0
  112. package/dist/es/components/Label/styles.js +1 -0
  113. package/dist/es/components/Layout/index.js +1 -0
  114. package/dist/es/components/Layout/styles.js +1 -0
  115. package/dist/es/components/Marquee/index.js +1 -0
  116. package/dist/es/components/Masonry/index.js +1 -0
  117. package/dist/es/components/Menu/index.js +1 -0
  118. package/dist/es/components/Message/index.js +1 -0
  119. package/dist/es/components/Modal/index.js +1 -0
  120. package/dist/es/components/Notification/Notification.js +1 -0
  121. package/dist/es/components/Popconfirm/index.js +1 -0
  122. package/dist/es/components/Progress/index.js +1 -0
  123. package/dist/es/components/Radio/index.js +1 -0
  124. package/dist/es/components/Select/index.js +1 -0
  125. package/dist/es/components/Select/styles.js +1 -0
  126. package/dist/es/components/Slider/index.js +1 -0
  127. package/dist/es/components/Space/index.js +1 -0
  128. package/dist/es/components/Splitter/index.js +1 -0
  129. package/dist/es/components/Splitter/styles.js +1 -0
  130. package/dist/es/components/Switch/index.js +1 -0
  131. package/dist/es/components/Switch/styles.js +1 -0
  132. package/dist/es/components/Table/SortableRow.js +1 -0
  133. package/dist/es/components/Table/index.js +1 -0
  134. package/dist/es/components/Tabs/index.js +1 -0
  135. package/dist/es/components/Tag/index.js +1 -0
  136. package/dist/es/components/TimePicker/RangePicker.js +1 -0
  137. package/dist/es/components/TimePicker/TimePickerPanel.js +1 -0
  138. package/dist/es/components/TimePicker/index.js +1 -0
  139. package/dist/es/components/Tooltip/Tooltip.js +1 -0
  140. package/dist/es/components/Top/index.js +1 -0
  141. package/dist/es/components/Transfer/index.js +1 -0
  142. package/dist/es/components/Transfer/styles.js +1 -0
  143. package/dist/es/components/Tree/index.js +1 -0
  144. package/dist/es/components/TreeSelect/index.js +1 -0
  145. package/dist/es/components/TreeSelect/styles.js +1 -0
  146. package/dist/es/components/Typography/index.js +1 -0
  147. package/dist/es/components/Upload/index.js +1 -0
  148. package/dist/es/components/Upload/useChunkUpload.js +1 -0
  149. package/dist/es/components/index.js +1 -0
  150. package/dist/es/i18n/I18nProvider.js +1 -0
  151. package/dist/es/i18n/index.js +1 -0
  152. package/dist/es/i18n/locales/en-US.json.js +1 -0
  153. package/dist/es/i18n/locales/zh-CN.json.js +1 -0
  154. package/dist/es/index.css +11725 -6076
  155. package/dist/i18n/locales/en-US.json +2 -3
  156. package/dist/i18n/locales/zh-CN.json +1 -1
  157. package/dist/types/components/ColorPicker/ColorPickerPanel.d.ts +21 -0
  158. package/dist/types/components/DatePicker/styles.d.ts +118 -152
  159. package/dist/types/components/Form/styles.d.ts +84 -22
  160. package/dist/types/components/Grid/styles.d.ts +36 -6
  161. package/dist/types/components/Label/styles.d.ts +16 -1
  162. package/dist/types/components/Label/types.d.ts +1 -0
  163. package/dist/types/components/Layout/styles.d.ts +131 -41
  164. package/dist/types/components/Marquee/index.d.ts +1 -1
  165. package/dist/types/components/Message/index.d.ts +1 -1
  166. package/dist/types/components/Select/styles.d.ts +254 -44
  167. package/dist/types/components/Switch/index.d.ts +1 -0
  168. package/dist/types/components/Switch/styles.d.ts +116 -35
  169. package/dist/types/components/Switch/types.d.ts +4 -0
  170. package/dist/types/components/TimePicker/styles.d.ts +153 -25
  171. package/dist/types/components/Top/index.d.ts +1 -1
  172. package/dist/types/components/Transfer/styles.d.ts +205 -66
  173. package/dist/types/components/TreeSelect/index.d.ts +1 -0
  174. package/dist/types/components/TreeSelect/styles.d.ts +295 -55
  175. package/dist/types/components/TreeSelect/types.d.ts +3 -1
  176. package/dist/types/components/Upload/index.d.ts +2 -2
  177. package/dist/types/components/Upload/styles.d.ts +150 -24
  178. package/dist/types/components/Upload/types.d.ts +279 -15
  179. package/dist/types/components/Upload/useChunkUpload.d.ts +27 -0
  180. package/dist/types/components/index.d.ts +4 -3
  181. package/dist/types/i18n/index.d.ts +1 -1
  182. package/dist/types/utils/dnd-kit-adapter.d.ts +2 -0
  183. package/dist/types/utils/i18n-adapter.d.ts +5 -0
  184. package/dist/types/utils/lunar-adapter.d.ts +2 -0
  185. package/package.json +29 -13
  186. package/dist/cjs/index.js +0 -1
  187. package/dist/es/Anchor/index.js +0 -1
  188. package/dist/es/Button/Button.js +0 -1
  189. package/dist/es/Calendar/index.js +0 -1
  190. package/dist/es/Carousel/index.js +0 -1
  191. package/dist/es/Cascader/index.js +0 -1
  192. package/dist/es/Checkbox/index.js +0 -1
  193. package/dist/es/ColorPicker/index.js +0 -1
  194. package/dist/es/CopyToClipboard/index.js +0 -1
  195. package/dist/es/DatePicker/RangePicker.js +0 -1
  196. package/dist/es/DatePicker/index.js +0 -1
  197. package/dist/es/DatePicker/styles.js +0 -1
  198. package/dist/es/Divider/index.js +0 -1
  199. package/dist/es/Drawer/index.js +0 -1
  200. package/dist/es/Flex/index.js +0 -1
  201. package/dist/es/Form/index.js +0 -1
  202. package/dist/es/Form/styles.js +0 -1
  203. package/dist/es/Grid/index.js +0 -1
  204. package/dist/es/Grid/styles.js +0 -1
  205. package/dist/es/Hooks/useCopy.js +0 -1
  206. package/dist/es/Icon/Icon.js +0 -1
  207. package/dist/es/Input/InputBase.js +0 -1
  208. package/dist/es/Input/Number.js +0 -1
  209. package/dist/es/Input/Password.js +0 -1
  210. package/dist/es/Input/Search.js +0 -1
  211. package/dist/es/Input/Textarea.js +0 -1
  212. package/dist/es/Label/index.js +0 -1
  213. package/dist/es/Label/styles.js +0 -1
  214. package/dist/es/Layout/index.js +0 -1
  215. package/dist/es/Layout/styles.js +0 -1
  216. package/dist/es/Marquee/index.js +0 -1
  217. package/dist/es/Masonry/index.js +0 -1
  218. package/dist/es/Menu/index.js +0 -1
  219. package/dist/es/Message/index.js +0 -1
  220. package/dist/es/Modal/index.js +0 -1
  221. package/dist/es/Notice/Notice.js +0 -1
  222. package/dist/es/Notification/Notification.js +0 -1
  223. package/dist/es/Popconfirm/index.js +0 -1
  224. package/dist/es/Progress/index.js +0 -1
  225. package/dist/es/Radio/index.js +0 -1
  226. package/dist/es/Select/index.js +0 -1
  227. package/dist/es/Select/styles.js +0 -1
  228. package/dist/es/Slider/index.js +0 -1
  229. package/dist/es/Space/index.js +0 -1
  230. package/dist/es/Splitter/index.js +0 -1
  231. package/dist/es/Splitter/styles.js +0 -1
  232. package/dist/es/Switch/index.js +0 -1
  233. package/dist/es/Switch/styles.js +0 -1
  234. package/dist/es/Table/SortableRow.js +0 -1
  235. package/dist/es/Table/index.js +0 -1
  236. package/dist/es/Tabs/index.js +0 -1
  237. package/dist/es/Tag/index.js +0 -1
  238. package/dist/es/TimePicker/RangePicker.js +0 -1
  239. package/dist/es/TimePicker/TimePickerPanel.js +0 -1
  240. package/dist/es/TimePicker/index.js +0 -1
  241. package/dist/es/Tooltip/Tooltip.js +0 -1
  242. package/dist/es/Top/index.js +0 -1
  243. package/dist/es/Transfer/index.js +0 -1
  244. package/dist/es/Transfer/styles.js +0 -1
  245. package/dist/es/Tree/index.js +0 -1
  246. package/dist/es/TreeSelect/index.js +0 -1
  247. package/dist/es/TreeSelect/styles.js +0 -1
  248. package/dist/es/Typography/index.js +0 -1
  249. package/dist/es/Upload/index.js +0 -1
  250. package/dist/es/_virtual/index.js +0 -1
  251. package/dist/es/_virtual/index2.js +0 -1
  252. package/dist/es/_virtual/use-sync-external-store-shim.development.js +0 -1
  253. package/dist/es/_virtual/use-sync-external-store-shim.production.js +0 -1
  254. package/dist/es/index.js +0 -1
  255. package/dist/es/node_modules/i18next/dist/esm/i18next.js +0 -1
  256. package/dist/es/node_modules/react-fast-marquee/dist/index.js +0 -1
  257. package/dist/es/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -1
  258. package/dist/es/node_modules/react-i18next/dist/es/context.js +0 -1
  259. package/dist/es/node_modules/react-i18next/dist/es/defaults.js +0 -1
  260. package/dist/es/node_modules/react-i18next/dist/es/i18nInstance.js +0 -1
  261. package/dist/es/node_modules/react-i18next/dist/es/initReactI18next.js +0 -1
  262. package/dist/es/node_modules/react-i18next/dist/es/unescape.js +0 -1
  263. package/dist/es/node_modules/react-i18next/dist/es/useTranslation.js +0 -1
  264. package/dist/es/node_modules/react-i18next/dist/es/utils.js +0 -1
  265. package/dist/es/node_modules/react-icons/fa/index.js +0 -1
  266. package/dist/es/node_modules/react-icons/io5/index.js +0 -1
  267. package/dist/es/node_modules/react-icons/lib/iconBase.js +0 -1
  268. package/dist/es/node_modules/react-icons/lib/iconContext.js +0 -1
  269. package/dist/es/node_modules/tslib/tslib.es6.js +0 -1
  270. package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -1
  271. package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -1
  272. package/dist/es/node_modules/use-sync-external-store/shim/index.js +0 -1
  273. package/dist/es/src/i18n/I18nProvider.js +0 -1
  274. package/dist/es/src/i18n/index.js +0 -1
  275. package/dist/es/src/i18n/locales/en-US.json.js +0 -1
  276. package/dist/es/src/i18n/locales/zh-CN.json.js +0 -1
  277. package/dist/types/components/Drawer/styles.d.ts +0 -0
  278. package/dist/types/components/Menu/styles.d.ts +0 -7
  279. package/dist/types/components/Notice/Notice.d.ts +0 -18
  280. package/dist/types/components/Progress/styles.d.ts +0 -0
  281. /package/dist/es/{Breadcrumb → components/Breadcrumb}/index.js +0 -0
  282. /package/dist/es/{Dropdown → components/Dropdown}/index.js +0 -0
  283. /package/dist/es/{Empty → components/Empty}/index.js +0 -0
  284. /package/dist/es/{Hooks → components/Hooks}/useClickOutside.js +0 -0
  285. /package/dist/es/{Icon → components/Icon}/index.js +0 -0
  286. /package/dist/es/{Icon → components/Icon}/path.js +0 -0
  287. /package/dist/es/{Input → components/Input}/index.js +0 -0
  288. /package/dist/es/{Layout → components/Layout}/LayoutContext.js +0 -0
  289. /package/dist/es/{Message → components/Message}/Message.js +0 -0
  290. /package/dist/es/{Pagination → components/Pagination}/index.js +0 -0
  291. /package/dist/es/{Rate → components/Rate}/index.js +0 -0
  292. /package/dist/es/{Spin → components/Spin}/index.js +0 -0
  293. /package/dist/es/{Steps → components/Steps}/index.js +0 -0
@@ -1 +0,0 @@
1
- import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import o from"styled-components";var r=function(n,o){return"var(".concat(n,", ").concat(o,")")},e=o.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n /* 使用更明确的默认值,避免 SSR 时 theme 为 undefined 导致黑色背景闪烁 */\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n /* SSR 安全:确保服务端和客户端初始渲染一致 */\n @media (prefers-color-scheme: dark) {\n /* 在暗色模式下默认使用 light 主题避免闪烁,由 JS 控制实际主题 */\n }\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n /* 使用更明确的默认值,避免 SSR 时 theme 为 undefined 导致黑色背景闪烁 */\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n /* SSR 安全:确保服务端和客户端初始渲染一致 */\n @media (prefers-color-scheme: dark) {\n /* 在暗色模式下默认使用 light 主题避免闪烁,由 JS 控制实际主题 */\n }\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-min-height","100vh"),function(n){return"dark"===n.$theme?"linear-gradient(180deg, ".concat(r("--layout-bg-dark","#001529")," 0%, ").concat(r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")," 100%)"):"linear-gradient(180deg, ".concat(r("--layout-bg-light","#f5f5f5")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return n.$hasSider&&"\n flex-direction: row;\n align-items: stretch;\n "}),t=o.header(u||(u=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* 确保默认使用亮色主题,避免 SSR 闪烁 */\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* 确保默认使用亮色主题,避免 SSR 闪烁 */\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-header-padding","0 24px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-header-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-header-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-header-color-dark","#fff"):r("--layout-header-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-header-height","60px")},r("--layout-header-z-index","10"),r("--layout-header-transition","all 0.2s ease-in-out"),function(n){var o=n.$bgColor;return"1px solid ".concat(o)},function(n){return n.$fixed&&"\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n box-shadow: ".concat(r("--layout-header-box-shadow","0 2px 8px rgba(0, 0, 0, 0.15)"),";\n ")}),a=o.aside(s||(s=n(["\n display: flex;\n flex-direction: column;\n /* SSR 安全:明确处理 theme 为 undefined 的情况,默认使用亮色主题 */\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"],["\n display: flex;\n flex-direction: column;\n /* SSR 安全:明确处理 theme 为 undefined 的情况,默认使用亮色主题 */\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"])),function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.background)?e.background:"dark"===o?"linear-gradient(180deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(180deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.color)?e.color:"dark"===o?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-sider-z-index","10"),r("--layout-sider-transition","all 0.2s ease-in-out"),r("--layout-sider-flex","0 0 200px"),function(n){return"dark"===n.$theme?"var(--layout-sider-border, 1px solid #303030)":"var(--layout-sider-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},function(n){return"dark"===n.$theme?"2px 0 8px rgba(0, 0, 0, 0.3)":r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.08)")},function(n){var o=n.$width,e=n.$collapsedWidth,t=n.$collapsed,a="number"==typeof o?"".concat(o,"px"):o||r("--layout-sider-width","200px"),i=void 0!==e?"".concat(e,"px"):r("--layout-sider-collapsed-width","60px");return"\n width: ".concat(t?i:a,";\n min-width: ").concat(t?i:a,";\n max-width: ").concat(t?i:a,";\n ")},function(n){return n.$fixed&&"\n position: fixed;\n top: ".concat(r("--layout-header-height","64px"),";\n left: 0;\n bottom: 0;\n overflow-y: auto;\n box-shadow: ").concat(r("--layout-sider-box-shadow","0 4px 12px rgba(0, 0, 0, 0.15)"),";\n ")},r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.06)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.12)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.18)"),r("--zjpcy-primary-color","#1890ff")),i=o.div(g||(g=n(["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"],["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"])),function(n){return n.$collapsed?"visible":"hidden"},r("--zjpcy-transition-duration","0.2s"),function(n){return n.$collapsed&&"\n & > * {\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "}),l=o.div(f||(f=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"])),r("--layout-trigger-height","48px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-trigger-transition","all 0.2s ease-in-out"),function(n){return"top"===n.$placement?"-1":"auto"},function(n){return"dark"===n.$theme?"linear-gradient(135deg, #002140 0%, ".concat(r("--zjpcy-primary-color","#1890ff")," 100%)"):"linear-gradient(135deg, ".concat(r("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)")," 0%, ").concat(r("--zjpcy-bg-color-light","#f5f5f5")," 100%)")},function(n){return"dark"===n.$theme?"#fff":r("--zjpcy-primary-color","#1890ff")},function(n){var o=n.$placement,e=n.$theme;return"top"===o&&"\n border-bottom: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$placement,e=n.$theme;return"top"!==o&&"\n border-top: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$zeroWidthMode,r=n.$collapsed;return o&&r&&"\n display: none;\n "}),c=o.div(b||(b=n(["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"],["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"])),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.15)"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-transition-timing-function","ease-in-out"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-md","0 4px 12px rgba(0, 0, 0, 0.25)"),r("--zjpcy-shadow-extra-light","0 2px 8px rgba(0, 0, 0, 0.08)"));o.div(p||(p=n(["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"],["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"])),function(n){return n.$hasSider&&"\n flex-direction: row;\n "});var d,u,s,g,f,b,p,h,y,x=o.main(h||(h=n(["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"],["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"])),r("--layout-content-padding","24px"),r("--layout-content-bg","transparent"),r("--layout-content-min-height","280px"),r("--layout-content-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n overflow-y: auto;\n "},r("--zjpcy-border-color-extra-light","#d9d9d9"),r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)"),function(n){return"dark"===n.$theme&&"\n &::-webkit-scrollbar-thumb {\n background-color: color-mix(in srgb, ".concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 70%, transparent);\n }\n\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent) transparent;\n ")}),m=o.footer(y||(y=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-footer-padding","24px 50px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-footer-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-footer-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-footer-color-dark","#fff"):r("--layout-footer-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-footer-height","48px")},function(n){return"dark"===n.$theme?"var(--layout-footer-border, 1px solid #303030)":"var(--layout-footer-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},r("--layout-footer-z-index","10"),r("--layout-footer-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);\n "});export{x as ContentWrapper,m as FooterWrapper,t as HeaderWrapper,e as LayoutWrapper,i as SiderContentWrapper,l as SiderTrigger,a as SiderWrapper,c as ZeroWidthTriggerInContent};
@@ -1 +0,0 @@
1
- "use client";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as t,useEffect as i}from"react";import{IoClose as o}from"../node_modules/react-icons/io5/index.js";var c=function(c){var a=c.announcement,u=c.height,s=void 0===u?40:u,l=c.speed,f=void 0===l?50:l,d=c.backgroundColor,m=void 0===d?"linear-gradient(to right, #e8eaf6 0%, #f5f5f5 50%, #e8eaf6 100%)":d,v=c.visible,p=void 0===v||v,h=c.fixed,x=void 0!==h&&h,g=c.fixedTop,y=void 0===g?0:g,q=c.isIcon,A=void 0===q||q,L=c.onClose;if(!a)return null;var E=r(!0),F=E[0],b=E[1],k=p&&F,C=t(null),N=t(null),W=t(void 0),j=t(!1),M=t(!0);return i(function(){if(k&&C.current&&N.current){var e=C.current,n=N.current;n.style.left="".concat(e.offsetWidth,"px");var r=function(){if(M.current&&n)if(j.current)W.current=requestAnimationFrame(r);else{var t=parseFloat(n.style.left)||0;t<-n.offsetWidth?n.style.left="".concat(e.offsetWidth,"px"):n.style.left="".concat(t-f/100,"px"),W.current=requestAnimationFrame(r)}};W.current=requestAnimationFrame(r);var t=function(){j.current=!0},i=function(){j.current=!1};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",i),function(){W.current&&cancelAnimationFrame(W.current),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",i)}}},[f,a,k]),k?e("div",{ref:C,className:"marquee-container ".concat(x?"marquee-container-fixed":""),style:{height:"".concat(s,"px"),background:m,top:x?"".concat(y,"px"):void 0},children:[n("div",{ref:N,className:"marquee-text",children:Array.isArray(a)?n("span",{children:a.map(function(r,t){return e("span",{style:0==t?{}:{marginLeft:"100px"},children:[n("span",{style:{marginRight:"5px"},children:A?"📢":null}),r]},t)})}):a}),n("div",{className:"marquee-close",style:{height:"".concat(s,"px"),width:"45px",background:m},onClick:function(){M.current=!1,b(!1),L&&L()},onMouseEnter:function(){j.current=!0},onMouseLeave:function(){j.current=!1},children:n(o,{size:18,color:"#666"})})]}):null};export{c as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as t}from"react/jsx-runtime";import{useRef as e,useState as r,useEffect as o,useMemo as c}from"react";var i=function(i){var u=i.items,a=i.columns,s=void 0===a?3:a,l=i.gutter,m=void 0===l?20:l,f=i.className,y=i.style,d=i.classNames,p=void 0===d?{}:d,v=i.styles,h=void 0===v?{}:v,x=i.onLayoutChange,j=e(null),w=r(3),g=w[0],N=w[1],b=r(20),z=b[0],A=b[1],E=function(n,t,e){if(null!==n&&"object"==typeof n&&!Array.isArray(n)){for(var r=n,o=0,c=Object.keys(r).map(Number).sort(function(n,t){return t-n});o<c.length;o++){var i=c[o];if(e>=i&&r.hasOwnProperty(i))return r[i]}return t}return n};o(function(){var n,t=function(){clearTimeout(n),n=window.setTimeout(function(){if(j.current){var n=j.current.offsetWidth,t=E(s,3,n),e=E(m,20,n);N(t),A(e),x&&x(t,u)}},100)};return t(),window.addEventListener("resize",t),function(){clearTimeout(n),window.removeEventListener("resize",t)}},[s,m,u,x]);var L=c(function(){var n=Array.from({length:g},function(){return[]});return u.filter(function(t){return!(void 0!==t.column&&t.column>=0&&t.column<g)||(n[t.column].push(t),!1)}).forEach(function(t,e){n[e%g].push(t)}),n},[u,g]),T=function(n,t){var e=p[n];return"function"==typeof e?e(t):e||""},k=function(n,t){var e=h[n];return"function"==typeof e?e(t):e||{}};return t("div",{ref:j,className:"zjpcy-masonry ".concat(f||""," ").concat(T("container",0)),style:n(n({display:"flex",gap:"".concat(z,"px")},y),k("container",0)),children:L.map(function(e,r){return t("div",{className:"zjpcy-masonry-column ".concat(T("column",r)),style:n({flex:1,display:"flex",flexDirection:"column",gap:"".concat(z,"px")},k("column",r)),children:e.map(function(e,r){return t("div",{className:"zjpcy-masonry-item ".concat(T("item",r)),style:n({},k("item",r)),children:e.content},e.key)})},"column-".concat(r))})})};export{i as default};
@@ -1 +0,0 @@
1
- "use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as n,jsx as i,Fragment as t}from"react/jsx-runtime";import l,{useCallback as c,useRef as r,useState as o,useMemo as a,useEffect as m}from"react";import u from"classnames";import{useClickOutside as p}from"../Hooks/useClickOutside.js";var s=function(e){var n,i=e.trim();return i&&(null===(n=Array.from(i)[0])||void 0===n?void 0:n.toUpperCase())||""},d=l.memo(function(e){var l,r,a,p=e.item,y=e.level,h=e.mode,v=e.collapsed,z=e.theme,f=e.openKeySet,j=e.selectedKey,b=e.onItemClick,g=e.onToggleOpen,k=!!p.children&&p.children.length>0,w=f.has(p.key),N=j===p.key,C="horizontal"===h,K="inline"===h,x="vertical-flat"===h,O=0===y,S=c(function(e){e.stopPropagation(),p.disabled||(k&&!x&&g(p.key),x&&k||b(p,p.key))},[p,b,g,k,x]),T=C&&O?16:K?12+24*y:v?0:12+16*y,A=w&&(!v||C),I=function(e){var n=o(e),i=n[0],t=n[1],l=o(e),c=l[0],r=l[1];return m(function(){var n;return e?(r(!0),n=requestAnimationFrame(function(){t(!0)})):(t(!1),n=setTimeout(function(){r(!1)},150)),function(){"number"==typeof n?cancelAnimationFrame(n):clearTimeout(n)}},[e]),{isVisible:i,shouldRender:c}}(A&&C&&O),F=I.isVisible,H=I.shouldRender,M=k&&(!v||!O)&&!x,R=z||"light",V=u("zjpcy-menu-item-wrapper",{"zjpcy-menu-item-wrapper-root":O,"zjpcy-menu-item-wrapper-collapsed":v&&O}),q=u("zjpcy-menu-item",((l={})["zjpcy-menu-item-".concat(R)]=!0,l["zjpcy-menu-item-".concat(R,"-selected")]=N,l["zjpcy-menu-item-".concat(R,"-selected-vertical")]=N&&("vertical"===h||"inline"===h||"vertical-flat"===h),l["zjpcy-menu-item-disabled"]=p.disabled,l["zjpcy-menu-item-has-children"]=k,l["zjpcy-menu-item-has-children-selected"]=k&&N,l["zjpcy-menu-item-".concat(R,"-has-children")]=k,l["zjpcy-menu-item-root"]=O,l["zjpcy-menu-item-collapsed"]=v&&O,l)),B=u("zjpcy-menu-item-icon",{"zjpcy-menu-item-icon-collapsed":v}),P=u("zjpcy-menu-item-arrow",{"zjpcy-menu-item-arrow-open":A,"zjpcy-menu-item-arrow-horizontal":C,"zjpcy-menu-item-arrow-horizontal-open":A&&C}),U=u("zjpcy-menu-submenu-wrapper",((r={})["zjpcy-menu-submenu-wrapper-".concat(h)]=!0,r["zjpcy-menu-submenu-wrapper-horizontal-popup"]=C&&O,r["zjpcy-menu-submenu-wrapper-vertical-flat"]=x,r["zjpcy-menu-submenu-wrapper-vertical-flat-container"]=x,r));return n("div",{className:V,children:[i("div",{className:q,style:{padding:"0px ".concat(T,"px")},title:v&&O?p.label:void 0,onClick:S,children:n("div",{className:"zjpcy-menu-item-content",children:[v?i(t,{children:p.icon?i("span",{className:B,children:p.icon}):i("span",{className:"zjpcy-menu-item-collapsed-label",children:s(p.label)})}):n(t,{children:[p.icon&&i("span",{className:"zjpcy-menu-item-icon",children:p.icon}),n("div",{className:"zjpcy-menu-item-text",children:[i("span",{className:"zjpcy-menu-item-label",children:p.label}),p.description&&!k&&i("span",{className:"zjpcy-menu-item-description",children:p.description})]})]}),M&&i("span",{className:P,children:i("svg",{viewBox:"0 0 1024 1024",width:"10",height:"10",fill:"currentColor",children:i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 25.7-18.5 40.5l328.4 402.4c9.4 11.6 26.7 11.6 36.1 0l328.4-402.4c12.2-14.8 1.2-40.5-18.5-40.5z"})})})]})}),k&&(!C||!O||H)&&i("div",{className:U,children:i("div",{className:x?"zjpcy-menu-submenu-vertical-flat zjpcy-menu-submenu-vertical-flat-open":C&&O?u("zjpcy-menu-submenu-horizontal-popup",{"zjpcy-menu-submenu-horizontal-popup-open":F}):K?u("zjpcy-menu-submenu-inline",{"zjpcy-menu-submenu-inline-open":A}):u("zjpcy-menu-submenu-vertical",{"zjpcy-menu-submenu-vertical-open":A}),children:i("div",{className:"zjpcy-menu-submenu-content",children:null===(a=p.children)||void 0===a?void 0:a.map(function(e){return i(d,{item:e,level:y+1,mode:h,collapsed:v,theme:z,openKeySet:f,selectedKey:j,onItemClick:b,onToggleOpen:g},e.key)})})})})]})});d.displayName="MenuItemComponent";var y=function(n){var t,l=n.mode,s=void 0===l?"vertical":l,y=n.items,h=n.className,v=void 0===h?"":h,z=n.style,f=n.selectedKey,j=n.defaultOpenKeys,b=void 0===j?[]:j,g=n.openKeys,k=n.collapsed,w=void 0!==k&&k,N=n.open,C=n.theme,K=void 0===C?"light":C,x=n.onChange,O=n.onOpenChange,S=r(null),T=o(!0)[0],A=o(b),I=A[0],F=A[1],H=o(""),M=H[0],R=H[1],V=void 0!==g,q=void 0!==f,B=V?g:I,P=q?f:M,U=void 0!==N?N:T,_=a(function(){return new Set(B)},[B]);m(function(){void 0!==f&&R(f)},[f]),m(function(){if(P&&!V&&"horizontal"!==s&&"vertical-flat"!==s){var n=function(i,t,l){void 0===l&&(l=[]);for(var c=0,r=i;c<r.length;c++){var o=r[c];if(o.key===t)return l;if(o.children&&o.children.length>0){var a=n(o.children,t,e(e([],l,!0),[o.key],!1));if(a.length>0)return a}}return[]},i=n(y,P);i.length>0&&F(function(n){var t=new Set(e(e([],n,!0),i,!0));return Array.from(t)})}},[P,y,V,s]);var D=c(function(e,n){q||R(n),null==x||x(e,n),"horizontal"===s&&(!e.children||0===e.children.length)&&B.length>0&&(V||F([]),null==O||O([]))},[x,q,s,B.length,V,O]),E=c(function(n){if(V){var i=_.has(n)?B.filter(function(e){return e!==n}):e(e([],B,!0),[n],!1);null==O||O(i)}else F(function(i){var t=i.includes(n)?i.filter(function(e){return e!==n}):e(e([],i,!0),[n],!1);return null==O||O(t),t})},[_,B,V,O]),G="horizontal"!==s&&w;if(p(S,c(function(){"horizontal"===s&&B.length>0&&(V||F([]),null==O||O([]))},[s,B.length,V,O])),!U)return null;var J=u("zjpcy-menu","zjpcy-menu-".concat(K),((t={})["zjpcy-menu-".concat(s)]=!0,t["zjpcy-menu-".concat(s,"-collapsed")]=G,t["zjpcy-menu-dark-vertical-flat"]="dark"===K&&"vertical-flat"===s,t),v);return i("div",{ref:S,className:J,style:z,role:"menu",children:y.map(function(e){return i(d,{item:e,level:0,mode:s,collapsed:G,theme:K,openKeySet:_,selectedKey:P,onItemClick:D,onToggleOpen:E},e.key)})})};export{y as default};
@@ -1 +0,0 @@
1
- "use client";import{__spreadArray as n}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{createContext as r,useState as o,useCallback as i,useContext as u}from"react";import{createRoot as c}from"react-dom/client";import s from"./Message.js";var f=0,a=new Map,l=function(n){var t=a.get(n);if(t){var e=t.container;t.root.unmount(),document.body.contains(e)&&document.body.removeChild(e),a.delete(n)}},d=function(n,t,r){void 0===r&&(r=3e3);var o=++f,i=function(){var n=document.createElement("div");return n.style.position="fixed",n.style.top="20px",n.style.left="50%",n.style.transform="translateX(-50%)",n.style.zIndex="1050",n.style.pointerEvents="none",document.body.appendChild(n),n}(),u=c(i);u.render(e(s,{type:n,content:t,duration:r,onClose:function(){l(o)}})),a.set(o,{container:i,root:u});var d=setTimeout(function(){l(o)},r);return{close:function(){clearTimeout(d),l(o)}}},m={success:function(n,t){d("success",n,t)},warning:function(n,t){d("warning",n,t)},error:function(n,t){d("error",n,t)},info:function(n,t){d("info",n,t)},close:function(){a.forEach(function(n,t){return l(t)})}},p=r({message:null}),v=function(r){var u=r.children,c=o([]),f=c[0],a=c[1],l=o(0),d=l[0],m=l[1],v=i(function(t,e,r){void 0===r&&(r=3e3);var o=d;m(function(n){return n+1}),a(function(i){return n(n([],i,!0),[{id:o,type:t,content:e,duration:r}],!1)});var i=setTimeout(function(){u(o)},r),u=function(n){a(function(t){return t.filter(function(t){return t.id!==n})})};return{close:function(){clearTimeout(i),u(o)}}},[d]),y={success:function(n,t){return v("success",n,t)},warning:function(n,t){return v("warning",n,t)},error:function(n,t){return v("error",n,t)},info:function(n,t){return v("info",n,t)},close:function(){return a([])}};return t(p.Provider,{value:{message:y},children:[u,f.map(function(n){return e(s,{type:n.type,content:n.content,duration:n.duration,onClose:function(){return a(function(t){return t.filter(function(t){return t.id!==n.id})})}},n.id)})]})},y=function(){var n=u(p);return(null==n?void 0:n.message)?n.message:m};export{v as MessageProvider,s as default,m as message,y as useMessage};
@@ -1 +0,0 @@
1
- "use client";import{__assign as o}from"../node_modules/tslib/tslib.es6.js";import{jsx as n,jsxs as e}from"react/jsx-runtime";import{useState as i,useRef as t,useEffect as r}from"react";import{createPortal as c}from"react-dom";import a from"classnames";import l from"../Icon/Icon.js";import d from"../Flex/index.js";import m from"../Button/Button.js";var s=function(s){var u,p=s.visible,v=s.title,y=void 0===v?"标题":v,f=s.width,h=void 0===f?600:f,g=s.height,j=void 0===g?"auto":g,x=s.headerHeight,z=void 0===x?40:x,b=s.footerHeight,N=void 0===b?40:b,w=s.confirmLoading,k=void 0!==w&&w,C=s.direction,_=void 0===C?"normal":C,H=s.top,T=s.triggerRef,I=s.onCancel,B=s.onOk,W=s.children,L=s.footer,O=void 0===L?null:L,E=s.bordered,R=void 0!==E&&E,S=s.className,F=s.style,M=s.okText,P=void 0===M?"确认":M,X=s.cancelText,Y=void 0===X?"取消":X,$=s.getContainer,q=void 0===$?function(){return document.body}:$,A=s.maskStyle,D=s.maskClassName,G=s.zIndex,J=void 0===G?1e3:G,K=s.contentClassName,Q=s.contentStyle,U=s.destroyOnClose,V=void 0!==U&&U,Z=s.loading,oo=void 0!==Z&&Z,no=s.loadingIcon,eo=i(!1),io=eo[0],to=eo[1],ro=i(!1),co=ro[0],ao=ro[1],lo=i(!1),mo=lo[0],so=lo[1],uo=i({x:0,y:0}),po=uo[0],vo=uo[1],yo=t(null),fo=_,ho=function(o){if("number"==typeof o)return o;var n=o.match(/^(\d+)px$/);return n?parseInt(n[1],10):0},go=function(){var o=function(){if(null==T?void 0:T.current){var o=T.current.getBoundingClientRect();return{x:o.left+o.width/2,y:o.top+o.height/2}}return yo.current||null}();if(!o||"undefined"==typeof window)return{x:0,y:0};if(void 0!==H||"normal"===fo){var n=window.innerWidth/2,e=void 0!==H?H+(j?ho(j)/2:0):window.innerHeight/2;return{x:o.x-n,y:o.y-e}}if("center"===fo){n=window.innerWidth/2;var i=window.innerHeight/2;return{x:o.x-n,y:o.y-i}}return{x:0,y:0}};r(function(){var o=function(o){yo.current={x:o.clientX,y:o.clientY}};return document.addEventListener("mousedown",o,!0),function(){document.removeEventListener("mousedown",o,!0)}},[]),r(function(){if(p){var o=go();vo(o),ao(!1),to(!0);var n=setTimeout(function(){so(!0)},30);return function(){return clearTimeout(n)}}ao(!0),so(!1);var e=setTimeout(function(){to(!1),ao(!1)},400);return function(){return clearTimeout(e)}},[p,400,j,H,V]);var jo=function(){ao(!0);var o=setTimeout(function(){to(!1),ao(!1),null==I||I()},400);return function(){return clearTimeout(o)}},xo=function(){null==B||B()},zo=o(((u={width:"number"==typeof h?"".concat(h,"px"):h,top:void 0!==H?"".concat(H,"px"):void 0})["--zjpcy-modal-origin-x"]="".concat(po.x,"px"),u["--zjpcy-modal-origin-y"]="".concat(po.y,"px"),u.visibility=mo?"visible":"hidden",u),F),bo={height:"number"==typeof z?"".concat(z,"px"):z},No=j?ho(j):0,wo=ho(z),ko=ho(N),Co=No>0?Math.max(0,No-wo-ko):void 0,_o=o({},Q);if(!_o.maxHeight&&j){var Ho=ho(j);_o.maxHeight="".concat(Ho,"px")}!_o.maxHeight&&Co&&(_o.maxHeight="".concat(Co,"px"));var To={height:"number"==typeof N?"".concat(N,"px"):N},Io=function(){if(!io&&!co)return null;var i=o({zIndex:J},A);return n("div",{className:a("zjpcy-modal-overlay",{"zjpcy-modal-overlay--visible":io&&!co,"zjpcy-modal-overlay--closing":co,"zjpcy-modal-overlay--custom-top":void 0!==H},S,D),onClick:jo,style:i,children:e("div",{className:a("zjpcy-modal-container",{"zjpcy-modal-container--normal":mo&&!co&&("normal"===fo||void 0!==H),"zjpcy-modal-container--center":mo&&!co&&"center"===fo&&void 0===H,"zjpcy-modal-container--top-right":mo&&!co&&"top-right"===fo&&void 0===H,"zjpcy-modal-container--bottom-right":mo&&!co&&"bottom-right"===fo&&void 0===H,"zjpcy-modal-container--bottom-left":mo&&!co&&"bottom-left"===fo&&void 0===H,"zjpcy-modal-container--closing-normal":co&&("normal"===fo||void 0!==H),"zjpcy-modal-container--closing-center":co&&"center"===fo&&void 0===H,"zjpcy-modal-container--closing-top-right":co&&"top-right"===fo&&void 0===H,"zjpcy-modal-container--closing-bottom-right":co&&"bottom-right"===fo&&void 0===H,"zjpcy-modal-container--closing-bottom-left":co&&"bottom-left"===fo&&void 0===H,"zjpcy-modal-container--bordered":R,"zjpcy-modal-container--has-height":void 0!==j}),style:zo,onClick:function(o){return o.stopPropagation()},children:[oo?n("div",no?{className:"zjpcy-modal-loading",children:n("div",{className:"zjpcy-modal-loading-content",children:no})}:{className:"zjpcy-modal-loading",children:n("div",{className:"zjpcy-modal-loading-content",children:n("div",{className:"zjpcy-modal-loading-spinner",children:e("svg",{viewBox:"0 0 24 24",className:"zjpcy-modal-loading-icon",children:[n("circle",{className:"zjpcy-modal-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),n("circle",{className:"zjpcy-modal-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null,e("div",{className:"zjpcy-modal-header",style:bo,children:[n("div",{className:"zjpcy-modal-header__left",children:n("span",{className:"zjpcy-modal-header__title",children:y})}),n("div",{className:"zjpcy-modal-header__right",children:n("div",{className:"zjpcy-modal-close-btn",onClick:jo,children:n(l,{type:"close",size:20,color:"currentColor"})})})]}),io&&n("div",{className:a("zjpcy-modal-content",K),style:_o,children:V&&co?null:W}),n(d,{className:"zjpcy-modal-footer",align:"center",justify:"flex-end",style:Object.assign({},To,{padding:"0px 10px"}),gap:12,children:null===O?e(d,{className:"zjpcy-modal-footer__actions",justify:"flex-end",gap:12,children:[n(m,{variant:"secondary",onClick:jo,disabled:k,children:Y||"取消"}),n(m,{variant:"primary",onClick:xo,loading:k,children:P||"确认"})]}):O})]})})}();if(!Io)return null;if(!1===q)return Io;var Bo="function"==typeof q?q():q;return Bo?c(Io,Bo):Io};export{s as default};
@@ -1 +0,0 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as c,jsx as n}from"react/jsx-runtime";import i from"../node_modules/react-fast-marquee/dist/index.js";import t from"react";var o=function(o){var s=o.text,a=void 0===s?"":s,l=o.speed,r=void 0===l?50:l,d=o.height,p=void 0===d?60:d,m=o.icon,y=void 0===m?null:m,h=o.styles,u=void 0===h?{}:h,v=o.closeStyle,j=void 0===v?{}:v,f=o.showCloseButton,z=void 0!==f&&f,x=o.floatingTop,N=void 0!==x&&x,g=o.pauseOnHover,b=void 0===g||g,k=o.type,w=void 0===k?"primary":k,A=o.className,C=void 0===A?"":A,H=t.useState(!0),O=H[0],S=H[1];if(!a||!O)return null;return c("div",{className:"zjpcy-notice zjpcy-notice--".concat(w," ").concat(N?"zjpcy-notice-floating":""," ").concat(C),style:e({height:"".concat(p,"px")},u),children:[c(i,{pauseOnHover:b,speed:r,gradient:!1,children:[n("span",{style:{width:"1200px"}}),Array.isArray(a)?n("div",{className:"zjpcy-notice-content",children:a.map(function(e,i){return c("span",{style:{marginRight:"15px",display:"inline-block"},children:[y?n("span",{className:"zjpcy-notice-icon",children:y}):null,n("span",{className:"zjpcy-notice-text",children:e})]},i)})}):n("div",{className:"zjpcy-notice-content",children:c("span",{children:[y?n("span",{className:"zjpcy-notice-icon",children:y}):null,n("span",{className:"zjpcy-notice-text",children:a})]})})]}),z&&n("div",{className:"zjpcy-notice-close",style:e({height:"".concat(p,"px")},j),onClick:function(){S(!1)},children:n("span",{className:"zjpcy-notice-close-icon",children:"×"})})]})};export{o as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as c}from"react";var a=function(t){switch(t){case"success":return e("i",{className:"fas fa-check-circle"});case"warning":return e("i",{className:"fas fa-exclamation-triangle"});case"error":return e("i",{className:"fas fa-times-circle"});default:return e("i",{className:"fas fa-info-circle"})}},r=function(r){var s=r.message,u=r.duration,f=void 0===u?3e3:u,l=r.type,m=void 0===l?"info":l,d=r.position,p=void 0===d?"center":d,v=r.color,h=r.top,g=r.open,k=r.clickOutsideToClose,x=void 0!==k&&k,b=r.onClose,N=void 0!==g,T=o(!0),w=T[0],C=T[1],j=o(!0),y=j[0],E=j[1],L=i(null),O=N?g:w;if(c(function(){var t=function(t){x&&L.current&&!L.current.contains(t.target)&&(E(!1),setTimeout(function(){b&&b(),N||C(!1)},500))};return x&&O&&document.addEventListener("click",t),function(){document.removeEventListener("click",t)}},[x,O,N,b]),c(function(){N&&(g?E(!0):(E(!1),setTimeout(function(){b&&b()},500)))},[g,N,b]),c(function(){if(O){var t=setTimeout(function(){E(!1),setTimeout(function(){b&&b(),N||C(!1)},500)},f);return function(){return clearTimeout(t)}}},[f,O,N,b]),!O||!y)return null;var W="notification-".concat(m),X=v?"notification-custom":"",_=function(){var t={};if(void 0!==h)if(t.top="".concat(h,"px"),p.startsWith("top-"))switch(p){case"top-left":t.left="20px",t.right="auto";break;case"top-center":t.left="50%",t.transform="translateX(-50%)",t.right="auto";break;case"top-right":t.right="20px",t.left="auto"}else t.right="20px",t.left="auto",t.bottom="auto";return t}(),q=t({backgroundColor:v},_),z=void 0===h?"notification-".concat(p):"";return e("div",{ref:L,className:"notification ".concat(W," ").concat(z," ").concat(X," ").concat(y?"fade-in":"fade-out"),style:q,children:n("div",{className:"notification-content",children:[a(m),e("span",{children:s})]})})};export{r as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as t,__awaiter as o,__generator as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,Fragment as n,jsx as r}from"react/jsx-runtime";import{useState as c,useRef as p,useEffect as a,cloneElement as l}from"react";import{createPortal as s}from"react-dom";import f from"classnames";import d from"../Icon/Icon.js";import m from"../Button/Button.js";var h=function(h){var u=h.title,g=void 0===u?"确认删除吗?":u,v=h.description,y=h.okText,b=void 0===y?"确定":y,w=h.cancelText,z=void 0===w?"取消":w,j=h.okButtonProps,B=void 0===j?{}:j,L=h.cancelButtonProps,k=void 0===L?{}:L,T=h.onConfirm,R=h.onCancel,C=h.disabled,N=void 0!==C&&C,x=h.icon,E=h.type,P=void 0===E?"warning":E,D=h.placement,I=void 0===D?"top":D,H=h.showCancel,W=void 0===H||H,_=h.getContainer,q=void 0===_?function(){return document.body}:_,A=h.className,F=h.style,G=h.children,J=c(!1),K=J[0],M=J[1],O=c(!1),Q=O[0],S=O[1],U=c({top:0,left:0}),V=U[0],X=U[1],Y=p(null),Z=p(null),$={top:"zjpcy-popconfirm-top",bottom:"zjpcy-popconfirm-bottom",left:"zjpcy-popconfirm-left",right:"zjpcy-popconfirm-right",topLeft:"zjpcy-popconfirm-topLeft",topRight:"zjpcy-popconfirm-topRight",bottomLeft:"zjpcy-popconfirm-bottomLeft",bottomRight:"zjpcy-popconfirm-bottomRight",leftTop:"zjpcy-popconfirm-leftTop",leftBottom:"zjpcy-popconfirm-leftBottom",rightTop:"zjpcy-popconfirm-rightTop",rightBottom:"zjpcy-popconfirm-rightBottom"},tt=function(){if(Y.current&&Z.current){var t=Y.current.getBoundingClientRect(),o=Z.current.getBoundingClientRect(),e=0,i=0;switch(I){case"top":case"topLeft":case"topRight":e=t.top-o.height-8,i=t.left+(t.width-o.width)/2,"topLeft"===I?i=t.left:"topRight"===I&&(i=t.right-o.width);break;case"bottom":case"bottomLeft":case"bottomRight":e=t.bottom+8,i=t.left+(t.width-o.width)/2,"bottomLeft"===I?i=t.left:"bottomRight"===I&&(i=t.right-o.width);break;case"left":case"leftTop":case"leftBottom":e=t.top+(t.height-o.height)/2,i=t.left-o.width-8,"leftTop"===I?e=t.top:"leftBottom"===I&&(e=t.bottom-o.height);break;case"right":case"rightTop":case"rightBottom":e=t.top+(t.height-o.height)/2,i=t.right+8,"rightTop"===I?e=t.top:"rightBottom"===I&&(e=t.bottom-o.height)}var n=window.innerWidth,r=window.innerHeight;i<10&&(i=10),i+o.width>n-10&&(i=n-o.width-10),e<10&&(e=10),e+o.height>r-10&&(e=r-o.height-10),X({top:e,left:i})}},ot=function(t){N||(t&&t.preventDefault&&t.preventDefault(),t&&t.stopPropagation&&t.stopPropagation(),M(!0))},et=function(){return o(void 0,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:if(!T)return[3,5];S(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,T()];case 2:return t.sent(),M(!1),[3,4];case 3:return S(!1),[7];case 4:return[3,6];case 5:M(!1),t.label=6;case 6:return[2]}})})},it=function(){R&&R(),M(!1)},nt=function(t){Z.current&&!Z.current.contains(t.target)&&Y.current&&!Y.current.contains(t.target)&&M(!1)};a(function(){if(K){setTimeout(function(){tt()},0),document.addEventListener("mousedown",nt);var t=function(){return tt()},o=function(){return tt()};return window.addEventListener("scroll",t,!0),window.addEventListener("resize",o),function(){document.removeEventListener("mousedown",nt),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",o)}}},[K,I]);var rt,ct;return i(n,{children:[(rt=G,ct=rt.props||{},r("span",{ref:Y,style:{display:"inline-block"},children:l(rt,t(t({},ct),{onClick:ot}))})),function(){if(!K)return null;var o,e=i("div",{ref:Z,className:f("zjpcy-popconfirm","zjpcy-popconfirm-visible",$[I],"zjpcy-popconfirm--".concat(P),A),style:t({position:"fixed",top:"".concat(V.top,"px"),left:"".concat(V.left,"px")},F),children:[r("div",{className:"zjpcy-popconfirm-arrow"}),i("div",{className:"zjpcy-popconfirm-inner",children:[i("div",{className:"zjpcy-popconfirm-header",children:[r("span",{style:{display:x?"inline-block":"none"},className:"zjpcy-popconfirm-icon",children:x||(o={info:{type:"info-circle",color:"#1890ff"},success:{type:"check-circle",color:"#52c41a"},warning:{type:"warning-circle",color:"#faad14"},error:{type:"close-circle",color:"#f5222d"},danger:{type:"close-circle",color:"#f5222d"}}[P],r(d,{type:o.type,size:18,color:o.color}))}),r("span",{className:"zjpcy-popconfirm-title",children:g})]}),v&&r("div",{className:"zjpcy-popconfirm-description",children:v}),i("div",{className:"zjpcy-popconfirm-actions",children:[W&&r(m,{variant:k.variant||"secondary",onClick:it,disabled:k.disabled||Q,size:"small",children:z}),r(m,{variant:B.variant||"primary",onClick:et,loading:B.loading||Q,disabled:B.disabled,size:"small",children:b})]})]})]});if(!1===q)return e;var n="function"==typeof q?q():q;return n?s(e,n):e}()]})};export{h as default};
@@ -1 +0,0 @@
1
- import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsxs as e,jsx as s,Fragment as n}from"react/jsx-runtime";import c from"classnames";import o from"../Icon/Icon.js";var t=function(t){var i,a,p,l=t.percent,d=void 0===l?0:l,f=t.type,u=void 0===f?"line":f,g=t.status,m=t.showInfo,y=void 0===m||m,h=t.format,v=t.strokeColor,j=void 0===v?"#1890ff":v,z=t.trailColor,x=void 0===z?"gainsboro":z,b=t.strokeWidth,k=t.size,N=void 0===k?"default":k,w=t.transition,M=void 0===w||w,C=t.steps,I=t.segments,W=t.icon,D=t.prefix,A=t.suffix,B=t.children,G=t.className,L=t.style,P=g||(d>=100?"success":d<0?"exception":"normal"),_=function(){return h?h(d):"".concat(Math.floor(d),"%")},q=function(r){return"object"==typeof r&&"from"in r&&"to"in r},E=function(){return"success"===P?"#52c41a":"exception"===P?"#ff4d4f":q(j)?j.from:j},F=function(){return W||("success"===P?s(o,{type:"check-circle",style:{color:"#52c41a"}}):"exception"===P?s(o,{type:"close-circle",style:{color:"#ff4d4f"}}):null)};if("circle"===u||"dashboard"===u){var H=50-(b||6),J=2*Math.PI*H,K=J-d/100*J,O="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j,Q=q(O)?(a=(i=O).from,p=i.to,"from-".concat(a.replace("#",""),"-to-").concat(p.replace("#",""))):null;return e("div",{className:c("zjpcy-progress","zjpcy-progress-circle",G),style:L,children:[e("svg",{width:120,height:120,viewBox:"0 0 120 120",style:{transform:"rotate(-90deg)"},children:[Q&&s("defs",{children:e("linearGradient",{id:Q,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"0%",stopColor:O.from}),s("stop",{offset:"100%",stopColor:O.to})]})}),s("circle",{cx:60,cy:60,r:H,stroke:x,strokeWidth:b||6,fill:"none"}),s("circle",{cx:60,cy:60,r:H,stroke:Q?"url(#".concat(Q,")"):E(),strokeWidth:b||6,fill:"none",strokeDasharray:J,strokeDashoffset:K,strokeLinecap:"round",style:{transition:M?"stroke-dashoffset 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"}})]}),y&&s("div",{className:"zjpcy-progress-info",children:B||e(n,{children:[F(),D,_(),A]})})]})}var R=function(r){var e=r.color;if(q(e)){var s=e.from,n=e.to,c=e.direction;return{background:"linear-gradient(".concat(void 0===c?"to right":c,", ").concat(s,", ").concat(n,")")}}return{backgroundColor:e}};return e("div",{className:c("zjpcy-progress","zjpcy-progress-".concat(N),"zjpcy-progress-line",{"zjpcy-progress-success":"success"===P},{"zjpcy-progress-exception":"exception"===P},{"zjpcy-progress-steps":C&&C>0},{"zjpcy-progress-has-segments":I&&I.length>0},G),style:L,children:[s("div",{className:"zjpcy-progress-wrapper",children:s("div",{className:"zjpcy-progress-outer",children:C&&C>0?function(){if(!C||C<=0)return null;var r=d/100,e=Math.min(1,Math.max(0,r)),n=Array.from({length:C},function(r,n){var o=n/C,t=(n+1)/C;return s("div",{className:c("zjpcy-progress-step",{"zjpcy-progress-step--completed":e>=t,"zjpcy-progress-step--current":e>o&&e<t,"zjpcy-progress-step--pending":e<=o,"zjpcy-progress-step--success":e>=1}),style:{transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"}},n)});return s("div",{className:"zjpcy-progress-steps",children:n})}():I&&I.length>0?function(){if(!I||0===I.length)return null;var e=I.reduce(function(r,e){return r+e.percent},0),n=void 0===d||0===d?e:d,o=e>0?n/e:n/100,t=Math.min(1,Math.max(0,o)),i=0,a=I.map(function(n,o){var a=n.percent,p=i/e,l=(i+a)/e;i+=a;var d=t<=p;return s("div",{className:c("zjpcy-progress-segment",{"zjpcy-progress-segment--completed":t>=l,"zjpcy-progress-segment--current":t>p&&t<l,"zjpcy-progress-segment--pending":d}),style:r(r({width:"".concat(a,"%")},d?{}:R(n)),{transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"})},o)}),p=100-e;return p>0&&a.push(s("div",{className:"zjpcy-progress-segment zjpcy-progress-segment--remaining",style:{width:"".concat(p,"%"),backgroundColor:"gainsboro",transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"}},"remaining")),s("div",{className:"zjpcy-progress-segments",children:a})}():s("div",{className:"zjpcy-progress-inner",style:{background:x},children:s("div",{className:c("zjpcy-progress-bg",{"zjpcy-progress-bg--success":"success"===P,"zjpcy-progress-bg--exception":"exception"===P,"zjpcy-progress-bg--animated":function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j;return q(r)&&!0===r.animated}()}),style:r(r({width:"".concat(Math.min(100,Math.max(0,d)),"%"),backgroundColor:q(j)?void 0:E()},function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j;if(q(r)){var e=r.from,s=r.to,n=r.direction;return{background:"linear-gradient(".concat(void 0===n?"to right":n,", ").concat(e,", ").concat(s,")")}}return{}}()),{transition:M?"width 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"})})})})}),y&&e("div",{className:"zjpcy-progress-info",children:[F()&&s("span",{className:"zjpcy-progress-icon",children:F()}),D&&s("span",{className:"zjpcy-progress-prefix",children:D}),s("span",{children:_()}),A&&s("span",{className:"zjpcy-progress-suffix",children:A})]})]})};export{t as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{createContext as a,useContext as n,useRef as r,useState as o,useEffect as d,useCallback as l}from"react";import c from"classnames";var u=a(void 0),s=function(a){var l,s=a.value,p=a.checked,v=a.defaultChecked,m=void 0!==v&&v,f=a.onChange,h=a.disabled,y=void 0!==h&&h,g=a.size,b=a.children,z=a.className,j=a.style,N=a.label,w=a.labelGap,R=void 0===w?8:w,C=a.labelClassName,_=void 0===C?"":C,k=a.labelStyle,x=n(u),I=!!x,G=r(null),A=o(m),F=A[0],q=A[1],B=I?x.value===s:void 0!==p?p:F,E=g||(I?x.size:void 0),L="button"===(I?x.type:void 0);d(function(){if(I&&x.registerRadio)return x.registerRadio(s,G.current),function(){var e;null===(e=x.unregisterRadio)||void 0===e||e.call(x,s)}},[I,s,x]),d(function(){B&&I&&x.updateIndicator&&requestAnimationFrame(function(){var e;null===(e=x.updateIndicator)||void 0===e||e.call(x)})},[B,I]),d(function(){I||void 0===p||q(p)},[p,I]);var X=c("zjpcy-radio",((l={"zjpcy-radio--checked":B,"zjpcy-radio--unchecked":!B,"zjpcy-radio--disabled":y||I&&x.disabled,"zjpcy-radio--disabled-checked":B&&(y||I&&x.disabled)})["zjpcy-radio--".concat(E)]=E,l["zjpcy-radio--button"]=L,l),z);return i("label",{ref:G,className:X,style:j,children:t("div",{className:"zjpcy-radio-wrapper",style:{display:"flex",alignItems:"center"},children:[N&&i("div",{className:"zjpcy-radio-label ".concat(_),style:e({marginRight:"number"==typeof R?"".concat(R,"px"):R},k),children:N}),t("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i("input",{type:"radio",className:"zjpcy-radio__input",checked:B,onChange:function(e){var i,t=e.target.checked;y||I&&x.disabled||(I?null===(i=x.onChange)||void 0===i||i.call(x,s):(q(t),null==f||f(t,s)))},disabled:y||I&&x.disabled,value:s}),!L&&i("span",{className:"zjpcy-radio__inner"}),b&&i("span",{className:"zjpcy-radio__label",children:b})]})]})})};s.Group=function(e){var a,n=e.value,s=e.defaultValue,p=e.onChange,v=e.disabled,m=void 0!==v&&v,f=e.type,h=void 0===f?"radio":f,y=e.size,g=void 0===y?"middle":y,b=e.children,z=e.className,j=e.style,N=o(s),w=N[0],R=N[1],C=r(null),_=r(new Map),k=o({width:0,height:0,transform:"translateX(0px)"}),x=k[0],I=k[1],G=void 0!==n?n:w,A=l(function(e,i){i&&_.current.set(e,i)},[]),F=l(function(e){_.current.delete(e)},[]),q=l(function(){if("button"===h&&C.current){var e=_.current.get(G);if(e){var i=C.current.getBoundingClientRect(),t=e.getBoundingClientRect(),a=t.left-i.left;I({width:t.width,height:t.height,transform:"translateX(".concat(a,"px)")})}}},[G,h]);d(function(){if("button"===h){var e=requestAnimationFrame(function(){q()});return function(){return cancelAnimationFrame(e)}}},[h,q]),d(function(){if("button"===h){var e=function(){q()};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}},[h,q]),d(function(){void 0!==n&&R(n)},[n]);var B=c("zjpcy-radio-group",((a={"zjpcy-radio-group--button":"button"===h})["zjpcy-radio-group--".concat(g)]=g,a["zjpcy-radio-group--button-large"]="button"===h&&"large"===g,a["zjpcy-radio-group--button-middle"]="button"===h&&"middle"===g,a["zjpcy-radio-group--button-small"]="button"===h&&"small"===g,a),z);return i(u.Provider,{value:{value:G,onChange:function(e){R(e),null==p||p(e)},disabled:m,type:h,size:g,registerRadio:A,unregisterRadio:F,updateIndicator:q},children:t("div",{ref:C,className:B,style:j,children:["button"===h&&i("div",{className:"zjpcy-radio-group__indicator",style:{width:x.width,height:x.height,transform:x.transform}}),b]})})},s.displayName="Radio",s.Group.displayName="Radio.Group";var p=s;export{p as default};
@@ -1 +0,0 @@
1
- "use client";import{__spreadArray as e,__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as l,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as a,useMemo as c,useCallback as u}from"react";import{injectGlobalStyles as s,Wrapper as d,LabelWrapper as v,Label as f,Selector as p,SelectorContent as h,SuffixArea as m,ClearButton as g,LoadingIcon as b,Arrow as y,SearchInput as w,TagsContainer as C,Placeholder as x,SingleValue as $,Dropdown as A,OptionList as N,Empty as k,Tag as L,TagClose as M,CheckIcon as D,Option as E}from"./styles.js";var z=function(z){var B=z.value,P=z.defaultValue,S=z.options,j=void 0===S?[]:S,H=z.disabled,R=void 0!==H&&H,T=z.loading,V=void 0!==T&&T,G=z.mode,I=void 0===G?"single":G,K=z.placeholder,O=void 0===K?"请选择":K,U=z.searchable,Z=void 0!==U&&U,_=z.clearable,q=void 0!==_&&_,F=z.size,J=void 0===F?"default":F,Q=z.width,W=z.styles,X=z.onChange,Y=z.onOpenChange,ee=z.onSearch,ne=z.optionRender,le=z.tagRender,te=z.label,re=z.labelGap,oe=void 0===re?8:re,ie=z.labelClassName,ae=void 0===ie?"":ie,ce=z.labelStyle,ue=z.className,se=void 0===ue?"":ue,de=z.style,ve=z.showArrow,fe=void 0===ve||ve,pe=z.maxHeight,he=void 0===pe?256:pe,me=z.emptyContent,ge=void 0===me?"暂无数据":me,be=z.getPopupContainer,ye=void 0!==B,we=o(void 0!==P?P:"multiple"===I?[]:""),Ce=we[0],xe=we[1],$e=o(!1),Ae=$e[0],Ne=$e[1],ke=o(""),Le=ke[0],Me=ke[1],De=o(-1),Ee=De[0],ze=De[1],Be=o(!1),Pe=Be[0],Se=Be[1],je=i(null),He=i(null),Re=i(null);a(function(){s()},[]);var Te=ye?B:Ce,Ve="multiple"===I,Ge=c(function(){return Le?j.filter(function(e){return String(e.label).toLowerCase().includes(Le.toLowerCase())}):j},[j,Le]),Ie=c(function(){if(Ve){var e=Array.isArray(Te)?Te:[];return j.filter(function(n){return e.includes(n.value)})}return j.find(function(e){return e.value===Te})||null},[Te,j,Ve]),Ke=u(function(e,n){ye||xe(e),null==X||X(e,n)},[ye,X]),Oe=u(function(e){e.disabled||(Ke(e.value,e),Me(""),Ne(!1))},[Ke]),Ue=u(function(n){if(!n.disabled){var l,t,r=Array.isArray(Te)?Te:[];r.includes(n.value)?(l=r.filter(function(e){return e!==n.value}),t=Ie.filter(function(e){return e.value!==n.value})):(l=e(e([],r,!0),[n.value],!1),t=e(e([],Ie,!0),[n],!1)),Ke(l,t),Me(""),setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)}},[Te,Ke,Ie]),Ze=u(function(e){Ve?Ue(e):Oe(e)},[Ve,Ue,Oe]),_e=u(function(e,n){if(e.stopPropagation(),!R){var l=(Array.isArray(Te)?Te:[]).filter(function(e){return e!==n}),t=Ie.filter(function(e){return e.value!==n});Ke(l,t)}},[Te,R,Ke,Ie]),qe=u(function(e){(e.stopPropagation(),R)||(Ke(Ve?[]:"",Ve?[]:void 0),Me(""))},[R,Ve,Ke]),Fe=u(function(e){var n=e.target.value;Me(n),null==ee||ee(n)},[ee]);a(function(){var e=function(e){je.current&&!je.current.contains(e.target)&&(Ne(!1),Me(""))};return Ae&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[Ae]),a(function(){null==Y||Y(Ae),Ae&&Z&&setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)},[Ae,Z,Y]);var Je,Qe=u(function(e){if(Ae)switch(e.key){case"Escape":e.preventDefault(),Ne(!1);break;case"ArrowDown":e.preventDefault(),ze(function(e){return e<Ge.length-1?e+1:0});break;case"ArrowUp":e.preventDefault(),ze(function(e){return e>0?e-1:Ge.length-1});break;case"Enter":e.preventDefault(),Ee>=0&&Ee<Ge.length&&Ze(Ge[Ee])}else"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ne(!0))},[Ae,Ee,Ge,Ze]),We=function(e){return le?le({value:e.value,label:e.label,onClose:function(n){return _e(n,e.value)},disabled:R}):t(L,{className:"select-tag",$disabled:R,$styles:null==W?void 0:W.tag,children:[l("span",{children:e.label}),!R&&l(M,{className:"select-tag-close",onClick:function(n){return _e(n,e.value)},children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})})]},e.value)},Xe=function(e,n){var o=Ve?Te.includes(e.value):Te===e.value,i=n===Ee,a=ne?ne(e):t(r,{children:[o&&Ve&&l(D,{children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})})}),l("span",{children:e.label})]});return l(E,{className:"select-option ".concat(o?"select-option-selected":""," ").concat(i?"select-option-active":""),$selected:o,$active:i,$disabled:!!e.disabled,$styles:null==W?void 0:W.option,onClick:function(){return Ze(e)},onMouseEnter:function(){return ze(n)},children:a},e.value)},Ye=Ve?Array.isArray(Te)&&Te.length>0:""!==Te&&null!=Te,en=q&&!R&&Ye&&!V&&Pe,nn=fe&&!V&&!en;return l(d,{ref:je,className:"select-wrapper ".concat(se),$styles:null==W?void 0:W.wrapper,style:n({width:Q},de),children:t(v,{children:[te&&l(f,{className:"select-label ".concat(ae),style:n({marginRight:"number"==typeof oe?"".concat(oe,"px"):oe},ce),children:te}),t("div",{style:{flex:1,position:"relative"},children:[t(p,{className:"select-selector ".concat(J?"select-selector-".concat(J):""," ").concat(Ae?"select-selector-open":""," ").concat(R?"select-selector-disabled":""),$disabled:R,$loading:V,$size:J,$open:Ae,$styles:null==W?void 0:W.selector,onClick:function(){return!R&&!V&&Ne(!Ae)},onKeyDown:Qe,onMouseEnter:function(){return Se(!0)},onMouseLeave:function(){return Se(!1)},tabIndex:R?-1:0,role:"combobox","aria-expanded":Ae,"aria-haspopup":"listbox",children:[l(h,{children:function(){if(Z&&Ae){var e=Ve?"搜索...":String((null==Ie?void 0:Ie.label)||O);return l(w,{ref:Re,type:"text",value:Le,onChange:Fe,placeholder:e,onClick:function(e){return e.stopPropagation()}})}if(Ve){var n=Ie;return n.length>0?l(C,{children:n.map(We)}):l(x,{children:O})}return Ie?l($,{children:Ie.label}):l(x,{children:O})}()}),t(m,{children:[en&&l(g,{className:"select-clear",onClick:qe,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})}),V&&l(b,{className:"select-loading",children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),nn&&l(y,{className:"select-arrow ".concat(Ae?"select-arrow-open":""),$open:Ae,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M7 10l5 5 5-5z"})})})]})]}),(Je=l(A,{ref:He,className:"select-dropdown",$open:Ae,$styles:null==W?void 0:W.dropdown,children:l(N,{$maxHeight:he,children:Ge.length>0?Ge.map(Xe):l(k,{className:"select-empty",children:ge})})}),be?be()?Je:null:Je)]})]})})};export{z as default};
@@ -1 +0,0 @@
1
- import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import e from"styled-components";var t,r,o,i,a,c,l,s,p,d,f,g,x,u,b,h,y,m,w,v,j=function(n,e){return"var(".concat(n,", ").concat(e,")")},z=e.div(t||(t=n(["\n display: inline-block;\n position: relative;\n width: 100%;\n\n &.select-wrapper {\n /* 外部可通过 .select-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: inline-block;\n position: relative;\n width: 100%;\n\n &.select-wrapper {\n /* 外部可通过 .select-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var e=n.$styles;return e&&Object.entries(e).map(function(n){var e=n[0],t=n[1];return"".concat(e,": ").concat(t,";")}).join("\n")}),k=e.div(r||(r=n(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"]))),$=e.div(o||(o=n(["\n font-size: 14px;\n color: ",";\n white-space: nowrap;\n flex-shrink: 0;\n font-weight: 500;\n letter-spacing: 0.2px;\n"],["\n font-size: 14px;\n color: ",";\n white-space: nowrap;\n flex-shrink: 0;\n font-weight: 500;\n letter-spacing: 0.2px;\n"])),j("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")),O=e.div(i||(i=n(["\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid ",";\n border-radius: ",";\n background: linear-gradient(135deg, "," 0%, "," 100%);\n transition: all "," ",";\n outline: none;\n box-sizing: border-box;\n box-shadow: ","; \n overflow: hidden;\n cursor: ",";\n opacity: ",";\n\n &:hover {\n border-color: ",";\n box-shadow: ",";\n }\n\n &.select-selector {\n /* 外部可通过 .select-selector 选择器覆盖样式 */\n }\n\n /* 尺寸样式 */\n ","\n\n ","\n"],["\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n border: 1px solid ",";\n border-radius: ",";\n background: linear-gradient(135deg, "," 0%, "," 100%);\n transition: all "," ",";\n outline: none;\n box-sizing: border-box;\n box-shadow: ","; \n overflow: hidden;\n cursor: ",";\n opacity: ",";\n\n &:hover {\n border-color: ",";\n box-shadow: ",";\n }\n\n &.select-selector {\n /* 外部可通过 .select-selector 选择器覆盖样式 */\n }\n\n /* 尺寸样式 */\n ","\n\n ","\n"])),function(n){return n.$open?j("--zjpcy-primary-color","#1890ff"):j("--zjpcy-input-border","#d9d9d9")},j("--zjpcy-border-radius-lg","8px"),j("--zjpcy-bg-color-white","#fff"),j("--zjpcy-bg-color","#fafafa"),j("--zjpcy-transition-duration","0.2s"),j("--zjpcy-transition-timing-function","ease-in-out"),function(n){return n.$open?j("--zjpcy-input-box-shadow-focus","0 0 0 2px rgba(51, 154, 240, 0.2)"):j("--zjpcy-shadow-extra-light","0 2px 8px rgba(0, 0, 0, 0.08)")},function(n){return n.$disabled?"not-allowed":"pointer"},function(n){return n.$disabled?j("--zjpcy-opacity-disabled","0.65"):1},function(n){return n.$disabled?j("--zjpcy-input-border","#d9d9d9"):j("--zjpcy-primary-color","#1890ff")},function(n){return n.$disabled?"none":j("--zjpcy-input-box-shadow-hover","0 0 0 2px rgba(51, 154, 240, 0.2)")},function(n){switch(n.$size){case"small":return"\n min-height: 24px;\n padding: 2px 8px;\n font-size: 13px;\n ";case"large":return"\n min-height: 40px;\n padding: 8px 16px;\n font-size: 15px;\n ";default:return"\n min-height: 32px;\n padding: 6px 12px;\n font-size: 14px;\n "}},function(n){var e=n.$styles;return e&&Object.entries(e).map(function(n){var e=n[0],t=n[1];return"".concat(e,": ").concat(t,";")}).join("\n")}),C=e.div(a||(a=n(["\n flex: 1;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n overflow: hidden;\n"],["\n flex: 1;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n overflow: hidden;\n"]))),E=e.span(c||(c=n(["\n color: ",";\n user-select: none;\n"],["\n color: ",";\n user-select: none;\n"])),j("--zjpcy-text-color-light","#bfbfbf")),Y=e.span(l||(l=n(["\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])),j("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")),B=e.div(s||(s=n(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n"]))),H=e.span(p||(p=n(["\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: ",";\n border: 1px solid ",";\n border-radius: ",";\n color: ",";\n font-size: 13px;\n line-height: 1.4;\n transition: all "," ease;\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n ","\n\n ","\n"],["\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: ",";\n border: 1px solid ",";\n border-radius: ",";\n color: ",";\n font-size: 13px;\n line-height: 1.4;\n transition: all "," ease;\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n ","\n\n ","\n"])),j("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)"),j("--zjpcy-primary-color","#1890ff"),j("--zjpcy-border-radius-sm","4px"),j("--zjpcy-primary-color","#1890ff"),j("--zjpcy-transition-duration","0.2s"),j("--zjpcy-primary-color","#1890ff"),j("--zjpcy-bg-color-white","#fff"),function(n){return n.$disabled&&"\n cursor: not-allowed;\n opacity: 0.6;\n "},function(n){var e=n.$styles;return e&&Object.entries(e).map(function(n){var e=n[0],t=n[1];return"".concat(e,": ").concat(t,";")}).join("\n")}),I=e.span(d||(d=n(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: 4px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n svg {\n width: 10px;\n height: 10px;\n }\n"],["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-left: 4px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n svg {\n width: 10px;\n height: 10px;\n }\n"]))),_=e.input(f||(f=n(["\n flex: 1;\n min-width: 60px;\n border: none;\n outline: none;\n background: transparent;\n padding: 0;\n font-size: inherit;\n color: ",";\n\n &::placeholder {\n color: ",";\n }\n"],["\n flex: 1;\n min-width: 60px;\n border: none;\n outline: none;\n background: transparent;\n padding: 0;\n font-size: inherit;\n color: ",";\n\n &::placeholder {\n color: ",";\n }\n"])),j("--zjpcy-text-color","rgba(0, 0, 0, 0.85)"),j("--zjpcy-text-color-light","#bfbfbf")),q=e.div(g||(g=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: 8px;\n flex-shrink: 0;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: 8px;\n flex-shrink: 0;\n"]))),A=e.div(x||(x=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.06);\n color: ",";\n cursor: pointer;\n transition: all "," ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.12);\n color: ",";\n }\n\n svg {\n width: 10px;\n height: 10px;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.06);\n color: ",";\n cursor: pointer;\n transition: all "," ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.12);\n color: ",";\n }\n\n svg {\n width: 10px;\n height: 10px;\n }\n"])),j("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)"),j("--zjpcy-transition-duration","0.2s"),j("--zjpcy-text-color-secondary","rgba(0, 0, 0, 0.65)")),D=e.div(u||(u=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n color: ",";\n transition: transform "," ease;\n transform: ",";\n\n svg {\n width: 12px;\n height: 12px;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n color: ",";\n transition: transform "," ease;\n transform: ",";\n\n svg {\n width: 12px;\n height: 12px;\n }\n"])),j("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)"),j("--zjpcy-transition-duration","0.2s"),function(n){return n.$open?"rotate(180deg)":"rotate(0deg)"}),F=e.div(b||(b=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n color: ",";\n animation: select-spin 1s linear infinite;\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @keyframes select-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n color: ",";\n animation: select-spin 1s linear infinite;\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @keyframes select-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n"])),j("--zjpcy-primary-color","#1890ff")),G=e.div(h||(h=n(["\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n z-index: ",";\n background: ",";\n border: 1px solid ",";\n border-radius: ",";\n box-shadow: ",";\n opacity: ",";\n visibility: ",";\n transform: ",";\n transition: all "," ",";\n overflow: hidden;\n\n &.select-dropdown {\n /* 外部可通过 .select-dropdown 选择器覆盖样式 */\n }\n\n ","\n"],["\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n z-index: ",";\n background: ",";\n border: 1px solid ",";\n border-radius: ",";\n box-shadow: ",";\n opacity: ",";\n visibility: ",";\n transform: ",";\n transition: all "," ",";\n overflow: hidden;\n\n &.select-dropdown {\n /* 外部可通过 .select-dropdown 选择器覆盖样式 */\n }\n\n ","\n"])),j("--zjpcy-z-index-modal","1000"),j("--zjpcy-bg-color-white","#fff"),j("--zjpcy-border-color-light","#f0f0f0"),j("--zjpcy-border-radius-md","6px"),j("--zjpcy-shadow-lg","0 8px 24px rgba(0, 0, 0, 0.15)"),function(n){return n.$open?1:0},function(n){return n.$open?"visible":"hidden"},function(n){return n.$open?"translateY(0)":"translateY(-8px)"},j("--zjpcy-transition-duration","0.2s"),j("--zjpcy-transition-timing-function","ease-in-out"),function(n){var e=n.$styles;return e&&Object.entries(e).map(function(n){var e=n[0],t=n[1];return"".concat(e,": ").concat(t,";")}).join("\n")}),J=e.div(y||(y=n(["\n max-height: ",";\n overflow-y: auto;\n padding: 4px 0;\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ",";\n border-radius: 3px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: ",";\n }\n"],["\n max-height: ",";\n overflow-y: auto;\n padding: 4px 0;\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ",";\n border-radius: 3px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: ",";\n }\n"])),function(n){var e=n.$maxHeight;return e?"".concat(e,"px"):"256px"},j("--zjpcy-border-color","#e8e8e8"),j("--zjpcy-text-color-light","#bfbfbf")),K=e.div(m||(m=n(["\n display: flex;\n align-items: center;\n padding: 10px 12px;\n cursor: ",";\n transition: all "," ease;\n background: ",";\n color: ",";\n opacity: ",";\n\n &:hover {\n background: ",";\n }\n\n &.select-option {\n /* 外部可通过 .select-option 选择器覆盖样式 */\n }\n\n &.select-option-selected {\n font-weight: 500;\n }\n\n &.select-option-active {\n background: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n padding: 10px 12px;\n cursor: ",";\n transition: all "," ease;\n background: ",";\n color: ",";\n opacity: ",";\n\n &:hover {\n background: ",";\n }\n\n &.select-option {\n /* 外部可通过 .select-option 选择器覆盖样式 */\n }\n\n &.select-option-selected {\n font-weight: 500;\n }\n\n &.select-option-active {\n background: ",";\n }\n\n ","\n"])),function(n){return n.$disabled?"not-allowed":"pointer"},j("--zjpcy-transition-duration","0.2s"),function(n){return n.$selected?j("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)"):"transparent"},function(n){var e=n.$disabled,t=n.$selected;return e?j("--zjpcy-text-color-light","#bfbfbf"):t?j("--zjpcy-primary-color","#1890ff"):j("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")},function(n){return n.$disabled?.6:1},function(n){var e=n.$disabled,t=n.$selected;return e?"transparent":t?j("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)"):j("--zjpcy-bg-color","#fafafa")},j("--zjpcy-bg-color","#fafafa"),function(n){var e=n.$styles;return e&&Object.entries(e).map(function(n){var e=n[0],t=n[1];return"".concat(e,": ").concat(t,";")}).join("\n")}),L=e.div(w||(w=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n color: ",";\n\n svg {\n width: 14px;\n height: 14px;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n color: ",";\n\n svg {\n width: 14px;\n height: 14px;\n }\n"])),j("--zjpcy-primary-color","#1890ff")),M=e.div(v||(v=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px 16px;\n color: ",";\n font-size: 14px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px 16px;\n color: ",";\n font-size: 14px;\n"])),j("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)")),N=function(){if("undefined"!=typeof document){var n="select-global-styles";if(!document.getElementById(n)){var e=document.createElement("style");e.id=n,e.textContent="\n @keyframes select-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n ",document.head.appendChild(e)}}};export{D as Arrow,L as CheckIcon,A as ClearButton,G as Dropdown,M as Empty,$ as Label,k as LabelWrapper,F as LoadingIcon,K as Option,J as OptionList,E as Placeholder,_ as SearchInput,O as Selector,C as SelectorContent,Y as SingleValue,q as SuffixArea,H as Tag,I as TagClose,B as TagsContainer,z as Wrapper,N as injectGlobalStyles};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as a,useRef as t,useEffect as o,useCallback as l,useMemo as i}from"react";var c=function(c){var d,u=c.min,s=void 0===u?0:u,m=c.max,v=void 0===m?100:m,h=c.step,f=void 0===h?1:h,k=c.value,C=c.defaultValue,p=void 0===C?0:C,b=c.disabled,g=void 0!==b&&b,M=c.marks,w=void 0===M?{}:M,y=c.showValue,x=void 0!==y&&y,L=c.trackColor,N=void 0===L?"#1890ff":L,A=c.handleColor,E=void 0===A?"#1890ff":A,j=c.gradient,D=c.onChange,z=c.onAfterChange,F=c.className,X=void 0===F?"":F,P=c.style,R=a(p),U=R[0],V=R[1],q=a(!1),B=q[0],H=q[1],I=t(null),K=t(null),O=t(void 0!==k?k:p),S=void 0!==k,T=S?k:U;o(function(){O.current=T},[T]);var _=l(function(e){var r=(e-s)/(v-s);return Math.max(0,Math.min(1,r))},[s,v]),G=l(function(e){var r=Math.max(0,Math.min(1,e)),n=s+r*(v-s);if(f>0){var a=Math.round(n/f)*f;return Math.min(v,Math.max(s,a))}return Math.min(v,Math.max(s,n))},[s,v,f]),J=function(e){return"touches"in e?e.touches[0].clientX:e.clientX},Q=l(function(e){I.current&&!g&&(K.current&&cancelAnimationFrame(K.current),K.current=requestAnimationFrame(function(){var r=I.current.getBoundingClientRect(),n=(e-r.left)/r.width,a=G(n);a!==O.current&&(O.current=a,S||V(a),null==D||D(a))}))},[g,S,G,D]),W=function(e){if(!g){e.preventDefault(),H(!0);var r=J(e);Q(r)}};o(function(){if(B){var e=function(e){e.preventDefault();var r=J(e);Q(r)},r=function(){H(!1),K.current&&(cancelAnimationFrame(K.current),K.current=null),null==z||z(O.current)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",r),K.current&&(cancelAnimationFrame(K.current),K.current=null)}}},[B,Q,z]);var Y=_(T),Z=i(function(){return Object.entries(w).map(function(e){var r=e[0],n=e[1],a=Number(r),t="string"==typeof n?{trackColor:void 0,handleColor:void 0,mark:n}:n;return{value:a,label:t.mark,trackColor:t.trackColor,handleColor:t.handleColor,position:_(a)}}).sort(function(e,r){return e.value-r.value})},[w,_]),$=i(function(){for(var e=0;e<Z.length;e++){var r=Z[e];if(T<=r.value)return{trackColor:r.trackColor,handleColor:r.handleColor,mark:r.label}}var n=Z[Z.length-1];return n?{trackColor:n.trackColor,handleColor:n.handleColor,mark:n.label}:{trackColor:void 0,handleColor:void 0,mark:""}},[Z,T]),ee=P&&P["--zjpcy-slider-track-filled-bg"],re=P&&P["--zjpcy-slider-handle-border"],ne=j&&!$.trackColor&&!ee&&"#1890ff"===N,ae=$.trackColor||ee||N,te=$.handleColor||re||E;return r("div",{className:"slider-container ".concat(g?"slider-container-disabled":""," ").concat(B?"slider-container-dragging":""," ").concat(X),style:e((d={},d["--zjpcy-slider-track-filled-bg"]=ae,d["--zjpcy-slider-handle-border"]="2px solid ".concat(te),d),P),children:[r("div",{ref:I,className:"slider-track",onClick:function(e){g||(e.target.classList.contains("slider-handle")||(Q(e.clientX),null==z||z(T)))},role:"presentation",children:[n("div",{className:"slider-track-filled",style:e({width:"".concat(100*Y,"%")},ne&&j?{background:"linear-gradient(to right, ".concat(j.startColor,", ").concat(j.endColor,")")}:{})}),n("div",{className:"slider-handle",style:{left:"".concat(100*Y,"%")},onMouseDown:W,onTouchStart:W,onKeyDown:function(e){if(!g){var r=T;switch(e.key){case"ArrowLeft":case"ArrowDown":r=Math.max(s,T-f);break;case"ArrowRight":case"ArrowUp":r=Math.min(v,T+f);break;case"Home":r=s;break;case"End":r=v;break;case"PageDown":r=Math.max(s,T-10*f);break;case"PageUp":r=Math.min(v,T+10*f);break;default:return}e.preventDefault(),void 0===k&&V(r),null==D||D(r),null==z||z(r)}},role:"slider","aria-valuemin":s,"aria-valuemax":v,"aria-valuenow":T,"aria-disabled":g,tabIndex:g?-1:0,children:n("div",{className:"slider-tooltip",children:T})})]}),Z.length>0&&n("div",{className:"slider-marks",children:Z.map(function(e){return n("div",{className:"slider-mark",style:{left:"".concat(100*e.position,"%"),color:e.trackColor||void 0},children:e.label},e.value)})}),x&&r("div",{className:"slider-value-display",children:["当前值:",T]})]})},d=c;export{c as Slider,d as default};
@@ -1 +0,0 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as n}from"react/jsx-runtime";import r from"react";var t=function(t){var a=t.children,i=t.gap,s=void 0===i?12:i,l=t.align,c=void 0===l?"center":l,o=t.wrap,u=void 0===o?"nowrap":o,d=t.className,p=t.style,f=void 0===p?{}:p,m=t.inline,v=void 0!==m&&m,h=t.as,x=void 0===h?"div":h,b=r.Children.toArray(a).filter(function(e){return null!=e});return 0===b.length?null:n(x,{className:"space ".concat(v?"space-inline":""," ").concat(d||""),style:e({display:v?"inline-flex":"flex",gap:"number"==typeof s?"".concat(s,"px"):s,alignItems:function(){switch(c){case"start":return"flex-start";case"end":return"flex-end";case"center":default:return"center";case"baseline":return"baseline";case"stretch":return"stretch"}}(),flexWrap:u},f),children:b.map(function(e,r){return n("span",{className:"space-item",children:e},r)})})};export{t as default};
@@ -1 +0,0 @@
1
- "use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{useRef as i,useState as o,useMemo as u,useCallback as a,useEffect as c}from"react";import{parseSizeConfig as s,parseNumberConfig as l,parseSizeToPixels as d,getContainerStyle as m,getPanelStyle as v,getSplitterBarStyle as f,getSplitterLineStyle as p}from"./styles.js";var h=function(h){var z=h.layout,g=void 0===z?"horizontal":z,y=h.panels,S=h.defaultSize,j=void 0===S?"50%":S,x=h.minSize,b=void 0===x?50:x,E=h.maxSize,_=void 0===E?1/0:E,L=h.splitterSize,w=h.lineColor,D=h.lineHoverColor,M=h.disabled,N=void 0!==M&&M,C=h.onResize,I=h.onResizeEnd,P=h.className,X=void 0===P?"":P,Y=h.style,B=h.left,O=h.right,R=h.top,A=h.bottom,q=h.children,F=i(null),H=o([]),T=H[0],V=H[1],k=o(!1),G=k[0],J=k[1],K=o(-1),Q=K[0],U=K[1],W=i({isDragging:!1,startPosition:0,startSizes:[],containerSize:0,splitterIndex:-1}),Z=u(function(){if(y&&y.length>0)return y.map(function(e){return e.content});if("vertical"===g){if(R&&A)return[R,A]}else if(B&&O)return[B,O];return q&&Array.isArray(q)?q:[]},[y,g,B,O,R,A,q]),$=Z.length,ee=a(function(e){return y&&y[e]?y[e]:{}},[y]),te=a(function(){if(!F.current)return 0;var e=F.current.getBoundingClientRect();return"horizontal"===g?e.width:e.height},[g]),ne=a(function(){if(void 0!==L)return L;var e=getComputedStyle(document.documentElement).getPropertyValue("--zjpcy-splitter-bar-size").trim();return parseInt(e,10)||10},[L]);c(function(){var e=te();if(e>0&&$>0){var t=ne()*($-1),n=Math.max(0,e-t),r=s(j,$,"".concat(100/$,"%")),i=l(b,$,50),o=l(_,$,1/0),u=y?y.map(function(e){var t;return null!==(t=e.defaultSize)&&void 0!==t?t:r[y.indexOf(e)]}):r,a=y?y.map(function(e){var t;return null!==(t=e.minSize)&&void 0!==t?t:i[y.indexOf(e)]}):i,c=y?y.map(function(e){var t;return null!==(t=e.maxSize)&&void 0!==t?t:o[y.indexOf(e)]}):o,m=u.map(function(e){return d(e,n)}),v=m.reduce(function(e,t){return e+t},0);if(v!==n&&n>0){var f=n/v;m=m.map(function(e){return e*f})}m=m.map(function(e,t){return Math.max(a[t],Math.min(c[t],e))}),V(m)}},[$]),c(function(){var e=function(){var e=te();if(e>0&&T.length>0){var t=ne()*($-1),n=Math.max(0,e-t),r=T.reduce(function(e,t){return e+t},0);if(r>0){var i=n/r;V(function(e){return e.map(function(e){return e*i})})}}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[T,$,te,ne]);var re=a(function(t){return function(n){if(!N){var r=ee(t),i=ee(t+1);if(!r.disabled&&!i.disabled){n.preventDefault();var o="touches"in n?n.touches[0].clientX:n.clientX,u="touches"in n?n.touches[0].clientY:n.clientY,a="horizontal"===g?o:u,c=te();W.current={isDragging:!0,startPosition:a,startSizes:e([],T,!0),containerSize:c,splitterIndex:t},J(!0),U(t)}}}},[N,g,T,te,ee]),ie=a(function(t){if(W.current.isDragging&&!N){var n="touches"in t?t.touches[0].clientX:t.clientX,r="touches"in t?t.touches[0].clientY:t.clientY,i=("horizontal"===g?n:r)-W.current.startPosition,o=W.current.splitterIndex,u=W.current.startSizes,a=l(b,$,50),c=l(_,$,1/0),s=y?y.map(function(e,t){var n;return null!==(n=e.minSize)&&void 0!==n?n:a[t]}):a,d=y?y.map(function(e,t){var n;return null!==(n=e.maxSize)&&void 0!==n?n:c[t]}):c,m=s[o],v=d[o],f=s[o+1],p=d[o+1],h=u[o],z=u[o+1],S=h+i,j=z-i;S<m?(S=m,j=h+z-m):S>v&&(S=v,j=h+z-v),j<f?(j=f,S=h+z-f):j>p&&(j=p,S=h+z-p);var x=e([],T,!0);x[o]=S,x[o+1]=j,V(x),null==C||C(x,o)}},[N,g,T,$,b,_,y,C]),oe=a(function(){W.current.isDragging&&(W.current.isDragging=!1,J(!1),U(-1),null==I||I(T))},[T,I]);if(c(function(){if(G)return document.addEventListener("mousemove",ie),document.addEventListener("mouseup",oe),document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",oe),function(){document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",oe),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",oe)}},[G,ie,oe]),$<2)return console.warn("Splitter requires at least 2 panels"),null;var ue=["zjpcy-splitter","zjpcy-splitter-".concat(g),G?"zjpcy-splitter-dragging":"",X].filter(Boolean).join(" ");return t("div",{ref:F,className:ue,style:m(g,Y),children:Z.map(function(e,i){var o=T[i]||0,u=i===$-1;return n(r.Fragment,{children:[t("div",{className:"zjpcy-splitter__panel",style:v(o,g,i,$),children:e}),!u&&t("div",{className:["zjpcy-splitter__bar",Q===i?"zjpcy-splitter__bar-dragging":"",N||ee(i).disabled||ee(i+1).disabled?"zjpcy-splitter__bar-disabled":""].filter(Boolean).join(" "),style:f(g,L,N,i),onMouseDown:re(i),onTouchStart:re(i),children:t("div",{className:"zjpcy-splitter__line",style:p(g,w,D,G,Q===i)})})]},i)})})},z=h;export{h as Splitter,z as default};
@@ -1 +0,0 @@
1
- import{__assign as r,__spreadArray as t}from"../node_modules/tslib/tslib.es6.js";var i=function(t,i){return r({display:"flex",flexDirection:"horizontal"===t?"row":"column",alignItems:"stretch",width:"100%",height:"100%",overflow:"hidden",background:"var(--zjpcy-splitter-panel-bg)",borderRadius:"var(--zjpcy-splitter-panel-radius)"},i)},n=function(r,t,i,n){void 0===i&&(i=0),void 0===n&&(n=2);var e={position:"relative",overflow:"auto",flexShrink:0,alignSelf:"stretch",background:"var(--zjpcy-splitter-panel-bg)"};return"horizontal"===t?(e.width="".concat(r,"px"),e.height="auto",e.minHeight="100%"):(e.width="auto",e.minWidth="100%",e.height="".concat(r,"px")),i<n-1&&(e.boxShadow="horizontal"===t?"var(--zjpcy-splitter-panel-shadow)":"var(--zjpcy-splitter-panel-shadow-vertical)",e.zIndex=n-i),e},e=function(r,t,i,n){void 0===n&&(n=0);var e={position:"relative",flexShrink:0,background:i?"var(--zjpcy-bg-color-light)":"var(--zjpcy-splitter-bar-bg)",cursor:i?"not-allowed":"horizontal"===r?"col-resize":"row-resize",userSelect:"none",touchAction:"none",zIndex:10+5*n,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"var(--zjpcy-splitter-shadow-sm)",transition:"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)"};return void 0!==t&&("horizontal"===r?(e.width="".concat(t,"px"),e.height="100%"):(e.width="100%",e.height="".concat(t,"px"))),i&&(e.opacity="var(--zjpcy-opacity-disabled)"),e},o=function(r,t,i,n,e){void 0===e&&(e=!1);var o={borderRadius:"var(--zjpcy-border-radius-sm)",transition:"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)"};return"horizontal"===r?(o.width=t?"2px":"var(--zjpcy-splitter-line-width)",o.height=t?"32px":"var(--zjpcy-splitter-line-length)",o.minHeight="var(--zjpcy-splitter-line-min-length)"):(o.width=t?"32px":"var(--zjpcy-splitter-line-length)",o.minWidth="var(--zjpcy-splitter-line-min-length)",o.height=t?"2px":"var(--zjpcy-splitter-line-width)"),e&&n&&i?(o.backgroundColor=i,o.boxShadow="var(--zjpcy-splitter-shadow-active)"):n&&i?(o.backgroundColor=i,o.boxShadow="var(--zjpcy-splitter-shadow-md)"):t?o.backgroundColor=t:o.background="var(--zjpcy-splitter-line-bg)",o},a=function(r,i,n){var e;if(void 0===n&&(n="50%"),void 0===r){var o="".concat(100/i,"%");return new Array(i).fill(o)}if(Array.isArray(r)){for(var a=t([],r,!0);a.length<i;)a.push(null!==(e=a[a.length-1])&&void 0!==e?e:n);return a.slice(0,i)}return new Array(i).fill(r)},l=function(r,i,n){var e;if(void 0===r)return new Array(i).fill(n);if(Array.isArray(r)){for(var o=t([],r,!0);o.length<i;)o.push(null!==(e=o[o.length-1])&&void 0!==e?e:n);return o.slice(0,i)}return new Array(i).fill(r)},c=function(r,t){return"number"==typeof r?r:"string"==typeof r&&r.endsWith("%")?t*(parseFloat(r)/100):parseFloat(r)||t/2};export{i as getContainerStyle,n as getPanelStyle,e as getSplitterBarStyle,o as getSplitterLineStyle,l as parseNumberConfig,a as parseSizeConfig,c as parseSizeToPixels};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as l}from"react/jsx-runtime";import{useState as c,useEffect as s}from"react";import{injectGlobalStyles as t,Wrapper as a,Track as d,LoadingIcon as n,CheckedInner as h,UnCheckedInner as r,Thumb as o}from"./styles.js";var m=function(m){var u=m.checked,v=m.defaultChecked,$=void 0!==v&&v,w=m.disabled,k=void 0!==w&&w,f=m.loading,p=void 0!==f&&f,b=m.size,y=void 0===b?"default":b,g=m.width,C=m.checkedChildren,N=m.unCheckedChildren,z=m.styles,x=m.onChange,j=m.label,A=m.labelGap,B=void 0===A?8:A,G=m.labelClassName,H=void 0===G?"":G,I=m.labelStyle,M=void 0!==u,R=c($),S=R[0],V=R[1],Z=M?u:S,_=void 0!==C||void 0!==N;s(function(){t()},[]);return i(a,{className:"switch-wrapper",$styles:null==z?void 0:z.wrapper,children:l("div",{className:"switch-label-wrapper",style:{display:"flex",alignItems:"center"},children:[j&&i("div",{className:"switch-label ".concat(H),style:e({marginRight:"number"==typeof B?"".concat(B,"px"):B},I),children:j}),l(d,{className:"switch-track".concat(Z?" switch-track-checked":"").concat(k?" switch-track-disabled":"").concat(p?" switch-track-loading":""),$checked:Z,$disabled:k,$size:y,$loading:p,$hasChildren:_,$width:g,$styles:null==z?void 0:z.track,onClick:function(){if(!k&&!p){var e=!Z;M||V(e),null==x||x(e)}},children:[p&&i(n,{className:"switch-loading-icon",$checked:Z,$size:y,$width:g,$styles:null==z?void 0:z.loading,children:i("svg",{viewBox:"0 0 24 24",width:"12",height:"12",fill:"#1890ff",children:i("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),!p&&Z&&C&&i(h,{className:"switch-checked-inner",$size:y,$styles:null==z?void 0:z.inner,children:C}),!p&&!Z&&N&&i(r,{className:"switch-unchecked-inner",$size:y,$styles:null==z?void 0:z.inner,children:N}),i(o,{className:"switch-thumb".concat(Z?" switch-thumb-checked":""),$checked:Z,$size:y,$loading:p,$hasChildren:_,$width:g,$styles:null==z?void 0:z.thumb})]})]})})};export{m as default};
@@ -1 +0,0 @@
1
- import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import t from"styled-components";var i,e,c,a,o,r,s=function(n,t){return"var(".concat(n,", ").concat(t,")")},p=t.div(i||(i=n(["\n display: inline-block;\n\n &.switch-wrapper {\n /* 外部可通过 .switch-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: inline-block;\n\n &.switch-wrapper {\n /* 外部可通过 .switch-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),d=t.div(e||(e=n(["\n position: relative;\n background: ",";\n border-radius: ",";\n transition: ",";\n cursor: ",";\n opacity: ",";\n box-sizing: border-box;\n overflow: hidden;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);\n\n &.switch-track {\n /* 外部可通过 .switch-track 选择器覆盖样式 */\n }\n\n &.switch-track-checked {\n background: ",";\n box-shadow: 0 2px 8px rgba(24, 144, 255, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.2);\n }\n\n &.switch-track-disabled {\n cursor: not-allowed;\n opacity: var(--zjpcy-switch-disabled-opacity, 0.65);\n background: ",";\n }\n\n &.switch-track-loading {\n cursor: wait;\n }\n\n &:hover:not(.switch-track-disabled) {\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);\n }\n\n &.switch-track-checked:hover:not(.switch-track-disabled) {\n box-shadow: 0 4px 12px rgba(24, 144, 255, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.2);\n }\n\n ","\n\n ","\n\n ","\n\n ","\n"],["\n position: relative;\n background: ",";\n border-radius: ",";\n transition: ",";\n cursor: ",";\n opacity: ",";\n box-sizing: border-box;\n overflow: hidden;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);\n\n &.switch-track {\n /* 外部可通过 .switch-track 选择器覆盖样式 */\n }\n\n &.switch-track-checked {\n background: ",";\n box-shadow: 0 2px 8px rgba(24, 144, 255, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.2);\n }\n\n &.switch-track-disabled {\n cursor: not-allowed;\n opacity: var(--zjpcy-switch-disabled-opacity, 0.65);\n background: ",";\n }\n\n &.switch-track-loading {\n cursor: wait;\n }\n\n &:hover:not(.switch-track-disabled) {\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);\n }\n\n &.switch-track-checked:hover:not(.switch-track-disabled) {\n box-shadow: 0 4px 12px rgba(24, 144, 255, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.2);\n }\n\n ","\n\n ","\n\n ","\n\n ","\n"])),s("--zjpcy-switch-track-bg-gradient","linear-gradient(135deg, #e8e8e8 0%, #d9d9d9 100%)"),s("--zjpcy-switch-track-radius","12px"),s("--zjpcy-switch-transition","all 0.2s ease-in-out"),function(n){return n.$disabled?"not-allowed":"pointer"},function(n){return n.$disabled?"var(--zjpcy-switch-disabled-opacity, 0.65)":1},s("--zjpcy-switch-track-active-gradient","linear-gradient(135deg, #1890ff 0%, #40a9ff 100%)"),s("--zjpcy-switch-disabled-bg","#f5f5f5"),function(n){var t=n.$size,i=n.$hasChildren,e=n.$width;return e?"\n width: ".concat(e,"px;\n min-width: ").concat(e,"px;\n height: ").concat("small"===t?s("--zjpcy-switch-small-height","16px"):s("--zjpcy-switch-default-height","22px"),";\n "):"small"===t?"\n width: ".concat(i?"auto":s("--zjpcy-switch-small-width","28px"),";\n min-width: ").concat(s("--zjpcy-switch-small-width","28px"),";\n height: ").concat(s("--zjpcy-switch-small-height","16px"),";\n "):"\n width: ".concat(i?"auto":s("--zjpcy-switch-default-width","44px"),";\n min-width: ").concat(s("--zjpcy-switch-default-width","44px"),";\n height: ").concat(s("--zjpcy-switch-default-height","22px"),";\n ")},function(n){return n.$checked&&"\n background: ".concat(s("--zjpcy-switch-track-active-gradient","linear-gradient(135deg, #1890ff 0%, #40a9ff 100%)"),";\n box-shadow: 0 2px 8px rgba(24, 144, 255, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.2);\n ")},function(n){return n.$loading&&"\n cursor: wait;\n "},function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),h=t.div(c||(c=n(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: linear-gradient(135deg, "," 0%, "," 100%);\n border-radius: ",";\n box-shadow: ",";\n transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;\n z-index: 2;\n\n &.switch-thumb {\n /* 外部可通过 .switch-thumb 选择器覆盖样式 */\n }\n\n &.switch-thumb-checked {\n box-shadow: ",";\n }\n\n ","\n\n ","\n\n ","\n"],["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: linear-gradient(135deg, "," 0%, "," 100%);\n border-radius: ",";\n box-shadow: ",";\n transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;\n z-index: 2;\n\n &.switch-thumb {\n /* 外部可通过 .switch-thumb 选择器覆盖样式 */\n }\n\n &.switch-thumb-checked {\n box-shadow: ",";\n }\n\n ","\n\n ","\n\n ","\n"])),s("--zjpcy-switch-thumb-bg","#fff"),s("--zjpcy-bg-color-light","#f5f5f5"),s("--zjpcy-switch-thumb-radius","50%"),s("--zjpcy-switch-thumb-shadow","0 2px 8px rgba(0, 0, 0, 0.15)"),s("--zjpcy-switch-thumb-shadow-active","0 2px 8px rgba(24, 144, 255, 0.4)"),function(n){var t=n.$size,i=n.$checked,e=n.$width,c="small"===t?12:18;if(e){var a="".concat(i?e-c-2:2,"px");return"\n width: ".concat(c,"px;\n height: ").concat(c,"px;\n left: ").concat(a,";\n ")}if("small"===t){var o=i?"14px":"2px";return"\n width: ".concat(c,"px;\n height: ").concat(c,"px;\n left: ").concat(o,";\n ")}var r=i?"24px":"2px";return"\n width: ".concat(c,"px;\n height: ").concat(c,"px;\n left: ").concat(r,";\n ")},function(n){return n.$loading&&"\n animation: zjpcy-switch-thumb-spin 1s linear infinite;\n "},function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),l=t.div(a||(a=n(["\n position: absolute;\n top: 50%;\n margin-top: -6px; /* 12px 高度的一半,实现垂直居中 */\n width: ",";\n height: ",";\n z-index: 3;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.switch-loading-icon {\n /* 外部可通过 .switch-loading-icon 选择器覆盖样式 */\n }\n\n /* SVG 旋转动画 - 以中心点旋转 */\n & > svg {\n width: 100%;\n height: 100%;\n animation: zjpcy-switch-spin 1s linear infinite;\n transform-origin: center center;\n display: block;\n fill: ",";\n }\n\n ","\n\n ","\n"],["\n position: absolute;\n top: 50%;\n margin-top: -6px; /* 12px 高度的一半,实现垂直居中 */\n width: ",";\n height: ",";\n z-index: 3;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.switch-loading-icon {\n /* 外部可通过 .switch-loading-icon 选择器覆盖样式 */\n }\n\n /* SVG 旋转动画 - 以中心点旋转 */\n & > svg {\n width: 100%;\n height: 100%;\n animation: zjpcy-switch-spin 1s linear infinite;\n transform-origin: center center;\n display: block;\n fill: ",";\n }\n\n ","\n\n ","\n"])),s("--zjpcy-switch-loading-size","12px"),s("--zjpcy-switch-loading-size","12px"),s("--zjpcy-switch-loading-color","#1890ff"),function(n){var t=n.$size,i=n.$checked,e=n.$width,c="small"===t?12:18;return e?"\n left: ".concat((i?e-c-2:2)+(c-12)/2,"px;\n "):"small"===t?"\n left: ".concat((i?14:2)+(c-12)/2,"px;\n "):"\n left: ".concat((i?24:2)+(c-12)/2,"px;\n ")},function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),w=t.span(o||(o=n(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: ",";\n display: flex;\n align-items: center;\n justify-content: flex-start;\n font-size: ",";\n color: #fff;\n white-space: nowrap;\n user-select: none;\n z-index: 1;\n padding-right: ",";\n font-weight: 500;\n letter-spacing: 0.2px;\n\n &.switch-checked-inner {\n /* 外部可通过 .switch-checked-inner 选择器覆盖样式 */\n }\n\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n left: ",";\n display: flex;\n align-items: center;\n justify-content: flex-start;\n font-size: ",";\n color: #fff;\n white-space: nowrap;\n user-select: none;\n z-index: 1;\n padding-right: ",";\n font-weight: 500;\n letter-spacing: 0.2px;\n\n &.switch-checked-inner {\n /* 外部可通过 .switch-checked-inner 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){return"small"===n.$size?"3px":"4px"},function(n){return"small"===n.$size?"9px":"10px"},function(n){return"small"===n.$size?"14px":"20px"},function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),u=t.span(r||(r=n(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n font-size: ",";\n color: ",";\n white-space: nowrap;\n user-select: none;\n z-index: 1;\n padding-left: ",";\n font-weight: 500;\n letter-spacing: 0.2px;\n\n &.switch-unchecked-inner {\n /* 外部可通过 .switch-unchecked-inner 选择器覆盖样式 */\n }\n\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n font-size: ",";\n color: ",";\n white-space: nowrap;\n user-select: none;\n z-index: 1;\n padding-left: ",";\n font-weight: 500;\n letter-spacing: 0.2px;\n\n &.switch-unchecked-inner {\n /* 外部可通过 .switch-unchecked-inner 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){return"small"===n.$size?"3px":"4px"},function(n){return"small"===n.$size?"9px":"10px"},s("--zjpcy-text-color-secondary","rgba(0, 0, 0, 0.65)"),function(n){return"small"===n.$size?"14px":"20px"},function(n){var t=n.$styles;return t&&Object.entries(t).map(function(n){var t=n[0],i=n[1];return"".concat(t,": ").concat(i,";")}).join("\n")}),f=function(){if("undefined"!=typeof document&&!document.getElementById("zjpcy-switch-styles")){var n=document.createElement("style");n.id="zjpcy-switch-styles",n.textContent="\n @keyframes zjpcy-switch-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes zjpcy-switch-thumb-spin {\n from { transform: translateY(-50%) rotate(0deg); }\n to { transform: translateY(-50%) rotate(360deg); }\n }\n ",document.head.appendChild(n)}};export{w as CheckedInner,l as LoadingIcon,h as Thumb,d as Track,u as UnCheckedInner,p as Wrapper,f as injectGlobalStyles};
@@ -1 +0,0 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as o,jsx as r}from"react/jsx-runtime";import t from"classnames";import{useSortable as n}from"@dnd-kit/sortable";import{CSS as i}from"@dnd-kit/utilities";import l from"../Checkbox/index.js";import d from"../Radio/index.js";var a=function(a){var s=a.id,c=a.record,u=a.rowIndex,m=a.allColumns,b=a.renderTableCell,f=a.isRowSelectionEnabled,g=a.rowSelection,p=a.selectedRowKeys,h=void 0===p?[]:p,v=a.handleRowSelect,x=n({id:s}),w=x.attributes,k=x.listeners,y=x.setNodeRef,j=x.transform,C=x.transition,R=x.isDragging,S={transform:i.Transform.toString(j),transition:C,opacity:R?.5:1,cursor:"grab"};return o("tr",e({ref:y,style:S},w,k,{className:t("zjpcy-table-sortable-row",{"zjpcy-table-sortable-row-dragging":R}),"data-dragging":R,children:[f&&function(){var e,o=h.includes(s),t=null===(e=null==g?void 0:g.getCheckboxProps)||void 0===e?void 0:e.call(g,c,u),n=(null==t?void 0:t.disabled)||!1,i={width:(null==g?void 0:g.columnWidth)||"50px",textAlign:"center",backgroundColor:"white"};return r("td",{style:i,children:"checkbox"===(null==g?void 0:g.type)?r(l,{checked:o,disabled:n,onChange:function(e){return null==v?void 0:v(c,u,e)}}):r(d,{checked:o,disabled:n,onChange:function(){return null==v?void 0:v(c,u,!o)}})},"zjpcy-table-sortable-selection-".concat(s))}(),m.map(function(e,o){return b(e,c,u,o,m)})]}))};export{a as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e,__spreadArray as t,__rest as n}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as c,useMemo as u}from"react";import d from"classnames";import{useSensors as s,useSensor as f,PointerSensor as m,KeyboardSensor as p,DndContext as v,closestCenter as h}from"@dnd-kit/core";import{sortableKeyboardCoordinates as g,SortableContext as y,verticalListSortingStrategy as b,arrayMove as x}from"@dnd-kit/sortable";import S from"../Empty/index.js";import k from"../Pagination/index.js";import w from"../Icon/Icon.js";import j from"../Checkbox/index.js";import z from"../Radio/index.js";import C from"./SortableRow.js";import N from"../Tooltip/Tooltip.js";var I=function(I){var T=I.dataSource,E=void 0===T?[]:T,A=I.columns,W=void 0===A?[]:A,L=I.bordered,R=void 0!==L&&L,K=I.scroll,P=void 0===K?{}:K,_=I.rowKey,F=void 0===_?"key":_,O=I.className,V=void 0===O?"":O,D=I.pagination,M=I.empty,q=I.loading,J=void 0!==q&&q,X=I.loadingText,B=void 0===X?"加载中...":X,G=I.loadingDelay,H=I.draggable,Q=void 0!==H&&H,Y=I.onDragEnd,U=I.rowSelection,Z=l([]),$=Z[0],ee=Z[1],te=l([]),ne=te[0],re=te[1],ie=l([]),oe=ie[0],le=ie[1],ae=l([]),ce=ae[0],ue=ae[1],de=l(1),se=de[0],fe=de[1],me=l(10),pe=me[0],ve=me[1],he=l(J),ge=he[0],ye=he[1],be=l(E),xe=be[0],Se=be[1],ke=a(null),we=a(null),je=a(null),ze=a(null),Ce=a(null),Ne=a(0),Ie=a(!1),Te=a(null),Ee=a(0),Ae=l(null),We=Ae[0],Le=Ae[1],Re=l(""),Ke=Re[0],Pe=Re[1],_e=null==U?void 0:U.type,Fe="checkbox"===_e||"radio"===_e,Oe=l((null==U?void 0:U.defaultSelectedRowKeys)||[]),Ve=Oe[0],De=Oe[1],Me=void 0!==(null==U?void 0:U.selectedRowKeys)?U.selectedRowKeys:Ve;c(function(){Se(E)},[E]),c(function(){return ke.current&&(clearTimeout(ke.current),ke.current=null),J&&G&&G>0?(ye(!0),ke.current=setTimeout(function(){ye(!1)},G)):ye(J),function(){ke.current&&clearTimeout(ke.current)}},[J,G]),c(function(){D&&"object"==typeof D&&(void 0!==D.current&&fe(D.current),void 0!==D.pageSize&&ve(D.pageSize))},[D&&"object"==typeof D?D.current:void 0,D&&"object"==typeof D?D.pageSize:void 0]),c(function(){return function(){Ce.current&&cancelAnimationFrame(Ce.current),Te.current&&clearTimeout(Te.current)}},[]);var qe=function(e){return e?"number"==typeof e?e:parseInt(e,10)||0:0};c(function(){var t=[],n=[],r=[],i=[];W.forEach(function(o,l){var a=qe(o.width);i[l]=a;var c=e(e({},o),{_index:l});"start"===o.fixed||!0===o.fixed?t.push(c):"end"===o.fixed?n.push(c):r.push(c)}),ee(t),re(n),le(r),ue(i),requestAnimationFrame(function(){Je.current(0)})},[W]);var Je=a(function(e){we.current&&we.current.querySelectorAll('.custom-table th[style*="sticky"], .custom-table td[style*="sticky"]').forEach(function(t){var n=t,r=window.getComputedStyle(n),i=r.left,o=r.right;"auto"!==i&&"0px"!==i?n.style.transform="translateX(".concat(e,"px)"):"auto"!==o&&"0px"!==o&&(n.style.transform="translateX(".concat(-e,"px)"))})}),Xe=function(e,t,n){Ce.current&&cancelAnimationFrame(Ce.current),Ce.current=requestAnimationFrame(function(){t&&t.scrollLeft!==n&&(t.scrollLeft=n),Je.current(n),Ce.current=null})},Be=function(e,t){var n=t||pe,r=n!==pe?1:e;fe(r),ve(n),D&&"function"==typeof D.onChange&&D.onChange(r,t)},Ge=function(e,t){if(void 0===e&&(e=se),void 0===t&&(t=pe),!1===D)return null;var n,r=void 0!==(null==D?void 0:D.total)?D.total:xe.length,i=Math.ceil(r/t)||1,o=Math.min(e,i);if(void 0!==(null==D?void 0:D.total))n=xe;else{var l=(o-1)*t,a=l+t;n=xe.slice(l,a)}return{data:n,total:r,pageSize:t,current:o,totalPages:i}},He=function(e,t){return"function"==typeof F?F(e,t):e[F]||t},Qe=function(){var e=Ge();return(e?e.data:xe).map(function(e,t){var n,r=He(e,t),i=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t);return{key:r,disabled:null==i?void 0:i.disabled}}).filter(function(e){return!e.disabled}).map(function(e){return e.key})},Ye=function(){var e=Qe();if(0===e.length)return!1;var t=e.filter(function(e){return Me.includes(e)}).length;return t>0&&t<e.length},Ue=function(e,n,r){var i,o,l,a=He(e,n);o="radio"===_e?r?[a]:[]:r?t(t([],Me,!0),[a],!1):Me.filter(function(e){return e!==a}),l=xe.filter(function(e){var t="function"==typeof F?F(e,xe.indexOf(e)):e[F];return o.includes(t)}),De(o),null===(i=null==U?void 0:U.onChange)||void 0===i||i.call(U,o,l)},Ze=function(){var e,n={width:(null==U?void 0:U.columnWidth)||"50px",textAlign:"center",backgroundColor:"#fafafa !important",top:0};return i("th",{style:n,children:"checkbox"===_e?i(j,{checked:(e=Qe(),0!==e.length&&e.every(function(e){return Me.includes(e)})),indeterminate:Ye(),onChange:function(e){return function(e){var n,r,i=Ge(),o=i?i.data:xe;if(e){var l=o.map(function(e,t){var n,r=He(e,t),i=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t);return{key:r,disabled:null==i?void 0:i.disabled}}).filter(function(e){return!e.disabled}).map(function(e){return e.key}),a=Me.filter(function(e){return!o.some(function(t,n){return He(t,n)===e})}),c=t(t([],a,!0),l,!0),u=xe.filter(function(e){var t="function"==typeof F?F(e,xe.indexOf(e)):e[F];return c.includes(t)});De(c),null===(n=null==U?void 0:U.onChange)||void 0===n||n.call(U,c,u)}else{var d=o.map(function(e,t){return He(e,t)}),s=Me.filter(function(e){return!d.includes(e)});u=xe.filter(function(e){var t="function"==typeof F?F(e,xe.indexOf(e)):e[F];return s.includes(t)}),De(s),null===(r=null==U?void 0:U.onChange)||void 0===r||r.call(U,s,u)}}(e)}}):(null==U?void 0:U.columnTitle)||""},"zjpcy-table-selection-header")},$e=function(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if("boolean"==typeof e)return"";if(Array.isArray(e))return e.map($e).join("");if("object"==typeof e&&!o.isValidElement(e)){if(void 0!==e.name)return String(e.name);if(void 0!==e.label)return String(e.label);if(void 0!==e.title)return String(e.title);if(void 0!==e.value)return String(e.value);if(void 0!==e.text)return String(e.text);try{return JSON.stringify(e)}catch(e){return""}}if(o.isValidElement(e)){var t=e.props;if(t.children)return $e(t.children);if(void 0!==t.title)return String(t.title);if(void 0!==t.label)return String(t.label);if(void 0!==t.value)return String(t.value);if(void 0!==t.alt)return String(t.alt)}return""},et=function(e,t,n){Le({rowIndex:e,colKey:t}),Pe(String(n||""))},tt=function(e,t){t.onSave&&t.onSave(e,Ke),Le(null),Pe("")},nt=function(){Le(null),Pe("")},rt=function(e,t){var n,r=He(e,t),o=Me.includes(r),l=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t),a=(null==l?void 0:l.disabled)||!1,c={width:(null==U?void 0:U.columnWidth)||"50px",textAlign:"center",backgroundColor:"white"};return i("td",{style:c,children:"checkbox"===_e?i(j,{checked:o,disabled:a,onChange:function(n){return Ue(e,t,n)}}):i(z,{checked:o,disabled:a,onChange:function(){return Ue(e,t,!o)}})},"zjpcy-table-selection-".concat(r))},it=function(e,t,n,l,a,c){if(void 0===c&&(c=!1),c)return rt(t,n);var u={width:e.width||"auto",textAlign:e.align||"left",backgroundColor:"white"};if("start"===e.fixed||!0===e.fixed){u.position="sticky";var d=0;Fe&&(d+=qe((null==U?void 0:U.columnWidth)||"50px"));for(var s=0;s<l;s++)d+=ce[s]||0;u.left="".concat(d,"px"),u.zIndex=5}else if("end"===e.fixed){u.position="sticky";var f=0;for(s=a.length-1;s>l;s--)f+=ce[s]||0;u.right="".concat(f,"px"),u.zIndex=5}var m=$.length?$.length-1:-1,p=ne.length?$.length+oe.length:-1,v=("start"===e.fixed||!0===e.fixed)&&l===m,h="end"===e.fixed&&l===p,g=e.key||e.dataIndex||e._index,y=(null==We?void 0:We.rowIndex)===n&&(null==We?void 0:We.colKey)===String(g),b=e.dataIndex?t[e.dataIndex]:null;e.render&&(b=e.render(b,t,n));var x=b;if(null!==b&&"object"==typeof b&&!o.isValidElement(b))if(void 0!==b.name)x=String(b.name);else if(void 0!==b.label)x=String(b.label);else if(void 0!==b.title)x=String(b.title);else try{x=JSON.stringify(b)}catch(e){x=""}var S=e.maxLines&&e.maxLines>0,k="";if(e.tooltip&&!y&&!(k=$e(x))&&e.dataIndex){var j=t[e.dataIndex];k="object"==typeof j?$e(j):String(j||"")}if(e.editable&&y)return i("td",{style:u,className:"".concat(v?"zjpcy-table-fixed-left-shadow":"").concat(h?" zjpcy-table-fixed-right-shadow":""),children:r("div",{className:"zjpcy-table-edit-cell",onClick:function(e){return e.stopPropagation()},children:[i("input",{type:"text",className:"zjpcy-table-edit-input",value:Ke,onChange:function(e){return Pe(e.target.value)},autoFocus:!0,onClick:function(e){return e.stopPropagation()}}),r("div",{className:"zjpcy-table-edit-actions",children:[i("span",{className:"zjpcy-table-edit-icon zjpcy-edit-submit",onClick:function(){return tt(t,e)},title:"保存",children:i(w,{type:"check",size:24,color:"#339af0"})}),i("span",{className:"zjpcy-table-edit-icon zjpcy-edit-cancel",onClick:nt,title:"取消",children:i(w,{type:"close",size:24,color:"#339af0"})})]})]})},e.key||e.dataIndex||e._index);var z=S?i("div",{className:"zjpcy-table-cell-ellipsis",style:{WebkitLineClamp:e.maxLines},children:x}):x,C=k?i(N,{title:k,placement:"top",delay:0,children:i("span",{className:"zjpcy-table-cell-tooltip-wrapper",children:z})}):z;return r("td",{style:u,onClick:e.editable?function(){return et(n,String(g),b)}:void 0,className:"".concat(v?"zjpcy-table-fixed-left-shadow":"").concat(h?" zjpcy-table-fixed-right-shadow":"").concat(S?" zjpcy-table-cell-has-ellipsis":"").concat(e.editable?" zjpcy-table-editable-cell":""),children:[C,e.editable&&i("span",{className:"zjpcy-table-edit-icon-wrapper",children:i(w,{type:"edit",size:16,color:"#339af0"})})]},e.key||e.dataIndex||e._index)},ot=s(f(m,{activationConstraint:{distance:8}}),f(p,{coordinateGetter:g})),lt=function(e){var n=e.active,r=e.over;if(r&&n.id!==r.id){var i=Ge(),o=i?i.data:xe,l=o.findIndex(function(e,t){return String(He(e,t))===String(n.id)}),a=o.findIndex(function(e,t){return String(He(e,t))===String(r.id)});if(-1!==l&&-1!==a){var c=x(o,l,a);if(i&&D&&"object"==typeof D&&void 0===D.total){var u=(i.current-1)*i.pageSize,d=t([],xe,!0);c.forEach(function(e,t){d[u+t]=e}),Se(d),Y&&Y(d)}else Se(c),Y&&Y(c)}}},at={width:P.x?"number"==typeof P.x?"".concat(P.x,"px"):P.x:"100%"},ct={maxHeight:P.y?"number"==typeof P.y?"".concat(P.y,"px"):P.y:"auto",overflowY:P.y?"auto":"visible",overflowX:P.x?"auto":"visible"},ut=t(t(t([],$,!0),oe,!0),ne,!0),dt=u(function(){return Ge()},[xe,D,pe,se]),st=dt?dt.data:xe;return r("div",{ref:we,className:d("custom-table-container",{"custom-table-bordered":R,"custom-table-draggable":Q},V),style:at,children:[ge&&i("div",{className:"custom-table-loading-mask",children:r("div",{className:"custom-table-loading-content",children:[i("div",{className:"custom-table-loading-spinner",children:r("svg",{viewBox:"0 0 24 24",className:"custom-table-loading-icon",children:[i("circle",{className:"custom-table-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),i("circle",{className:"custom-table-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})}),B&&i("div",{className:"custom-table-loading-text",children:B})]})}),i("div",{className:"custom-table-header",ref:je,onScroll:function(e){if(je.current&&ze.current){var t=e.target;if(t===je.current){var n=t.scrollLeft;Ie.current=!0,Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Ie.current=!1},150),Math.abs(n-Ne.current)>.5&&(Ne.current=n,Ee.current=n,Xe(je.current,ze.current,n))}}},children:r("table",{className:d("custom-table",{"custom-table-bordered-body":R,"custom-table-header-separator":!R}),children:[r("colgroup",{children:[Fe&&i("col",{style:{width:(null==U?void 0:U.columnWidth)||"50px"}},"header-selection-col"),ut.map(function(e,t){return i("col",{style:{width:e.width||"auto"}},"header-col-".concat(e.dataIndex||e.key||t))})]}),i("thead",{children:r("tr",{children:[Fe&&Ze(),ut.map(function(e,t){return function(e,t,n,r){if(void 0===r&&(r=!1),r)return Ze();var o={width:e.width||"auto",textAlign:e.align||"left",backgroundColor:"#fafafa !important",top:0};if("start"===e.fixed||!0===e.fixed){o.position="sticky";var l=0;Fe&&(l+=qe((null==U?void 0:U.columnWidth)||"50px"));for(var a=0;a<t;a++)l+=ce[a]||0;o.left="".concat(l,"px"),o.zIndex=10}else if("end"===e.fixed){o.position="sticky";var c=0;for(a=n.length-1;a>t;a--)c+=ce[a]||0;o.right="".concat(c,"px"),o.zIndex=10}return i("th",{style:o,children:e.title||""},e.key||e.dataIndex||e._index)}(e,t,ut)})]})})]})}),i("div",{className:"custom-table-body",ref:ze,style:ct,onScroll:function(e){if(je.current&&ze.current){var t=e.target;if(t===ze.current){var n=t.scrollLeft;Ie.current=!0,Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Ie.current=!1},150),Math.abs(n-Ne.current)>.5&&(Ne.current=n,Ee.current=n,Xe(ze.current,je.current,n))}}},children:function(){var e=r("table",{className:d("custom-table",{"custom-table-bordered-body":R,"custom-table-header-separator":!R}),children:[r("colgroup",{children:[Fe&&i("col",{style:{width:(null==U?void 0:U.columnWidth)||"50px"}},"body-selection-col"),ut.map(function(e,t){return i("col",{style:{width:e.width||"auto"}},"body-col-".concat(e.dataIndex||e.key||t))})]}),i("tbody",{children:Q?st.map(function(e,t){return i(C,{id:String(He(e,t)),record:e,rowIndex:t,columns:W,columnWidths:ce,fixedLeftColumns:$,fixedRightColumns:ne,normalColumns:oe,allColumns:ut,editingCell:We,editingValue:Ke,handleEdit:et,handleSave:tt,handleCancel:nt,setEditingValue:Pe,renderTableCell:it,isRowSelectionEnabled:Fe,rowSelection:U,selectedRowKeys:Me,handleRowSelect:Ue},He(e,t))}):st.map(function(e,t){return r("tr",{children:[Fe&&rt(e,t),ut.map(function(n,r){return it(n,e,t,r,ut)})]},He(e,t))})})]});if(Q){var t=st.map(function(e,t){return String(He(e,t))});return i(v,{sensors:ot,collisionDetection:h,onDragEnd:lt,children:i(y,{items:t,strategy:b,children:e})})}return e}()}),0===st.length&&i("div",{className:"custom-table-empty",children:M||i(S,{size:"small",description:"暂无数据"})}),function(){if(!1===D||!dt)return null;var t=dt.total,r=dt.current,o=dt.pageSize,l=n(D||{},["onChange","pageSize","current"]);return i("div",{className:"custom-table-pagination-wrapper",children:i(k,e({total:t,current:r,pageSize:o,onChange:Be,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条,共 ").concat(e," 条")},showSizeChanger:!0,showQuickJumper:!0,align:"flex-end"},l))})}()]})};export{I as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import r,{useState as o,useRef as a,useEffect as c,useMemo as s}from"react";import l from"classnames";import{useSensors as u,useSensor as d,PointerSensor as f,DndContext as b,closestCenter as v}from"@dnd-kit/core";import{SortableContext as m,horizontalListSortingStrategy as p,arrayMove as y,useSortable as h}from"@dnd-kit/sortable";import{CSS as z}from"@dnd-kit/utilities";import j from"../Icon/Icon.js";var k=function(i){var r=i.item,o=i.isActive,a=i.isClosable,c=i.onClick,s=i.onClose,u=i.tabRefs,d=h({id:r.key,disabled:r.disabled}),f=d.attributes,b=d.listeners,v=d.setNodeRef,m=d.transform,p=d.transition,y=d.isDragging,k={transform:z.Transform.toString(m),transition:p,opacity:y?.5:1,zIndex:y?1e3:"auto",position:"relative"};return n("div",{ref:function(t){v(t),t?u.current.set(r.key,t):u.current.delete(r.key)},className:l("zjpcy-tabs-tab",{"zjpcy-tabs-tab--active":o,"zjpcy-tabs-tab--disabled":r.disabled,"zjpcy-tabs-tab--dragging":y}),role:"tab","aria-selected":o,style:k,children:[n("div",t({className:"zjpcy-tabs-tab__drag-handle"},f,b,{onClick:c,style:{cursor:r.disabled?"not-allowed":"grab",display:"flex",alignItems:"center",gap:"6px"},children:[r.icon&&e("span",{className:"zjpcy-tabs-tab__icon",children:r.icon}),e("span",{className:"zjpcy-tabs-tab__label",children:r.label})]})),a&&!r.disabled&&e("span",{className:"zjpcy-tabs-tab__close",onClick:function(t){return s(t)},children:e(j,{type:"close",size:12})})]})},g=function(h){var z=h.items,g=void 0===z?[]:z,_=h.activeKey,C=h.defaultActiveKey,N=h.onChange,L=h.onClose,w=h.tabsClosable,E=void 0!==w&&w,W=h.tabPlacement,T=void 0===W?"top":W,A=h.type,x=void 0===A?"line":A,I=h.onAdd,M=h.className,R=h.style,D=h.contentClassName,q=h.contentStyle,F=h.draggable,S=void 0!==F&&F,B=h.onDragEnd,K=o(function(){return C}),P=K[0],V=K[1],H=a(null),G=a(new Map),J=a(null),O=o({}),Q=O[0],U=O[1],X=o(!1),Y=X[0],Z=X[1],$=o(!1),tt=$[0],et=$[1],nt=o(!1),it=nt[0],rt=nt[1],ot=o(!1),at=ot[0],ct=ot[1],st=a(!1),lt=a(!0),ut=o(!1),dt=ut[0],ft=ut[1],bt=o(g),vt=bt[0],mt=bt[1];c(function(){void 0!==_&&V(_)},[_]),c(function(){mt(g)},[g]),c(function(){var t;if(void 0===_){var e=null===(t=g[0])||void 0===t?void 0:t.key;if(!(!!C&&g.some(function(t){return t.key===C}))||P)if(e)g.some(function(t){return t.key===P})||V(e);else V(void 0);else V(C)}},[g,P,_,C]);var pt=void 0!==_?_:P,yt=s(function(){return g.find(function(t){return t.key===pt})||g[0]},[g,pt]),ht=function(t,e){if(void 0===e&&(e=!0),t&&H.current){var n=G.current.get(t),i=H.current;if(n&&i){var r=i.querySelector(".zjpcy-tabs-indicator"),o=lt.current;if(r&&o&&(r.style.transition="none"),"top"===T||"bottom"===T){if(U({left:n.offsetLeft,width:n.offsetWidth,top:void 0,height:void 0}),!e){var a=n.offsetLeft,c=a+n.offsetWidth,s=i.scrollLeft,l=i.clientWidth;(a<s||c>s+l)&&n.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}}else U({top:n.offsetTop,height:n.offsetHeight,left:void 0,width:void 0});r&&o&&e?requestAnimationFrame(function(){r.style.transition="",lt.current=!1}):o&&(lt.current=!1)}}},zt=r.useCallback(function(){if(H.current){var t=H.current,e="top"===T||"bottom"===T;if("card"===x)return Z(!1),et(!1),void rt(!1);if(e){var n=Math.ceil(t.scrollWidth)>Math.floor(t.clientWidth);if(Z(n),n){var i=t.scrollLeft>1;et(i);var r=t.scrollWidth-t.clientWidth,o=t.scrollLeft<r-1;rt(o)}else et(!1),rt(!1)}else Z(!1),et(!1),rt(!1)}},[T,x]),jt=function(t){if(H.current&&!st.current){var e=H.current,n=e.clientWidth,i=Math.max(200,.6*n);st.current=!0,"left"===t?e.scrollTo({left:e.scrollLeft-i,behavior:"smooth"}):e.scrollTo({left:e.scrollLeft+i,behavior:"smooth"}),setTimeout(function(){st.current=!1,zt()},400)}};c(function(){pt&&(ht(pt,!1),zt())},[pt,g,T,zt]),c(function(){zt();var t=requestAnimationFrame(function(){pt&&ht(pt,!1),zt()});return function(){return cancelAnimationFrame(t)}},[zt,pt]),c(function(){var t,e=function(){pt&&ht(pt,!1),zt()},n=function(){clearTimeout(t),t=setTimeout(function(){zt()},100)},i=H.current;return i&&i.addEventListener("scroll",n),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),i&&i.removeEventListener("scroll",n),clearTimeout(t)}},[zt,pt]),c(function(){var t=function(){if(J.current&&H.current&&"card"===x&&I){var t=H.current,e=J.current,n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.right-i.right;ft(r<=20)}else ft(!1)};t();var e=function(){t()},n=H.current;return n&&(n.addEventListener("scroll",e),window.addEventListener("resize",e)),function(){n&&n.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[x,I,g]);var kt=function(t){t.disabled||(void 0===_&&V(t.key),ht(t.key,!0),zt(),null==N||N(t.key))},gt=function(t,e){t.stopPropagation(),e.disabled||null==L||L(e.key)},_t=function(){null==I||I(),setTimeout(function(){H.current&&requestAnimationFrame(function(){if(H.current&&G.current.size>0){var t=Array.from(G.current.keys());if(t.length>0){var e=t[t.length-1],n=G.current.get(e),i=H.current;if(n&&i&&J.current)if("card"===x){var r=J.current.offsetWidth+4,o=n.offsetLeft+n.offsetWidth,a=i.clientWidth;if(o-i.scrollLeft>a-r){var c=o-a+r;i.scrollTo({left:c,behavior:"smooth"})}}else n.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}}})},100)},Ct=u(d(f,{activationConstraint:{distance:8}})),Nt=function(t){},Lt=function(t){var e=t.active,n=t.over;if(n&&e.id!==n.id){var i=vt.findIndex(function(t){return t.key===e.id}),r=vt.findIndex(function(t){return t.key===n.id});if(-1!==i&&-1!==r){var o=y(vt,i,r);mt(o),null==B||B(o)}}},wt=function(){var t="top"===T||"bottom"===T,i="card"===x,r=S?vt:g,o=n("div",{className:"zjpcy-tabs-nav-wrapper",onMouseEnter:function(){return ct(!0)},onMouseLeave:function(){return ct(!1)},children:[t&&Y&&!i&&e("button",{className:l("zjpcy-tabs-nav__button","zjpcy-tabs-nav__button--left",{"zjpcy-tabs-nav__button--disabled":!tt,"zjpcy-tabs-nav__button--visible":at}),onClick:function(){return jt("left")},disabled:!tt,type:"button",children:e(j,{type:"arrowLeft",size:12})}),n("div",{className:"zjpcy-tabs-nav",ref:H,children:[r.map(function(t){return function(t,i,r){return!S||t.disabled||"top"!==T&&"bottom"!==T?n("div",{ref:function(e){e?G.current.set(t.key,e):G.current.delete(t.key)},className:l("zjpcy-tabs-tab",{"zjpcy-tabs-tab--active":i,"zjpcy-tabs-tab--disabled":t.disabled}),role:"tab","aria-selected":i,onClick:function(){return kt(t)},children:[t.icon&&e("span",{className:"zjpcy-tabs-tab__icon",children:t.icon}),e("span",{className:"zjpcy-tabs-tab__label",children:t.label}),r&&!t.disabled&&e("span",{className:"zjpcy-tabs-tab__close",onClick:function(e){return gt(e,t)},children:e(j,{type:"close",size:12})})]},t.key):e(k,{item:t,isActive:i,isClosable:r,onClick:function(){return kt(t)},onClose:function(e){return gt(e,t)},tabRefs:G},t.key)}(t,t.key===pt,E||t.closable||!1)}),"card"===x&&I&&e("div",{ref:J,className:l("zjpcy-tabs-tab zjpcy-tabs-tab--add",{sticky:!0===dt}),role:"tab",onClick:_t,children:e(j,{type:"plus",size:16})}),e("div",{className:"zjpcy-tabs-indicator",style:Q})]}),t&&Y&&!i&&e("button",{className:l("zjpcy-tabs-nav__button","zjpcy-tabs-nav__button--right",{"zjpcy-tabs-nav__button--disabled":!it,"zjpcy-tabs-nav__button--visible":at}),onClick:function(){return jt("right")},disabled:!it,type:"button",children:e(j,{type:"arrowRight",size:12})})]});return!S||i||"top"!==T&&"bottom"!==T?o:e(b,{sensors:Ct,collisionDetection:v,onDragStart:Nt,onDragEnd:Lt,children:e(m,{items:r.map(function(t){return t.key}),strategy:p,children:o})})},Et=function(){var n=(null==yt?void 0:yt.renderContent)?yt.renderContent():null==yt?void 0:yt.content,i=l("zjpcy-tabs-content","zjpcy-tabs-content--".concat(T),D),r=t({},q);return e("div",{className:i,style:r,children:n})};return e("div",{className:l("zjpcy-tabs","zjpcy-tabs--".concat(T),"zjpcy-tabs--".concat(x),M),style:R,children:n(i,"bottom"===T?{children:[Et(),wt()]}:{children:[wt(),Et()]})})};export{g as default};
@@ -1 +0,0 @@
1
- "use client";import{__rest as o,__assign as l}from"../node_modules/tslib/tslib.es6.js";import{jsxs as c,jsx as a}from"react/jsx-runtime";import e,{useState as n}from"react";import s from"classnames";import r from"../Icon/Icon.js";var t=e.forwardRef(function(e,t){var i=e.children,p=e.className,m=e.style,d=e.size,u=void 0===d?"medium":d,y=e.backgroundColor,g=e.color,f=e.icon,b=e.closable,j=void 0!==b&&b,z=e.onClose,C=e.onClick,_=o(e,["children","className","style","size","backgroundColor","color","icon","closable","onClose","onClick"]),k=n(!0),N=k[0],h=k[1];if(!N)return null;var v=s("zjpcy-tag","zjpcy-tag--".concat(u),{"zjpcy-tag--clickable":C,"zjpcy-tag--closable":j},p),x=l({backgroundColor:y,color:g},m);return c("span",l({ref:t,className:v,style:x,onClick:C},_,{children:[f?a("span","string"==typeof f?{className:"zjpcy-tag__icon",children:a(r,{type:f})}:{className:"zjpcy-tag__icon",children:f}):null,a("span",{className:"zjpcy-tag__content",children:i}),j&&a("span",{className:"zjpcy-tag__close",onClick:function(o){o.stopPropagation(),null==z||z(o),h(!1)},role:"button",tabIndex:0,"aria-label":"close",children:a(r,{type:"close"})})]}))});t.displayName="Tag";var i=t;export{i as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as n,useRef as r,useCallback as o,useEffect as a}from"react";import l from"react-dom";import s from"classnames";import d from"../Icon/Icon.js";import c from"./TimePickerPanel.js";var u=function(u){var m,p=u.size,v=void 0===p?"middle":p,f=u.value,h=u.defaultValue,w=u.onChange,g=u.placeholder,b=void 0===g?["开始时间","结束时间"]:g,k=u.disabled,y=void 0!==k&&k,N=u.readOnly,C=void 0!==N&&N,x=u.className,S=void 0===x?"":x,z=u.style,H=u.width,E=void 0===H?"auto":H,L=u.format,O=void 0===L?"HH:mm:ss":L,j=u.allowClear,I=void 0===j||j,P=u.hourStep,M=void 0===P?1:P,R=u.minuteStep,Y=void 0===R?1:R,B=u.secondStep,D=void 0===B?1:B,W=u.disabledHours,q=u.disabledMinutes,A=u.disabledSeconds,F=u.hideDisabledOptions,G=void 0!==F&&F,T=u.label,V=u.labelGap,X=void 0===V?8:V,_=u.labelClassName,J=void 0===_?"":_,K=u.labelStyle,Q=u.onOpenChange,U=u.open,Z=u.separator,$=n(h),ee=$[0],ie=$[1],te=n(!1),ne=te[0],re=te[1],oe=n("start"),ae=oe[0],le=oe[1],se=n(!1),de=se[0],ce=se[1],ue=n({top:0,left:0,width:0}),me=ue[0],pe=ue[1],ve=n(!1),fe=ve[0],he=ve[1],we=r(null),ge=r(null),be=void 0!==f,ke=be?f:ee,ye=void 0!==U?U:ne,Ne=(null==ke?void 0:ke[0])||"",Ce=(null==ke?void 0:ke[1])||"",xe=o(function(){if(we.current){var e=we.current.getBoundingClientRect(),i=Math.max(e.width,200),t=window.innerHeight-e.bottom,n=e.bottom+window.scrollY+4,r=e.left+window.scrollX;t<280&&e.top>280&&(n=e.top+window.scrollY-280-4);var o=window.innerWidth;r+i>o&&(r=o-i-16),pe({top:n,left:r,width:i})}},[]);a(function(){if(ye&&ge.current&&we.current){return he(!1),requestAnimationFrame(function(){var i=we.current.getBoundingClientRect(),t=ge.current.offsetHeight;if(window.innerHeight-i.bottom<280&&i.top>280){var n=i.top+window.scrollY-t-4;pe(function(i){return e(e({},i),{top:n})})}he(!0)}),function(){he(!1)}}},[ye]),a(function(){var e=function(e){we.current&&!we.current.contains(e.target)&&ge.current&&!ge.current.contains(e.target)&&(void 0===U&&re(!1),null==Q||Q(!1),ce(!1))};return ye&&(document.addEventListener("mousedown",e),xe(),window.addEventListener("scroll",xe,!0),window.addEventListener("resize",xe)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",xe,!0),window.removeEventListener("resize",xe)}},[ye,U,Q,xe]);var Se=o(function(e,i){var t=[0===e?i:(null==ke?void 0:ke[0])||"",1===e?i:(null==ke?void 0:ke[1])||""];be||ie(t),null==w||w(t)},[be,w,ke]),ze=function(e){y||C||(le(e),void 0===U&&re(!0),null==Q||Q(!0),ce(!0))},He=function(){void 0===U&&re(!1),null==Q||Q(!1),ce(!1)},Ee=e({width:"number"==typeof E?"".concat(E,"px"):E},z),Le=e({marginRight:"number"==typeof X?"".concat(X,"px"):X},K),Oe=Ne||Ce;return i("div",{className:s("time-picker time-range-picker",S,{"time-picker-with-label":T}),style:Ee,children:[T&&t("span",{className:s("time-picker-label",J),style:Le,children:T}),i("div",{ref:we,className:s("time-range-picker-trigger",(m={"is-focused":de,"is-disabled":y},m["size-".concat(v)]=v,m)),children:[t("div",{className:s("time-range-picker-input",{"is-active":"start"===ae&&ye}),onClick:function(){return ze("start")},children:t("span",{className:s("time-range-picker-value",{"is-placeholder":!Ne}),children:Ne||b[0]})}),t("span",{className:"time-range-picker-separator",children:Z||t(d,{type:"arrow-right",size:"small"})}),t("div",{className:s("time-range-picker-input",{"is-active":"end"===ae&&ye}),onClick:function(){return ze("end")},children:t("span",{className:s("time-range-picker-value",{"is-placeholder":!Ce}),children:Ce||b[1]})}),i("span",{className:"time-picker-suffix time-range-picker-suffix",children:[I&&Oe&&!y&&!C&&t("span",{className:"time-picker-clear",onClick:function(e){e.stopPropagation(),be||ie(void 0),null==w||w(["",""])},children:t(d,{type:"close",size:"small"})}),t(d,{type:"clock",size:"small",className:s("time-picker-icon",{"has-clear":I&&Oe&&!y&&!C})})]})]}),function(){if(!ye)return null;var e="start"===ae?Ne:Ce,i=t("div",{ref:ge,className:"time-picker-dropdown time-range-picker-dropdown",style:{position:"fixed",top:me.top,left:me.left,minWidth:me.width||("number"==typeof E?E:parseInt(E,10)),zIndex:999,opacity:fe?1:0,transition:"opacity 0.15s ease"},children:t(c,{value:e,onChange:function(e){return Se("start"===ae?0:1,e)},format:O,hourStep:M,minuteStep:Y,secondStep:D,disabledHours:W,disabledMinutes:q,disabledSeconds:A,hideDisabledOptions:G,showNow:!1,showOk:!0,onOk:He})});return l.createPortal(i,document.body)}()]})};export{u as default};
@@ -1 +0,0 @@
1
- import{jsxs as n,jsx as e}from"react/jsx-runtime";import t,{useState as i,useEffect as o,useMemo as r}from"react";import u from"classnames";var l=function(n,e,t,i){var o=function(n){return n.toString().padStart(2,"0")};return"HH:mm"===i?"".concat(o(n),":").concat(o(e)):"".concat(o(n),":").concat(o(e),":").concat(o(t))},c=function(i){var o=i.options,r=i.value,l=i.onChange,c=i.unit,a=t.useRef(null),s=t.useRef(null);return t.useEffect(function(){if(s.current&&a.current){var n=a.current,e=s.current,t=n.clientHeight,i=e.offsetTop-t/2+18;requestAnimationFrame(function(){n.scrollTo({top:Math.max(0,i),behavior:"smooth"})})}},[r]),n("div",{className:"time-picker-column",children:[e("div",{className:"time-picker-column-header",children:c}),e("div",{className:"time-picker-column-list",ref:a,children:o.map(function(n){return e("div",{ref:r===n?s:null,className:u("time-picker-option",{"is-selected":r===n}),onClick:function(){return null==l?void 0:l(n)},children:n.toString().padStart(2,"0")},n)})})]})},a=function(t){var u,a,s,d=t.value,m=t.onChange,f=t.format,v=t.hourStep,p=t.minuteStep,h=t.secondStep,k=t.disabledHours,g=t.disabledMinutes,N=t.disabledSeconds,b=t.hideDisabledOptions,S=void 0!==b&&b,C=t.showNow,w=void 0===C||C,H=t.showOk,x=void 0===H||H,I=t.onNow,M=t.onOk,O=function(n){if(!n)return null;var e=n.split(":");return e.length<2?null:{hour:parseInt(e[0],10)||0,minute:parseInt(e[1],10)||0,second:parseInt(e[2],10)||0}}(d),D=i(null!==(u=null==O?void 0:O.hour)&&void 0!==u?u:0),R=D[0],T=D[1],j=i(null!==(a=null==O?void 0:O.minute)&&void 0!==a?a:0),q=j[0],A=j[1],E=i(null!==(s=null==O?void 0:O.second)&&void 0!==s?s:0),F=E[0],y=E[1];o(function(){if(O)T(O.hour),A(O.minute),y(O.second);else{var n=new Date;T(n.getHours()),A(n.getMinutes()),y(n.getSeconds())}},[d,O]);var z=function(n,e,t){void 0===t&&(t=[]);for(var i=[],o=0;o<n;o+=e)S&&t.includes(o)||i.push(o);return i},B=r(function(){return(null==k?void 0:k())||[]},[k]),G=r(function(){return(null==g?void 0:g(R))||[]},[g,R]),J=r(function(){return(null==N?void 0:N(R,q))||[]},[N,R,q]),K=r(function(){return z(24,v,B)},[v,B,S]),L=r(function(){return z(60,p,G)},[p,G,S]),P=r(function(){return z(60,h,J)},[h,J,S]),Q=f.includes("ss");return n("div",{className:"time-picker-panel-container",children:[n("div",{className:"time-picker-panel",children:[e(c,{unit:"时",options:K,value:R,onChange:function(n){T(n),null==m||m(l(n,q,F,f))}}),e(c,{unit:"分",options:L,value:q,onChange:function(n){A(n),null==m||m(l(R,n,F,f))}}),Q&&e(c,{unit:"秒",options:P,value:F,onChange:function(n){y(n),null==m||m(l(R,q,n,f))}})]}),(w||x)&&n("div",{className:"time-picker-footer",children:[w&&e("button",{className:"time-picker-now-btn",onClick:I,children:"此刻"}),x&&e("button",{className:"time-picker-ok-btn",onClick:function(){return null==M?void 0:M(l(R,q,F,f))},children:"确定"})]})]})};export{a as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as o,useCallback as r,useEffect as a}from"react";import c from"react-dom";import l from"classnames";import s from"../Icon/Icon.js";import d from"./TimePickerPanel.js";import u from"./RangePicker.js";var m=function(u){var m,p=u.size,f=void 0===p?"middle":p,v=u.value,w=u.defaultValue,h=u.onChange,b=u.placeholder,g=void 0===b?"请选择时间":b,k=u.disabled,y=void 0!==k&&k,N=u.readOnly,S=void 0!==N&&N,H=u.className,C=void 0===H?"":H,x=u.style,z=u.width,O=void 0===z?120:z,E=u.format,L=void 0===E?"HH:mm:ss":E,P=u.allowClear,j=void 0===P||P,R=u.hourStep,I=void 0===R?1:R,M=u.minuteStep,D=void 0===M?1:M,Y=u.secondStep,B=void 0===Y?1:Y,W=u.disabledHours,q=u.disabledMinutes,A=u.disabledSeconds,F=u.hideDisabledOptions,G=void 0!==F&&F,T=u.label,V=u.labelGap,X=void 0===V?8:V,_=u.labelClassName,J=void 0===_?"":_,K=u.labelStyle,Q=u.onOpenChange,U=u.open,Z=u.showNow,$=void 0===Z||Z,ee=u.showOk,te=void 0===ee||ee,ne=i(w),ie=ne[0],oe=ne[1],re=i(!1),ae=re[0],ce=re[1],le=i(!1),se=le[0],de=le[1],ue=i({top:0,left:0,width:0}),me=ue[0],pe=ue[1],fe=i(!1),ve=fe[0],we=fe[1],he=o(null),be=o(null),ge=void 0!==v,ke=ge?v:ie,ye=void 0!==U?U:ae,Ne=r(function(){if(he.current){var e=he.current.getBoundingClientRect(),t=Math.max(e.width,200),n=window.innerHeight-e.bottom,i=e.bottom+window.scrollY+4,o=e.left+window.scrollX;n<280&&e.top>280&&(i=e.top+window.scrollY-280-4);var r=window.innerWidth;o+t>r&&(o=r-t-16),pe({top:i,left:o,width:t})}},[]);a(function(){if(ye&&be.current&&he.current){return we(!1),requestAnimationFrame(function(){var t=he.current.getBoundingClientRect(),n=be.current.offsetHeight;if(window.innerHeight-t.bottom<280&&t.top>280){var i=t.top+window.scrollY-n-4;pe(function(t){return e(e({},t),{top:i})})}we(!0)}),function(){we(!1)}}},[ye]),a(function(){var e=function(e){he.current&&!he.current.contains(e.target)&&be.current&&!be.current.contains(e.target)&&(void 0===U&&ce(!1),null==Q||Q(!1),de(!1))};return ye&&(document.addEventListener("mousedown",e),Ne(),window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ne)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ne)}},[ye,U,Q,Ne]);var Se=r(function(e){ge||oe(e),null==h||h(e)},[ge,h]),He=function(){var e=new Date,t=function(e,t,n,i){var o=function(e){return e.toString().padStart(2,"0")};return"HH:mm"===i?"".concat(o(e),":").concat(o(t)):"".concat(o(e),":").concat(o(t),":").concat(o(n))}(e.getHours(),e.getMinutes(),e.getSeconds(),L);Se(t)},Ce=e({width:"number"==typeof O?"".concat(O,"px"):O},x),xe=e({marginRight:"number"==typeof X?"".concat(X,"px"):X},K),ze=t("div",{ref:he,className:l("time-picker-trigger",(m={"is-focused":se,"is-disabled":y},m["size-".concat(f)]=f,m)),onClick:function(){if(!y&&!S){var e=!ye;void 0===U&&ce(e),null==Q||Q(e),de(e)}},children:[n("span",{className:l("time-picker-value",{"is-placeholder":!ke}),children:ke||g}),t("span",{className:"time-picker-suffix",children:[j&&ke&&!y&&!S&&n("span",{className:"time-picker-clear",onClick:function(e){e.stopPropagation(),ge||oe(void 0),null==h||h("")},children:n(s,{type:"close",size:"small"})}),n(s,{type:"clock",size:"small",className:l("time-picker-icon",{"is-open":ye,"has-clear":j&&ke&&!y&&!S})})]})]});return t("div",{className:l("time-picker",C,{"time-picker-with-label":T}),style:Ce,children:[T&&n("span",{className:l("time-picker-label",J),style:xe,children:T}),ze,function(){if(!ye)return null;var e=n("div",{ref:be,className:"time-picker-dropdown",style:{position:"fixed",top:me.top,left:me.left,minWidth:me.width||("number"==typeof O?O:parseInt(O,10)),zIndex:999,opacity:ve?1:0,transition:"opacity 0.15s ease"},children:n(d,{value:ke,onChange:Se,format:L,hourStep:I,minuteStep:D,secondStep:B,disabledHours:W,disabledMinutes:q,disabledSeconds:A,hideDisabledOptions:G,showNow:$,showOk:te,onNow:He,onOk:function(e){return function(e){e&&!ke&&Se(e),void 0===U&&ce(!1),null==Q||Q(!1),de(!1)}(e)}})});return c.createPortal(e,document.body)}()]})};m.RangePicker=u;var p=m;export{u as RangePicker,p as default};
@@ -1 +0,0 @@
1
- "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useCallback as c,useEffect as u}from"react";import{createPortal as l}from"react-dom";var a=function(a){var s=a.children,d=a.title,f=a.placement,m=void 0===f?"top":f,v=a.trigger,h=void 0===v?"hover":v,p=a.delay,g=void 0===p?100:p,k=a.open,w=a.backgroundColor,b=a.style,y=void 0===b?{}:b,T=a.className,E=void 0===T?"":T,L=o(!1),z=L[0],j=L[1],C=o(!1),x=C[0],M=C[1],N=o({top:0,left:0}),q=N[0],A=N[1],F=i(null),B=i(null),R=i(null),I=i(null),_=void 0!==k,D=(_?k:z)||x,G=c(function(){if(F.current&&B.current){var e=F.current.getBoundingClientRect(),t=B.current.getBoundingClientRect(),n=0,r=0;switch(m){case"top":n=e.top-t.height-8,r=e.left+(e.width-t.width)/2;break;case"bottom":n=e.bottom+8,r=e.left+(e.width-t.width)/2;break;case"left":n=e.top+(e.height-t.height)/2,r=e.left-t.width-8;break;case"right":n=e.top+(e.height-t.height)/2,r=e.right+8}A({top:n,left:r})}},[m]),H=c(function(){d&&(I.current&&(clearTimeout(I.current),I.current=null),_||(j(!0),requestAnimationFrame(function(){M(!0)})))},[d,_]),J=c(function(){_||(M(!1),I.current=setTimeout(function(){j(!1),I.current=null},200))},[_]),K=c(function(e){if("click"===h&&!_&&z){var t=e.target;F.current&&!F.current.contains(t)&&B.current&&!B.current.contains(t)&&J()}},[h,_,z,J]);u(function(){_&&(k?(I.current&&(clearTimeout(I.current),I.current=null),requestAnimationFrame(function(){M(!0)})):(M(!1),I.current=setTimeout(function(){I.current=null},200)))},[k,_]),u(function(){if(D){requestAnimationFrame(G);var e=function(){return G()},t=function(){return G()};return window.addEventListener("resize",e),window.addEventListener("scroll",t,!0),"click"!==h||_||document.addEventListener("click",K),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t,!0),"click"!==h||_||document.removeEventListener("click",K)}}},[D,m,h,_,G,K]),u(function(){return function(){R.current&&clearTimeout(R.current),I.current&&clearTimeout(I.current)}},[]);var O=D&&d&&t("div",{ref:B,className:"zjpcy-tooltip zjpcy-tooltip-".concat(m," ").concat(x?"is-visible":""," ").concat(E),style:e({position:"fixed",top:q.top,left:q.left,zIndex:1e3,backgroundColor:w},y),onMouseEnter:"hover"!==h||_?void 0:function(){I.current&&(clearTimeout(I.current),I.current=null),j(!0),M(!0)},onMouseLeave:"hover"!==h||_?void 0:J,children:[n("div",{className:"zjpcy-tooltip-content",children:d}),n("div",{className:"zjpcy-tooltip-arrow",style:{backgroundColor:w}})]});return t(r,{children:[n("span",{ref:F,onMouseEnter:"hover"===h?function(){"hover"!==h||_||(R.current&&clearTimeout(R.current),R.current=setTimeout(function(){H(),R.current=null},g))}:void 0,onMouseLeave:"hover"===h?function(){"hover"!==h||_||(R.current&&(clearTimeout(R.current),R.current=null),J())}:void 0,onClick:"click"===h?function(){"click"!==h||_||(z?J():H())}:void 0,style:{display:"inline-block"},children:s}),O&&l(O,document.body)]})};export{a as default};
@@ -1 +0,0 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useCallback as e,useEffect as r}from"react";import{FaArrowUp as i}from"../node_modules/react-icons/fa/index.js";var c=function(c){var l=c.showAfter,a=void 0===l?100:l,d=c.bottom,s=void 0===d?30:d,u=c.right,p=void 0===u?30:u,h=c.size,f=void 0===h?40:h,v=c.color,x=void 0===v?"#fff":v,m=c.bgColor,b=void 0===m?"#1a2980":m,w=c.boxShadow,g=void 0===w?"0 2px 10px rgba(0, 0, 0, 0.15)":w,y=c.onClick,C=c.containerRef,k=c.icon,L=t(!1),j=L[0],z=L[1],E=n(null),I=e(function(){(null==C?void 0:C.current)?C.current.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"}),null==y||y()},[y,C]);if(r(function(){var o=function(){var o=0;o=(null==C?void 0:C.current)?C.current.scrollTop:window.pageYOffset,z(o>a)};if(null==C?void 0:C.current){var t=C.current;return t.addEventListener("scroll",o),o(),function(){return t.removeEventListener("scroll",o)}}return window.addEventListener("scroll",o),o(),function(){return window.removeEventListener("scroll",o)}},[a,C]),!j)return null;var N=o(i,{size:Math.floor(.5*f)}),S=.5*f;return(null==C?void 0:C.current)?o("div",{ref:E,className:"top-button-wrapper-container",style:{position:"sticky",bottom:"".concat(s,"px"),marginLeft:"auto",width:"".concat(f,"px"),height:"".concat(f,"px"),right:"".concat(p,"px"),zIndex:10},children:o("button",{className:"top-button",onClick:I,style:{width:"".concat(f,"px"),height:"".concat(f,"px"),backgroundColor:b,color:x,boxShadow:g,padding:0,border:"none"},children:k?o("span",{style:{width:S,height:S,display:"flex",alignItems:"center",justifyContent:"center"},children:k}):N})}):o("div",{ref:E,className:"top-button-wrapper",style:{position:"fixed",bottom:"".concat(s,"px"),right:"".concat(p,"px"),zIndex:1e3},children:o("button",{className:"top-button",onClick:I,style:{width:"".concat(f,"px"),height:"".concat(f,"px"),backgroundColor:b,color:x,boxShadow:g,padding:0,border:"none"},children:k?o("span",{style:{width:S,height:S,display:"flex",alignItems:"center",justifyContent:"center"},children:k}):N})})};export{c as default};
@@ -1 +0,0 @@
1
- "use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as n,Fragment as r}from"react/jsx-runtime";import{useState as i,useMemo as l,useCallback as o,useRef as a,useEffect as s}from"react";import{TransferWrapper as c,TransferListContainer as d,TransferSearchWrapper as u,TransferSearch as f,TransferSearchButton as h,TransferListFooter as g,TransferOperation as y,TransferOperationButton as v,TransferListHeader as m,TransferHeaderLeft as b,TransferItemCheckbox as S,TransferHeaderCount as p,TransferLoading as C,TransferLoadingSpinner as K,TransferListBody as N,TransferListItem as w,TransferListItemCheckbox as $,TransferItemContent as T,TransferEmpty as k}from"./styles.js";import D from"../Icon/Icon.js";var R=function(e,t,n){return t?e[t]:e[n]},L=function(e,t){return R(e,null==t?void 0:t.key,"key")},O=function(e,t){return R(e,null==t?void 0:t.title,"title")},x=function(c){var y=c.dataSource,v=c.fieldNames,R=c.selectedKeys,x=c.showSearch,j=c.disabled,H=c.title,W=c.description,M=c.searchPlaceholder,I=void 0===M?"请输入搜索内容":M,z=c.filterOption,E=c.styles,P=c.listHeight,_=c.listWidth,q=c.header,A=c.search,B=c.body,F=c.onSelectChange,G=c.onSearch,J=c.render,Q=c.footer,U=c.direction,V=c.rowClassName,X=c.loading,Y=c.loadingRender,Z=c.loadingDelay,ee=c.sourceSelectedKeys,te=c.targetSelectedKeys,ne=i(""),re=ne[0],ie=ne[1],le=i(X),oe=le[0],ae=le[1],se=a(null);s(function(){return se.current&&(clearTimeout(se.current),se.current=null),X&&Z&&Z>0?(ae(!0),se.current=setTimeout(function(){ae(!1)},Z)):ae(X),function(){se.current&&clearTimeout(se.current)}},[X,Z]);var ce=l(function(){return re?z?y.filter(function(e){return z(re,e)}):y.filter(function(e){var t=O(e,v),n=null!=t?String(t):"";if(n)return n.toLowerCase().includes(re.toLowerCase());var r=re.toLowerCase();return Object.keys(e).some(function(t){var n=e[t];return"key"!==t&&"disabled"!==t&&(null!=n&&String(n).toLowerCase().includes(r))})}):y},[y,re,z,v]),de=l(function(){var e=ce.filter(function(e){return!e.disabled});return 0!==e.length&&e.every(function(e){return R.includes(L(e,v))})},[ce,R,v]),ue=l(function(){var e=ce.filter(function(e){return!e.disabled});if(0===e.length)return!1;var t=e.filter(function(e){return R.includes(L(e,v))}).length;return t>0&&t<e.length},[ce,R,v]),fe=o(function(){if(!j){var t=ce.filter(function(e){return!e.disabled}).map(function(e){return L(e,v)});if(de){var n=R.filter(function(e){return!t.includes(e)});"left"===U?F(n,te):F(ee,n)}else{var r=e(e([],R,!0),t,!0);n=r.filter(function(e,t){return r.indexOf(e)===t});"left"===U?F(n,te):F(ee,n)}}},[j,ce,R,de,F,v,U,ee,te]),he=o(function(t){if(!j&&!t.disabled){var n,r=L(t,v),i=R.indexOf(r);n=i>-1?e(e([],R.slice(0,i),!0),R.slice(i+1),!0):e(e([],R,!0),[r],!1),"left"===U?F(n,te):F(ee,n)}},[j,R,F,v,U,ee,te]),ge=o(function(e){var t=e.target.value;ie(t)},[]),ye=o(function(){null==G||G(re)},[G,re]),ve=o(function(e){"Enter"===e.key&&ye()},[ye]),me=o(function(){ye()},[ye]),be=l(function(){var e=R.length,t=y.length;return"".concat(e,"/").concat(t)},[R,y]);return n(d,{className:"transfer-list",$disabled:j,$styles:null==E?void 0:E.list,$height:P,$width:_,children:[function(){if(q){var e=q({direction:U,dataSource:y,selectedKeys:R,sourceSelectedKeys:ee,targetSelectedKeys:te});return null===e?null:e}return n(m,{className:"transfer-list-header",children:[n(b,{children:[t(S,{className:"transfer-checkbox",$checked:de,$indeterminate:ue,$disabled:j||0===ce.length,onClick:fe,style:{opacity:j||0===ce.length?.6:1}}),t("span",{children:H})]}),t(p,{children:be})]})}(),x&&null!==q&&t(u,{className:"transfer-search-wrapper",children:A?A({direction:U,value:re,onChange:function(e){ie(e),null==G||G(e)},disabled:j}):n(r,{children:[t(f,{type:"text",placeholder:I,value:re,onChange:ge,onKeyDown:ve,disabled:j,$styles:null==E?void 0:E.search}),t(h,{onClick:me,disabled:j,$disabled:j,"aria-label":"搜索",children:t(D,{type:"search",size:"small",color:j?"#bfbfbf":"#1890ff"})})]})}),B?B({direction:U,dataSource:ce,selectedKeys:R,sourceSelectedKeys:ee,targetSelectedKeys:te,onSelectChange:F}):oe?t(C,{className:"transfer-loading",children:Y?Y():t(K,{className:"transfer-loading-spinner"})}):t(N,{className:"transfer-list-body",children:ce.length>0?ce.map(function(e){var r=L(e,v),i=R.includes(r),l=(null==V?void 0:V(e))||"";return n(w,{className:"transfer-list-item ".concat(l),$selected:i,$disabled:j||e.disabled,$styles:null==E?void 0:E.item,onClick:function(){return he(e)},children:[t($,{$checked:i}),t(T,{children:J?J(e):O(e,v)})]},r)}):t(k,{className:"transfer-empty",children:"暂无数据"})}),(W||Q)&&t(g,{className:"transfer-list-footer",children:Q?Q({direction:U}):W})]})},j=function(e){var r=e.moveToRightDisabled,i=e.moveToLeftDisabled,l=e.onMoveToRight,o=e.onMoveToLeft,a=e.style;return n(y,{className:"transfer-operation",$styles:a,children:[t(v,{type:"button",$direction:"right",$disabled:r,onClick:l,disabled:r,"aria-label":"移动到右侧"}),t(v,{type:"button",$direction:"left",$disabled:i,onClick:o,disabled:i,"aria-label":"移动到左侧"})]})},H=function(a){var s=a.dataSource,d=a.fieldNames,u=a.targetKeys,f=a.defaultTargetKeys,h=void 0===f?[]:f,g=a.selectedKeys,y=a.defaultSelectedKeys,v=void 0===y?[]:y,m=a.showSearch,b=void 0!==m&&m,S=a.disabled,p=void 0!==S&&S,C=a.leftTitle,K=void 0===C?"源列表":C,N=a.rightTitle,w=void 0===N?"目标列表":N,$=a.leftDescription,T=a.rightDescription,k=a.filterOption,D=a.styles,R=a.listHeight,O=a.listWidth,H=a.header,W=a.search,M=a.body,I=a.onSelectChange,z=a.onChange,E=a.onSearch,P=a.render,_=a.footer,q=a.rowClassName,A=a.mode,B=void 0===A?"transfer":A,F=a.loading,G=void 0!==F&&F,J=a.loadingRender,Q=a.loadingDelay,U=void 0!==u,V=void 0!==g,X=i(h),Y=X[0],Z=X[1],ee=i(v),te=ee[0],ne=ee[1],re=i([]),ie=re[0],le=re[1],oe=U?u:Y,ae=V?g.filter(function(e){return!oe.includes(e)}):te,se=V?g.filter(function(e){return oe.includes(e)}):ie,ce=l(function(){return s.filter(function(e){return!oe.includes(L(e,d))})},[s,oe,d]),de=l(function(){return s.filter(function(e){return oe.includes(L(e,d))})},[s,oe,d]),ue=o(function(e,t){V||ne(e),null==I||I(e,t)},[V,I]),fe=o(function(e,t){V||le(t),null==I||I(e,t)},[V,I]),he=o(function(){if(0!==ae.length){var t=e(e([],oe,!0),ae,!0),n=e([],ae,!0);U||(Z(t),ne([])),null==z||z(t,"right",n)}},[ae,oe,U,z]),ge=o(function(){if(0!==se.length){var t=oe.filter(function(e){return!se.includes(e)}),n=e([],se,!0);U||(Z(t),le([])),null==z||z(t,"left",n)}},[se,oe,U,z]),ye=o(function(e){null==E||E("left",e)},[E]),ve=o(function(e){null==E||E("right",e)},[E]),me=p||0===ae.length,be=p||0===se.length,Se=o(function(e,t){var n=e;U||Z(n),null==z||z(n,"right",n),null==I||I([],n)},[U,z,I]),pe=l(function(){return s},[s]),Ce=l(function(){return V?g.filter(function(e){return oe.includes(e)}):oe},[V,g,oe]);return t(c,{className:"transfer-wrapper",$styles:null==D?void 0:D.wrapper,children:"single"===B?t(x,{direction:"left",dataSource:pe,fieldNames:d,selectedKeys:Ce,showSearch:b,disabled:p,title:K,description:$,filterOption:k,styles:D,listHeight:R,listWidth:O,header:H,search:W,body:M,onSelectChange:Se,onSearch:ye,render:P,footer:_,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:[],targetSelectedKeys:Ce}):n(r,{children:[t(x,{direction:"left",dataSource:ce,fieldNames:d,selectedKeys:ae,showSearch:b,disabled:p,title:K,description:$,filterOption:k,styles:D,listHeight:R,listWidth:O,header:H,search:W,body:M,onSelectChange:ue,onSearch:ye,render:P,footer:_,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:ae,targetSelectedKeys:se}),t(j,{moveToRightDisabled:me,moveToLeftDisabled:be,onMoveToRight:he,onMoveToLeft:ge,style:null==D?void 0:D.operation}),t(x,{direction:"right",dataSource:de,fieldNames:d,selectedKeys:se,showSearch:b,disabled:p,title:w,description:T,filterOption:k,styles:D,listHeight:R,listWidth:O,header:H,search:W,body:M,onSelectChange:fe,onSearch:ve,render:P,footer:_,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:ae,targetSelectedKeys:se})]})})};export{H as default};
@@ -1 +0,0 @@
1
- import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import r from"styled-components";var e,t,o,i,a,s,d,f,l,c,p,b,x,g,h,u,m,w,k,y=function(n,r){return"var(".concat(n,", ").concat(r,")")},v=r.div(e||(e=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n\n &.transfer-wrapper {\n /* 外部可通过 .transfer-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n\n &.transfer-wrapper {\n /* 外部可通过 .transfer-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var r=n.$styles;return r&&Object.entries(r).map(function(n){var r=n[0],e=n[1];return"".concat(r,": ").concat(e,";")}).join("\n")}),$=r.div(t||(t=n(["\n width: ",";\n height: ",";\n border: 1px solid ",";\n border-radius: ",";\n background: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n opacity: ",";\n /* 立体感阴影效果 */\n box-shadow:\n 0 2px 4px rgba(0, 0, 0, 0.04),\n 0 4px 8px rgba(0, 0, 0, 0.06),\n 0 8px 16px rgba(0, 0, 0, 0.04),\n inset 0 1px 0 rgba(255, 255, 255, 0.8);\n transition: box-shadow 0.3s ease, transform 0.3s ease;\n\n &.transfer-list {\n /* 外部可通过 .transfer-list 选择器覆盖样式 */\n }\n\n ","\n"],["\n width: ",";\n height: ",";\n border: 1px solid ",";\n border-radius: ",";\n background: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n opacity: ",";\n /* 立体感阴影效果 */\n box-shadow:\n 0 2px 4px rgba(0, 0, 0, 0.04),\n 0 4px 8px rgba(0, 0, 0, 0.06),\n 0 8px 16px rgba(0, 0, 0, 0.04),\n inset 0 1px 0 rgba(255, 255, 255, 0.8);\n transition: box-shadow 0.3s ease, transform 0.3s ease;\n\n &.transfer-list {\n /* 外部可通过 .transfer-list 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var r=n.$width;return"number"==typeof r?"".concat(r,"px"):r||y("--transfer-list-width","200px")},function(n){var r=n.$height;return"number"==typeof r?"".concat(r,"px"):r||y("--transfer-height","300px")},y("--transfer-border-color","#d9d9d9"),y("--transfer-border-radius","6px"),y("--transfer-bg","#fff"),function(n){return n.$disabled?.6:1},function(n){var r=n.$styles;return r&&Object.entries(r).map(function(n){var r=n[0],e=n[1];return"".concat(r,": ").concat(e,";")}).join("\n")}),z=r.div(o||(o=n(["\n height: ",";\n padding: 0 ",";\n background: ",";\n border-bottom: 1px solid ",";\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",";\n font-weight: 500;\n color: ",";\n\n &.transfer-list-header {\n /* 外部可通过 .transfer-list-header 选择器覆盖样式 */\n }\n"],["\n height: ",";\n padding: 0 ",";\n background: ",";\n border-bottom: 1px solid ",";\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ",";\n font-weight: 500;\n color: ",";\n\n &.transfer-list-header {\n /* 外部可通过 .transfer-list-header 选择器覆盖样式 */\n }\n"])),y("--transfer-header-height","40px"),y("--transfer-padding","12px"),y("--transfer-header-bg","#fafafa"),y("--transfer-border-color","#d9d9d9"),y("--transfer-header-font-size","14px"),y("--transfer-item-text-color","rgba(0, 0, 0, 0.85)")),j=r.div(i||(i=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n\n .transfer-checkbox {\n cursor: pointer;\n }\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n\n .transfer-checkbox {\n cursor: pointer;\n }\n"]))),O=r.span(a||(a=n(["\n font-size: 12px;\n color: ",";\n"],["\n font-size: 12px;\n color: ",";\n"])),y("--transfer-description-color","rgba(0, 0, 0, 0.45)")),_=r.div(s||(s=n(["\n padding: 8px ",";\n border-bottom: 1px solid ",";\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n\n &.transfer-search-wrapper {\n /* 外部可通过 .transfer-search-wrapper 选择器覆盖样式 */\n }\n"],["\n padding: 8px ",";\n border-bottom: 1px solid ",";\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: 100%;\n\n &.transfer-search-wrapper {\n /* 外部可通过 .transfer-search-wrapper 选择器覆盖样式 */\n }\n"])),y("--transfer-padding","12px"),y("--transfer-border-color","#d9d9d9")),q=r.input(d||(d=n(["\n flex: 1;\n min-width: 0;\n height: ",";\n padding: ",";\n border: 1px solid ",";\n border-radius: 4px;\n font-size: ",";\n outline: none;\n transition: ",";\n box-sizing: border-box;\n\n &::placeholder {\n color: ",";\n }\n\n &:focus {\n border-color: ",";\n }\n\n &:disabled {\n background: #f5f5f5;\n cursor: not-allowed;\n }\n\n ","\n"],["\n flex: 1;\n min-width: 0;\n height: ",";\n padding: ",";\n border: 1px solid ",";\n border-radius: 4px;\n font-size: ",";\n outline: none;\n transition: ",";\n box-sizing: border-box;\n\n &::placeholder {\n color: ",";\n }\n\n &:focus {\n border-color: ",";\n }\n\n &:disabled {\n background: #f5f5f5;\n cursor: not-allowed;\n }\n\n ","\n"])),y("--transfer-search-height","32px"),y("--transfer-search-padding","0 8px"),y("--transfer-search-border","#d9d9d9"),y("--transfer-font-size","14px"),y("--transfer-transition","all 0.3s"),y("--transfer-search-placeholder-color","rgba(0, 0, 0, 0.45)"),y("--transfer-search-focus-border","#1890ff"),function(n){var r=n.$styles;return r&&Object.entries(r).map(function(n){var r=n[0],e=n[1];return"".concat(r,": ").concat(e,";")}).join("\n")}),A=r.button(f||(f=n(["\n width: 32px;\n min-width: 32px;\n height: ",";\n border: 1px solid ",";\n border-radius: 4px;\n background: ",";\n cursor: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: ",";\n opacity: ",";\n flex-shrink: 0;\n padding: 0;\n box-sizing: border-box;\n\n &:hover:not(:disabled) {\n border-color: ",";\n color: ",";\n }\n\n &:disabled {\n background: #f5f5f5;\n }\n\n /* 搜索图标 */\n .search-icon {\n width: 16px;\n height: 16px;\n }\n"],["\n width: 32px;\n min-width: 32px;\n height: ",";\n border: 1px solid ",";\n border-radius: 4px;\n background: ",";\n cursor: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: ",";\n opacity: ",";\n flex-shrink: 0;\n padding: 0;\n box-sizing: border-box;\n\n &:hover:not(:disabled) {\n border-color: ",";\n color: ",";\n }\n\n &:disabled {\n background: #f5f5f5;\n }\n\n /* 搜索图标 */\n .search-icon {\n width: 16px;\n height: 16px;\n }\n"])),y("--transfer-search-height","32px"),y("--transfer-search-border","#d9d9d9"),y("--transfer-bg","#fff"),function(n){return n.$disabled?"not-allowed":"pointer"},y("--transfer-transition","all 0.3s"),function(n){return n.$disabled?.6:1},y("--transfer-search-focus-border","#1890ff"),y("--transfer-search-focus-border","#1890ff")),B=r.div(l||(l=n(["\n flex: 1;\n overflow-y: auto;\n padding: 4px 0;\n\n &.transfer-list-body {\n /* 外部可通过 .transfer-list-body 选择器覆盖样式 */\n }\n\n /* 滚动条样式 - 淡色精致设计 */\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n border: 2px solid transparent;\n background-clip: padding-box;\n transition: background 0.2s ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.25);\n }\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n"],["\n flex: 1;\n overflow-y: auto;\n padding: 4px 0;\n\n &.transfer-list-body {\n /* 外部可通过 .transfer-list-body 选择器覆盖样式 */\n }\n\n /* 滚动条样式 - 淡色精致设计 */\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n border: 2px solid transparent;\n background-clip: padding-box;\n transition: background 0.2s ease;\n\n &:hover {\n background: rgba(0, 0, 0, 0.25);\n }\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-corner {\n background: transparent;\n }\n"]))),C=r.div(c||(c=n(["\n height: ",";\n padding: ",";\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: ",";\n transition: ",";\n font-size: ",";\n color: ",";\n background: ",";\n\n &:hover {\n background: ",";\n }\n\n &.transfer-list-item {\n /* 外部可通过 .transfer-list-item 选择器覆盖样式 */\n }\n\n ","\n"],["\n height: ",";\n padding: ",";\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: ",";\n transition: ",";\n font-size: ",";\n color: ",";\n background: ",";\n\n &:hover {\n background: ",";\n }\n\n &.transfer-list-item {\n /* 外部可通过 .transfer-list-item 选择器覆盖样式 */\n }\n\n ","\n"])),y("--transfer-item-height","32px"),y("--transfer-item-padding","0 12px"),function(n){return n.$disabled?"not-allowed":"pointer"},y("--transfer-transition","all 0.3s"),y("--transfer-item-font-size","14px"),function(n){return n.$disabled?y("--transfer-item-disabled-color","rgba(0, 0, 0, 0.25)"):y("--transfer-item-text-color","rgba(0, 0, 0, 0.85)")},function(n){return n.$selected?y("--transfer-item-selected-bg","#e6f7ff"):"transparent"},function(n){var r=n.$disabled,e=n.$selected;return r?"transparent":e?y("--transfer-item-selected-bg","#e6f7ff"):y("--transfer-item-hover-bg","#f5f5f5")},function(n){var r=n.$styles;return r&&Object.entries(r).map(function(n){var r=n[0],e=n[1];return"".concat(r,": ").concat(e,";")}).join("\n")}),D=r.span(p||(p=n(["\n width: 16px;\n height: 16px;\n border: 1px solid\n ",";\n border-radius: 2px;\n background: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: all 0.3s;\n\n &::after {\n content: ",";\n font-size: ",";\n color: #fff;\n transform: scale(",");\n transition: all 0.2s;\n line-height: 1;\n font-weight: ",";\n }\n"],["\n width: 16px;\n height: 16px;\n border: 1px solid\n ",";\n border-radius: 2px;\n background: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: all 0.3s;\n\n &::after {\n content: ",";\n font-size: ",";\n color: #fff;\n transform: scale(",");\n transition: all 0.2s;\n line-height: 1;\n font-weight: ",";\n }\n"])),function(n){var r=n.$checked,e=n.$indeterminate;return r||e?"#1890ff":"#d9d9d9"},function(n){var r=n.$checked,e=n.$indeterminate;return r||e?"#1890ff":"#fff"},function(n){var r=n.$checked;return n.$indeterminate?"'−'":r?"'✓'":"''"},function(n){return n.$indeterminate?"14px":"12px"},function(n){var r=n.$checked,e=n.$indeterminate;return r||e?1:0},function(n){return n.$indeterminate?"bold":"normal"}),E=r.span(b||(b=n(["\n width: 16px;\n height: 16px;\n border: 1px solid ",";\n border-radius: 2px;\n background: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: all 0.3s;\n\n &::after {\n content: '✓';\n font-size: 12px;\n color: #fff;\n transform: scale(",");\n transition: all 0.2s;\n line-height: 1;\n }\n"],["\n width: 16px;\n height: 16px;\n border: 1px solid ",";\n border-radius: 2px;\n background: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: all 0.3s;\n\n &::after {\n content: '✓';\n font-size: 12px;\n color: #fff;\n transform: scale(",");\n transition: all 0.2s;\n line-height: 1;\n }\n"])),function(n){return n.$checked?"#1890ff":"#d9d9d9"},function(n){return n.$checked?"#1890ff":"#fff"},function(n){return n.$checked?1:0}),F=r.span(x||(x=n(["\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]))),G=r.div(g||(g=n(["\n padding: 8px ",";\n border-top: 1px solid ",";\n font-size: ",";\n color: ",";\n min-height: 20px;\n display: flex;\n align-items: center;\n\n &.transfer-list-footer {\n /* 外部可通过 .transfer-list-footer 选择器覆盖样式 */\n }\n"],["\n padding: 8px ",";\n border-top: 1px solid ",";\n font-size: ",";\n color: ",";\n min-height: 20px;\n display: flex;\n align-items: center;\n\n &.transfer-list-footer {\n /* 外部可通过 .transfer-list-footer 选择器覆盖样式 */\n }\n"])),y("--transfer-padding","12px"),y("--transfer-border-color","#d9d9d9"),y("--transfer-description-font-size","12px"),y("--transfer-description-color","rgba(0, 0, 0, 0.45)")),H=r.div(h||(h=n(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: ",";\n align-items: center;\n\n &.transfer-operation {\n /* 外部可通过 .transfer-operation 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: ",";\n align-items: center;\n\n &.transfer-operation {\n /* 外部可通过 .transfer-operation 选择器覆盖样式 */\n }\n\n ","\n"])),y("--transfer-operation-width","40px"),function(n){var r=n.$styles;return r&&Object.entries(r).map(function(n){var r=n[0],e=n[1];return"".concat(r,": ").concat(e,";")}).join("\n")}),I=r.button(u||(u=n(["\n width: 32px;\n height: 28px;\n border: 1px solid ",";\n border-radius: 4px;\n background: ",";\n cursor: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: ",";\n opacity: ",";\n\n &:hover:not(:disabled) {\n background: ",";\n border-color: ",";\n color: #1890ff;\n }\n\n &:disabled {\n background: ",";\n color: ",";\n }\n\n /* 箭头图标 - 使用字符 */\n &::before {\n content: ",";\n font-size: 14px;\n font-weight: 600;\n line-height: 1;\n color: inherit;\n }\n"],["\n width: 32px;\n height: 28px;\n border: 1px solid ",";\n border-radius: 4px;\n background: ",";\n cursor: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n transition: ",";\n opacity: ",";\n\n &:hover:not(:disabled) {\n background: ",";\n border-color: ",";\n color: #1890ff;\n }\n\n &:disabled {\n background: ",";\n color: ",";\n }\n\n /* 箭头图标 - 使用字符 */\n &::before {\n content: ",";\n font-size: 14px;\n font-weight: 600;\n line-height: 1;\n color: inherit;\n }\n"])),y("--transfer-operation-border","#d9d9d9"),y("--transfer-operation-bg","#f5f5f5"),function(n){return n.$disabled?"not-allowed":"pointer"},y("--transfer-transition","all 0.3s"),function(n){return n.$disabled?.6:1},y("--transfer-operation-hover-bg","#e6f7ff"),y("--transfer-operation-hover-border","#1890ff"),y("--transfer-operation-disabled-bg","#f5f5f5"),y("--transfer-operation-disabled-color","rgba(0, 0, 0, 0.25)"),function(n){return"right"===n.$direction?"'>'":"'<'"}),J=r.div(m||(m=n(["\n padding: 32px 0;\n text-align: center;\n color: ",";\n font-size: ",";\n\n &.transfer-empty {\n /* 外部可通过 .transfer-empty 选择器覆盖样式 */\n }\n"],["\n padding: 32px 0;\n text-align: center;\n color: ",";\n font-size: ",";\n\n &.transfer-empty {\n /* 外部可通过 .transfer-empty 选择器覆盖样式 */\n }\n"])),y("--transfer-description-color","rgba(0, 0, 0, 0.45)"),y("--transfer-font-size","14px")),K=r.div(w||(w=n(["\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px 0;\n\n &.transfer-loading {\n /* 外部可通过 .transfer-loading 选择器覆盖样式 */\n }\n"],["\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px 0;\n\n &.transfer-loading {\n /* 外部可通过 .transfer-loading 选择器覆盖样式 */\n }\n"]))),L=r.div(k||(k=n(["\n width: 32px;\n height: 32px;\n border: 3px solid ",";\n border-top-color: ",";\n border-radius: 50%;\n animation: transfer-spin 0.8s linear infinite;\n\n @keyframes transfer-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n"],["\n width: 32px;\n height: 32px;\n border: 3px solid ",";\n border-top-color: ",";\n border-radius: 50%;\n animation: transfer-spin 0.8s linear infinite;\n\n @keyframes transfer-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n"])),y("--transfer-loading-track-color","#f0f0f0"),y("--transfer-loading-spinner-color","#1890ff"));export{J as TransferEmpty,O as TransferHeaderCount,j as TransferHeaderLeft,D as TransferItemCheckbox,F as TransferItemContent,B as TransferListBody,$ as TransferListContainer,G as TransferListFooter,z as TransferListHeader,C as TransferListItem,E as TransferListItemCheckbox,K as TransferLoading,L as TransferLoadingSpinner,H as TransferOperation,I as TransferOperationButton,q as TransferSearch,A as TransferSearchButton,_ as TransferSearchWrapper,v as TransferWrapper};