@qynpm/ui 1.0.27 → 1.0.29

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 (149) hide show
  1. package/README.md +401 -313
  2. package/dist/index.cjs +6 -3
  3. package/dist/index.mjs +80 -61
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-aside/index.cjs +1 -0
  7. package/dist/qy-aside/index.mjs +7 -0
  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-col/index.cjs +1 -0
  13. package/dist/qy-col/index.mjs +7 -0
  14. package/dist/qy-collapse/index.cjs +1 -1
  15. package/dist/qy-collapse/index.mjs +1 -1
  16. package/dist/qy-container/index.cjs +1 -0
  17. package/dist/qy-container/index.mjs +7 -0
  18. package/dist/qy-date-picker/index.cjs +1 -1
  19. package/dist/qy-date-picker/index.mjs +1 -1
  20. package/dist/qy-dialog/index.cjs +1 -1
  21. package/dist/qy-dialog/index.mjs +1 -1
  22. package/dist/qy-dropdown/index.cjs +1 -1
  23. package/dist/qy-dropdown/index.mjs +1 -1
  24. package/dist/qy-form-section/index.cjs +1 -1
  25. package/dist/qy-form-section/index.mjs +2 -2
  26. package/dist/qy-fullscreen/index.cjs +1 -0
  27. package/dist/qy-fullscreen/index.mjs +7 -0
  28. package/dist/qy-icon/index.cjs +1 -0
  29. package/dist/qy-icon/index.mjs +11 -0
  30. package/dist/qy-icon-picker/index.cjs +5 -0
  31. package/dist/qy-icon-picker/index.mjs +11 -0
  32. package/dist/qy-image/index.cjs +1 -1
  33. package/dist/qy-image/index.mjs +1 -1
  34. package/dist/qy-image-upload/index.cjs +1 -1
  35. package/dist/qy-image-upload/index.mjs +1 -1
  36. package/dist/qy-input/index.cjs +1 -1
  37. package/dist/qy-input/index.mjs +4 -5
  38. package/dist/qy-input-number/index.cjs +3 -1
  39. package/dist/qy-input-number/index.mjs +3 -1
  40. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  41. package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
  42. package/dist/qy-link/index.cjs +1 -1
  43. package/dist/qy-link/index.mjs +1 -1
  44. package/dist/qy-main/index.cjs +1 -0
  45. package/dist/qy-main/index.mjs +7 -0
  46. package/dist/qy-menu-actions/index.cjs +1 -1
  47. package/dist/qy-menu-actions/index.mjs +1 -1
  48. package/dist/qy-money-input/index.cjs +1 -1
  49. package/dist/qy-money-input/index.mjs +1 -1
  50. package/dist/qy-popover/index.cjs +1 -1
  51. package/dist/qy-popover/index.mjs +1 -1
  52. package/dist/qy-record-quote-search/index.cjs +1 -1
  53. package/dist/qy-record-quote-search/index.mjs +1 -1
  54. package/dist/qy-remark-image/index.cjs +1 -1
  55. package/dist/qy-remark-image/index.mjs +1 -1
  56. package/dist/qy-remote-select/index.cjs +1 -1
  57. package/dist/qy-remote-select/index.mjs +1 -1
  58. package/dist/qy-row/index.cjs +1 -0
  59. package/dist/qy-row/index.mjs +7 -0
  60. package/dist/qy-scrollbar/index.cjs +1 -1
  61. package/dist/qy-scrollbar/index.mjs +1 -1
  62. package/dist/qy-search-input/index.cjs +1 -1
  63. package/dist/qy-search-input/index.mjs +1 -1
  64. package/dist/qy-select/index.cjs +1 -1
  65. package/dist/qy-select/index.mjs +1 -1
  66. package/dist/qy-selection-dialog/index.cjs +1 -1
  67. package/dist/qy-selection-dialog/index.mjs +1 -1
  68. package/dist/qy-statistic/index.cjs +1 -0
  69. package/dist/qy-statistic/index.mjs +7 -0
  70. package/dist/qy-tabs/index.cjs +1 -1
  71. package/dist/qy-tabs/index.mjs +1 -1
  72. package/dist/qy-tooltip/index.cjs +1 -1
  73. package/dist/qy-tooltip/index.mjs +1 -1
  74. package/dist/qy-tree/index.cjs +1 -1
  75. package/dist/qy-tree/index.mjs +1 -1
  76. package/dist/qy-upload/index.cjs +1 -1
  77. package/dist/qy-upload/index.mjs +1 -1
  78. package/dist/shared/index-4cLP6sJP.cjs +1 -0
  79. package/dist/shared/index-AirHUQwm.cjs +1 -0
  80. package/dist/shared/index-B6xIO6kg.cjs +1 -0
  81. package/dist/shared/index-BNQxyXzB.cjs +1 -0
  82. package/dist/shared/{index-T9Om5Csd.mjs → index-BQj_q6rA.mjs} +999 -972
  83. package/dist/shared/{index-BbDWedqW.mjs → index-BSxEaYHx.mjs} +10 -10
  84. package/dist/shared/index-Bs6yjkZ5.cjs +1 -0
  85. package/dist/shared/{index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs → index-C2n0R6rA.mjs} +33 -31
  86. package/dist/shared/{index-CYn7TvRx.mjs → index-CR6yQfR2.mjs} +1 -1
  87. package/dist/shared/index-CaNxcPSD.mjs +254 -0
  88. package/dist/shared/index-Czrv5jUt.mjs +222 -0
  89. package/dist/shared/{index-DEkng5wh.cjs → index-YM4DcbBZ.cjs} +1 -1
  90. package/dist/shared/index-qwzyfx9S.cjs +1 -0
  91. package/dist/shared/index-xuTVtF4x.mjs +6 -0
  92. package/dist/shared/index.vue_vue_type_script_lang-8AT3-xU-.cjs +1 -0
  93. package/dist/shared/index.vue_vue_type_script_lang-BaIOvoQn.mjs +43 -0
  94. package/dist/shared/index.vue_vue_type_script_lang-BgapsQjI.cjs +1 -0
  95. package/dist/shared/index.vue_vue_type_script_lang-Bk0kLg5l.mjs +34 -0
  96. package/dist/shared/index.vue_vue_type_script_lang-BnmY1ndj.mjs +77 -0
  97. package/dist/shared/index.vue_vue_type_script_lang-By3jd4gw.cjs +1 -0
  98. package/dist/shared/index.vue_vue_type_script_lang-CCL57H5c.cjs +1 -0
  99. package/dist/shared/index.vue_vue_type_script_lang-CKZUcaZ5.cjs +1 -0
  100. package/dist/shared/index.vue_vue_type_script_lang-CWnNQBPN.mjs +31 -0
  101. package/dist/shared/index.vue_vue_type_script_lang-CfjfZCT3.cjs +1 -0
  102. package/dist/shared/index.vue_vue_type_script_lang-ChS-3_vl.mjs +43 -0
  103. package/dist/shared/index.vue_vue_type_script_lang-DRvk4-_O.mjs +43 -0
  104. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BXnZt9UT.mjs +63 -0
  105. package/dist/shared/index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs +1 -0
  106. package/dist/shared/index.vue_vue_type_style_index_0_lang-BJXS2dVf.mjs +126 -0
  107. package/dist/shared/index.vue_vue_type_style_index_0_lang-BTqKOZ4L.cjs +1 -0
  108. package/dist/shared/index.vue_vue_type_style_index_0_lang-Bc-Ya_zS.mjs +286 -0
  109. package/dist/shared/index.vue_vue_type_style_index_0_lang-M0qKRXd2.cjs +1 -0
  110. package/index.d.ts +373 -272
  111. package/package.json +55 -1
  112. package/qy-aside/index.d.ts +47 -0
  113. package/qy-col/index.d.ts +65 -0
  114. package/qy-container/index.d.ts +49 -0
  115. package/qy-fullscreen/index.d.ts +72 -0
  116. package/qy-icon/index.d.ts +105 -0
  117. package/qy-icon-picker/index.d.ts +56 -0
  118. package/qy-main/index.d.ts +45 -0
  119. package/qy-row/index.d.ts +59 -0
  120. package/qy-statistic/index.d.ts +61 -0
  121. package/dist/shared/index-CnZNcnTs.cjs +0 -1
  122. package/dist/shared/index-ceTTRCGJ.cjs +0 -1
  123. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CmQLfhRo.cjs +0 -1
  124. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DobP199g.mjs +0 -63
  125. package/dist/shared/index.vue_vue_type_style_index_0_lang-C6urLjSf.cjs +0 -1
  126. package/dist/shared/index.vue_vue_type_style_index_0_lang-CVxWn-Vs.mjs +0 -121
  127. package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +0 -1
  128. /package/dist/shared/{index-CpvFUems.cjs → index-C509sCx9.cjs} +0 -0
  129. /package/dist/shared/{index-DEZF-Fkt.mjs → index-CtF8Nz3g.mjs} +0 -0
  130. /package/dist/shared/{index-seQHtqdh.mjs → index-D0L-u1nt.mjs} +0 -0
  131. /package/dist/shared/{index-DIs6iPjF.cjs → index-D30m6gKz.cjs} +0 -0
  132. /package/dist/shared/{index-BDdhBEFr.cjs → index-D7A0RzWH.cjs} +0 -0
  133. /package/dist/shared/{index-hEy-3mcr.mjs → index-DJT4yz0h.mjs} +0 -0
  134. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CWz689KH.cjs → index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs} +0 -0
  135. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs → index.vue_vue_type_style_index_0_lang-B0CXLnL1.mjs} +0 -0
  136. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DOfJV2oz.cjs → index.vue_vue_type_style_index_0_lang-CC2-igG3.cjs} +0 -0
  137. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-B-FeHatv.mjs → index.vue_vue_type_style_index_0_lang-CJaF7Ecm.mjs} +0 -0
  138. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DIMCVnQm.mjs → index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs} +0 -0
  139. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs → index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs} +0 -0
  140. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Cn3P9d4L.cjs → index.vue_vue_type_style_index_0_lang-CqKs13Fp.cjs} +0 -0
  141. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CnL4aeg1.cjs → index.vue_vue_type_style_index_0_lang-D9DraThL.cjs} +0 -0
  142. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Cb4yMk-r.cjs → index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs} +0 -0
  143. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D1kpIund.mjs → index.vue_vue_type_style_index_0_lang-DSur831A.mjs} +0 -0
  144. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-DUgOOzEZ.cjs} +0 -0
  145. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-DWiolYb3.mjs} +0 -0
  146. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DzfGx6ce.mjs → index.vue_vue_type_style_index_0_lang-Dc84vYSd.mjs} +0 -0
  147. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs → index.vue_vue_type_style_index_0_lang-DccRGtZE.cjs} +0 -0
  148. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs → index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs} +0 -0
  149. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-dLpQXf6x.mjs → index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs} +0 -0
@@ -0,0 +1,77 @@
1
+ import { defineComponent as y, ref as A, computed as g, onMounted as w, watch as b, onBeforeUnmount as M, h as F } from "vue";
2
+ import { ElStatistic as N } from "element-plus";
3
+ const j = (e) => e === "class" || e === "style" || e === "id" || e === "role" || e.startsWith("data-") || e.startsWith("aria-"), v = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, V = y({
4
+ name: "QyStatistic",
5
+ inheritAttrs: !1,
6
+ props: {
7
+ value: { type: Number, default: 0 },
8
+ precision: { type: Number, default: 0 },
9
+ decimalSeparator: { type: String, default: "." },
10
+ groupSeparator: { type: String, default: "," },
11
+ formatter: Function,
12
+ valueStyle: [String, Object, Array, Boolean],
13
+ title: String,
14
+ prefix: String,
15
+ suffix: String,
16
+ animated: Boolean,
17
+ duration: { type: Number, default: 1e3 },
18
+ startValue: { type: Number, default: 0 }
19
+ },
20
+ setup(e, { attrs: S, slots: r }) {
21
+ const i = A(
22
+ e.animated && e.duration > 0 && !v() ? e.startValue : e.value
23
+ ), x = g(
24
+ () => Object.fromEntries(Object.entries(S).filter(([a]) => j(a)))
25
+ );
26
+ let n = !1, t, u = 0;
27
+ const f = () => {
28
+ u += 1, t !== void 0 && (cancelAnimationFrame(t), t = void 0);
29
+ }, l = (a) => {
30
+ if (f(), !n || !e.animated || e.duration <= 0 || v()) {
31
+ i.value = a;
32
+ return;
33
+ }
34
+ const o = i.value;
35
+ if (o === a) return;
36
+ const h = u;
37
+ let d;
38
+ const c = (m) => {
39
+ if (!n || h !== u) return;
40
+ d ?? (d = m);
41
+ const s = Math.min(1, (m - d) / e.duration);
42
+ i.value = o + (a - o) * s, s < 1 ? t = requestAnimationFrame(c) : t = void 0;
43
+ };
44
+ t = requestAnimationFrame(c);
45
+ };
46
+ return w(() => {
47
+ n = !0, l(e.value);
48
+ }), b(
49
+ () => [e.value, e.animated, e.duration],
50
+ () => l(e.value)
51
+ ), M(() => {
52
+ n = !1, f();
53
+ }), () => F(
54
+ N,
55
+ {
56
+ ...x.value,
57
+ value: i.value,
58
+ precision: e.precision,
59
+ decimalSeparator: e.decimalSeparator,
60
+ groupSeparator: e.groupSeparator,
61
+ formatter: e.formatter,
62
+ valueStyle: e.valueStyle,
63
+ title: e.title,
64
+ prefix: e.prefix,
65
+ suffix: e.suffix
66
+ },
67
+ {
68
+ title: r.title,
69
+ prefix: r.prefix,
70
+ suffix: r.suffix
71
+ }
72
+ );
73
+ }
74
+ });
75
+ export {
76
+ V as _
77
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),i=require("element-plus"),l=e.defineComponent({name:"QyMainElementPlusRenderer",inheritAttrs:!1,__name:"element-plus",setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.unref(i.ElMain),e.normalizeProps(e.guardReactiveProps(r.$attrs)),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16))}}),o=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),u=e.defineComponent({name:"QyMain",inheritAttrs:!1,setup(t,{attrs:r,slots:n}){const s=e.computed(()=>Object.fromEntries(Object.entries(r).filter(([a])=>o(a))));return()=>e.h(l,s.value,n.default?{default:n.default}:void 0)}});exports._sfc_main=u;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),n=require("element-plus"),u=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),l=e.defineComponent({name:"QyRow",inheritAttrs:!1,props:{tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,default:"start"},align:String},setup(t,{attrs:i,slots:a}){const r=e.computed(()=>Object.fromEntries(Object.entries(i).filter(([s])=>u(s))));return()=>e.h(n.ElRow,{...r.value,tag:t.tag,gutter:t.gutter,justify:t.justify,align:t.align},a.default?{default:a.default}:void 0)}});exports._sfc_main=l;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),f=require("element-plus"),m=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),r=e.defineComponent({name:"QyCol",inheritAttrs:!1,props:{tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},setup(t,{attrs:l,slots:u}){const s=e.computed(()=>Object.fromEntries(Object.entries(l).filter(([a])=>m(a))));return()=>e.h(f.ElCol,{...s.value,tag:t.tag,span:t.span,offset:t.offset,pull:t.pull,push:t.push,xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl},u.default?{default:u.default}:void 0)}});exports._sfc_main=r;
@@ -0,0 +1,31 @@
1
+ import { defineComponent as a, openBlock as i, createBlock as o, unref as l, normalizeProps as f, guardReactiveProps as u, withCtx as c, renderSlot as m, computed as d, h as p } from "vue";
2
+ import { ElMain as _ } from "element-plus";
3
+ const h = /* @__PURE__ */ a({
4
+ name: "QyMainElementPlusRenderer",
5
+ inheritAttrs: !1,
6
+ __name: "element-plus",
7
+ setup(t) {
8
+ return (e, r) => (i(), o(l(_), f(u(e.$attrs)), {
9
+ default: c(() => [
10
+ m(e.$slots, "default")
11
+ ]),
12
+ _: 3
13
+ }, 16));
14
+ }
15
+ }), A = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), M = a({
16
+ name: "QyMain",
17
+ inheritAttrs: !1,
18
+ setup(t, { attrs: e, slots: r }) {
19
+ const s = d(
20
+ () => Object.fromEntries(Object.entries(e).filter(([n]) => A(n)))
21
+ );
22
+ return () => p(
23
+ h,
24
+ s.value,
25
+ r.default ? { default: r.default } : void 0
26
+ );
27
+ }
28
+ });
29
+ export {
30
+ M as _
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),A=require("element-plus"),g=e=>e==="class"||e==="style"||e==="id"||e==="role"||e.startsWith("data-")||e.startsWith("aria-"),S=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=t.defineComponent({name:"QyStatistic",inheritAttrs:!1,props:{value:{type:Number,default:0},precision:{type:Number,default:0},decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},formatter:Function,valueStyle:[String,Object,Array,Boolean],title:String,prefix:String,suffix:String,animated:Boolean,duration:{type:Number,default:1e3},startValue:{type:Number,default:0}},setup(e,{attrs:h,slots:u}){const n=t.ref(e.animated&&e.duration>0&&!S()?e.startValue:e.value),x=t.computed(()=>Object.fromEntries(Object.entries(h).filter(([i])=>g(i))));let r=!1,a,l=0;const f=()=>{l+=1,a!==void 0&&(cancelAnimationFrame(a),a=void 0)},d=i=>{if(f(),!r||!e.animated||e.duration<=0||S()){n.value=i;return}const o=n.value;if(o===i)return;const y=l;let c;const m=s=>{if(!r||y!==l)return;c??(c=s);const v=Math.min(1,(s-c)/e.duration);n.value=o+(i-o)*v,v<1?a=requestAnimationFrame(m):a=void 0};a=requestAnimationFrame(m)};return t.onMounted(()=>{r=!0,d(e.value)}),t.watch(()=>[e.value,e.animated,e.duration],()=>d(e.value)),t.onBeforeUnmount(()=>{r=!1,f()}),()=>t.h(A.ElStatistic,{...x.value,value:n.value,precision:e.precision,decimalSeparator:e.decimalSeparator,groupSeparator:e.groupSeparator,formatter:e.formatter,valueStyle:e.valueStyle,title:e.title,prefix:e.prefix,suffix:e.suffix},{title:u.title,prefix:u.prefix,suffix:u.suffix})}});exports._sfc_main=w;
@@ -0,0 +1,43 @@
1
+ import { defineComponent as s, openBlock as n, createBlock as d, unref as l, mergeProps as o, withCtx as f, renderSlot as p, computed as u, h as m } from "vue";
2
+ import { ElAside as c } from "element-plus";
3
+ const h = /* @__PURE__ */ s({
4
+ name: "QyAsideElementPlusRenderer",
5
+ inheritAttrs: !1,
6
+ __name: "element-plus",
7
+ props: {
8
+ width: {}
9
+ },
10
+ setup(t) {
11
+ return (e, r) => (n(), d(l(c), o(e.$attrs, { width: t.width }), {
12
+ default: f(() => [
13
+ p(e.$slots, "default")
14
+ ]),
15
+ _: 3
16
+ }, 16, ["width"]));
17
+ }
18
+ }), w = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), E = s({
19
+ name: "QyAside",
20
+ inheritAttrs: !1,
21
+ props: {
22
+ width: {
23
+ type: String,
24
+ default: "300px"
25
+ }
26
+ },
27
+ setup(t, { attrs: e, slots: r }) {
28
+ const i = u(
29
+ () => Object.fromEntries(Object.entries(e).filter(([a]) => w(a)))
30
+ );
31
+ return () => m(
32
+ h,
33
+ {
34
+ ...i.value,
35
+ width: t.width
36
+ },
37
+ r.default ? { default: r.default } : void 0
38
+ );
39
+ }
40
+ });
41
+ export {
42
+ E as _
43
+ };
@@ -0,0 +1,43 @@
1
+ import { defineComponent as n, openBlock as a, createBlock as s, unref as l, mergeProps as c, withCtx as d, renderSlot as f, computed as u, h as m } from "vue";
2
+ import { ElContainer as p } from "element-plus";
3
+ const h = /* @__PURE__ */ n({
4
+ name: "QyContainerElementPlusRenderer",
5
+ inheritAttrs: !1,
6
+ __name: "element-plus",
7
+ props: {
8
+ direction: {}
9
+ },
10
+ setup(t) {
11
+ return (e, r) => (a(), s(l(p), c(e.$attrs, { direction: t.direction }), {
12
+ default: d(() => [
13
+ f(e.$slots, "default")
14
+ ]),
15
+ _: 3
16
+ }, 16, ["direction"]));
17
+ }
18
+ }), _ = (t) => t === "class" || t === "style" || t === "id" || t === "role" || t === "title" || t.startsWith("data-") || t.startsWith("aria-"), E = n({
19
+ name: "QyContainer",
20
+ inheritAttrs: !1,
21
+ props: {
22
+ direction: {
23
+ type: String,
24
+ default: "horizontal"
25
+ }
26
+ },
27
+ setup(t, { attrs: e, slots: r }) {
28
+ const i = u(
29
+ () => Object.fromEntries(Object.entries(e).filter(([o]) => _(o)))
30
+ );
31
+ return () => m(
32
+ h,
33
+ {
34
+ ...i.value,
35
+ direction: t.direction
36
+ },
37
+ r.default ? { default: r.default } : void 0
38
+ );
39
+ }
40
+ });
41
+ export {
42
+ E as _
43
+ };
@@ -0,0 +1,63 @@
1
+ import { defineComponent as u, useAttrs as m, computed as r, openBlock as p, createBlock as g, unref as h, mergeProps as b, withCtx as i, renderSlot as l } from "vue";
2
+ import { ElLink as v } from "element-plus";
3
+ const j = /* @__PURE__ */ u({
4
+ name: "QyLink",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ type: {
9
+ type: String,
10
+ default: void 0
11
+ },
12
+ underline: {
13
+ type: [Boolean, String],
14
+ default: void 0
15
+ },
16
+ disabled: Boolean,
17
+ href: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ target: {
22
+ type: String,
23
+ default: "_self"
24
+ },
25
+ icon: {
26
+ type: [String, Object, Function],
27
+ default: void 0
28
+ }
29
+ },
30
+ emits: ["click"],
31
+ setup(t, { emit: a }) {
32
+ const n = t, o = a, d = m(), s = r(() => n.underline === !0 ? "hover" : n.underline === !1 ? "never" : n.underline), c = r(
33
+ () => Object.fromEntries(
34
+ Object.entries(d).filter(
35
+ ([e]) => e === "class" || e === "style" || e === "id" || e === "role" || e === "title" || e === "rel" || e === "download" || e === "hreflang" || e === "referrerpolicy" || e === "ping" || e === "tabindex" || e.startsWith("data-") || e.startsWith("aria-")
36
+ )
37
+ )
38
+ );
39
+ function f(e) {
40
+ o("click", e);
41
+ }
42
+ return (e, S) => (p(), g(h(v), b(c.value, {
43
+ type: t.type,
44
+ underline: s.value,
45
+ disabled: t.disabled,
46
+ href: t.href,
47
+ target: t.target,
48
+ icon: t.icon,
49
+ onClick: f
50
+ }), {
51
+ icon: i(() => [
52
+ l(e.$slots, "icon")
53
+ ]),
54
+ default: i(() => [
55
+ l(e.$slots, "default")
56
+ ]),
57
+ _: 3
58
+ }, 16, ["type", "underline", "disabled", "href", "target", "icon"]));
59
+ }
60
+ });
61
+ export {
62
+ j as _
63
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),c=require("element-plus"),u=t.defineComponent({name:"QyLink",inheritAttrs:!1,__name:"index",props:{type:{type:String,default:void 0},underline:{type:[Boolean,String],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:[String,Object,Function],default:void 0}},emits:["click"],setup(n,{emit:i}){const r=n,l=i,a=t.useAttrs(),o=t.computed(()=>r.underline===!0?"hover":r.underline===!1?"never":r.underline),s=t.computed(()=>Object.fromEntries(Object.entries(a).filter(([e])=>e==="class"||e==="style"||e==="id"||e==="role"||e==="title"||e==="rel"||e==="download"||e==="hreflang"||e==="referrerpolicy"||e==="ping"||e==="tabindex"||e.startsWith("data-")||e.startsWith("aria-"))));function d(e){l("click",e)}return(e,f)=>(t.openBlock(),t.createBlock(t.unref(c.ElLink),t.mergeProps(s.value,{type:n.type,underline:o.value,disabled:n.disabled,href:n.href,target:n.target,icon:n.icon,onClick:d}),{icon:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["type","underline","disabled","href","target","icon"]))}});exports._sfc_main=u;
@@ -0,0 +1,126 @@
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";
2
+ import { ElPopover as Y } from "element-plus";
3
+ const Z = 1e3, V = /* @__PURE__ */ z({
4
+ name: "QyPopover",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ trigger: { type: String, default: "click" },
9
+ placement: { type: String, default: "bottom" },
10
+ effect: { type: String, default: "light" },
11
+ width: { type: [Number, String], default: 240 },
12
+ offset: { type: Number, default: 12 },
13
+ showDelay: { type: Number, default: 0 },
14
+ hideDelay: { type: Number, default: 200 },
15
+ showArrow: { type: Boolean, default: !0 },
16
+ disabled: { type: Boolean, default: !1 },
17
+ open: { type: Boolean, default: void 0 }
18
+ },
19
+ 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);
22
+ let n, f = !1, s;
23
+ const C = d(
24
+ () => typeof t.width == "number" ? `${t.width}px` : t.width
25
+ ), q = d(() => ({
26
+ "--qy-popover-width": C.value,
27
+ "--qy-popover-mobile-gutter": "24px"
28
+ })), h = F(), W = d(
29
+ () => {
30
+ var e;
31
+ return ((e = h.reference) == null ? void 0 : e.call(h)) ?? [];
32
+ }
33
+ );
34
+ function y() {
35
+ n && (clearTimeout(n), n = void 0), o.value = null;
36
+ }
37
+ function I(e) {
38
+ n && clearTimeout(n), n = setTimeout(() => {
39
+ n = void 0, o.value === e && (o.value = null);
40
+ }, Z);
41
+ }
42
+ function a() {
43
+ if (f) return;
44
+ const e = A.value;
45
+ l.value !== e && (f = !0, s = e, l.value = e);
46
+ }
47
+ function p(e) {
48
+ if (!(e && t.disabled)) {
49
+ if (!u.value) {
50
+ if (i.value === e) return;
51
+ i.value = e, c("update:open", e), a();
52
+ return;
53
+ }
54
+ 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()));
55
+ }
56
+ }
57
+ function D(e) {
58
+ e === l.value && (!f || s !== e || (f = !1, s = void 0, e !== k.value && (k.value = e, o.value === e && y(), c("open-change", e), c(e ? "open" : "close"), a())));
59
+ }
60
+ function K(e) {
61
+ p(e), a();
62
+ }
63
+ function O() {
64
+ D(!0);
65
+ }
66
+ function P() {
67
+ D(!1);
68
+ }
69
+ function U() {
70
+ p(!1);
71
+ }
72
+ function E(e) {
73
+ e.key !== "Escape" && e.code !== "Escape" || l.value && (e.preventDefault(), p(!1), a());
74
+ }
75
+ return m(
76
+ A,
77
+ () => a()
78
+ ), m(u, (e) => {
79
+ y(), e ? i.value = t.open === !0 : i.value = l.value, a();
80
+ }), m(
81
+ () => t.open,
82
+ (e, b) => {
83
+ !u.value || o.value === null || (e === o.value || e !== b) && y();
84
+ }
85
+ ), m(
86
+ () => t.disabled,
87
+ (e) => {
88
+ e ? p(!1) : a();
89
+ }
90
+ ), M(() => {
91
+ window.removeEventListener("keydown", E), f = !1, s = void 0, n && clearTimeout(n);
92
+ }), Q(() => {
93
+ window.addEventListener("keydown", E);
94
+ }), N({ close: U }), (e, b) => (g(), B(R(Y), {
95
+ visible: l.value,
96
+ trigger: r.trigger,
97
+ placement: r.placement,
98
+ effect: r.effect,
99
+ width: r.width,
100
+ offset: r.offset,
101
+ "show-after": r.showDelay,
102
+ "hide-after": r.hideDelay,
103
+ "show-arrow": r.showArrow,
104
+ disabled: r.disabled,
105
+ enterable: !0,
106
+ "popper-style": q.value,
107
+ "popper-class": "qy-popover-popper",
108
+ "onUpdate:visible": K,
109
+ onAfterEnter: O,
110
+ onAfterLeave: P
111
+ }, {
112
+ reference: L(() => [
113
+ (g(!0), G(H, null, J(W.value, (T, $) => (g(), B(X(T), {
114
+ key: T.key ?? $
115
+ }))), 128))
116
+ ]),
117
+ default: L(() => [
118
+ j(e.$slots, "default")
119
+ ]),
120
+ _: 3
121
+ }, 8, ["visible", "trigger", "placement", "effect", "width", "offset", "show-after", "hide-after", "show-arrow", "disabled", "popper-style"]));
122
+ }
123
+ });
124
+ export {
125
+ V as _
126
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),E=require("./index-B6xIO6kg.cjs"),K=require("./index-4cLP6sJP.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;