@fiscozen/checkbox 1.1.0 → 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.
@@ -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,N){"use strict";function j(t){const o=Date.now()-16e11,a=Math.random().toString(36).slice(2,7);return`${t}-${o}-${a}`}function R(){return j("fz-checkbox")}function U(){return j("fz-checkbox-group")}const F=new DOMRect(0,0,window.innerWidth,window.innerHeight),V=(t,o,a,n,i)=>{let r=i?"bottom":"right",c=i?"bottom-start":"right-start";F.width=window.innerWidth,F.height=window.innerHeight,F.x=0,F.y=0;const f=t?t.getBoundingClientRect():F,y=o.getBoundingClientRect(),h=a.getBoundingClientRect(),m=(h.left-f.left-y.width)/f.width,s=(f.right-h.right-y.width)/f.width,u=(h.top-f.top-y.height)/f.height,d=(f.bottom-h.bottom-y.height)/f.height;let l=[{key:"right",space:s},{key:"top",space:u},{key:"bottom",space:d},{key:"left",space:m}].sort((p,b)=>b.space-p.space);if(i&&(l=l.filter(p=>p.key==="top"||p.key==="bottom")),r=l[0].key,!n){const p=(y.height-h.height)/2;switch(r){case"right":case"left":f.top>h.top-p&&(n="end"),f.bottom<h.top-p&&(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 i={...t},r={...n};if(t.x<a.left&&(i.x=a.left,r.x=0),t.x+o.width>a.right){const c=a.right-o.width;c>0&&(i.x=c),r.x=0}if(t.y<a.top&&(i.y=a.top,r.y=0),t.y+o.height>a.bottom){const c=a.bottom-o.height;c>0&&(i.y=c),r.y=0}return{position:i,transform:r}},le=(t,o,a,n,i)=>{const r=i?null:o;switch(t){case"auto":return V(r,a,n);case"auto-vertical":return V(r,a,n,void 0,!0);case"auto-start":return V(r,a,n,"start");case"auto-vertical-start":return V(r,a,n,"start",!0);case"auto-end":return V(r,a,n,"end");case"auto-vertical-end":return V(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(),i=e.ref(),r=e.ref(),c=e.reactive({position:{x:0,y:0}}),f={root:null,rootMargin:"0px",threshold:1,...t.element.value.intersectionOptions},y=e.ref(new IntersectionObserver(()=>{},f)),h=()=>{var p,b;const u=M(t.element.value.domRef.value);if(!u)return null;const d=(p=t.container)!=null&&p.value?M(t.container.value.domRef.value)??document.body:document.body,l=(b=t.opener)!=null&&b.value?M(t.opener.value.domRef.value):null;return{element:u,container:d,opener:l}},m=u=>{var d;return{element:u.element.getBoundingClientRect(),container:u.container.getBoundingClientRect(),opener:((d=u.opener)==null?void 0:d.getBoundingClientRect())??null}},s=(u=!1)=>e.nextTick(()=>{var k,S,z;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=m(d);n.value=l.element,i.value=l.opener??void 0,r.value=l.container,y.value.observe(d.element),y.value.observe(d.container),re(a.value)&&d.opener&&(a.value=le(a.value,d.container,d.element,d.opener,((S=t.useViewport)==null?void 0:S.value)??!1));const p=_(window.getComputedStyle(d.element)),b=d.opener&&l.opener?te(a.value,l.opener,p):ae(a.value,l.container,l.element),g=Z(l.element,b.position,b.transform.x,b.transform.y),C=ne(g,l.element,l.container,b.transform);c.position.x=C.position.x,c.position.y=C.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(),(z=t.callback)!=null&&z.value&&!u&&t.callback.value(n,i,r,o,a)});return e.onUnmounted(()=>{y.value.disconnect()}),{float:c,rect:n,setPosition:s,position:o,actualPosition:a,openerRect:i,containerRect:r}};function se(t){const o=window.matchMedia(t),a=e.ref(o.matches);function n(i){a.value=i.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,$={};ue.forEach(t=>{const o=P.global[t];o&&Object.keys(o).forEach(a=>{var i;const n=(i=o[a])==null?void 0:i.value;n&&($[t]||($[t]={}),$[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 i;const n=(i=o[a])==null?void 0:i.value;if(n){const r=`semantic-${t}`;$[r]||($[r]={}),$[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,i=a,r=e.ref(null),c=e.ref(null),f=e.useSlots(),y=se(`(max-width: ${pe.xs})`);let h=!1,m=!1,s=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){i("fzfloating:setPosition",...x)}},l=e.toRefs(d);f.opener&&(d.opener={domRef:c});const p=ie(l),b=()=>{h||!m||(h=!0,requestAnimationFrame(()=>{m&&n.isOpen&&p.setPosition(),h=!1}))};e.onMounted(()=>{m=!0});const g=()=>{b()},C=()=>{b()},k=()=>{window.addEventListener("scroll",g,!0),window.addEventListener("resize",C),r.value&&!s&&(s=new ResizeObserver(()=>{b()}),s.observe(r.value)),c.value&&!u&&(u=new ResizeObserver(()=>{b()}),u.observe(c.value))},S=()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",C),s&&(s.disconnect(),s=null),u&&(u.disconnect(),u=null)};e.watch(()=>n.position,()=>b()),e.watch(()=>n.isOpen,x=>{var D;if(!x||!r.value||!m){S();return}k();const E=(D=c.value)==null?void 0:D.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=y.value?(E==null?void 0:E.width)+"px":"auto",p.setPosition()}),e.watch(()=>n.overrideOpener,x=>{x&&l.opener&&l.opener.value&&(l.opener.value={domRef:x})}),e.onBeforeUnmount(()=>{m=!1,S()});const z=x=>x.startsWith("bottom")?"mt-4":x.startsWith("top")?"mb-4":x.startsWith("left")?"mr-4":x.startsWith("right")?"ml-4":"mt-4",A=e.computed(()=>{var E;const x=((E=p.actualPosition)==null?void 0:E.value)??n.position;return z(x)}),O=e.computed(()=>n.overrideContentClass?n.contentClass:["bg-core-white fixed",A.value,n.contentClass]);return o({setPosition:p.setPosition}),(x,E)=>(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(p)})],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",O.value])},[e.renderSlot(x.$slots,"default",{isOpen:t.isOpen,floating:e.unref(p)})],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",O.value])},[e.renderSlot(x.$slots,"default",{isOpen:t.isOpen,floating:e.unref(p)})],2),[[e.vShow,x.$slots.default&&(!x.$slots.opener||x.$slots.opener&&t.isOpen)]])])):e.createCommentVNode("",!0)]))}}),T={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,s=>{s&&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,s=>{if(s!==void 0){const u=T[s];o.environment&&o.environment!==u?console.warn(`[FzButton] Both "size" and "environment" props are provided. "environment=${o.environment}" will be used and "size=${s}" 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="${s}".`)}},{immediate:!0});const n=e.computed(()=>!o.disabled),i=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?T[o.size]:"frontoffice"),c=e.computed(()=>{const s=!!(o.label||a.default),u=!!o.iconName,d=o.overrideContainerClass&&u;return s&&u||d}),f=["relative","rounded","flex","flex-shrink","items-center","justify-center","font-normal","!text-[16px]","!leading-[20px]","border-1","border-transparent","gap-8"],y=["flex","items-center","justify-items-center"],h=e.computed(()=>{const s=r.value;return{"h-32":s==="backoffice","h-44":s==="frontoffice","px-12":!0,"min-w-96":!0,...i.value}}),m=e.computed(()=>o.overrideContainerClass?o.containerClass:["truncate","font-normal","!text-[16px]","!leading-[20px]",o.containerClass]);return(s,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(y)},[e.renderSlot(s.$slots,"before",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref(N.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(m.value)},[e.renderSlot(s.$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(y)},[e.renderSlot(s.$slots,"after",{},()=>[t.iconName?(e.openBlock(),e.createBlock(e.unref(N.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=T[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?T[o.size]:"frontoffice"),n=e.computed(()=>{const r=o.ariaLabel||"";return o.hasNotification?`${r}, hai delle notifiche`:r}),i=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(i.value),"aria-hidden":"true"},null,2)):e.createCommentVNode("",!0)],2))}}),I=(t,o)=>{const a=t.__vccOpts||t;for(const[n,i]of o)a[n]=i;return a},K=I(he,[["__scopeId","data-v-b4be112d"]]),G=I(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 i=o.layout;i&&i!=="default"&&console.error(`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${o.horizontal}, layout: "${i}".`)}const n=e.computed(()=>{const i=o.main?"main-content":"section-content",c=[o.horizontal?"fz-container--horizontal":"fz-container--vertical",`gap-${i}-${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(i,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{class:e.normalizeClass(["fz-container",n.value])},{default:e.withCtx(()=>[e.renderSlot(i.$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"}]),i=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",y=l=>l.type==="default"&&l.disabled,h=l=>l.type==="danger"&&l.disabled,m=e.computed(()=>{const l=[...n.value,"focus:outline-none","focus:border-solid","focus:no-underline"];switch(!0){case i(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}),s=e.computed(()=>{const l=[...n.value,"cursor-not-allowed"];switch(!0){case y(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,p)=>{const b=e.resolveComponent("router-link");return t.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(s.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(m.value),target:t.target,rel:d.value},[e.renderSlot(l.$slots,"default")],10,xe)):(e.openBlock(),e.createBlock(b,{key:2,to:t.to,replace:t.replace,class:e.normalizeClass(m.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=I(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 i(v){const B=v.type;return n.includes(B)}function r(v){if(i(v))return!0;if(typeof v.type=="symbol"){const B=v.children;if(Array.isArray(B))return B.some(L=>typeof L=="object"&&L!==null&&"type"in L?r(L):!1)}return!1}const c=e.computed(()=>{if(!a.default)return!1;const v=a.default();return v.length===0?!1:v.some(B=>r(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"}},y=e.computed(()=>{var v;return((v=f[o.status])==null?void 0:v.icon)||""}),h=e.computed(()=>{var B;const v=(B=f[o.status])==null?void 0:B.bgClass;return v?{[v]:!0}:{}}),m=`tooltip-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,s=e.ref(!1),u=e.ref(!1),d=e.ref(!1),l=e.ref(null),p=e.computed(()=>o.withIcon&&o.status!=="neutral"),b=e.computed(()=>s.value?m:void 0),g=e.computed(()=>typeof o.interactive=="boolean"?o.interactive?void 0:0:c.value?void 0:0);function C(){(o.text||a.text)&&(s.value=!0)}function k(){o._forceOpenForDesignReview||(s.value=!1)}function S(){l.value&&(clearTimeout(l.value),l.value=null),C()}function z(){l.value&&(clearTimeout(l.value),l.value=null),l.value=setTimeout(()=>{!u.value&&!d.value&&k()},Ce)}function A(){u.value=!0,l.value&&(clearTimeout(l.value),l.value=null)}function O(){u.value=!1,l.value&&(clearTimeout(l.value),l.value=null),d.value||k()}function x(){d.value=!0,C()}function E(){d.value=!1,l.value&&(clearTimeout(l.value),l.value=null),u.value||k()}function D(v){v.key==="Escape"&&k()}return e.onMounted(()=>{o._forceOpenForDesignReview&&C()}),e.watch(()=>o._forceOpenForDesignReview,v=>{v?C():k()}),e.onUnmounted(()=>{l.value&&clearTimeout(l.value)}),(v,B)=>(e.openBlock(),e.createBlock(e.unref(me),{teleport:!0,"is-open":s.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":b.value,tabindex:g.value,onMouseover:S,onMouseleave:z,onFocusin:x,onFocusout:E,onKeydown:D},[e.renderSlot(v.$slots,"default",{},void 0,!0)],40,ge)]),default:e.withCtx(()=>[e.createElementVNode("div",{id:m,class:e.normalizeClass(ke),role:"tooltip","aria-hidden":!s.value,onMouseenter:A,onMouseleave:O},[p.value?(e.openBlock(),e.createBlock(e.unref(N.FzIcon),{key:0,size:"md",name:y.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,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=I(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,i=e.ref(a.defaultOpen),r={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"},c={sm:"backoffice",md:"frontoffice",lg:"frontoffice"},f=e.computed(()=>["flex select-none gap-12 rounded justify-between",r[a.tone],b.value==="backoffice"?"p-6":"",...g.value==="accordion"?["cursor-pointer"]:[]]),y=e.computed(()=>({info:"circle-info",error:"circle-xmark",danger:"triangle-exclamation",warning:"triangle-exclamation",success:"circle-check"})[a.tone]),h=e.computed(()=>[{info:"text-semantic-info",error:"text-semantic-error",danger:"text-semantic-error",warning:"text-semantic-warning",success:"text-semantic-success"}[a.tone]]),m=e.computed(()=>["font-normal","!leading-[20px]",{"mt-8":a.title,"mb-16":a.showButtonAction||a.showLinkAction}]),s=e.computed(()=>g.value==="background"?!0:i.value),u=e.computed(()=>i.value?"angle-up":"angle-down"),d=e.computed(()=>{if(g.value==="accordion")return u.value;if(a.isDismissible)return"xmark"}),l=e.computed(()=>g.value!=="accordion"?!0:i.value);function p(z){z.stopPropagation(),n("fzAlert:click")}const b=e.computed(()=>a.size?c[a.size]:a.environment),g=e.computed(()=>a.variant?a.variant:["default","simple"].includes(a.alertStyle)?"background":"accordion"),C=e.computed(()=>g.value==="accordion"||a.isDismissible),k=()=>{g.value==="accordion"&&(i.value=!i.value),a.isDismissible&&n("fzAlert:dismiss")},S=()=>{g.value==="accordion"&&(i.value=!i.value)};return(z,A)=>{const O=e.resolveDirective("bold");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value),onClick:S},[e.createVNode(e.unref(G),{horizontal:"",gap:"sm",class:e.normalizeClass(["flex-1",b.value==="backoffice"?"p-6":"p-12"]),alignItems:"start"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.FzIcon),{name:y.value,size:"md",class:e.normalizeClass(h.value)},null,8,["name","class"]),e.createElementVNode("div",we,[t.title?e.withDirectives((e.openBlock(),e.createElementBlock("p",ze,[e.createTextVNode(e.toDisplayString(t.title),1)])),[[O]]):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(m.value)},[e.renderSlot(z.$slots,"default",{},void 0,!0)],2)):e.createCommentVNode("",!0),s.value?e.renderSlot(z.$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:p,tooltip:t.buttonActionTooltip,environment:b.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:p,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"]),C.value?(e.openBlock(),e.createBlock(e.unref(K),{key:0,iconName:d.value,environment:b.value,variant:"invisible",onClick:e.withModifiers(k,["stop"])},null,8,["iconName","environment"])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-f72b7e4a"]]),Q=e.defineComponent({__name:"ErrorAlert",props:{id:{}},setup(t){return(o,a)=>(e.openBlock(),e.createBlock(e.unref(Be),{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"]))}}),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=`
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
- `,Oe="relative",H=I(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,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 n=Object.freeze({INDETERMINATE:"square-minus",CHECKED:"square-check",UNCHECKED:"square"}),i=Object.freeze({SOLID:"fas",REGULAR:"far"}),r=e.computed(()=>a.value??a.label),c=a.checkboxId||R(),f=e.useModel(t,"modelValue"),y=o,h=e.shallowRef(null),m=e.computed(()=>f.value==null?!1:typeof f.value=="boolean"?f.value:f.value.includes(r.value)),s=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",s.value]),l=e.computed(()=>[u.value]),p=e.computed(()=>a.indeterminate?n.INDETERMINATE:m.value?n.CHECKED:n.UNCHECKED),b=e.computed(()=>a.indeterminate||m.value?i.SOLID:i.REGULAR);return e.onMounted(()=>{var g,C;f.value!=null&&(typeof f.value=="boolean"?f.value&&((g=h.value)==null||g.dispatchEvent(new Event("change"))):f.value.includes(r.value)&&((C=h.value)==null||C.dispatchEvent(new Event("change"))))}),(g,C)=>(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:C[0]||(C[0]=k=>y("change",k)),"onUpdate:modelValue":C[1]||(C[1]=k=>f.value=k),"aria-checked":t.indeterminate?"mixed":m.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(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(N.FzIcon),{name:p.value,size:"md",class:e.normalizeClass([Oe,l.value]),variant:b.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(N.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&&g.$slots.error?(e.openBlock(),e.createBlock(Q,{key:0,id:`${e.unref(c)}-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"]]),J=Symbol("FzCheckboxCheckedSet"),Fe="flex flex-col justify-center gap-8 pl-24",Re=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"),i=R(),r=e.computed(()=>{var m;return(m=o.children)==null?void 0:m.map((s,u)=>`${i}-child-${u}`).join(" ")}),c=e.computed(()=>[]),f=e.computed(()=>{if(!o.children)return!1;const m=o.children.filter(s=>n.value.includes(s.value??s.label)).length;return m>0&&m<o.children.length});function y(){if(!o.children)return;o.children.filter(s=>n.value.includes(s.value??s.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(s=>s!==a.value))}function h(){var m;o.children&&(n.value.includes(a.value)?n.value=n.value.concat((m=o.children)==null?void 0:m.map(s=>s.value??s.label).filter(s=>!n.value.includes(s))):n.value=n.value.filter(s=>{var u;return!((u=o.children)!=null&&u.map(d=>d.value??d.label).includes(s))}))}return(m,s)=>{var u,d;return e.openBlock(),e.createBlock(H,{modelValue:n.value,"onUpdate:modelValue":s[1]||(s[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,p)=>(e.openBlock(),e.createBlock(H,e.mergeProps({key:l.value?l.value.toString():l.label,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=b=>n.value=b),disabled:t.disabled},{ref_for:!0},l,{emphasis:t.emphasis,error:t.error,"checkbox-id":`${e.unref(i)}-child-${p}`,onChange:y}),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"],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(),i=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"]),y=e.computed(()=>["text-base"]),h=e.computed(()=>["text-base",o.horizontal?"gap-16":"gap-8",o.horizontal?"flex-row":"flex-col"]),m=e.computed(()=>Array.isArray(o.options)&&o.options.length>0),s=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,y.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(i.value)},[e.renderSlot(d.$slots,"help")],10,De)):e.createCommentVNode("",!0)],10,Te),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"},[m.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.options,p=>(e.openBlock(),e.createBlock(Re,e.mergeProps({key:p.value?p.value.toString():p.label,modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=b=>r.value=b),disabled:t.disabled},{ref_for:!0},p,{emphasis:t.emphasis,error:t.error}),null,16,["modelValue","disabled","emphasis","error"]))),128)):e.renderSlot(d.$slots,"default",{key:1,checkboxGroupProps:s.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=I(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=R(),i=e.useModel(t,"modelValue"),r=e.inject(J,null),c=e.computed(()=>i.value==null?!1:r&&r.source.value===i.value?r.set.value.has(a.value):i.value.includes(a.value));function f(){if(o.disabled)return;const p=i.value??[];c.value?i.value=p.filter(b=>b!==a.value):i.value=[...p,a.value]}const y=Object.freeze({CHECKED:"square-check",UNCHECKED:"square"}),h=Object.freeze({SOLID:"fas",REGULAR:"far"}),m=e.computed(()=>c.value?y.CHECKED:y.UNCHECKED),s=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(p,b)=>(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(N.FzIcon),{key:0,name:m.value,size:"md",class:e.normalizeClass(["shrink-0",u.value,{"absolute top-[23px] left-[23px]":t.variant==="vertical","self-start":t.variant==="horizontal"}]),variant:s.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(N.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"]]);w.FzCheckbox=H,w.FzCheckboxCard=Qe,w.FzCheckboxGroup=He,w.generateCheckboxId=R,w.generateGroupId=U,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"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .fz-icon-button-wrapper[data-v-b4be112d]>button{gap:0!important;min-width:0!important}.fz-icon-button-wrapper--backoffice[data-v-b4be112d]>button{padding-left:5px;padding-right:5px}.fz-icon-button-wrapper--frontoffice[data-v-b4be112d]>button{padding-left:11px;padding-right:11px}.fz-container[data-v-8c40daeb]{display:flex}.fz-container--vertical[data-v-8c40daeb]{flex-direction:column}.fz-container--horizontal[data-v-8c40daeb]{flex-direction:row;flex-wrap:nowrap}.fz-container.align-items-start[data-v-8c40daeb]{align-items:flex-start}.fz-container.align-items-center[data-v-8c40daeb]{align-items:center}.fz-container.align-items-end[data-v-8c40daeb]{align-items:flex-end}.fz-container.align-items-stretch[data-v-8c40daeb]{align-items:stretch}.fz-container.align-items-baseline[data-v-8c40daeb]{align-items:baseline}.fz-container--horizontal.layout-expand-first[data-v-8c40daeb]>*:first-child{flex-grow:1}.fz-container--horizontal.layout-expand-all[data-v-8c40daeb]>*{flex-grow:1}.fz-container--horizontal.layout-space-between[data-v-8c40daeb]{justify-content:space-between}.fz-container--horizontal.layout-expand-last[data-v-8c40daeb]>*:last-child{flex-grow:1}.fz-container--vertical.gap-main-content-sm[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-sm, 32px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-main-content-base[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-base, 48px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-main-content-lg[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-lg, 64px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-none[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-none, 0px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-xs[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-xs, 8px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-sm[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-sm, 16px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-base[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-base, 24px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-lg[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-lg, 32px)) + var(--paragraph-gap, 8px))}.fz-container--horizontal[data-v-8c40daeb]>p+p{margin-top:0}.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(2),.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(2)~*{flex-basis:50%;flex-grow:0;flex-shrink:1}.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(3),.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(3)~*{flex-basis:33.333%;flex-grow:0;flex-shrink:1}.fz-button-group[data-v-79dd8b6f]>.fz-icon-button-wrapper{flex-basis:initial!important;flex-grow:0!important;flex-shrink:0!important}.fz__tooltip__text[data-v-94597a6c]{overflow-wrap:anywhere}.bg-semantic-info-50[data-v-f72b7e4a]{background-color:#f3f7ff}.bg-semantic-error-50[data-v-f72b7e4a]{background-color:#fef3f3}.bg-semantic-warning-50[data-v-f72b7e4a]{background-color:#fff8f3}.bg-semantic-success-50[data-v-f72b7e4a]{background-color:#f2f8f6}.fz-hidden-input[data-v-2b198cc9]{opacity:0;margin:0;height:0;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.group[data-error]:hover:not([data-disabled]) .peer~label>div[data-v-2b198cc9]{color:var(--semantic-error-300)!important}.group[data-error]:hover:not([data-disabled]) .peer~label[data-v-2b198cc9]{color:var(--semantic-error-300)!important}.group[data-emphasis]:hover:not([data-disabled]):not([data-error]) .peer~label>div[data-v-2b198cc9]{color:var(--blue-600)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:checked~label>div[data-v-2b198cc9]{color:var(--core-black)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:indeterminate~label>div[data-v-2b198cc9]{color:var(--core-black)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:not(:checked):not(:indeterminate)~label>div[data-v-2b198cc9]{color:var(--blue-600)!important}.fz-hidden-input[data-v-d850ec45]{opacity:0;margin:0;height:0;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}
1
+ .fz-icon-button-wrapper[data-v-b4be112d]>button{gap:0!important;min-width:0!important}.fz-icon-button-wrapper--backoffice[data-v-b4be112d]>button{padding-left:5px;padding-right:5px}.fz-icon-button-wrapper--frontoffice[data-v-b4be112d]>button{padding-left:11px;padding-right:11px}.fz-container[data-v-8c40daeb]{display:flex}.fz-container--vertical[data-v-8c40daeb]{flex-direction:column}.fz-container--horizontal[data-v-8c40daeb]{flex-direction:row;flex-wrap:nowrap}.fz-container.align-items-start[data-v-8c40daeb]{align-items:flex-start}.fz-container.align-items-center[data-v-8c40daeb]{align-items:center}.fz-container.align-items-end[data-v-8c40daeb]{align-items:flex-end}.fz-container.align-items-stretch[data-v-8c40daeb]{align-items:stretch}.fz-container.align-items-baseline[data-v-8c40daeb]{align-items:baseline}.fz-container--horizontal.layout-expand-first[data-v-8c40daeb]>*:first-child{flex-grow:1}.fz-container--horizontal.layout-expand-all[data-v-8c40daeb]>*{flex-grow:1}.fz-container--horizontal.layout-space-between[data-v-8c40daeb]{justify-content:space-between}.fz-container--horizontal.layout-expand-last[data-v-8c40daeb]>*:last-child{flex-grow:1}.fz-container--vertical.gap-main-content-sm[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-sm, 32px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-main-content-base[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-base, 48px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-main-content-lg[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--main-content-lg, 64px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-none[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-none, 0px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-xs[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-xs, 8px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-sm[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-sm, 16px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-base[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-base, 24px)) + var(--paragraph-gap, 8px))}.fz-container--vertical.gap-section-content-lg[data-v-8c40daeb]>p+p{margin-top:calc((0px - var(--section-content-lg, 32px)) + var(--paragraph-gap, 8px))}.fz-container--horizontal[data-v-8c40daeb]>p+p{margin-top:0}.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(2),.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(2)~*{flex-basis:50%;flex-grow:0;flex-shrink:1}.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(3),.fz-button-group[data-v-79dd8b6f]>*:nth-child(1):nth-last-child(3)~*{flex-basis:33.333%;flex-grow:0;flex-shrink:1}.fz-button-group[data-v-79dd8b6f]>.fz-icon-button-wrapper{flex-basis:initial!important;flex-grow:0!important;flex-shrink:0!important}.fz__tooltip__text[data-v-94597a6c]{overflow-wrap:anywhere}.bg-semantic-info-50[data-v-3d1f9d4e]{background-color:#f3f7ff}.bg-semantic-error-50[data-v-3d1f9d4e]{background-color:#fef3f3}.bg-semantic-warning-50[data-v-3d1f9d4e]{background-color:#fff8f3}.bg-semantic-success-50[data-v-3d1f9d4e]{background-color:#f2f8f6}.fz-hidden-input[data-v-2b198cc9]{opacity:0;margin:0;height:0;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.group[data-error]:hover:not([data-disabled]) .peer~label>div[data-v-2b198cc9]{color:var(--semantic-error-300)!important}.group[data-error]:hover:not([data-disabled]) .peer~label[data-v-2b198cc9]{color:var(--semantic-error-300)!important}.group[data-emphasis]:hover:not([data-disabled]):not([data-error]) .peer~label>div[data-v-2b198cc9]{color:var(--blue-600)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:checked~label>div[data-v-2b198cc9]{color:var(--core-black)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:indeterminate~label>div[data-v-2b198cc9]{color:var(--core-black)!important}.group:hover:not([data-emphasis]):not([data-error]):not([data-disabled]) .peer:not(:checked):not(:indeterminate)~label>div[data-v-2b198cc9]{color:var(--blue-600)!important}.fz-hidden-input[data-v-d850ec45]{opacity:0;margin:0;height:0;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@fiscozen/checkbox",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Design System Checkbox and Checkbox Group component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
7
7
  "keywords": [],
8
8
  "author": "Cristian Barraco",
9
9
  "dependencies": {
10
- "@fiscozen/alert": "1.0.1",
11
10
  "@fiscozen/badge": "1.0.1",
12
- "@fiscozen/tooltip": "1.0.3",
13
- "@fiscozen/composables": "1.0.1"
11
+ "@fiscozen/alert": "1.1.0",
12
+ "@fiscozen/composables": "1.0.1",
13
+ "@fiscozen/tooltip": "1.0.3"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "tailwindcss": "^3.4.1",
17
17
  "vue": "^3.4.13",
18
- "@fiscozen/icons": "^0.1.37"
18
+ "@fiscozen/icons": "^0.1.38"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rushstack/eslint-patch": "^1.3.3",
@@ -33,8 +33,8 @@
33
33
  "vite-plugin-dts": "^3.8.3",
34
34
  "vitest": "^1.2.0",
35
35
  "vue-tsc": "^1.8.25",
36
- "@fiscozen/eslint-config": "^0.1.0",
37
36
  "@fiscozen/prettier-config": "^0.1.0",
37
+ "@fiscozen/eslint-config": "^0.1.0",
38
38
  "@fiscozen/tsconfig": "^0.1.0"
39
39
  },
40
40
  "license": "MIT",
@@ -203,21 +203,15 @@ exports[`FzCheckbox > Snapshots > should match snapshot - error state 1`] = `
203
203
  FzAlert with type="error" and announce prop
204
204
  would automatically get role="alert" and aria-live="assertive"
205
205
  -->
206
- <div data-v-9bf2fc2e="" data-v-79ecb611="" class="flex select-none gap-12 rounded justify-between bg-semantic-error-50 border-semantic-error" id="fz-checkbox-100000000001-2a84k-error" role="alert" aria-live="assertive" aria-atomic="true">
207
- <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-start layout-default flex-1 p-12">
208
- <div data-v-9bf2fc2e="" class="flex items-center justify-center w-[20px] h-[20px] text-semantic-error"><svg class="svg-inline--fa fa-circle-xmark h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
206
+ <div data-v-9bf2fc2e="" data-v-79ecb611="" class="flex select-none gap-12 rounded justify-between bg-transparent" id="fz-checkbox-100000000001-2a84k-error" role="alert" aria-live="assertive" aria-atomic="true">
207
+ <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-xs align-items-start layout-default flex-1">
208
+ <div data-v-9bf2fc2e="" class="flex items-center justify-center w-[20px] h-[20px] text-semantic-error" aria-hidden="true"><svg class="svg-inline--fa fa-circle-xmark h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
209
209
  <path class="" fill="currentColor" d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"></path>
210
210
  </svg></div>
211
211
  <div data-v-9bf2fc2e="" class="flex flex-col flex-1">
212
212
  <!--v-if-->
213
- <p data-v-9bf2fc2e="" class="font-normal !leading-[20px] mb-16">Error message</p>
214
- <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-center layout-default"><button data-v-9bf2fc2e="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-core-white text-grey-500 !border-grey-200 hover:bg-grey-100 hover:!border-grey-200 focus:bg-core-white focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200">
215
- <!--v-if-->
216
- <div class="truncate font-normal !text-[16px] !leading-[20px]"></div>
217
- <!--v-if-->
218
- </button>
219
- <!--v-if-->
220
- </div>
213
+ <p data-v-9bf2fc2e="" class="font-normal !leading-[20px]">Error message</p>
214
+ <!--v-if-->
221
215
  </div>
222
216
  </div>
223
217
  <!--v-if-->
@@ -701,21 +701,15 @@ exports[`FzCheckboxGroup > Snapshots > should match snapshot - with error 1`] =
701
701
  FzAlert with type="error" and announce prop
702
702
  would automatically get role="alert" and aria-live="assertive"
703
703
  -->
704
- <div data-v-9bf2fc2e="" class="flex select-none gap-12 rounded justify-between bg-semantic-error-50 border-semantic-error" id="fz-checkbox-group-100000000001-2a84k-error" role="alert" aria-live="assertive" aria-atomic="true">
705
- <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-start layout-default flex-1 p-12">
706
- <div data-v-9bf2fc2e="" class="flex items-center justify-center w-[20px] h-[20px] text-semantic-error"><svg class="svg-inline--fa fa-circle-xmark h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
704
+ <div data-v-9bf2fc2e="" class="flex select-none gap-12 rounded justify-between bg-transparent" id="fz-checkbox-group-100000000001-2a84k-error" role="alert" aria-live="assertive" aria-atomic="true">
705
+ <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-xs align-items-start layout-default flex-1">
706
+ <div data-v-9bf2fc2e="" class="flex items-center justify-center w-[20px] h-[20px] text-semantic-error" aria-hidden="true"><svg class="svg-inline--fa fa-circle-xmark h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
707
707
  <path class="" fill="currentColor" d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"></path>
708
708
  </svg></div>
709
709
  <div data-v-9bf2fc2e="" class="flex flex-col flex-1">
710
710
  <!--v-if-->
711
- <p data-v-9bf2fc2e="" class="font-normal !leading-[20px] mb-16">Test error message</p>
712
- <div data-v-da7f5873="" data-v-9bf2fc2e="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-center layout-default"><button data-v-9bf2fc2e="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-core-white text-grey-500 !border-grey-200 hover:bg-grey-100 hover:!border-grey-200 focus:bg-core-white focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200">
713
- <!--v-if-->
714
- <div class="truncate font-normal !text-[16px] !leading-[20px]"></div>
715
- <!--v-if-->
716
- </button>
717
- <!--v-if-->
718
- </div>
711
+ <p data-v-9bf2fc2e="" class="font-normal !leading-[20px]">Test error message</p>
712
+ <!--v-if-->
719
713
  </div>
720
714
  </div>
721
715
  <!--v-if-->
@@ -18,7 +18,7 @@
18
18
  * This field is required
19
19
  * </ErrorAlert>
20
20
  */
21
- import { FzAlert } from "@fiscozen/alert";
21
+ import { FzAlert } from '@fiscozen/alert'
22
22
 
23
23
  defineProps<{
24
24
  /**
@@ -27,8 +27,8 @@ defineProps<{
27
27
  *
28
28
  * @example "checkbox-123-error"
29
29
  */
30
- id: string;
31
- }>();
30
+ id: string
31
+ }>()
32
32
  </script>
33
33
 
34
34
  <template>
@@ -50,7 +50,7 @@ defineProps<{
50
50
  <FzAlert
51
51
  :id="id"
52
52
  tone="error"
53
- alertStyle="simple"
53
+ variant="text"
54
54
  role="alert"
55
55
  aria-live="assertive"
56
56
  aria-atomic="true"