easy-component-ui 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +162 -90
  3. package/dist/assets/icon.css +1 -0
  4. package/dist/components/Base.js +872 -0
  5. package/dist/components/ea-alert.js +196 -0
  6. package/dist/components/ea-avatar.js +159 -0
  7. package/dist/components/ea-backtop.js +136 -0
  8. package/dist/components/ea-badge.js +144 -0
  9. package/dist/components/ea-breadcrumb.js +148 -0
  10. package/dist/components/ea-button.js +261 -0
  11. package/dist/components/ea-calendar.js +10 -0
  12. package/dist/components/ea-calendar2.js +673 -0
  13. package/dist/components/ea-card.js +85 -0
  14. package/dist/components/ea-carousel.js +374 -0
  15. package/dist/components/ea-checkbox.js +446 -0
  16. package/dist/components/ea-collapse.js +293 -0
  17. package/dist/components/ea-color-picker.js +888 -0
  18. package/dist/components/ea-container.js +177 -0
  19. package/dist/components/ea-countdown.js +121 -0
  20. package/dist/components/ea-date-picker.js +649 -0
  21. package/dist/components/ea-descriptions.js +411 -0
  22. package/dist/components/ea-dialog.js +249 -0
  23. package/dist/components/ea-drawer.js +194 -0
  24. package/dist/components/ea-dropdown.js +228 -0
  25. package/dist/components/ea-empty.js +85 -0
  26. package/dist/components/ea-icon.js +68 -0
  27. package/dist/components/ea-image-preview.js +488 -0
  28. package/dist/components/ea-image.js +302 -0
  29. package/dist/components/ea-infinite-scroll.js +109 -0
  30. package/dist/components/ea-input-number.js +367 -0
  31. package/dist/components/ea-input.js +588 -0
  32. package/dist/components/ea-layout.js +125 -0
  33. package/dist/components/ea-link.js +95 -0
  34. package/dist/components/ea-loading.js +151 -0
  35. package/dist/components/ea-menu.js +417 -0
  36. package/dist/components/ea-message-box.js +624 -0
  37. package/dist/components/ea-message.js +251 -0
  38. package/dist/components/ea-notification.js +331 -0
  39. package/dist/components/ea-overlay.js +161 -0
  40. package/dist/components/ea-page-header.js +108 -0
  41. package/dist/components/ea-pagination.js +480 -0
  42. package/dist/components/ea-popconfirm.js +220 -0
  43. package/dist/components/ea-popover.js +123 -0
  44. package/dist/components/ea-popper.js +203 -0
  45. package/dist/components/ea-progress.js +269 -0
  46. package/dist/components/ea-radio.js +364 -0
  47. package/dist/components/ea-rate.js +241 -0
  48. package/dist/components/ea-result.js +100 -0
  49. package/dist/components/ea-scrollbar.js +235 -0
  50. package/dist/components/ea-segmented.js +215 -0
  51. package/dist/components/ea-select.js +598 -0
  52. package/dist/components/ea-skeleton.js +246 -0
  53. package/dist/components/ea-slider.js +421 -0
  54. package/dist/components/ea-space.js +109 -0
  55. package/dist/components/ea-splitter.js +217 -0
  56. package/dist/components/ea-statistic.js +6 -0
  57. package/dist/components/ea-statistic2.js +83 -0
  58. package/dist/components/ea-steps.js +312 -0
  59. package/dist/components/ea-switch.js +271 -0
  60. package/dist/components/ea-table.js +1007 -0
  61. package/dist/components/ea-tabs.js +501 -0
  62. package/dist/components/ea-tag.js +234 -0
  63. package/dist/components/ea-text.js +103 -0
  64. package/dist/components/ea-time-picker.js +514 -0
  65. package/dist/components/ea-timeline.js +186 -0
  66. package/dist/components/ea-tooltip.js +121 -0
  67. package/dist/components/ea-tour.js +544 -0
  68. package/dist/components/ea-transfer.js +949 -0
  69. package/dist/components/ea-tree.js +1088 -0
  70. package/dist/components/index.js +61 -0
  71. package/dist/core/FormBase.js +238 -0
  72. package/dist/css/ea-alert.style.js +4 -0
  73. package/dist/css/ea-aside.style.js +4 -0
  74. package/dist/css/ea-avatar.style.js +4 -0
  75. package/dist/css/ea-backtop.style.js +4 -0
  76. package/dist/css/ea-badge.style.js +4 -0
  77. package/dist/css/ea-breadcrumb-item.style.js +4 -0
  78. package/dist/css/ea-breadcrumb.style.js +4 -0
  79. package/dist/css/ea-button-group.style.js +4 -0
  80. package/dist/css/ea-button.style.js +4 -0
  81. package/dist/css/ea-calendar.style.js +4 -0
  82. package/dist/css/ea-card.style.js +4 -0
  83. package/dist/css/ea-carousel-item.style.js +4 -0
  84. package/dist/css/ea-carousel.style.js +4 -0
  85. package/dist/css/ea-check-tag.style.js +4 -0
  86. package/dist/css/ea-checkbox-group.style.js +4 -0
  87. package/dist/css/ea-checkbox.style.js +4 -0
  88. package/dist/css/ea-col.style.js +4 -0
  89. package/dist/css/ea-collapse-item.style.js +4 -0
  90. package/dist/css/ea-collapse.style.js +4 -0
  91. package/dist/css/ea-color-picker-panel.style.js +4 -0
  92. package/dist/css/ea-color-picker.style.js +4 -0
  93. package/dist/css/ea-container.style.js +4 -0
  94. package/dist/css/ea-date-picker.style.js +4 -0
  95. package/dist/css/ea-descriptions-item.style.js +4 -0
  96. package/dist/css/ea-descriptions.style.js +4 -0
  97. package/dist/css/ea-dialog.style.js +4 -0
  98. package/dist/css/ea-drawer.style.js +4 -0
  99. package/dist/css/ea-dropdown-item.style.js +4 -0
  100. package/dist/css/ea-dropdown-menu.style.js +4 -0
  101. package/dist/css/ea-dropdown.style.js +4 -0
  102. package/dist/css/ea-empty.style.js +4 -0
  103. package/dist/css/ea-footer.style.js +4 -0
  104. package/dist/css/ea-header.style.js +4 -0
  105. package/dist/css/ea-icon.style.js +4 -0
  106. package/dist/css/ea-image-preview.style.js +4 -0
  107. package/dist/css/ea-image.style.js +4 -0
  108. package/dist/css/ea-infinite-scroll.style.js +4 -0
  109. package/dist/css/ea-input-number.style.js +4 -0
  110. package/dist/css/ea-input.style.js +4 -0
  111. package/dist/css/ea-link.style.js +4 -0
  112. package/dist/css/ea-main.style.js +4 -0
  113. package/dist/css/ea-menu-item-group.style.js +4 -0
  114. package/dist/css/ea-menu-item.style.js +4 -0
  115. package/dist/css/ea-menu.style.js +4 -0
  116. package/dist/css/ea-message-box.style.js +4 -0
  117. package/dist/css/ea-message.style.js +4 -0
  118. package/dist/css/ea-notification.style.js +4 -0
  119. package/dist/css/ea-option-gropu.style.js +4 -0
  120. package/dist/css/ea-option.style.js +4 -0
  121. package/dist/css/ea-overlay.style.js +4 -0
  122. package/dist/css/ea-page-header.style.js +4 -0
  123. package/dist/css/ea-pagination.style.js +4 -0
  124. package/dist/css/ea-popconfirm.style.js +4 -0
  125. package/dist/css/ea-popover.style.js +4 -0
  126. package/dist/css/ea-popper.style.js +4 -0
  127. package/dist/css/ea-progress.style.js +4 -0
  128. package/dist/css/ea-radio-group.style.js +4 -0
  129. package/dist/css/ea-radio.style.js +4 -0
  130. package/dist/css/ea-rate.style.js +4 -0
  131. package/dist/css/ea-result.style.js +4 -0
  132. package/dist/css/ea-row.style.js +4 -0
  133. package/dist/css/ea-scrollbar.style.js +4 -0
  134. package/dist/css/ea-segmented.style.js +4 -0
  135. package/dist/css/ea-select.style.js +4 -0
  136. package/dist/css/ea-skeleton-item.style.js +4 -0
  137. package/dist/css/ea-skeleton.style.js +4 -0
  138. package/dist/css/ea-slider.style.js +4 -0
  139. package/dist/css/ea-space.style.js +4 -0
  140. package/dist/css/ea-splitter-bar.style.js +4 -0
  141. package/dist/css/ea-splitter-panel.style.js +4 -0
  142. package/dist/css/ea-splitter.style.js +4 -0
  143. package/dist/css/ea-statistic.style.js +4 -0
  144. package/dist/css/ea-step.style.js +4 -0
  145. package/dist/css/ea-steps.style.js +4 -0
  146. package/dist/css/ea-sub-menu.style.js +4 -0
  147. package/dist/css/ea-switch.style.js +4 -0
  148. package/dist/css/ea-tab-panel.style.js +4 -0
  149. package/dist/css/ea-tab.style.js +4 -0
  150. package/dist/css/ea-table.style.js +4 -0
  151. package/dist/css/ea-tabs.style.js +4 -0
  152. package/dist/css/ea-tag.style.js +4 -0
  153. package/dist/css/ea-text.style.js +4 -0
  154. package/dist/css/ea-time-picker.style.js +4 -0
  155. package/dist/css/ea-timeline-item.style.js +4 -0
  156. package/dist/css/ea-timeline.style.js +4 -0
  157. package/dist/css/ea-tooltip.style.js +4 -0
  158. package/dist/css/ea-tour-step.style.js +4 -0
  159. package/dist/css/ea-tour.style.js +4 -0
  160. package/dist/css/ea-transfer.style.js +5 -0
  161. package/dist/css/ea-tree.style.js +6 -0
  162. package/dist/css/ea-ui-component.style.js +4 -0
  163. package/dist/favicon.ico +0 -0
  164. package/dist/utils/Color.js +439 -0
  165. package/dist/utils/I18nManager.js +218 -0
  166. package/dist/utils/Utils.js +65 -0
  167. package/dist/utils/Variables.js +19 -0
  168. package/dist/utils/timeout.js +9 -0
  169. package/package.json +294 -11
  170. package/build/components/Base.js +0 -1
  171. package/build/components/ea-alert/index.js +0 -1
  172. package/build/components/ea-alert/src/style/stylesheet.js +0 -1
  173. package/build/components/ea-aside/index.js +0 -1
  174. package/build/components/ea-avatar/index.js +0 -1
  175. package/build/components/ea-avatar/src/assets/defaultAvatar.js +0 -1
  176. package/build/components/ea-avatar/src/assets/errorAvatar.js +0 -1
  177. package/build/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -1
  178. package/build/components/ea-avatar/src/style/stylesheet.js +0 -1
  179. package/build/components/ea-backtop/index.js +0 -1
  180. package/build/components/ea-backtop/src/style/stylesheet.js +0 -1
  181. package/build/components/ea-badge/index.js +0 -1
  182. package/build/components/ea-badge/src/style/stylesheet.js +0 -1
  183. package/build/components/ea-breadcrumb/index.js +0 -1
  184. package/build/components/ea-breadcrumb/src/style/stylesheet.js +0 -1
  185. package/build/components/ea-breadcrumb-item/index.js +0 -1
  186. package/build/components/ea-breadcrumb-item/src/style/style.js +0 -1
  187. package/build/components/ea-button/index.js +0 -1
  188. package/build/components/ea-button/src/components/ButtonComm.js +0 -1
  189. package/build/components/ea-button/src/components/HrefComm.js +0 -1
  190. package/build/components/ea-button/src/style/stylesheet.js +0 -1
  191. package/build/components/ea-button-group/index.js +0 -1
  192. package/build/components/ea-button-group/src/style/stylesheet.js +0 -1
  193. package/build/components/ea-calendar/index.js +0 -1
  194. package/build/components/ea-calendar/src/style/stylesheet.js +0 -1
  195. package/build/components/ea-calendar/src/utils/createChangerElement.js +0 -1
  196. package/build/components/ea-calendar/src/utils/createThead.js +0 -1
  197. package/build/components/ea-calendar/src/utils/getDate.js +0 -1
  198. package/build/components/ea-calendar/src/utils/getUserWeekStart.js +0 -1
  199. package/build/components/ea-card/index.js +0 -1
  200. package/build/components/ea-card/src/style/stylesheet.js +0 -1
  201. package/build/components/ea-carousel/index.js +0 -1
  202. package/build/components/ea-carousel/src/style/stylesheet.js +0 -1
  203. package/build/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -1
  204. package/build/components/ea-carousel-item/index.js +0 -1
  205. package/build/components/ea-carousel-item/src/style/stylesheet.js +0 -1
  206. package/build/components/ea-checkbox/index.js +0 -1
  207. package/build/components/ea-checkbox/src/style/stylesheet.js +0 -1
  208. package/build/components/ea-checkbox-group/index.js +0 -1
  209. package/build/components/ea-checkbox-group/src/style/stylesheet.js +0 -1
  210. package/build/components/ea-collapse/index.js +0 -1
  211. package/build/components/ea-collapse-item/index.js +0 -1
  212. package/build/components/ea-collapse-item/src/style/stylesheet.js +0 -1
  213. package/build/components/ea-container/index.js +0 -1
  214. package/build/components/ea-date-picker/index.js +0 -1
  215. package/build/components/ea-date-picker/src/style/stylesheet.js +0 -1
  216. package/build/components/ea-descriptions/index.js +0 -1
  217. package/build/components/ea-descriptions/src/components/contentTemplate.js +0 -1
  218. package/build/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -1
  219. package/build/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -1
  220. package/build/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -1
  221. package/build/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -1
  222. package/build/components/ea-descriptions/src/style/stylesheet.js +0 -1
  223. package/build/components/ea-descriptions-item/index.js +0 -1
  224. package/build/components/ea-descriptions-item/src/stylesheet.js +0 -1
  225. package/build/components/ea-drawer/index.js +0 -1
  226. package/build/components/ea-drawer/src/style/stylesheet.js +0 -1
  227. package/build/components/ea-empty/index.js +0 -1
  228. package/build/components/ea-empty/src/assets/emptyStatusSVG.js +0 -1
  229. package/build/components/ea-empty/src/style/stylesheet.js +0 -1
  230. package/build/components/ea-footer/index.js +0 -1
  231. package/build/components/ea-form/index.js +0 -1
  232. package/build/components/ea-form-item/index.js +0 -1
  233. package/build/components/ea-form-item/src/style/stylesheet.js +0 -1
  234. package/build/components/ea-header/index.js +0 -1
  235. package/build/components/ea-icon/config.json +0 -1030
  236. package/build/components/ea-icon/css/fontello.css +0 -312
  237. package/build/components/ea-icon/font/fontello.eot +0 -0
  238. package/build/components/ea-icon/font/fontello.svg +0 -350
  239. package/build/components/ea-icon/font/fontello.ttf +0 -0
  240. package/build/components/ea-icon/font/fontello.woff +0 -0
  241. package/build/components/ea-icon/font/fontello.woff2 +0 -0
  242. package/build/components/ea-icon/index.css +0 -1
  243. package/build/components/ea-icon/index.js +0 -1
  244. package/build/components/ea-image/index.js +0 -1
  245. package/build/components/ea-image/src/assets/errorImage.js +0 -1
  246. package/build/components/ea-image/src/style/stylesheet.js +0 -1
  247. package/build/components/ea-image/src/utils/createPreviewTools.js +0 -1
  248. package/build/components/ea-infinite-scroll/index.js +0 -1
  249. package/build/components/ea-infinite-scroll-item/index.js +0 -1
  250. package/build/components/ea-input/index.js +0 -1
  251. package/build/components/ea-input/src/components/createFixIcon.js +0 -1
  252. package/build/components/ea-input/src/components/createSuggestionBoard.js +0 -1
  253. package/build/components/ea-input/src/components/createWordLimitElement.js +0 -1
  254. package/build/components/ea-input/src/style/stylesheet.js +0 -1
  255. package/build/components/ea-input/src/utils/dispatchEvent.js +0 -1
  256. package/build/components/ea-input/src/utils/handleSearchResult.js +0 -1
  257. package/build/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -1
  258. package/build/components/ea-input-number/index.js +0 -1
  259. package/build/components/ea-input-number/src/style/stylesheet.js +0 -1
  260. package/build/components/ea-input-number/src/utils/handleCustomEvent.js +0 -1
  261. package/build/components/ea-link/index.js +0 -1
  262. package/build/components/ea-link/src/style/stylesheet.js +0 -1
  263. package/build/components/ea-loading/index.js +0 -1
  264. package/build/components/ea-loading/src/style/stylesheet.js +0 -1
  265. package/build/components/ea-main/index.js +0 -1
  266. package/build/components/ea-menu/index.js +0 -1
  267. package/build/components/ea-menu/src/style/stylesheet.js +0 -1
  268. package/build/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -1
  269. package/build/components/ea-menu-item/index.js +0 -1
  270. package/build/components/ea-menu-item/src/style/stylesheet.js +0 -1
  271. package/build/components/ea-menu-item-group/index.js +0 -1
  272. package/build/components/ea-menu-item-group/src/style/stylesheet.js +0 -1
  273. package/build/components/ea-message/index.js +0 -1
  274. package/build/components/ea-message/src/style/stylesheet.js +0 -1
  275. package/build/components/ea-message/src/utils/MessageClass.js +0 -1
  276. package/build/components/ea-message-box/index.js +0 -1
  277. package/build/components/ea-message-box/src/style/stylesheet.js +0 -1
  278. package/build/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -1
  279. package/build/components/ea-option/index.js +0 -1
  280. package/build/components/ea-option/src/style/stylesheet.js +0 -1
  281. package/build/components/ea-option-gropu/index.js +0 -1
  282. package/build/components/ea-page-header/index.js +0 -1
  283. package/build/components/ea-page-header/src/style/stylesheet.js +0 -1
  284. package/build/components/ea-pagination/index.js +0 -1
  285. package/build/components/ea-pagination/src/components/getMoreItem.js +0 -1
  286. package/build/components/ea-pagination/src/components/getPageItem.js +0 -1
  287. package/build/components/ea-pagination/src/components/getShowTotalItem.js +0 -1
  288. package/build/components/ea-pagination/src/style/stylesheet.js +0 -1
  289. package/build/components/ea-pane/index.js +0 -1
  290. package/build/components/ea-pane/src/stylesheet.js +0 -1
  291. package/build/components/ea-progress/index.js +0 -1
  292. package/build/components/ea-progress/src/components/SVGComm.js +0 -1
  293. package/build/components/ea-progress/src/style/stylesheet.js +0 -1
  294. package/build/components/ea-radio/index.js +0 -1
  295. package/build/components/ea-radio/src/style/stylesheet.js +0 -1
  296. package/build/components/ea-radio-group/index.js +0 -1
  297. package/build/components/ea-rate/index.js +0 -1
  298. package/build/components/ea-rate/src/components/rateComm.js +0 -1
  299. package/build/components/ea-rate/src/style/stylesheet.js +0 -1
  300. package/build/components/ea-result/index.js +0 -1
  301. package/build/components/ea-result/src/style/stylesheet.js +0 -1
  302. package/build/components/ea-select/index.js +0 -1
  303. package/build/components/ea-select/src/style/stylesheet.js +0 -1
  304. package/build/components/ea-skeleton/index.js +0 -1
  305. package/build/components/ea-skeleton/src/style/stylesheet.js +0 -1
  306. package/build/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -1
  307. package/build/components/ea-skeleton-item/index.js +0 -1
  308. package/build/components/ea-skeleton-item/src/assets/imageSVG.js +0 -1
  309. package/build/components/ea-skeleton-item/src/style/stylesheet.js +0 -1
  310. package/build/components/ea-step/index.js +0 -1
  311. package/build/components/ea-step/src/style/stylesheet.js +0 -1
  312. package/build/components/ea-steps/index.js +0 -1
  313. package/build/components/ea-steps/src/style/stylesheet.js +0 -1
  314. package/build/components/ea-submenu/index.js +0 -1
  315. package/build/components/ea-submenu/src/style/stylesheet.js +0 -1
  316. package/build/components/ea-switch/index.js +0 -1
  317. package/build/components/ea-switch/src/style/stylesheet.js +0 -1
  318. package/build/components/ea-tab/index.js +0 -1
  319. package/build/components/ea-tab/src/style/stylesheet.js +0 -1
  320. package/build/components/ea-table/index.js +0 -1
  321. package/build/components/ea-table/src/style/stylesheet.js +0 -1
  322. package/build/components/ea-table-column/index.js +0 -1
  323. package/build/components/ea-tabs/index.js +0 -1
  324. package/build/components/ea-tabs/src/style/stylesheet.js +0 -1
  325. package/build/components/ea-tag/index.js +0 -1
  326. package/build/components/ea-tag/src/style/stylesheet.js +0 -1
  327. package/build/components/ea-textarea/index.js +0 -1
  328. package/build/components/ea-textarea/src/style/stylesheet.js +0 -1
  329. package/build/components/ea-time-picker/index.js +0 -1
  330. package/build/components/ea-time-picker/src/style/stylesheet.js +0 -1
  331. package/build/components/ea-timeline/index.js +0 -1
  332. package/build/components/ea-timeline/style/stylesheet.js +0 -1
  333. package/build/components/ea-timeline-item/index.js +0 -1
  334. package/build/components/ea-timeline-item/src/style/stylesheet.js +0 -1
  335. package/build/components/globalConfig.js +0 -1
  336. package/build/components/index.js +0 -1
  337. package/build/utils/Validator.js +0 -1
  338. package/build/utils/createElement.js +0 -1
  339. package/build/utils/handleDefaultAttrIsTrue.js +0 -1
  340. package/build/utils/handleTemplate.js +0 -1
  341. package/build/utils/setStyle.js +0 -1
  342. package/build/utils/timeout.js +0 -1
  343. package/components/Base.js +0 -75
  344. package/components/ea-alert/index.css +0 -91
  345. package/components/ea-alert/index.js +0 -210
  346. package/components/ea-alert/index.scss +0 -108
  347. package/components/ea-alert/src/style/stylesheet.js +0 -85
  348. package/components/ea-aside/index.css +0 -9
  349. package/components/ea-aside/index.js +0 -54
  350. package/components/ea-aside/index.scss +0 -12
  351. package/components/ea-avatar/index.css +0 -66
  352. package/components/ea-avatar/index.js +0 -156
  353. package/components/ea-avatar/index.scss +0 -59
  354. package/components/ea-avatar/src/assets/defaultAvatar.js +0 -12
  355. package/components/ea-avatar/src/assets/errorAvatar.js +0 -9
  356. package/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -18
  357. package/components/ea-avatar/src/style/stylesheet.js +0 -61
  358. package/components/ea-backtop/index.css +0 -27
  359. package/components/ea-backtop/index.js +0 -167
  360. package/components/ea-backtop/index.scss +0 -29
  361. package/components/ea-backtop/src/style/stylesheet.js +0 -21
  362. package/components/ea-badge/index.css +0 -49
  363. package/components/ea-badge/index.js +0 -103
  364. package/components/ea-badge/index.scss +0 -56
  365. package/components/ea-badge/src/style/stylesheet.js +0 -43
  366. package/components/ea-breadcrumb/index.css +0 -6
  367. package/components/ea-breadcrumb/index.js +0 -90
  368. package/components/ea-breadcrumb/index.scss +0 -7
  369. package/components/ea-breadcrumb/src/style/stylesheet.js +0 -8
  370. package/components/ea-breadcrumb-item/index.css +0 -10
  371. package/components/ea-breadcrumb-item/index.js +0 -23
  372. package/components/ea-breadcrumb-item/index.scss +0 -12
  373. package/components/ea-breadcrumb-item/src/style/style.js +0 -12
  374. package/components/ea-button/index.css +0 -206
  375. package/components/ea-button/index.js +0 -198
  376. package/components/ea-button/index.scss +0 -143
  377. package/components/ea-button/src/components/ButtonComm.js +0 -5
  378. package/components/ea-button/src/components/HrefComm.js +0 -5
  379. package/components/ea-button/src/style/stylesheet.js +0 -208
  380. package/components/ea-button-group/index.css +0 -16
  381. package/components/ea-button-group/index.js +0 -44
  382. package/components/ea-button-group/index.scss +0 -20
  383. package/components/ea-button-group/src/style/stylesheet.js +0 -18
  384. package/components/ea-calendar/index.css +0 -72
  385. package/components/ea-calendar/index.js +0 -298
  386. package/components/ea-calendar/index.scss +0 -106
  387. package/components/ea-calendar/src/style/stylesheet.js +0 -74
  388. package/components/ea-calendar/src/utils/createChangerElement.js +0 -10
  389. package/components/ea-calendar/src/utils/createThead.js +0 -18
  390. package/components/ea-calendar/src/utils/getDate.js +0 -11
  391. package/components/ea-calendar/src/utils/getUserWeekStart.js +0 -11
  392. package/components/ea-card/index.css +0 -25
  393. package/components/ea-card/index.js +0 -51
  394. package/components/ea-card/index.scss +0 -24
  395. package/components/ea-card/src/style/stylesheet.js +0 -19
  396. package/components/ea-carousel/index.css +0 -103
  397. package/components/ea-carousel/index.js +0 -222
  398. package/components/ea-carousel/index.scss +0 -140
  399. package/components/ea-carousel/src/style/stylesheet.js +0 -105
  400. package/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -9
  401. package/components/ea-carousel-item/index.css +0 -20
  402. package/components/ea-carousel-item/index.js +0 -23
  403. package/components/ea-carousel-item/index.scss +0 -26
  404. package/components/ea-carousel-item/src/style/stylesheet.js +0 -22
  405. package/components/ea-checkbox/index.css +0 -108
  406. package/components/ea-checkbox/index.js +0 -160
  407. package/components/ea-checkbox/index.scss +0 -141
  408. package/components/ea-checkbox/src/style/stylesheet.js +0 -110
  409. package/components/ea-checkbox-group/index.css +0 -6
  410. package/components/ea-checkbox-group/index.js +0 -120
  411. package/components/ea-checkbox-group/index.scss +0 -7
  412. package/components/ea-checkbox-group/src/style/stylesheet.js +0 -8
  413. package/components/ea-collapse/index.css +0 -0
  414. package/components/ea-collapse/index.js +0 -109
  415. package/components/ea-collapse/index.scss +0 -4
  416. package/components/ea-collapse-item/index.css +0 -31
  417. package/components/ea-collapse-item/index.js +0 -111
  418. package/components/ea-collapse-item/index.scss +0 -46
  419. package/components/ea-collapse-item/src/style/stylesheet.js +0 -33
  420. package/components/ea-container/index.css +0 -14
  421. package/components/ea-container/index.js +0 -85
  422. package/components/ea-container/index.scss +0 -18
  423. package/components/ea-date-picker/index.css +0 -17
  424. package/components/ea-date-picker/index.js +0 -191
  425. package/components/ea-date-picker/index.scss +0 -29
  426. package/components/ea-date-picker/src/style/stylesheet.js +0 -19
  427. package/components/ea-descriptions/index.css +0 -33
  428. package/components/ea-descriptions/index.js +0 -171
  429. package/components/ea-descriptions/index.scss +0 -45
  430. package/components/ea-descriptions/src/components/contentTemplate.js +0 -11
  431. package/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -6
  432. package/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -7
  433. package/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -7
  434. package/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -8
  435. package/components/ea-descriptions/src/style/stylesheet.js +0 -35
  436. package/components/ea-descriptions-item/index.css +0 -21
  437. package/components/ea-descriptions-item/index.js +0 -71
  438. package/components/ea-descriptions-item/index.scss +0 -29
  439. package/components/ea-descriptions-item/src/stylesheet.js +0 -23
  440. package/components/ea-drawer/index.css +0 -138
  441. package/components/ea-drawer/index.js +0 -251
  442. package/components/ea-drawer/index.scss +0 -208
  443. package/components/ea-drawer/src/style/stylesheet.js +0 -141
  444. package/components/ea-empty/index.css +0 -30
  445. package/components/ea-empty/index.js +0 -93
  446. package/components/ea-empty/index.scss +0 -30
  447. package/components/ea-empty/src/assets/emptyStatusSVG.js +0 -6
  448. package/components/ea-empty/src/style/stylesheet.js +0 -24
  449. package/components/ea-footer/index.css +0 -7
  450. package/components/ea-footer/index.js +0 -57
  451. package/components/ea-footer/index.scss +0 -10
  452. package/components/ea-form/index.css +0 -0
  453. package/components/ea-form/index.js +0 -121
  454. package/components/ea-form/index.scss +0 -0
  455. package/components/ea-form-item/index.css +0 -62
  456. package/components/ea-form-item/index.js +0 -152
  457. package/components/ea-form-item/index.scss +0 -83
  458. package/components/ea-form-item/src/style/stylesheet.js +0 -64
  459. package/components/ea-header/index.css +0 -7
  460. package/components/ea-header/index.js +0 -55
  461. package/components/ea-header/index.scss +0 -10
  462. package/components/ea-icon/config.json +0 -1030
  463. package/components/ea-icon/css/fontello.css +0 -312
  464. package/components/ea-icon/font/fontello.eot +0 -0
  465. package/components/ea-icon/font/fontello.svg +0 -350
  466. package/components/ea-icon/font/fontello.ttf +0 -0
  467. package/components/ea-icon/font/fontello.woff +0 -0
  468. package/components/ea-icon/font/fontello.woff2 +0 -0
  469. package/components/ea-icon/index.css +0 -1
  470. package/components/ea-icon/index.js +0 -84
  471. package/components/ea-image/index.css +0 -84
  472. package/components/ea-image/index.js +0 -182
  473. package/components/ea-image/index.scss +0 -111
  474. package/components/ea-image/src/assets/errorImage.js +0 -9
  475. package/components/ea-image/src/assets/errorImage.svg +0 -7
  476. package/components/ea-image/src/style/stylesheet.js +0 -86
  477. package/components/ea-image/src/utils/createPreviewTools.js +0 -140
  478. package/components/ea-infinite-scroll/index.css +0 -0
  479. package/components/ea-infinite-scroll/index.js +0 -119
  480. package/components/ea-infinite-scroll/index.scss +0 -0
  481. package/components/ea-infinite-scroll-item/index.css +0 -0
  482. package/components/ea-infinite-scroll-item/index.js +0 -18
  483. package/components/ea-infinite-scroll-item/index.scss +0 -0
  484. package/components/ea-input/index.css +0 -139
  485. package/components/ea-input/index.js +0 -398
  486. package/components/ea-input/index.scss +0 -178
  487. package/components/ea-input/src/components/createFixIcon.js +0 -108
  488. package/components/ea-input/src/components/createSuggestionBoard.js +0 -43
  489. package/components/ea-input/src/components/createWordLimitElement.js +0 -18
  490. package/components/ea-input/src/style/stylesheet.js +0 -141
  491. package/components/ea-input/src/utils/dispatchEvent.js +0 -9
  492. package/components/ea-input/src/utils/handleSearchResult.js +0 -9
  493. package/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -31
  494. package/components/ea-input-number/index.css +0 -120
  495. package/components/ea-input-number/index.js +0 -308
  496. package/components/ea-input-number/index.scss +0 -132
  497. package/components/ea-input-number/src/style/stylesheet.js +0 -122
  498. package/components/ea-input-number/src/utils/handleCustomEvent.js +0 -5
  499. package/components/ea-link/index.css +0 -48
  500. package/components/ea-link/index.js +0 -122
  501. package/components/ea-link/index.scss +0 -36
  502. package/components/ea-link/src/style/stylesheet.js +0 -50
  503. package/components/ea-loading/index.css +0 -38
  504. package/components/ea-loading/index.js +0 -166
  505. package/components/ea-loading/index.scss +0 -55
  506. package/components/ea-loading/src/style/stylesheet.js +0 -40
  507. package/components/ea-main/index.css +0 -8
  508. package/components/ea-main/index.js +0 -32
  509. package/components/ea-main/index.scss +0 -11
  510. package/components/ea-menu/index.css +0 -19
  511. package/components/ea-menu/index.js +0 -131
  512. package/components/ea-menu/index.scss +0 -22
  513. package/components/ea-menu/src/style/stylesheet.js +0 -21
  514. package/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -32
  515. package/components/ea-menu-item/index.css +0 -48
  516. package/components/ea-menu-item/index.js +0 -130
  517. package/components/ea-menu-item/index.scss +0 -62
  518. package/components/ea-menu-item/src/style/stylesheet.js +0 -50
  519. package/components/ea-menu-item-group/index.css +0 -42
  520. package/components/ea-menu-item-group/index.js +0 -130
  521. package/components/ea-menu-item-group/index.scss +0 -60
  522. package/components/ea-menu-item-group/src/style/stylesheet.js +0 -44
  523. package/components/ea-message/index.css +0 -47
  524. package/components/ea-message/index.js +0 -171
  525. package/components/ea-message/index.scss +0 -70
  526. package/components/ea-message/src/style/stylesheet.js +0 -48
  527. package/components/ea-message/src/utils/MessageClass.js +0 -67
  528. package/components/ea-message-box/index.css +0 -85
  529. package/components/ea-message-box/index.js +0 -211
  530. package/components/ea-message-box/index.scss +0 -113
  531. package/components/ea-message-box/src/style/stylesheet.js +0 -87
  532. package/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -60
  533. package/components/ea-option/index.css +0 -24
  534. package/components/ea-option/index.js +0 -74
  535. package/components/ea-option/index.scss +0 -31
  536. package/components/ea-option/src/style/stylesheet.js +0 -26
  537. package/components/ea-option-gropu/index.css +0 -6
  538. package/components/ea-option-gropu/index.js +0 -57
  539. package/components/ea-option-gropu/index.scss +0 -8
  540. package/components/ea-page-header/index.css +0 -33
  541. package/components/ea-page-header/index.js +0 -91
  542. package/components/ea-page-header/index.scss +0 -44
  543. package/components/ea-page-header/src/style/stylesheet.js +0 -35
  544. package/components/ea-pagination/index.css +0 -69
  545. package/components/ea-pagination/index.js +0 -305
  546. package/components/ea-pagination/index.scss +0 -89
  547. package/components/ea-pagination/src/components/getMoreItem.js +0 -20
  548. package/components/ea-pagination/src/components/getPageItem.js +0 -11
  549. package/components/ea-pagination/src/components/getShowTotalItem.js +0 -7
  550. package/components/ea-pagination/src/style/stylesheet.js +0 -71
  551. package/components/ea-pane/index.css +0 -6
  552. package/components/ea-pane/index.js +0 -52
  553. package/components/ea-pane/index.scss +0 -7
  554. package/components/ea-pane/src/stylesheet.js +0 -8
  555. package/components/ea-progress/index.css +0 -61
  556. package/components/ea-progress/index.js +0 -249
  557. package/components/ea-progress/index.scss +0 -74
  558. package/components/ea-progress/src/components/SVGComm.js +0 -18
  559. package/components/ea-progress/src/style/stylesheet.js +0 -55
  560. package/components/ea-radio/index.css +0 -82
  561. package/components/ea-radio/index.js +0 -137
  562. package/components/ea-radio/index.scss +0 -119
  563. package/components/ea-radio/src/style/stylesheet.js +0 -84
  564. package/components/ea-radio-group/index.css +0 -3
  565. package/components/ea-radio-group/index.js +0 -96
  566. package/components/ea-radio-group/index.scss +0 -3
  567. package/components/ea-rate/index.css +0 -44
  568. package/components/ea-rate/index.js +0 -243
  569. package/components/ea-rate/index.scss +0 -55
  570. package/components/ea-rate/src/components/rateComm.js +0 -20
  571. package/components/ea-rate/src/style/stylesheet.js +0 -45
  572. package/components/ea-result/index.css +0 -37
  573. package/components/ea-result/index.js +0 -109
  574. package/components/ea-result/index.scss +0 -46
  575. package/components/ea-result/src/style/stylesheet.js +0 -39
  576. package/components/ea-select/index.css +0 -47
  577. package/components/ea-select/index.js +0 -312
  578. package/components/ea-select/index.scss +0 -70
  579. package/components/ea-select/src/style/stylesheet.js +0 -49
  580. package/components/ea-skeleton/index.css +0 -12
  581. package/components/ea-skeleton/index.js +0 -148
  582. package/components/ea-skeleton/index.scss +0 -16
  583. package/components/ea-skeleton/src/style/stylesheet.js +0 -14
  584. package/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -7
  585. package/components/ea-skeleton-item/index.css +0 -69
  586. package/components/ea-skeleton-item/index.js +0 -82
  587. package/components/ea-skeleton-item/index.scss +0 -107
  588. package/components/ea-skeleton-item/src/assets/imageSVG.js +0 -8
  589. package/components/ea-skeleton-item/src/style/stylesheet.js +0 -71
  590. package/components/ea-step/index.css +0 -84
  591. package/components/ea-step/index.js +0 -230
  592. package/components/ea-step/index.scss +0 -110
  593. package/components/ea-step/src/style/stylesheet.js +0 -86
  594. package/components/ea-steps/index.css +0 -19
  595. package/components/ea-steps/index.js +0 -104
  596. package/components/ea-steps/index.scss +0 -23
  597. package/components/ea-steps/src/style/stylesheet.js +0 -21
  598. package/components/ea-submenu/index.css +0 -65
  599. package/components/ea-submenu/index.js +0 -141
  600. package/components/ea-submenu/index.scss +0 -88
  601. package/components/ea-submenu/src/style/stylesheet.js +0 -67
  602. package/components/ea-switch/index.css +0 -90
  603. package/components/ea-switch/index.js +0 -189
  604. package/components/ea-switch/index.scss +0 -117
  605. package/components/ea-switch/src/style/stylesheet.js +0 -92
  606. package/components/ea-tab/index.css +0 -68
  607. package/components/ea-tab/index.js +0 -138
  608. package/components/ea-tab/index.scss +0 -96
  609. package/components/ea-tab/src/style/stylesheet.js +0 -70
  610. package/components/ea-table/index.css +0 -98
  611. package/components/ea-table/index.js +0 -555
  612. package/components/ea-table/index.scss +0 -90
  613. package/components/ea-table/src/style/stylesheet.js +0 -100
  614. package/components/ea-table-column/index.css +0 -0
  615. package/components/ea-table-column/index.js +0 -164
  616. package/components/ea-table-column/index.scss +0 -0
  617. package/components/ea-tabs/index.css +0 -45
  618. package/components/ea-tabs/index.js +0 -245
  619. package/components/ea-tabs/index.scss +0 -64
  620. package/components/ea-tabs/src/style/stylesheet.js +0 -47
  621. package/components/ea-tag/index.css +0 -90
  622. package/components/ea-tag/index.js +0 -107
  623. package/components/ea-tag/index.scss +0 -71
  624. package/components/ea-tag/src/style/stylesheet.js +0 -92
  625. package/components/ea-textarea/index.css +0 -37
  626. package/components/ea-textarea/index.js +0 -277
  627. package/components/ea-textarea/index.scss +0 -48
  628. package/components/ea-textarea/src/style/stylesheet.js +0 -39
  629. package/components/ea-time-picker/index.css +0 -82
  630. package/components/ea-time-picker/index.js +0 -379
  631. package/components/ea-time-picker/index.scss +0 -110
  632. package/components/ea-time-picker/src/style/stylesheet.js +0 -84
  633. package/components/ea-timeline/index.css +0 -0
  634. package/components/ea-timeline/index.js +0 -74
  635. package/components/ea-timeline/index.scss +0 -1
  636. package/components/ea-timeline/style/stylesheet.js +0 -3
  637. package/components/ea-timeline-item/index.css +0 -79
  638. package/components/ea-timeline-item/index.js +0 -146
  639. package/components/ea-timeline-item/index.scss +0 -92
  640. package/components/ea-timeline-item/src/style/stylesheet.js +0 -81
  641. package/components/ea-ui-base-style.css +0 -0
  642. package/components/ea-ui-base-style.scss +0 -153
  643. package/components/globalConfig.js +0 -10
  644. package/components/index.js +0 -67
  645. package/public/logo.png +0 -0
  646. package/utils/Validator.js +0 -16
  647. package/utils/createElement.js +0 -30
  648. package/utils/handleDefaultAttrIsTrue.js +0 -11
  649. package/utils/handleTemplate.js +0 -19
  650. package/utils/setStyle.js +0 -8
  651. package/utils/timeout.js +0 -16
@@ -0,0 +1,888 @@
1
+ var Et = Object.defineProperty;
2
+ var ot = (n) => {
3
+ throw TypeError(n);
4
+ };
5
+ var xt = (n, h, e) => h in n ? Et(n, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[h] = e;
6
+ var D = (n, h, e) => xt(n, typeof h != "symbol" ? h + "" : h, e), tt = (n, h, e) => h.has(n) || ot("Cannot " + e);
7
+ var t = (n, h, e) => (tt(n, h, "read from private field"), e ? e.call(n) : h.get(n)), l = (n, h, e) => h.has(n) ? ot("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(n) : h.set(n, e), d = (n, h, e, a) => (tt(n, h, "write to private field"), a ? a.call(n, e) : h.set(n, e), e), i = (n, h, e) => (tt(n, h, "access private method"), e);
8
+ import { F as Mt } from "../core/FormBase.js";
9
+ import { n as rt } from "./ea-calendar2.js";
10
+ import { C as H } from "../utils/Color.js";
11
+ import { s as kt } from "../css/ea-color-picker.style.js";
12
+ import { E as $t } from "../utils/Variables.js";
13
+ import { B as At } from "./Base.js";
14
+ import { s as Rt } from "../css/ea-color-picker-panel.style.js";
15
+ import "./ea-input.js";
16
+ import { E as G } from "../utils/Utils.js";
17
+ import "./ea-popper.js";
18
+ import "./ea-button.js";
19
+ class Pt extends Event {
20
+ constructor(h) {
21
+ super("ea-active-change", {
22
+ bubbles: !0,
23
+ cancelable: !0,
24
+ composed: !0
25
+ }), this.detail = h;
26
+ }
27
+ }
28
+ class qt extends Event {
29
+ constructor(h) {
30
+ super("ea-invalid-color", {
31
+ bubbles: !0,
32
+ composed: !0
33
+ }), this.detail = h;
34
+ }
35
+ }
36
+ var W, x, M, $, P, A, J, q, L, f, B, m, v, s, o, lt, nt, ht, ct, et, I, ut, T, dt, pt, st, it, Z, vt, bt;
37
+ class Lt extends At {
38
+ constructor() {
39
+ super();
40
+ l(this, o);
41
+ /** @type {HTMLDivElement} */
42
+ l(this, W);
43
+ /** @type {HTMLDivElement} */
44
+ l(this, x);
45
+ /** @type {HTMLDivElement} */
46
+ l(this, M);
47
+ /** @type {HTMLDivElement} */
48
+ l(this, $);
49
+ /** @type {HTMLDivElement} */
50
+ l(this, P);
51
+ /** @type {HTMLDivElement} */
52
+ l(this, A);
53
+ /** @type {HTMLDivElement} */
54
+ l(this, J);
55
+ /** @type {HTMLDivElement} */
56
+ l(this, q);
57
+ /** @type {HTMLDivElement} */
58
+ l(this, L);
59
+ /** @type {HTMLInputElement} */
60
+ l(this, f);
61
+ /** @type {HTMLDivElement} */
62
+ l(this, B);
63
+ l(this, m, new AbortController());
64
+ l(this, v, {
65
+ /** @type {AbortController | null} 饱和度拖拽控制器 */
66
+ saturationMove: null,
67
+ /** @type {AbortController | null} 色调拖拽控制器 */
68
+ hueMove: null,
69
+ /** @type {AbortController | null} 透明度拖拽控制器 */
70
+ alphaMove: null
71
+ });
72
+ l(this, s, {
73
+ /** @type {boolean} 是否首次更新值 */
74
+ isFirstValueUpdate: !1,
75
+ /** @type {number} 色调值 (0-360) */
76
+ hue: 0,
77
+ /** @type {number} 饱和度值 (0-1) */
78
+ saturation: 1,
79
+ /** @type {number} 亮度值 (0-1) */
80
+ value: 1,
81
+ /** @type {number} 透明度值 (0-1) */
82
+ alpha: 1,
83
+ /** @type {import("@/utils/Color").Color} 当前颜色对象 */
84
+ color: new H(),
85
+ /** @type {boolean} 是否正在拖拽 */
86
+ isDragging: !1,
87
+ /** @type {string} 上一个验证通过的颜色值 */
88
+ lastValidValue: ""
89
+ });
90
+ D(this, "state", this.properties({
91
+ value: {
92
+ type: String,
93
+ default: "",
94
+ observer: (e) => {
95
+ t(this, s).lastValidValue = e, i(this, o, et).call(this), t(this, I).call(this), i(this, o, Z).call(this);
96
+ }
97
+ },
98
+ "color-format": {
99
+ type: ["hsl", "hsv", "hex", "rgb", "rgba"],
100
+ default: () => this.hasAttribute("show-alpha") ? "rgba" : "hex",
101
+ observer: (e) => {
102
+ this.value && (this.value = t(this, s).color.toString(e));
103
+ }
104
+ },
105
+ "show-alpha": {
106
+ type: Boolean,
107
+ default: !1,
108
+ observer: (e) => {
109
+ this.updateContainerClasslist();
110
+ }
111
+ },
112
+ disabled: {
113
+ type: Boolean,
114
+ default: !1,
115
+ observer: (e) => {
116
+ this.updateContainerClasslist();
117
+ }
118
+ },
119
+ border: {
120
+ type: Boolean,
121
+ default: !1,
122
+ observer: (e) => {
123
+ this.updateContainerClasslist();
124
+ }
125
+ },
126
+ clearable: {
127
+ type: Boolean,
128
+ default: !0,
129
+ observer: (e) => {
130
+ i(this, o, it).call(this);
131
+ }
132
+ }
133
+ }));
134
+ D(this, "propStates", this.properties({
135
+ predefine: {
136
+ props: !0,
137
+ type: Array,
138
+ default: [],
139
+ observer: (e) => {
140
+ i(this, o, dt).call(this, e);
141
+ }
142
+ }
143
+ }));
144
+ /**
145
+ * 更新饱和度面板的背景颜色
146
+ */
147
+ l(this, I, () => {
148
+ const e = new H({
149
+ h: t(this, s).hue,
150
+ s: 1,
151
+ v: 1,
152
+ a: 1
153
+ });
154
+ t(this, x).style.setProperty(
155
+ "--ea-color-picker-panel-background-color",
156
+ e.toString(this["color-format"])
157
+ );
158
+ });
159
+ this.stylesheet = Rt, this.$render();
160
+ }
161
+ static get observedAttributes() {
162
+ return [
163
+ ...super.observedAttributes,
164
+ "value",
165
+ "color-format",
166
+ "predefine",
167
+ "show-alpha",
168
+ "disabled",
169
+ "border",
170
+ "clearable"
171
+ ];
172
+ }
173
+ $render() {
174
+ const e = rt("color-picker-panel");
175
+ this.ns = e, this.shadowRoot.innerHTML = this.html(`
176
+ <div class="${e.b()}" part="container">
177
+ <div class="${e.e("wrapper")}" part="wrapper">
178
+ <div class="${e.e("svpanel")}" part="svpanel">
179
+ <div class="${e.e("cursor")} ${e.e("svpanel-cursor")}" part="svpanel-cursor"></div>
180
+ </div>
181
+ <div class="${e.e("hue-slider")} ${e.m("vertical")}" part="hue-slider">
182
+ <div class="${e.e("thumb")} ${e.e("hue-slider-thumb")}" part="hue-slider-thumb"></div>
183
+ </div>
184
+ </div>
185
+ <div class="${e.e("alpha-slider")}" part="alpha-slider">
186
+ <div class="${e.e("thumb")} ${e.e("alpha-slider-thumb")}" part="alpha-slider-thumb"></div>
187
+ </div>
188
+ <div class="${e.e("predefine")}" part="predefine">
189
+ <div class="${e.e("colors")}" part="predefine-colors"></div>
190
+ </div>
191
+ <div class="${e.e("footer")}" part="footer">
192
+ <div class="${e.e("text-display")}" part="text-display"></div>
193
+ <ea-input class="${e.e("color-input")}" part="color-input" type="text" size="small"></ea-input>
194
+ <section class="${e.e("append")}" part="append">
195
+ <slot name="footer"></slot>
196
+ </section>
197
+ </div>
198
+ </div>
199
+ `), d(this, W, this.shadowRoot.querySelector(e.cb())), d(this, x, this.shadowRoot.querySelector(e.ce("svpanel"))), d(this, M, this.shadowRoot.querySelector(
200
+ e.ce("svpanel-cursor")
201
+ )), d(this, $, this.shadowRoot.querySelector(e.ce("hue-slider"))), d(this, P, this.shadowRoot.querySelector(e.ce("hue-slider-thumb"))), d(this, A, this.shadowRoot.querySelector(e.ce("alpha-slider"))), d(this, J, this.shadowRoot.querySelector(
202
+ e.ce("alpha-slider-bar")
203
+ )), d(this, q, this.shadowRoot.querySelector(
204
+ e.ce("alpha-slider-thumb")
205
+ )), d(this, L, this.shadowRoot.querySelector(e.ce("predefine"))), d(this, f, this.shadowRoot.querySelector(e.ce("color-input"))), d(this, B, this.shadowRoot.querySelector(e.ce("text-display"))), this.updateContainerClasslist(), i(this, o, it).call(this);
206
+ }
207
+ connectedCallback() {
208
+ var e;
209
+ super.connectedCallback(), (e = t(this, m)) == null || e.abort(), d(this, m, new AbortController()), i(this, o, lt).call(this);
210
+ }
211
+ /**
212
+ * 获取 classlist 列表
213
+ * @return {string} 属性值
214
+ */
215
+ updateContainerClasslist() {
216
+ const e = this.computedClasslist(
217
+ this.ns.b("container"),
218
+ {},
219
+ {
220
+ disabled: this.disabled,
221
+ border: this.border,
222
+ "show-alpha": this["show-alpha"],
223
+ clearable: this.clearable
224
+ }
225
+ );
226
+ return t(this, W).className = e, e;
227
+ }
228
+ $beforeUnmounted() {
229
+ var e;
230
+ (e = t(this, m)) == null || e.abort();
231
+ }
232
+ }
233
+ W = new WeakMap(), x = new WeakMap(), M = new WeakMap(), $ = new WeakMap(), P = new WeakMap(), A = new WeakMap(), J = new WeakMap(), q = new WeakMap(), L = new WeakMap(), f = new WeakMap(), B = new WeakMap(), m = new WeakMap(), v = new WeakMap(), s = new WeakMap(), o = new WeakSet(), /**
234
+ * 绑定组件事件监听器
235
+ */
236
+ lt = function() {
237
+ t(this, x).addEventListener(
238
+ "mousedown",
239
+ i(this, o, nt).bind(this),
240
+ {
241
+ signal: t(this, m).signal
242
+ }
243
+ ), t(this, $).addEventListener("mousedown", i(this, o, ht).bind(this), {
244
+ signal: t(this, m).signal
245
+ }), t(this, A).addEventListener(
246
+ "mousedown",
247
+ i(this, o, ct).bind(this),
248
+ {
249
+ signal: t(this, m).signal
250
+ }
251
+ ), t(this, f).addEventListener(
252
+ "change",
253
+ i(this, o, ut).bind(this),
254
+ {
255
+ signal: t(this, m).signal
256
+ }
257
+ ), t(this, f).addEventListener(
258
+ "blur",
259
+ i(this, o, vt).bind(this),
260
+ {
261
+ signal: t(this, m).signal
262
+ }
263
+ ), t(this, L) && t(this, L).addEventListener(
264
+ "click",
265
+ i(this, o, pt).bind(this),
266
+ {
267
+ signal: t(this, m).signal
268
+ }
269
+ );
270
+ }, /**
271
+ * 处理饱和度和值的更新
272
+ * @param {MouseEvent} e - 鼠标事件对象
273
+ */
274
+ nt = function(e) {
275
+ var c, b;
276
+ if ((c = t(this, v).saturationMove) == null || c.abort(), (b = t(this, v).hueMove) == null || b.abort(), this.disabled) return;
277
+ e.preventDefault(), t(this, v).saturationMove = new AbortController(), t(this, s).isDragging = !0;
278
+ const a = (u) => {
279
+ const p = t(this, x).getBoundingClientRect(), V = Math.max(0, Math.min(u.clientX - p.left, p.width)), E = Math.max(0, Math.min(u.clientY - p.top, p.height)), C = V / p.width, Q = 1 - E / p.height;
280
+ t(this, s).saturation = C, t(this, s).value = Q, t(this, s).color.setValue({
281
+ h: t(this, s).hue,
282
+ s: C,
283
+ v: Q,
284
+ a: t(this, s).alpha
285
+ }), this.value = t(this, s).color.toString(this["color-format"]), i(this, o, T).call(this), t(this, M).style.left = C * p.width + "px", t(this, M).style.top = (1 - Q) * p.height + "px";
286
+ };
287
+ a(e), window.addEventListener("mousemove", a, {
288
+ signal: t(this, v).saturationMove.signal
289
+ }), window.addEventListener(
290
+ "mouseup",
291
+ () => {
292
+ var u;
293
+ (u = t(this, v).saturationMove) == null || u.abort(), t(this, s).isDragging = !1;
294
+ },
295
+ {
296
+ signal: t(this, v).saturationMove.signal
297
+ }
298
+ );
299
+ }, /**
300
+ * 处理色调的更新
301
+ * @param {MouseEvent} e - 鼠标事件对象
302
+ */
303
+ ht = function(e) {
304
+ var c, b;
305
+ if ((c = t(this, v).hueMove) == null || c.abort(), (b = t(this, v).saturationMove) == null || b.abort(), this.disabled) return;
306
+ e.preventDefault(), t(this, v).hueMove = new AbortController(), t(this, s).isDragging = !0;
307
+ const a = (u) => {
308
+ const p = t(this, $).getBoundingClientRect(), E = (1 - Math.max(0.01, Math.min(u.clientY - p.top, p.height)) / p.height) * 360;
309
+ t(this, s).hue = E, t(this, s).color.setValue({
310
+ h: E,
311
+ s: t(this, s).saturation,
312
+ v: t(this, s).value,
313
+ a: t(this, s).alpha
314
+ }), this.value = t(this, s).color.toString(this["color-format"]), i(this, o, T).call(this), t(this, P).style.top = (1 - E / 360) * p.height + "px", t(this, I).call(this);
315
+ };
316
+ a(e), window.addEventListener("mousemove", a, {
317
+ signal: t(this, v).hueMove.signal
318
+ }), window.addEventListener(
319
+ "mouseup",
320
+ () => {
321
+ var u;
322
+ (u = t(this, v).hueMove) == null || u.abort(), t(this, s).isDragging = !1;
323
+ },
324
+ {
325
+ signal: t(this, v).hueMove.signal
326
+ }
327
+ );
328
+ }, /**
329
+ * 处理透明度的更新
330
+ * @param {MouseEvent} e - 鼠标事件对象
331
+ */
332
+ ct = function(e) {
333
+ var c, b, u;
334
+ if ((c = t(this, v).alphaMove) == null || c.abort(), (b = t(this, v).saturationMove) == null || b.abort(), (u = t(this, v).hueMove) == null || u.abort(), this.disabled) return;
335
+ e.preventDefault(), t(this, v).alphaMove = new AbortController(), t(this, s).isDragging = !0;
336
+ const a = (p) => {
337
+ const V = t(this, A).getBoundingClientRect(), E = Math.max(0, Math.min(p.clientX - V.left, V.width)), C = Number((E / V.width).toFixed(2));
338
+ Math.abs(t(this, s).alpha - C) > 1e-3 && (t(this, s).alpha = C, t(this, s).color.setValue({
339
+ h: t(this, s).hue,
340
+ s: t(this, s).saturation,
341
+ v: t(this, s).value,
342
+ a: C
343
+ }), this.value = t(this, s).color.toString(this["color-format"]), i(this, o, T).call(this), t(this, q).style.left = C * V.width + "px");
344
+ };
345
+ a(e), window.addEventListener("mousemove", a, {
346
+ signal: t(this, v).alphaMove.signal
347
+ }), window.addEventListener(
348
+ "mouseup",
349
+ () => {
350
+ var p;
351
+ (p = t(this, v).alphaMove) == null || p.abort(), t(this, s).isDragging = !1;
352
+ },
353
+ {
354
+ signal: t(this, v).alphaMove.signal
355
+ }
356
+ );
357
+ }, /**
358
+ * 更新光标位置
359
+ */
360
+ et = function() {
361
+ if (!t(this, s).isFirstValueUpdate) {
362
+ t(this, s).color.setValue(this.value);
363
+ const e = t(this, s).color.hsvStrToHsvObject(
364
+ t(this, s).color.toHsv(!0)
365
+ );
366
+ if (e) {
367
+ const a = parseInt(e.h), c = e.s, b = e.v, u = e.a ? parseFloat(e.a) : 1;
368
+ t(this, s).hue = a, t(this, s).saturation = c, t(this, s).value = b, t(this, s).alpha = u;
369
+ }
370
+ t(this, s).isFirstValueUpdate = !0;
371
+ }
372
+ if (t(this, M) && t(this, x)) {
373
+ const e = t(this, s).saturation, a = t(this, s).value, c = t(this, x).getBoundingClientRect(), b = G.CSS.px2num(
374
+ this.style.getPropertyValue("--ea-color-picker-panel-svpanel-width")
375
+ ) || 280, u = G.CSS.px2num(
376
+ this.style.getPropertyValue("--ea-color-picker-panel-svpanel-height")
377
+ ) || 180, p = Math.max(
378
+ 0,
379
+ Math.min(c.width, b),
380
+ b
381
+ ), V = Math.max(
382
+ 0,
383
+ Math.min(c.height, u),
384
+ u
385
+ ), E = e * p, C = (1 - a) * V;
386
+ t(this, M).style.left = E + "px", t(this, M).style.top = C + "px";
387
+ }
388
+ if (t(this, P) && t(this, $)) {
389
+ const e = t(this, s).hue, a = t(this, $).getBoundingClientRect(), c = G.CSS.px2num(
390
+ this.style.getPropertyValue(
391
+ "--ea-color-picker-panel-hue-slider-height"
392
+ )
393
+ ) || 180, b = Math.max(0, Math.min(a.height, c), c), u = (1 - e / 360) * b;
394
+ t(this, P).style.top = u + "px";
395
+ }
396
+ if (t(this, q) && t(this, A)) {
397
+ const e = t(this, s).alpha, a = t(this, A).getBoundingClientRect(), c = G.CSS.px2num(
398
+ this.style.getPropertyValue(
399
+ "--ea-color-picker-panel-alpha-slider-width"
400
+ )
401
+ ) || 280, b = Math.max(0, Math.min(a.width, c), c), u = e * b;
402
+ t(this, q).style.left = u + "px";
403
+ }
404
+ }, I = new WeakMap(), /**
405
+ * 处理颜色输入框变化事件
406
+ * @param {Event} e - 事件对象
407
+ */
408
+ ut = function(e) {
409
+ const a = e.target.value;
410
+ try {
411
+ const c = new H(a);
412
+ this.value = c.toString(this["color-format"]), i(this, o, T).call(this);
413
+ } catch {
414
+ t(this, f).value = this.value;
415
+ }
416
+ }, /**
417
+ * 触发颜色变化事件
418
+ */
419
+ T = function() {
420
+ this.dispatchEvent(
421
+ new CustomEvent("change", {
422
+ detail: {
423
+ value: this.value,
424
+ color: t(this, s).color
425
+ },
426
+ bubbles: !0,
427
+ composed: !0
428
+ })
429
+ ), this.dispatchEvent(
430
+ new Pt({ value: this.value })
431
+ );
432
+ }, /**
433
+ * 渲染预设颜色列表
434
+ * @param {Array} list - 预设颜色列表
435
+ */
436
+ dt = function(e) {
437
+ !e || e.length === 0 || (t(this, L).innerHTML = this.html(
438
+ e.map(
439
+ (a) => `
440
+ <div class="${this.ns.e("predefine-color")}"
441
+ part="predefine-color"
442
+ style="background-color: ${a}"
443
+ data-color="${a}"
444
+ ></div>
445
+ `
446
+ ).join("")
447
+ ));
448
+ }, /**
449
+ * 处理预设颜色点击事件
450
+ * @param {MouseEvent} e - 鼠标事件对象
451
+ */
452
+ pt = function(e) {
453
+ if (this.disabled) return;
454
+ const a = e.target.closest(this.ns.ce("predefine-color"));
455
+ if (!a) return;
456
+ const c = a.getAttribute("data-color");
457
+ c && i(this, o, st).call(this, c);
458
+ }, /**
459
+ * 根据颜色值更新所有相关状态
460
+ * @param {string} colorValue - 颜色值字符串
461
+ */
462
+ st = function(e) {
463
+ i(this, o, Z).call(this), this.value = e, t(this, s).color.setValue(e);
464
+ const a = t(this, s).color.hsvStrToHsvObject(
465
+ t(this, s).color.toHsv(!0)
466
+ );
467
+ if (a) {
468
+ const c = parseInt(a.h), b = a.s, u = a.v, p = a.a ? parseFloat(a.a) : 1;
469
+ t(this, s).hue = c, t(this, s).saturation = b, t(this, s).value = u, t(this, s).alpha = p;
470
+ }
471
+ i(this, o, et).call(this), t(this, I).call(this), i(this, o, T).call(this);
472
+ }, /**
473
+ * 更新文字展示模式
474
+ */
475
+ it = function() {
476
+ !t(this, f) || !t(this, B) || (i(this, o, Z).call(this), this.updateContainerClasslist());
477
+ }, /**
478
+ * 更新颜色输入框的值
479
+ */
480
+ Z = function() {
481
+ this.clearable && t(this, f) ? t(this, f).setAttribute("value", this.value) : !this.clearable && t(this, B) && (t(this, B).textContent = this.value);
482
+ }, /**
483
+ * 处理颜色输入框blur事件
484
+ * @param {FocusEvent} e - 焦点事件对象
485
+ */
486
+ vt = function(e) {
487
+ if (!t(this, f)) return;
488
+ const a = t(this, f).getAttribute("value") || "";
489
+ if (!a) {
490
+ this.value = "", t(this, s).lastValidValue = "";
491
+ return;
492
+ }
493
+ i(this, o, bt).call(this, a) ? (t(this, s).lastValidValue = a, i(this, o, st).call(this, a)) : (t(this, f).setAttribute("value", t(this, s).lastValidValue || ""), this.dispatchEvent(
494
+ new qt({ value: a })
495
+ ));
496
+ }, /**
497
+ * 验证颜色格式是否合法
498
+ * @param {string} colorValue - 颜色值
499
+ * @returns {boolean} 是否合法
500
+ */
501
+ bt = function(e) {
502
+ return H.isValidColor(e);
503
+ };
504
+ customElements.get("ea-color-picker-panel") || customElements.define("ea-color-picker-panel", Lt);
505
+ class Bt extends Event {
506
+ constructor() {
507
+ super("ea-clear", { bubbles: !0, composed: !0 });
508
+ }
509
+ }
510
+ var k, w, F, K, R, U, S, X, Y, _, y, g, N, r, gt, ft, mt, wt, yt, Ct, at, O, z, j, St, Vt;
511
+ class Dt extends Mt {
512
+ constructor() {
513
+ super();
514
+ l(this, r);
515
+ /** @type {HTMLDivElement} */
516
+ l(this, k);
517
+ /** @type {import("@/common/ea-popper").EaPopper} */
518
+ l(this, w);
519
+ /** @type {HTMLDivElement} */
520
+ l(this, F);
521
+ /** @type {HTMLDivElement} */
522
+ l(this, K);
523
+ /** @type {HTMLDivElement} */
524
+ l(this, R);
525
+ /** @type {import("@/components/ea-icon").EaIcon} */
526
+ l(this, U);
527
+ /** @type {import("@/components/ea-color-picker-panel").EaColorPickerPanel} */
528
+ l(this, S);
529
+ /** @type {HTMLLabelElement} */
530
+ l(this, X);
531
+ /** @type {import("@/components/ea-button").EaButton} */
532
+ l(this, Y);
533
+ /** @type {import("@/components/ea-button").EaButton} */
534
+ l(this, _);
535
+ l(this, y, new AbortController());
536
+ l(this, g, {
537
+ /** @type {boolean} 弹窗是否打开 */
538
+ isOpen: !1,
539
+ /** @type {import("@/utils/Color").Color} 当前颜色对象 */
540
+ color: new H(),
541
+ isPanelDefined: !1,
542
+ /** @type {string} 打开面板前的颜色值 */
543
+ previousValue: ""
544
+ });
545
+ l(this, N, {
546
+ /** @type {AbortController | null} 关闭弹窗的控制器 */
547
+ close: null
548
+ });
549
+ D(this, "state", this.properties({
550
+ label: {
551
+ type: String,
552
+ default: "",
553
+ observer: async (e) => {
554
+ t(this, X).textContent = e;
555
+ }
556
+ },
557
+ value: {
558
+ type: String,
559
+ default: "",
560
+ observer: (e) => {
561
+ i(this, r, z).call(this), i(this, r, j).call(this, e), t(this, S).setAttribute("value", e);
562
+ }
563
+ },
564
+ disabled: {
565
+ type: Boolean,
566
+ default: !1,
567
+ observer: (e) => {
568
+ this.updateContainerClasslist();
569
+ }
570
+ },
571
+ clearable: {
572
+ type: Boolean,
573
+ default: !1,
574
+ observer: (e) => {
575
+ this.updateContainerClasslist();
576
+ }
577
+ },
578
+ size: {
579
+ type: $t,
580
+ default: "",
581
+ observer: (e) => {
582
+ this.updateContainerClasslist();
583
+ }
584
+ },
585
+ "color-format": {
586
+ type: ["hsl", "hsv", "hex", "rgb"],
587
+ default: "hex",
588
+ observer: (e) => {
589
+ t(this, S).setAttribute("color-format", e);
590
+ }
591
+ },
592
+ "show-alpha": {
593
+ type: Boolean,
594
+ default: !1,
595
+ observer: (e) => {
596
+ t(this, S).setAttribute("show-alpha", e);
597
+ }
598
+ },
599
+ clearable: {
600
+ type: Boolean,
601
+ default: !0,
602
+ observer: (e) => {
603
+ t(this, S).setAttribute("clearable", e);
604
+ }
605
+ },
606
+ tabindex: {
607
+ type: Number,
608
+ default: 0,
609
+ observer: (e) => {
610
+ }
611
+ },
612
+ required: {
613
+ type: Boolean,
614
+ default: !1
615
+ }
616
+ }));
617
+ D(this, "propState", this.properties({
618
+ predefine: {
619
+ props: !0,
620
+ type: Array,
621
+ default: [],
622
+ observer: async (e) => {
623
+ t(this, g).isPanelDefined || (await customElements.whenDefined("ea-color-picker-panel"), t(this, g).isPanelDefined = !0), t(this, S).predefine = e;
624
+ }
625
+ }
626
+ }));
627
+ D(this, "popperState", this.properties({
628
+ placement: {
629
+ type: [
630
+ "top",
631
+ "top-start",
632
+ "top-end",
633
+ "bottom",
634
+ "bottom-start",
635
+ "bottom-end",
636
+ "left",
637
+ "left-start",
638
+ "left-end",
639
+ "right",
640
+ "right-start",
641
+ "right-end"
642
+ ],
643
+ default: "bottom",
644
+ observer: (e) => {
645
+ t(this, w).setAttribute("placement", e);
646
+ }
647
+ }
648
+ }));
649
+ this.stylesheet = kt, this.$render();
650
+ }
651
+ static get observedAttributes() {
652
+ return [
653
+ ...super.observedAttributes,
654
+ "label",
655
+ "value",
656
+ "disabled",
657
+ "clearable",
658
+ "size",
659
+ "color-format",
660
+ "predefine",
661
+ "tabindex",
662
+ "placement",
663
+ "show-alpha",
664
+ "required"
665
+ ];
666
+ }
667
+ $render() {
668
+ const e = rt("color-picker");
669
+ this.ns = e, this.shadowRoot.innerHTML = this.html(`
670
+ <label class="${e.e("form-label")}" part="form-label"></label>
671
+ <div class="${e.b("container")}" part="container" tabindex="${this.tabindex}">
672
+ <ea-popper
673
+ class="${e.e("popper")}"
674
+ part="popper"
675
+ show-arrow="false"
676
+ >
677
+ <div class="${e.e("trigger")}" part="trigger" slot="reference">
678
+ <div class="${e.e("outer")}" part="outer">
679
+ <div class="${e.e("inner")}" part="inner"></div>
680
+ </div>
681
+ <div class="${e.e("icon-wrapper")}" part="icon-wrapper">
682
+ <ea-icon class="${e.e("icon", "status")}" part="status-icon" icon="icon-cancel"></ea-icon>
683
+ </div>
684
+ </div>
685
+ <ea-color-picker-panel class="${e.e("panel")}" part="panel">
686
+ <div slot="footer" class="${e.e("footer-actions")}" part="footer-actions">
687
+ <ea-button class="${e.e("clear-btn")}" part="clear-btn" plain text>clear</ea-button>
688
+ <ea-button class="${e.e("confirm-btn")}" part="confirm-btn" plain>ok</ea-button>
689
+ </div>
690
+ </ea-color-picker-panel>
691
+ </ea-popper>
692
+ </div>
693
+ `), d(this, X, this.shadowRoot.querySelector(e.ce("form-label"))), d(this, k, this.shadowRoot.querySelector(e.cb())), d(this, w, this.shadowRoot.querySelector(e.ce("popper"))), d(this, F, this.shadowRoot.querySelector(e.ce("trigger"))), d(this, K, this.shadowRoot.querySelector(e.ce("outer"))), d(this, R, this.shadowRoot.querySelector(e.ce("inner"))), d(this, U, this.shadowRoot.querySelector(e.ce("icon", "status"))), d(this, S, this.shadowRoot.querySelector(e.ce("panel"))), d(this, Y, this.shadowRoot.querySelector(this.ns.ce("clear-btn"))), d(this, _, this.shadowRoot.querySelector(this.ns.ce("confirm-btn"))), this.updateContainerClasslist();
694
+ }
695
+ connectedCallback() {
696
+ var e;
697
+ super.connectedCallback(), (e = t(this, y)) == null || e.abort(), d(this, y, new AbortController()), i(this, r, gt).call(this);
698
+ }
699
+ /**
700
+ * 获取 classlist 列表
701
+ * @return {string} 属性值
702
+ */
703
+ updateContainerClasslist() {
704
+ const e = this.computedClasslist(
705
+ this.ns.b("container"),
706
+ {
707
+ ["--" + this.size]: this.size
708
+ },
709
+ {
710
+ "has-value": this.value,
711
+ disabled: this.disabled
712
+ }
713
+ );
714
+ return t(this, k).className = e, e;
715
+ }
716
+ $beforeUnmounted() {
717
+ var e;
718
+ (e = t(this, y)) == null || e.abort();
719
+ }
720
+ /**
721
+ * 手动显示颜色选择器面板
722
+ */
723
+ show() {
724
+ i(this, r, at).call(this);
725
+ }
726
+ /**
727
+ * 手动隐藏颜色选择器面板
728
+ */
729
+ hide() {
730
+ i(this, r, O).call(this);
731
+ }
732
+ /**
733
+ * 使颜色选择器获得焦点
734
+ */
735
+ focus() {
736
+ t(this, k) && t(this, k).focus();
737
+ }
738
+ /**
739
+ * 使颜色选择器失去焦点
740
+ */
741
+ blur() {
742
+ t(this, k) && t(this, k).blur();
743
+ }
744
+ /**
745
+ * 获取验证目标元素
746
+ * @returns {HTMLElement}
747
+ */
748
+ get validationTarget() {
749
+ return this;
750
+ }
751
+ /**
752
+ * 更新表单验证状态
753
+ */
754
+ updateValidity() {
755
+ this.required && !this.value ? this.internals.setValidity(
756
+ { valueMissing: !0 },
757
+ "请选择一个颜色",
758
+ this
759
+ ) : this.internals.setValidity({}, "", this);
760
+ }
761
+ /**
762
+ * 检查表单字段的有效性
763
+ * @returns {boolean} 如果字段有效返回 true,否则返回 false
764
+ */
765
+ checkValidity() {
766
+ return this.updateValidity(), this.internals.checkValidity();
767
+ }
768
+ /**
769
+ * 报告表单字段的有效性(显示验证提示)
770
+ * @returns {boolean} 如果字段有效返回 true,否则返回 false
771
+ */
772
+ reportValidity() {
773
+ return this.updateValidity(), this.internals.reportValidity();
774
+ }
775
+ }
776
+ k = new WeakMap(), w = new WeakMap(), F = new WeakMap(), K = new WeakMap(), R = new WeakMap(), U = new WeakMap(), S = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), _ = new WeakMap(), y = new WeakMap(), g = new WeakMap(), N = new WeakMap(), r = new WeakSet(), /**
777
+ * 绑定组件事件监听器
778
+ */
779
+ gt = function() {
780
+ !t(this, F) || !t(this, w) || (t(this, F).addEventListener("click", i(this, r, ft).bind(this), {
781
+ signal: t(this, y).signal
782
+ }), t(this, w).addEventListener("show", i(this, r, mt).bind(this), {
783
+ signal: t(this, y).signal
784
+ }), t(this, w).addEventListener("hide", i(this, r, wt).bind(this), {
785
+ signal: t(this, y).signal
786
+ }), t(this, S).addEventListener("change", i(this, r, yt).bind(this), {
787
+ signal: t(this, y).signal
788
+ }), t(this, Y).addEventListener("click", i(this, r, St).bind(this), {
789
+ signal: t(this, y).signal
790
+ }), t(this, _).addEventListener(
791
+ "click",
792
+ i(this, r, Vt).bind(this),
793
+ {
794
+ signal: t(this, y).signal
795
+ }
796
+ ));
797
+ }, /**
798
+ * 处理触发器点击事件
799
+ * @param {MouseEvent} e - 鼠标事件对象
800
+ */
801
+ ft = function(e) {
802
+ var a;
803
+ this.disabled || ((a = t(this, N).close) == null || a.abort(), t(this, N).close = new AbortController(), t(this, g).previousValue = this.value, i(this, r, at).call(this), document.addEventListener("click", i(this, r, Ct).bind(this), {
804
+ signal: t(this, N).close.signal
805
+ }));
806
+ }, /**
807
+ * 处理弹窗显示事件
808
+ */
809
+ mt = function() {
810
+ t(this, g).isOpen = !0, this.updateContainerClasslist();
811
+ }, /**
812
+ * 处理弹窗隐藏事件
813
+ */
814
+ wt = function() {
815
+ t(this, g).isOpen = !1, this.updateContainerClasslist(), t(this, g).previousValue !== void 0 && t(this, g).previousValue !== this.value && (this.value = t(this, g).previousValue, i(this, r, z).call(this), i(this, r, j).call(this));
816
+ }, /**
817
+ * 处理面板颜色变化事件
818
+ * @param {CustomEvent} e - 自定义事件对象
819
+ */
820
+ yt = function(e) {
821
+ const { value: a } = e.detail;
822
+ this.value = a, i(this, r, z).call(this), i(this, r, j).call(this);
823
+ }, /**
824
+ * 处理文档点击事件(用于关闭弹窗)
825
+ * @param {MouseEvent} e - 鼠标事件对象
826
+ */
827
+ Ct = function(e) {
828
+ t(this, g).isOpen && (!this.contains(e.target) || e.target !== this) && i(this, r, O).call(this);
829
+ }, /**
830
+ * 显示颜色选择器弹窗
831
+ */
832
+ at = function() {
833
+ t(this, w) && t(this, w).show();
834
+ }, /**
835
+ * 隐藏颜色选择器弹窗
836
+ */
837
+ O = function() {
838
+ t(this, w) && t(this, w).hide();
839
+ }, /**
840
+ * 更新触发元素的背景颜色
841
+ */
842
+ z = function() {
843
+ if (t(this, R)) {
844
+ if (!this.value) {
845
+ t(this, R).style.setProperty(
846
+ "--ea-color-picker-inner-background-color",
847
+ "transparent"
848
+ );
849
+ return;
850
+ }
851
+ try {
852
+ const e = new H(this.value);
853
+ t(this, R).style.setProperty(
854
+ "--ea-color-picker-inner-background-color",
855
+ e.toRgb(!0)
856
+ );
857
+ } catch {
858
+ t(this, R).style.setProperty(
859
+ "--ea-color-picker-inner-background-color",
860
+ "transparent"
861
+ );
862
+ }
863
+ }
864
+ }, /**
865
+ * 更新状态图标
866
+ * @param {string} colorValue - 颜色值
867
+ */
868
+ j = function(e = this.value) {
869
+ t(this, U) && t(this, U).setAttribute(
870
+ "icon",
871
+ e ? "icon-angle-down" : "icon-cancel"
872
+ );
873
+ }, /**
874
+ * 处理清除按钮点击事件
875
+ */
876
+ St = function() {
877
+ this.value = "", i(this, r, z).call(this), i(this, r, j).call(this), this.emit("change", { detail: { value: "" } }), this.dispatchEvent(new Bt()), t(this, g).previousValue = "", i(this, r, O).call(this);
878
+ }, /**
879
+ * 处理确认按钮点击事件
880
+ */
881
+ Vt = function() {
882
+ t(this, g).previousValue = this.value, i(this, r, O).call(this);
883
+ };
884
+ customElements.get("ea-color-picker") || customElements.define("ea-color-picker", Dt);
885
+ export {
886
+ Dt as EaColorPicker,
887
+ Lt as EaColorPickerPanel
888
+ };