@poadio/app-vue 0.2.0 → 0.2.1

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 (107) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/app-vue.css +13 -8
  3. package/dist/messages.d.ts +0 -1
  4. package/dist/messages.d.ts.map +1 -1
  5. package/dist/messages.js +0 -2
  6. package/dist/messages.js.map +1 -1
  7. package/dist/sections/grid.d.ts.map +1 -1
  8. package/dist/sections/grid.js +2 -1
  9. package/dist/sections/grid.js.map +1 -1
  10. package/package.json +1 -1
  11. package/runtime-dist/app.css +13 -8
  12. package/runtime-dist/app.js +2 -2
  13. package/runtime-dist/{c-3jm96b1p.js → c-031pq7qf.js} +1 -1
  14. package/runtime-dist/{c-cc3m3rs1.js → c-1hzd2pqr.js} +1 -1
  15. package/runtime-dist/{c-a63rkaa9.js → c-1q9r6ndn.js} +1 -1
  16. package/runtime-dist/c-1re10yb3.js +1 -0
  17. package/runtime-dist/{c-jymrpj5m.js → c-1v1v69qs.js} +1 -1
  18. package/runtime-dist/c-1yjbg3yb.js +1 -0
  19. package/runtime-dist/{c-16cdkp27.js → c-2c88ebgp.js} +1 -1
  20. package/runtime-dist/{c-d5y90g8f.js → c-30chvm5x.js} +1 -1
  21. package/runtime-dist/{c-y9120d6h.js → c-37zx0wkd.js} +1 -1
  22. package/runtime-dist/{c-13nx24wa.js → c-4agg4qbw.js} +1 -1
  23. package/runtime-dist/{c-9sm6aybf.js → c-4g3757ck.js} +1 -1
  24. package/runtime-dist/c-4vjd8na5.js +1 -0
  25. package/runtime-dist/{c-xeqwqt9z.js → c-56tgqzdn.js} +1 -1
  26. package/runtime-dist/{c-m49q9r7s.js → c-57mnqma1.js} +1 -1
  27. package/runtime-dist/{c-bvp9zbmr.js → c-5gfe19fa.js} +1 -1
  28. package/runtime-dist/{c-gen0a4bn.js → c-5ma45m2j.js} +1 -1
  29. package/runtime-dist/{c-8gpbevx2.js → c-74emmp4y.js} +1 -1
  30. package/runtime-dist/{c-fn3059s1.js → c-7dryrrsk.js} +1 -1
  31. package/runtime-dist/{c-4h51m4qq.js → c-82sqd7as.js} +1 -1
  32. package/runtime-dist/{c-cp1ehb23.js → c-8ahb2ywd.js} +1 -1
  33. package/runtime-dist/{c-16cm3n82.js → c-8cc3yqpn.js} +1 -1
  34. package/runtime-dist/c-8h2rwbd8.js +1 -0
  35. package/runtime-dist/{c-823yyjat.js → c-8nyvd0h0.js} +1 -1
  36. package/runtime-dist/c-8r1pgc8w.js +1 -0
  37. package/runtime-dist/{c-nn49946s.js → c-8x8fdn2b.js} +1 -1
  38. package/runtime-dist/{c-m70tbfc5.js → c-8xxzrkpg.js} +1 -1
  39. package/runtime-dist/{c-cvsx6n6e.js → c-9rx4pqjs.js} +1 -1
  40. package/runtime-dist/{c-fnzeden9.js → c-b5wfx90n.js} +1 -1
  41. package/runtime-dist/{c-hdstjg33.js → c-bhgqqt5x.js} +1 -1
  42. package/runtime-dist/{c-0zqjsnm5.js → c-c60s3ncm.js} +1 -1
  43. package/runtime-dist/{c-xk9fqzsc.js → c-cfrv87cv.js} +1 -1
  44. package/runtime-dist/{c-pbn2syef.js → c-d3hafdna.js} +1 -1
  45. package/runtime-dist/{c-nkrm4n9a.js → c-d9rzqgda.js} +1 -1
  46. package/runtime-dist/c-dx8zkcbf.js +1 -0
  47. package/runtime-dist/{c-ffkh15py.js → c-e3rddwjq.js} +1 -1
  48. package/runtime-dist/{c-gesjk5ph.js → c-e45fhawr.js} +1 -1
  49. package/runtime-dist/{c-gs1k0twe.js → c-eh9ryhw7.js} +1 -1
  50. package/runtime-dist/{c-7cjj18ea.js → c-er7e0yqs.js} +1 -1
  51. package/runtime-dist/{c-wnynh7zm.js → c-fbtxac36.js} +1 -1
  52. package/runtime-dist/{c-72hj12cs.js → c-g4dt7z6r.js} +1 -1
  53. package/runtime-dist/c-g6vc4fyb.js +1 -0
  54. package/runtime-dist/{c-64j9mv7a.js → c-g9jhyx8j.js} +1 -1
  55. package/runtime-dist/{c-1xpa1fqz.js → c-gf4wzfng.js} +1 -1
  56. package/runtime-dist/c-gfzghvh2.js +1 -0
  57. package/runtime-dist/{c-6f446pxt.js → c-grqtxpm9.js} +1 -1
  58. package/runtime-dist/{c-xqf3j4w7.js → c-h8ny4vpa.js} +1 -1
  59. package/runtime-dist/c-hgdk0vqh.js +1 -0
  60. package/runtime-dist/{c-tv3ksk7j.js → c-hrbpqm8q.js} +1 -1
  61. package/runtime-dist/{c-gznx0sj4.js → c-jxqht9an.js} +1 -1
  62. package/runtime-dist/{c-hsy77frc.js → c-jy6yg5r5.js} +1 -1
  63. package/runtime-dist/{c-0rxdxcn3.js → c-k3yb5e72.js} +1 -1
  64. package/runtime-dist/{c-gkyekesy.js → c-kaqzctfm.js} +1 -1
  65. package/runtime-dist/c-kqsnm92z.js +1 -0
  66. package/runtime-dist/{c-epemgj1a.js → c-mcy4rvac.js} +1 -1
  67. package/runtime-dist/c-mhzk96e8.js +1 -0
  68. package/runtime-dist/{c-sv15z0aa.js → c-mv93h1f5.js} +1 -1
  69. package/runtime-dist/{c-3pe5hprv.js → c-n27dcy6d.js} +1 -1
  70. package/runtime-dist/{c-qe1kevqk.js → c-n8sg12jt.js} +1 -1
  71. package/runtime-dist/{c-b6g9ey7e.js → c-n9cyhrcb.js} +1 -1
  72. package/runtime-dist/{c-wjadf68q.js → c-p3z8t4n5.js} +1 -1
  73. package/runtime-dist/{c-jvrr9zb8.js → c-pfc9b97d.js} +1 -1
  74. package/runtime-dist/{c-zyfkspym.js → c-pj08sk6j.js} +1 -1
  75. package/runtime-dist/{c-ahcj5yr5.js → c-pk2cv8zh.js} +1 -1
  76. package/runtime-dist/{c-29v2e09p.js → c-py0rvzyv.js} +1 -1
  77. package/runtime-dist/{c-sdf15np5.js → c-pyj696ce.js} +1 -1
  78. package/runtime-dist/{c-kyajr8zz.js → c-qzar8xvm.js} +1 -1
  79. package/runtime-dist/{c-rasvf2z2.js → c-rj7c7mwf.js} +1 -1
  80. package/runtime-dist/c-rm0av36n.js +1 -0
  81. package/runtime-dist/{c-m6yf7zaj.js → c-rv7cxh2k.js} +1 -1
  82. package/runtime-dist/{c-n8mqnvjg.js → c-s3vrabx6.js} +1 -1
  83. package/runtime-dist/{c-prt5qv2x.js → c-t83mbx7z.js} +1 -1
  84. package/runtime-dist/{c-j02ymtyd.js → c-tsyjqc1h.js} +1 -1
  85. package/runtime-dist/{c-ywzh0r63.js → c-vmp3ee81.js} +1 -1
  86. package/runtime-dist/{c-xx4986kx.js → c-vztkfwfq.js} +1 -1
  87. package/runtime-dist/{c-azvw5879.js → c-xw7vce7r.js} +1 -1
  88. package/runtime-dist/{c-6pd33f4a.js → c-y7abh583.js} +1 -1
  89. package/runtime-dist/{c-6qa26wds.js → c-ynwn0vws.js} +1 -1
  90. package/runtime-dist/{c-bssc8kwn.js → c-za724ed4.js} +1 -1
  91. package/runtime-dist/{c-h5m94fwp.js → c-zt8jhyxz.js} +1 -1
  92. package/runtime-dist/{c-eczfywaq.js → c-zv49taf7.js} +1 -1
  93. package/runtime-dist/version.json +1 -1
  94. package/src/messages.ts +0 -2
  95. package/src/sections/grid.ts +2 -1
  96. package/runtime-dist/c-2s6r37jb.js +0 -1
  97. package/runtime-dist/c-2v244yc0.js +0 -1
  98. package/runtime-dist/c-3be398px.js +0 -1
  99. package/runtime-dist/c-3zbf5g3p.js +0 -1
  100. package/runtime-dist/c-572jz6y4.js +0 -1
  101. package/runtime-dist/c-6w0f1kqm.js +0 -1
  102. package/runtime-dist/c-dqtdk937.js +0 -1
  103. package/runtime-dist/c-et83hbhc.js +0 -1
  104. package/runtime-dist/c-krt6rpg1.js +0 -1
  105. package/runtime-dist/c-m30q0jrb.js +0 -1
  106. package/runtime-dist/c-mw3zx9yk.js +0 -1
  107. package/runtime-dist/c-vrmw0gka.js +0 -1
@@ -1 +1 @@
1
- import{n}from"./c-m6yf7zaj.js";import{v}from"./c-p8wyhrwm.js";import{W}from"./c-98tbntdq.js";import{we,z}from"./c-tv3ksk7j.js";import{i}from"./c-azvw5879.js";import{t,r,f,y,Q,a,e}from"./c-kyajr8zz.js";function K(l,c,d){if(c!==void 0){let p=l.findIndex((b)=>b.value===c);if(p>=0)return p}return Math.min(Math.max(0,d),Math.max(0,l.length-1))}function N(l,c,d,p){let b=l[d];if(!b||b.disabled||d===c)return null;return{index:d,value:b.value,writeValue:b.value!==void 0||p!==void 0}}var O=(l,c,d,p=!1)=>{let b=W(l,c,d,{orientation:"horizontal",rtl:p});return b===null?null:b},U=(l)=>`${l}-panel`,D=(l,c,d=!1)=>({id:l,role:"tab","aria-selected":c?"true":"false","aria-controls":U(l),tabindex:c?0:-1,disabled:d,classes:{"is-active":c}}),E=(l)=>({id:U(l),role:"tabpanel","aria-labelledby":l,tabindex:0}),L=(l,c,d)=>l===c||!!d.keepAlive&&!!d.rendered,j=(l)=>({[`var-${l.variant??"line"}`]:!0,"size-sm":l.size==="sm","is-stretch":!!l.stretch}),q=(l,c)=>l>c+1,F=(l,c)=>c*l*0.6;var H=r({name:"PoadTab",props:{value:{type:null},label:String,count:[Number,String],icon:String,disabled:Boolean,closable:Boolean},emits:{close:()=>!0},setup(){return()=>null}}),le=r({name:"PoadTabs",props:{modelValue:{type:null},activeIndex:{type:Number,default:void 0},variant:{type:String,default:"line"},size:{type:String,default:"md"},stretch:Boolean,scrollable:Boolean,keepAlive:Boolean},emits:{"update:modelValue":(l)=>!0,"update:activeIndex":(l)=>!0,change:(l)=>!0},setup(l,{emit:c,slots:d}){let{t:p}=i(),b=f(),P=a(l,"modelValue"),C=a(l,"activeIndex"),T=new Set,g=t(null),k=[],w=t(!1),S=()=>{let m=g.value,h=!!m&&q(m.scrollWidth,m.clientWidth);if(h!==w.value)w.value=h};return y(S),Q(S),()=>{let m=we(d.default?.(),H),h=m.map((s)=>({value:s.props.value,disabled:z(s.props.disabled)})),_=K(h,P.value,C.value??0);T.add(_);let I=m.map((s,o)=>`poad-tab-${b}-${o}`),A=(s)=>{let o=N(h,_,s,P.value);if(!o)return;if(C.value=s,o.writeValue)P.value=o.value;c("change",{index:s,value:o.value}),k[s]?.scrollIntoView?.({block:"nearest",inline:"nearest"})},G=(s)=>{let o=O(h,_,s.key,v(g.value));if(o===null)return;s.preventDefault(),A(o),k[o]?.focus()},R=(s)=>{let o=g.value;if(o)o.scrollBy({left:F(o.clientWidth,s)})},V=l.scrollable&&w.value;return e("div",{class:["poad-tabs",j(l)]},[e("div",{class:"poad-tabs__bar"},[V&&e("button",{type:"button",class:"poad-tabs__arrow","aria-label":p("nav.scrollLeft"),onClick:()=>R(-1)},[e(n,{name:"chevron-left",size:14})]),e("div",{ref:g,class:["poad-tabs__list",{"is-scrollable":l.scrollable}],role:"tablist",onKeydown:G,onScroll:S},[...m.map((s,o)=>{let u=s.props,x=D(I[o],o===_,z(u.disabled)),M=u.label;return e("button",{key:I[o],ref:(B)=>{k[o]=B},type:"button",role:x.role,id:x.id,"aria-selected":x["aria-selected"],"aria-controls":x["aria-controls"],tabindex:x.tabindex,class:x.classes["is-active"]?"is-active":void 0,disabled:x.disabled,onClick:()=>A(o)},[...s.slots.label?s.slots.label():[u.icon?e(n,{name:u.icon,size:14}):null,e("span",M),u.count!=null?e("span",{class:"poad-tabs__count"},String(u.count)):null],z(u.closable)&&e("span",{class:"poad-tabs__close",role:"button","aria-label":p("nav.closeTab",{label:M??""}),onClick:(B)=>{B.stopPropagation(),u.onClose?.()}},[e(n,{name:"x",size:11})])])}),d.end?.()]),V&&e("button",{type:"button",class:"poad-tabs__arrow","aria-label":p("nav.scrollRight"),onClick:()=>R(1)},[e(n,{name:"chevron-right",size:14})])]),...m.map((s,o)=>{if(!L(o,_,{keepAlive:l.keepAlive,rendered:T.has(o)}))return null;let u=E(I[o]);return e("div",{key:u.id,class:"poad-tabs__panel",role:u.role,id:u.id,"aria-labelledby":u["aria-labelledby"],hidden:o!==_,tabindex:u.tabindex},s.slots.default?.())})])}}});export{H as PoadTab,le as PoadTabs};
1
+ import{n}from"./c-rv7cxh2k.js";import{v}from"./c-p8wyhrwm.js";import{W}from"./c-98tbntdq.js";import{we,z}from"./c-hrbpqm8q.js";import{i}from"./c-xw7vce7r.js";import{t,r,f,y,Q,a,e}from"./c-qzar8xvm.js";function K(l,c,d){if(c!==void 0){let p=l.findIndex((b)=>b.value===c);if(p>=0)return p}return Math.min(Math.max(0,d),Math.max(0,l.length-1))}function N(l,c,d,p){let b=l[d];if(!b||b.disabled||d===c)return null;return{index:d,value:b.value,writeValue:b.value!==void 0||p!==void 0}}var O=(l,c,d,p=!1)=>{let b=W(l,c,d,{orientation:"horizontal",rtl:p});return b===null?null:b},U=(l)=>`${l}-panel`,D=(l,c,d=!1)=>({id:l,role:"tab","aria-selected":c?"true":"false","aria-controls":U(l),tabindex:c?0:-1,disabled:d,classes:{"is-active":c}}),E=(l)=>({id:U(l),role:"tabpanel","aria-labelledby":l,tabindex:0}),L=(l,c,d)=>l===c||!!d.keepAlive&&!!d.rendered,j=(l)=>({[`var-${l.variant??"line"}`]:!0,"size-sm":l.size==="sm","is-stretch":!!l.stretch}),q=(l,c)=>l>c+1,F=(l,c)=>c*l*0.6;var H=r({name:"PoadTab",props:{value:{type:null},label:String,count:[Number,String],icon:String,disabled:Boolean,closable:Boolean},emits:{close:()=>!0},setup(){return()=>null}}),le=r({name:"PoadTabs",props:{modelValue:{type:null},activeIndex:{type:Number,default:void 0},variant:{type:String,default:"line"},size:{type:String,default:"md"},stretch:Boolean,scrollable:Boolean,keepAlive:Boolean},emits:{"update:modelValue":(l)=>!0,"update:activeIndex":(l)=>!0,change:(l)=>!0},setup(l,{emit:c,slots:d}){let{t:p}=i(),b=f(),P=a(l,"modelValue"),C=a(l,"activeIndex"),T=new Set,g=t(null),k=[],w=t(!1),S=()=>{let m=g.value,h=!!m&&q(m.scrollWidth,m.clientWidth);if(h!==w.value)w.value=h};return y(S),Q(S),()=>{let m=we(d.default?.(),H),h=m.map((s)=>({value:s.props.value,disabled:z(s.props.disabled)})),_=K(h,P.value,C.value??0);T.add(_);let I=m.map((s,o)=>`poad-tab-${b}-${o}`),A=(s)=>{let o=N(h,_,s,P.value);if(!o)return;if(C.value=s,o.writeValue)P.value=o.value;c("change",{index:s,value:o.value}),k[s]?.scrollIntoView?.({block:"nearest",inline:"nearest"})},G=(s)=>{let o=O(h,_,s.key,v(g.value));if(o===null)return;s.preventDefault(),A(o),k[o]?.focus()},R=(s)=>{let o=g.value;if(o)o.scrollBy({left:F(o.clientWidth,s)})},V=l.scrollable&&w.value;return e("div",{class:["poad-tabs",j(l)]},[e("div",{class:"poad-tabs__bar"},[V&&e("button",{type:"button",class:"poad-tabs__arrow","aria-label":p("nav.scrollLeft"),onClick:()=>R(-1)},[e(n,{name:"chevron-left",size:14})]),e("div",{ref:g,class:["poad-tabs__list",{"is-scrollable":l.scrollable}],role:"tablist",onKeydown:G,onScroll:S},[...m.map((s,o)=>{let u=s.props,x=D(I[o],o===_,z(u.disabled)),M=u.label;return e("button",{key:I[o],ref:(B)=>{k[o]=B},type:"button",role:x.role,id:x.id,"aria-selected":x["aria-selected"],"aria-controls":x["aria-controls"],tabindex:x.tabindex,class:x.classes["is-active"]?"is-active":void 0,disabled:x.disabled,onClick:()=>A(o)},[...s.slots.label?s.slots.label():[u.icon?e(n,{name:u.icon,size:14}):null,e("span",M),u.count!=null?e("span",{class:"poad-tabs__count"},String(u.count)):null],z(u.closable)&&e("span",{class:"poad-tabs__close",role:"button","aria-label":p("nav.closeTab",{label:M??""}),onClick:(B)=>{B.stopPropagation(),u.onClose?.()}},[e(n,{name:"x",size:11})])])}),d.end?.()]),V&&e("button",{type:"button",class:"poad-tabs__arrow","aria-label":p("nav.scrollRight"),onClick:()=>R(1)},[e(n,{name:"chevron-right",size:14})])]),...m.map((s,o)=>{if(!L(o,_,{keepAlive:l.keepAlive,rendered:T.has(o)}))return null;let u=E(I[o]);return e("div",{key:u.id,class:"poad-tabs__panel",role:u.role,id:u.id,"aria-labelledby":u["aria-labelledby"],hidden:o!==_,tabindex:u.tabindex},s.slots.default?.())})])}}});export{H as PoadTab,le as PoadTabs};
@@ -1,2 +1,2 @@
1
- import{oo,$n,Wt,Me,so,io,ao,Vn,co}from"./c-mvdn43tv.js";import{t,ar,r,y,u,o}from"./c-kyajr8zz.js";function H(l={}){let a=t(oo),c=t(!1),d=null;y(()=>{let n=()=>{a.value=window.innerWidth},i=typeof window.matchMedia==="function"?window.matchMedia(co):null,s=()=>{c.value=!!i?.matches};n(),s(),window.addEventListener("resize",n,{passive:!0}),i?.addEventListener("change",s),d=()=>{window.removeEventListener("resize",n),i?.removeEventListener("change",s)}}),u(()=>d?.());let e=o(()=>io(a.value,c.value,ar(l.mobile)??$n));return{state:e,width:o(()=>e.value.width),current:o(()=>e.value.current),isMobile:o(()=>e.value.isMobile),touch:o(()=>e.value.touch),up:(n)=>Wt(e.value.current,n),down:(n)=>Me(e.value.current,n),between:(n,i)=>so(e.value.current,n,i),matches:(n)=>Vn(n,{current:e.value.current,mobile:e.value.mobile,touch:e.value.touch})}}var p=r({name:"PoadIf",props:{when:{type:String,required:!0},mobile:{type:String,default:$n}},setup(l,{slots:a}){let c=H({mobile:()=>l.mobile});return()=>(ao(l.when,c.state.value)?a.default?.():a.fallback?.())??null}});
1
+ import{oo,$n,Wt,Me,so,io,ao,Vn,co}from"./c-mvdn43tv.js";import{t,ar,r,y,u,o}from"./c-qzar8xvm.js";function H(l={}){let a=t(oo),c=t(!1),d=null;y(()=>{let n=()=>{a.value=window.innerWidth},i=typeof window.matchMedia==="function"?window.matchMedia(co):null,s=()=>{c.value=!!i?.matches};n(),s(),window.addEventListener("resize",n,{passive:!0}),i?.addEventListener("change",s),d=()=>{window.removeEventListener("resize",n),i?.removeEventListener("change",s)}}),u(()=>d?.());let e=o(()=>io(a.value,c.value,ar(l.mobile)??$n));return{state:e,width:o(()=>e.value.width),current:o(()=>e.value.current),isMobile:o(()=>e.value.isMobile),touch:o(()=>e.value.touch),up:(n)=>Wt(e.value.current,n),down:(n)=>Me(e.value.current,n),between:(n,i)=>so(e.value.current,n,i),matches:(n)=>Vn(n,{current:e.value.current,mobile:e.value.mobile,touch:e.value.touch})}}var p=r({name:"PoadIf",props:{when:{type:String,required:!0},mobile:{type:String,default:$n}},setup(l,{slots:a}){let c=H({mobile:()=>l.mobile});return()=>(ao(l.when,c.state.value)?a.default?.():a.fallback?.())??null}});
2
2
  export{H};
@@ -1 +1 @@
1
- import{n}from"./c-m6yf7zaj.js";import{r,e}from"./c-kyajr8zz.js";function o(a){return["poad-tag",`sev-${a.severity??"primary"}`,a.size==="sm"&&"size-sm",a.rounded&&"is-rounded",a.dot&&"has-dot"].filter(Boolean).join(" ")}var t=(a)=>a.size==="sm"?10:12;var c=r({name:"PoadTag",props:{value:String,severity:String,size:String,rounded:Boolean,dot:Boolean,icon:String},setup(a,{slots:i}){return()=>e("span",{class:o(a)},[a.dot&&e("i",{class:"poad-tag__dot","aria-hidden":"true"}),a.icon&&e(n,{name:a.icon,size:t(a)}),e("span",[a.value,i.default?.()])])}});export{c as PoadTag};
1
+ import{n}from"./c-rv7cxh2k.js";import{r,e}from"./c-qzar8xvm.js";function o(a){return["poad-tag",`sev-${a.severity??"primary"}`,a.size==="sm"&&"size-sm",a.rounded&&"is-rounded",a.dot&&"has-dot"].filter(Boolean).join(" ")}var t=(a)=>a.size==="sm"?10:12;var c=r({name:"PoadTag",props:{value:String,severity:String,size:String,rounded:Boolean,dot:Boolean,icon:String},setup(a,{slots:i}){return()=>e("span",{class:o(a)},[a.dot&&e("i",{class:"poad-tag__dot","aria-hidden":"true"}),a.icon&&e(n,{name:a.icon,size:t(a)}),e("span",[a.value,i.default?.()])])}});export{c as PoadTag};
@@ -1 +1 @@
1
- import{n}from"./c-m6yf7zaj.js";import{ot}from"./c-gs1k0twe.js";import{_t,an}from"./c-0rxdxcn3.js";import{i}from"./c-azvw5879.js";import{t,l,r,e}from"./c-kyajr8zz.js";var z=(o)=>["poad-image",o.rounded&&"is-rounded",o.preview&&"has-preview"].filter(Boolean).join(" "),S=(o,s,c)=>c&&s?s:o,E=(o,s)=>Math.max(0.25,Math.min(6,+(o+s).toFixed(2))),O=(o)=>o<0?0.15:-0.15,y=(o,s)=>`scale(${o}) rotate(${s}deg)`;function A(o){if(o==="Escape")return"close";if(o==="+"||o==="=")return"zoomIn";if(o==="-")return"zoomOut";if(o==="r")return"rotate";return null}var _={scale:1,rotation:0};function v(o,s){switch(s){case"zoomIn":return{...o,scale:E(o.scale,0.25)};case"zoomOut":return{...o,scale:E(o.scale,-0.25)};case"rotate":return{...o,rotation:o.rotation+90};case"reset":return _;default:return o}}var P=(o)=>({role:"dialog","aria-modal":"true","aria-label":o});var F=r({name:"PoadImage",props:{src:{type:String,required:!0},alt:{type:String,default:""},width:String,height:String,fit:{type:String,default:"cover"},rounded:Boolean,preview:Boolean,caption:String,fallback:String,lazy:{type:Boolean,default:!0}},emits:{load:()=>!0,error:()=>!0},setup(o,{emit:s}){let c=i(),g=t(!0),I=t(!1),d=t(!1),a=l(_),M=t(null);_t(M,()=>d.value),an(()=>d.value);let x=()=>{if(!o.preview||d.value)return;a.value=_,d.value=!0},w=()=>{d.value=!1},b=()=>{if(g.value=!1,!I.value)I.value=!0,s("error")},G=(u)=>{let m=A(u.key);if(!m)return;if(u.preventDefault(),m==="close")w();else a.value=v(a.value,m)},T=(u)=>{u.preventDefault(),a.value={...a.value,scale:E(a.value.scale,O(u.deltaY))}},p=(u,m,f)=>e("button",{type:"button",class:"poad-image__tool","aria-label":u,onClick:f},[e(n,{name:m,size:16})]);return()=>{let u=S(o.src,o.fallback,I.value),m=P(o.alt||c.t("display.preview")),f=a.value;return e("div",{class:z(o),style:{width:o.width,height:o.height}},[e("figure",{class:"poad-image__figure"},[g.value?e(ot,{class:"poad-image__skeleton",shape:"rect",width:"100%",height:"100%"}):null,e("img",{class:["poad-image__img",g.value&&"is-hidden"],src:u,alt:o.alt,style:{objectFit:o.fit},loading:o.lazy?"lazy":void 0,onLoad:()=>{g.value=!1,s("load")},onError:b,onClick:x}),o.preview&&!g.value&&!I.value?e("button",{type:"button",class:"poad-image__zoom","aria-label":c.t("display.enlarge"),onClick:x},[e(n,{name:"zoom-in",size:16})]):null,o.caption?e("figcaption",{class:"poad-image__caption"},o.caption):null]),d.value?e("div",{ref:M,class:"poad-image__viewer",...m,tabindex:-1,onClick:w,onKeydown:G,onWheel:T},[e("div",{class:"poad-image__tools",onClick:(h)=>h.stopPropagation()},[p(c.t("common.zoomOut"),"zoom-out",()=>{a.value=v(a.value,"zoomOut")}),e("span",{class:"poad-image__pct"},new Intl.NumberFormat(c.locale,{style:"percent",maximumFractionDigits:0}).format(f.scale)),p(c.t("common.zoomIn"),"zoom-in",()=>{a.value=v(a.value,"zoomIn")}),p(c.t("display.rotate"),"refresh",()=>{a.value=v(a.value,"rotate")}),p(c.t("common.reset"),"maximize",()=>{a.value=_}),e("a",{class:"poad-image__tool",href:u,download:"",target:"_blank",rel:"noopener","aria-label":c.t("common.download")},[e(n,{name:"download",size:16})]),p(c.t("common.close"),"x",w)]),e("img",{class:"poad-image__full",src:u,alt:o.alt,style:{transform:y(f.scale,f.rotation)},onClick:(h)=>h.stopPropagation()})]):null])}}});export{F as PoadImage};
1
+ import{n}from"./c-rv7cxh2k.js";import{ot}from"./c-eh9ryhw7.js";import{_t,an}from"./c-k3yb5e72.js";import{i}from"./c-xw7vce7r.js";import{t,l,r,e}from"./c-qzar8xvm.js";var z=(o)=>["poad-image",o.rounded&&"is-rounded",o.preview&&"has-preview"].filter(Boolean).join(" "),S=(o,s,c)=>c&&s?s:o,E=(o,s)=>Math.max(0.25,Math.min(6,+(o+s).toFixed(2))),O=(o)=>o<0?0.15:-0.15,y=(o,s)=>`scale(${o}) rotate(${s}deg)`;function A(o){if(o==="Escape")return"close";if(o==="+"||o==="=")return"zoomIn";if(o==="-")return"zoomOut";if(o==="r")return"rotate";return null}var _={scale:1,rotation:0};function v(o,s){switch(s){case"zoomIn":return{...o,scale:E(o.scale,0.25)};case"zoomOut":return{...o,scale:E(o.scale,-0.25)};case"rotate":return{...o,rotation:o.rotation+90};case"reset":return _;default:return o}}var P=(o)=>({role:"dialog","aria-modal":"true","aria-label":o});var F=r({name:"PoadImage",props:{src:{type:String,required:!0},alt:{type:String,default:""},width:String,height:String,fit:{type:String,default:"cover"},rounded:Boolean,preview:Boolean,caption:String,fallback:String,lazy:{type:Boolean,default:!0}},emits:{load:()=>!0,error:()=>!0},setup(o,{emit:s}){let c=i(),g=t(!0),I=t(!1),d=t(!1),a=l(_),M=t(null);_t(M,()=>d.value),an(()=>d.value);let x=()=>{if(!o.preview||d.value)return;a.value=_,d.value=!0},w=()=>{d.value=!1},b=()=>{if(g.value=!1,!I.value)I.value=!0,s("error")},G=(u)=>{let m=A(u.key);if(!m)return;if(u.preventDefault(),m==="close")w();else a.value=v(a.value,m)},T=(u)=>{u.preventDefault(),a.value={...a.value,scale:E(a.value.scale,O(u.deltaY))}},p=(u,m,f)=>e("button",{type:"button",class:"poad-image__tool","aria-label":u,onClick:f},[e(n,{name:m,size:16})]);return()=>{let u=S(o.src,o.fallback,I.value),m=P(o.alt||c.t("display.preview")),f=a.value;return e("div",{class:z(o),style:{width:o.width,height:o.height}},[e("figure",{class:"poad-image__figure"},[g.value?e(ot,{class:"poad-image__skeleton",shape:"rect",width:"100%",height:"100%"}):null,e("img",{class:["poad-image__img",g.value&&"is-hidden"],src:u,alt:o.alt,style:{objectFit:o.fit},loading:o.lazy?"lazy":void 0,onLoad:()=>{g.value=!1,s("load")},onError:b,onClick:x}),o.preview&&!g.value&&!I.value?e("button",{type:"button",class:"poad-image__zoom","aria-label":c.t("display.enlarge"),onClick:x},[e(n,{name:"zoom-in",size:16})]):null,o.caption?e("figcaption",{class:"poad-image__caption"},o.caption):null]),d.value?e("div",{ref:M,class:"poad-image__viewer",...m,tabindex:-1,onClick:w,onKeydown:G,onWheel:T},[e("div",{class:"poad-image__tools",onClick:(h)=>h.stopPropagation()},[p(c.t("common.zoomOut"),"zoom-out",()=>{a.value=v(a.value,"zoomOut")}),e("span",{class:"poad-image__pct"},new Intl.NumberFormat(c.locale,{style:"percent",maximumFractionDigits:0}).format(f.scale)),p(c.t("common.zoomIn"),"zoom-in",()=>{a.value=v(a.value,"zoomIn")}),p(c.t("display.rotate"),"refresh",()=>{a.value=v(a.value,"rotate")}),p(c.t("common.reset"),"maximize",()=>{a.value=_}),e("a",{class:"poad-image__tool",href:u,download:"",target:"_blank",rel:"noopener","aria-label":c.t("common.download")},[e(n,{name:"download",size:16})]),p(c.t("common.close"),"x",w)]),e("img",{class:"poad-image__full",src:u,alt:o.alt,style:{transform:y(f.scale,f.rotation)},onClick:(h)=>h.stopPropagation()})]):null])}}});export{F as PoadImage};
@@ -1 +1 @@
1
- import{k}from"./c-rasvf2z2.js";import{q}from"./c-tv3ksk7j.js";import{r,a,I,e}from"./c-kyajr8zz.js";function c(t){let o=t.look??"pill",n=t.attached??!0;return{"is-vertical":t.orientation==="vertical","is-attached":o==="attached"&&n,"is-pill":o==="pill","is-loose":o==="attached"&&!n,"is-stretch":!!t.stretch,"size-sm":t.size==="sm","size-lg":t.size==="lg"}}function p(t,o,n){if(!t||n===void 0)return null;return t==="multiple"?Array.isArray(o)&&o.includes(n):o===n}function f(t,o,n,i=!1){if(!t||n===void 0||i)return;if(t==="multiple"){let u=Array.isArray(o)?[...o]:[],l=u.indexOf(n);if(l>=0)u.splice(l,1);else u.push(n);return{value:u}}return{value:o===n?null:n}}var G=r({name:"PoadButtonGroup",props:{modelValue:{type:null},selectable:{type:String,default:null},orientation:String,look:String,attached:{type:Boolean,default:!0},stretch:Boolean,size:String,ariaLabel:String},emits:{"update:modelValue":(t)=>!0},setup(t,{slots:o}){let n=a(t,"modelValue");return()=>{let i=t.selectable,u=q(o.default?.()).map((l)=>{let s=l.props??{};if(!i||l.type!==k||s.value===void 0)return l;let b=s.disabled!=null&&s.disabled!==!1;return I(l,{pressed:s.pressed??p(i,n.value??null,s.value),onClick:()=>{let d=f(i,n.value??null,s.value,b);if(d)n.value=d.value}})});return e("div",{class:["poad-button-group",c(t)],role:"group","aria-label":t.ariaLabel||void 0},u)}}});export{G as PoadButtonGroup};
1
+ import{k}from"./c-rj7c7mwf.js";import{q}from"./c-hrbpqm8q.js";import{r,a,I,e}from"./c-qzar8xvm.js";function c(t){let o=t.look??"pill",n=t.attached??!0;return{"is-vertical":t.orientation==="vertical","is-attached":o==="attached"&&n,"is-pill":o==="pill","is-loose":o==="attached"&&!n,"is-stretch":!!t.stretch,"size-sm":t.size==="sm","size-lg":t.size==="lg"}}function p(t,o,n){if(!t||n===void 0)return null;return t==="multiple"?Array.isArray(o)&&o.includes(n):o===n}function f(t,o,n,i=!1){if(!t||n===void 0||i)return;if(t==="multiple"){let u=Array.isArray(o)?[...o]:[],l=u.indexOf(n);if(l>=0)u.splice(l,1);else u.push(n);return{value:u}}return{value:o===n?null:n}}var G=r({name:"PoadButtonGroup",props:{modelValue:{type:null},selectable:{type:String,default:null},orientation:String,look:String,attached:{type:Boolean,default:!0},stretch:Boolean,size:String,ariaLabel:String},emits:{"update:modelValue":(t)=>!0},setup(t,{slots:o}){let n=a(t,"modelValue");return()=>{let i=t.selectable,u=q(o.default?.()).map((l)=>{let s=l.props??{};if(!i||l.type!==k||s.value===void 0)return l;let b=s.disabled!=null&&s.disabled!==!1;return I(l,{pressed:s.pressed??p(i,n.value??null,s.value),onClick:()=>{let d=f(i,n.value??null,s.value,b);if(d)n.value=d.value}})});return e("div",{class:["poad-button-group",c(t)],role:"group","aria-label":t.ariaLabel||void 0},u)}}});export{G as PoadButtonGroup};