@fiscozen/checkbox 1.0.1 → 1.1.2

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 (41) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +142 -0
  3. package/coverage/base.css +224 -0
  4. package/coverage/block-navigation.js +87 -0
  5. package/coverage/clover.xml +1031 -0
  6. package/coverage/coverage-final.json +7 -0
  7. package/coverage/favicon.png +0 -0
  8. package/coverage/index.html +131 -0
  9. package/coverage/prettify.css +1 -0
  10. package/coverage/prettify.js +2 -0
  11. package/coverage/sort-arrow-sprite.png +0 -0
  12. package/coverage/sorter.js +196 -0
  13. package/coverage/src/FzCheckbox.vue.html +1489 -0
  14. package/coverage/src/FzCheckboxGroup.vue.html +682 -0
  15. package/coverage/src/common.ts.html +157 -0
  16. package/coverage/src/components/ErrorAlert.vue.html +268 -0
  17. package/coverage/src/components/FzCheckboxGroupOption.vue.html +652 -0
  18. package/coverage/src/components/index.html +131 -0
  19. package/coverage/src/index.html +161 -0
  20. package/coverage/src/utils.ts.html +265 -0
  21. package/dist/checkbox.js +736 -555
  22. package/dist/checkbox.umd.cjs +2 -2
  23. package/dist/src/FzCheckboxCard.vue.d.ts +240 -0
  24. package/dist/src/FzCheckboxGroup.vue.d.ts +8 -2
  25. package/dist/src/__tests__/FzCheckboxCard.spec.d.ts +1 -0
  26. package/dist/src/common.d.ts +16 -5
  27. package/dist/src/index.d.ts +2 -1
  28. package/dist/src/types.d.ts +71 -2
  29. package/dist/style.css +1 -1
  30. package/package.json +4 -4
  31. package/src/FzCheckboxCard.vue +209 -0
  32. package/src/FzCheckboxGroup.vue +33 -10
  33. package/src/__tests__/FzCheckboxCard.spec.ts +423 -0
  34. package/src/__tests__/__snapshots__/FzCheckbox.spec.ts.snap +5 -11
  35. package/src/__tests__/__snapshots__/FzCheckboxCard.spec.ts.snap +17 -0
  36. package/src/__tests__/__snapshots__/FzCheckboxGroup.spec.ts.snap +5 -11
  37. package/src/common.ts +19 -0
  38. package/src/components/ErrorAlert.vue +4 -4
  39. package/src/index.ts +6 -1
  40. package/src/types.ts +86 -1
  41. package/tsconfig.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
- (function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@fiscozen/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@fiscozen/icons"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w.FzCheckbox={},w.Vue,w.icons))})(this,function(w,e,$){"use strict";function W(t){const o=Date.now()-16e11,n=Math.random().toString(36).slice(2,7);return`${t}-${o}-${n}`}function L(){return W("fz-checkbox")}function j(){return W("fz-checkbox-group")}const F=new DOMRect(0,0,window.innerWidth,window.innerHeight),E=(t,o,n,a,s)=>{let l=s?"bottom":"right",d=s?"bottom-start":"right-start";F.width=window.innerWidth,F.height=window.innerHeight,F.x=0,F.y=0;const f=t?t.getBoundingClientRect():F,x=o.getBoundingClientRect(),b=n.getBoundingClientRect(),u=(b.left-f.left-x.width)/f.width,i=(f.right-b.right-x.width)/f.width,c=(b.top-f.top-x.height)/f.height,p=(f.bottom-b.bottom-x.height)/f.height;let r=[{key:"right",space:i},{key:"top",space:c},{key:"bottom",space:p},{key:"left",space:u}].sort((m,y)=>y.space-m.space);if(s&&(r=r.filter(m=>m.key==="top"||m.key==="bottom")),l=r[0].key,!a){const m=(x.height-b.height)/2;switch(l){case"right":case"left":f.top>b.top-m&&(a="end"),f.bottom<b.top-m&&(a="start");break}}return d=a?`${l}-${a}`:l,d},Y=(t,o,n,a)=>({x:o.x+t.width*n/100,y:o.y+t.height*a/100}),M=t=>typeof t=="string"?document.querySelector(t):t,J=t=>({left:parseFloat(t.marginLeft),right:parseFloat(t.marginRight),top:parseFloat(t.marginTop),bottom:parseFloat(t.marginBottom)}),Z={bottom:(t,o)=>({position:{x:t.left-o.left+t.width/2,y:t.bottom},transform:{x:-50,y:0}}),"bottom-start":(t,o)=>({position:{x:t.left-o.left,y:t.bottom},transform:{x:0,y:0}}),"bottom-end":(t,o)=>({position:{x:t.right+o.right,y:t.bottom},transform:{x:-100,y:0}}),top:(t,o)=>({position:{x:t.left-o.left+t.width/2,y:t.top-o.bottom},transform:{x:-50,y:-100}}),"top-start":(t,o)=>({position:{x:t.left-o.left,y:t.top-o.bottom},transform:{x:0,y:-100}}),"top-end":(t,o)=>({position:{x:t.right+o.right,y:t.top-o.bottom},transform:{x:-100,y:-100}}),left:(t,o)=>({position:{x:t.left-o.right,y:t.top-o.top+t.height/2},transform:{x:-100,y:-50}}),"left-start":(t,o)=>({position:{x:t.left-o.right,y:t.top-o.top},transform:{x:-100,y:0}}),"left-end":(t,o)=>({position:{x:t.left-o.right,y:t.bottom+o.bottom},transform:{x:-100,y:-100}}),right:(t,o)=>({position:{x:t.right+o.left,y:t.top-o.top+t.height/2},transform:{x:0,y:-50}}),"right-start":(t,o)=>({position:{x:t.right+o.left,y:t.top-o.top},transform:{x:0,y:0}}),"right-end":(t,o)=>({position:{x:t.right+o.left,y:t.bottom+o.bottom},transform:{x:0,y:-100}})},_=(t,o,n)=>{const a=Z[t];return a?a(o,n):{position:{x:0,y:0},transform:{x:0,y:0}}},ee={bottom:(t,o)=>({position:{x:t.left+t.width/2,y:t.bottom-o.height},transform:{x:-50,y:0}}),"bottom-start":(t,o)=>({position:{x:t.left,y:t.bottom-o.height},transform:{x:0,y:0}}),"bottom-end":(t,o)=>({position:{x:t.right-o.width,y:t.bottom-o.height},transform:{x:0,y:0}}),top:t=>({position:{x:t.left+t.width/2,y:t.top},transform:{x:-50,y:0}}),"top-start":t=>({position:{x:t.left,y:t.top},transform:{x:0,y:0}}),"top-end":(t,o)=>({position:{x:t.right-o.width,y:t.top},transform:{x:0,y:0}}),left:(t,o)=>({position:{x:t.left,y:t.top+(t.height-o.height)/2},transform:{x:0,y:0}}),"left-start":t=>({position:{x:t.left,y:t.top},transform:{x:0,y:0}}),"left-end":(t,o)=>({position:{x:t.left,y:t.bottom-o.height},transform:{x:0,y:0}}),right:(t,o)=>({position:{x:t.right-o.width,y:t.top+(t.height-o.height)/2},transform:{x:0,y:0}}),"right-start":(t,o)=>({position:{x:t.right-o.width,y:t.top},transform:{x:0,y:0}}),"right-end":(t,o)=>({position:{x:t.right-o.width,y:t.bottom-o.height},transform:{x:0,y:0}})},te=(t,o,n)=>{const a=ee[t];return a?a(o,n):{position:{x:0,y:0},transform:{x:0,y:0}}},oe=(t,o,n,a)=>{const s={...t},l={...a};if(t.x<n.left&&(s.x=n.left,l.x=0),t.x+o.width>n.right){const d=n.right-o.width;d>0&&(s.x=d),l.x=0}if(t.y<n.top&&(s.y=n.top,l.y=0),t.y+o.height>n.bottom){const d=n.bottom-o.height;d>0&&(s.y=d),l.y=0}return{position:s,transform:l}},ae=(t,o,n,a,s)=>{const l=s?null:o;switch(t){case"auto":return E(l,n,a);case"auto-vertical":return E(l,n,a,void 0,!0);case"auto-start":return E(l,n,a,"start");case"auto-vertical-start":return E(l,n,a,"start",!0);case"auto-end":return E(l,n,a,"end");case"auto-vertical-end":return E(l,n,a,"end",!0);default:return"bottom-start"}},ne=t=>t.startsWith("auto"),re=t=>{const o=e.ref("auto"),n=e.ref(),a=e.ref(),s=e.ref(),l=e.ref(),d=e.reactive({position:{x:0,y:0}}),f={root:null,rootMargin:"0px",threshold:1,...t.element.value.intersectionOptions},x=e.ref(new IntersectionObserver(()=>{},f)),b=()=>{var m,y;const c=M(t.element.value.domRef.value);if(!c)return null;const p=(m=t.container)!=null&&m.value?M(t.container.value.domRef.value)??document.body:document.body,r=(y=t.opener)!=null&&y.value?M(t.opener.value.domRef.value):null;return{element:c,container:p,opener:r}},u=c=>{var p;return{element:c.element.getBoundingClientRect(),container:c.container.getBoundingClientRect(),opener:((p=c.opener)==null?void 0:p.getBoundingClientRect())??null}},i=(c=!1)=>e.nextTick(()=>{var C,S,z;n.value=((C=t.position)==null?void 0:C.value)??"auto";const p=b();if(!p)return;Object.assign(p.element.style,{position:"fixed",top:"0px",left:"0px"});const r=u(p);a.value=r.element,s.value=r.opener??void 0,l.value=r.container,x.value.observe(p.element),x.value.observe(p.container),ne(n.value)&&p.opener&&(n.value=ae(n.value,p.container,p.element,p.opener,((S=t.useViewport)==null?void 0:S.value)??!1));const m=J(window.getComputedStyle(p.element)),y=p.opener&&r.opener?_(n.value,r.opener,m):te(n.value,r.container,r.element),g=Y(r.element,y.position,y.transform.x,y.transform.y),k=oe(g,r.element,r.container,y.transform);d.position.x=k.position.x,d.position.y=k.position.y,Object.assign(p.element.style,{top:`${d.position.y}px`,left:`${d.position.x}px`,position:"fixed",display:"flex"}),a.value=p.element.getBoundingClientRect(),(z=t.callback)!=null&&z.value&&!c&&t.callback.value(a,s,l,o,n)});return e.onUnmounted(()=>{x.value.disconnect()}),{float:d,rect:a,setPosition:i,position:o,actualPosition:n,openerRect:s,containerRect:l}};function le(t){const o=window.matchMedia(t),n=e.ref(o.matches);function a(s){n.value=s.matches}return e.onMounted(()=>{o.addEventListener("change",a)}),e.onUnmounted(()=>{o.removeEventListener("change",a)}),e.computed(()=>n.value)}const P={global:{blue:{50:{value:"#eff1ff",type:"color"},100:{value:"#dee2ff",type:"color"},200:{value:"#bdc5ff",type:"color"},300:{value:"#9ca8ff",type:"color"},400:{value:"#7b8bff",type:"color"},500:{value:"#5a6eff",type:"color"},600:{value:"#4858cc",type:"color"},700:{value:"#364299",type:"color"},800:{value:"#242c66",type:"color"},900:{value:"#1b214c",type:"color"}},purple:{50:{value:"#f8f4ff",type:"color"},100:{value:"#f0e9ff",type:"color"},200:{value:"#e1d3ff",type:"color"},300:{value:"#d2bdff",type:"color"},400:{value:"#c3a7ff",type:"color"},500:{value:"#b491ff",type:"color"},600:{value:"#9074cc",type:"color"},700:{value:"#6c5799",type:"color"},800:{value:"#483a66",type:"color"},900:{value:"#241d33",type:"color"}},orange:{50:{value:"#fff2ef",type:"color"},100:{value:"#ffe4de",type:"color"},200:{value:"#ffc9bd",type:"color"},300:{value:"#ffae9c",type:"color"},400:{value:"#ff937b",type:"color"},500:{value:"#ff785a",type:"color"},600:{value:"#cc6048",type:"color"},700:{value:"#994836",type:"color"},800:{value:"#663024",type:"color"},900:{value:"#331812",type:"color"}},pink:{50:{value:"#fff5f5",type:"color"},100:{value:"#ffe0e0",type:"color"},200:{value:"#ffcbcb",type:"color"},300:{value:"#ffc0c0",type:"color"},400:{value:"#ffabab",type:"color"},500:{value:"#ff9696",type:"color"},600:{value:"#cc7878",type:"color"},700:{value:"#995a5a",type:"color"},800:{value:"#663c3c",type:"color"},900:{value:"#331e1e",type:"color"}},yellow:{50:{value:"#fffbf4",type:"color"},100:{value:"#fff3de",type:"color"},200:{value:"#ffebc8",type:"color"},300:{value:"#ffe7bd",type:"color"},400:{value:"#ffdfa7",type:"color"},500:{value:"#ffd791",type:"color"},600:{value:"#ccac74",type:"color"},700:{value:"#998157",type:"color"},800:{value:"#806c49",type:"color"},900:{value:"#4c402b",type:"color"}},semantic:{error:{50:{value:"#fef3f3",type:"color"},100:{value:"#f8baba",type:"color"},200:{value:"#f04242",type:"color"},300:{value:"#aa2f2f",type:"color"}},warning:{50:{value:"#fff8f3",type:"color"},100:{value:"#ffdabd",type:"color"},200:{value:"#ffae4f",type:"color"},300:{value:"#b47b38",type:"color"}},success:{50:{value:"#f2f8f6",type:"color"},100:{value:"#b5d8ce",type:"color"},200:{value:"#0fa88c",type:"color"},300:{value:"#0b7763",type:"color"}},info:{50:{value:"#f3f7ff",type:"color"},100:{value:"#b4c8e1",type:"color"},200:{value:"#4e9fff",type:"color"},300:{value:"#3770b4",type:"color"}}},background:{"white-smoke":{value:"#f7f6f3",type:"color"},seashell:{value:"#f8ece7",type:"color"},"pale-purple":{value:"#f2e6ff",type:"color"},"alice-blue":{value:"#ecf2fc",type:"color"}},grey:{100:{value:"#e9edf0",type:"color"},200:{value:"#d1dde6",type:"color"},300:{value:"#9da9b2",type:"color"},400:{value:"#6e777e",type:"color"},500:{value:"#596167",type:"color"}},core:{white:{value:"#ffffff",type:"color"},black:{value:"#2c282f",type:"color"}},"font-sans":{"sharp-grotesk":{value:'"Sharp Grotesk", sans-serif',type:"fontFamilies"},inter:{value:'"Inter", sans-serif',type:"fontFamilies"}},font:{light:{value:"300",type:"fontWeights"},normal:{value:"400",type:"fontWeights"},medium:{value:"500",type:"fontWeights"}},spacing:{0:{value:"0px",type:"spacing"},1:{value:"1px",type:"spacing"},2:{value:"2px",type:"spacing"},4:{value:"4px",type:"spacing"},6:{value:"6px",type:"spacing"},8:{value:"8px",type:"spacing"},10:{value:"10px",type:"spacing"},12:{value:"12px",type:"spacing"},14:{value:"14px",type:"spacing"},16:{value:"16px",type:"spacing"},20:{value:"20px",type:"spacing"},24:{value:"24px",type:"spacing"},28:{value:"28px",type:"spacing"},32:{value:"32px",type:"spacing"},36:{value:"36px",type:"spacing"},40:{value:"40px",type:"spacing"},44:{value:"44px",type:"spacing"},48:{value:"48px",type:"spacing"},56:{value:"56px",type:"spacing"},64:{value:"64px",type:"spacing"},80:{value:"80px",type:"spacing"},96:{value:"96px",type:"spacing"},112:{value:"112px",type:"spacing"},128:{value:"128px",type:"spacing"},144:{value:"144px",type:"spacing"},160:{value:"160px",type:"spacing"},176:{value:"176px",type:"spacing"},192:{value:"192px",type:"spacing"},208:{value:"208px",type:"spacing"},224:{value:"224px",type:"spacing"},240:{value:"240px",type:"spacing"},256:{value:"256px",type:"spacing"},288:{value:"288px",type:"spacing"},320:{value:"320px",type:"spacing"},384:{value:"384px",type:"spacing"}},border:{0:{value:"0px",type:"borderWidth"},1:{value:"1px",type:"borderWidth"},2:{value:"2px",type:"borderWidth"},4:{value:"4px",type:"borderWidth"},8:{value:"8px",type:"borderWidth"}},rounded:{none:{value:"0px",type:"borderRadius"},sm:{value:"2px",type:"borderRadius"},base:{value:"4px",type:"borderRadius"},md:{value:"6px",type:"borderRadius"},lg:{value:"8px",type:"borderRadius"},xl:{value:"12px",type:"borderRadius"},"2xl":{value:"16px",type:"borderRadius"},"3xl":{value:"24px",type:"borderRadius"},full:{value:"9999px",type:"borderRadius"}},breakpoint:{xs:{value:"376px",type:"sizing"},sm:{value:"640px",type:"sizing"},md:{value:"768px",type:"sizing"},lg:{value:"1024px",type:"sizing"},xl:{value:"1280px",type:"sizing"},"2xl":{value:"1440px",type:"sizing"},"3xl":{value:"1536px",type:"sizing"}},shadow:{none:{value:{color:"#000000",type:"dropShadow",x:"0",y:"0",blur:"0",spread:"0"},type:"boxShadow"},sm:{value:{color:"#0000000d",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},type:"boxShadow"},base:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},{color:"#0000001a",type:"dropShadow",x:"0",y:"1",blur:"3",spread:"0"}],type:"boxShadow"},md:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"2",blur:"4",spread:"-1"},{color:"#0000001a",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-1"}],type:"boxShadow"},lg:{value:[{color:"#0000000d",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-2"},{color:"#0000001a",type:"dropShadow",x:"0",y:"10",blur:"15",spread:"-3"}],type:"boxShadow"},xl:{value:[{color:"#0000000a",type:"dropShadow",x:"0",y:"10",blur:"10",spread:"-5"},{color:"#0000001a",type:"dropShadow",x:"0",y:"20",blur:"25",spread:"-5"}],type:"boxShadow"},"2xl":{value:{color:"#00000040",type:"dropShadow",x:"0",y:"25",blur:"50",spread:"-12"},type:"boxShadow"},inner:{value:{color:"#0000000f",type:"innerShadow",x:"0",y:"2",blur:"4",spread:"0"},type:"boxShadow"}},underline:{value:"underline",type:"textDecoration"},text:{xs:{value:"12px",type:"fontSizes"},sm:{value:"14px",type:"fontSizes"},base:{value:"16px",type:"fontSizes"},lg:{value:"18px",type:"fontSizes"},xl:{value:"20px",type:"fontSizes"},"2xl":{value:"24px",type:"fontSizes"},"3xl":{value:"30px",type:"fontSizes"},"4xl":{value:"36px",type:"fontSizes"},"5xl":{value:"48px",type:"fontSizes"},"6xl":{value:"60px",type:"fontSizes"},"7xl":{value:"72px",type:"fontSizes"},"8xl":{value:"96px",type:"fontSizes"},"9xl":{value:"128px",type:"fontSizes"}},leading:{xs:{value:"16px",type:"lineHeights"},sm:{value:"18px",type:"lineHeights"},base:{value:"20px",type:"lineHeights"},lg:{value:"24px",type:"lineHeights"},xl:{value:"28px",type:"lineHeights"},"2xl":{value:"32px",type:"lineHeights"},"3xl":{value:"36px",type:"lineHeights"},"4xl":{value:"40px",type:"lineHeights"},"5xl":{value:"48px",type:"lineHeights"},"6xl":{value:"60px",type:"lineHeights"},"7xl":{value:"72px",type:"lineHeights"},"8xl":{value:"96px",type:"lineHeights"},"9xl":{value:"128px",type:"lineHeights"}}}},ie={safeColorNames:["blue","purple","orange","pink","yellow","grey","core"]},se={semanticColorNames:["error","warning","success","info"]},ce=ie.safeColorNames,de=se.semanticColorNames,V={};ce.forEach(t=>{const o=P.global[t];o&&Object.keys(o).forEach(n=>{var s;const a=(s=o[n])==null?void 0:s.value;a&&(V[t]||(V[t]={}),V[t][n]=a)})});const U=P.global.semantic;U&&de.forEach(t=>{const o=U[t];o&&typeof o=="object"&&Object.keys(o).forEach(n=>{var s;const a=(s=o[n])==null?void 0:s.value;if(a){const l=`semantic-${t}`;V[l]||(V[l]={}),V[l][n]=a}})});const ue=Object.entries(P.global.breakpoint).reduce((t,[o,n])=>(t[o]=n.value,t),{}),pe=e.defineComponent({__name:"FzFloating",props:{isOpen:{type:Boolean,default:!1},position:{default:"auto"},container:{},contentClass:{},openerClass:{},overrideContentClass:{type:Boolean},overrideOpener:{},teleport:{type:Boolean,default:!1},useViewport:{type:Boolean}},emits:["fzfloating:setPosition"],setup(t,{expose:o,emit:n}){const a=t,s=n,l=e.ref(null),d=e.ref(null),f=e.useSlots(),x=le(`(max-width: ${ue.xs})`);let b=!1,u=!1,i=null,c=null;const p={position:a.position,element:{domRef:l},container:{domRef:e.toRef(a.container||document.body)},opener:{domRef:e.toRef(null)},useViewport:a.useViewport,callback(...h){s("fzfloating:setPosition",...h)}},r=e.toRefs(p);f.opener&&(p.opener={domRef:d});const m=re(r),y=()=>{b||!u||(b=!0,requestAnimationFrame(()=>{u&&a.isOpen&&m.setPosition(),b=!1}))};e.onMounted(()=>{u=!0});const g=()=>{y()},k=()=>{y()},C=()=>{window.addEventListener("scroll",g,!0),window.addEventListener("resize",k),l.value&&!i&&(i=new ResizeObserver(()=>{y()}),i.observe(l.value)),d.value&&!c&&(c=new ResizeObserver(()=>{y()}),c.observe(d.value))},S=()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",k),i&&(i.disconnect(),i=null),c&&(c.disconnect(),c=null)};e.watch(()=>a.position,()=>y()),e.watch(()=>a.isOpen,h=>{var A;if(!h||!l.value||!u){S();return}C();const N=(A=d.value)==null?void 0:A.getBoundingClientRect();l.value.style.position="fixed",l.value.style.top="0px",l.value.style.left="0px",l.value.style.transform="none",l.value.style.width=x.value?(N==null?void 0:N.width)+"px":"auto",m.setPosition()}),e.watch(()=>a.overrideOpener,h=>{h&&r.opener&&r.opener.value&&(r.opener.value={domRef:h})}),e.onBeforeUnmount(()=>{u=!1,S()});const z=h=>h.startsWith("bottom")?"mt-4":h.startsWith("top")?"mb-4":h.startsWith("left")?"mr-4":h.startsWith("right")?"ml-4":"mt-4",R=e.computed(()=>{var N;const h=((N=m.actualPosition)==null?void 0:N.value)??a.position;return z(h)}),I=e.computed(()=>a.overrideContentClass?a.contentClass:["bg-core-white fixed",R.value,a.contentClass]);return o({setPosition:m.setPosition}),(h,N)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(h.$slots,"opener-start"),e.createElementVNode("div",{ref_key:"opener",ref:d,class:"inline-flex w-full sm:w-auto"},[e.renderSlot(h.$slots,"opener",{isOpen:t.isOpen,floating:e.unref(m)})],512),e.renderSlot(h.$slots,"opener-end"),t.teleport?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:l,class:e.normalizeClass(["fz__floating__content w-full sm:w-auto",I.value])},[e.renderSlot(h.$slots,"default",{isOpen:t.isOpen,floating:e.unref(m)})],2)),[[e.vShow,h.$slots.default&&(!h.$slots.opener||h.$slots.opener&&t.isOpen)]]),t.teleport?(e.openBlock(),e.createBlock(e.Teleport,{key:1,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:l,class:e.normalizeClass(["fz__floating__content",I.value])},[e.renderSlot(h.$slots,"default",{isOpen:t.isOpen,floating:e.unref(m)})],2),[[e.vShow,h.$slots.default&&(!h.$slots.opener||h.$slots.opener&&t.isOpen)]])])):e.createCommentVNode("",!0)]))}}),T={xs:"backoffice",sm:"backoffice",md:"backoffice",lg:"frontoffice"},fe=["disabled","aria-disabled"],H=e.defineComponent({__name:"FzButton",props:{label:{},tooltip:{},variant:{default:"primary"},size:{},environment:{},disabled:{type:Boolean,default:!1},iconName:{},iconVariant:{},iconPosition:{default:"before"},containerClass:{},overrideContainerClass:{type:Boolean}},setup(t){const o=t,n=e.useSlots();e.watch(()=>o.tooltip,i=>{i&&console.warn('[FzButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.')},{immediate:!0}),e.watch(()=>o.size,i=>{if(i!==void 0){const c=T[i];o.environment&&o.environment!==c?console.warn(`[FzButton] Both "size" and "environment" props are provided. "environment=${o.environment}" will be used and "size=${i}" will be ignored. Please remove the deprecated "size" prop.`):console.warn(`[FzButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${c}" instead of size="${i}".`)}},{immediate:!0});const a=e.computed(()=>!o.disabled),s=e.computed(()=>{switch(o.variant){case"secondary":return{"bg-core-white":!0,"text-grey-500":!0,"!border-grey-200":!0,"hover:bg-grey-100":a.value,"hover:!border-grey-200":a.value,"focus:bg-core-white":a.value,"focus:!border-blue-600":a.value,"disabled:bg-grey-50":!0,"disabled:text-grey-200":!0,"disabled:!border-grey-200":!0};case"invisible":return{"bg-transparent":!0,"text-grey-500":!0,"!border-transparent":!0,"hover:bg-grey-100":a.value,"hover:!border-grey-100":a.value,"focus:bg-transparent":a.value,"focus:!border-blue-600":a.value,"disabled:bg-grey-50":!0,"disabled:text-grey-200":!0,"disabled:!border-grey-200":!0};case"danger":return{"bg-semantic-error-200":!0,"text-core-white":!0,"hover:bg-semantic-error-300":a.value,"focus:bg-semantic-error-200":a.value,"focus:!border-semantic-error-300":a.value,"disabled:bg-semantic-error-100":!0};case"success":return{"bg-semantic-success-200":!0,"text-core-white":!0,"hover:bg-semantic-success-300":a.value,"focus:bg-semantic-success-200":a.value,"focus:!border-semantic-success-300":a.value,"disabled:bg-semantic-success-100":!0};case"primary":default:return{"bg-blue-500":!0,"text-core-white":!0,"hover:bg-blue-600":a.value,"focus:bg-blue-500":a.value,"focus:!border-blue-600":a.value,"disabled:bg-blue-200":!0}}}),l=e.computed(()=>o.environment?o.environment:o.size?T[o.size]:"frontoffice"),d=e.computed(()=>{const i=!!(o.label||n.default),c=!!o.iconName,p=o.overrideContainerClass&&c;return i&&c||p}),f=["relative","rounded","flex","flex-shrink","items-center","justify-center","font-normal","!text-[16px]","!leading-[20px]","border-1","border-transparent","gap-8"],x=["flex","items-center","justify-items-center"],b=e.computed(()=>{const i=l.value;return{"h-32":i==="backoffice","h-44":i==="frontoffice","px-12":!0,"min-w-96":!0,...s.value}}),u=e.computed(()=>o.overrideContainerClass?o.containerClass:["truncate","font-normal","!text-[16px]","!leading-[20px]",o.containerClass]);return(i,c)=>(e.openBlock(),e.createElementBlock("button",{type:"button",disabled:t.disabled,"aria-disabled":t.disabled?"true":"false",class:e.normalizeClass([f,b.value])},[e.unref(n).before||d.value&&t.iconPosition==="before"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(x)},[e.renderSlot(i.$slots,"before",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,name:t.iconName,size:"md",variant:t.iconVariant},null,8,["name","variant"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),t.label||e.unref(n).default?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(u.value)},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],2)):e.createCommentVNode("",!0),e.unref(n).after||d.value&&t.iconPosition==="after"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(x)},[e.renderSlot(i.$slots,"after",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,name:t.iconName,size:"md",variant:t.iconVariant},null,8,["name","variant"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],10,fe))}}),me=e.defineComponent({inheritAttrs:!1,__name:"FzIconButton",props:{tooltip:{},variant:{default:"primary"},environment:{},size:{},disabled:{type:Boolean,default:!1},iconName:{},iconVariant:{default:"far"},iconSize:{},hasNotification:{type:Boolean,default:!1},ariaLabel:{}},setup(t){const o=t;e.watch(()=>o.tooltip,l=>{l&&console.warn('[FzIconButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.')},{immediate:!0}),e.watch(()=>o.size,l=>{if(l!==void 0){const d=T[l];o.environment&&o.environment!==d?console.warn(`[FzIconButton] Both "size" and "environment" props are provided. "environment=${o.environment}" will be used and "size=${l}" will be ignored. Please remove the deprecated "size" prop.`):console.warn(`[FzIconButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${d}" instead of size="${l}".`)}},{immediate:!0}),e.watch(()=>o.iconSize,l=>{l!==void 0&&console.warn('[FzIconButton] The "iconSize" prop is deprecated and will be removed in a future version. Icon size has now a fixed dimension. Please remove the "iconSize" prop from your code.')},{immediate:!0});const n=e.computed(()=>o.environment?o.environment:o.size?T[o.size]:"frontoffice"),a=e.computed(()=>{const l=o.ariaLabel||"";return o.hasNotification?`${l}, hai delle notifiche`:l}),s=e.computed(()=>{const l={"rounded-full":!0,"w-8":!0,"h-8":!0,absolute:!0,"-top-[2px]":!0,"-right-[2px]":!0};return o.disabled?o.variant==="primary"?{...l,"bg-orange-200":!0}:{...l,"bg-grey-200":!0}:o.variant==="primary"?{...l,"bg-orange-500":!0}:{...l,"bg-blue-500":!0}});return(l,d)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["fz-icon-button-wrapper","relative",{"fz-icon-button-wrapper--backoffice":n.value==="backoffice","fz-icon-button-wrapper--frontoffice":n.value==="frontoffice"}])},[e.createVNode(H,e.mergeProps(l.$attrs,{disabled:o.disabled,environment:n.value,variant:o.variant,"aria-label":a.value,"icon-name":o.iconName,"icon-variant":o.iconVariant,"icon-position":"before",overrideContainerClass:""}),null,16,["disabled","environment","variant","aria-label","icon-name","icon-variant"]),o.hasNotification?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value),"aria-hidden":"true"},null,2)):e.createCommentVNode("",!0)],2))}}),O=(t,o)=>{const n=t.__vccOpts||t;for(const[a,s]of o)n[a]=s;return n},G=O(me,[["__scopeId","data-v-b4be112d"]]),K=O(e.defineComponent({__name:"FzContainer",props:{main:{type:Boolean,default:!1},gap:{default:"base"},tag:{default:"div"},alignItems:{default:void 0},horizontal:{type:Boolean,default:!1},layout:{}},setup(t){const o=t,n=e.computed(()=>o.alignItems??(o.horizontal?"center":"stretch"));if(!o.horizontal&&"layout"in o){const s=o.layout;s&&s!=="default"&&console.error(`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${o.horizontal}, layout: "${s}".`)}const a=e.computed(()=>{const s=o.main?"main-content":"section-content",d=[o.horizontal?"fz-container--horizontal":"fz-container--vertical",`gap-${s}-${o.gap}`,`align-items-${n.value}`];if(o.horizontal){const f=("layout"in o?o.layout:void 0)||"default";d.push(`layout-${f}`)}return d});return(s,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:e.normalizeClass(["fz-container",a.value])},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-8c40daeb"]]),be=["aria-disabled"],ye=["href","target","rel"],X=e.defineComponent({__name:"FzLink",props:{type:{default:"default"},linkStyle:{default:"default"},size:{default:"md"},disabled:{type:Boolean,default:!1},to:{},external:{type:Boolean,default:!1},replace:{type:Boolean,default:!1},target:{}},setup(t){const o=t;e.watch(()=>o.size==="xs",r=>{r&&console.warn('[FzLink] The size prop value "xs" is deprecated and will be removed in a future version. Please use "sm" instead. The component will automatically map "xs" to "sm" for now.')},{immediate:!0}),e.watch(()=>o.size==="lg",r=>{r&&console.warn('[FzLink] The size prop value "lg" is deprecated and will be removed in a future version. Please use "md" instead. The component will automatically map "lg" to "md" for now.')},{immediate:!0});const n=e.computed(()=>o.size==="xs"?"sm":o.size==="lg"?"md":o.size),a=e.computed(()=>["border-1 border-transparent inline-block",{"text-sm leading-xs":n.value==="sm","text-base leading-base":n.value==="md",underline:o.linkStyle==="underline"}]),s=r=>r.type==="default"&&r.linkStyle==="underline",l=r=>r.type==="default"&&r.linkStyle!=="underline",d=r=>r.type==="danger"&&r.linkStyle==="underline",f=r=>r.type==="danger"&&r.linkStyle!=="underline",x=r=>r.type==="default"&&r.disabled,b=r=>r.type==="danger"&&r.disabled,u=e.computed(()=>{const r=[...a.value,"focus:outline-none","focus:border-solid","focus:no-underline"];switch(!0){case s(o):r.push("text-blue-500","hover:text-blue-600","focus:text-blue-600","focus:border-blue-600");break;case l(o):r.push("text-blue-500","hover:text-blue-600","hover:underline","focus:text-blue-600","focus:border-blue-600");break;case d(o):r.push("text-semantic-error-200","hover:text-semantic-error-300","focus:text-semantic-error-300","focus:border-semantic-error-300");break;case f(o):r.push("text-semantic-error-200","hover:text-semantic-error-300","hover:underline","focus:text-semantic-error-300","focus:border-semantic-error-300");break}return r}),i=e.computed(()=>{const r=[...a.value,"cursor-not-allowed"];switch(!0){case x(o):r.push("text-blue-200");break;case b(o):r.push("text-semantic-error-100");break}return r}),c=e.computed(()=>o.external?o.to:""),p=e.computed(()=>{if(o.external&&o.target==="_blank")return"noopener noreferrer"});return(r,m)=>{const y=e.resolveComponent("router-link");return t.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(i.value),"aria-disabled":t.disabled?"true":"false",role:"link","aria-label":"Link disabled"},[e.renderSlot(r.$slots,"default")],10,be)):t.external?(e.openBlock(),e.createElementBlock("a",{key:1,href:c.value,class:e.normalizeClass(u.value),target:t.target,rel:p.value},[e.renderSlot(r.$slots,"default")],10,ye)):(e.openBlock(),e.createBlock(y,{key:2,to:t.to,replace:t.replace,class:e.normalizeClass(u.value),target:t.target},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},8,["to","replace","class","target"]))}}}),he=["aria-label","aria-describedby","tabindex"],xe=["aria-hidden"],ge=100,ve="text-core-white max-w-[200px] p-8 text-sm leading-[16px] flex flex-row items-start justify-center",ke=O(e.defineComponent({__name:"FzTooltip",props:{position:{default:"auto"},status:{default:"neutral"},text:{},withIcon:{type:Boolean,default:!1},ariaLabel:{},interactive:{type:[Boolean,String],default:"auto"},_forceOpenForDesignReview:{type:Boolean,default:!1}},setup(t){const o=t,n=e.useSlots(),a=[H,G,X];function s(v){const B=v.type;return a.includes(B)}function l(v){if(s(v))return!0;if(typeof v.type=="symbol"){const B=v.children;if(Array.isArray(B))return B.some(D=>typeof D=="object"&&D!==null&&"type"in D?l(D):!1)}return!1}const d=e.computed(()=>{if(!n.default)return!1;const v=n.default();return v.length===0?!1:v.some(B=>l(B))}),f={neutral:{icon:"",bgClass:"!bg-core-black"},informative:{icon:"circle-info",bgClass:"bg-semantic-info-200"},alert:{icon:"triangle-exclamation",bgClass:"bg-semantic-warning-200"},error:{icon:"circle-exclamation",bgClass:"bg-semantic-error-200"},positive:{icon:"circle-check",bgClass:"bg-semantic-success-200"}},x=e.computed(()=>{var v;return((v=f[o.status])==null?void 0:v.icon)||""}),b=e.computed(()=>{var B;const v=(B=f[o.status])==null?void 0:B.bgClass;return v?{[v]:!0}:{}}),u=`tooltip-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,i=e.ref(!1),c=e.ref(!1),p=e.ref(!1),r=e.ref(null),m=e.computed(()=>o.withIcon&&o.status!=="neutral"),y=e.computed(()=>i.value?u:void 0),g=e.computed(()=>typeof o.interactive=="boolean"?o.interactive?void 0:0:d.value?void 0:0);function k(){(o.text||n.text)&&(i.value=!0)}function C(){o._forceOpenForDesignReview||(i.value=!1)}function S(){r.value&&(clearTimeout(r.value),r.value=null),k()}function z(){r.value&&(clearTimeout(r.value),r.value=null),r.value=setTimeout(()=>{!c.value&&!p.value&&C()},ge)}function R(){c.value=!0,r.value&&(clearTimeout(r.value),r.value=null)}function I(){c.value=!1,r.value&&(clearTimeout(r.value),r.value=null),p.value||C()}function h(){p.value=!0,k()}function N(){p.value=!1,r.value&&(clearTimeout(r.value),r.value=null),c.value||C()}function A(v){v.key==="Escape"&&C()}return e.onMounted(()=>{o._forceOpenForDesignReview&&k()}),e.watch(()=>o._forceOpenForDesignReview,v=>{v?k():C()}),e.onUnmounted(()=>{r.value&&clearTimeout(r.value)}),(v,B)=>(e.openBlock(),e.createBlock(e.unref(pe),{teleport:!0,"is-open":i.value,position:t.position,class:"fz__tooltip flex h-max",contentClass:["rounded",b.value,"z-80"]},{opener:e.withCtx(()=>[e.createElementVNode("span",{"aria-label":o.ariaLabel,"aria-describedby":y.value,tabindex:g.value,onMouseover:S,onMouseleave:z,onFocusin:h,onFocusout:N,onKeydown:A},[e.renderSlot(v.$slots,"default",{},void 0,!0)],40,he)]),default:e.withCtx(()=>[e.createElementVNode("div",{id:u,class:e.normalizeClass(ve),role:"tooltip","aria-hidden":!i.value,onMouseenter:R,onMouseleave:I},[m.value?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,size:"md",name:x.value,class:e.normalizeClass(["mr-4","!w-[16px]","!h-[16px]","grow-0","shrink-0",{"text-core-black":o.status==="alert"}]),"aria-hidden":!0},null,8,["name","class"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["basis-0 grow shrink-0 break-normal fz__tooltip__text",{"text-core-black":o.status==="alert"}])},[e.renderSlot(v.$slots,"text",{},()=>[e.createTextVNode(e.toDisplayString(o.text),1)],!0)],2)],40,xe)]),_:3},8,["is-open","position","contentClass"]))}}),[["__scopeId","data-v-94597a6c"]]),Ce={class:"flex flex-col flex-1"},we={key:0,class:"leading-[20px]"},ze=O(e.defineComponent({__name:"FzAlert",props:{tone:{},alertStyle:{default:"default"},showButtonAction:{type:Boolean,default:!0},buttonActionLabel:{},buttonActionTooltip:{},isDismissible:{type:Boolean},showLinkAction:{type:Boolean},linkActionLabel:{},linkActionLocation:{},linkActionTarget:{},linkActionExternal:{type:Boolean},size:{},environment:{default:"frontoffice"},title:{},defaultOpen:{type:Boolean,default:!0},variant:{}},emits:["fzAlert:click","fzAlert:dismiss"],setup(t,{emit:o}){const n=t,a=o,s=e.ref(n.defaultOpen),l={info:"bg-semantic-info-50 border-semantic-info",error:"bg-semantic-error-50 border-semantic-error",danger:"bg-semantic-error-50 border-semantic-error",warning:"bg-semantic-warning-50 border-semantic-warning",success:"bg-semantic-success-50 border-semantic-success"},d={sm:"backoffice",md:"frontoffice",lg:"frontoffice"},f=e.computed(()=>["flex select-none gap-12 rounded justify-between",l[n.tone],y.value==="backoffice"?"p-6":"",...g.value==="accordion"?["cursor-pointer"]:[]]),x=e.computed(()=>({info:"circle-info",error:"circle-xmark",danger:"triangle-exclamation",warning:"triangle-exclamation",success:"circle-check"})[n.tone]),b=e.computed(()=>[{info:"text-semantic-info",error:"text-semantic-error",danger:"text-semantic-error",warning:"text-semantic-warning",success:"text-semantic-success"}[n.tone]]),u=e.computed(()=>["font-normal","!leading-[20px]",{"mt-8":n.title,"mb-16":n.showButtonAction||n.showLinkAction}]),i=e.computed(()=>g.value==="background"?!0:s.value),c=e.computed(()=>s.value?"angle-up":"angle-down"),p=e.computed(()=>{if(g.value==="accordion")return c.value;if(n.isDismissible)return"xmark"}),r=e.computed(()=>g.value!=="accordion"?!0:s.value);function m(z){z.stopPropagation(),a("fzAlert:click")}const y=e.computed(()=>n.size?d[n.size]:n.environment),g=e.computed(()=>n.variant?n.variant:["default","simple"].includes(n.alertStyle)?"background":"accordion"),k=e.computed(()=>g.value==="accordion"||n.isDismissible),C=()=>{g.value==="accordion"&&(s.value=!s.value),n.isDismissible&&a("fzAlert:dismiss")},S=()=>{g.value==="accordion"&&(s.value=!s.value)};return(z,R)=>{const I=e.resolveDirective("bold");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value),onClick:S},[e.createVNode(e.unref(K),{horizontal:"",gap:"sm",class:e.normalizeClass(["flex-1",y.value==="backoffice"?"p-6":"p-12"]),alignItems:"start"},{default:e.withCtx(()=>[e.createVNode(e.unref($.FzIcon),{name:x.value,size:"md",class:e.normalizeClass(b.value)},null,8,["name","class"]),e.createElementVNode("div",Ce,[t.title?e.withDirectives((e.openBlock(),e.createElementBlock("p",we,[e.createTextVNode(e.toDisplayString(t.title),1)])),[[I]]):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(u.value)},[e.renderSlot(z.$slots,"default",{},void 0,!0)],2)):e.createCommentVNode("",!0),i.value?e.renderSlot(z.$slots,"action",{key:2},()=>[e.createVNode(e.unref(K),{horizontal:"",gap:"sm"},{default:e.withCtx(()=>[t.showButtonAction?(e.openBlock(),e.createBlock(e.unref(H),{key:0,onClick:m,tooltip:t.buttonActionTooltip,environment:y.value,variant:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonActionLabel),1)]),_:1},8,["tooltip","environment"])):e.createCommentVNode("",!0),t.showLinkAction?(e.openBlock(),e.createBlock(e.unref(X),{key:1,to:t.linkActionLocation,onClick:m,size:"md",target:t.linkActionTarget,external:t.linkActionExternal},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.linkActionLabel),1)]),_:1},8,["to","target","external"])):e.createCommentVNode("",!0)]),_:1})],!0):e.createCommentVNode("",!0)])]),_:3},8,["class"]),k.value?(e.openBlock(),e.createBlock(e.unref(G),{key:0,iconName:p.value,environment:y.value,variant:"invisible",onClick:e.withModifiers(C,["stop"])},null,8,["iconName","environment"])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-f72b7e4a"]]),Q=e.defineComponent({__name:"ErrorAlert",props:{id:{}},setup(t){return(o,n)=>(e.openBlock(),e.createBlock(e.unref(ze),{id:t.id,tone:"error",alertStyle:"simple",role:"alert","aria-live":"assertive","aria-atomic":"true",size:"md"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id"]))}}),Be={class:"flex justify-center flex-col w-fit gap-4"},Se=["data-emphasis","data-error","data-disabled"],Ne=["id","disabled","required","value","aria-checked","aria-label","aria-required","aria-invalid","aria-describedby","aria-labelledby","aria-owns"],$e=["id","for"],Ee="w-0 h-0 peer fz-hidden-input",Ve=`
1
+ (function(z,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@fiscozen/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@fiscozen/icons"],e):(z=typeof globalThis<"u"?globalThis:z||self,e(z.FzCheckbox={},z.Vue,z.icons))})(this,function(z,e,$){"use strict";function j(t){const o=Date.now()-16e11,a=Math.random().toString(36).slice(2,7);return`${t}-${o}-${a}`}function D(){return j("fz-checkbox")}function U(){return j("fz-checkbox-group")}const A=new DOMRect(0,0,window.innerWidth,window.innerHeight),I=(t,o,a,n,s)=>{let r=s?"bottom":"right",c=s?"bottom-start":"right-start";A.width=window.innerWidth,A.height=window.innerHeight,A.x=0,A.y=0;const f=t?t.getBoundingClientRect():A,p=o.getBoundingClientRect(),h=a.getBoundingClientRect(),b=(h.left-f.left-p.width)/f.width,i=(f.right-h.right-p.width)/f.width,u=(h.top-f.top-p.height)/f.height,d=(f.bottom-h.bottom-p.height)/f.height;let l=[{key:"right",space:i},{key:"top",space:u},{key:"bottom",space:d},{key:"left",space:b}].sort((m,y)=>y.space-m.space);if(s&&(l=l.filter(m=>m.key==="top"||m.key==="bottom")),r=l[0].key,!n){const m=(p.height-h.height)/2;switch(r){case"right":case"left":f.top>h.top-m&&(n="end"),f.bottom<h.top-m&&(n="start");break}}return c=n?`${r}-${n}`:r,c},Z=(t,o,a,n)=>({x:o.x+t.width*a/100,y:o.y+t.height*n/100}),M=t=>typeof t=="string"?document.querySelector(t):t,_=t=>({left:parseFloat(t.marginLeft),right:parseFloat(t.marginRight),top:parseFloat(t.marginTop),bottom:parseFloat(t.marginBottom)}),ee={bottom:(t,o)=>({position:{x:t.left-o.left+t.width/2,y:t.bottom},transform:{x:-50,y:0}}),"bottom-start":(t,o)=>({position:{x:t.left-o.left,y:t.bottom},transform:{x:0,y:0}}),"bottom-end":(t,o)=>({position:{x:t.right+o.right,y:t.bottom},transform:{x:-100,y:0}}),top:(t,o)=>({position:{x:t.left-o.left+t.width/2,y:t.top-o.bottom},transform:{x:-50,y:-100}}),"top-start":(t,o)=>({position:{x:t.left-o.left,y:t.top-o.bottom},transform:{x:0,y:-100}}),"top-end":(t,o)=>({position:{x:t.right+o.right,y:t.top-o.bottom},transform:{x:-100,y:-100}}),left:(t,o)=>({position:{x:t.left-o.right,y:t.top-o.top+t.height/2},transform:{x:-100,y:-50}}),"left-start":(t,o)=>({position:{x:t.left-o.right,y:t.top-o.top},transform:{x:-100,y:0}}),"left-end":(t,o)=>({position:{x:t.left-o.right,y:t.bottom+o.bottom},transform:{x:-100,y:-100}}),right:(t,o)=>({position:{x:t.right+o.left,y:t.top-o.top+t.height/2},transform:{x:0,y:-50}}),"right-start":(t,o)=>({position:{x:t.right+o.left,y:t.top-o.top},transform:{x:0,y:0}}),"right-end":(t,o)=>({position:{x:t.right+o.left,y:t.bottom+o.bottom},transform:{x:0,y:-100}})},te=(t,o,a)=>{const n=ee[t];return n?n(o,a):{position:{x:0,y:0},transform:{x:0,y:0}}},oe={bottom:(t,o)=>({position:{x:t.left+t.width/2,y:t.bottom-o.height},transform:{x:-50,y:0}}),"bottom-start":(t,o)=>({position:{x:t.left,y:t.bottom-o.height},transform:{x:0,y:0}}),"bottom-end":(t,o)=>({position:{x:t.right-o.width,y:t.bottom-o.height},transform:{x:0,y:0}}),top:t=>({position:{x:t.left+t.width/2,y:t.top},transform:{x:-50,y:0}}),"top-start":t=>({position:{x:t.left,y:t.top},transform:{x:0,y:0}}),"top-end":(t,o)=>({position:{x:t.right-o.width,y:t.top},transform:{x:0,y:0}}),left:(t,o)=>({position:{x:t.left,y:t.top+(t.height-o.height)/2},transform:{x:0,y:0}}),"left-start":t=>({position:{x:t.left,y:t.top},transform:{x:0,y:0}}),"left-end":(t,o)=>({position:{x:t.left,y:t.bottom-o.height},transform:{x:0,y:0}}),right:(t,o)=>({position:{x:t.right-o.width,y:t.top+(t.height-o.height)/2},transform:{x:0,y:0}}),"right-start":(t,o)=>({position:{x:t.right-o.width,y:t.top},transform:{x:0,y:0}}),"right-end":(t,o)=>({position:{x:t.right-o.width,y:t.bottom-o.height},transform:{x:0,y:0}})},ae=(t,o,a)=>{const n=oe[t];return n?n(o,a):{position:{x:0,y:0},transform:{x:0,y:0}}},ne=(t,o,a,n)=>{const s={...t},r={...n};if(t.x<a.left&&(s.x=a.left,r.x=0),t.x+o.width>a.right){const c=a.right-o.width;c>0&&(s.x=c),r.x=0}if(t.y<a.top&&(s.y=a.top,r.y=0),t.y+o.height>a.bottom){const c=a.bottom-o.height;c>0&&(s.y=c),r.y=0}return{position:s,transform:r}},le=(t,o,a,n,s)=>{const r=s?null:o;switch(t){case"auto":return I(r,a,n);case"auto-vertical":return I(r,a,n,void 0,!0);case"auto-start":return I(r,a,n,"start");case"auto-vertical-start":return I(r,a,n,"start",!0);case"auto-end":return I(r,a,n,"end");case"auto-vertical-end":return I(r,a,n,"end",!0);default:return"bottom-start"}},re=t=>t.startsWith("auto"),ie=t=>{const o=e.ref("auto"),a=e.ref(),n=e.ref(),s=e.ref(),r=e.ref(),c=e.reactive({position:{x:0,y:0}}),f={root:null,rootMargin:"0px",threshold:1,...t.element.value.intersectionOptions},p=e.ref(new IntersectionObserver(()=>{},f)),h=()=>{var m,y;const u=M(t.element.value.domRef.value);if(!u)return null;const d=(m=t.container)!=null&&m.value?M(t.container.value.domRef.value)??document.body:document.body,l=(y=t.opener)!=null&&y.value?M(t.opener.value.domRef.value):null;return{element:u,container:d,opener:l}},b=u=>{var d;return{element:u.element.getBoundingClientRect(),container:u.container.getBoundingClientRect(),opener:((d=u.opener)==null?void 0:d.getBoundingClientRect())??null}},i=(u=!1)=>e.nextTick(()=>{var k,E,N;a.value=((k=t.position)==null?void 0:k.value)??"auto";const d=h();if(!d)return;Object.assign(d.element.style,{position:"fixed",top:"0px",left:"0px"});const l=b(d);n.value=l.element,s.value=l.opener??void 0,r.value=l.container,p.value.observe(d.element),p.value.observe(d.container),re(a.value)&&d.opener&&(a.value=le(a.value,d.container,d.element,d.opener,((E=t.useViewport)==null?void 0:E.value)??!1));const m=_(window.getComputedStyle(d.element)),y=d.opener&&l.opener?te(a.value,l.opener,m):ae(a.value,l.container,l.element),C=Z(l.element,y.position,y.transform.x,y.transform.y),v=ne(C,l.element,l.container,y.transform);c.position.x=v.position.x,c.position.y=v.position.y,Object.assign(d.element.style,{top:`${c.position.y}px`,left:`${c.position.x}px`,position:"fixed",display:"flex"}),n.value=d.element.getBoundingClientRect(),(N=t.callback)!=null&&N.value&&!u&&t.callback.value(n,s,r,o,a)});return e.onUnmounted(()=>{p.value.disconnect()}),{float:c,rect:n,setPosition:i,position:o,actualPosition:a,openerRect:s,containerRect:r}};function se(t){const o=window.matchMedia(t),a=e.ref(o.matches);function n(s){a.value=s.matches}return e.onMounted(()=>{o.addEventListener("change",n)}),e.onUnmounted(()=>{o.removeEventListener("change",n)}),e.computed(()=>a.value)}const P={global:{blue:{50:{value:"#eff1ff",type:"color"},100:{value:"#dee2ff",type:"color"},200:{value:"#bdc5ff",type:"color"},300:{value:"#9ca8ff",type:"color"},400:{value:"#7b8bff",type:"color"},500:{value:"#5a6eff",type:"color"},600:{value:"#4858cc",type:"color"},700:{value:"#364299",type:"color"},800:{value:"#242c66",type:"color"},900:{value:"#1b214c",type:"color"}},purple:{50:{value:"#f8f4ff",type:"color"},100:{value:"#f0e9ff",type:"color"},200:{value:"#e1d3ff",type:"color"},300:{value:"#d2bdff",type:"color"},400:{value:"#c3a7ff",type:"color"},500:{value:"#b491ff",type:"color"},600:{value:"#9074cc",type:"color"},700:{value:"#6c5799",type:"color"},800:{value:"#483a66",type:"color"},900:{value:"#241d33",type:"color"}},orange:{50:{value:"#fff2ef",type:"color"},100:{value:"#ffe4de",type:"color"},200:{value:"#ffc9bd",type:"color"},300:{value:"#ffae9c",type:"color"},400:{value:"#ff937b",type:"color"},500:{value:"#ff785a",type:"color"},600:{value:"#cc6048",type:"color"},700:{value:"#994836",type:"color"},800:{value:"#663024",type:"color"},900:{value:"#331812",type:"color"}},pink:{50:{value:"#fff5f5",type:"color"},100:{value:"#ffe0e0",type:"color"},200:{value:"#ffcbcb",type:"color"},300:{value:"#ffc0c0",type:"color"},400:{value:"#ffabab",type:"color"},500:{value:"#ff9696",type:"color"},600:{value:"#cc7878",type:"color"},700:{value:"#995a5a",type:"color"},800:{value:"#663c3c",type:"color"},900:{value:"#331e1e",type:"color"}},yellow:{50:{value:"#fffbf4",type:"color"},100:{value:"#fff3de",type:"color"},200:{value:"#ffebc8",type:"color"},300:{value:"#ffe7bd",type:"color"},400:{value:"#ffdfa7",type:"color"},500:{value:"#ffd791",type:"color"},600:{value:"#ccac74",type:"color"},700:{value:"#998157",type:"color"},800:{value:"#806c49",type:"color"},900:{value:"#4c402b",type:"color"}},semantic:{error:{50:{value:"#fef3f3",type:"color"},100:{value:"#f8baba",type:"color"},200:{value:"#f04242",type:"color"},300:{value:"#aa2f2f",type:"color"}},warning:{50:{value:"#fff8f3",type:"color"},100:{value:"#ffdabd",type:"color"},200:{value:"#ffae4f",type:"color"},300:{value:"#b47b38",type:"color"}},success:{50:{value:"#f2f8f6",type:"color"},100:{value:"#b5d8ce",type:"color"},200:{value:"#0fa88c",type:"color"},300:{value:"#0b7763",type:"color"}},info:{50:{value:"#f3f7ff",type:"color"},100:{value:"#b4c8e1",type:"color"},200:{value:"#4e9fff",type:"color"},300:{value:"#3770b4",type:"color"}}},background:{"white-smoke":{value:"#f7f6f3",type:"color"},seashell:{value:"#f8ece7",type:"color"},"pale-purple":{value:"#f2e6ff",type:"color"},"alice-blue":{value:"#ecf2fc",type:"color"}},grey:{100:{value:"#e9edf0",type:"color"},200:{value:"#d1dde6",type:"color"},300:{value:"#9da9b2",type:"color"},400:{value:"#6e777e",type:"color"},500:{value:"#596167",type:"color"}},core:{white:{value:"#ffffff",type:"color"},black:{value:"#2c282f",type:"color"}},"font-sans":{"sharp-grotesk":{value:'"Sharp Grotesk", sans-serif',type:"fontFamilies"},inter:{value:'"Inter", sans-serif',type:"fontFamilies"}},font:{light:{value:"300",type:"fontWeights"},normal:{value:"400",type:"fontWeights"},medium:{value:"500",type:"fontWeights"}},spacing:{0:{value:"0px",type:"spacing"},1:{value:"1px",type:"spacing"},2:{value:"2px",type:"spacing"},4:{value:"4px",type:"spacing"},6:{value:"6px",type:"spacing"},8:{value:"8px",type:"spacing"},10:{value:"10px",type:"spacing"},12:{value:"12px",type:"spacing"},14:{value:"14px",type:"spacing"},16:{value:"16px",type:"spacing"},20:{value:"20px",type:"spacing"},24:{value:"24px",type:"spacing"},28:{value:"28px",type:"spacing"},32:{value:"32px",type:"spacing"},36:{value:"36px",type:"spacing"},40:{value:"40px",type:"spacing"},44:{value:"44px",type:"spacing"},48:{value:"48px",type:"spacing"},56:{value:"56px",type:"spacing"},64:{value:"64px",type:"spacing"},80:{value:"80px",type:"spacing"},96:{value:"96px",type:"spacing"},112:{value:"112px",type:"spacing"},128:{value:"128px",type:"spacing"},144:{value:"144px",type:"spacing"},160:{value:"160px",type:"spacing"},176:{value:"176px",type:"spacing"},192:{value:"192px",type:"spacing"},208:{value:"208px",type:"spacing"},224:{value:"224px",type:"spacing"},240:{value:"240px",type:"spacing"},256:{value:"256px",type:"spacing"},288:{value:"288px",type:"spacing"},320:{value:"320px",type:"spacing"},384:{value:"384px",type:"spacing"}},border:{0:{value:"0px",type:"borderWidth"},1:{value:"1px",type:"borderWidth"},2:{value:"2px",type:"borderWidth"},4:{value:"4px",type:"borderWidth"},8:{value:"8px",type:"borderWidth"}},rounded:{none:{value:"0px",type:"borderRadius"},sm:{value:"2px",type:"borderRadius"},base:{value:"4px",type:"borderRadius"},md:{value:"6px",type:"borderRadius"},lg:{value:"8px",type:"borderRadius"},xl:{value:"12px",type:"borderRadius"},"2xl":{value:"16px",type:"borderRadius"},"3xl":{value:"24px",type:"borderRadius"},full:{value:"9999px",type:"borderRadius"}},breakpoint:{xs:{value:"376px",type:"sizing"},sm:{value:"640px",type:"sizing"},md:{value:"768px",type:"sizing"},lg:{value:"1024px",type:"sizing"},xl:{value:"1280px",type:"sizing"},"2xl":{value:"1440px",type:"sizing"},"3xl":{value:"1536px",type:"sizing"}},shadow:{none:{value:{color:"#000000",type:"dropShadow",x:"0",y:"0",blur:"0",spread:"0"},type:"boxShadow"},sm:{value:{color:"#0000000d",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},type:"boxShadow"},base:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},{color:"#0000001a",type:"dropShadow",x:"0",y:"1",blur:"3",spread:"0"}],type:"boxShadow"},md:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"2",blur:"4",spread:"-1"},{color:"#0000001a",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-1"}],type:"boxShadow"},lg:{value:[{color:"#0000000d",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-2"},{color:"#0000001a",type:"dropShadow",x:"0",y:"10",blur:"15",spread:"-3"}],type:"boxShadow"},xl:{value:[{color:"#0000000a",type:"dropShadow",x:"0",y:"10",blur:"10",spread:"-5"},{color:"#0000001a",type:"dropShadow",x:"0",y:"20",blur:"25",spread:"-5"}],type:"boxShadow"},"2xl":{value:{color:"#00000040",type:"dropShadow",x:"0",y:"25",blur:"50",spread:"-12"},type:"boxShadow"},inner:{value:{color:"#0000000f",type:"innerShadow",x:"0",y:"2",blur:"4",spread:"0"},type:"boxShadow"}},underline:{value:"underline",type:"textDecoration"},text:{xs:{value:"12px",type:"fontSizes"},sm:{value:"14px",type:"fontSizes"},base:{value:"16px",type:"fontSizes"},lg:{value:"18px",type:"fontSizes"},xl:{value:"20px",type:"fontSizes"},"2xl":{value:"24px",type:"fontSizes"},"3xl":{value:"30px",type:"fontSizes"},"4xl":{value:"36px",type:"fontSizes"},"5xl":{value:"48px",type:"fontSizes"},"6xl":{value:"60px",type:"fontSizes"},"7xl":{value:"72px",type:"fontSizes"},"8xl":{value:"96px",type:"fontSizes"},"9xl":{value:"128px",type:"fontSizes"}},leading:{xs:{value:"16px",type:"lineHeights"},sm:{value:"18px",type:"lineHeights"},base:{value:"20px",type:"lineHeights"},lg:{value:"24px",type:"lineHeights"},xl:{value:"28px",type:"lineHeights"},"2xl":{value:"32px",type:"lineHeights"},"3xl":{value:"36px",type:"lineHeights"},"4xl":{value:"40px",type:"lineHeights"},"5xl":{value:"48px",type:"lineHeights"},"6xl":{value:"60px",type:"lineHeights"},"7xl":{value:"72px",type:"lineHeights"},"8xl":{value:"96px",type:"lineHeights"},"9xl":{value:"128px",type:"lineHeights"}}}},ce={safeColorNames:["blue","purple","orange","pink","yellow","grey","core"]},de={semanticColorNames:["error","warning","success","info"]},ue=ce.safeColorNames,fe=de.semanticColorNames,O={};ue.forEach(t=>{const o=P.global[t];o&&Object.keys(o).forEach(a=>{var s;const n=(s=o[a])==null?void 0:s.value;n&&(O[t]||(O[t]={}),O[t][a]=n)})});const W=P.global.semantic;W&&fe.forEach(t=>{const o=W[t];o&&typeof o=="object"&&Object.keys(o).forEach(a=>{var s;const n=(s=o[a])==null?void 0:s.value;if(n){const r=`semantic-${t}`;O[r]||(O[r]={}),O[r][a]=n}})});const pe=Object.entries(P.global.breakpoint).reduce((t,[o,a])=>(t[o]=a.value,t),{}),me=e.defineComponent({__name:"FzFloating",props:{isOpen:{type:Boolean,default:!1},position:{default:"auto"},container:{},contentClass:{},openerClass:{},overrideContentClass:{type:Boolean},overrideOpener:{},teleport:{type:Boolean,default:!1},useViewport:{type:Boolean}},emits:["fzfloating:setPosition"],setup(t,{expose:o,emit:a}){const n=t,s=a,r=e.ref(null),c=e.ref(null),f=e.useSlots(),p=se(`(max-width: ${pe.xs})`);let h=!1,b=!1,i=null,u=null;const d={position:n.position,element:{domRef:r},container:{domRef:e.toRef(n.container||document.body)},opener:{domRef:e.toRef(null)},useViewport:n.useViewport,callback(...x){s("fzfloating:setPosition",...x)}},l=e.toRefs(d);f.opener&&(d.opener={domRef:c});const m=ie(l),y=()=>{h||!b||(h=!0,requestAnimationFrame(()=>{b&&n.isOpen&&m.setPosition(),h=!1}))};e.onMounted(()=>{b=!0});const C=()=>{y()},v=()=>{y()},k=()=>{window.addEventListener("scroll",C,!0),window.addEventListener("resize",v),r.value&&!i&&(i=new ResizeObserver(()=>{y()}),i.observe(r.value)),c.value&&!u&&(u=new ResizeObserver(()=>{y()}),u.observe(c.value))},E=()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",v),i&&(i.disconnect(),i=null),u&&(u.disconnect(),u=null)};e.watch(()=>n.position,()=>y()),e.watch(()=>n.isOpen,x=>{var T;if(!x||!r.value||!b){E();return}k();const B=(T=c.value)==null?void 0:T.getBoundingClientRect();r.value.style.position="fixed",r.value.style.top="0px",r.value.style.left="0px",r.value.style.transform="none",r.value.style.width=p.value?(B==null?void 0:B.width)+"px":"auto",m.setPosition()}),e.watch(()=>n.overrideOpener,x=>{x&&l.opener&&l.opener.value&&(l.opener.value={domRef:x})}),e.onBeforeUnmount(()=>{b=!1,E()});const N=x=>x.startsWith("bottom")?"mt-4":x.startsWith("top")?"mb-4":x.startsWith("left")?"mr-4":x.startsWith("right")?"ml-4":"mt-4",V=e.computed(()=>{var B;const x=((B=m.actualPosition)==null?void 0:B.value)??n.position;return N(x)}),w=e.computed(()=>n.overrideContentClass?n.contentClass:["bg-core-white fixed",V.value,n.contentClass]);return o({setPosition:m.setPosition}),(x,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(x.$slots,"opener-start"),e.createElementVNode("div",{ref_key:"opener",ref:c,class:"inline-flex w-full sm:w-auto"},[e.renderSlot(x.$slots,"opener",{isOpen:t.isOpen,floating:e.unref(m)})],512),e.renderSlot(x.$slots,"opener-end"),t.teleport?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:r,class:e.normalizeClass(["fz__floating__content w-full sm:w-auto",w.value])},[e.renderSlot(x.$slots,"default",{isOpen:t.isOpen,floating:e.unref(m)})],2)),[[e.vShow,x.$slots.default&&(!x.$slots.opener||x.$slots.opener&&t.isOpen)]]),t.teleport?(e.openBlock(),e.createBlock(e.Teleport,{key:1,to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:r,class:e.normalizeClass(["fz__floating__content",w.value])},[e.renderSlot(x.$slots,"default",{isOpen:t.isOpen,floating:e.unref(m)})],2),[[e.vShow,x.$slots.default&&(!x.$slots.opener||x.$slots.opener&&t.isOpen)]])])):e.createCommentVNode("",!0)]))}}),L={xs:"backoffice",sm:"backoffice",md:"backoffice",lg:"frontoffice"},be=["disabled","aria-disabled"],q=e.defineComponent({__name:"FzButton",props:{label:{},tooltip:{},variant:{default:"primary"},size:{},environment:{},disabled:{type:Boolean,default:!1},iconName:{},iconVariant:{},iconPosition:{default:"before"},containerClass:{},overrideContainerClass:{type:Boolean}},setup(t){const o=t,a=e.useSlots();e.watch(()=>o.tooltip,i=>{i&&console.warn('[FzButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.')},{immediate:!0}),e.watch(()=>o.size,i=>{if(i!==void 0){const u=L[i];o.environment&&o.environment!==u?console.warn(`[FzButton] Both "size" and "environment" props are provided. "environment=${o.environment}" will be used and "size=${i}" will be ignored. Please remove the deprecated "size" prop.`):console.warn(`[FzButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${u}" instead of size="${i}".`)}},{immediate:!0});const n=e.computed(()=>!o.disabled),s=e.computed(()=>{switch(o.variant){case"secondary":return{"bg-core-white":!0,"text-grey-500":!0,"!border-grey-200":!0,"hover:bg-grey-100":n.value,"hover:!border-grey-200":n.value,"focus:bg-core-white":n.value,"focus:!border-blue-600":n.value,"disabled:bg-grey-50":!0,"disabled:text-grey-200":!0,"disabled:!border-grey-200":!0};case"invisible":return{"bg-transparent":!0,"text-grey-500":!0,"!border-transparent":!0,"hover:bg-grey-100":n.value,"hover:!border-grey-100":n.value,"focus:bg-transparent":n.value,"focus:!border-blue-600":n.value,"disabled:bg-grey-50":!0,"disabled:text-grey-200":!0,"disabled:!border-grey-200":!0};case"danger":return{"bg-semantic-error-200":!0,"text-core-white":!0,"hover:bg-semantic-error-300":n.value,"focus:bg-semantic-error-200":n.value,"focus:!border-semantic-error-300":n.value,"disabled:bg-semantic-error-100":!0};case"success":return{"bg-semantic-success-200":!0,"text-core-white":!0,"hover:bg-semantic-success-300":n.value,"focus:bg-semantic-success-200":n.value,"focus:!border-semantic-success-300":n.value,"disabled:bg-semantic-success-100":!0};case"primary":default:return{"bg-blue-500":!0,"text-core-white":!0,"hover:bg-blue-600":n.value,"focus:bg-blue-500":n.value,"focus:!border-blue-600":n.value,"disabled:bg-blue-200":!0}}}),r=e.computed(()=>o.environment?o.environment:o.size?L[o.size]:"frontoffice"),c=e.computed(()=>{const i=!!(o.label||a.default),u=!!o.iconName,d=o.overrideContainerClass&&u;return i&&u||d}),f=["relative","rounded","flex","flex-shrink","items-center","justify-center","font-normal","!text-[16px]","!leading-[20px]","border-1","border-transparent","gap-8"],p=["flex","items-center","justify-items-center"],h=e.computed(()=>{const i=r.value;return{"h-32":i==="backoffice","h-44":i==="frontoffice","px-12":!0,"min-w-96":!0,...s.value}}),b=e.computed(()=>o.overrideContainerClass?o.containerClass:["truncate","font-normal","!text-[16px]","!leading-[20px]",o.containerClass]);return(i,u)=>(e.openBlock(),e.createElementBlock("button",{type:"button",disabled:t.disabled,"aria-disabled":t.disabled?"true":"false",class:e.normalizeClass([f,h.value])},[e.unref(a).before||c.value&&t.iconPosition==="before"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(p)},[e.renderSlot(i.$slots,"before",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,name:t.iconName,size:"md",variant:t.iconVariant},null,8,["name","variant"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),t.label||e.unref(a).default?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(b.value)},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],2)):e.createCommentVNode("",!0),e.unref(a).after||c.value&&t.iconPosition==="after"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(p)},[e.renderSlot(i.$slots,"after",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,name:t.iconName,size:"md",variant:t.iconVariant},null,8,["name","variant"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],10,be))}}),he=e.defineComponent({inheritAttrs:!1,__name:"FzIconButton",props:{tooltip:{},variant:{default:"primary"},environment:{},size:{},disabled:{type:Boolean,default:!1},iconName:{},iconVariant:{default:"far"},iconSize:{},hasNotification:{type:Boolean,default:!1},ariaLabel:{}},setup(t){const o=t;e.watch(()=>o.tooltip,r=>{r&&console.warn('[FzIconButton] The "tooltip" prop is deprecated and will be removed in a future version. Please use the FzTooltip component to wrap your button instead.')},{immediate:!0}),e.watch(()=>o.size,r=>{if(r!==void 0){const c=L[r];o.environment&&o.environment!==c?console.warn(`[FzIconButton] Both "size" and "environment" props are provided. "environment=${o.environment}" will be used and "size=${r}" will be ignored. Please remove the deprecated "size" prop.`):console.warn(`[FzIconButton] The "size" prop is deprecated and will be removed in a future version. Please use environment="${c}" instead of size="${r}".`)}},{immediate:!0}),e.watch(()=>o.iconSize,r=>{r!==void 0&&console.warn('[FzIconButton] The "iconSize" prop is deprecated and will be removed in a future version. Icon size has now a fixed dimension. Please remove the "iconSize" prop from your code.')},{immediate:!0});const a=e.computed(()=>o.environment?o.environment:o.size?L[o.size]:"frontoffice"),n=e.computed(()=>{const r=o.ariaLabel||"";return o.hasNotification?`${r}, hai delle notifiche`:r}),s=e.computed(()=>{const r={"rounded-full":!0,"w-8":!0,"h-8":!0,absolute:!0,"-top-[2px]":!0,"-right-[2px]":!0};return o.disabled?o.variant==="primary"?{...r,"bg-orange-200":!0}:{...r,"bg-grey-200":!0}:o.variant==="primary"?{...r,"bg-orange-500":!0}:{...r,"bg-blue-500":!0}});return(r,c)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["fz-icon-button-wrapper","relative",{"fz-icon-button-wrapper--backoffice":a.value==="backoffice","fz-icon-button-wrapper--frontoffice":a.value==="frontoffice"}])},[e.createVNode(q,e.mergeProps(r.$attrs,{disabled:o.disabled,environment:a.value,variant:o.variant,"aria-label":n.value,"icon-name":o.iconName,"icon-variant":o.iconVariant,"icon-position":"before",overrideContainerClass:""}),null,16,["disabled","environment","variant","aria-label","icon-name","icon-variant"]),o.hasNotification?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value),"aria-hidden":"true"},null,2)):e.createCommentVNode("",!0)],2))}}),F=(t,o)=>{const a=t.__vccOpts||t;for(const[n,s]of o)a[n]=s;return a},K=F(he,[["__scopeId","data-v-b4be112d"]]),G=F(e.defineComponent({__name:"FzContainer",props:{main:{type:Boolean,default:!1},gap:{default:"base"},tag:{default:"div"},alignItems:{default:void 0},horizontal:{type:Boolean,default:!1},layout:{}},setup(t){const o=t,a=e.computed(()=>o.alignItems??(o.horizontal?"center":"stretch"));if(!o.horizontal&&"layout"in o){const s=o.layout;s&&s!=="default"&&console.error(`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${o.horizontal}, layout: "${s}".`)}const n=e.computed(()=>{const s=o.main?"main-content":"section-content",c=[o.horizontal?"fz-container--horizontal":"fz-container--vertical",`gap-${s}-${o.gap}`,`align-items-${a.value}`];if(o.horizontal){const f=("layout"in o?o.layout:void 0)||"default";c.push(`layout-${f}`)}return c});return(s,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:e.normalizeClass(["fz-container",n.value])},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-8c40daeb"]]),ye=["aria-disabled"],xe=["href","target","rel"],X=e.defineComponent({__name:"FzLink",props:{type:{default:"default"},linkStyle:{default:"default"},size:{default:"md"},disabled:{type:Boolean,default:!1},to:{},external:{type:Boolean,default:!1},replace:{type:Boolean,default:!1},target:{}},setup(t){const o=t;e.watch(()=>o.size==="xs",l=>{l&&console.warn('[FzLink] The size prop value "xs" is deprecated and will be removed in a future version. Please use "sm" instead. The component will automatically map "xs" to "sm" for now.')},{immediate:!0}),e.watch(()=>o.size==="lg",l=>{l&&console.warn('[FzLink] The size prop value "lg" is deprecated and will be removed in a future version. Please use "md" instead. The component will automatically map "lg" to "md" for now.')},{immediate:!0});const a=e.computed(()=>o.size==="xs"?"sm":o.size==="lg"?"md":o.size),n=e.computed(()=>["border-1 border-transparent inline-block",{"text-sm leading-xs":a.value==="sm","text-base leading-base":a.value==="md",underline:o.linkStyle==="underline"}]),s=l=>l.type==="default"&&l.linkStyle==="underline",r=l=>l.type==="default"&&l.linkStyle!=="underline",c=l=>l.type==="danger"&&l.linkStyle==="underline",f=l=>l.type==="danger"&&l.linkStyle!=="underline",p=l=>l.type==="default"&&l.disabled,h=l=>l.type==="danger"&&l.disabled,b=e.computed(()=>{const l=[...n.value,"focus:outline-none","focus:border-solid","focus:no-underline"];switch(!0){case s(o):l.push("text-blue-500","hover:text-blue-600","focus:text-blue-600","focus:border-blue-600");break;case r(o):l.push("text-blue-500","hover:text-blue-600","hover:underline","focus:text-blue-600","focus:border-blue-600");break;case c(o):l.push("text-semantic-error-200","hover:text-semantic-error-300","focus:text-semantic-error-300","focus:border-semantic-error-300");break;case f(o):l.push("text-semantic-error-200","hover:text-semantic-error-300","hover:underline","focus:text-semantic-error-300","focus:border-semantic-error-300");break}return l}),i=e.computed(()=>{const l=[...n.value,"cursor-not-allowed"];switch(!0){case p(o):l.push("text-blue-200");break;case h(o):l.push("text-semantic-error-100");break}return l}),u=e.computed(()=>o.external?o.to:""),d=e.computed(()=>{if(o.external&&o.target==="_blank")return"noopener noreferrer"});return(l,m)=>{const y=e.resolveComponent("router-link");return t.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(i.value),"aria-disabled":t.disabled?"true":"false",role:"link","aria-label":"Link disabled"},[e.renderSlot(l.$slots,"default")],10,ye)):t.external?(e.openBlock(),e.createElementBlock("a",{key:1,href:u.value,class:e.normalizeClass(b.value),target:t.target,rel:d.value},[e.renderSlot(l.$slots,"default")],10,xe)):(e.openBlock(),e.createBlock(y,{key:2,to:t.to,replace:t.replace,class:e.normalizeClass(b.value),target:t.target},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["to","replace","class","target"]))}}}),ge=["aria-label","aria-describedby","tabindex"],ve=["aria-hidden"],Ce=100,ke="text-core-white max-w-[200px] p-8 text-sm leading-[16px] flex flex-row items-start justify-center",Y=F(e.defineComponent({__name:"FzTooltip",props:{position:{default:"auto"},status:{default:"neutral"},text:{},withIcon:{type:Boolean,default:!1},ariaLabel:{},interactive:{type:[Boolean,String],default:"auto"},_forceOpenForDesignReview:{type:Boolean,default:!1}},setup(t){const o=t,a=e.useSlots(),n=[q,K,X];function s(g){const S=g.type;return n.includes(S)}function r(g){if(s(g))return!0;if(typeof g.type=="symbol"){const S=g.children;if(Array.isArray(S))return S.some(R=>typeof R=="object"&&R!==null&&"type"in R?r(R):!1)}return!1}const c=e.computed(()=>{if(!a.default)return!1;const g=a.default();return g.length===0?!1:g.some(S=>r(S))}),f={neutral:{icon:"",bgClass:"!bg-core-black"},informative:{icon:"circle-info",bgClass:"bg-semantic-info-200"},alert:{icon:"triangle-exclamation",bgClass:"bg-semantic-warning-200"},error:{icon:"circle-exclamation",bgClass:"bg-semantic-error-200"},positive:{icon:"circle-check",bgClass:"bg-semantic-success-200"}},p=e.computed(()=>{var g;return((g=f[o.status])==null?void 0:g.icon)||""}),h=e.computed(()=>{var S;const g=(S=f[o.status])==null?void 0:S.bgClass;return g?{[g]:!0}:{}}),b=`tooltip-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,i=e.ref(!1),u=e.ref(!1),d=e.ref(!1),l=e.ref(null),m=e.computed(()=>o.withIcon&&o.status!=="neutral"),y=e.computed(()=>i.value?b:void 0),C=e.computed(()=>typeof o.interactive=="boolean"?o.interactive?void 0:0:c.value?void 0:0);function v(){(o.text||a.text)&&(i.value=!0)}function k(){o._forceOpenForDesignReview||(i.value=!1)}function E(){l.value&&(clearTimeout(l.value),l.value=null),v()}function N(){l.value&&(clearTimeout(l.value),l.value=null),l.value=setTimeout(()=>{!u.value&&!d.value&&k()},Ce)}function V(){u.value=!0,l.value&&(clearTimeout(l.value),l.value=null)}function w(){u.value=!1,l.value&&(clearTimeout(l.value),l.value=null),d.value||k()}function x(){d.value=!0,v()}function B(){d.value=!1,l.value&&(clearTimeout(l.value),l.value=null),u.value||k()}function T(g){g.key==="Escape"&&k()}return e.onMounted(()=>{o._forceOpenForDesignReview&&v()}),e.watch(()=>o._forceOpenForDesignReview,g=>{g?v():k()}),e.onUnmounted(()=>{l.value&&clearTimeout(l.value)}),(g,S)=>(e.openBlock(),e.createBlock(e.unref(me),{teleport:!0,"is-open":i.value,position:t.position,class:"fz__tooltip flex h-max",contentClass:["rounded",h.value,"z-80"]},{opener:e.withCtx(()=>[e.createElementVNode("span",{"aria-label":o.ariaLabel,"aria-describedby":y.value,tabindex:C.value,onMouseover:E,onMouseleave:N,onFocusin:x,onFocusout:B,onKeydown:T},[e.renderSlot(g.$slots,"default",{},void 0,!0)],40,ge)]),default:e.withCtx(()=>[e.createElementVNode("div",{id:b,class:e.normalizeClass(ke),role:"tooltip","aria-hidden":!i.value,onMouseenter:V,onMouseleave:w},[m.value?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,size:"md",name:p.value,class:e.normalizeClass(["mr-4","!w-[16px]","!h-[16px]","grow-0","shrink-0",{"text-core-black":o.status==="alert"}]),"aria-hidden":!0},null,8,["name","class"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["basis-0 grow shrink-0 break-normal fz__tooltip__text",{"text-core-black":o.status==="alert"}])},[e.renderSlot(g.$slots,"text",{},()=>[e.createTextVNode(e.toDisplayString(o.text),1)],!0)],2)],40,ve)]),_:3},8,["is-open","position","contentClass"]))}}),[["__scopeId","data-v-94597a6c"]]),we={class:"flex flex-col flex-1"},ze={key:0,class:"leading-[20px]"},Be=F(e.defineComponent({__name:"FzAlert",props:{tone:{},alertStyle:{default:"default"},showButtonAction:{type:Boolean,default:!0},buttonActionLabel:{},buttonActionTooltip:{},isDismissible:{type:Boolean},showLinkAction:{type:Boolean},linkActionLabel:{},linkActionLocation:{},linkActionTarget:{},linkActionExternal:{type:Boolean},size:{},environment:{default:"frontoffice"},title:{},defaultOpen:{type:Boolean,default:!0},variant:{}},emits:["fzAlert:click","fzAlert:dismiss"],setup(t,{emit:o}){const a=t,n=o,s=e.useSlots(),r=e.ref(a.defaultOpen),c={info:"bg-semantic-info-50 border-semantic-info",error:"bg-semantic-error-50 border-semantic-error",danger:"bg-semantic-error-50 border-semantic-error",warning:"bg-semantic-warning-50 border-semantic-warning",success:"bg-semantic-success-50 border-semantic-success"},f={sm:"backoffice",md:"frontoffice",lg:"frontoffice"},p=e.computed(()=>w.value==="text"),h=e.computed(()=>["flex select-none gap-12 rounded justify-between",...p.value?["bg-transparent"]:[c[a.tone]],...!p.value&&V.value==="backoffice"?["p-6"]:[],...w.value==="accordion"?["cursor-pointer"]:[]]),b=e.computed(()=>({info:"circle-info",error:"circle-xmark",danger:"triangle-exclamation",warning:"triangle-exclamation",success:"circle-check"})[a.tone]),i=e.computed(()=>[{info:"text-semantic-info",error:"text-semantic-error",danger:"text-semantic-error",warning:"text-semantic-warning",success:"text-semantic-success"}[a.tone]]),u=e.computed(()=>p.value&&V.value==="backoffice"?"sm":"md"),d=e.computed(()=>p.value?"":V.value==="backoffice"?"p-6":"p-12"),l=e.computed(()=>p.value?"xs":"sm"),m=e.computed(()=>p.value||!(a.showButtonAction||a.showLinkAction||!!s.action)?!1:w.value==="background"?!0:r.value),y=e.computed(()=>["font-normal","!leading-[20px]",{"mt-8":a.title&&!p.value,"mb-16":m.value&&!p.value}]),C=e.computed(()=>r.value?"angle-up":"angle-down"),v=e.computed(()=>{if(w.value==="accordion")return C.value;if(a.isDismissible)return"xmark"}),k=e.computed(()=>p.value||w.value==="background"?!0:w.value==="accordion"?r.value:!0),E=e.computed(()=>k.value&&!!s.default);function N(g){g.stopPropagation(),n("fzAlert:click")}const V=e.computed(()=>a.size?f[a.size]:a.environment),w=e.computed(()=>a.variant?a.variant:["default","simple"].includes(a.alertStyle)?"background":"accordion"),x=e.computed(()=>!p.value&&(w.value==="accordion"||a.isDismissible)),B=()=>{w.value==="accordion"&&(r.value=!r.value),a.isDismissible&&n("fzAlert:dismiss")},T=()=>{!p.value&&w.value==="accordion"&&(r.value=!r.value)};return(g,S)=>{const R=e.resolveDirective("bold");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),onClick:T},[e.createVNode(e.unref(G),{horizontal:"",gap:l.value,class:e.normalizeClass(["flex-1",d.value]),alignItems:"start"},{default:e.withCtx(()=>[e.createVNode(e.unref($.FzIcon),{name:b.value,size:u.value,class:e.normalizeClass(i.value),"aria-hidden":"true"},null,8,["name","size","class"]),e.createElementVNode("div",we,[t.title&&!p.value?e.withDirectives((e.openBlock(),e.createElementBlock("p",ze,[e.createTextVNode(e.toDisplayString(t.title),1)])),[[R]]):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(y.value)},[e.renderSlot(g.$slots,"default",{},void 0,!0)],2)):e.createCommentVNode("",!0),m.value?e.renderSlot(g.$slots,"action",{key:2},()=>[e.createVNode(e.unref(G),{horizontal:"",gap:"sm"},{default:e.withCtx(()=>[t.showButtonAction?(e.openBlock(),e.createBlock(e.unref(q),{key:0,onClick:N,tooltip:t.buttonActionTooltip,environment:V.value,variant:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonActionLabel),1)]),_:1},8,["tooltip","environment"])):e.createCommentVNode("",!0),t.showLinkAction?(e.openBlock(),e.createBlock(e.unref(X),{key:1,to:t.linkActionLocation,onClick:N,size:"md",target:t.linkActionTarget,external:t.linkActionExternal},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.linkActionLabel),1)]),_:1},8,["to","target","external"])):e.createCommentVNode("",!0)]),_:1})],!0):e.createCommentVNode("",!0)])]),_:3},8,["gap","class"]),x.value?(e.openBlock(),e.createBlock(e.unref(K),{key:0,iconName:v.value,environment:V.value,variant:"invisible",onClick:e.withModifiers(B,["stop"])},null,8,["iconName","environment"])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-3d1f9d4e"]]),Q=e.defineComponent({__name:"ErrorAlert",props:{id:{}},setup(t){return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Be),{id:t.id,tone:"error",variant:"text",role:"alert","aria-live":"assertive","aria-atomic":"true",size:"md"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id"]))}}),Se={class:"flex justify-center flex-col w-fit gap-4"},Ee=["data-emphasis","data-error","data-disabled"],Ne=["id","disabled","required","value","aria-checked","aria-label","aria-required","aria-invalid","aria-describedby","aria-labelledby","aria-owns"],Ve=["id","for"],$e="w-0 h-0 peer fz-hidden-input",Ie=`
2
2
  flex gap-6 items-start hover:cursor-pointer text-core-black
3
3
  peer-focus:[&_div]:after:border-1
4
4
  peer-focus:[&_div]:after:border-solid
@@ -10,4 +10,4 @@
10
10
  peer-focus:[&_div]:after:right-0
11
11
  peer-focus:[&_div]:after:bottom-0
12
12
  peer-focus:[&_div]:after:absolute
13
- `,Ie="relative",q=O(e.defineComponent({__name:"FzCheckbox",props:e.mergeModels({label:{},value:{type:[String,Number,Boolean]},size:{},indeterminate:{type:Boolean,default:!1},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},standalone:{type:Boolean},tooltip:{},ariaOwns:{},checkboxId:{}},{modelValue:{type:[null,Boolean,Array],required:!0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t;e.watch(()=>n.size,g=>{g!==void 0&&console.warn('[FzCheckbox] The "size" prop is deprecated and will be removed in a future version. Checkboxes now have a fixed size.')},{immediate:!0});const a=Object.freeze({INDETERMINATE:"square-minus",CHECKED:"square-check",UNCHECKED:"square"}),s=Object.freeze({SOLID:"fas",REGULAR:"far"}),l=e.computed(()=>n.value??n.label),d=n.checkboxId||L(),f=e.useModel(t,"modelValue"),x=o,b=e.shallowRef(null),u=e.computed(()=>f.value==null?!1:typeof f.value=="boolean"?f.value:f.value.includes(l.value)),i=e.computed(()=>n.disabled?"text-grey-300 [&_div]:text-grey-300":n.error?"text-semantic-error-200 [&_div]:text-semantic-error-200 peer-checked:[&_div]:text-semantic-error-200 peer-indeterminate:[&_div]:text-semantic-error-200":n.emphasis?"text-core-black [&_div]:text-blue-500 peer-checked:[&_div]:text-blue-500 peer-indeterminate:[&_div]:text-blue-500":"text-core-black peer-checked:[&_div]:text-grey-500 peer-indeterminate:[&_div]:text-grey-500"),c=e.computed(()=>n.disabled?"text-grey-300":n.error?"text-semantic-error-200":n.emphasis?"text-blue-500":"text-grey-400"),p=e.computed(()=>["text-base",i.value]),r=e.computed(()=>[c.value]),m=e.computed(()=>n.indeterminate?a.INDETERMINATE:u.value?a.CHECKED:a.UNCHECKED),y=e.computed(()=>n.indeterminate||u.value?s.SOLID:s.REGULAR);return e.onMounted(()=>{var g,k;f.value!=null&&(typeof f.value=="boolean"?f.value&&((g=b.value)==null||g.dispatchEvent(new Event("change"))):f.value.includes(l.value)&&((k=b.value)==null||k.dispatchEvent(new Event("change"))))}),(g,k)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",{class:"flex items-start group","data-emphasis":t.emphasis||void 0,"data-error":t.error||void 0,"data-disabled":t.disabled||void 0},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:e.unref(d),disabled:t.disabled,class:e.normalizeClass(Ee),required:t.required,value:t.value,onChange:k[0]||(k[0]=C=>x("change",C)),"onUpdate:modelValue":k[1]||(k[1]=C=>f.value=C),"aria-checked":t.indeterminate?"mixed":u.value,"aria-label":t.standalone?t.label:void 0,"aria-required":t.required?"true":"false","aria-invalid":t.error?"true":"false","aria-describedby":t.error&&g.$slots.error?`${e.unref(d)}-error`:void 0,"aria-labelledby":t.standalone?void 0:`${e.unref(d)}-label`,"aria-owns":n.ariaOwns,ref_key:"refCheckbox",ref:b},null,40,Ne),[[e.vModelCheckbox,f.value]]),e.createElementVNode("label",{id:`${e.unref(d)}-label`,for:e.unref(d),class:e.normalizeClass([Ve,p.value])},[e.createVNode(e.unref($.FzIcon),{name:m.value,size:"md",class:e.normalizeClass([Ie,r.value]),variant:y.value,"aria-hidden":"true"},null,8,["name","class","variant"]),t.standalone?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.label),1)],64))],10,$e),t.tooltip?(e.openBlock(),e.createBlock(e.unref(ke),e.mergeProps({key:0},t.tooltip,{class:"ml-6"}),{default:e.withCtx(()=>[e.createVNode(e.unref($.FzIcon),{name:"info-circle",size:"md",class:"text-semantic-info",role:"img","aria-label":"Informazioni aggiuntive"})]),_:1},16)):e.createCommentVNode("",!0)],8,Se),t.error&&g.$slots.error?(e.openBlock(),e.createBlock(Q,{key:0,id:`${e.unref(d)}-error`},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"error",{},void 0,!0)]),_:3},8,["id"])):e.createCommentVNode("",!0),e.renderSlot(g.$slots,"children",{},void 0,!0)]))}}),[["__scopeId","data-v-2b198cc9"]]),Fe="flex flex-col justify-center gap-8 pl-24",Oe=e.defineComponent({__name:"FzCheckboxGroupOption",props:e.mergeModels({label:{},value:{type:[String,Number,Boolean]},indeterminate:{type:Boolean},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},standalone:{type:Boolean},tooltip:{},ariaOwns:{},checkboxId:{},children:{}},{modelValue:{required:!0,default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.computed(()=>o.value??o.label),a=e.useModel(t,"modelValue"),s=L(),l=e.computed(()=>{var u;return(u=o.children)==null?void 0:u.map((i,c)=>`${s}-child-${c}`).join(" ")}),d=e.computed(()=>[]),f=e.computed(()=>{if(!o.children)return!1;const u=o.children.filter(i=>a.value.includes(i.value??i.label)).length;return u>0&&u<o.children.length});function x(){if(!o.children)return;o.children.filter(i=>a.value.includes(i.value??i.label)).length===o.children.length?a.value.includes(n.value)||(a.value=a.value.concat(n.value)):a.value.includes(n.value)&&(a.value=a.value.filter(i=>i!==n.value))}function b(){var u;o.children&&(a.value.includes(n.value)?a.value=a.value.concat((u=o.children)==null?void 0:u.map(i=>i.value??i.label).filter(i=>!a.value.includes(i))):a.value=a.value.filter(i=>{var c;return!((c=o.children)!=null&&c.map(p=>p.value??p.label).includes(i))}))}return(u,i)=>{var c,p;return e.openBlock(),e.createBlock(q,{modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=r=>a.value=r),value:o.value,label:o.label,disabled:t.disabled,emphasis:t.emphasis,error:t.error,indeterminate:f.value,"aria-owns":(c=t.children)!=null&&c.length?l.value:void 0,onChange:b},e.createSlots({_:2},[(p=t.children)!=null&&p.length?{name:"children",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([Fe,d.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,(r,m)=>(e.openBlock(),e.createBlock(q,e.mergeProps({key:r.value?r.value.toString():r.label,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=y=>a.value=y),disabled:t.disabled},{ref_for:!0},r,{emphasis:t.emphasis,error:t.error,"checkbox-id":`${e.unref(s)}-child-${m}`,onChange:x}),null,16,["modelValue","disabled","emphasis","error","checkbox-id"]))),128))],2)]),key:"0"}:void 0]),1032,["modelValue","value","label","disabled","emphasis","error","indeterminate","aria-owns"])}}}),Te=["id"],Re={key:0},Ae=["id"],De=["id","aria-labelledby","aria-describedby","aria-required","aria-invalid"],Le="flex flex-col",Me="flex flex-col gap-10",Pe="flex items-start",He=e.defineComponent({__name:"FzCheckboxGroup",props:e.mergeModels({label:{},size:{},options:{},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},horizontal:{type:Boolean}},{modelValue:{required:!0,default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useSlots();e.watch(()=>o.size,u=>{u!==void 0&&console.warn('[FzCheckboxGroup] The "size" prop is deprecated and will be removed in a future version. Checkboxes now have a fixed size.')},{immediate:!0});const a=j(),s=e.computed(()=>["text-sm",o.disabled?"text-grey-400":"text-grey-500"]),l=e.useModel(t,"modelValue"),d=e.computed(()=>["text-base","gap-6",o.disabled?"text-grey-400":"text-core-black"]),f=e.computed(()=>["text-base"]),x=e.computed(()=>["text-base",o.horizontal?"gap-16":"gap-8",o.horizontal?"flex-row":"flex-col"]),b=e.computed(()=>{const u=[];return n.help&&u.push(`${a}-help`),o.error&&n.error&&u.push(`${a}-error`),u.length>0?u.join(" "):void 0});return(u,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([Me,f.value])},[e.createElementVNode("label",{id:e.unref(a)+"-label",class:e.normalizeClass([Le,d.value])},[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("span",Re," *")):e.createCommentVNode("",!0)]),u.$slots.help?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(a)+"-help",class:e.normalizeClass(s.value)},[e.renderSlot(u.$slots,"help")],10,Ae)):e.createCommentVNode("",!0)],10,Te),e.createElementVNode("div",{class:e.normalizeClass([Pe,x.value]),id:e.unref(a),role:"group","aria-labelledby":e.unref(a)+"-label","aria-describedby":b.value,"aria-required":t.required?"true":"false","aria-invalid":t.error?"true":"false"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,c=>(e.openBlock(),e.createBlock(Oe,e.mergeProps({key:c.value?c.value.toString():c.label,modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=p=>l.value=p),disabled:t.disabled},{ref_for:!0},c,{emphasis:t.emphasis,error:t.error}),null,16,["modelValue","disabled","emphasis","error"]))),128))],10,De),t.error&&u.$slots.error?(e.openBlock(),e.createBlock(Q,{key:0,id:e.unref(a)+"-error"},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"error")]),_:3},8,["id"])):e.createCommentVNode("",!0)],2))}});w.FzCheckbox=q,w.FzCheckboxGroup=He,w.generateCheckboxId=L,w.generateGroupId=j,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
13
+ `,Oe="relative",H=F(e.defineComponent({__name:"FzCheckbox",props:e.mergeModels({label:{},value:{type:[String,Number,Boolean]},size:{},indeterminate:{type:Boolean,default:!1},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},standalone:{type:Boolean},tooltip:{},ariaOwns:{},checkboxId:{}},{modelValue:{type:[null,Boolean,Array],required:!0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const a=t;e.watch(()=>a.size,C=>{C!==void 0&&console.warn('[FzCheckbox] The "size" prop is deprecated and will be removed in a future version. Checkboxes now have a fixed size.')},{immediate:!0});const n=Object.freeze({INDETERMINATE:"square-minus",CHECKED:"square-check",UNCHECKED:"square"}),s=Object.freeze({SOLID:"fas",REGULAR:"far"}),r=e.computed(()=>a.value??a.label),c=a.checkboxId||D(),f=e.useModel(t,"modelValue"),p=o,h=e.shallowRef(null),b=e.computed(()=>f.value==null?!1:typeof f.value=="boolean"?f.value:f.value.includes(r.value)),i=e.computed(()=>a.disabled?"text-grey-300 [&_div]:text-grey-300":a.error?"text-semantic-error-200 [&_div]:text-semantic-error-200 peer-checked:[&_div]:text-semantic-error-200 peer-indeterminate:[&_div]:text-semantic-error-200":a.emphasis?"text-core-black [&_div]:text-blue-500 peer-checked:[&_div]:text-blue-500 peer-indeterminate:[&_div]:text-blue-500":"text-core-black peer-checked:[&_div]:text-grey-500 peer-indeterminate:[&_div]:text-grey-500"),u=e.computed(()=>a.disabled?"text-grey-300":a.error?"text-semantic-error-200":a.emphasis?"text-blue-500":"text-grey-400"),d=e.computed(()=>["text-base",i.value]),l=e.computed(()=>[u.value]),m=e.computed(()=>a.indeterminate?n.INDETERMINATE:b.value?n.CHECKED:n.UNCHECKED),y=e.computed(()=>a.indeterminate||b.value?s.SOLID:s.REGULAR);return e.onMounted(()=>{var C,v;f.value!=null&&(typeof f.value=="boolean"?f.value&&((C=h.value)==null||C.dispatchEvent(new Event("change"))):f.value.includes(r.value)&&((v=h.value)==null||v.dispatchEvent(new Event("change"))))}),(C,v)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",{class:"flex items-start group","data-emphasis":t.emphasis||void 0,"data-error":t.error||void 0,"data-disabled":t.disabled||void 0},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",id:e.unref(c),disabled:t.disabled,class:e.normalizeClass($e),required:t.required,value:t.value,onChange:v[0]||(v[0]=k=>p("change",k)),"onUpdate:modelValue":v[1]||(v[1]=k=>f.value=k),"aria-checked":t.indeterminate?"mixed":b.value,"aria-label":t.standalone?t.label:void 0,"aria-required":t.required?"true":"false","aria-invalid":t.error?"true":"false","aria-describedby":t.error&&C.$slots.error?`${e.unref(c)}-error`:void 0,"aria-labelledby":t.standalone?void 0:`${e.unref(c)}-label`,"aria-owns":a.ariaOwns,ref_key:"refCheckbox",ref:h},null,40,Ne),[[e.vModelCheckbox,f.value]]),e.createElementVNode("label",{id:`${e.unref(c)}-label`,for:e.unref(c),class:e.normalizeClass([Ie,d.value])},[e.createVNode(e.unref($.FzIcon),{name:m.value,size:"md",class:e.normalizeClass([Oe,l.value]),variant:y.value,"aria-hidden":"true"},null,8,["name","class","variant"]),t.standalone?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.label),1)],64))],10,Ve),t.tooltip?(e.openBlock(),e.createBlock(e.unref(Y),e.mergeProps({key:0},t.tooltip,{class:"ml-6"}),{default:e.withCtx(()=>[e.createVNode(e.unref($.FzIcon),{name:"info-circle",size:"md",class:"text-semantic-info",role:"img","aria-label":"Informazioni aggiuntive"})]),_:1},16)):e.createCommentVNode("",!0)],8,Ee),t.error&&C.$slots.error?(e.openBlock(),e.createBlock(Q,{key:0,id:`${e.unref(c)}-error`},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"error",{},void 0,!0)]),_:3},8,["id"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"children",{},void 0,!0)]))}}),[["__scopeId","data-v-2b198cc9"]]),J=Symbol("FzCheckboxCheckedSet"),Fe="flex flex-col justify-center gap-8 pl-24",Te=e.defineComponent({__name:"FzCheckboxGroupOption",props:e.mergeModels({label:{},value:{type:[String,Number,Boolean]},indeterminate:{type:Boolean},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},standalone:{type:Boolean},tooltip:{},ariaOwns:{},checkboxId:{},children:{}},{modelValue:{required:!0,default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,a=e.computed(()=>o.value??o.label),n=e.useModel(t,"modelValue"),s=D(),r=e.computed(()=>{var b;return(b=o.children)==null?void 0:b.map((i,u)=>`${s}-child-${u}`).join(" ")}),c=e.computed(()=>[]),f=e.computed(()=>{if(!o.children)return!1;const b=o.children.filter(i=>n.value.includes(i.value??i.label)).length;return b>0&&b<o.children.length});function p(){if(!o.children)return;o.children.filter(i=>n.value.includes(i.value??i.label)).length===o.children.length?n.value.includes(a.value)||(n.value=n.value.concat(a.value)):n.value.includes(a.value)&&(n.value=n.value.filter(i=>i!==a.value))}function h(){var b;o.children&&(n.value.includes(a.value)?n.value=n.value.concat((b=o.children)==null?void 0:b.map(i=>i.value??i.label).filter(i=>!n.value.includes(i))):n.value=n.value.filter(i=>{var u;return!((u=o.children)!=null&&u.map(d=>d.value??d.label).includes(i))}))}return(b,i)=>{var u,d;return e.openBlock(),e.createBlock(H,{modelValue:n.value,"onUpdate:modelValue":i[1]||(i[1]=l=>n.value=l),value:o.value,label:o.label,disabled:t.disabled,emphasis:t.emphasis,error:t.error,indeterminate:f.value,"aria-owns":(u=t.children)!=null&&u.length?r.value:void 0,onChange:h},e.createSlots({_:2},[(d=t.children)!=null&&d.length?{name:"children",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([Fe,c.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,(l,m)=>(e.openBlock(),e.createBlock(H,e.mergeProps({key:l.value?l.value.toString():l.label,modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=y=>n.value=y),disabled:t.disabled},{ref_for:!0},l,{emphasis:t.emphasis,error:t.error,"checkbox-id":`${e.unref(s)}-child-${m}`,onChange:p}),null,16,["modelValue","disabled","emphasis","error","checkbox-id"]))),128))],2)]),key:"0"}:void 0]),1032,["modelValue","value","label","disabled","emphasis","error","indeterminate","aria-owns"])}}}),Re=["id"],Ae={key:0},De=["id"],Le=["id","aria-labelledby","aria-describedby","aria-required","aria-invalid"],Me="flex flex-col",Pe="flex flex-col gap-10",qe="flex items-start",He=e.defineComponent({__name:"FzCheckboxGroup",props:e.mergeModels({label:{},size:{},options:{},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},horizontal:{type:Boolean}},{modelValue:{required:!0,default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,a=e.useSlots();e.watch(()=>o.size,d=>{d!==void 0&&console.warn('[FzCheckboxGroup] The "size" prop is deprecated and will be removed in a future version. Checkboxes now have a fixed size.')},{immediate:!0});const n=U(),s=e.computed(()=>["text-sm",o.disabled?"text-grey-400":"text-grey-500"]),r=e.useModel(t,"modelValue"),c=e.computed(()=>new Set(r.value));e.provide(J,{source:r,set:c});const f=e.computed(()=>["text-base","gap-6",o.disabled?"text-grey-400":"text-core-black"]),p=e.computed(()=>["text-base"]),h=e.computed(()=>["text-base",o.horizontal?"gap-16":"gap-8",o.horizontal?"flex-row":"flex-col"]),b=e.computed(()=>Array.isArray(o.options)&&o.options.length>0),i=e.computed(()=>({disabled:o.disabled,error:o.error,emphasis:o.emphasis,required:o.required})),u=e.computed(()=>{const d=[];return a.help&&d.push(`${n}-help`),o.error&&a.error&&d.push(`${n}-error`),d.length>0?d.join(" "):void 0});return(d,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([Pe,p.value])},[e.createElementVNode("label",{id:e.unref(n)+"-label",class:e.normalizeClass([Me,f.value])},[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("span",Ae," *")):e.createCommentVNode("",!0)]),d.$slots.help?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(n)+"-help",class:e.normalizeClass(s.value)},[e.renderSlot(d.$slots,"help")],10,De)):e.createCommentVNode("",!0)],10,Re),e.createElementVNode("div",{class:e.normalizeClass([qe,h.value]),id:e.unref(n),role:"group","aria-labelledby":e.unref(n)+"-label","aria-describedby":u.value,"aria-required":t.required?"true":"false","aria-invalid":t.error?"true":"false"},[b.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,m=>(e.openBlock(),e.createBlock(Te,e.mergeProps({key:m.value?m.value.toString():m.label,modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=y=>r.value=y),disabled:t.disabled},{ref_for:!0},m,{emphasis:t.emphasis,error:t.error}),null,16,["modelValue","disabled","emphasis","error"]))),128)):e.renderSlot(d.$slots,"default",{key:1,checkboxGroupProps:i.value})],10,Le),t.error&&d.$slots.error?(e.openBlock(),e.createBlock(Q,{key:0,id:e.unref(n)+"-error"},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"error")]),_:3},8,["id"])):e.createCommentVNode("",!0)],2))}}),je=["id","value","disabled","checked","name","required","aria-checked","aria-required","aria-invalid"],Ue=["for"],We=["title"],Ke=["src","alt"],Ge={class:"flex flex-row w-full justify-between min-w-0"},Xe={class:"justify-center flex flex-col w-full grow-0 min-w-0 gap-4"},Ye="w-0 h-0 peer fz-hidden-input",Qe=F(e.defineComponent({__name:"FzCheckboxCard",props:e.mergeModels({label:{},size:{},emphasis:{type:Boolean},disabled:{type:Boolean},error:{type:Boolean},required:{type:Boolean},value:{},title:{},subtitle:{},imageAlt:{},tooltip:{},tooltipStatus:{},hasCheckbox:{type:Boolean,default:!0},name:{},variant:{default:"horizontal"},imageUrl:{}},{modelValue:{required:!0,default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,a=e.computed(()=>o.value??o.label),n=D(),s=e.useModel(t,"modelValue"),r=e.inject(J,null),c=e.computed(()=>s.value==null?!1:r&&r.source.value===s.value?r.set.value.has(a.value):s.value.includes(a.value));function f(){if(o.disabled)return;const m=s.value??[];c.value?s.value=m.filter(y=>y!==a.value):s.value=[...m,a.value]}const p=Object.freeze({CHECKED:"square-check",UNCHECKED:"square"}),h=Object.freeze({SOLID:"fas",REGULAR:"far"}),b=e.computed(()=>c.value?p.CHECKED:p.UNCHECKED),i=e.computed(()=>c.value?h.SOLID:h.REGULAR),u=e.computed(()=>o.disabled?"text-grey-300":o.error?"text-semantic-error-200":o.emphasis||c.value?"text-blue-500":"text-grey-400"),d=e.computed(()=>o.variant==="vertical"||!!o.imageUrl),l=e.computed(()=>({"flex-col":o.variant==="vertical","flex-row":o.variant==="horizontal","pb-20":o.variant==="vertical"&&(!c.value||o.disabled),"pb-12":o.variant==="horizontal"&&(!c.value||o.disabled),"pb-[19px]":o.variant==="vertical"&&c.value&&!o.disabled,"pb-[11px]":o.variant==="horizontal"&&c.value&&!o.disabled,"pt-[11px]":c.value&&!o.disabled,"gap-20":o.variant==="vertical","gap-12":o.variant==="horizontal","border-2 px-[11px] border-blue-500":c.value&&!o.disabled,"border-1 border-grey-300":!c.value||o.disabled,"hover:bg-[#f9faff] peer-focus:outline peer-focus:bg-[#f9faff] peer-focus:outline-blue-200 peer-focus:outline-2 peer-checked:bg-[#f9faff]":!o.disabled}));return(m,y)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("input",{type:"checkbox",id:e.unref(n),class:e.normalizeClass([Ye]),value:a.value,disabled:t.disabled,checked:c.value,name:t.name,required:t.required,tabindex:"0","aria-checked":c.value,"aria-required":t.required?"true":"false","aria-invalid":t.error?"true":"false",onChange:f},null,42,je),e.createElementVNode("label",{class:e.normalizeClass(["relative flex block rounded-lg border-solid pt-12 px-12 cursor-pointer w-full",l.value]),for:e.unref(n)},[t.hasCheckbox?(e.openBlock(),e.createBlock(e.unref($.FzIcon),{key:0,name:b.value,size:"md",class:e.normalizeClass(["shrink-0",u.value,{"absolute top-[23px] left-[23px]":t.variant==="vertical","self-start":t.variant==="horizontal"}]),variant:i.value,"aria-hidden":"true"},null,8,["name","class","variant"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("picture",{key:1,class:e.normalizeClass(["rounded overflow-hidden",{"shrink-0 size-[58px]":t.variant==="horizontal","w-full aspect-[16/9]":t.variant==="vertical","opacity-30":o.disabled}]),title:t.imageAlt||""},[e.createElementVNode("img",{src:t.imageUrl,alt:t.imageAlt||"",class:"object-cover h-full w-full"},null,8,Ke)],10,We)):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[e.createElementVNode("div",Xe,[e.createElementVNode("p",{class:e.normalizeClass(["font-medium break-words !m-0 !leading-[20px]",{"text-grey-300":o.disabled}])},e.toDisplayString(t.title),3),t.subtitle?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["font-normal text-sm mt-4 break-words !m-0 !leading-[16px]",{"text-grey-300":o.disabled,"text-grey-500":!o.disabled}])},e.toDisplayString(t.subtitle),3)):e.createCommentVNode("",!0)]),t.tooltip?(e.openBlock(),e.createBlock(e.unref(Y),{key:0,class:e.normalizeClass({"self-center":o.variant==="horizontal","self-start":o.variant==="vertical","ml-8":o.variant==="vertical","ml-12":o.variant==="horizontal"}),disabled:o.disabled,text:t.tooltip,status:t.tooltipStatus||"neutral"},{default:e.withCtx(()=>[e.createVNode(e.unref($.FzIcon),{name:"circle-info",variant:"far",size:"md",class:"text-semantic-info"})]),_:1},8,["class","disabled","text","status"])):e.createCommentVNode("",!0)])],10,Ue)]))}}),[["__scopeId","data-v-d850ec45"]]);z.FzCheckbox=H,z.FzCheckboxCard=Qe,z.FzCheckboxGroup=He,z.generateCheckboxId=D,z.generateGroupId=U,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,240 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ modelValue: {
3
+ required: true;
4
+ type: import('vue').PropType<(string | number | boolean)[]>;
5
+ };
6
+ label: {
7
+ type: import('vue').PropType<string>;
8
+ required: true;
9
+ };
10
+ title: {
11
+ type: import('vue').PropType<string>;
12
+ required: true;
13
+ };
14
+ value: {
15
+ type: import('vue').PropType<string | number>;
16
+ };
17
+ error: {
18
+ type: import('vue').PropType<boolean>;
19
+ };
20
+ size: {
21
+ type: import('vue').PropType<"sm" | "md">;
22
+ };
23
+ disabled: {
24
+ type: import('vue').PropType<boolean>;
25
+ };
26
+ name: {
27
+ type: import('vue').PropType<string>;
28
+ };
29
+ variant: {
30
+ type: import('vue').PropType<"horizontal">;
31
+ default: string;
32
+ };
33
+ required: {
34
+ type: import('vue').PropType<boolean>;
35
+ };
36
+ tooltip: {
37
+ type: import('vue').PropType<string>;
38
+ };
39
+ emphasis: {
40
+ type: import('vue').PropType<boolean>;
41
+ };
42
+ subtitle: {
43
+ type: import('vue').PropType<string>;
44
+ };
45
+ imageAlt: {
46
+ type: import('vue').PropType<string>;
47
+ };
48
+ tooltipStatus: {
49
+ type: import('vue').PropType<import('@fiscozen/tooltip').FzTooltipStatus>;
50
+ };
51
+ hasCheckbox: {
52
+ type: import('vue').PropType<boolean>;
53
+ default: boolean;
54
+ };
55
+ imageUrl: {
56
+ type: import('vue').PropType<string>;
57
+ };
58
+ } | {
59
+ modelValue: {
60
+ required: true;
61
+ type: import('vue').PropType<(string | number | boolean)[]>;
62
+ };
63
+ label: {
64
+ type: import('vue').PropType<string>;
65
+ required: true;
66
+ };
67
+ title: {
68
+ type: import('vue').PropType<string>;
69
+ required: true;
70
+ };
71
+ value: {
72
+ type: import('vue').PropType<string | number>;
73
+ };
74
+ error: {
75
+ type: import('vue').PropType<boolean>;
76
+ };
77
+ size: {
78
+ type: import('vue').PropType<"sm" | "md">;
79
+ };
80
+ disabled: {
81
+ type: import('vue').PropType<boolean>;
82
+ };
83
+ name: {
84
+ type: import('vue').PropType<string>;
85
+ };
86
+ variant: {
87
+ type: import('vue').PropType<"vertical">;
88
+ required: true;
89
+ default: string;
90
+ };
91
+ required: {
92
+ type: import('vue').PropType<boolean>;
93
+ };
94
+ tooltip: {
95
+ type: import('vue').PropType<string>;
96
+ };
97
+ emphasis: {
98
+ type: import('vue').PropType<boolean>;
99
+ };
100
+ subtitle: {
101
+ type: import('vue').PropType<string>;
102
+ };
103
+ imageAlt: {
104
+ type: import('vue').PropType<string>;
105
+ };
106
+ tooltipStatus: {
107
+ type: import('vue').PropType<import('@fiscozen/tooltip').FzTooltipStatus>;
108
+ };
109
+ hasCheckbox: {
110
+ type: import('vue').PropType<boolean>;
111
+ default: boolean;
112
+ };
113
+ imageUrl: {
114
+ type: import('vue').PropType<string>;
115
+ required: true;
116
+ };
117
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
118
+ modelValue: {
119
+ required: true;
120
+ type: import('vue').PropType<(string | number | boolean)[]>;
121
+ };
122
+ label: {
123
+ type: import('vue').PropType<string>;
124
+ required: true;
125
+ };
126
+ title: {
127
+ type: import('vue').PropType<string>;
128
+ required: true;
129
+ };
130
+ value: {
131
+ type: import('vue').PropType<string | number>;
132
+ };
133
+ error: {
134
+ type: import('vue').PropType<boolean>;
135
+ };
136
+ size: {
137
+ type: import('vue').PropType<"sm" | "md">;
138
+ };
139
+ disabled: {
140
+ type: import('vue').PropType<boolean>;
141
+ };
142
+ name: {
143
+ type: import('vue').PropType<string>;
144
+ };
145
+ variant: {
146
+ type: import('vue').PropType<"horizontal">;
147
+ default: string;
148
+ };
149
+ required: {
150
+ type: import('vue').PropType<boolean>;
151
+ };
152
+ tooltip: {
153
+ type: import('vue').PropType<string>;
154
+ };
155
+ emphasis: {
156
+ type: import('vue').PropType<boolean>;
157
+ };
158
+ subtitle: {
159
+ type: import('vue').PropType<string>;
160
+ };
161
+ imageAlt: {
162
+ type: import('vue').PropType<string>;
163
+ };
164
+ tooltipStatus: {
165
+ type: import('vue').PropType<import('@fiscozen/tooltip').FzTooltipStatus>;
166
+ };
167
+ hasCheckbox: {
168
+ type: import('vue').PropType<boolean>;
169
+ default: boolean;
170
+ };
171
+ imageUrl: {
172
+ type: import('vue').PropType<string>;
173
+ };
174
+ } | {
175
+ modelValue: {
176
+ required: true;
177
+ type: import('vue').PropType<(string | number | boolean)[]>;
178
+ };
179
+ label: {
180
+ type: import('vue').PropType<string>;
181
+ required: true;
182
+ };
183
+ title: {
184
+ type: import('vue').PropType<string>;
185
+ required: true;
186
+ };
187
+ value: {
188
+ type: import('vue').PropType<string | number>;
189
+ };
190
+ error: {
191
+ type: import('vue').PropType<boolean>;
192
+ };
193
+ size: {
194
+ type: import('vue').PropType<"sm" | "md">;
195
+ };
196
+ disabled: {
197
+ type: import('vue').PropType<boolean>;
198
+ };
199
+ name: {
200
+ type: import('vue').PropType<string>;
201
+ };
202
+ variant: {
203
+ type: import('vue').PropType<"vertical">;
204
+ required: true;
205
+ default: string;
206
+ };
207
+ required: {
208
+ type: import('vue').PropType<boolean>;
209
+ };
210
+ tooltip: {
211
+ type: import('vue').PropType<string>;
212
+ };
213
+ emphasis: {
214
+ type: import('vue').PropType<boolean>;
215
+ };
216
+ subtitle: {
217
+ type: import('vue').PropType<string>;
218
+ };
219
+ imageAlt: {
220
+ type: import('vue').PropType<string>;
221
+ };
222
+ tooltipStatus: {
223
+ type: import('vue').PropType<import('@fiscozen/tooltip').FzTooltipStatus>;
224
+ };
225
+ hasCheckbox: {
226
+ type: import('vue').PropType<boolean>;
227
+ default: boolean;
228
+ };
229
+ imageUrl: {
230
+ type: import('vue').PropType<string>;
231
+ required: true;
232
+ };
233
+ }>> & Readonly<{}>, {
234
+ variant: "horizontal";
235
+ hasCheckbox: boolean;
236
+ } | {
237
+ variant: "vertical";
238
+ hasCheckbox: boolean;
239
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
240
+ export default _default;
@@ -12,7 +12,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
12
12
  };
13
13
  options: {
14
14
  type: import('vue').PropType<import('./types').ParentCheckbox[]>;
15
- required: true;
16
15
  };
17
16
  emphasis: {
18
17
  type: import('vue').PropType<boolean>;
@@ -43,7 +42,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
43
42
  };
44
43
  options: {
45
44
  type: import('vue').PropType<import('./types').ParentCheckbox[]>;
46
- required: true;
47
45
  };
48
46
  emphasis: {
49
47
  type: import('vue').PropType<boolean>;
@@ -62,6 +60,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
62
60
  };
63
61
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
64
62
  help?(_: {}): any;
63
+ default?(_: {
64
+ checkboxGroupProps: {
65
+ disabled: boolean;
66
+ error: boolean;
67
+ emphasis: boolean;
68
+ required: boolean;
69
+ };
70
+ }): any;
65
71
  error?(_: {}): any;
66
72
  }>;
67
73
  export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,5 @@
1
- /**
2
- * Shared utilities for the Fiscozen Checkbox component library.
3
- *
4
- * @module @fiscozen/checkbox/common
5
- */
1
+ import { ComputedRef, InjectionKey, Ref } from 'vue';
2
+
6
3
  /**
7
4
  * Maps checkbox size variants to corresponding Tailwind CSS text size classes.
8
5
  *
@@ -21,3 +18,17 @@ export declare const mapSizeToClasses: {
21
18
  /** Medium size: 16px font size (1rem) - default */
22
19
  md: string;
23
20
  };
21
+ export interface CheckedSetProvision {
22
+ /** The group's model ref — consumers compare by reference identity to decide
23
+ * whether the shared Set is built from the same data they hold. */
24
+ source: Ref<(string | number | boolean)[]>;
25
+ /** Pre-built Set for O(1) lookups, derived from `source`. */
26
+ set: ComputedRef<Set<string | number | boolean>>;
27
+ }
28
+ /**
29
+ * Injection key for the shared checked-values Set.
30
+ * Provided by FzCheckboxGroup so child cards/checkboxes can do O(1) membership
31
+ * checks instead of O(N) Array.includes scans — but only when the group's
32
+ * model and the child's model reference the same array.
33
+ */
34
+ export declare const CHECKED_SET_KEY: InjectionKey<CheckedSetProvision>;
@@ -1,4 +1,5 @@
1
1
  export { default as FzCheckbox } from './FzCheckbox.vue';
2
2
  export { default as FzCheckboxGroup } from './FzCheckboxGroup.vue';
3
- export type { FzCheckboxProps, FzCheckboxGroupProps } from './types';
3
+ export { default as FzCheckboxCard } from './FzCheckboxCard.vue';
4
+ export type { FzCheckboxProps, FzCheckboxGroupProps, FzCheckboxCardProps, } from './types';
4
5
  export { generateCheckboxId, generateGroupId } from './utils';