@qynpm/ui 1.0.44 → 1.0.46

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 (264) hide show
  1. package/README.md +9 -2
  2. package/dist/index.cjs +20 -13
  3. package/dist/index.mjs +268 -102
  4. package/dist/qy-action-bar/index.cjs +3 -1
  5. package/dist/qy-action-bar/index.mjs +7 -2
  6. package/dist/qy-autocomplete/index.cjs +1 -1
  7. package/dist/qy-autocomplete/index.mjs +1 -1
  8. package/dist/qy-button/index.cjs +1 -1
  9. package/dist/qy-button/index.mjs +1 -1
  10. package/dist/qy-cascader/index.cjs +1 -1
  11. package/dist/qy-cascader/index.mjs +1 -1
  12. package/dist/qy-checkbox/index.cjs +1 -1
  13. package/dist/qy-checkbox/index.mjs +1 -1
  14. package/dist/qy-checkbox-group/index.cjs +1 -1
  15. package/dist/qy-checkbox-group/index.mjs +1 -1
  16. package/dist/qy-collapse/index.cjs +1 -1
  17. package/dist/qy-collapse/index.mjs +1 -1
  18. package/dist/qy-color-picker/index.cjs +1 -1
  19. package/dist/qy-color-picker/index.mjs +1 -1
  20. package/dist/qy-date-picker/index.cjs +1 -1
  21. package/dist/qy-date-picker/index.mjs +1 -1
  22. package/dist/qy-dialog/index.cjs +3 -2
  23. package/dist/qy-dialog/index.mjs +7 -5
  24. package/dist/qy-drawer/index.cjs +1 -1
  25. package/dist/qy-drawer/index.mjs +1 -1
  26. package/dist/qy-dropdown/index.cjs +2 -2
  27. package/dist/qy-dropdown/index.mjs +2 -2
  28. package/dist/qy-file-picker/index.cjs +1 -1
  29. package/dist/qy-file-picker/index.mjs +1 -1
  30. package/dist/qy-form-section/index.cjs +3 -1
  31. package/dist/qy-form-section/index.mjs +7 -2
  32. package/dist/qy-fullscreen/index.cjs +1 -1
  33. package/dist/qy-fullscreen/index.mjs +1 -1
  34. package/dist/qy-icon/index.cjs +1 -1
  35. package/dist/qy-icon/index.mjs +2 -2
  36. package/dist/qy-icon-picker/index.cjs +1 -1
  37. package/dist/qy-icon-picker/index.mjs +1 -1
  38. package/dist/qy-iframe/index.cjs +1 -1
  39. package/dist/qy-iframe/index.mjs +1 -1
  40. package/dist/qy-image/index.cjs +1 -1
  41. package/dist/qy-image/index.mjs +1 -1
  42. package/dist/qy-image-preview/index.cjs +1 -1
  43. package/dist/qy-image-preview/index.mjs +2 -2
  44. package/dist/qy-image-upload/index.cjs +3 -1
  45. package/dist/qy-image-upload/index.mjs +7 -2
  46. package/dist/qy-input/index.cjs +1 -1
  47. package/dist/qy-input/index.mjs +1 -1
  48. package/dist/qy-input-number/index.cjs +1 -1
  49. package/dist/qy-input-number/index.mjs +1 -1
  50. package/dist/qy-input-tag/index.cjs +1 -1
  51. package/dist/qy-input-tag/index.mjs +151 -5
  52. package/dist/qy-legacy-selection-dialog/index.cjs +8 -1
  53. package/dist/qy-legacy-selection-dialog/index.mjs +12 -2
  54. package/dist/qy-menu-actions/index.cjs +1 -1
  55. package/dist/qy-menu-actions/index.mjs +1 -1
  56. package/dist/qy-money-input/index.cjs +1 -1
  57. package/dist/qy-money-input/index.mjs +1 -1
  58. package/dist/qy-pagination/index.cjs +1 -1
  59. package/dist/qy-pagination/index.mjs +1 -1
  60. package/dist/qy-popconfirm/index.cjs +1 -1
  61. package/dist/qy-popconfirm/index.mjs +1 -1
  62. package/dist/qy-popover/index.cjs +1 -1
  63. package/dist/qy-popover/index.mjs +1 -1
  64. package/dist/qy-radio/index.cjs +1 -1
  65. package/dist/qy-radio/index.mjs +1 -1
  66. package/dist/qy-radio-group/index.cjs +1 -1
  67. package/dist/qy-radio-group/index.mjs +1 -1
  68. package/dist/qy-record-quote-search/index.cjs +4 -1
  69. package/dist/qy-record-quote-search/index.mjs +8 -2
  70. package/dist/qy-remark-image/index.cjs +3 -1
  71. package/dist/qy-remark-image/index.mjs +11 -2
  72. package/dist/qy-remote-select/index.cjs +3 -1
  73. package/dist/qy-remote-select/index.mjs +7 -2
  74. package/dist/qy-result/index.cjs +1 -1
  75. package/dist/qy-result/index.mjs +1 -1
  76. package/dist/qy-scrollbar/index.cjs +1 -1
  77. package/dist/qy-scrollbar/index.mjs +1 -1
  78. package/dist/qy-search-input/index.cjs +3 -1
  79. package/dist/qy-search-input/index.mjs +7 -2
  80. package/dist/qy-select/index.cjs +1 -1
  81. package/dist/qy-select/index.mjs +1 -1
  82. package/dist/qy-selection-dialog/index.cjs +7 -1
  83. package/dist/qy-selection-dialog/index.mjs +11 -2
  84. package/dist/qy-switch/index.cjs +1 -1
  85. package/dist/qy-switch/index.mjs +1 -1
  86. package/dist/qy-table-column-settings/index.cjs +1 -1
  87. package/dist/qy-table-column-settings/index.mjs +1 -1
  88. package/dist/qy-tabs/index.cjs +1 -1
  89. package/dist/qy-tabs/index.mjs +1 -1
  90. package/dist/qy-tag/index.cjs +1 -1
  91. package/dist/qy-tag/index.mjs +1 -1
  92. package/dist/qy-tooltip/index.cjs +1 -1
  93. package/dist/qy-tooltip/index.mjs +1 -1
  94. package/dist/qy-tree/index.cjs +1 -1
  95. package/dist/qy-tree/index.mjs +1 -1
  96. package/dist/qy-tree-select/index.cjs +1 -1
  97. package/dist/qy-tree-select/index.mjs +1 -1
  98. package/dist/qy-upload/index.cjs +1 -1
  99. package/dist/qy-upload/index.mjs +1 -1
  100. package/dist/shared/index-AvNvmJe5.cjs +1 -0
  101. package/dist/shared/{index-DvFMgAcu.mjs → index-B0CTzdRW.mjs} +1 -1
  102. package/dist/shared/index-B1J7PQMl.mjs +79 -0
  103. package/dist/shared/{index-DRIoLeFE.mjs → index-B1gnVI8Y.mjs} +44 -45
  104. package/dist/shared/{index-Co84fsS5.mjs → index-B7j9BtSm.mjs} +88 -80
  105. package/dist/shared/{index-CiE6qJCJ.mjs → index-BAOV5iYx.mjs} +151 -143
  106. package/dist/shared/index-BN4A-O6P.mjs +727 -0
  107. package/dist/shared/index-BR7tIt2k.mjs +211 -0
  108. package/dist/shared/index-BaRw7pWi.mjs +156 -0
  109. package/dist/shared/index-BgAP_K2E.cjs +1 -0
  110. package/dist/shared/index-Blgz8PJc.cjs +1 -0
  111. package/dist/shared/index-BqzKToOL.cjs +1 -0
  112. package/dist/shared/{index-BNssRW4d.mjs → index-BuVrLl5B.mjs} +13 -13
  113. package/dist/shared/index-Bv1DrJ32.mjs +71 -0
  114. package/dist/shared/index-Bz9WjKdL.cjs +1 -0
  115. package/dist/shared/{index-BjqJCq-6.mjs → index-Bzr2RHi5.mjs} +3 -3
  116. package/dist/shared/index-C50jpQ11.mjs +295 -0
  117. package/dist/shared/index-C6G9eVku.cjs +1 -0
  118. package/dist/shared/index-CB0v25oB.cjs +1 -0
  119. package/dist/shared/{index-gMrQlV5n.cjs → index-CIXJwYI-.cjs} +1 -1
  120. package/dist/shared/index-CKkanVur.cjs +1 -0
  121. package/dist/shared/index-CLvL8LAM.cjs +1 -0
  122. package/dist/shared/index-CN2mgT5V.cjs +1 -0
  123. package/dist/shared/{index-DNnWRAFl.mjs → index-CW4s627w.mjs} +1 -1
  124. package/dist/shared/{index-8Iwma3ls.mjs → index-CXOCZlps.mjs} +2 -2
  125. package/dist/shared/{index-CUlhX6fW.cjs → index-CXnL-0Kp.cjs} +1 -1
  126. package/dist/shared/index-CZs0V4ze.cjs +1 -0
  127. package/dist/shared/index-Cqr-L0yd.mjs +285 -0
  128. package/dist/shared/index-Cu6yAwdj.mjs +124 -0
  129. package/dist/shared/index-CxTyKMEH.cjs +1 -0
  130. package/dist/shared/index-D5HS8M1P.cjs +1 -0
  131. package/dist/shared/index-D6QwZtYV.mjs +56 -0
  132. package/dist/shared/index-DCsun70c.cjs +1 -0
  133. package/dist/shared/{index-BweLwi2_.cjs → index-DEzFHeJL.cjs} +1 -1
  134. package/dist/shared/{index-2D5AFexl.mjs → index-DNMRIYkm.mjs} +1 -1
  135. package/dist/shared/index-DY2IXvwl.cjs +1 -0
  136. package/dist/shared/{index-C4F8hXzQ.mjs → index-DdGlwebp.mjs} +90 -81
  137. package/dist/shared/index-DiN5vXXD.cjs +1 -0
  138. package/dist/shared/{index-Mj7JZt7y.cjs → index-Duq5XZ5w.cjs} +1 -1
  139. package/dist/shared/index-DwHM9eYc.cjs +1 -0
  140. package/dist/shared/index-FZ5gl2au.cjs +1 -0
  141. package/dist/shared/index-PM5yNugz.mjs +573 -0
  142. package/dist/shared/index-VtM0GmfU.mjs +361 -0
  143. package/dist/shared/index-ykI9hKtc.mjs +88 -0
  144. package/dist/shared/index.vue_vue_type_script_setup_true_lang-4CNzVpgF.mjs +40 -0
  145. package/dist/shared/index.vue_vue_type_script_setup_true_lang-B38X3tvf.cjs +1 -0
  146. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs → index.vue_vue_type_script_setup_true_lang-BtMkNw_I.mjs} +49 -47
  147. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CeVvm5Ph.cjs +1 -0
  148. package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cn0JqB5r.cjs +1 -0
  149. package/dist/shared/index.vue_vue_type_script_setup_true_lang-D3MxDFk1.cjs +1 -0
  150. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Dn29lZTs.mjs → index.vue_vue_type_script_setup_true_lang-DECgTYqI.mjs} +20 -18
  151. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DMHhx9lY.mjs +133 -0
  152. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DW2JKXjA.cjs +1 -0
  153. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DeFEEJk8.cjs +1 -0
  154. package/dist/shared/index.vue_vue_type_script_setup_true_lang-GUuWAB0o.mjs +238 -0
  155. package/dist/shared/index.vue_vue_type_script_setup_true_lang-mWNAIcqc.mjs +63 -0
  156. package/dist/shared/index.vue_vue_type_style_index_0_lang-B4fDeQox.cjs +1 -0
  157. package/dist/shared/index.vue_vue_type_style_index_0_lang-BLRxKB-e.mjs +413 -0
  158. package/dist/shared/index.vue_vue_type_style_index_0_lang-Ba6d5zw4.mjs +142 -0
  159. package/dist/shared/index.vue_vue_type_style_index_0_lang-BzJsAWKD.cjs +1 -0
  160. package/dist/shared/{index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs → index.vue_vue_type_style_index_0_lang-C4yXFBV_.cjs} +1 -1
  161. package/dist/shared/index.vue_vue_type_style_index_0_lang-CFp5MK6j.cjs +1 -0
  162. package/dist/shared/index.vue_vue_type_style_index_0_lang-CVAm3ApY.cjs +1 -0
  163. package/dist/shared/{index.vue_vue_type_style_index_0_lang-DbQkbvgb.mjs → index.vue_vue_type_style_index_0_lang-CuTyK1Ey.mjs} +3 -3
  164. package/dist/shared/index.vue_vue_type_style_index_0_lang-CvVl_Y56.mjs +219 -0
  165. package/dist/shared/index.vue_vue_type_style_index_0_lang-D-p1u8y8.cjs +1 -0
  166. package/dist/shared/index.vue_vue_type_style_index_0_lang-D9T_xdbu.mjs +176 -0
  167. package/dist/shared/index.vue_vue_type_style_index_0_lang-DGV7FQlw.cjs +1 -0
  168. package/dist/shared/{index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs → index.vue_vue_type_style_index_0_lang-DZOPXZov.mjs} +59 -57
  169. package/dist/shared/{index.vue_vue_type_style_index_0_lang-DSur831A.mjs → index.vue_vue_type_style_index_0_lang-KXiTSh4t.mjs} +24 -18
  170. package/dist/shared/js.cookie-BA-dL3zT.mjs +74 -0
  171. package/dist/shared/js.cookie-BmJmHEx1.cjs +1 -0
  172. package/dist/shared/overlay-stack-DeKq7jZu.cjs +1 -0
  173. package/dist/shared/overlay-stack-eI-yzYU6.mjs +34 -0
  174. package/dist/shared/{utils-DoyI5oM8.mjs → utils-DpZkMLkb.mjs} +63 -49
  175. package/dist/shared/utils-DpkN3Zat.cjs +1 -0
  176. package/index.d.ts +44 -15
  177. package/package.json +1 -1
  178. package/qy-action-bar/index.d.ts +16 -4
  179. package/qy-autocomplete/index.d.ts +43 -2
  180. package/qy-checkbox/index.d.ts +1 -0
  181. package/qy-checkbox-group/index.d.ts +1 -0
  182. package/qy-date-picker/index.d.ts +1 -0
  183. package/qy-dialog/index.d.ts +4 -0
  184. package/qy-form-section/index.d.ts +22 -4
  185. package/qy-image/index.d.ts +1 -0
  186. package/qy-image-preview/index.d.ts +8 -4
  187. package/qy-menu-actions/index.d.ts +21 -2
  188. package/qy-money-input/index.d.ts +1 -0
  189. package/qy-pagination/index.d.ts +4 -0
  190. package/qy-popover/index.d.ts +4 -0
  191. package/qy-radio-group/index.d.ts +1 -0
  192. package/qy-record-quote-search/index.d.ts +53 -4
  193. package/qy-remark-image/index.d.ts +48 -4
  194. package/qy-remote-select/index.d.ts +53 -2
  195. package/qy-search-input/index.d.ts +66 -4
  196. package/qy-select/index.d.ts +4 -0
  197. package/qy-selection-dialog/index.d.ts +63 -2
  198. package/qy-switch/index.d.ts +1 -0
  199. package/qy-table-column-settings/index.d.ts +19 -2
  200. package/qy-tooltip/index.d.ts +5 -0
  201. package/qy-tree-select/index.d.ts +1 -0
  202. package/dist/shared/index-5dxbpQb_.cjs +0 -1
  203. package/dist/shared/index-BEcS8y8g.mjs +0 -68
  204. package/dist/shared/index-BSTMCPDj.mjs +0 -72
  205. package/dist/shared/index-Bh9hxVFh.mjs +0 -766
  206. package/dist/shared/index-CGq7Q_hV.mjs +0 -119
  207. package/dist/shared/index-CVYNG8Fc.cjs +0 -1
  208. package/dist/shared/index-CmgTSaFS.cjs +0 -1
  209. package/dist/shared/index-CnVhquq5.cjs +0 -1
  210. package/dist/shared/index-D27mwR57.cjs +0 -1
  211. package/dist/shared/index-DKw-seoh.cjs +0 -1
  212. package/dist/shared/index-DRugp8x0.cjs +0 -1
  213. package/dist/shared/index-DTbGlDqr.cjs +0 -1
  214. package/dist/shared/index-MyDDX-zj.cjs +0 -1
  215. package/dist/shared/index-afOuq3YX.cjs +0 -1
  216. package/dist/shared/index-rSrDnOpu.cjs +0 -1
  217. package/dist/shared/index-rjciSHaR.mjs +0 -2362
  218. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +0 -1
  219. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +0 -1
  220. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +0 -1
  221. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs +0 -1
  222. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs +0 -143
  223. package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +0 -94
  224. package/dist/shared/index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs +0 -48
  225. package/dist/shared/index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs +0 -1
  226. package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +0 -1
  227. package/dist/shared/index.vue_vue_type_script_setup_true_lang-r7iyZzDS.mjs +0 -61
  228. package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +0 -1
  229. package/dist/shared/index.vue_vue_type_style_index_0_lang-B2thgQml.cjs +0 -1
  230. package/dist/shared/index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs +0 -215
  231. package/dist/shared/index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs +0 -406
  232. package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +0 -1
  233. package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +0 -172
  234. package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +0 -1
  235. package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +0 -1
  236. package/dist/shared/index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs +0 -128
  237. package/dist/shared/index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs +0 -1
  238. package/dist/shared/utils-BjEXwY3L.cjs +0 -1
  239. /package/dist/shared/{index-DiEag4sK.cjs → index-5UAiwqdT.cjs} +0 -0
  240. /package/dist/shared/{index-B3GsIwhf.mjs → index-BKdw4jD_.mjs} +0 -0
  241. /package/dist/shared/{index-B25yA5j-.mjs → index-BVaIvVMi.mjs} +0 -0
  242. /package/dist/shared/{index-HNFq7v-A.cjs → index-Bdlzmh8A.cjs} +0 -0
  243. /package/dist/shared/{index-Bq9quq2D.cjs → index-BsNtvE6i.cjs} +0 -0
  244. /package/dist/shared/{index-B3YHS3Aa.mjs → index-CGH2ROZV.mjs} +0 -0
  245. /package/dist/shared/{index-ByQyMTPg.mjs → index-DvXzDAmi.mjs} +0 -0
  246. /package/dist/shared/{index-EIFVul2W.cjs → index-O6K0DO_k.cjs} +0 -0
  247. /package/dist/shared/{index-B3XwO-Lc.mjs → index-QN7-6GpS.mjs} +0 -0
  248. /package/dist/shared/{index-CVWru9T3.cjs → index-_Bagw0Pj.cjs} +0 -0
  249. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs → index.vue_vue_type_script_setup_true_lang-2ZOn9XPM.cjs} +0 -0
  250. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs → index.vue_vue_type_script_setup_true_lang-DM0MGPZh.mjs} +0 -0
  251. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CVdFZeHK.mjs → index.vue_vue_type_style_index_0_lang-90f2jQr7.mjs} +0 -0
  252. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs → index.vue_vue_type_style_index_0_lang-BNL5vyrU.cjs} +0 -0
  253. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs → index.vue_vue_type_style_index_0_lang-BvBAR8A1.mjs} +0 -0
  254. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-C7L66EnO.mjs} +0 -0
  255. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Tzo8o6M8.mjs → index.vue_vue_type_style_index_0_lang-CN3dJjUV.mjs} +0 -0
  256. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs → index.vue_vue_type_style_index_0_lang-CNdV3Mnk.mjs} +0 -0
  257. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-B1FgJZbw.mjs → index.vue_vue_type_style_index_0_lang-CgScSrRJ.mjs} +0 -0
  258. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs → index.vue_vue_type_style_index_0_lang-Clt7QDAK.cjs} +0 -0
  259. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs → index.vue_vue_type_style_index_0_lang-CvlRVqcl.cjs} +0 -0
  260. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs → index.vue_vue_type_style_index_0_lang-DGt78p3G.mjs} +0 -0
  261. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-J7wvS2CR.cjs} +0 -0
  262. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs → index.vue_vue_type_style_index_0_lang-YEjVWWsy.cjs} +0 -0
  263. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D9DraThL.cjs → index.vue_vue_type_style_index_0_lang-nS-EDK4t.cjs} +0 -0
  264. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs → index.vue_vue_type_style_index_0_lang-yci929so.cjs} +0 -0
@@ -0,0 +1,413 @@
1
+ import { ElDialog as xe, ElIcon as be } from "element-plus/es";
2
+ import { defineComponent as ke, useSlots as _e, ref as r, computed as C, createVNode as z, watchEffect as Ce, watch as ie, h as se, nextTick as M, onMounted as ze, onUnmounted as Be, openBlock as a, createBlock as R, unref as B, withCtx as b, createElementVNode as l, normalizeClass as O, createSlots as Ee, normalizeStyle as Z, createElementBlock as u, createCommentVNode as y, renderSlot as E, toDisplayString as re, withModifiers as d, withDirectives as Se, vShow as Le } from "vue";
3
+ import qe from "clsx";
4
+ import { useZIndex as Me, ElButton as de, ElConfigProvider as Oe } from "element-plus";
5
+ import { r as V, i as Ie } from "./overlay-stack-eI-yzYU6.mjs";
6
+ import { Close as $e } from "@element-plus/icons-vue";
7
+ import { useBreakpoints as Te, useDraggable as De } from "@vueuse/core";
8
+ const He = { class: "text-lg flex items-center pt-2 pl-[var(--content-padding)]" }, Fe = { key: 0 }, Ne = { key: 1 }, je = {
9
+ key: 0,
10
+ class: "icon-[material-symbols--square-outline-rounded]",
11
+ role: "img",
12
+ "aria-hidden": "true"
13
+ }, Ae = {
14
+ key: 1,
15
+ class: "icon-[tdesign--fullscreen-exit-1]",
16
+ role: "img",
17
+ "aria-hidden": "true"
18
+ }, Re = {
19
+ key: 0,
20
+ class: "fixed -right-12 top-2 h-9 w-9 hover:bg-gray-600/80 transition-all"
21
+ }, Ze = { class: "flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center" }, Ve = { class: "flex items-center justify-between w-full pl-1 pr-4 h-full ml-2" }, We = { class: "flex items-center gap-2" }, Pe = { class: "text-sm text-gray-700 truncate max-w-[200px]" }, Ue = { class: "flex items-center gap-2" }, ue = 5, to = /* @__PURE__ */ ke({
22
+ inheritAttrs: !1,
23
+ __name: "index",
24
+ props: {
25
+ open: { type: Boolean, default: !1 },
26
+ title: { default: "" },
27
+ width: { default: "50%" },
28
+ showFooter: { type: Boolean, default: !0 },
29
+ showConfirm: { type: Boolean, default: !0 },
30
+ showCancel: { type: Boolean, default: !0 },
31
+ confirmText: { default: "确 认" },
32
+ cancelText: { default: "取 消" },
33
+ confirmLoading: { type: Boolean, default: !1 },
34
+ confirmDisabled: { type: Boolean, default: !1 },
35
+ closeOnConfirm: { type: Boolean, default: !1 },
36
+ closeOnEscape: { type: Boolean, default: !0 },
37
+ closeOnOverlay: { type: Boolean, default: !0 },
38
+ minimizable: { type: Boolean, default: !0 },
39
+ destroyOnClose: { type: Boolean, default: !1 },
40
+ draggable: { type: Boolean, default: !0 },
41
+ lockScroll: { type: Boolean, default: !0 },
42
+ top: { default: "15vh" },
43
+ alignCenter: { type: Boolean, default: !0 },
44
+ appendToBody: { type: Boolean, default: !0 },
45
+ appendTo: { default: "body" },
46
+ fullscreen: { type: Boolean, default: !1 },
47
+ showFullscreen: { type: Boolean, default: !1 },
48
+ size: { default: "default" },
49
+ zIndex: { default: 2e3 }
50
+ },
51
+ emits: ["update:open", "open-change", "confirm", "cancel", "close", "opened", "closed"],
52
+ setup(ce, { expose: fe, emit: me }) {
53
+ let c = 0;
54
+ const o = ce, I = _e(), W = r(!0), $ = r(!1), { nextZIndex: T } = Me(), S = r(V(T(), o.zIndex)), P = r(null), pe = Te({
55
+ mobile: 0,
56
+ tablet: 640,
57
+ laptop: 1024,
58
+ desktop: 1280
59
+ }).isSmaller("tablet"), D = C(() => {
60
+ const e = [];
61
+ return o.showCancel && e.push("cancel"), o.showConfirm && e.push("confirm"), e;
62
+ }), U = C(() => ({
63
+ CancelButton: z(ee),
64
+ ConfirmButton: z(Q)
65
+ })), K = C(() => !!(I.footer || o.showFooter)), f = r(!1), h = r(!1);
66
+ let H = !1, w = document.activeElement instanceof HTMLElement ? document.activeElement : null;
67
+ const k = r(
68
+ o.showFullscreen && pe ? !0 : o.fullscreen
69
+ ), i = me, X = C(() => o.open);
70
+ Ce(() => {
71
+ X.value && (f.value = !1);
72
+ }), ie(
73
+ () => o.open,
74
+ (e, t) => {
75
+ if (e) {
76
+ S.value = V(T(), o.zIndex), f.value = !1, h.value = !1, w = document.activeElement instanceof HTMLElement ? document.activeElement : w, t === !1 && i("open-change", !0);
77
+ return;
78
+ }
79
+ t && !f.value && (f.value = !0, i("open-change", !1), i("close", "external"));
80
+ }
81
+ ), ie(
82
+ () => o.confirmLoading,
83
+ (e) => {
84
+ e ? H = !0 : H && (H = !1, h.value = !1);
85
+ }
86
+ ), fe({
87
+ handleMinimize: A
88
+ });
89
+ const m = `qy-dialog-${Math.random().toString(36).slice(2, 11)}`, x = r(!1);
90
+ let _ = !1;
91
+ const L = r(null), { x: Y, y: F } = De(L, {
92
+ initialValue: {
93
+ x: 5,
94
+ y: window.innerHeight - 100 - c * 60
95
+ },
96
+ onMove(e) {
97
+ var t;
98
+ (t = L.value) == null || t.classList.add("dragging"), document.body.classList.add("qy-dialog--dragging"), Y.value = Math.max(
99
+ 0,
100
+ Math.min(window.innerWidth - 300, e.x)
101
+ ), F.value = Math.max(
102
+ 0,
103
+ Math.min(window.innerHeight - 50, e.y)
104
+ );
105
+ },
106
+ onEnd() {
107
+ var e;
108
+ (e = L.value) == null || e.classList.remove("dragging"), document.body.classList.remove("qy-dialog--dragging");
109
+ }
110
+ }), ve = C(() => ({
111
+ transform: `translate(${Y.value}px, ${F.value}px)`,
112
+ willChange: "transform"
113
+ }));
114
+ function G(e) {
115
+ const t = e.target, { scrollTop: n, scrollHeight: s, clientHeight: v } = t;
116
+ W.value = n <= ue, $.value = s - (n + v) <= ue;
117
+ }
118
+ function ge() {
119
+ const e = document.querySelector(`.${m}.el-dialog`);
120
+ e && (P.value = e, e.addEventListener("scroll", G)), i("opened");
121
+ }
122
+ function J() {
123
+ k.value = !k.value, j();
124
+ }
125
+ function p(e) {
126
+ o.confirmLoading && e !== "external" || f.value || (f.value = !0, ae(), i("update:open", !1), i("open-change", !1), (e === "cancel" || e === "header") && i("cancel"), i("close", e), M(() => {
127
+ o.open && (f.value = !1);
128
+ }));
129
+ }
130
+ function ye() {
131
+ i("closed"), M(() => {
132
+ w != null && w.isConnected && w.focus();
133
+ });
134
+ }
135
+ function he(e) {
136
+ o.showFullscreen && e.detail >= 2 && J();
137
+ }
138
+ function Q() {
139
+ return se(
140
+ de,
141
+ {
142
+ type: "primary",
143
+ class: "dialog__footerBtn",
144
+ loading: o.confirmLoading,
145
+ disabled: o.confirmDisabled || o.confirmLoading || h.value,
146
+ onClick: we
147
+ },
148
+ () => o.confirmText
149
+ );
150
+ }
151
+ function we() {
152
+ h.value || o.confirmLoading || o.confirmDisabled || (h.value = !0, i("confirm"), M(() => {
153
+ o.confirmLoading || (h.value = !1);
154
+ }), o.closeOnConfirm && p("confirm"));
155
+ }
156
+ function ee() {
157
+ return se(
158
+ de,
159
+ { class: "dialog__footerBtn", onClick: () => p("cancel") },
160
+ () => o.cancelText
161
+ );
162
+ }
163
+ ze(() => {
164
+ j(), document.addEventListener("keydown", te, !0), document.addEventListener("keydown", le), document.addEventListener("mousedown", ne, !0);
165
+ });
166
+ function oe() {
167
+ var s, v;
168
+ const e = (s = document.querySelector(`.${m}`)) == null ? void 0 : s.closest(".el-overlay");
169
+ if (!e) return !1;
170
+ const n = Array.from(
171
+ document.querySelectorAll(".el-overlay, .el-image-viewer__wrapper")
172
+ ).filter((g) => window.getComputedStyle(g).display !== "none").map((g, q) => ({
173
+ overlay: g,
174
+ order: q,
175
+ zIndex: Number.parseInt(
176
+ window.getComputedStyle(g).zIndex || "0",
177
+ 10
178
+ )
179
+ }));
180
+ return n.sort(
181
+ (g, q) => g.zIndex - q.zIndex || g.order - q.order
182
+ ), ((v = n.at(-1)) == null ? void 0 : v.overlay) === e;
183
+ }
184
+ const N = /* @__PURE__ */ new WeakSet();
185
+ function te(e) {
186
+ e.key !== "Escape" || Ie(e) || !o.open || !o.closeOnEscape || o.confirmLoading || !oe() || N.add(e);
187
+ }
188
+ function le(e) {
189
+ !N.has(e) || e.defaultPrevented || (N.delete(e), e.preventDefault(), p("escape"));
190
+ }
191
+ function ne(e) {
192
+ if (!o.open || !o.closeOnOverlay || o.confirmLoading || !oe() || !(e.target instanceof Node))
193
+ return;
194
+ const t = document.querySelector(`.${m}.el-dialog`), n = t == null ? void 0 : t.closest(".el-overlay");
195
+ !t || !n || !n.contains(e.target) || t.contains(e.target) || p("overlay");
196
+ }
197
+ function j() {
198
+ var s;
199
+ const e = (s = document.querySelector(`.${m}`)) == null ? void 0 : s.closest(".el-overlay"), t = document.querySelector(
200
+ `.${m}.el-dialog`
201
+ );
202
+ if (!e || !t) return;
203
+ const n = V(T(), o.zIndex);
204
+ M(() => {
205
+ e.style.zIndex = n.toString(), t.style.zIndex = n.toString(), S.value = n;
206
+ });
207
+ }
208
+ Be(() => {
209
+ var e;
210
+ document.removeEventListener("keydown", te, !0), document.removeEventListener("keydown", le), document.removeEventListener("mousedown", ne, !0), (e = P.value) == null || e.removeEventListener("scroll", G), ae();
211
+ });
212
+ function ae() {
213
+ if (!_) {
214
+ x.value = !1;
215
+ return;
216
+ }
217
+ _ = !1, c = Math.max(0, c - 1), x.value = !1;
218
+ }
219
+ function A() {
220
+ var t;
221
+ const e = (t = document.querySelector(`.${m}`)) == null ? void 0 : t.closest(".el-overlay");
222
+ !e || !o.open || (x.value ? (x.value = !1, e.style.display = "block", _ && (_ = !1, c = Math.max(0, c - 1)), j()) : (x.value = !0, e.style.display = "none", _ = !0, c += 1, F.value = window.innerHeight - 50 - c * 60));
223
+ }
224
+ return (e, t) => {
225
+ const n = be, s = xe;
226
+ return a(), R(B(Oe), { "z-index": S.value }, {
227
+ default: b(() => [
228
+ l("div", null, [
229
+ z(s, {
230
+ ref: "dialogRef",
231
+ class: O(["qy-dialog", [
232
+ o.size === "small" && "[&_.el-dialog__header]:!hidden",
233
+ m
234
+ ]]),
235
+ "model-value": X.value,
236
+ title: o.title,
237
+ width: o.width,
238
+ top: o.top,
239
+ "align-center": o.alignCenter,
240
+ "append-to-body": o.appendToBody,
241
+ "append-to": o.appendTo,
242
+ "destroy-on-close": o.destroyOnClose,
243
+ "lock-scroll": o.lockScroll,
244
+ style: {
245
+ "--el-dialog-padding-primary": 0
246
+ },
247
+ "show-close": !1,
248
+ "close-on-press-escape": !1,
249
+ "close-on-click-modal": !1,
250
+ fullscreen: k.value,
251
+ "z-index": S.value,
252
+ onClosed: ye,
253
+ onOpened: ge,
254
+ draggable: o.draggable
255
+ }, Ee({
256
+ header: b(() => [
257
+ o.size === "default" ? (a(), u("div", {
258
+ key: 0,
259
+ style: Z({
260
+ borderBottom: "1px solid",
261
+ borderColor: W.value ? "transparent" : "var(--block-outline-color)",
262
+ transition: "border-color .2s linear"
263
+ }),
264
+ class: "flex justify-between h-[var(--header-height)]",
265
+ onDblclick: he
266
+ }, [
267
+ l("div", He, [
268
+ B(I).header ? B(I).header ? (a(), u("div", Ne, [
269
+ E(e.$slots, "header")
270
+ ])) : y("", !0) : (a(), u("span", Fe, re(o.title), 1))
271
+ ]),
272
+ l("div", {
273
+ class: "flex",
274
+ onMousedown: t[4] || (t[4] = d(() => {
275
+ }, ["stop"]))
276
+ }, [
277
+ o.size === "default" && o.minimizable ? (a(), u("div", {
278
+ key: 0,
279
+ class: "qy-dialog__btn qy-dialog__btn--default",
280
+ onClick: d(A, ["stop"]),
281
+ onMousedown: t[0] || (t[0] = d(() => {
282
+ }, ["stop"]))
283
+ }, [...t[7] || (t[7] = [
284
+ l("span", {
285
+ class: "icon-[material-symbols--minimize] text-xl mb-3",
286
+ role: "img",
287
+ "aria-hidden": "true"
288
+ }, null, -1)
289
+ ])], 32)) : y("", !0),
290
+ o.showFullscreen ? (a(), u("div", {
291
+ key: 1,
292
+ class: "qy-dialog__btn qy-dialog__btn--default",
293
+ onClick: d(J, ["stop"]),
294
+ onMousedown: t[1] || (t[1] = d(() => {
295
+ }, ["stop"]))
296
+ }, [
297
+ k.value ? (a(), u("span", Ae)) : (a(), u("span", je))
298
+ ], 32)) : y("", !0),
299
+ l("div", {
300
+ class: "qy-dialog__btn qy-dialog__btn--danger",
301
+ onClick: t[2] || (t[2] = d((v) => p("header"), ["stop"])),
302
+ onMousedown: t[3] || (t[3] = d(() => {
303
+ }, ["stop"]))
304
+ }, [...t[8] || (t[8] = [
305
+ l("span", {
306
+ class: "icon-[ri--close-line] text-xl",
307
+ role: "img",
308
+ "aria-hidden": "true"
309
+ }, null, -1)
310
+ ])], 32)
311
+ ], 32)
312
+ ], 36)) : y("", !0)
313
+ ]),
314
+ default: b(() => [
315
+ l("div", {
316
+ class: O(["qy-dialog__wrapper", B(qe)(k.value && "qy-dialog__wrapper--fullscreen")]),
317
+ style: Z({
318
+ maxHeight: K.value ? "calc(100vh - var(--header-height) - var(--footer-height) - var(--sides-gap))" : "calc(100vh - var(--header-height) - var(--sides-gap))",
319
+ padding: o.size === "small" ? "var(--small-content-padding)" : "var(--content-padding)"
320
+ })
321
+ }, [
322
+ o.size === "small" ? (a(), u("div", Re, [
323
+ z(n, {
324
+ size: 36,
325
+ class: "cursor-pointer text-gray-100 active:scale-75 rounded-sm transition-all",
326
+ onClick: t[5] || (t[5] = (v) => p("header"))
327
+ }, {
328
+ default: b(() => [
329
+ z(B($e))
330
+ ]),
331
+ _: 1
332
+ })
333
+ ])) : y("", !0),
334
+ E(e.$slots, "default")
335
+ ], 6)
336
+ ]),
337
+ _: 2
338
+ }, [
339
+ o.showFooter && !e.$slots.footer && Array.isArray(D.value) ? {
340
+ name: "footer",
341
+ fn: b(() => [
342
+ l("div", Ze, [
343
+ l("div", null, [
344
+ E(e.$slots, "footer-left")
345
+ ]),
346
+ l("div", {
347
+ class: O([{
348
+ "qy-dialog__footer--outline": $.value
349
+ }, "qy-dialog__footer flex items-center justify-end"])
350
+ }, [
351
+ D.value.includes("cancel") ? (a(), R(ee, { key: 0 })) : y("", !0),
352
+ D.value.includes("confirm") ? (a(), R(Q, { key: 1 })) : y("", !0),
353
+ E(e.$slots, "footer-append")
354
+ ], 2)
355
+ ])
356
+ ]),
357
+ key: "0"
358
+ } : K.value ? {
359
+ name: "footer",
360
+ fn: b(() => [
361
+ l("div", {
362
+ class: O([{
363
+ "qy-dialog__footer--outline": $.value
364
+ }, "qy-dialog__footer px-[var(--content-padding)] min-h-[var(--footer-height)] flex items-center justify-end"])
365
+ }, [
366
+ E(e.$slots, "footer", {
367
+ layouts: U.value,
368
+ layoutsNode: Object.values(U.value)
369
+ })
370
+ ], 2)
371
+ ]),
372
+ key: "1"
373
+ } : void 0
374
+ ]), 1032, ["class", "model-value", "title", "width", "top", "align-center", "append-to-body", "append-to", "destroy-on-close", "lock-scroll", "fullscreen", "z-index", "draggable"]),
375
+ Se(l("div", {
376
+ ref_key: "minimizedRef",
377
+ ref: L,
378
+ class: "fixed left-0 top-0 bg-white rounded shadow-lg cursor-pointer z-[9999] hover:bg-gray-50",
379
+ style: Z([ve.value, { width: "300px", height: "50px", "will-change": "transform" }])
380
+ }, [
381
+ l("div", Ve, [
382
+ l("div", We, [
383
+ t[9] || (t[9] = l("div", { class: "icon-[mdi--window-restore] text-gray-600" }, null, -1)),
384
+ l("span", Pe, re(o.title), 1)
385
+ ]),
386
+ l("div", Ue, [
387
+ l("div", {
388
+ class: "p-1 hover:bg-gray-200 rounded",
389
+ onClick: d(A, ["stop"])
390
+ }, [...t[10] || (t[10] = [
391
+ l("div", { class: "icon-[mdi--window-maximize] text-gray-600" }, null, -1)
392
+ ])]),
393
+ l("div", {
394
+ class: "p-1 hover:bg-red-100 rounded",
395
+ onClick: t[6] || (t[6] = d((v) => p("header"), ["stop"]))
396
+ }, [...t[11] || (t[11] = [
397
+ l("div", { class: "icon-[mdi--close] text-red-600" }, null, -1)
398
+ ])])
399
+ ])
400
+ ])
401
+ ], 4), [
402
+ [Le, x.value]
403
+ ])
404
+ ])
405
+ ]),
406
+ _: 3
407
+ }, 8, ["z-index"]);
408
+ };
409
+ }
410
+ });
411
+ export {
412
+ to as _
413
+ };
@@ -0,0 +1,142 @@
1
+ import { defineComponent as M, computed as f, ref as y, getCurrentInstance as Q, useSlots as R, watch as w, onBeforeUnmount as G, onMounted as H, openBlock as k, createBlock as q, unref as J, withCtx as C, renderSlot as X, createElementBlock as Y, Fragment as Z, renderList as x, resolveDynamicComponent as V } from "vue";
2
+ import { ElPopover as _ } from "element-plus";
3
+ import { a as ee, c as te } from "./overlay-stack-eI-yzYU6.mjs";
4
+ const ne = 1e3, le = /* @__PURE__ */ M({
5
+ name: "QyPopover",
6
+ inheritAttrs: !1,
7
+ __name: "index",
8
+ props: {
9
+ enterable: { type: Boolean, default: !0 },
10
+ teleported: { type: Boolean, default: !0 },
11
+ appendTo: { type: [String, Object], default: "body" },
12
+ trigger: { type: String, default: "click" },
13
+ placement: { type: String, default: "bottom" },
14
+ effect: { type: String, default: "light" },
15
+ width: { type: [Number, String], default: 240 },
16
+ offset: { type: Number, default: 12 },
17
+ showDelay: { type: Number, default: 0 },
18
+ hideDelay: { type: Number, default: 200 },
19
+ showArrow: { type: Boolean, default: !0 },
20
+ transition: { type: String, default: void 0 },
21
+ disabled: { type: Boolean, default: !1 },
22
+ open: { type: Boolean, default: void 0 }
23
+ },
24
+ emits: ["update:open", "open-change", "open", "close"],
25
+ setup(t, { expose: N, emit: I }) {
26
+ const n = t, s = I, i = f(() => n.open !== void 0), h = i.value && n.open === !0 && !n.disabled, u = y(h), l = y(h), A = y(h), o = y(null), D = f(() => n.disabled ? !1 : i.value ? n.open === !0 : u.value);
27
+ let r;
28
+ const L = `qy-popover-${Q().uid}`;
29
+ let d = !1, c;
30
+ const P = f(
31
+ () => typeof n.width == "number" ? `${n.width}px` : n.width
32
+ ), O = f(() => ({
33
+ "--qy-popover-width": P.value,
34
+ "--qy-popover-mobile-gutter": "24px"
35
+ })), g = R(), W = f(
36
+ () => {
37
+ var e;
38
+ return ((e = g.reference) == null ? void 0 : e.call(g)) ?? [];
39
+ }
40
+ );
41
+ function E() {
42
+ r && (clearTimeout(r), r = void 0), o.value = null;
43
+ }
44
+ function $(e) {
45
+ r && clearTimeout(r), r = setTimeout(() => {
46
+ r = void 0, o.value === e && (o.value = null);
47
+ }, ne);
48
+ }
49
+ function a() {
50
+ if (d) return;
51
+ const e = D.value;
52
+ l.value !== e && (d = !0, c = e, l.value = e);
53
+ }
54
+ function p(e) {
55
+ if (!(e && n.disabled)) {
56
+ if (!i.value) {
57
+ if (u.value === e) return;
58
+ u.value = e, s("update:open", e), a();
59
+ return;
60
+ }
61
+ o.value !== e && (o.value === null && n.open === e || (o.value = e, $(e), s("update:open", e), a()));
62
+ }
63
+ }
64
+ function S(e) {
65
+ e === l.value && (!d || c !== e || (d = !1, c = void 0, e !== A.value && (A.value = e, o.value === e && E(), s("open-change", e), s(e ? "open" : "close"), a())));
66
+ }
67
+ function K(e) {
68
+ p(e), a();
69
+ }
70
+ function U() {
71
+ S(!0);
72
+ }
73
+ function j() {
74
+ S(!1);
75
+ }
76
+ function z() {
77
+ p(!1);
78
+ }
79
+ const b = /* @__PURE__ */ new WeakSet();
80
+ function T(e) {
81
+ if (e.key !== "Escape" && e.code !== "Escape" || !l.value || e.defaultPrevented) return;
82
+ const m = document.querySelector(`.${L}`);
83
+ ee(m) && (te(e), b.add(e));
84
+ }
85
+ function v(e) {
86
+ b.has(e) && (b.delete(e), e.stopPropagation(), !e.defaultPrevented && (e.preventDefault(), e.stopImmediatePropagation(), p(!1), a()));
87
+ }
88
+ return w(
89
+ D,
90
+ () => a()
91
+ ), w(i, (e) => {
92
+ E(), e ? u.value = n.open === !0 : u.value = l.value, a();
93
+ }), w(
94
+ () => n.open,
95
+ (e, m) => {
96
+ !i.value || o.value === null || (e === o.value || e !== m) && E();
97
+ }
98
+ ), w(
99
+ () => n.disabled,
100
+ (e) => {
101
+ e ? p(!1) : a();
102
+ }
103
+ ), G(() => {
104
+ window.removeEventListener("keydown", T, !0), document.body.removeEventListener("keydown", v), window.removeEventListener("keydown", v), d = !1, c = void 0, r && clearTimeout(r);
105
+ }), H(() => {
106
+ window.addEventListener("keydown", T, !0), document.body.addEventListener("keydown", v), window.addEventListener("keydown", v);
107
+ }), N({ close: z }), (e, m) => (k(), q(J(_), {
108
+ visible: l.value,
109
+ trigger: t.trigger,
110
+ placement: t.placement,
111
+ effect: t.effect,
112
+ width: t.width,
113
+ offset: t.offset,
114
+ "show-after": t.showDelay,
115
+ "hide-after": t.hideDelay,
116
+ "show-arrow": t.showArrow,
117
+ transition: t.transition,
118
+ disabled: t.disabled,
119
+ enterable: t.enterable,
120
+ teleported: t.teleported,
121
+ "append-to": t.appendTo,
122
+ "popper-style": O.value,
123
+ "popper-class": `qy-popover-popper ${L}`,
124
+ "onUpdate:visible": K,
125
+ onAfterEnter: U,
126
+ onAfterLeave: j
127
+ }, {
128
+ reference: C(() => [
129
+ (k(!0), Y(Z, null, x(W.value, (B, F) => (k(), q(V(B), {
130
+ key: B.key ?? F
131
+ }))), 128))
132
+ ]),
133
+ default: C(() => [
134
+ X(e.$slots, "default")
135
+ ]),
136
+ _: 3
137
+ }, 8, ["visible", "trigger", "placement", "effect", "width", "offset", "show-after", "hide-after", "show-arrow", "transition", "disabled", "enterable", "teleported", "append-to", "popper-style", "popper-class"]));
138
+ }
139
+ });
140
+ export {
141
+ le as _
142
+ };
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),R=require("element-plus"),j=["id","role","aria-disabled","tabindex","disabled","onKeydown"],G={class:"qy-color-picker__value","aria-hidden":"true"};let H=0;const J=()=>`qy-color-picker-${++H}`,X=a.defineComponent({name:"QyColorPicker",inheritAttrs:!1,__name:"index",props:{modelValue:{default:null},format:{default:void 0},showAlpha:{type:Boolean,default:!1},predefine:{default:void 0},size:{default:"default"},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","active-change","change","visible-change"],setup(L,{emit:z}){const r=L,u=z,i=R.useFormDisabled();a.watch(i,e=>{e&&n.value&&v()});const f=a.useAttrs(),k=a.ref(null),w=a.ref(null),m=a.ref(null),t=a.ref(c(r.modelValue)),y=a.ref(t.value),n=a.ref(!1),o=a.ref(null),s=a.ref(!1),p=a.ref(!1),_=J(),B=a.computed(()=>typeof f.id=="string"&&f.id||_),C=`qy-color-picker__popper--${_}`,I=a.computed(()=>r.format||(r.showAlpha?"rgb":"hex")),h=a.computed(()=>c(r.modelValue)),K=a.computed(()=>String(f.role||"button")),N=a.computed(()=>f["aria-disabled"]??(i.value?"true":"false")),S=a.computed(()=>i.value?void 0:f.tabindex??0),T=a.computed(()=>{const e={};for(const[l,d]of Object.entries(f)){const b=l.toLowerCase();(l==="class"||l==="style"||l==="id"||l==="title"||l==="tabindex"||l==="role"||b.startsWith("data-")||b.startsWith("aria-")||["onkeydown","onkeyup","onkeypress"].includes(b))&&(e[l]=d)}return e});a.watch(()=>r.modelValue,e=>{t.value=c(e),n.value&&(y.value=t.value)});function c(e){return e==null||e===""?null:String(e)}function F(){if(!i.value){if(n.value){v();return}E()}}function V(){i.value||n.value||E()}function M(){n.value&&v()}function E(){n.value||i.value||(y.value=c(r.modelValue),t.value=y.value,o.value=null,s.value=!1,p.value=!1,n.value=!0,W(),u("visible-change",!0),a.nextTick(()=>{var e,l;return(l=(e=m.value)==null?void 0:e.show)==null?void 0:l.call(e)}))}function O(e){!n.value||o.value||(t.value=c(e),u("active-change",t.value))}function Q(e){!n.value||o.value==="cancel"||(t.value=c(e),s.value||(s.value=!0,o.value="commit",u("update:modelValue",t.value)))}function U(e){!n.value||o.value==="cancel"||(t.value=c(e),s.value||(s.value=!0,o.value="commit",u("update:modelValue",t.value)),p.value||(p.value=!0,u("change",t.value)),g())}function $(){!n.value||o.value==="cancel"||(s.value||(s.value=!0,o.value="commit",t.value=null,u("update:modelValue",null)),p.value||(p.value=!0,u("change",null)),g())}function v(){var e,l;!n.value||o.value||(o.value="cancel",t.value=c(r.modelValue),(l=(e=m.value)==null?void 0:e.hide)==null||l.call(e),g())}function g(){var e,l;n.value&&(n.value=!1,P(),(l=(e=m.value)==null?void 0:e.hide)==null||l.call(e),u("visible-change",!1),a.nextTick(()=>{var d;return(d=w.value)==null?void 0:d.focus()}))}function x(e){var l,d;return e instanceof Node?(l=k.value)!=null&&l.contains(e)?!0:!!((d=e.closest)!=null&&d.call(e,`.${C}`)):!1}function q(e){n.value&&!x(e.target)&&v()}function A(e){n.value&&!x(e.target)&&v()}function D(e){n.value&&e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),v())}function W(){document.addEventListener("pointerdown",q,!0),document.addEventListener("focusin",A,!0),document.addEventListener("keydown",D,!0)}function P(){document.removeEventListener("pointerdown",q,!0),document.removeEventListener("focusin",A,!0),document.removeEventListener("keydown",D,!0)}return a.onBeforeUnmount(()=>{P()}),(e,l)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"rootRef",ref:k,class:"qy-color-picker","data-qy-color-picker":""},[a.createElementVNode("button",a.mergeProps({ref_key:"triggerRef",ref:w,type:"button",class:"qy-color-picker__trigger"},T.value,{id:B.value,role:K.value,"aria-disabled":N.value,tabindex:S.value,disabled:a.unref(i),class:{"is-disabled":a.unref(i),"is-open":n.value},onClick:F,onKeydown:[a.withKeys(a.withModifiers(V,["prevent"]),["enter"]),a.withKeys(a.withModifiers(V,["prevent"]),["space"]),a.withKeys(a.withModifiers(M,["prevent"]),["esc"])]}),[a.createElementVNode("span",{class:a.normalizeClass(["qy-color-picker__swatch",{"is-empty":!h.value}]),style:a.normalizeStyle(h.value?{backgroundColor:h.value}:void 0),"aria-hidden":"true"},null,6),a.createElementVNode("span",G,a.toDisplayString(h.value||"选择颜色"),1),l[0]||(l[0]=a.createElementVNode("span",{class:"qy-color-picker__arrow","aria-hidden":"true"},"⌄",-1))],16,j),a.createVNode(a.unref(R.ElColorPicker),{ref_key:"rendererRef",ref:m,class:"qy-color-picker__renderer","model-value":t.value,"show-alpha":r.showAlpha,"color-format":I.value,predefine:r.predefine,size:r.size,disabled:!1,clearable:r.clearable,teleported:!0,tabindex:-1,"popper-class":C,"aria-hidden":"true",onActiveChange:O,"onUpdate:modelValue":Q,onChange:U,onClear:$},null,8,["model-value","show-alpha","color-format","predefine","size","clearable"])],512))}});exports._sfc_main=X;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),Q=require("./index-CUlhX6fW.cjs"),T=require("./index-HNFq7v-A.cjs"),J=require("../qy-popover/index.cjs"),S=require("./index-CVWru9T3.cjs");function X(l,f){const v=f==null?"":String(f),n=l&&v?l.resolve(v):void 0;return Object.freeze({value:v,known:!!n,canonicalName:n==null?void 0:n.name,definition:n})}function Z(l,f,v=""){const n=(l==null?void 0:l.list())??[],c=f===void 0?void 0:new Set(f.map(r=>{var p;return(p=l==null?void 0:l.resolve(r))==null?void 0:p.name}).filter(r=>!!r).map(z)),d=String(v).trim().toLocaleLowerCase();return Object.freeze(n.filter(r=>c&&!c.has(z(r.name))?!1:d?[r.name,r.label,...r.keywords??[]].some(p=>typeof p=="string"&&p.toLocaleLowerCase().includes(d)):!0))}function z(l){return S.normalizeQyIconName(l).toLocaleLowerCase()}const ee={class:"qy-icon-picker"},ae=["onKeydown"],ne={class:"qy-icon-picker__preview","aria-hidden":"true"},oe={key:1,class:"qy-icon-picker__missing","aria-hidden":"true"},te=["id"],le={class:"qy-icon-picker__search","data-testid":"qy-icon-picker-search"},re={key:0,class:"qy-icon-picker__state","data-testid":"qy-icon-picker-loading",role:"status"},ie={key:1,class:"qy-icon-picker__state qy-icon-picker__state--error","data-testid":"qy-icon-picker-error",role:"alert"},ce=["aria-label"],ue=["id","data-qy-icon-option","data-qy-icon-active","aria-selected","tabindex","onClick","onFocus","onKeydown"],se={class:"qy-icon-picker__option-label"},de={key:3,class:"qy-icon-picker__empty"};let pe=0;const fe=e.defineComponent({name:"QyIconPicker",__name:"index",props:{modelValue:{default:""},allowedNames:{},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},size:{default:"default"},placeholder:{default:"点击选择图标"},searchPlaceholder:{default:"搜索图标名称、标签或关键词"},emptyText:{default:"暂无匹配图标"},panelWidth:{default:540},open:{type:Boolean,default:void 0},id:{},ariaLabel:{}},emits:["update:modelValue","change","clear","update:open","open-change"],setup(l,{expose:f,emit:v}){const n=l,c=v,d=e.inject(S.QY_ICON_REGISTRY_KEY,null),r=e.ref(""),p=e.ref(!1),i=e.ref(-1),w=e.ref([]),m=e.ref(!1),g=e.ref(""),V=e.ref(0);let x=!1;const h=e.ref(null),L=e.ref(null),q=e.ref("pointer"),$=`qy-icon-picker-${++pe}`,y=e.computed(()=>X(d,n.modelValue)),s=e.computed(()=>(V.value,Z(d,n.allowedNames,r.value))),_=e.computed(()=>n.open!==void 0),k=e.computed(()=>_.value?n.open===!0:p.value),M=e.computed(()=>"click"),B=e.computed(()=>`${n.id||$}-panel`);e.watch(k,(a,o)=>{!a||o||(r.value="",i.value=F(),w.value=[],!x&&d&&(x=!0,K(d.load())),q.value==="keyboard"&&e.nextTick(()=>{var t,u;return(u=(t=L.value)==null?void 0:t.focus)==null?void 0:u.call(t)}))});function K(a){m.value=!0,g.value="",a.then(()=>{m.value=!1,V.value++},o=>{m.value=!1,g.value=o instanceof Error?o.message:String(o)})}function A(){!d||m.value||K(d.retry())}e.watch(s,()=>{if(!s.value.length){i.value=-1;return}i.value>=s.value.length&&(i.value=0),i.value<0&&(i.value=0)});function P(){n.disabled||(q.value="keyboard",C("keyboard"))}function D(a){n.disabled||_.value&&n.open!==!1||(a.stopImmediatePropagation(),C("pointer"))}function O(a){I(a)}function U(a){a===k.value&&(_.value||(p.value=a),c("open-change",a),a||e.nextTick(()=>{var o,t;return(t=(o=h.value)==null?void 0:o.focus)==null?void 0:t.call(o)}))}function I(a){a&&n.disabled||a!==k.value&&(_.value||(p.value=a),c("update:open",a))}function C(a="programmatic"){q.value=a,I(!0)}function E(){I(!1),e.nextTick(()=>{var a,o;return(o=(a=h.value)==null?void 0:a.focus)==null?void 0:o.call(a)})}function R(){n.disabled||(c("update:modelValue",""),c("change",""),c("clear"))}function N(a){n.disabled||(c("update:modelValue",a.name),c("change",a.name),E())}function j(a){if(a.key==="Escape"){a.preventDefault(),E();return}if(!s.value.length||!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(a.key))return;a.preventDefault();const o=a.key==="ArrowUp"||a.key==="ArrowLeft"?-1:1,t=s.value.length;i.value=(i.value+o+t)%t,e.nextTick(()=>{var u;return(u=w.value[i.value])==null?void 0:u.focus()})}function F(){const a=y.value.canonicalName;if(!a)return s.value.length?0:-1;const o=s.value.findIndex(({name:t})=>t===a);return o>=0?o:s.value.length?0:-1}function Y(a,o){a instanceof HTMLElement&&(w.value[o]=a)}function W(a){return`${B.value}-${encodeURIComponent(a)}`}function G(){var a,o;(o=(a=h.value)==null?void 0:a.focus)==null||o.call(a)}function H(){var a,o;(o=(a=h.value)==null?void 0:a.blur)==null||o.call(a)}return f({focus:G,blur:H,open:C,close:E}),(a,o)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(e.unref(J.QyPopover),{ref:"popoverRef",class:"qy-icon-picker__popover",open:k.value,trigger:M.value,placement:"bottom-start",width:n.panelWidth,"show-delay":0,"hide-delay":0,disabled:n.disabled||_.value&&n.open===!1,"onUpdate:open":O,onOpenChange:U},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"qy-icon-picker__trigger","data-testid":"qy-icon-picker-trigger",onClick:D,onKeydown:[e.withKeys(e.withModifiers(P,["prevent"]),["enter"]),e.withKeys(e.withModifiers(P,["prevent"]),["space"])]},[e.createVNode(e.unref(T.QyInput),{ref_key:"triggerRef",ref:h,id:n.id,"model-value":y.value.value,size:n.size,disabled:n.disabled,clearable:n.clearable,readonly:"",placeholder:n.placeholder,"aria-label":n.ariaLabel,"aria-haspopup":"listbox","aria-expanded":k.value?"true":"false","aria-controls":B.value,onClear:R},{prefix:e.withCtx(()=>[e.createElementVNode("span",ne,[y.value.definition?(e.openBlock(),e.createBlock(e.unref(Q.QyIcon),{key:0,name:y.value.definition.name,size:18},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",oe,"?"))])]),suffix:e.withCtx(()=>[n.clearable&&y.value.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-icon-picker__clear","data-testid":"qy-icon-picker-clear","aria-label":"清空图标",onClick:e.withModifiers(R,["stop","prevent"])},[...o[1]||(o[1]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])])):e.createCommentVNode("",!0)]),_:1},8,["id","model-value","size","disabled","clearable","placeholder","aria-label","aria-expanded","aria-controls"])],40,ae)]),default:e.withCtx(()=>[k.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:B.value,class:"qy-icon-picker__panel",onKeydown:j},[e.createElementVNode("div",le,[e.createVNode(e.unref(T.QyInput),{ref_key:"searchRef",ref:L,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=t=>r.value=t),type:"search",clearable:"",placeholder:n.searchPlaceholder,"aria-label":"搜索图标"},null,8,["modelValue","placeholder"])]),m.value?(e.openBlock(),e.createElementBlock("div",re," 正在加载图标… ")):g.value?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("span",null,e.toDisplayString(g.value),1),e.createElementVNode("button",{type:"button","data-testid":"qy-icon-picker-retry",onClick:A}," 重试 ")])):s.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,class:"qy-icon-picker__grid",role:"listbox","aria-label":n.ariaLabel||"图标列表"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{id:W(t.name),key:t.name,ref_for:!0,ref:b=>Y(b,u),class:e.normalizeClass(["qy-icon-picker__option",{"is-active":i.value===u}]),"data-qy-icon-option":t.name,"data-qy-icon-active":i.value===u?"true":void 0,role:"option","aria-selected":y.value.canonicalName===t.name?"true":"false",tabindex:i.value===u?0:-1,onClick:b=>N(t),onFocus:b=>i.value=u,onKeydown:[e.withKeys(e.withModifiers(b=>N(t),["prevent"]),["enter"]),e.withKeys(e.withModifiers(b=>N(t),["prevent"]),["space"])]},[e.createVNode(e.unref(Q.QyIcon),{name:t.name,size:18,"aria-hidden":"true"},null,8,["name"]),e.createElementVNode("span",se,e.toDisplayString(t.label||t.name),1)],42,ue))),128))],8,ce)):(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(a.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(n.emptyText),1)])]))],40,te)):e.createCommentVNode("",!0)]),_:3},8,["open","trigger","width","disabled"])]))}});exports._sfc_main=fe;
1
+ "use strict";const e=require("vue"),Q=require("./index-CXnL-0Kp.cjs"),T=require("./index-Bdlzmh8A.cjs"),J=require("../qy-popover/index.cjs"),S=require("./index-_Bagw0Pj.cjs");function X(l,f){const v=f==null?"":String(f),n=l&&v?l.resolve(v):void 0;return Object.freeze({value:v,known:!!n,canonicalName:n==null?void 0:n.name,definition:n})}function Z(l,f,v=""){const n=(l==null?void 0:l.list())??[],c=f===void 0?void 0:new Set(f.map(r=>{var p;return(p=l==null?void 0:l.resolve(r))==null?void 0:p.name}).filter(r=>!!r).map(z)),d=String(v).trim().toLocaleLowerCase();return Object.freeze(n.filter(r=>c&&!c.has(z(r.name))?!1:d?[r.name,r.label,...r.keywords??[]].some(p=>typeof p=="string"&&p.toLocaleLowerCase().includes(d)):!0))}function z(l){return S.normalizeQyIconName(l).toLocaleLowerCase()}const ee={class:"qy-icon-picker"},ae=["onKeydown"],ne={class:"qy-icon-picker__preview","aria-hidden":"true"},oe={key:1,class:"qy-icon-picker__missing","aria-hidden":"true"},te=["id"],le={class:"qy-icon-picker__search","data-testid":"qy-icon-picker-search"},re={key:0,class:"qy-icon-picker__state","data-testid":"qy-icon-picker-loading",role:"status"},ie={key:1,class:"qy-icon-picker__state qy-icon-picker__state--error","data-testid":"qy-icon-picker-error",role:"alert"},ce=["aria-label"],ue=["id","data-qy-icon-option","data-qy-icon-active","aria-selected","tabindex","onClick","onFocus","onKeydown"],se={class:"qy-icon-picker__option-label"},de={key:3,class:"qy-icon-picker__empty"};let pe=0;const fe=e.defineComponent({name:"QyIconPicker",__name:"index",props:{modelValue:{default:""},allowedNames:{},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},size:{default:"default"},placeholder:{default:"点击选择图标"},searchPlaceholder:{default:"搜索图标名称、标签或关键词"},emptyText:{default:"暂无匹配图标"},panelWidth:{default:540},open:{type:Boolean,default:void 0},id:{},ariaLabel:{}},emits:["update:modelValue","change","clear","update:open","open-change"],setup(l,{expose:f,emit:v}){const n=l,c=v,d=e.inject(S.QY_ICON_REGISTRY_KEY,null),r=e.ref(""),p=e.ref(!1),i=e.ref(-1),w=e.ref([]),m=e.ref(!1),g=e.ref(""),V=e.ref(0);let x=!1;const h=e.ref(null),L=e.ref(null),q=e.ref("pointer"),$=`qy-icon-picker-${++pe}`,y=e.computed(()=>X(d,n.modelValue)),s=e.computed(()=>(V.value,Z(d,n.allowedNames,r.value))),_=e.computed(()=>n.open!==void 0),k=e.computed(()=>_.value?n.open===!0:p.value),M=e.computed(()=>"click"),B=e.computed(()=>`${n.id||$}-panel`);e.watch(k,(a,o)=>{!a||o||(r.value="",i.value=F(),w.value=[],!x&&d&&(x=!0,K(d.load())),q.value==="keyboard"&&e.nextTick(()=>{var t,u;return(u=(t=L.value)==null?void 0:t.focus)==null?void 0:u.call(t)}))});function K(a){m.value=!0,g.value="",a.then(()=>{m.value=!1,V.value++},o=>{m.value=!1,g.value=o instanceof Error?o.message:String(o)})}function A(){!d||m.value||K(d.retry())}e.watch(s,()=>{if(!s.value.length){i.value=-1;return}i.value>=s.value.length&&(i.value=0),i.value<0&&(i.value=0)});function P(){n.disabled||(q.value="keyboard",C("keyboard"))}function D(a){n.disabled||_.value&&n.open!==!1||(a.stopImmediatePropagation(),C("pointer"))}function O(a){I(a)}function U(a){a===k.value&&(_.value||(p.value=a),c("open-change",a),a||e.nextTick(()=>{var o,t;return(t=(o=h.value)==null?void 0:o.focus)==null?void 0:t.call(o)}))}function I(a){a&&n.disabled||a!==k.value&&(_.value||(p.value=a),c("update:open",a))}function C(a="programmatic"){q.value=a,I(!0)}function E(){I(!1),e.nextTick(()=>{var a,o;return(o=(a=h.value)==null?void 0:a.focus)==null?void 0:o.call(a)})}function R(){n.disabled||(c("update:modelValue",""),c("change",""),c("clear"))}function N(a){n.disabled||(c("update:modelValue",a.name),c("change",a.name),E())}function j(a){if(a.key==="Escape"){a.preventDefault(),E();return}if(!s.value.length||!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(a.key))return;a.preventDefault();const o=a.key==="ArrowUp"||a.key==="ArrowLeft"?-1:1,t=s.value.length;i.value=(i.value+o+t)%t,e.nextTick(()=>{var u;return(u=w.value[i.value])==null?void 0:u.focus()})}function F(){const a=y.value.canonicalName;if(!a)return s.value.length?0:-1;const o=s.value.findIndex(({name:t})=>t===a);return o>=0?o:s.value.length?0:-1}function Y(a,o){a instanceof HTMLElement&&(w.value[o]=a)}function W(a){return`${B.value}-${encodeURIComponent(a)}`}function G(){var a,o;(o=(a=h.value)==null?void 0:a.focus)==null||o.call(a)}function H(){var a,o;(o=(a=h.value)==null?void 0:a.blur)==null||o.call(a)}return f({focus:G,blur:H,open:C,close:E}),(a,o)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(e.unref(J.QyPopover),{ref:"popoverRef",class:"qy-icon-picker__popover",open:k.value,trigger:M.value,placement:"bottom-start",width:n.panelWidth,"show-delay":0,"hide-delay":0,disabled:n.disabled||_.value&&n.open===!1,"onUpdate:open":O,onOpenChange:U},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"qy-icon-picker__trigger","data-testid":"qy-icon-picker-trigger",onClick:D,onKeydown:[e.withKeys(e.withModifiers(P,["prevent"]),["enter"]),e.withKeys(e.withModifiers(P,["prevent"]),["space"])]},[e.createVNode(e.unref(T.QyInput),{ref_key:"triggerRef",ref:h,id:n.id,"model-value":y.value.value,size:n.size,disabled:n.disabled,clearable:n.clearable,readonly:"",placeholder:n.placeholder,"aria-label":n.ariaLabel,"aria-haspopup":"listbox","aria-expanded":k.value?"true":"false","aria-controls":B.value,onClear:R},{prefix:e.withCtx(()=>[e.createElementVNode("span",ne,[y.value.definition?(e.openBlock(),e.createBlock(e.unref(Q.QyIcon),{key:0,name:y.value.definition.name,size:18},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",oe,"?"))])]),suffix:e.withCtx(()=>[n.clearable&&y.value.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-icon-picker__clear","data-testid":"qy-icon-picker-clear","aria-label":"清空图标",onClick:e.withModifiers(R,["stop","prevent"])},[...o[1]||(o[1]=[e.createElementVNode("span",{"aria-hidden":"true"},"×",-1)])])):e.createCommentVNode("",!0)]),_:1},8,["id","model-value","size","disabled","clearable","placeholder","aria-label","aria-expanded","aria-controls"])],40,ae)]),default:e.withCtx(()=>[k.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:B.value,class:"qy-icon-picker__panel",onKeydown:j},[e.createElementVNode("div",le,[e.createVNode(e.unref(T.QyInput),{ref_key:"searchRef",ref:L,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=t=>r.value=t),type:"search",clearable:"",placeholder:n.searchPlaceholder,"aria-label":"搜索图标"},null,8,["modelValue","placeholder"])]),m.value?(e.openBlock(),e.createElementBlock("div",re," 正在加载图标… ")):g.value?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("span",null,e.toDisplayString(g.value),1),e.createElementVNode("button",{type:"button","data-testid":"qy-icon-picker-retry",onClick:A}," 重试 ")])):s.value.length?(e.openBlock(),e.createElementBlock("div",{key:2,class:"qy-icon-picker__grid",role:"listbox","aria-label":n.ariaLabel||"图标列表"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{id:W(t.name),key:t.name,ref_for:!0,ref:b=>Y(b,u),class:e.normalizeClass(["qy-icon-picker__option",{"is-active":i.value===u}]),"data-qy-icon-option":t.name,"data-qy-icon-active":i.value===u?"true":void 0,role:"option","aria-selected":y.value.canonicalName===t.name?"true":"false",tabindex:i.value===u?0:-1,onClick:b=>N(t),onFocus:b=>i.value=u,onKeydown:[e.withKeys(e.withModifiers(b=>N(t),["prevent"]),["enter"]),e.withKeys(e.withModifiers(b=>N(t),["prevent"]),["space"])]},[e.createVNode(e.unref(Q.QyIcon),{name:t.name,size:18,"aria-hidden":"true"},null,8,["name"]),e.createElementVNode("span",se,e.toDisplayString(t.label||t.name),1)],42,ue))),128))],8,ce)):(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(a.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(n.emptyText),1)])]))],40,te)):e.createCommentVNode("",!0)]),_:3},8,["open","trigger","width","disabled"])]))}});exports._sfc_main=fe;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),U=require("element-plus"),L=require("./overlay-stack-DeKq7jZu.cjs"),j=1e3,z=t.defineComponent({name:"QyPopover",inheritAttrs:!1,__name:"index",props:{enterable:{type:Boolean,default:!0},teleported:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:"body"},trigger:{type:String,default:"click"},placement:{type:String,default:"bottom"},effect:{type:String,default:"light"},width:{type:[Number,String],default:240},offset:{type:Number,default:12},showDelay:{type:Number,default:0},hideDelay:{type:Number,default:200},showArrow:{type:Boolean,default:!0},transition:{type:String,default:void 0},disabled:{type:Boolean,default:!1},open:{type:Boolean,default:void 0}},emits:["update:open","open-change","open","close"],setup(n,{expose:S,emit:q}){const o=n,f=q,i=t.computed(()=>o.open!==void 0),w=i.value&&o.open===!0&&!o.disabled,d=t.ref(w),u=t.ref(w),k=t.ref(w),r=t.ref(null),E=t.computed(()=>o.disabled?!1:i.value?o.open===!0:d.value);let a;const b=`qy-popover-${t.getCurrentInstance().uid}`;let c=!1,s;const T=t.computed(()=>typeof o.width=="number"?`${o.width}px`:o.width),C=t.computed(()=>({"--qy-popover-width":T.value,"--qy-popover-mobile-gutter":"24px"})),y=t.useSlots(),N=t.computed(()=>{var e;return((e=y.reference)==null?void 0:e.call(y))??[]});function h(){a&&(clearTimeout(a),a=void 0),r.value=null}function P(e){a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,r.value===e&&(r.value=null)},j)}function l(){if(c)return;const e=E.value;u.value!==e&&(c=!0,s=e,u.value=e)}function p(e){if(!(e&&o.disabled)){if(!i.value){if(d.value===e)return;d.value=e,f("update:open",e),l();return}r.value!==e&&(r.value===null&&o.open===e||(r.value=e,P(e),f("update:open",e),l()))}}function A(e){e===u.value&&(!c||s!==e||(c=!1,s=void 0,e!==k.value&&(k.value=e,r.value===e&&h(),f("open-change",e),f(e?"open":"close"),l())))}function I(e){p(e),l()}function O(){A(!0)}function W(){A(!1)}function $(){p(!1)}const g=new WeakSet;function B(e){if(e.key!=="Escape"&&e.code!=="Escape"||!u.value||e.defaultPrevented)return;const m=document.querySelector(`.${b}`);L.isTopmostVisibleLayer(m)&&(L.claimOverlayEscape(e),g.add(e))}function v(e){g.has(e)&&(g.delete(e),e.stopPropagation(),!e.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation(),p(!1),l()))}return t.watch(E,()=>l()),t.watch(i,e=>{h(),e?d.value=o.open===!0:d.value=u.value,l()}),t.watch(()=>o.open,(e,m)=>{!i.value||r.value===null||(e===r.value||e!==m)&&h()}),t.watch(()=>o.disabled,e=>{e?p(!1):l()}),t.onBeforeUnmount(()=>{window.removeEventListener("keydown",B,!0),document.body.removeEventListener("keydown",v),window.removeEventListener("keydown",v),c=!1,s=void 0,a&&clearTimeout(a)}),t.onMounted(()=>{window.addEventListener("keydown",B,!0),document.body.addEventListener("keydown",v),window.addEventListener("keydown",v)}),S({close:$}),(e,m)=>(t.openBlock(),t.createBlock(t.unref(U.ElPopover),{visible:u.value,trigger:n.trigger,placement:n.placement,effect:n.effect,width:n.width,offset:n.offset,"show-after":n.showDelay,"hide-after":n.hideDelay,"show-arrow":n.showArrow,transition:n.transition,disabled:n.disabled,enterable:n.enterable,teleported:n.teleported,"append-to":n.appendTo,"popper-style":C.value,"popper-class":`qy-popover-popper ${b}`,"onUpdate:visible":I,onAfterEnter:O,onAfterLeave:W},{reference:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.value,(D,K)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(D),{key:D.key??K}))),128))]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","trigger","placement","effect","width","offset","show-after","hide-after","show-arrow","transition","disabled","enterable","teleported","append-to","popper-style","popper-class"]))}});exports._sfc_main=z;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),s=require("element-plus"),u=t.defineComponent({name:"QyTooltip",inheritAttrs:!1,__name:"index",props:{content:{default:""},trigger:{default:()=>["hover","focus"]},enterable:{type:Boolean,default:!1},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},placement:{default:"top"},effect:{default:"dark"},disabled:{type:Boolean,default:!1},showDelay:{default:0},hideDelay:{default:200},offset:{default:12},maxWidth:{default:320}},emits:["open","close"],setup(e,{emit:d}){const f=d,i=t.computed(()=>typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),c=t.computed(()=>({"--qy-tooltip-max-width":i.value})),l=t.ref(!1);let n=!1;t.onBeforeUnmount(()=>{n=!0});function o(a){n||a===l.value||(l.value=a,f(a?"open":"close"))}function r(a){o(a)}return t.watch(()=>e.disabled,a=>{a&&o(!1)}),(a,m)=>(t.openBlock(),t.createBlock(t.unref(s.ElTooltip),{content:e.content,placement:e.placement,effect:e.effect,disabled:e.disabled,"show-after":e.showDelay,"hide-after":e.hideDelay,offset:e.offset,trigger:e.trigger,enterable:e.enterable,teleported:e.teleported,"append-to":e.appendTo,"raw-content":!1,"popper-class":"qy-tooltip-popper","popper-style":c.value,"onUpdate:visible":r},{content:t.withCtx(()=>[t.renderSlot(a.$slots,"content",{},()=>[t.createTextVNode(t.toDisplayString(e.content),1)])]),default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},8,["content","placement","effect","disabled","show-after","hide-after","offset","trigger","enterable","teleported","append-to","popper-style"]))}});exports._sfc_main=u;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as ue, inject as se, ref as d, computed as b, watch as M, nextTick as Q, openBlock as u, createElementBlock as p, createVNode as R, unref as C, withCtx as z, createElementVNode as h, toDisplayString as S, Fragment as de, renderList as pe, withKeys as K, withModifiers as L, normalizeClass as fe, renderSlot as ve, createTextVNode as ye, createCommentVNode as Y, createBlock as me } from "vue";
2
- import { Q as W } from "./index-2D5AFexl.mjs";
3
- import { Q as G } from "./index-B3GsIwhf.mjs";
2
+ import { Q as W } from "./index-DNMRIYkm.mjs";
3
+ import { Q as G } from "./index-BKdw4jD_.mjs";
4
4
  import { QyPopover as he } from "../qy-popover/index.mjs";
5
- import { n as _e, Q as ke } from "./index-ByQyMTPg.mjs";
5
+ import { n as _e, Q as ke } from "./index-DvXzDAmi.mjs";
6
6
  function be(l, y) {
7
7
  const m = y == null ? "" : String(y), a = l && m ? l.resolve(m) : void 0;
8
8
  return Object.freeze({