@qynpm/ui 1.0.33 → 1.0.35

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 (191) hide show
  1. package/README.md +88 -5
  2. package/dist/index.cjs +7 -4
  3. package/dist/index.mjs +79 -72
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-button/index.cjs +1 -1
  7. package/dist/qy-button/index.mjs +1 -1
  8. package/dist/qy-checkbox/index.cjs +1 -1
  9. package/dist/qy-checkbox/index.mjs +1 -1
  10. package/dist/qy-checkbox-group/index.cjs +1 -1
  11. package/dist/qy-checkbox-group/index.mjs +1 -1
  12. package/dist/qy-collapse/index.cjs +1 -1
  13. package/dist/qy-collapse/index.mjs +1 -1
  14. package/dist/qy-color-picker/index.cjs +1 -0
  15. package/dist/qy-color-picker/index.mjs +7 -0
  16. package/dist/qy-dialog/index.cjs +1 -1
  17. package/dist/qy-dialog/index.mjs +2 -2
  18. package/dist/qy-drawer/index.cjs +1 -1
  19. package/dist/qy-drawer/index.mjs +1 -1
  20. package/dist/qy-dropdown/index.cjs +1 -1
  21. package/dist/qy-dropdown/index.mjs +1 -1
  22. package/dist/qy-file-picker/index.cjs +1 -1
  23. package/dist/qy-file-picker/index.mjs +1 -1
  24. package/dist/qy-form-section/index.cjs +1 -1
  25. package/dist/qy-form-section/index.mjs +1 -1
  26. package/dist/qy-fullscreen/index.cjs +1 -1
  27. package/dist/qy-fullscreen/index.mjs +1 -1
  28. package/dist/qy-icon/index.cjs +1 -1
  29. package/dist/qy-icon/index.mjs +2 -2
  30. package/dist/qy-icon-picker/index.cjs +1 -1
  31. package/dist/qy-icon-picker/index.mjs +1 -1
  32. package/dist/qy-iframe/index.cjs +1 -0
  33. package/dist/qy-iframe/index.mjs +7 -0
  34. package/dist/qy-image/index.cjs +1 -1
  35. package/dist/qy-image/index.mjs +1 -1
  36. package/dist/qy-image-preview/index.cjs +1 -1
  37. package/dist/qy-image-preview/index.mjs +2 -2
  38. package/dist/qy-image-upload/index.cjs +1 -1
  39. package/dist/qy-image-upload/index.mjs +1 -1
  40. package/dist/qy-input/index.cjs +1 -1
  41. package/dist/qy-input/index.mjs +1 -1
  42. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  43. package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
  44. package/dist/qy-menu-actions/index.cjs +1 -1
  45. package/dist/qy-menu-actions/index.mjs +1 -1
  46. package/dist/qy-money-input/index.cjs +1 -1
  47. package/dist/qy-money-input/index.mjs +1 -1
  48. package/dist/qy-popconfirm/index.cjs +2 -0
  49. package/dist/qy-popconfirm/index.mjs +8 -0
  50. package/dist/qy-popover/index.cjs +1 -1
  51. package/dist/qy-popover/index.mjs +1 -1
  52. package/dist/qy-radio/index.cjs +1 -1
  53. package/dist/qy-radio/index.mjs +1 -1
  54. package/dist/qy-radio-group/index.cjs +1 -1
  55. package/dist/qy-radio-group/index.mjs +1 -1
  56. package/dist/qy-record-quote-search/index.cjs +1 -1
  57. package/dist/qy-record-quote-search/index.mjs +1 -1
  58. package/dist/qy-remark-image/index.cjs +1 -1
  59. package/dist/qy-remark-image/index.mjs +1 -1
  60. package/dist/qy-remote-select/index.cjs +1 -1
  61. package/dist/qy-remote-select/index.mjs +1 -1
  62. package/dist/qy-result/index.cjs +1 -1
  63. package/dist/qy-result/index.mjs +1 -1
  64. package/dist/qy-scrollbar/index.cjs +1 -1
  65. package/dist/qy-scrollbar/index.mjs +1 -1
  66. package/dist/qy-search-input/index.cjs +1 -1
  67. package/dist/qy-search-input/index.mjs +1 -1
  68. package/dist/qy-select/index.cjs +1 -1
  69. package/dist/qy-select/index.mjs +1 -1
  70. package/dist/qy-selection-dialog/index.cjs +1 -1
  71. package/dist/qy-selection-dialog/index.mjs +1 -1
  72. package/dist/qy-switch/index.cjs +1 -1
  73. package/dist/qy-switch/index.mjs +1 -1
  74. package/dist/qy-table-column-settings/index.cjs +1 -1
  75. package/dist/qy-table-column-settings/index.mjs +1 -1
  76. package/dist/qy-tag/index.cjs +1 -1
  77. package/dist/qy-tag/index.mjs +1 -1
  78. package/dist/qy-tree/index.cjs +1 -1
  79. package/dist/qy-tree/index.mjs +1 -1
  80. package/dist/qy-tree-select/index.cjs +1 -1
  81. package/dist/qy-tree-select/index.mjs +1 -1
  82. package/dist/qy-upload/index.cjs +1 -1
  83. package/dist/qy-upload/index.mjs +1 -1
  84. package/dist/qy-watermark/index.cjs +1 -0
  85. package/dist/qy-watermark/index.mjs +7 -0
  86. package/dist/shared/{index-D-YyFaZ6.cjs → index-3qEac4h8.cjs} +1 -1
  87. package/dist/shared/{index-B0zL9hEY.mjs → index-4SkLDBra.mjs} +1 -1
  88. package/dist/shared/{index-gcsw_rtX.mjs → index-BekN1g_r.mjs} +967 -955
  89. package/dist/shared/{index-B6xIO6kg.cjs → index-Bi9wgcgT.cjs} +1 -1
  90. package/dist/shared/{index-D5DmmUX2.cjs → index-Bli6Gx5d.cjs} +1 -1
  91. package/dist/shared/{index-CaDqecpT.mjs → index-BuUtJrIy.mjs} +9 -9
  92. package/dist/shared/{index-DqsG1Mam.cjs → index-C7lRQtzs.cjs} +1 -1
  93. package/dist/shared/{index-DfR8Z9MN.mjs → index-CdnHMuo3.mjs} +1 -1
  94. package/dist/shared/index-Ce_hvR--.cjs +1 -0
  95. package/dist/shared/{index-BWDaV6FO.cjs → index-CwY_jv_I.cjs} +1 -1
  96. package/dist/shared/{index-xuTVtF4x.mjs → index-DY-CA7Vr.mjs} +1 -1
  97. package/dist/shared/index-DlGwHshu.cjs +1 -0
  98. package/dist/shared/{index-CwzztWPU.cjs → index-DnHfk7NM.cjs} +1 -1
  99. package/dist/shared/index-Dr-Q5krU.mjs +71 -0
  100. package/dist/shared/{index-1LT6Q6XJ.mjs → index-Dwf-JfXM.mjs} +1 -1
  101. package/dist/shared/{index-BmJPEXUM.mjs → index-S8HW36Mc.mjs} +2 -2
  102. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-C91DUwOD.mjs → index.vue_vue_type_script_setup_true_lang-C6-hVGUO.mjs} +1 -1
  103. package/dist/shared/index.vue_vue_type_script_setup_true_lang-COAUEujY.mjs +48 -0
  104. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +1 -0
  105. package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cr9PdvyR.cjs +1 -0
  106. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CuXBYNXZ.cjs → index.vue_vue_type_script_setup_true_lang-DOuk75uN.cjs} +1 -1
  107. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DoL8xnpo.mjs → index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs} +9 -9
  108. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DP-jqqo2.mjs → index.vue_vue_type_script_setup_true_lang-S-rQ0p3E.mjs} +1 -1
  109. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DkDEcB4G.cjs → index.vue_vue_type_script_setup_true_lang-lvZQ_Cu6.cjs} +1 -1
  110. package/dist/shared/{index.vue_vue_type_style_index_0_lang-CL_IFx-Z.cjs → index.vue_vue_type_style_index_0_lang-BcZb1U13.cjs} +1 -1
  111. package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +1 -0
  112. package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +172 -0
  113. package/dist/shared/{index.vue_vue_type_style_index_0_lang-DXQ9l1XF.mjs → index.vue_vue_type_style_index_0_lang-CIcZet5j.mjs} +3 -3
  114. package/dist/shared/index.vue_vue_type_style_index_0_lang-Ch3QcF8t.cjs +1 -0
  115. package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +1 -0
  116. package/dist/shared/{index.vue_vue_type_style_index_0_lang-BJXS2dVf.mjs → index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs} +19 -17
  117. package/dist/shared/index.vue_vue_type_style_index_0_lang-b0y8p1p1.mjs +215 -0
  118. package/dist/shared/utils-BjEXwY3L.cjs +1 -0
  119. package/dist/shared/utils-DoyI5oM8.mjs +148 -0
  120. package/index.d.ts +60 -21
  121. package/package.json +25 -1
  122. package/qy-alert/index.d.ts +64 -64
  123. package/qy-autocomplete/index.d.ts +5 -5
  124. package/qy-avatar/index.d.ts +67 -67
  125. package/qy-badge/index.d.ts +63 -63
  126. package/qy-card/index.d.ts +64 -64
  127. package/qy-cascader/index.d.ts +198 -198
  128. package/qy-collapse/index.d.ts +59 -59
  129. package/qy-collapse-item/index.d.ts +45 -45
  130. package/qy-color-picker/index.d.ts +36 -0
  131. package/qy-descriptions/index.d.ts +47 -47
  132. package/qy-descriptions-item/index.d.ts +46 -46
  133. package/qy-dialog/index.d.ts +63 -63
  134. package/qy-divider/index.d.ts +53 -53
  135. package/qy-drawer/index.d.ts +55 -55
  136. package/qy-empty/index.d.ts +51 -51
  137. package/qy-iframe/index.d.ts +66 -0
  138. package/qy-image/index.d.ts +28 -28
  139. package/qy-image-preview/index.d.ts +21 -20
  140. package/qy-link/index.d.ts +69 -69
  141. package/qy-loading/index.d.ts +25 -25
  142. package/qy-menu-actions/index.d.ts +29 -29
  143. package/qy-popconfirm/index.d.ts +55 -0
  144. package/qy-progress/index.d.ts +74 -74
  145. package/qy-result/index.d.ts +64 -64
  146. package/qy-scrollbar/index.d.ts +85 -85
  147. package/qy-skeleton/index.d.ts +54 -54
  148. package/qy-skeleton-item/index.d.ts +48 -48
  149. package/qy-step/index.d.ts +55 -55
  150. package/qy-steps/index.d.ts +62 -62
  151. package/qy-tab-pane/index.d.ts +40 -40
  152. package/qy-table-column-settings/index.d.ts +18 -18
  153. package/qy-tabs/index.d.ts +84 -84
  154. package/qy-tree/index.d.ts +132 -132
  155. package/qy-tree-select/index.d.ts +123 -123
  156. package/qy-watermark/index.d.ts +72 -0
  157. package/dist/shared/index-uhxRj2ZT.cjs +0 -1
  158. package/dist/shared/index.vue_vue_type_script_setup_true_lang-5gku7Zwv.cjs +0 -1
  159. package/dist/shared/index.vue_vue_type_style_index_0_lang-M0qKRXd2.cjs +0 -1
  160. package/dist/shared/utils-D2KAQCCB.cjs +0 -1
  161. package/dist/shared/utils-DUntDntI.mjs +0 -112
  162. /package/dist/shared/{index-AirHUQwm.cjs → index-AMu0L6uU.cjs} +0 -0
  163. /package/dist/shared/{index-D6ybNdgn.mjs → index-B1b3BksF.mjs} +0 -0
  164. /package/dist/shared/{index-BpI0jwYK.cjs → index-BPaVDCe6.cjs} +0 -0
  165. /package/dist/shared/{index-CCZttbsg.cjs → index-BdTlpKtr.cjs} +0 -0
  166. /package/dist/shared/{index-Bxz4crCd.cjs → index-BkX9xlbI.cjs} +0 -0
  167. /package/dist/shared/{index-DLLDXfic.cjs → index-Bvot0uXo.cjs} +0 -0
  168. /package/dist/shared/{index-CaNxcPSD.mjs → index-C91mzAI3.mjs} +0 -0
  169. /package/dist/shared/{index-CmRclPWX.mjs → index-C_1KP3l9.mjs} +0 -0
  170. /package/dist/shared/{index-DEZF-Fkt.mjs → index-D5S48q1B.mjs} +0 -0
  171. /package/dist/shared/{index-Co0_4YEV.mjs → index-D8E_xu0N.mjs} +0 -0
  172. /package/dist/shared/{index-Bmw9BNXm.cjs → index-DCzxcvkn.cjs} +0 -0
  173. /package/dist/shared/{index-C31wpivi.mjs → index-DK0hjfWr.mjs} +0 -0
  174. /package/dist/shared/{index-D_rRdrge.mjs → index-DZRFSGxO.mjs} +0 -0
  175. /package/dist/shared/{index-BDdhBEFr.cjs → index-Dc6gLgAz.cjs} +0 -0
  176. /package/dist/shared/{index-C-ZAw_DP.mjs → index-DcohgM8A.mjs} +0 -0
  177. /package/dist/shared/{index-BxvS3vlc.cjs → index-Di4bIOiB.cjs} +0 -0
  178. /package/dist/shared/{index-Bs2OQHXk.mjs → index-JjHutKmT.mjs} +0 -0
  179. /package/dist/shared/{index-seQHtqdh.mjs → index-Od6HC8Un.mjs} +0 -0
  180. /package/dist/shared/{index-rcu9CzSn.cjs → index-nSFTxVz8.cjs} +0 -0
  181. /package/dist/shared/{index-DIs6iPjF.cjs → index-nos4Y-fm.cjs} +0 -0
  182. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-S6QPMZay.cjs → index.vue_vue_type_script_setup_true_lang-CglCPcj-.cjs} +0 -0
  183. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-BLF3RNlY.mjs → index.vue_vue_type_script_setup_true_lang-q37rBg6Z.mjs} +0 -0
  184. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DUgOOzEZ.cjs → index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs} +0 -0
  185. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-lmRmXLwB.cjs → index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs} +0 -0
  186. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DWiolYb3.mjs → index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs} +0 -0
  187. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-B-FeHatv.mjs → index.vue_vue_type_style_index_0_lang-CVdFZeHK.mjs} +0 -0
  188. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DzfGx6ce.mjs → index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs} +0 -0
  189. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CUqnwExG.mjs → index.vue_vue_type_style_index_0_lang-Tzo8o6M8.mjs} +0 -0
  190. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DOfJV2oz.cjs → index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs} +0 -0
  191. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Cn3P9d4L.cjs → index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs} +0 -0
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, useAttrs as u, computed as a, openBlock as m, createBlock as p, unref as h, mergeProps as g, withCtx as _, renderSlot as v } from "vue";
2
+ import { ElWatermark as x } from "element-plus";
3
+ const w = /* @__PURE__ */ d({
4
+ name: "QyWatermark",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ content: { default: "" },
9
+ image: {},
10
+ zIndex: { default: 9 },
11
+ rotate: { default: -22 },
12
+ width: {},
13
+ height: {},
14
+ gap: { default: () => [100, 100] },
15
+ offset: {},
16
+ font: {}
17
+ },
18
+ setup(o) {
19
+ const t = o, s = u(), f = a(() => {
20
+ const r = {};
21
+ for (const [e, c] of Object.entries(s))
22
+ (e === "class" || e === "style" || e === "id" || e === "title" || e === "role" || e.startsWith("data-") || e.startsWith("aria-")) && (r[e] = c);
23
+ return r;
24
+ }), n = a(() => ({
25
+ content: t.content,
26
+ image: t.image,
27
+ zIndex: t.zIndex,
28
+ rotate: t.rotate,
29
+ width: t.width,
30
+ height: t.height,
31
+ gap: t.gap,
32
+ offset: t.offset,
33
+ font: t.font
34
+ })), i = a(() => ({
35
+ ...n.value,
36
+ ...f.value
37
+ })), l = a(() => JSON.stringify(n.value));
38
+ return (r, e) => (m(), p(h(x), g({ key: l.value }, i.value), {
39
+ default: _(() => [
40
+ v(r.$slots, "default")
41
+ ]),
42
+ _: 3
43
+ }, 16));
44
+ }
45
+ });
46
+ export {
47
+ w as _
48
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),c=require("element-plus"),s=require("./utils-BjEXwY3L.cjs"),m=e.defineComponent({name:"QyImagePreview",__name:"index",props:{open:{type:Boolean,default:!1},urlList:{default:()=>[]},initialIndex:{default:0},hideOnClickModal:{type:Boolean,default:!0}},emits:["update:open","close"],setup(n,{emit:a}){const l=n,i=a;let r="";const u=e.computed(()=>l.urlList.map(t=>s.normalizeImageSrc(t)).filter(Boolean));e.watch(()=>l.open,t=>{if(t){r=document.body.style.overflow,document.body.style.overflow="hidden";return}o()}),e.onBeforeUnmount(o);function d(){o(),i("update:open",!1),i("close")}function o(){typeof document>"u"||(document.body.style.overflow=r)}return(t,f)=>n.open&&u.value.length?(e.openBlock(),e.createBlock(e.unref(c.ElImageViewer),{key:0,"url-list":u.value,"initial-index":n.initialIndex,"hide-on-click-modal":n.hideOnClickModal,teleported:!0,onClose:d},null,8,["url-list","initial-index","hide-on-click-modal"])):e.createCommentVNode("",!0)}});exports._sfc_main=m;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),l=require("element-plus"),d=e.defineComponent({name:"QyWatermark",inheritAttrs:!1,__name:"index",props:{content:{default:""},image:{},zIndex:{default:9},rotate:{default:-22},width:{},height:{},gap:{default:()=>[100,100]},offset:{},font:{}},setup(a){const t=a,o=e.useAttrs(),c=e.computed(()=>{const n={};for(const[r,f]of Object.entries(o))(r==="class"||r==="style"||r==="id"||r==="title"||r==="role"||r.startsWith("data-")||r.startsWith("aria-"))&&(n[r]=f);return n}),s=e.computed(()=>({content:t.content,image:t.image,zIndex:t.zIndex,rotate:t.rotate,width:t.width,height:t.height,gap:t.gap,offset:t.offset,font:t.font})),i=e.computed(()=>({...s.value,...c.value})),u=e.computed(()=>JSON.stringify(s.value));return(n,r)=>(e.openBlock(),e.createBlock(e.unref(l.ElWatermark),e.mergeProps({key:u.value},i.value),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}});exports._sfc_main=d;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),m=require("element-plus"),f=require("./index-Bmw9BNXm.cjs"),b=e.defineComponent({name:"QyCheckboxGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},options:{default:()=>[]},disabled:{type:Boolean,default:!1},min:{},max:{},size:{default:void 0},ariaLabel:{}},emits:["update:modelValue","change"],setup(d,{emit:i}){const l=d,s=i,o=e.useAttrs(),n=e.computed(()=>Object.fromEntries(Object.entries(o).filter(([a])=>a==="class"||a==="style"||a==="role"||a==="title"||a==="id"||a.startsWith("data-")||a.startsWith("aria-"))));function r(a){s("update:modelValue",a.slice())}function u(a){s("change",a.slice())}return(a,p)=>(e.openBlock(),e.createBlock(e.unref(m.ElCheckboxGroup),e.mergeProps(n.value,{"model-value":l.modelValue,disabled:l.disabled,min:l.min,max:l.max,size:l.size,"aria-label":l.ariaLabel,"onUpdate:modelValue":r,onChange:u}),{default:e.withCtx(()=>[a.$slots.default?e.renderSlot(a.$slots,"default",{},void 0,void 0,0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.options,(t,c)=>(e.openBlock(),e.createBlock(f.Checkbox,{key:`${String(t.value)}-${c}`,"model-value":l.modelValue.includes(t.value),value:t.value,disabled:l.disabled||t.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1032,["model-value","value","disabled"]))),128))]),_:3},16,["model-value","disabled","min","max","size","aria-label"]))}});exports._sfc_main=b;
1
+ "use strict";const e=require("vue"),m=require("element-plus"),f=require("./index-DCzxcvkn.cjs"),b=e.defineComponent({name:"QyCheckboxGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},options:{default:()=>[]},disabled:{type:Boolean,default:!1},min:{},max:{},size:{default:void 0},ariaLabel:{}},emits:["update:modelValue","change"],setup(d,{emit:i}){const l=d,s=i,o=e.useAttrs(),n=e.computed(()=>Object.fromEntries(Object.entries(o).filter(([a])=>a==="class"||a==="style"||a==="role"||a==="title"||a==="id"||a.startsWith("data-")||a.startsWith("aria-"))));function r(a){s("update:modelValue",a.slice())}function u(a){s("change",a.slice())}return(a,p)=>(e.openBlock(),e.createBlock(e.unref(m.ElCheckboxGroup),e.mergeProps(n.value,{"model-value":l.modelValue,disabled:l.disabled,min:l.min,max:l.max,size:l.size,"aria-label":l.ariaLabel,"onUpdate:modelValue":r,onChange:u}),{default:e.withCtx(()=>[a.$slots.default?e.renderSlot(a.$slots,"default",{},void 0,void 0,0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.options,(t,c)=>(e.openBlock(),e.createBlock(f.Checkbox,{key:`${String(t.value)}-${c}`,"model-value":l.modelValue.includes(t.value),value:t.value,disabled:l.disabled||t.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1032,["model-value","value","disabled"]))),128))]),_:3},16,["model-value","disabled","min","max","size","aria-label"]))}});exports._sfc_main=b;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as u, computed as c, watch as m, onBeforeUnmount as f, openBlock as s, createBlock as p, unref as y, createCommentVNode as h } from "vue";
2
2
  import { ElImageViewer as v } from "element-plus";
3
- import { n as w } from "./utils-DUntDntI.mjs";
3
+ import { n as w } from "./utils-DoyI5oM8.mjs";
4
4
  const I = /* @__PURE__ */ u({
5
5
  name: "QyImagePreview",
6
6
  __name: "index",
@@ -12,25 +12,25 @@ const I = /* @__PURE__ */ u({
12
12
  },
13
13
  emits: ["update:open", "close"],
14
14
  setup(e, { emit: a }) {
15
- const t = e, l = a;
15
+ const n = e, l = a;
16
16
  let i = "";
17
17
  const r = c(
18
- () => t.urlList.map((o) => w(o)).filter(Boolean)
18
+ () => n.urlList.map((o) => w(o)).filter(Boolean)
19
19
  );
20
20
  m(
21
- () => t.open,
21
+ () => n.open,
22
22
  (o) => {
23
23
  if (o) {
24
24
  i = document.body.style.overflow, document.body.style.overflow = "hidden";
25
25
  return;
26
26
  }
27
- n();
27
+ t();
28
28
  }
29
- ), f(n);
29
+ ), f(t);
30
30
  function d() {
31
- n(), l("update:open", !1), l("close");
31
+ t(), l("update:open", !1), l("close");
32
32
  }
33
- function n() {
33
+ function t() {
34
34
  typeof document > "u" || (document.body.style.overflow = i);
35
35
  }
36
36
  return (o, k) => e.open && r.value.length ? (s(), p(y(v), {
@@ -38,7 +38,7 @@ const I = /* @__PURE__ */ u({
38
38
  "url-list": r.value,
39
39
  "initial-index": e.initialIndex,
40
40
  "hide-on-click-modal": e.hideOnClickModal,
41
- teleport: "body",
41
+ teleported: !0,
42
42
  onClose: d
43
43
  }, null, 8, ["url-list", "initial-index", "hide-on-click-modal"])) : h("", !0);
44
44
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, useAttrs as G, computed as d, ref as S, openBlock as o, createBlock as u, unref as $, mergeProps as i, withCtx as f, renderSlot as m, createElementBlock as E, Fragment as O, renderList as w, resolveDynamicComponent as x, createTextVNode as A, toDisplayString as P } from "vue";
2
2
  import { ElRadioButton as j, ElRadioGroup as D } from "element-plus";
3
- import { R as N } from "./index-C31wpivi.mjs";
3
+ import { R as N } from "./index-DK0hjfWr.mjs";
4
4
  const I = /* @__PURE__ */ C({
5
5
  name: "QyRadioGroup",
6
6
  inheritAttrs: !1,
@@ -1 +1 @@
1
- "use strict";const a=require("vue"),u=require("element-plus"),R=require("./index-CCZttbsg.cjs"),_=a.defineComponent({name:"QyRadioGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},disabled:{type:Boolean,default:!1},size:{default:void 0},name:{default:void 0},type:{default:"radio"},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{expose:i,emit:c}){const l=s,d=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e==="id"||e.startsWith("data-")||e.startsWith("aria-")))),n=a.ref(null),b=a.computed(()=>l.type==="button"?u.ElRadioButton:R.Radio),p=a.computed(()=>l.options.map(e=>{const r=e[l.labelKey],t=e[l.valueKey],o=v(t)?t:e.value??e.label??"";return{raw:e,label:String(r??e.label??e.value??""),value:o,disabled:!!e[l.disabledKey]}}));function v(e){return typeof e=="boolean"||typeof e=="string"||typeof e=="number"}function y(e){const r={modelValue:l.modelValue??void 0,value:e.value,label:e.label,disabled:e.disabled,size:l.size,name:l.name};return l.type==="button"?r:{...r,border:l.border}}function g(e,r){return`${String(e.value??e.label)}-${r}`}function h(e){d("update:modelValue",e)}function V(e){d("change",e)}function B(){return n.value}return i({getRadioGroupInstance:B}),(e,r)=>(a.openBlock(),a.createBlock(a.unref(u.ElRadioGroup),a.mergeProps({ref_key:"radioGroupRef",ref:n},m.value,{"model-value":l.modelValue,disabled:l.disabled,size:l.size,name:l.name,"onUpdate:modelValue":h,onChange:V}),{default:a.withCtx(()=>[e.$slots.default?a.renderSlot(e.$slots,"default",{},void 0,void 0,0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,(t,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b.value),a.mergeProps({key:g(t,o)},{ref_for:!0},y(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"option",{option:t.raw,label:t.label,value:t.value,disabled:t.disabled},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:2},1040))),128))]),_:3},16,["model-value","disabled","size","name"]))}});exports._sfc_main=_;
1
+ "use strict";const a=require("vue"),u=require("element-plus"),R=require("./index-BdTlpKtr.cjs"),_=a.defineComponent({name:"QyRadioGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},disabled:{type:Boolean,default:!1},size:{default:void 0},name:{default:void 0},type:{default:"radio"},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{expose:i,emit:c}){const l=s,d=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e==="id"||e.startsWith("data-")||e.startsWith("aria-")))),n=a.ref(null),b=a.computed(()=>l.type==="button"?u.ElRadioButton:R.Radio),p=a.computed(()=>l.options.map(e=>{const r=e[l.labelKey],t=e[l.valueKey],o=v(t)?t:e.value??e.label??"";return{raw:e,label:String(r??e.label??e.value??""),value:o,disabled:!!e[l.disabledKey]}}));function v(e){return typeof e=="boolean"||typeof e=="string"||typeof e=="number"}function y(e){const r={modelValue:l.modelValue??void 0,value:e.value,label:e.label,disabled:e.disabled,size:l.size,name:l.name};return l.type==="button"?r:{...r,border:l.border}}function g(e,r){return`${String(e.value??e.label)}-${r}`}function h(e){d("update:modelValue",e)}function V(e){d("change",e)}function B(){return n.value}return i({getRadioGroupInstance:B}),(e,r)=>(a.openBlock(),a.createBlock(a.unref(u.ElRadioGroup),a.mergeProps({ref_key:"radioGroupRef",ref:n},m.value,{"model-value":l.modelValue,disabled:l.disabled,size:l.size,name:l.name,"onUpdate:modelValue":h,onChange:V}),{default:a.withCtx(()=>[e.$slots.default?a.renderSlot(e.$slots,"default",{},void 0,void 0,0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,(t,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b.value),a.mergeProps({key:g(t,o)},{ref_for:!0},y(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"option",{option:t.raw,label:t.label,value:t.value,disabled:t.disabled},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:2},1040))),128))]),_:3},16,["model-value","disabled","size","name"]))}});exports._sfc_main=_;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),E=require("./index-B6xIO6kg.cjs"),K=require("./index-rcu9CzSn.cjs"),j=require("../qy-popover/index.cjs"),L=require("./index-AirHUQwm.cjs");function F(l,p){const f=p==null?"":String(p),n=l&&f?l.resolve(f):void 0;return Object.freeze({value:f,known:!!n,canonicalName:n==null?void 0:n.name,definition:n})}function Y(l,p,f=""){const n=(l==null?void 0:l.list())??[],c=p===void 0?void 0:new Set(p.map(r=>{var s;return(s=l==null?void 0:l.resolve(r))==null?void 0:s.name}).filter(r=>!!r).map(P)),h=String(f).trim().toLocaleLowerCase();return Object.freeze(n.filter(r=>c&&!c.has(P(r.name))?!1:h?[r.name,r.label,...r.keywords??[]].some(s=>typeof s=="string"&&s.toLocaleLowerCase().includes(h)):!0))}function P(l){return L.normalizeQyIconName(l).toLocaleLowerCase()}const W={class:"qy-icon-picker"},G=["onKeydown"],H={class:"qy-icon-picker__preview","aria-hidden":"true"},J={key:1,class:"qy-icon-picker__missing","aria-hidden":"true"},X=["id"],Z={class:"qy-icon-picker__search","data-testid":"qy-icon-picker-search"},ee=["aria-label"],ae=["id","data-qy-icon-option","data-qy-icon-active","aria-selected","tabindex","onClick","onFocus","onKeydown"],ne={class:"qy-icon-picker__option-label"},oe={key:1,class:"qy-icon-picker__empty"};let te=0;const le=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:p,emit:f}){const n=l,c=f,h=e.inject(L.QY_ICON_REGISTRY_KEY,null),r=e.ref(""),s=e.ref(!1),i=e.ref(-1),b=e.ref([]),y=e.ref(null),x=e.ref(null),w=e.ref("pointer"),Q=`qy-icon-picker-${++te}`,v=e.computed(()=>F(h,n.modelValue)),d=e.computed(()=>Y(h,n.allowedNames,r.value)),k=e.computed(()=>n.open!==void 0),m=e.computed(()=>k.value?n.open===!0:s.value),R=e.computed(()=>"click"),g=e.computed(()=>`${n.id||Q}-panel`);e.watch(m,(a,o)=>{!a||o||(r.value="",i.value=M(),b.value=[],w.value==="keyboard"&&e.nextTick(()=>{var t,u;return(u=(t=x.value)==null?void 0:t.focus)==null?void 0:u.call(t)}))}),e.watch(d,()=>{if(!d.value.length){i.value=-1;return}i.value>=d.value.length&&(i.value=0),i.value<0&&(i.value=0)});function N(){n.disabled||(w.value="keyboard",I("keyboard"))}function T(a){n.disabled||k.value&&n.open!==!1||(a.stopImmediatePropagation(),I("pointer"))}function z(a){q(a)}function $(a){a===m.value&&(k.value||(s.value=a),c("open-change",a),a||e.nextTick(()=>{var o,t;return(t=(o=y.value)==null?void 0:o.focus)==null?void 0:t.call(o)}))}function q(a){a&&n.disabled||a!==m.value&&(k.value||(s.value=a),c("update:open",a))}function I(a="programmatic"){w.value=a,q(!0)}function B(){q(!1),e.nextTick(()=>{var a,o;return(o=(a=y.value)==null?void 0:a.focus)==null?void 0:o.call(a)})}function V(){n.disabled||(c("update:modelValue",""),c("change",""),c("clear"))}function C(a){n.disabled||(c("update:modelValue",a.name),c("change",a.name),B())}function S(a){if(a.key==="Escape"){a.preventDefault(),B();return}if(!d.value.length||!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(a.key))return;a.preventDefault();const o=a.key==="ArrowUp"||a.key==="ArrowLeft"?-1:1,t=d.value.length;i.value=(i.value+o+t)%t,e.nextTick(()=>{var u;return(u=b.value[i.value])==null?void 0:u.focus()})}function M(){const a=v.value.canonicalName;if(!a)return d.value.length?0:-1;const o=d.value.findIndex(({name:t})=>t===a);return o>=0?o:d.value.length?0:-1}function A(a,o){a instanceof HTMLElement&&(b.value[o]=a)}function O(a){return`${g.value}-${encodeURIComponent(a)}`}function D(){var a,o;(o=(a=y.value)==null?void 0:a.focus)==null||o.call(a)}function U(){var a,o;(o=(a=y.value)==null?void 0:a.blur)==null||o.call(a)}return p({focus:D,blur:U,open:I,close:B}),(a,o)=>(e.openBlock(),e.createElementBlock("div",W,[e.createVNode(e.unref(j.QyPopover),{ref:"popoverRef",class:"qy-icon-picker__popover",open:m.value,trigger:R.value,placement:"bottom-start",width:n.panelWidth,"show-delay":0,"hide-delay":0,disabled:n.disabled||k.value&&n.open===!1,"onUpdate:open":z,onOpenChange:$},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"qy-icon-picker__trigger","data-testid":"qy-icon-picker-trigger",onClick:T,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},[e.createVNode(e.unref(K.QyInput),{ref_key:"triggerRef",ref:y,id:n.id,"model-value":v.value.value,size:n.size,disabled:n.disabled,clearable:n.clearable,readonly:"",placeholder:n.placeholder,"aria-label":n.ariaLabel,"aria-haspopup":"listbox","aria-expanded":m.value?"true":"false","aria-controls":g.value,onClear:V},{prefix:e.withCtx(()=>[e.createElementVNode("span",H,[v.value.definition?(e.openBlock(),e.createBlock(e.unref(E.QyIcon),{key:0,name:v.value.definition.name,size:18},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",J,"?"))])]),suffix:e.withCtx(()=>[n.clearable&&v.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(V,["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,G)]),default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:g.value,class:"qy-icon-picker__panel",onKeydown:S},[e.createElementVNode("div",Z,[e.createVNode(e.unref(K.QyInput),{ref_key:"searchRef",ref:x,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"])]),d.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qy-icon-picker__grid",role:"listbox","aria-label":n.ariaLabel||"图标列表"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{id:O(t.name),key:t.name,ref_for:!0,ref:_=>A(_,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":v.value.canonicalName===t.name?"true":"false",tabindex:i.value===u?0:-1,onClick:_=>C(t),onFocus:_=>i.value=u,onKeydown:[e.withKeys(e.withModifiers(_=>C(t),["prevent"]),["enter"]),e.withKeys(e.withModifiers(_=>C(t),["prevent"]),["space"])]},[e.createVNode(e.unref(E.QyIcon),{name:t.name,size:18,"aria-hidden":"true"},null,8,["name"]),e.createElementVNode("span",ne,e.toDisplayString(t.label||t.name),1)],42,ae))),128))],8,ee)):(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(a.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(n.emptyText),1)])]))],40,X)):e.createCommentVNode("",!0)]),_:3},8,["open","trigger","width","disabled"])]))}});exports._sfc_main=le;
1
+ "use strict";const e=require("vue"),E=require("./index-Bi9wgcgT.cjs"),K=require("./index-nSFTxVz8.cjs"),j=require("../qy-popover/index.cjs"),L=require("./index-AMu0L6uU.cjs");function F(l,p){const f=p==null?"":String(p),n=l&&f?l.resolve(f):void 0;return Object.freeze({value:f,known:!!n,canonicalName:n==null?void 0:n.name,definition:n})}function Y(l,p,f=""){const n=(l==null?void 0:l.list())??[],c=p===void 0?void 0:new Set(p.map(r=>{var s;return(s=l==null?void 0:l.resolve(r))==null?void 0:s.name}).filter(r=>!!r).map(P)),h=String(f).trim().toLocaleLowerCase();return Object.freeze(n.filter(r=>c&&!c.has(P(r.name))?!1:h?[r.name,r.label,...r.keywords??[]].some(s=>typeof s=="string"&&s.toLocaleLowerCase().includes(h)):!0))}function P(l){return L.normalizeQyIconName(l).toLocaleLowerCase()}const W={class:"qy-icon-picker"},G=["onKeydown"],H={class:"qy-icon-picker__preview","aria-hidden":"true"},J={key:1,class:"qy-icon-picker__missing","aria-hidden":"true"},X=["id"],Z={class:"qy-icon-picker__search","data-testid":"qy-icon-picker-search"},ee=["aria-label"],ae=["id","data-qy-icon-option","data-qy-icon-active","aria-selected","tabindex","onClick","onFocus","onKeydown"],ne={class:"qy-icon-picker__option-label"},oe={key:1,class:"qy-icon-picker__empty"};let te=0;const le=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:p,emit:f}){const n=l,c=f,h=e.inject(L.QY_ICON_REGISTRY_KEY,null),r=e.ref(""),s=e.ref(!1),i=e.ref(-1),b=e.ref([]),y=e.ref(null),x=e.ref(null),w=e.ref("pointer"),Q=`qy-icon-picker-${++te}`,v=e.computed(()=>F(h,n.modelValue)),d=e.computed(()=>Y(h,n.allowedNames,r.value)),k=e.computed(()=>n.open!==void 0),m=e.computed(()=>k.value?n.open===!0:s.value),R=e.computed(()=>"click"),g=e.computed(()=>`${n.id||Q}-panel`);e.watch(m,(a,o)=>{!a||o||(r.value="",i.value=M(),b.value=[],w.value==="keyboard"&&e.nextTick(()=>{var t,u;return(u=(t=x.value)==null?void 0:t.focus)==null?void 0:u.call(t)}))}),e.watch(d,()=>{if(!d.value.length){i.value=-1;return}i.value>=d.value.length&&(i.value=0),i.value<0&&(i.value=0)});function N(){n.disabled||(w.value="keyboard",I("keyboard"))}function T(a){n.disabled||k.value&&n.open!==!1||(a.stopImmediatePropagation(),I("pointer"))}function z(a){q(a)}function $(a){a===m.value&&(k.value||(s.value=a),c("open-change",a),a||e.nextTick(()=>{var o,t;return(t=(o=y.value)==null?void 0:o.focus)==null?void 0:t.call(o)}))}function q(a){a&&n.disabled||a!==m.value&&(k.value||(s.value=a),c("update:open",a))}function I(a="programmatic"){w.value=a,q(!0)}function B(){q(!1),e.nextTick(()=>{var a,o;return(o=(a=y.value)==null?void 0:a.focus)==null?void 0:o.call(a)})}function V(){n.disabled||(c("update:modelValue",""),c("change",""),c("clear"))}function C(a){n.disabled||(c("update:modelValue",a.name),c("change",a.name),B())}function S(a){if(a.key==="Escape"){a.preventDefault(),B();return}if(!d.value.length||!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(a.key))return;a.preventDefault();const o=a.key==="ArrowUp"||a.key==="ArrowLeft"?-1:1,t=d.value.length;i.value=(i.value+o+t)%t,e.nextTick(()=>{var u;return(u=b.value[i.value])==null?void 0:u.focus()})}function M(){const a=v.value.canonicalName;if(!a)return d.value.length?0:-1;const o=d.value.findIndex(({name:t})=>t===a);return o>=0?o:d.value.length?0:-1}function A(a,o){a instanceof HTMLElement&&(b.value[o]=a)}function O(a){return`${g.value}-${encodeURIComponent(a)}`}function D(){var a,o;(o=(a=y.value)==null?void 0:a.focus)==null||o.call(a)}function U(){var a,o;(o=(a=y.value)==null?void 0:a.blur)==null||o.call(a)}return p({focus:D,blur:U,open:I,close:B}),(a,o)=>(e.openBlock(),e.createElementBlock("div",W,[e.createVNode(e.unref(j.QyPopover),{ref:"popoverRef",class:"qy-icon-picker__popover",open:m.value,trigger:R.value,placement:"bottom-start",width:n.panelWidth,"show-delay":0,"hide-delay":0,disabled:n.disabled||k.value&&n.open===!1,"onUpdate:open":z,onOpenChange:$},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:"qy-icon-picker__trigger","data-testid":"qy-icon-picker-trigger",onClick:T,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},[e.createVNode(e.unref(K.QyInput),{ref_key:"triggerRef",ref:y,id:n.id,"model-value":v.value.value,size:n.size,disabled:n.disabled,clearable:n.clearable,readonly:"",placeholder:n.placeholder,"aria-label":n.ariaLabel,"aria-haspopup":"listbox","aria-expanded":m.value?"true":"false","aria-controls":g.value,onClear:V},{prefix:e.withCtx(()=>[e.createElementVNode("span",H,[v.value.definition?(e.openBlock(),e.createBlock(e.unref(E.QyIcon),{key:0,name:v.value.definition.name,size:18},null,8,["name"])):(e.openBlock(),e.createElementBlock("span",J,"?"))])]),suffix:e.withCtx(()=>[n.clearable&&v.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(V,["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,G)]),default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:g.value,class:"qy-icon-picker__panel",onKeydown:S},[e.createElementVNode("div",Z,[e.createVNode(e.unref(K.QyInput),{ref_key:"searchRef",ref:x,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"])]),d.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qy-icon-picker__grid",role:"listbox","aria-label":n.ariaLabel||"图标列表"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(t,u)=>(e.openBlock(),e.createElementBlock("div",{id:O(t.name),key:t.name,ref_for:!0,ref:_=>A(_,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":v.value.canonicalName===t.name?"true":"false",tabindex:i.value===u?0:-1,onClick:_=>C(t),onFocus:_=>i.value=u,onKeydown:[e.withKeys(e.withModifiers(_=>C(t),["prevent"]),["enter"]),e.withKeys(e.withModifiers(_=>C(t),["prevent"]),["space"])]},[e.createVNode(e.unref(E.QyIcon),{name:t.name,size:18,"aria-hidden":"true"},null,8,["name"]),e.createElementVNode("span",ne,e.toDisplayString(t.label||t.name),1)],42,ae))),128))],8,ee)):(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(a.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(n.emptyText),1)])]))],40,X)):e.createCommentVNode("",!0)]),_:3},8,["open","trigger","width","disabled"])]))}});exports._sfc_main=le;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),F=require("element-plus"),W=["id","role","aria-disabled","tabindex","disabled","onKeydown"],j={class:"qy-color-picker__value","aria-hidden":"true"};let G=0;const H=()=>`qy-color-picker-${++G}`,J=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:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","active-change","change","visible-change"],setup(R,{emit:D}){const n=R,i=D,c=a.useAttrs(),g=a.ref(null),k=a.ref(null),p=a.ref(null),r=a.ref(u(n.modelValue)),h=a.ref(r.value),t=a.ref(!1),o=a.ref(null),s=a.ref(!1),f=a.ref(!1),w=H(),L=a.computed(()=>typeof c.id=="string"&&c.id||w),_=`qy-color-picker__popper--${w}`,z=a.computed(()=>n.format||(n.showAlpha?"rgb":"hex")),m=a.computed(()=>u(n.modelValue)),B=a.computed(()=>String(c.role||"button")),I=a.computed(()=>c["aria-disabled"]??(n.disabled?"true":"false")),K=a.computed(()=>n.disabled?void 0:c.tabindex??0),N=a.computed(()=>{const e={};for(const[l,d]of Object.entries(c)){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(()=>n.modelValue,e=>{r.value=u(e),t.value&&(h.value=r.value)});function u(e){return e==null||e===""?null:String(e)}function S(){if(!n.disabled){if(t.value){v();return}V()}}function C(){n.disabled||t.value||V()}function T(){t.value&&v()}function V(){t.value||n.disabled||(h.value=u(n.modelValue),r.value=h.value,o.value=null,s.value=!1,f.value=!1,t.value=!0,$(),i("visible-change",!0),a.nextTick(()=>{var e,l;return(l=(e=p.value)==null?void 0:e.show)==null?void 0:l.call(e)}))}function M(e){!t.value||o.value||(r.value=u(e),i("active-change",r.value))}function O(e){!t.value||o.value==="cancel"||(r.value=u(e),s.value||(s.value=!0,o.value="commit",i("update:modelValue",r.value)))}function Q(e){!t.value||o.value==="cancel"||(r.value=u(e),s.value||(s.value=!0,o.value="commit",i("update:modelValue",r.value)),f.value||(f.value=!0,i("change",r.value)),y())}function U(){!t.value||o.value==="cancel"||(s.value||(s.value=!0,o.value="commit",r.value=null,i("update:modelValue",null)),f.value||(f.value=!0,i("change",null)),y())}function v(){var e,l;!t.value||o.value||(o.value="cancel",r.value=u(n.modelValue),(l=(e=p.value)==null?void 0:e.hide)==null||l.call(e),y())}function y(){var e,l;t.value&&(t.value=!1,P(),(l=(e=p.value)==null?void 0:e.hide)==null||l.call(e),i("visible-change",!1),a.nextTick(()=>{var d;return(d=k.value)==null?void 0:d.focus()}))}function E(e){var l,d;return e instanceof Node?(l=g.value)!=null&&l.contains(e)?!0:!!((d=e.closest)!=null&&d.call(e,`.${_}`)):!1}function x(e){t.value&&!E(e.target)&&v()}function q(e){t.value&&!E(e.target)&&v()}function A(e){t.value&&e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),v())}function $(){document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",q,!0),document.addEventListener("keydown",A,!0)}function P(){document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",q,!0),document.removeEventListener("keydown",A,!0)}return a.onBeforeUnmount(()=>{P()}),(e,l)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"rootRef",ref:g,class:"qy-color-picker","data-qy-color-picker":""},[a.createElementVNode("button",a.mergeProps({ref_key:"triggerRef",ref:k,type:"button",class:"qy-color-picker__trigger"},N.value,{id:L.value,role:B.value,"aria-disabled":I.value,tabindex:K.value,disabled:n.disabled,class:{"is-disabled":n.disabled,"is-open":t.value},onClick:S,onKeydown:[a.withKeys(a.withModifiers(C,["prevent"]),["enter"]),a.withKeys(a.withModifiers(C,["prevent"]),["space"]),a.withKeys(a.withModifiers(T,["prevent"]),["esc"])]}),[a.createElementVNode("span",{class:a.normalizeClass(["qy-color-picker__swatch",{"is-empty":!m.value}]),style:a.normalizeStyle(m.value?{backgroundColor:m.value}:void 0),"aria-hidden":"true"},null,6),a.createElementVNode("span",j,a.toDisplayString(m.value||"选择颜色"),1),l[0]||(l[0]=a.createElementVNode("span",{class:"qy-color-picker__arrow","aria-hidden":"true"},"⌄",-1))],16,W),a.createVNode(a.unref(F.ElColorPicker),{ref_key:"rendererRef",ref:p,class:"qy-color-picker__renderer","model-value":r.value,"show-alpha":n.showAlpha,"color-format":z.value,predefine:n.predefine,size:n.size,disabled:!1,clearable:n.clearable,teleported:!0,tabindex:-1,"popper-class":_,"aria-hidden":"true",onActiveChange:M,"onUpdate:modelValue":O,onChange:Q,onClear:U},null,8,["model-value","show-alpha","color-format","predefine","size","clearable"])],512))}});exports._sfc_main=J;
@@ -0,0 +1,172 @@
1
+ import { defineComponent as J, useAttrs as X, ref as o, computed as c, watch as Y, onBeforeUnmount as Z, openBlock as ee, createElementBlock as ae, createElementVNode as b, mergeProps as le, withKeys as _, withModifiers as w, normalizeStyle as ne, normalizeClass as te, toDisplayString as re, createVNode as oe, unref as ie, nextTick as B } from "vue";
2
+ import { ElColorPicker as ue } from "element-plus";
3
+ const se = ["id", "role", "aria-disabled", "tabindex", "disabled", "onKeydown"], de = {
4
+ class: "qy-color-picker__value",
5
+ "aria-hidden": "true"
6
+ };
7
+ let ce = 0;
8
+ const fe = () => `qy-color-picker-${++ce}`, me = /* @__PURE__ */ J({
9
+ name: "QyColorPicker",
10
+ inheritAttrs: !1,
11
+ __name: "index",
12
+ props: {
13
+ modelValue: { default: null },
14
+ format: { default: void 0 },
15
+ showAlpha: { type: Boolean, default: !1 },
16
+ predefine: { default: void 0 },
17
+ size: { default: "default" },
18
+ disabled: { type: Boolean, default: !1 },
19
+ clearable: { type: Boolean, default: !1 }
20
+ },
21
+ emits: ["update:modelValue", "active-change", "change", "visible-change"],
22
+ setup(I, { emit: K }) {
23
+ const l = I, i = K, f = X(), C = o(null), V = o(null), m = o(null), t = o(u(l.modelValue)), g = o(t.value), n = o(!1), r = o(null), s = o(!1), v = o(!1), E = fe(), N = c(() => typeof f.id == "string" && f.id || E), x = `qy-color-picker__popper--${E}`, S = c(
24
+ () => l.format || (l.showAlpha ? "rgb" : "hex")
25
+ ), h = c(() => u(l.modelValue)), O = c(() => String(f.role || "button")), Q = c(
26
+ () => f["aria-disabled"] ?? (l.disabled ? "true" : "false")
27
+ ), T = c(
28
+ () => l.disabled ? void 0 : f.tabindex ?? 0
29
+ ), U = c(() => {
30
+ const e = {};
31
+ for (const [a, d] of Object.entries(f)) {
32
+ const k = a.toLowerCase();
33
+ (a === "class" || a === "style" || a === "id" || a === "title" || a === "tabindex" || a === "role" || k.startsWith("data-") || k.startsWith("aria-") || ["onkeydown", "onkeyup", "onkeypress"].includes(k)) && (e[a] = d);
34
+ }
35
+ return e;
36
+ });
37
+ Y(
38
+ () => l.modelValue,
39
+ (e) => {
40
+ t.value = u(e), n.value && (g.value = t.value);
41
+ }
42
+ );
43
+ function u(e) {
44
+ return e == null || e === "" ? null : String(e);
45
+ }
46
+ function $() {
47
+ if (!l.disabled) {
48
+ if (n.value) {
49
+ p();
50
+ return;
51
+ }
52
+ R();
53
+ }
54
+ }
55
+ function A() {
56
+ l.disabled || n.value || R();
57
+ }
58
+ function F() {
59
+ n.value && p();
60
+ }
61
+ function R() {
62
+ n.value || l.disabled || (g.value = u(l.modelValue), t.value = g.value, r.value = null, s.value = !1, v.value = !1, n.value = !0, H(), i("visible-change", !0), B(() => {
63
+ var e, a;
64
+ return (a = (e = m.value) == null ? void 0 : e.show) == null ? void 0 : a.call(e);
65
+ }));
66
+ }
67
+ function W(e) {
68
+ !n.value || r.value || (t.value = u(e), i("active-change", t.value));
69
+ }
70
+ function j(e) {
71
+ !n.value || r.value === "cancel" || (t.value = u(e), s.value || (s.value = !0, r.value = "commit", i("update:modelValue", t.value)));
72
+ }
73
+ function M(e) {
74
+ !n.value || r.value === "cancel" || (t.value = u(e), s.value || (s.value = !0, r.value = "commit", i("update:modelValue", t.value)), v.value || (v.value = !0, i("change", t.value)), y());
75
+ }
76
+ function G() {
77
+ !n.value || r.value === "cancel" || (s.value || (s.value = !0, r.value = "commit", t.value = null, i("update:modelValue", null)), v.value || (v.value = !0, i("change", null)), y());
78
+ }
79
+ function p() {
80
+ var e, a;
81
+ !n.value || r.value || (r.value = "cancel", t.value = u(l.modelValue), (a = (e = m.value) == null ? void 0 : e.hide) == null || a.call(e), y());
82
+ }
83
+ function y() {
84
+ var e, a;
85
+ n.value && (n.value = !1, z(), (a = (e = m.value) == null ? void 0 : e.hide) == null || a.call(e), i("visible-change", !1), B(() => {
86
+ var d;
87
+ return (d = V.value) == null ? void 0 : d.focus();
88
+ }));
89
+ }
90
+ function P(e) {
91
+ var a, d;
92
+ return e instanceof Node ? (a = C.value) != null && a.contains(e) ? !0 : !!((d = e.closest) != null && d.call(e, `.${x}`)) : !1;
93
+ }
94
+ function q(e) {
95
+ n.value && !P(e.target) && p();
96
+ }
97
+ function D(e) {
98
+ n.value && !P(e.target) && p();
99
+ }
100
+ function L(e) {
101
+ n.value && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), p());
102
+ }
103
+ function H() {
104
+ document.addEventListener("pointerdown", q, !0), document.addEventListener("focusin", D, !0), document.addEventListener("keydown", L, !0);
105
+ }
106
+ function z() {
107
+ document.removeEventListener("pointerdown", q, !0), document.removeEventListener("focusin", D, !0), document.removeEventListener("keydown", L, !0);
108
+ }
109
+ return Z(() => {
110
+ z();
111
+ }), (e, a) => (ee(), ae("div", {
112
+ ref_key: "rootRef",
113
+ ref: C,
114
+ class: "qy-color-picker",
115
+ "data-qy-color-picker": ""
116
+ }, [
117
+ b("button", le({
118
+ ref_key: "triggerRef",
119
+ ref: V,
120
+ type: "button",
121
+ class: "qy-color-picker__trigger"
122
+ }, U.value, {
123
+ id: N.value,
124
+ role: O.value,
125
+ "aria-disabled": Q.value,
126
+ tabindex: T.value,
127
+ disabled: l.disabled,
128
+ class: { "is-disabled": l.disabled, "is-open": n.value },
129
+ onClick: $,
130
+ onKeydown: [
131
+ _(w(A, ["prevent"]), ["enter"]),
132
+ _(w(A, ["prevent"]), ["space"]),
133
+ _(w(F, ["prevent"]), ["esc"])
134
+ ]
135
+ }), [
136
+ b("span", {
137
+ class: te(["qy-color-picker__swatch", { "is-empty": !h.value }]),
138
+ style: ne(h.value ? { backgroundColor: h.value } : void 0),
139
+ "aria-hidden": "true"
140
+ }, null, 6),
141
+ b("span", de, re(h.value || "选择颜色"), 1),
142
+ a[0] || (a[0] = b("span", {
143
+ class: "qy-color-picker__arrow",
144
+ "aria-hidden": "true"
145
+ }, "⌄", -1))
146
+ ], 16, se),
147
+ oe(ie(ue), {
148
+ ref_key: "rendererRef",
149
+ ref: m,
150
+ class: "qy-color-picker__renderer",
151
+ "model-value": t.value,
152
+ "show-alpha": l.showAlpha,
153
+ "color-format": S.value,
154
+ predefine: l.predefine,
155
+ size: l.size,
156
+ disabled: !1,
157
+ clearable: l.clearable,
158
+ teleported: !0,
159
+ tabindex: -1,
160
+ "popper-class": x,
161
+ "aria-hidden": "true",
162
+ onActiveChange: W,
163
+ "onUpdate:modelValue": j,
164
+ onChange: M,
165
+ onClear: G
166
+ }, null, 8, ["model-value", "show-alpha", "color-format", "predefine", "size", "clearable"])
167
+ ], 512));
168
+ }
169
+ });
170
+ export {
171
+ me as _
172
+ };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as oe, inject as le, ref as m, computed as _, watch as E, nextTick as L, openBlock as d, createElementBlock as f, createVNode as P, unref as q, withCtx as Q, createElementVNode as I, Fragment as te, renderList as re, withKeys as R, withModifiers as C, normalizeClass as ie, toDisplayString as O, renderSlot as ce, createTextVNode as ue, createCommentVNode as U, createBlock as se } from "vue";
2
- import { Q as D } from "./index-xuTVtF4x.mjs";
3
- import { Q as j } from "./index-Bs2OQHXk.mjs";
2
+ import { Q as D } from "./index-DY-CA7Vr.mjs";
3
+ import { Q as j } from "./index-JjHutKmT.mjs";
4
4
  import { QyPopover as de } from "../qy-popover/index.mjs";
5
- import { n as pe, Q as fe } from "./index-CaNxcPSD.mjs";
5
+ import { n as pe, Q as fe } from "./index-C91mzAI3.mjs";
6
6
  function ve(l, p) {
7
7
  const v = p == null ? "" : String(p), a = l && v ? l.resolve(v) : void 0;
8
8
  return Object.freeze({
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),N=require("@element-plus/icons-vue"),T=require("element-plus"),f=[],_={class:"qy-popconfirm__message"},ee={key:0,class:"qy-popconfirm__icon","aria-hidden":"true"},te={"data-testid":"qy-popconfirm-title",class:"qy-popconfirm__title"},ne={class:"qy-popconfirm__actions"},oe=t.defineComponent({name:"QyPopconfirm",inheritAttrs:!1,__name:"index",props:{title:{type:String,required:!0},open:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},placement:{type:String,default:"bottom"},width:{type:[Number,String],default:220},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},variant:{type:String,default:"warning"},confirmType:{type:String,default:"primary"},showIcon:{type:Boolean,default:!0},confirmLoading:{type:Boolean,default:!1},closeOnConfirm:{type:Boolean,default:!0}},emits:["update:open","open-change","confirm","cancel","close"],setup(i,{emit:$}){const o=i,c=$,z=t.useAttrs(),g=t.ref(null),C=t.ref(null),B=t.computed(()=>o.open!==void 0),L=o.open===!0&&!o.disabled,k=t.ref(L),s=t.ref(L),a=t.ref(L),r=t.ref(null),m=t.ref(!1),y=t.ref(null),h={};let u=!1,p,w,b=!1,E=null;const S=t.computed(()=>o.disabled?!1:B.value?o.open===!0:k.value),M=t.computed(()=>{const e={};for(const[n,v]of Object.entries(z))(n==="class"||n==="style"||n==="id"||n==="title"||n==="tabindex"||n==="role"||n.startsWith("data-")||n.startsWith("aria-")||/^onKey(?:down|up|press)/i.test(n))&&(e[n]=v);return e}),O=t.computed(()=>typeof o.width=="number"?`${o.width}px`:o.width),H=t.computed(()=>({"--qy-popconfirm-width":O.value,"--qy-popconfirm-mobile-gutter":"24px"})),K=t.computed(()=>o.variant==="danger"?N.CircleCloseFilled:o.variant==="info"?N.InfoFilled:N.WarningFilled);function q(){return f[f.length-1]===h}function x(){f.includes(h)||f.push(h)}function V(){const e=f.indexOf(h);e>=0&&f.splice(e,1)}function D(e){var I,W;const n=document.activeElement;if(n instanceof HTMLElement&&((I=g.value)!=null&&I.contains(n))){y.value=n;return}const v=e==null?void 0:e.target;v instanceof HTMLElement&&((W=C.value)!=null&&W.contains(v))&&(y.value=v)}function Q(){const e=y.value;y.value=null,e!=null&&e.isConnected&&e.focus()}function d(){if(u)return;const e=S.value;s.value!==e&&(u=!0,p=e,w=e?void 0:r.value??(o.disabled?"disabled":"external"),s.value=e)}function l(e,n){e&&o.disabled||(!e&&n&&r.value===null&&(r.value=n),B.value?o.open!==e&&c("update:open",e):k.value!==e&&(k.value=e,c("update:open",e)),d())}function U(){var e;return r.value?r.value:E instanceof Node&&((e=g.value)!=null&&e.contains(E))?"trigger":"outside"}function j(e){if(e){D(),l(!0);return}if(o.confirmLoading)return;const n=U();!q()&&n!=="external"&&n!=="disabled"||l(!1,n)}function G(e){var n;!(e.target instanceof Node)||!((n=C.value)!=null&&n.contains(e.target))||o.confirmLoading||(a.value||s.value?(r.value="trigger",l(!1,"trigger")):(D(e),l(!0)))}function J(){o.disabled||o.confirmLoading||m.value||(m.value=!0,c("confirm"),o.closeOnConfirm&&l(!1,"confirm"))}function X(){o.disabled||o.confirmLoading||(c("cancel"),l(!1,"cancel"))}function A(e){e.key!=="Escape"&&e.code!=="Escape"||o.confirmLoading||!a.value||!q()||(e.preventDefault(),l(!1,"escape"))}function R(e){E=e.target}function P(e){E=e.target}function F(e){var n;o.confirmLoading||!a.value||!q()||e.target instanceof Node&&((n=g.value)!=null&&n.contains(e.target)||e.target instanceof Element&&e.target.closest(".qy-popconfirm-popper")||l(!1,"outside"))}function Y(){!u||p!==!0||(u=!1,p=void 0,a.value=!0,x(),r.value=null,w=void 0,c("open-change",!0),d())}function Z(){!u||p!==!1||(u=!1,p=void 0,a.value=!1,V(),c("open-change",!1),c("close",w??r.value??"external"),r.value=null,w=void 0,m.value=!1,b=!1,Q(),d())}return t.watch(S,()=>d()),t.watch(()=>o.open,(e,n)=>{e!==n&&(e===!1&&(a.value||s.value)&&r.value===null&&(r.value="external"),d())}),t.watch(()=>o.disabled,e=>{e&&(a.value||s.value)&&(r.value="disabled"),d()}),t.watch(()=>o.confirmLoading,e=>{e?b=!0:b&&(b=!1,a.value&&(m.value=!1))}),t.onMounted(()=>{a.value&&x(),window.addEventListener("keydown",A),document.addEventListener("pointerdown",R,!0),document.addEventListener("mousedown",P,!0),document.addEventListener("click",F)}),t.onBeforeUnmount(()=>{V(),window.removeEventListener("keydown",A),document.removeEventListener("pointerdown",R,!0),document.removeEventListener("mousedown",P,!0),document.removeEventListener("click",F)}),(e,n)=>(t.openBlock(),t.createElementBlock("span",t.mergeProps({ref_key:"rootRef",ref:g,class:"qy-popconfirm"},M.value,{onClickCapture:G}),[t.createVNode(t.unref(T.ElPopover),{visible:s.value,trigger:"click",placement:i.placement,width:i.width,disabled:i.disabled,"popper-style":H.value,"popper-class":"qy-popconfirm-popper","onUpdate:visible":j,onAfterEnter:Y,onAfterLeave:Z},{reference:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"referenceRef",ref:C,"data-qy-popconfirm-reference":""},[t.renderSlot(e.$slots,"reference")],512)]),default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["qy-popconfirm__content",`is-${i.variant}`]),"data-qy-popconfirm-content":""},[t.createElementVNode("div",_,[i.showIcon?(t.openBlock(),t.createElementBlock("span",ee,[t.renderSlot(e.$slots,"icon",{},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(K.value)))])])):t.createCommentVNode("",!0),t.createElementVNode("span",te,[t.renderSlot(e.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(i.title),1)])])]),t.createElementVNode("div",ne,[t.createVNode(t.unref(T.ElButton),{"data-testid":"qy-popconfirm-cancel",size:"small",disabled:i.disabled||i.confirmLoading,onClick:X},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.cancelText),1)]),_:1},8,["disabled"]),t.createVNode(t.unref(T.ElButton),{"data-testid":"qy-popconfirm-confirm",size:"small",type:i.confirmType,loading:i.confirmLoading,disabled:i.disabled||i.confirmLoading||m.value,onClick:J},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.confirmText),1)]),_:1},8,["type","loading","disabled"])])],2)]),_:3},8,["visible","placement","width","disabled","popper-style"])],16))}});exports._sfc_main=oe;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),P=require("element-plus"),K=1e3,O=t.defineComponent({name:"QyPopover",inheritAttrs:!1,__name:"index",props:{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(r,{expose:B,emit:E}){const n=r,c=E,i=t.computed(()=>n.open!==void 0),v=i.value&&n.open===!0&&!n.disabled,f=t.ref(v),u=t.ref(v),h=t.ref(v),a=t.ref(null),y=t.computed(()=>n.disabled?!1:i.value?n.open===!0:f.value);let o,d=!1,s;const b=t.computed(()=>typeof n.width=="number"?`${n.width}px`:n.width),S=t.computed(()=>({"--qy-popover-width":b.value,"--qy-popover-mobile-gutter":"24px"})),m=t.useSlots(),T=t.computed(()=>{var e;return((e=m.reference)==null?void 0:e.call(m))??[]});function w(){o&&(clearTimeout(o),o=void 0),a.value=null}function q(e){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,a.value===e&&(a.value=null)},K)}function l(){if(d)return;const e=y.value;u.value!==e&&(d=!0,s=e,u.value=e)}function p(e){if(!(e&&n.disabled)){if(!i.value){if(f.value===e)return;f.value=e,c("update:open",e),l();return}a.value!==e&&(a.value===null&&n.open===e||(a.value=e,e?q(e):o&&(clearTimeout(o),o=void 0),c("update:open",e),l()))}}function g(e){e===u.value&&(!d||s!==e||(d=!1,s=void 0,e!==h.value&&(h.value=e,a.value===e&&w(),c("open-change",e),c(e?"open":"close"),l())))}function C(e){p(e),l()}function L(){g(!0)}function N(){g(!1)}function W(){p(!1)}function k(e){e.key!=="Escape"&&e.code!=="Escape"||u.value&&(e.preventDefault(),p(!1),l())}return t.watch(y,()=>l()),t.watch(i,e=>{w(),e?f.value=n.open===!0:f.value=u.value,l()}),t.watch(()=>n.open,(e,A)=>{!i.value||a.value===null||(e===a.value||e!==A)&&w()}),t.watch(()=>n.disabled,e=>{e?p(!1):l()}),t.onBeforeUnmount(()=>{window.removeEventListener("keydown",k),d=!1,s=void 0,o&&clearTimeout(o)}),t.onMounted(()=>{window.addEventListener("keydown",k)}),B({close:W}),(e,A)=>(t.openBlock(),t.createBlock(t.unref(P.ElPopover),{visible:u.value,trigger:r.trigger,placement:r.placement,effect:r.effect,width:r.width,offset:r.offset,"show-after":r.showDelay,"hide-after":r.hideDelay,"show-arrow":r.showArrow,transition:r.transition,disabled:r.disabled,enterable:!0,"popper-style":S.value,"popper-class":"qy-popover-popper","onUpdate:visible":C,onAfterEnter:L,onAfterLeave:N},{reference:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,(D,I)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(D),{key:D.key??I}))),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","popper-style"]))}});exports._sfc_main=O;
@@ -1,6 +1,6 @@
1
- import { defineComponent as z, computed as d, ref as v, useSlots as F, watch as m, onBeforeUnmount as M, onMounted as Q, openBlock as g, createBlock as B, unref as R, withCtx as L, renderSlot as j, createElementBlock as G, Fragment as H, renderList as J, resolveDynamicComponent as X } from "vue";
1
+ import { defineComponent as z, computed as d, ref as v, useSlots as F, watch as m, onBeforeUnmount as M, onMounted as Q, openBlock as g, createBlock as T, unref as R, withCtx as B, renderSlot as j, createElementBlock as G, Fragment as H, renderList as J, resolveDynamicComponent as X } from "vue";
2
2
  import { ElPopover as Y } from "element-plus";
3
- const Z = 1e3, V = /* @__PURE__ */ z({
3
+ const Z = 1e3, _ = /* @__PURE__ */ z({
4
4
  name: "QyPopover",
5
5
  inheritAttrs: !1,
6
6
  __name: "index",
@@ -13,12 +13,13 @@ const Z = 1e3, V = /* @__PURE__ */ z({
13
13
  showDelay: { type: Number, default: 0 },
14
14
  hideDelay: { type: Number, default: 200 },
15
15
  showArrow: { type: Boolean, default: !0 },
16
+ transition: { type: String, default: void 0 },
16
17
  disabled: { type: Boolean, default: !1 },
17
18
  open: { type: Boolean, default: void 0 }
18
19
  },
19
20
  emits: ["update:open", "open-change", "open", "close"],
20
- setup(r, { expose: N, emit: S }) {
21
- const t = r, c = S, u = d(() => t.open !== void 0), w = u.value && t.open === !0 && !t.disabled, i = v(w), l = v(w), k = v(w), o = v(null), A = d(() => t.disabled ? !1 : u.value ? t.open === !0 : i.value);
21
+ setup(r, { expose: L, emit: N }) {
22
+ const t = r, c = N, i = d(() => t.open !== void 0), w = i.value && t.open === !0 && !t.disabled, u = v(w), l = v(w), k = v(w), o = v(null), A = d(() => t.disabled ? !1 : i.value ? t.open === !0 : u.value);
22
23
  let n, f = !1, s;
23
24
  const C = d(
24
25
  () => typeof t.width == "number" ? `${t.width}px` : t.width
@@ -46,9 +47,9 @@ const Z = 1e3, V = /* @__PURE__ */ z({
46
47
  }
47
48
  function p(e) {
48
49
  if (!(e && t.disabled)) {
49
- if (!u.value) {
50
- if (i.value === e) return;
51
- i.value = e, c("update:open", e), a();
50
+ if (!i.value) {
51
+ if (u.value === e) return;
52
+ u.value = e, c("update:open", e), a();
52
53
  return;
53
54
  }
54
55
  o.value !== e && (o.value === null && t.open === e || (o.value = e, e ? I(e) : n && (clearTimeout(n), n = void 0), c("update:open", e), a()));
@@ -75,12 +76,12 @@ const Z = 1e3, V = /* @__PURE__ */ z({
75
76
  return m(
76
77
  A,
77
78
  () => a()
78
- ), m(u, (e) => {
79
- y(), e ? i.value = t.open === !0 : i.value = l.value, a();
79
+ ), m(i, (e) => {
80
+ y(), e ? u.value = t.open === !0 : u.value = l.value, a();
80
81
  }), m(
81
82
  () => t.open,
82
83
  (e, b) => {
83
- !u.value || o.value === null || (e === o.value || e !== b) && y();
84
+ !i.value || o.value === null || (e === o.value || e !== b) && y();
84
85
  }
85
86
  ), m(
86
87
  () => t.disabled,
@@ -91,7 +92,7 @@ const Z = 1e3, V = /* @__PURE__ */ z({
91
92
  window.removeEventListener("keydown", E), f = !1, s = void 0, n && clearTimeout(n);
92
93
  }), Q(() => {
93
94
  window.addEventListener("keydown", E);
94
- }), N({ close: U }), (e, b) => (g(), B(R(Y), {
95
+ }), L({ close: U }), (e, b) => (g(), T(R(Y), {
95
96
  visible: l.value,
96
97
  trigger: r.trigger,
97
98
  placement: r.placement,
@@ -101,6 +102,7 @@ const Z = 1e3, V = /* @__PURE__ */ z({
101
102
  "show-after": r.showDelay,
102
103
  "hide-after": r.hideDelay,
103
104
  "show-arrow": r.showArrow,
105
+ transition: r.transition,
104
106
  disabled: r.disabled,
105
107
  enterable: !0,
106
108
  "popper-style": q.value,
@@ -109,18 +111,18 @@ const Z = 1e3, V = /* @__PURE__ */ z({
109
111
  onAfterEnter: O,
110
112
  onAfterLeave: P
111
113
  }, {
112
- reference: L(() => [
113
- (g(!0), G(H, null, J(W.value, (T, $) => (g(), B(X(T), {
114
- key: T.key ?? $
114
+ reference: B(() => [
115
+ (g(!0), G(H, null, J(W.value, (S, $) => (g(), T(X(S), {
116
+ key: S.key ?? $
115
117
  }))), 128))
116
118
  ]),
117
- default: L(() => [
119
+ default: B(() => [
118
120
  j(e.$slots, "default")
119
121
  ]),
120
122
  _: 3
121
- }, 8, ["visible", "trigger", "placement", "effect", "width", "offset", "show-after", "hide-after", "show-arrow", "disabled", "popper-style"]));
123
+ }, 8, ["visible", "trigger", "placement", "effect", "width", "offset", "show-after", "hide-after", "show-arrow", "transition", "disabled", "popper-style"]));
122
124
  }
123
125
  });
124
126
  export {
125
- V as _
127
+ _
126
128
  };