@codeandfunction/callaloo 4.9.5 → 4.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/callaloo.global.js +1 -1
  2. package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js → CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js} +1 -1
  3. package/dist/chunks/{CLCalendar.vue_vue_type_style_index_0_lang-BAfGE35e.js → CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js} +1 -1
  4. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-DPQxSLkQ.js → CLCard.vue_vue_type_style_index_0_lang-BGKjh5vA.js} +1 -1
  5. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js +2 -0
  6. package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-CCyY39MJ.js → CLLink.vue_vue_type_style_index_0_lang-C9_EwMBi.js} +1 -1
  7. package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-CwdYGfO9.js → CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js} +1 -1
  8. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-Ds2aJNK9.js → CLNavLink.vue_vue_type_script_setup_true_lang-Dqr8A_2Z.js} +1 -1
  9. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-BVsLNnfE.js → CLPill.vue_vue_type_style_index_0_lang-DCtH-u0_.js} +1 -1
  10. package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-BIehrtqC.js → CLToast.vue_vue_type_style_index_0_lang-CtXJMlF9.js} +1 -1
  11. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  12. package/dist/components/CLIcon/CLIcon.js +1 -1
  13. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  14. package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
  15. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
  16. package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
  17. package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
  18. package/dist/components/Form/CLInput/CLInput.js +1 -1
  19. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
  20. package/dist/components/Form/CLSelect/CLSelect.js +1 -1
  21. package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
  22. package/dist/components/Indicators/CLPill/CLPill.js +1 -1
  23. package/dist/components/Modals/CLModal/CLModal.js +1 -1
  24. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
  25. package/dist/components/Navigation/CLLink/CLLink.js +1 -1
  26. package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
  27. package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
  28. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
  29. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  30. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  31. package/dist/composables/useDatePicker.js +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js +0 -2
@@ -1,2 +1,2 @@
1
1
  import '../components/Buttons/CLButton/CLButton.css';
2
- import{defineComponent as e,useSlots as t,ref as a,computed as o,onMounted as l,nextTick as i,createBlock as d,openBlock as n,resolveDynamicComponent as r,normalizeStyle as s,normalizeClass as u,unref as f,withCtx as c,createCommentVNode as p,createElementBlock as y,renderSlot as v}from"vue";import{_ as b}from"./CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{_ as m}from"./CLSpinner.vue_vue_type_style_index_0_lang-DgZLt9T1.js";import{CLColorVariants as $,CLButtonTypes as _,CLLinkTarget as g,CLSizes as h,CLIconSizes as B,CLColors as L,CLAlign as z,CLPosition as C}from"../index.js";import{b as X}from"./utils-MElq6rY3.js";import{useHasSlotContent as S}from"../composables/useHasSlotContent.js";const w=/* @__PURE__ */e({name:"CLButton",__name:"CLButton",props:{active:{type:Boolean,default:!1},alignContent:{default:z.Center},ariaLabel:{default:void 0},as:{default:"button"},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:L.Neutral},disabled:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},form:{default:void 0},forwardRef:{type:Function,default:void 0},height:{default:"auto"},href:{default:void 0},iconAfter:{default:void 0},iconBefore:{default:void 0},iconFilled:{type:Boolean,default:!1},iconSize:{default:B.Small},onClick:{type:Function,default:void 0},pill:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:h.Small},target:{default:g.Self},testId:{default:"clll-button"},title:{default:void 0},type:{default:_.Button},variant:{default:$.Soft},width:{default:"auto"},wrap:{type:Boolean,default:!1}},setup(e){const $=e,_=S();t();const g=a(),B="clll-button",L=o(()=>[B,`${B}--${$.type}`,`${B}--${$.color}--${$.variant}`,`${B}--${$.size}`,`${B}--${$.alignContent}`,$.active?`${B}--active`:"",$.busy?`${B}--busy`:"",$.disabled?`${B}--disabled`:"",$.wrap?`${B}--wrapped`:"",$.rounded?`${B}--rounded`:"",$.borderRadius?`${B}--${$.borderRadius}`:"",_.value?`${B}--has-content`:`${B}--no-content`,$.iconBefore?`${B}--icon-before`:"",$.iconAfter?`${B}--icon-after`:"",$.elevated?`${B}--elevated`:"",$.pill?`${B}--pill`:""]),w=()=>{switch($.size){case h.Medium:case h.Large:return h.Small;case h.XL:case h.XXL:return h.Medium;case h.XXXL:return h.Large;case h.XXXXL:return h.XL;case h.Tiny:default:return h.Tiny}};l(()=>{i(()=>{g.value&&$.forwardRef?.(g.value)})});const k=e=>{$.onClick?.(e)};return(t,a)=>(n(),d(r(e.as),{ref_key:"buttonRef",ref:g,"aria-label":e.ariaLabel,class:u(f(L)),"data-testid":e.testId,disabled:"button"===e.as?e.busy||e.disabled:void 0,form:"button"===e.as?e.form:void 0,href:"a"===e.as?e.href:void 0,target:"a"===e.as?e.target:void 0,title:e.title,type:"button"===e.as?e.type:void 0,style:s({width:e.width,height:e.height,...f(X)({color:e.color,variant:e.variant})}),onClick:k},{default:c(()=>[e.iconBefore?(n(),d(f(b),{key:0,filled:e.iconFilled,name:e.iconBefore,size:e.iconSize,"test-id":`${e.testId}-icon-before`},null,8,["filled","name","size","test-id"])):p("",!0),f(_)?(n(),y("span",{key:1,class:u(`${B}__content`)},[v(t.$slots,"default")],2)):p("",!0),e.iconAfter?(n(),d(f(b),{key:2,filled:e.iconFilled,name:e.iconAfter,size:e.iconSize,"test-id":`${e.testId}-icon-after`},null,8,["filled","name","size","test-id"])):p("",!0),e.busy?(n(),d(f(m),{key:3,align:f(z).Center,position:f(C).Absolute,size:w(),color:e.color},null,8,["align","position","size","color"])):p("",!0)]),_:3},8,["aria-label","class","data-testid","disabled","form","href","target","title","type","style"]))}});export{w as _};
2
+ import{defineComponent as e,useSlots as t,ref as a,computed as o,onMounted as l,nextTick as i,createBlock as d,openBlock as n,resolveDynamicComponent as r,normalizeStyle as s,normalizeClass as u,unref as f,withCtx as c,createCommentVNode as p,createElementBlock as y,renderSlot as v}from"vue";import{_ as b}from"./CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{_ as m}from"./CLSpinner.vue_vue_type_style_index_0_lang-DgZLt9T1.js";import{CLColorVariants as $,CLButtonTypes as _,CLLinkTarget as g,CLSizes as h,CLIconSizes as B,CLColors as L,CLAlign as z,CLPosition as C}from"../index.js";import{b as X}from"./utils-MElq6rY3.js";import{useHasSlotContent as S}from"../composables/useHasSlotContent.js";const w=/* @__PURE__ */e({name:"CLButton",__name:"CLButton",props:{active:{type:Boolean,default:!1},alignContent:{default:z.Center},ariaLabel:{default:void 0},as:{default:"button"},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:L.Neutral},disabled:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},form:{default:void 0},forwardRef:{type:Function,default:void 0},height:{default:"auto"},href:{default:void 0},iconAfter:{default:void 0},iconBefore:{default:void 0},iconFilled:{type:Boolean,default:!1},iconSize:{default:B.Small},onClick:{type:Function,default:void 0},pill:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:h.Small},target:{default:g.Self},testId:{default:"clll-button"},title:{default:void 0},type:{default:_.Button},variant:{default:$.Soft},width:{default:"auto"},wrap:{type:Boolean,default:!1}},setup(e){const $=e,_=S();t();const g=a(),B="clll-button",L=o(()=>[B,`${B}--${$.type}`,`${B}--${$.color}--${$.variant}`,`${B}--${$.size}`,`${B}--${$.alignContent}`,$.active?`${B}--active`:"",$.busy?`${B}--busy`:"",$.disabled?`${B}--disabled`:"",$.wrap?`${B}--wrapped`:"",$.rounded?`${B}--rounded`:"",$.borderRadius?`${B}--${$.borderRadius}`:"",_.value?`${B}--has-content`:`${B}--no-content`,$.iconBefore?`${B}--icon-before`:"",$.iconAfter?`${B}--icon-after`:"",$.elevated?`${B}--elevated`:"",$.pill?`${B}--pill`:""]),w=()=>{switch($.size){case h.Medium:case h.Large:return h.Small;case h.XL:case h.XXL:return h.Medium;case h.XXXL:return h.Large;case h.XXXXL:return h.XL;case h.Tiny:default:return h.Tiny}};l(()=>{i(()=>{g.value&&$.forwardRef?.(g.value)})});const k=e=>{$.onClick?.(e)};return(t,a)=>(n(),d(r(e.as),{ref_key:"buttonRef",ref:g,"aria-label":e.ariaLabel,class:u(f(L)),"data-testid":e.testId,disabled:"button"===e.as?e.busy||e.disabled:void 0,form:"button"===e.as?e.form:void 0,href:"a"===e.as?e.href:void 0,target:"a"===e.as?e.target:void 0,title:e.title,type:"button"===e.as?e.type:void 0,style:s({width:e.width,height:e.height,...f(X)({color:e.color,variant:e.variant})}),onClick:k},{default:c(()=>[e.iconBefore?(n(),d(f(b),{key:0,filled:e.iconFilled,name:e.iconBefore,size:e.iconSize,"test-id":`${e.testId}-icon-before`},null,8,["filled","name","size","test-id"])):p("",!0),f(_)?(n(),y("span",{key:1,class:u(`${B}__content`)},[v(t.$slots,"default")],2)):p("",!0),e.iconAfter?(n(),d(f(b),{key:2,filled:e.iconFilled,name:e.iconAfter,size:e.iconSize,"test-id":`${e.testId}-icon-after`},null,8,["filled","name","size","test-id"])):p("",!0),e.busy?(n(),d(f(m),{key:3,align:f(z).Center,position:f(C).Absolute,size:w(),color:e.color},null,8,["align","position","size","color"])):p("",!0)]),_:3},8,["aria-label","class","data-testid","disabled","form","href","target","title","type","style"]))}});export{w as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Form/CLCalendar/CLCalendar.css';
2
- import{defineComponent as e,mergeModels as a,useCssVars as l,useModel as t,ref as i,toRef as d,watch as r,onMounted as n,createElementBlock as o,openBlock as s,normalizeClass as u,createElementVNode as c,createVNode as p,unref as f,withCtx as v,createTextVNode as _,toDisplayString as y,Fragment as m,renderList as h,createBlock as b,createCommentVNode as g}from"vue";import{_ as k}from"./CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as x}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as z,CLSizes as D,CLIconSizes as w,CLIconNames as C,CLBorderRadius as S,CLTextTypes as L,CLColors as $,CLAlign as M}from"../index.js";import{useDatePicker as B}from"../composables/useDatePicker.js";const P=["data-testid"],R=/* @__PURE__ */e({name:"CLCalendar",__name:"CLCalendar",props:/* @__PURE__ */a({color:{default:$.Primary},disabled:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},isRange:{type:Boolean,default:!0},fluid:{type:Boolean,default:!1},testId:{default:"clll-calendar"},width:{default:"280px"}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */a(["date-select"],["update:modelValue"]),setup(e,{expose:a,emit:R}){l(e=>({v63768322:e.width}));const T=e,j=R,E="clll-calendar",G=t(e,"modelValue"),F=i(G.value?.end??null),I=i(G.value?.start??null),{calendarGrid:N,cancelDraft:V,clearDraft:A,currentMonthLabel:O,draftEnd:q,draftStart:H,getDayAriaLabel:J,handleNextMonth:K,handlePrevMonth:Q,initializeDraft:U,isDraftEnd:W,isDraftStart:X,isInDraftRange:Y,onDayClick:Z,weekDays:ee}=B({appliedEnd:F,appliedStart:I,isRange:d(T,"isRange")});r(G,e=>{I.value=e?.start??null,F.value=e?.end??null,U()},{deep:!0}),n(()=>{U()});return a({apply:()=>{I.value=H.value,F.value=q.value,G.value={end:F.value,start:I.value}},cancel:()=>{V()},draftEnd:q,draftStart:H,initializeDraft:U,reset:()=>{A(),I.value=null,F.value=null,G.value=null}}),(a,l)=>(s(),o("div",{class:u([E,e.fluid?`${E}__fluid`:""]),"data-testid":e.testId},[c("div",{class:u(`${E}__header`)},[p(f(k),{"aria-label":"Previous month","border-radius":f(S).Full,"icon-before":f(C).ChevronLeft,"icon-size":f(w).Tiny,"on-click":f(Q),size:f(D).Tiny,variant:f(z).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"]),p(f(x),{type:f(L).Medium,medium:""},{default:v(()=>[_(y(f(O)),1)]),_:1},8,["type"]),p(f(k),{"aria-label":"Next month","border-radius":f(S).Full,"icon-before":f(C).ChevronRight,"icon-size":f(w).Tiny,"on-click":f(K),size:f(D).Tiny,variant:f(z).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"])],2),c("div",{class:u(`${E}__grid`)},[(s(!0),o(m,null,h(f(ee),e=>(s(),o("div",{key:e,class:u(`${E}__weekday`)},[p(f(x),{align:f(M).Center,color:f($).Neutral,type:f(L).Small},{default:v(()=>[_(y(e),1)]),_:2},1032,["align","color","type"])],2))),128)),(s(!0),o(m,null,h(f(N),(a,l)=>(s(),o("div",{key:a.date??`pad-${l}`,class:u([`${E}__cell`,a.isOutsideMonth?`${E}__cell--outside`:""])},[a.day&&a.date?(s(),b(f(k),{key:0,"aria-label":f(J)(a.date),"border-radius":f(S).Full,color:f(X)(a.date)||f(W)(a.date)?e.color:f($).Secondary,disabled:e.disabled||e.busy,size:f(D).Small,height:"100%",width:"100%","on-click":e=>((e,a)=>{a?.preventDefault(),a?.stopPropagation(),T.disabled||T.busy||!e||(Z(e),j("date-select",e))})(a.date,e),variant:f(X)(a.date)||f(W)(a.date)?f(z).Solid:f(Y)(a.date)?f(z).Soft:f(z).Ghost,wrap:""},{default:v(()=>[_(y(a.day),1)]),_:2},1032,["aria-label","border-radius","color","disabled","size","on-click","variant"])):g("",!0)],2))),128))],2)],10,P))}});export{R as _};
2
+ import{defineComponent as e,mergeModels as a,useCssVars as l,useModel as t,ref as i,toRef as d,watch as r,onMounted as n,createElementBlock as o,openBlock as s,normalizeClass as u,createElementVNode as c,createVNode as p,unref as f,withCtx as v,createTextVNode as _,toDisplayString as y,Fragment as m,renderList as h,createBlock as b,createCommentVNode as g}from"vue";import{_ as k}from"./CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as x}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as z,CLSizes as D,CLIconSizes as w,CLIconNames as C,CLBorderRadius as S,CLTextTypes as L,CLColors as $,CLAlign as M}from"../index.js";import{useDatePicker as B}from"../composables/useDatePicker.js";const P=["data-testid"],R=/* @__PURE__ */e({name:"CLCalendar",__name:"CLCalendar",props:/* @__PURE__ */a({color:{default:$.Primary},disabled:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},isRange:{type:Boolean,default:!0},fluid:{type:Boolean,default:!1},testId:{default:"clll-calendar"},width:{default:"280px"}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */a(["date-select"],["update:modelValue"]),setup(e,{expose:a,emit:R}){l(e=>({v63768322:e.width}));const T=e,j=R,E="clll-calendar",G=t(e,"modelValue"),F=i(G.value?.end??null),I=i(G.value?.start??null),{calendarGrid:N,cancelDraft:V,clearDraft:A,currentMonthLabel:O,draftEnd:q,draftStart:H,getDayAriaLabel:J,handleNextMonth:K,handlePrevMonth:Q,initializeDraft:U,isDraftEnd:W,isDraftStart:X,isInDraftRange:Y,onDayClick:Z,weekDays:ee}=B({appliedEnd:F,appliedStart:I,isRange:d(T,"isRange")});r(G,e=>{I.value=e?.start??null,F.value=e?.end??null,U()},{deep:!0}),n(()=>{U()});return a({apply:()=>{I.value=H.value,F.value=q.value,G.value={end:F.value,start:I.value}},cancel:()=>{V()},draftEnd:q,draftStart:H,initializeDraft:U,reset:()=>{A(),I.value=null,F.value=null,G.value=null}}),(a,l)=>(s(),o("div",{class:u([E,e.fluid?`${E}__fluid`:""]),"data-testid":e.testId},[c("div",{class:u(`${E}__header`)},[p(f(k),{"aria-label":"Previous month","border-radius":f(S).Full,"icon-before":f(C).ChevronLeft,"icon-size":f(w).Tiny,"on-click":f(Q),size:f(D).Tiny,variant:f(z).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"]),p(f(x),{type:f(L).Medium,medium:""},{default:v(()=>[_(y(f(O)),1)]),_:1},8,["type"]),p(f(k),{"aria-label":"Next month","border-radius":f(S).Full,"icon-before":f(C).ChevronRight,"icon-size":f(w).Tiny,"on-click":f(K),size:f(D).Tiny,variant:f(z).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"])],2),c("div",{class:u(`${E}__grid`)},[(s(!0),o(m,null,h(f(ee),e=>(s(),o("div",{key:e,class:u(`${E}__weekday`)},[p(f(x),{align:f(M).Center,color:f($).Neutral,type:f(L).Small},{default:v(()=>[_(y(e),1)]),_:2},1032,["align","color","type"])],2))),128)),(s(!0),o(m,null,h(f(N),(a,l)=>(s(),o("div",{key:a.date??`pad-${l}`,class:u([`${E}__cell`,a.isOutsideMonth?`${E}__cell--outside`:""])},[a.day&&a.date?(s(),b(f(k),{key:0,"aria-label":f(J)(a.date),"border-radius":f(S).Full,color:f(X)(a.date)||f(W)(a.date)?e.color:f($).Secondary,disabled:e.disabled||e.busy,size:f(D).Small,height:"100%",width:"100%","on-click":e=>((e,a)=>{a?.preventDefault(),a?.stopPropagation(),T.disabled||T.busy||!e||(Z(e),j("date-select",e))})(a.date,e),variant:f(X)(a.date)||f(W)(a.date)?f(z).Solid:f(Y)(a.date)?f(z).Soft:f(z).Ghost,wrap:""},{default:v(()=>[_(y(a.day),1)]),_:2},1032,["aria-label","border-radius","color","disabled","size","on-click","variant"])):g("",!0)],2))),128))],2)],10,P))}});export{R as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Containers/CLCard/CLCard.css';
2
- import{defineComponent as e,useSlots as a,ref as t,computed as l,onMounted as i,nextTick as r,createElementBlock as o,openBlock as d,withKeys as n,normalizeStyle as s,normalizeClass as u,unref as c,createCommentVNode as g,createElementVNode as y,createBlock as h,renderSlot as f,Fragment as m,withCtx as _,createTextVNode as b,toDisplayString as v}from"vue";import{_ as $}from"./CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as p}from"./CLLink.vue_vue_type_style_index_0_lang-CCyY39MJ.js";import{_ as k}from"./CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js";import{_ as C}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as w,CLCardTypes as x,CLHeadingTypes as L,CLHeadingLevels as H,CLLinkTarget as R,CLOverflow as T,CLLoading as B,CLColors as S,CLAlign as j,CLOrder as A,CLTextTypes as O}from"../index.js";import{c as W}from"./utils-Dst7nzvj.js";import{useHasSlotContent as E}from"../composables/useHasSlotContent.js";const I=["data-testid","tabindex"],N=["alt","loading","src"],q={key:0,class:"clll-card__header-skeleton"},G=["alt","loading","src"],K=["aria-label","href","target"],M=/* @__PURE__ */e({name:"CLCard",__name:"CLCard",props:{active:{type:Boolean,default:!1},align:{default:j.Left},ariaLabel:{},borderRadius:{},bordered:{type:Boolean,default:!0},busy:{type:Boolean,default:!1},byline:{},color:{default:S.Neutral},compact:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},forwardRef:{},height:{default:"auto"},href:{},image:{},imageAltText:{default:""},imageHeight:{default:"auto"},imageLoading:{default:B.Eager},imageOrder:{},imageWidth:{default:"auto"},onClick:{},overflow:{default:T.Hidden},padded:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},target:{default:R.Self},testId:{default:"clll-card"},title:{},titleHLevel:{default:H.H2},titleType:{default:L.SubSection},truncateTitle:{type:Boolean,default:!1},type:{default:x.Medium},variant:{default:w.Soft},width:{default:"auto"}},setup(e){const x="clll-card",L=e,H=E(),R=a(),T=t(),B=t(),S=["a","button"],j=t(),M=l(()=>[x,`${x}--${L.type}`,`${x}--${L.color}-${L.variant}`,`${x}--${L.variant}`,`${x}--align-${L.align}`,L.rounded?`${x}--rounded`:`${x}--box`,L.bordered?`${x}--bordered`:"",L.borderRadius?`${x}--${L.borderRadius}`:"",L.busy?`${x}--busy`:`${x}--ready`,L.compact?`${x}--compact`:`${x}--no-compact`,L.title||L.byline?`${x}--has-header`:`${x}--no-header`,T.value?`${x}--has-heading`:`${x}--no-heading`,H.value?`${x}--has-content`:`${x}--no-content`,B.value?`${x}--has-footer`:`${x}--no-footer`,L.image?`${x}--has-image`:`${x}--has-no-image`,L.imageOrder?`${x}--image-${L.imageOrder}`:"",L.active?`${x}--active`:`${x}--inactive`,L.onClick?`${x}--has-link`:"",L.truncateTitle?`${x}--has-truncated-title`:"",L.elevated?`${x}--elevated`:"",L.overflow?`${x}--overflow-${L.overflow}`:"",L.padded?"":`${x}--no-padding`]),z=e=>{if(L.busy||!L.onClick)return;const{target:a}=e,t=a?a.closest("a,button"):void 0,l=[...j.value?.querySelectorAll("[data-expand-click-area]")??[]];if(l.length){const a=l[0],i=t?S.includes(t.tagName.toLowerCase()):null;t||a===e.target||i||a.click()}};return i(async()=>{await r(),j.value&&L.forwardRef?.(j.value),T.value=R?.heading,B.value=R?.footer}),(a,t)=>(d(),o("div",{ref_key:"refExpandedArea",ref:j,class:u(c(M)),style:s({...c(W)({color:e.color,variant:e.variant}),width:e.width,height:e.height,overflow:e.overflow}),"data-testid":e.testId,tabindex:e.onClick?0:void 0,onClick:z,onKeyup:n(z,["enter"])},[!e.image||e.imageOrder!==c(A).Before&&e.imageOrder?g("",!0):(d(),o("div",{key:0,class:u(["clll-card__image",{busy:e.busy}]),style:s({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,N)):g("",!0)],6)),y("div",{class:u(`${x}__content`)},[y("div",{class:u(["clll-card__header",{busy:e.busy}])},[e.busy&&(c(T)||e.title||e.byline)?(d(),o("div",q,[c(T)||e.title?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,height:"27px"},null,8,["border-radius"])):g("",!0),e.byline?(d(),h(c(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px"},null,8,["border-radius"])):g("",!0)])):g("",!0),e.onClick||e.href?e.title||c(T)&&(e.onClick||e.href)?(d(),h(c(p),{key:2,"aria-label":e.ariaLabel,color:e.color,href:e.href,target:e.target,"on-click":e.onClick,"data-expand-click-area":""},{default:_(()=>[f(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:_(()=>[b(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)]),_:3},8,["aria-label","color","href","target","on-click"])):g("",!0):(d(),o(m,{key:1},[f(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:_(()=>[b(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)],64)),f(a.$slots,"byline"),e.byline?(d(),h(c(C),{key:3,align:e.align,class:u(`${x}__byline`),color:e.color,type:c(O).Small},{default:_(()=>[b(v(e.byline),1)]),_:1},8,["align","class","color","type"])):g("",!0)],2),y("div",{class:u(`${x}__slot`)},[y("div",{ref:"slot-content",class:u([`${x}__slot-content`,{busy:e.busy}])},[c(H)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"100%"},null,8,["border-radius"])):g("",!0),y("div",null,[f(a.$slots,"default")])],2)],2),y("div",{class:u(["clll-card__footer",{busy:e.busy}])},[c(B)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"20px"},null,8,["border-radius"])):g("",!0),f(a.$slots,"footer")],2)],2),e.image&&e.imageOrder===c(A).After?(d(),o("div",{key:1,class:u(["clll-card__image",{busy:e.busy}]),style:s({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),f(a.$slots,"image"),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,G)):g("",!0)],6)):g("",!0),e.title||!e.onClick&&!e.href?g("",!0):(d(),o("a",{key:2,"aria-label":e.ariaLabel,class:"sr-only",href:e.href,target:e.target,"data-expand-click-area":"",onClick:t[0]||(t[0]=(...a)=>e.onClick&&e.onClick(...a))},null,8,K)),e.onClick&&e.variant!==c(w).Ghost?(d(),o("div",{key:3,class:u(`${x}__hover-elem`)},null,2)):g("",!0)],46,I))}});export{M as _};
2
+ import{defineComponent as e,useSlots as a,ref as t,computed as l,onMounted as i,nextTick as r,createElementBlock as o,openBlock as d,withKeys as n,normalizeStyle as s,normalizeClass as u,unref as c,createCommentVNode as g,createElementVNode as y,createBlock as h,renderSlot as f,Fragment as m,withCtx as _,createTextVNode as b,toDisplayString as v}from"vue";import{_ as $}from"./CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as p}from"./CLLink.vue_vue_type_style_index_0_lang-C9_EwMBi.js";import{_ as k}from"./CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js";import{_ as C}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as w,CLCardTypes as x,CLHeadingTypes as L,CLHeadingLevels as H,CLLinkTarget as R,CLOverflow as T,CLLoading as B,CLColors as S,CLAlign as j,CLOrder as A,CLTextTypes as O}from"../index.js";import{c as W}from"./utils-Dst7nzvj.js";import{useHasSlotContent as E}from"../composables/useHasSlotContent.js";const I=["data-testid","tabindex"],N=["alt","loading","src"],q={key:0,class:"clll-card__header-skeleton"},G=["alt","loading","src"],K=["aria-label","href","target"],M=/* @__PURE__ */e({name:"CLCard",__name:"CLCard",props:{active:{type:Boolean,default:!1},align:{default:j.Left},ariaLabel:{},borderRadius:{},bordered:{type:Boolean,default:!0},busy:{type:Boolean,default:!1},byline:{},color:{default:S.Neutral},compact:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},forwardRef:{},height:{default:"auto"},href:{},image:{},imageAltText:{default:""},imageHeight:{default:"auto"},imageLoading:{default:B.Eager},imageOrder:{},imageWidth:{default:"auto"},onClick:{},overflow:{default:T.Hidden},padded:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},target:{default:R.Self},testId:{default:"clll-card"},title:{},titleHLevel:{default:H.H2},titleType:{default:L.SubSection},truncateTitle:{type:Boolean,default:!1},type:{default:x.Medium},variant:{default:w.Soft},width:{default:"auto"}},setup(e){const x="clll-card",L=e,H=E(),R=a(),T=t(),B=t(),S=["a","button"],j=t(),M=l(()=>[x,`${x}--${L.type}`,`${x}--${L.color}-${L.variant}`,`${x}--${L.variant}`,`${x}--align-${L.align}`,L.rounded?`${x}--rounded`:`${x}--box`,L.bordered?`${x}--bordered`:"",L.borderRadius?`${x}--${L.borderRadius}`:"",L.busy?`${x}--busy`:`${x}--ready`,L.compact?`${x}--compact`:`${x}--no-compact`,L.title||L.byline?`${x}--has-header`:`${x}--no-header`,T.value?`${x}--has-heading`:`${x}--no-heading`,H.value?`${x}--has-content`:`${x}--no-content`,B.value?`${x}--has-footer`:`${x}--no-footer`,L.image?`${x}--has-image`:`${x}--has-no-image`,L.imageOrder?`${x}--image-${L.imageOrder}`:"",L.active?`${x}--active`:`${x}--inactive`,L.onClick?`${x}--has-link`:"",L.truncateTitle?`${x}--has-truncated-title`:"",L.elevated?`${x}--elevated`:"",L.overflow?`${x}--overflow-${L.overflow}`:"",L.padded?"":`${x}--no-padding`]),z=e=>{if(L.busy||!L.onClick)return;const{target:a}=e,t=a?a.closest("a,button"):void 0,l=[...j.value?.querySelectorAll("[data-expand-click-area]")??[]];if(l.length){const a=l[0],i=t?S.includes(t.tagName.toLowerCase()):null;t||a===e.target||i||a.click()}};return i(async()=>{await r(),j.value&&L.forwardRef?.(j.value),T.value=R?.heading,B.value=R?.footer}),(a,t)=>(d(),o("div",{ref_key:"refExpandedArea",ref:j,class:u(c(M)),style:s({...c(W)({color:e.color,variant:e.variant}),width:e.width,height:e.height,overflow:e.overflow}),"data-testid":e.testId,tabindex:e.onClick?0:void 0,onClick:z,onKeyup:n(z,["enter"])},[!e.image||e.imageOrder!==c(A).Before&&e.imageOrder?g("",!0):(d(),o("div",{key:0,class:u(["clll-card__image",{busy:e.busy}]),style:s({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,N)):g("",!0)],6)),y("div",{class:u(`${x}__content`)},[y("div",{class:u(["clll-card__header",{busy:e.busy}])},[e.busy&&(c(T)||e.title||e.byline)?(d(),o("div",q,[c(T)||e.title?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,height:"27px"},null,8,["border-radius"])):g("",!0),e.byline?(d(),h(c(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px"},null,8,["border-radius"])):g("",!0)])):g("",!0),e.onClick||e.href?e.title||c(T)&&(e.onClick||e.href)?(d(),h(c(p),{key:2,"aria-label":e.ariaLabel,color:e.color,href:e.href,target:e.target,"on-click":e.onClick,"data-expand-click-area":""},{default:_(()=>[f(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:_(()=>[b(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)]),_:3},8,["aria-label","color","href","target","on-click"])):g("",!0):(d(),o(m,{key:1},[f(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:_(()=>[b(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)],64)),f(a.$slots,"byline"),e.byline?(d(),h(c(C),{key:3,align:e.align,class:u(`${x}__byline`),color:e.color,type:c(O).Small},{default:_(()=>[b(v(e.byline),1)]),_:1},8,["align","class","color","type"])):g("",!0)],2),y("div",{class:u(`${x}__slot`)},[y("div",{ref:"slot-content",class:u([`${x}__slot-content`,{busy:e.busy}])},[c(H)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"100%"},null,8,["border-radius"])):g("",!0),y("div",null,[f(a.$slots,"default")])],2)],2),y("div",{class:u(["clll-card__footer",{busy:e.busy}])},[c(B)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"20px"},null,8,["border-radius"])):g("",!0),f(a.$slots,"footer")],2)],2),e.image&&e.imageOrder===c(A).After?(d(),o("div",{key:1,class:u(["clll-card__image",{busy:e.busy}]),style:s({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),f(a.$slots,"image"),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,G)):g("",!0)],6)):g("",!0),e.title||!e.onClick&&!e.href?g("",!0):(d(),o("a",{key:2,"aria-label":e.ariaLabel,class:"sr-only",href:e.href,target:e.target,"data-expand-click-area":"",onClick:t[0]||(t[0]=(...a)=>e.onClick&&e.onClick(...a))},null,8,K)),e.onClick&&e.variant!==c(w).Ghost?(d(),o("div",{key:3,class:u(`${x}__hover-elem`)},null,2)):g("",!0)],46,I))}});export{M as _};
@@ -0,0 +1,2 @@
1
+ import '../components/CLIcon/CLIcon.css';
2
+ import{defineComponent as e,ref as t,computed as l,watch as n,onMounted as o,createElementBlock as i,openBlock as a,normalizeStyle as r,normalizeClass as s,unref as c,createElementVNode as d}from"vue";import{CLMode as u,CLColors as m,CLColorVariants as f,CLIconSizes as p}from"../index.js";import{g as h}from"./utils-DVxwAjJ4.js";import{useTheme as v}from"../composables/useTheme.js";import{i as g}from"./helper-C542dSLs.js";const y=({color:e=m.Neutral})=>{const{colors:t,darkMode:l}=v(),n=l.value?u.Dark:u.Light,o=h({color:e,colors:t.value,mode:n,variant:f.Text});return{"--clll-icon-color":o?.textBody??"inherit"}},L=["data-testid"],X=["height","width"],w=["href"],B=/* @__PURE__ */e({name:"CLIcon",__name:"CLIcon",props:{color:{default:m.Neutral},filled:{type:Boolean,default:!1},name:{},size:{default:p.Small},testId:{default:"clll-icon"}},setup(e){const u=e,m="clll-icon",f={[p.Tiny]:20,[p.Small]:24,[p.Medium]:28,[p.Large]:32,[p.XL]:36,[p.XXL]:40,[p.XXXL]:44,[p.XXXXL]:48},h=/* @__PURE__ */new Map,v=t(!1),B=t(!1),I=l(()=>u.filled?u.name.endsWith("-filled")?u.name:u.name.replace("tabler:","tabler:")+"-filled":u.name),x=l(()=>{if(!B.value)return u.name;const e=I.value;return u.filled&&e!==u.name?v.value&&(e=>{if(!g)return!1;if(h.has(e))return h.get(e);const t=document.getElementById("clll-icons");if(!t)return!1;const l=document.getElementById(e),n=null!==l&&t.contains(l);return h.set(e,n),n})(e)?e:u.name:e}),$=l(()=>[m,`${m}--${u.name}`,`${m}--${u.size}`,{[`${m}--filled`]:u.filled&&x.value===I.value}]),b=l(()=>({...y({color:u.color}),width:f[u.size]+4+"px",height:f[u.size]+4+"px"}));n(()=>v.value,e=>{e&&h.clear()});return o(()=>{B.value=!0,(async()=>{if(!g)return;let e=document.getElementById("clll-icons");if(e)v.value=!0;else try{const t=/* #__PURE__ */Object.assign({"/src/icons.svg":()=>import("./icons-6SVrmx7c.js").then(e=>e.default)})["/src/icons.svg"];if(!t)return;const l=await t();if(e=document.getElementById("clll-icons"),e)return void(v.value=!0);const n=document.createElement("div");n.id="clll-icons",n.style.display="none",n.innerHTML=l.toString();const o=()=>{document.body.insertBefore(n,document.body.childNodes[0]),v.value=!0};"loading"===document.readyState?window.addEventListener("DOMContentLoaded",o,{once:!0}):o()}catch(t){console.error("[Callaloo] Failed to load icon sprite:",t)}})()}),(t,l)=>(a(),i("span",{class:s(c($)),"data-testid":e.testId,style:r(c(b))},[(a(),i("svg",{"aria-hidden":"true",class:s(`${m}-sprite`),height:f[e.size],width:f[e.size],viewBox:"0 0 24 24"},[d("use",{href:`#${c(x)}`},null,8,w)],10,X))],14,L))}});export{B as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Navigation/CLLink/CLLink.css';
2
- import{defineComponent as e,computed as l,createElementBlock as r,openBlock as n,normalizeStyle as t,normalizeClass as a,unref as o,renderSlot as i,createBlock as s,createCommentVNode as d}from"vue";import{_ as c}from"./CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{CLMode as u,CLColors as f,CLColorVariants as p,CLLinkTarget as m,CLIconSizes as k,CLIconNames as x}from"../index.js";import{g as h}from"./utils-DVxwAjJ4.js";import{useTheme as b}from"../composables/useTheme.js";const v=({color:e=f.Primary,underline:l=!0})=>{const{colors:r,darkMode:n}=b(),t=n.value?u.Dark:u.Light,a=h({color:e,colors:r.value,mode:t,variant:p.Outline}),o=a?.border,i=a?.textDisabled,s=a?.textBody;return{"--clll-link-text-color":s??"inherit","--clll-link-text-hover":(n.value?a?.borderHover:a?.textDisabled)??"inherit","--clll-link-underline-color":l?o??"transparent":"transparent","--clll-link-underline-hover":l?i??"transparent":"transparent","--clll-link-focus-border":s??"transparent","--clll-link-focus-shadow":a?.shadow??"transparent"}},y=["aria-label","data-testid","href","rel","target"],_=/* @__PURE__ */e({name:"CLLink",__name:"CLLink",props:{ariaLabel:{},color:{default:f.Primary},external:{type:Boolean,default:!1},href:{},onClick:{},rel:{default:"noreferrer noopener"},target:{default:m.Self},testId:{default:"clll-link"},underline:{type:Boolean,default:!0}},setup(e){const u=e,f="clll-link",p=l(()=>[f,`${f}--${u.color}`,`${f}--${u.external?"external":"internal"}`,u.underline?`${f}--underline`:`${f}--nounderline`]);return(l,u)=>(n(),r("a",{"aria-label":e.ariaLabel,class:a(o(p)),"data-testid":e.testId,href:e.href,rel:e.external?e.rel:"",target:e.target,style:t(o(v)({color:e.color,underline:e.underline})),onClick:u[0]||(u[0]=(...l)=>e.onClick&&e.onClick(...l))},[i(l.$slots,"default"),e.external?(n(),s(o(c),{key:0,color:e.color,name:o(x).ExternalLink,size:o(k).Tiny},null,8,["color","name","size"])):d("",!0)],14,y))}});export{_};
2
+ import{defineComponent as e,computed as l,createElementBlock as r,openBlock as n,normalizeStyle as t,normalizeClass as a,unref as o,renderSlot as i,createBlock as s,createCommentVNode as d}from"vue";import{_ as c}from"./CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{CLMode as u,CLColors as f,CLColorVariants as p,CLLinkTarget as m,CLIconSizes as k,CLIconNames as x}from"../index.js";import{g as h}from"./utils-DVxwAjJ4.js";import{useTheme as b}from"../composables/useTheme.js";const v=({color:e=f.Primary,underline:l=!0})=>{const{colors:r,darkMode:n}=b(),t=n.value?u.Dark:u.Light,a=h({color:e,colors:r.value,mode:t,variant:p.Outline}),o=a?.border,i=a?.textDisabled,s=a?.textBody;return{"--clll-link-text-color":s??"inherit","--clll-link-text-hover":(n.value?a?.borderHover:a?.textDisabled)??"inherit","--clll-link-underline-color":l?o??"transparent":"transparent","--clll-link-underline-hover":l?i??"transparent":"transparent","--clll-link-focus-border":s??"transparent","--clll-link-focus-shadow":a?.shadow??"transparent"}},y=["aria-label","data-testid","href","rel","target"],_=/* @__PURE__ */e({name:"CLLink",__name:"CLLink",props:{ariaLabel:{},color:{default:f.Primary},external:{type:Boolean,default:!1},href:{},onClick:{},rel:{default:"noreferrer noopener"},target:{default:m.Self},testId:{default:"clll-link"},underline:{type:Boolean,default:!0}},setup(e){const u=e,f="clll-link",p=l(()=>[f,`${f}--${u.color}`,`${f}--${u.external?"external":"internal"}`,u.underline?`${f}--underline`:`${f}--nounderline`]);return(l,u)=>(n(),r("a",{"aria-label":e.ariaLabel,class:a(o(p)),"data-testid":e.testId,href:e.href,rel:e.external?e.rel:"",target:e.target,style:t(o(v)({color:e.color,underline:e.underline})),onClick:u[0]||(u[0]=(...l)=>e.onClick&&e.onClick(...l))},[i(l.$slots,"default"),e.external?(n(),s(o(c),{key:0,color:e.color,name:o(x).ExternalLink,size:o(k).Tiny},null,8,["color","name","size"])):d("",!0)],14,y))}});export{_};
@@ -1,2 +1,2 @@
1
1
  import '../components/Modals/CLModal/CLModal.css';
2
- import{defineComponent as e,useTemplateRef as o,useSlots as t,ref as l,computed as a,watch as n,onMounted as s,onBeforeUnmount as d,createElementBlock as i,createCommentVNode as r,openBlock as c,normalizeStyle as _,normalizeClass as u,unref as m,createElementVNode as v,createBlock as f,renderSlot as y,withCtx as p,createTextVNode as b,toDisplayString as $}from"vue";import{_ as h}from"./CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as w}from"./CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{CLMode as x,CLColors as I,CLColorVariants as z,CLBorderRadius as g,CLIconSizes as L,CLIconNames as k,CLHeadingTypes as C}from"../index.js";import{g as B}from"./utils-DVxwAjJ4.js";import{useTheme as j}from"../composables/useTheme.js";import{useEsc as T}from"../composables/useEsc.js";import{c as E,i as O}from"./helper-C542dSLs.js";const R=()=>{const{colors:e,darkMode:o}=j(),t=o.value?x.Dark:x.Light,l=B({color:I.Neutral,colors:e.value,mode:t,variant:z.Solid}),a=o.value?"black":"white";return{"--clll-modal-overlay-bg":l?.bg??"transparent","--clll-modal-content-bg":a,"--clll-modal-theme-radius":"var(--clll-default-radius)"}},S=["id","data-testid"],M=["aria-labelledby"],D=/* @__PURE__ */e({name:"CLModal",__name:"CLModal",props:{borderRadius:{default:void 0},close:{type:Boolean,default:!0},closeBorderRadius:{default:g.Full},dismissible:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},maxWidth:{default:"640px"},modalId:{},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},testId:{default:"clll-modal"},title:{default:void 0},zIndex:{default:100}},emits:["modal-open","modal-close"],setup(e,{emit:x}){const g=x,B=o("modal-window"),j=t(),D=e,F="clll-modal",H="clll-prevent-scroll",N=l(),W=()=>{O&&window?.document.body.classList.add(H)},q=()=>{O&&window?.document.body.classList.remove(H)},A=a(()=>[F]),G=a(()=>[`${F}__window`,D.fullscreen?`${F}__window--fullscreen`:""]),J=a(()=>[`${F}__content`,D.borderRadius?`${F}__content--${D.borderRadius}`:"",D.close?`${F}__content--has-close-button`:`${F}__content--has-no-close-button`,j.body?`${F}__content--has-body`:`${F}__content--has-no-body`,j.footer?`${F}__content--has-footer`:`${F}__content--has-no-footer`,j.header||D.title?`${F}__content--has-header`:`${F}__content--has-no-header`,D.title?`${F}__content--has-title`:`${F}__content--has-no-title`]),K=a(()=>"auto"===D.zIndex||E(D.zIndex)?D.zIndex:D.zIndex.toString()),P=a(()=>{if("auto"===D.zIndex)return D.zIndex;return((E(D.zIndex)?parseInt(D.zIndex,10):D.zIndex)+100).toString()}),Q=e=>{try{(e=>{try{const o=e?.target,t=B.value;return!(!O||!t||t.contains(o))||void 0}catch(o){return void console.error(o)}})(e)&&(O&&window.removeEventListener("mousedown",Q),X())}catch(o){console.error(o)}},U=()=>{O&&window.removeEventListener("mousedown",Q)},V=()=>{O&&(N.value&&O&&window.clearTimeout(N.value),U(),q())},X=()=>{D.isOpen&&(D.onClose?.(),V())};n(D,e=>{e.isOpen?(g("modal-open"),W(),B.value&&B.value.focus(),O&&e.dismissible&&(U(),N.value=window.setTimeout(()=>{window.addEventListener("mousedown",Q)},100))):(B.value&&B.value.blur(),q(),U(),N.value&&O&&window.clearTimeout(N.value),g("modal-close"))}),s(()=>{D.isOpen&&O&&(W(),B.value&&B.value.focus())});const{clearEventListeners:Y}=T({escHandler:D.dismissible?X:void 0});return d(()=>{V(),Y()}),(o,t)=>e.isOpen?(c(),i("div",{key:0,id:e.modalId,class:u(m(A)),"data-testid":e.testId,style:_({...m(R)(),zIndex:m(K)})},[v("div",{class:u(m(G)),style:_({zIndex:m(P)})},[v("div",{ref:"modal-window","aria-modal":"true","aria-labelledby":`${F}__content__header__title`,class:u(m(J)),role:"dialog",tabindex:-1,style:_({"--clll-modal-max-width":e.maxWidth})},[v("div",{class:u(`${F}__close-button`)},[e.onClose&&e.close?(c(),f(m(h),{key:0,"aria-label":"Close modal","border-radius":e.closeBorderRadius,color:m(I).Neutral,"icon-before":m(k).Delete,"icon-size":m(L).Tiny,"on-click":e.onClose,"test-id":`${F}__close-button`,variant:m(z).Text},null,8,["border-radius","color","icon-before","icon-size","on-click","test-id","variant"])):r("",!0)],2),v("div",{class:u(`${F}__content__header`)},[v("div",{class:u(`${F}__content__title`)},[v("div",{class:u(`${F}__content__header__container`)},[e.title?(c(),f(m(w),{key:0,id:`${F}__content__header__title`,class:u(`${F}__content__header__title`),type:m(C).Section},{default:p(()=>[b($(e.title),1)]),_:1},8,["id","class","type"])):r("",!0),y(o.$slots,"header")],2)],2)],2),v("div",{class:u(`${F}__content__scroller`)},[v("div",{class:u(`${F}__content__body`)},[y(o.$slots,"body")],2)],2),v("div",{class:u(`${F}__content__footer`)},[y(o.$slots,"footer")],2)],14,M)],6),e.overlay?(c(),i("div",{key:0,ref:"overlay-ref",class:u(`${F}__overlay`),style:_({zIndex:e.zIndex})},null,6)):r("",!0)],14,S)):r("",!0)}});export{D as _};
2
+ import{defineComponent as e,useTemplateRef as o,useSlots as t,ref as l,computed as a,watch as n,onMounted as s,onBeforeUnmount as d,createElementBlock as i,createCommentVNode as r,openBlock as c,normalizeStyle as _,normalizeClass as u,unref as m,createElementVNode as v,createBlock as f,renderSlot as y,withCtx as p,createTextVNode as b,toDisplayString as $}from"vue";import{_ as h}from"./CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as w}from"./CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{CLMode as x,CLColors as I,CLColorVariants as z,CLBorderRadius as g,CLIconSizes as L,CLIconNames as k,CLHeadingTypes as C}from"../index.js";import{g as B}from"./utils-DVxwAjJ4.js";import{useTheme as j}from"../composables/useTheme.js";import{useEsc as T}from"../composables/useEsc.js";import{c as E,i as O}from"./helper-C542dSLs.js";const R=()=>{const{colors:e,darkMode:o}=j(),t=o.value?x.Dark:x.Light,l=B({color:I.Neutral,colors:e.value,mode:t,variant:z.Solid}),a=o.value?"black":"white";return{"--clll-modal-overlay-bg":l?.bg??"transparent","--clll-modal-content-bg":a,"--clll-modal-theme-radius":"var(--clll-default-radius)"}},S=["id","data-testid"],M=["aria-labelledby"],D=/* @__PURE__ */e({name:"CLModal",__name:"CLModal",props:{borderRadius:{default:void 0},close:{type:Boolean,default:!0},closeBorderRadius:{default:g.Full},dismissible:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},maxWidth:{default:"640px"},modalId:{},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},testId:{default:"clll-modal"},title:{default:void 0},zIndex:{default:100}},emits:["modal-open","modal-close"],setup(e,{emit:x}){const g=x,B=o("modal-window"),j=t(),D=e,F="clll-modal",H="clll-prevent-scroll",N=l(),W=()=>{O&&window?.document.body.classList.add(H)},q=()=>{O&&window?.document.body.classList.remove(H)},A=a(()=>[F]),G=a(()=>[`${F}__window`,D.fullscreen?`${F}__window--fullscreen`:""]),J=a(()=>[`${F}__content`,D.borderRadius?`${F}__content--${D.borderRadius}`:"",D.close?`${F}__content--has-close-button`:`${F}__content--has-no-close-button`,j.body?`${F}__content--has-body`:`${F}__content--has-no-body`,j.footer?`${F}__content--has-footer`:`${F}__content--has-no-footer`,j.header||D.title?`${F}__content--has-header`:`${F}__content--has-no-header`,D.title?`${F}__content--has-title`:`${F}__content--has-no-title`]),K=a(()=>"auto"===D.zIndex||E(D.zIndex)?D.zIndex:D.zIndex.toString()),P=a(()=>{if("auto"===D.zIndex)return D.zIndex;return((E(D.zIndex)?parseInt(D.zIndex,10):D.zIndex)+100).toString()}),Q=e=>{try{(e=>{try{const o=e?.target,t=B.value;return!(!O||!t||t.contains(o))||void 0}catch(o){return void console.error(o)}})(e)&&(O&&window.removeEventListener("mousedown",Q),X())}catch(o){console.error(o)}},U=()=>{O&&window.removeEventListener("mousedown",Q)},V=()=>{O&&(N.value&&O&&window.clearTimeout(N.value),U(),q())},X=()=>{D.isOpen&&(D.onClose?.(),V())};n(D,e=>{e.isOpen?(g("modal-open"),W(),B.value&&B.value.focus(),O&&e.dismissible&&(U(),N.value=window.setTimeout(()=>{window.addEventListener("mousedown",Q)},100))):(B.value&&B.value.blur(),q(),U(),N.value&&O&&window.clearTimeout(N.value),g("modal-close"))}),s(()=>{D.isOpen&&O&&(W(),B.value&&B.value.focus())});const{clearEventListeners:Y}=T({escHandler:D.dismissible?X:void 0});return d(()=>{V(),Y()}),(o,t)=>e.isOpen?(c(),i("div",{key:0,id:e.modalId,class:u(m(A)),"data-testid":e.testId,style:_({...m(R)(),zIndex:m(K)})},[v("div",{class:u(m(G)),style:_({zIndex:m(P)})},[v("div",{ref:"modal-window","aria-modal":"true","aria-labelledby":`${F}__content__header__title`,class:u(m(J)),role:"dialog",tabindex:-1,style:_({"--clll-modal-max-width":e.maxWidth})},[v("div",{class:u(`${F}__close-button`)},[e.onClose&&e.close?(c(),f(m(h),{key:0,"aria-label":"Close modal","border-radius":e.closeBorderRadius,color:m(I).Neutral,"icon-before":m(k).Delete,"icon-size":m(L).Tiny,"on-click":e.onClose,"test-id":`${F}__close-button`,variant:m(z).Text},null,8,["border-radius","color","icon-before","icon-size","on-click","test-id","variant"])):r("",!0)],2),v("div",{class:u(`${F}__content__header`)},[v("div",{class:u(`${F}__content__title`)},[v("div",{class:u(`${F}__content__header__container`)},[e.title?(c(),f(m(w),{key:0,id:`${F}__content__header__title`,class:u(`${F}__content__header__title`),type:m(C).Section},{default:p(()=>[b($(e.title),1)]),_:1},8,["id","class","type"])):r("",!0),y(o.$slots,"header")],2)],2)],2),v("div",{class:u(`${F}__content__scroller`)},[v("div",{class:u(`${F}__content__body`)},[y(o.$slots,"body")],2)],2),v("div",{class:u(`${F}__content__footer`)},[y(o.$slots,"footer")],2)],14,M)],6),e.overlay?(c(),i("div",{key:0,ref:"overlay-ref",class:u(`${F}__overlay`),style:_({zIndex:e.zIndex})},null,6)):r("",!0)],14,S)):r("",!0)}});export{D as _};
@@ -1 +1 @@
1
- import{defineComponent as e,createBlock as t,openBlock as l,unref as r,withCtx as a,renderSlot as i}from"vue";import{_ as n}from"./CLLink.vue_vue_type_style_index_0_lang-CCyY39MJ.js";import{CLColors as o}from"../index.js";const d=/* @__PURE__ */e({name:"CLNavLink",__name:"CLNavLink",props:{ariaLabel:{},color:{default:o.Neutral},external:{type:Boolean,default:!1},href:{},id:{},onClick:{},rel:{default:"noreferrer noopener"},target:{},testId:{default:"clll-navlink"}},emits:["click"],setup(e,{emit:o}){const d=e,c=o,s=e=>{d.onClick&&d.onClick(e),c("click",e)};return(o,d)=>(l(),t(r(n),{id:e.id,"aria-label":e.ariaLabel,color:e.color,"data-testid":e.testId,external:e.external,href:e.href,rel:e.rel,target:e.target,underline:!e.onClick,onClick:s},{default:a(()=>[i(o.$slots,"default")]),_:3},8,["id","aria-label","color","data-testid","external","href","rel","target","underline"]))}});export{d as _};
1
+ import{defineComponent as e,createBlock as t,openBlock as l,unref as r,withCtx as a,renderSlot as i}from"vue";import{_ as n}from"./CLLink.vue_vue_type_style_index_0_lang-C9_EwMBi.js";import{CLColors as o}from"../index.js";const d=/* @__PURE__ */e({name:"CLNavLink",__name:"CLNavLink",props:{ariaLabel:{},color:{default:o.Neutral},external:{type:Boolean,default:!1},href:{},id:{},onClick:{},rel:{default:"noreferrer noopener"},target:{},testId:{default:"clll-navlink"}},emits:["click"],setup(e,{emit:o}){const d=e,c=o,s=e=>{d.onClick&&d.onClick(e),c("click",e)};return(o,d)=>(l(),t(r(n),{id:e.id,"aria-label":e.ariaLabel,color:e.color,"data-testid":e.testId,external:e.external,href:e.href,rel:e.rel,target:e.target,underline:!e.onClick,onClick:s},{default:a(()=>[i(o.$slots,"default")]),_:3},8,["id","aria-label","color","data-testid","external","href","rel","target","underline"]))}});export{d as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Indicators/CLPill/CLPill.css';
2
- import{defineComponent as l,computed as o,createElementBlock as e,openBlock as n,Fragment as a,createCommentVNode as t,createBlock as i,normalizeStyle as c,normalizeClass as s,unref as d,createElementVNode as r,toDisplayString as u,withCtx as _}from"vue";import{_ as p}from"./CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as v}from"./CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{CLColorVariants as $,CLColors as f,CLIconSizes as y}from"../index.js";import{p as m}from"./utils-CCWSWRuR.js";const k=["data-testid"],C=/* @__PURE__ */l({name:"CLPill",__name:"CLPill",props:{color:{default:f.Neutral},count:{},elevated:{type:Boolean,default:!1},icon:{},iconFilled:{type:Boolean,default:!1},label:{},onClick:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-pill"},variant:{default:$.Soft}},setup(l){const $=l,f="clll-pill",C=o(()=>[f,`${f}--${$.color}--${$.variant}`,$.count?`${f}--has-count`:"",$.elevated?`${f}--elevated`:"",$.icon?`${f}--has-icon`:`${f}--has-noicon`,$.rounded?`${f}--rounded`:""]),b=o(()=>[f,`${f}--clickable`,`${f}--${$.color}--${$.variant}`,$.count?`${f}--has-count`:"",$.icon?`${f}--has-icon`:`${f}--has-noicon`,$.rounded?`${f}--rounded`:""]);return(o,$)=>(n(),e(a,null,[l.onClick?t("",!0):(n(),e("div",{key:0,class:s(d(C)),"data-testid":l.testId,style:c(d(m)({color:l.color,variant:l.variant}))},[l.icon?(n(),i(d(v),{key:0,filled:l.iconFilled,name:l.icon,size:d(y).Tiny},null,8,["filled","name","size"])):t("",!0),r("span",{class:s(`${f}__label`)},u(l.label),3),l.count?(n(),e("span",{key:1,class:s(`${f}__count`)},u(l.count),3)):t("",!0)],14,k)),l.onClick?(n(),i(d(p),{key:1,color:l.color,"on-click":l.onClick,variant:l.variant,pill:"",rounded:l.rounded},{default:_(()=>[r("div",{class:s(d(b)),style:c(d(m)({color:l.color,variant:l.variant}))},[l.icon?(n(),i(d(v),{key:0,filled:l.iconFilled,name:l.icon,size:d(y).Tiny},null,8,["filled","name","size"])):t("",!0),r("span",{class:s(`${f}__label`)},u(l.label),3),l.count?(n(),e("span",{key:1,class:s(`${f}__count`)},u(l.count),3)):t("",!0)],6)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0)],64))}});export{C as _};
2
+ import{defineComponent as l,computed as o,createElementBlock as e,openBlock as n,Fragment as a,createCommentVNode as t,createBlock as i,normalizeStyle as c,normalizeClass as s,unref as d,createElementVNode as r,toDisplayString as u,withCtx as _}from"vue";import{_ as p}from"./CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as v}from"./CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{CLColorVariants as $,CLColors as f,CLIconSizes as y}from"../index.js";import{p as m}from"./utils-CCWSWRuR.js";const k=["data-testid"],C=/* @__PURE__ */l({name:"CLPill",__name:"CLPill",props:{color:{default:f.Neutral},count:{},elevated:{type:Boolean,default:!1},icon:{},iconFilled:{type:Boolean,default:!1},label:{},onClick:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-pill"},variant:{default:$.Soft}},setup(l){const $=l,f="clll-pill",C=o(()=>[f,`${f}--${$.color}--${$.variant}`,$.count?`${f}--has-count`:"",$.elevated?`${f}--elevated`:"",$.icon?`${f}--has-icon`:`${f}--has-noicon`,$.rounded?`${f}--rounded`:""]),b=o(()=>[f,`${f}--clickable`,`${f}--${$.color}--${$.variant}`,$.count?`${f}--has-count`:"",$.icon?`${f}--has-icon`:`${f}--has-noicon`,$.rounded?`${f}--rounded`:""]);return(o,$)=>(n(),e(a,null,[l.onClick?t("",!0):(n(),e("div",{key:0,class:s(d(C)),"data-testid":l.testId,style:c(d(m)({color:l.color,variant:l.variant}))},[l.icon?(n(),i(d(v),{key:0,filled:l.iconFilled,name:l.icon,size:d(y).Tiny},null,8,["filled","name","size"])):t("",!0),r("span",{class:s(`${f}__label`)},u(l.label),3),l.count?(n(),e("span",{key:1,class:s(`${f}__count`)},u(l.count),3)):t("",!0)],14,k)),l.onClick?(n(),i(d(p),{key:1,color:l.color,"on-click":l.onClick,variant:l.variant,pill:"",rounded:l.rounded},{default:_(()=>[r("div",{class:s(d(b)),style:c(d(m)({color:l.color,variant:l.variant}))},[l.icon?(n(),i(d(v),{key:0,filled:l.iconFilled,name:l.icon,size:d(y).Tiny},null,8,["filled","name","size"])):t("",!0),r("span",{class:s(`${f}__label`)},u(l.label),3),l.count?(n(),e("span",{key:1,class:s(`${f}__count`)},u(l.count),3)):t("",!0)],6)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0)],64))}});export{C as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Popups/CLToast/CLToast.css';
2
- import{defineComponent as e,ref as t,computed as o,watch as l,onMounted as s,onUnmounted as a,onBeforeUnmount as i,createElementBlock as r,openBlock as u,normalizeStyle as n,normalizeClass as d,unref as c,createElementVNode as m,createCommentVNode as v,createVNode as _,createBlock as b,withCtx as p,createTextVNode as f,toDisplayString as y}from"vue";import{_ as h}from"./CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as g}from"./CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{_ as $}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as T,CLMode as x,CLColors as L,CLToastPosition as k,CLIconSizes as z,CLTextTypes as D,CLSizes as j,CLIconNames as M}from"../index.js";import{i as w,g as B,a as R}from"./helper-C542dSLs.js";import{useEsc as S}from"../composables/useEsc.js";import{g as C}from"./utils-DVxwAjJ4.js";import{useTheme as F}from"../composables/useTheme.js";const A=({color:e})=>{const{colors:t,darkMode:o}=F(),l=C({color:e,colors:t.value,mode:(o.value,x.Light),variant:T.Soft}),s=C({color:L.Neutral,colors:t.value,mode:o.value?x.Light:x.Dark,variant:T.Text});return{"--clll-toast-bg-color":o.value?"white":"#322F35","--clll-toast-text-color":s?.textBody,"--clll-toast-action-button-text-color":l?.text,"--clll-toast-action-button-bg-color":l?.bg,"--clll-toast-action-button-hover-color":l?.hover,"--clll-toast-dismiss-button-text-color":s?.text,"--clll-toast-dismiss-button-bg-color":s?.bg,"--clll-toast-dismiss-button-hover-color":s?.hover,"--clll-toast-icon-bg":l?.bg,"--clll-toast-icon-color":l?.text,"--clll-toast-theme-radius":"var(--clll-default-radius)"}},E=["data-testid"],I=300,N="clll-toast",H=/* @__PURE__ */e({name:"CLToast",__name:"CLToast",props:{actionLabel:{},borderRadius:{},color:{default:L.Secondary},dismissTimer:{default:5},icon:{},iconSize:{default:z.Small},iconFilled:{type:Boolean,default:!1},message:{},onAction:{},onDismiss:{},position:{default:k.TopRight},rounded:{type:Boolean,default:!0},testId:{default:"clll-toast"},title:{},width:{default:"24rem"}},setup(e){const x=e,k=t(),C=t(!1),F=t(),H=t(0),q=t(!1),G=t(null),J=t(0),K=t(0),O=t(!1),P=o(()=>[N,x.borderRadius?`${N}--${x.borderRadius}`:"",x.dismissTimer?`${N}--has-timer`:"",x.icon?`${N}--has-icon`:"",x.message&&!x.title?`${N}--has-messageonly`:"",C.value?`${N}--mounted`:"",x.onAction&&x.actionLabel?`${N}--has-action`:"",x.rounded?`${N}--rounded`:`${N}--box`,x.title&&!x.message?`${N}--has-titleonly`:"",x.title&&x.message?`${N}--has-titleandmessage`:"",`${N}--${x.position}`]),Q=()=>{null!==G.value&&(clearTimeout(G.value),G.value=null),F.value?.stop()},U=()=>{x.dismissTimer&&!q.value&&(Q(),J.value=Date.now(),K.value=1e3*x.dismissTimer,O.value=!1,G.value=setTimeout(()=>{O.value||q.value||Y()},K.value))},V=()=>{if(!x.dismissTimer||O.value||q.value)return;O.value=!0;const e=Date.now()-J.value;K.value=Math.max(0,K.value-e),Q()},W=()=>{x.dismissTimer&&O.value&&!q.value&&(O.value=!1,J.value=Date.now(),G.value=setTimeout(()=>{O.value||q.value||Y()},K.value))},X=()=>{document.hidden?V():W()},Y=()=>{q.value||(q.value=!0,C.value=!1,Q(),F.value&&F.value.start(I,e=>{Math.min(e,I)===I&&(F.value?.stop(),x.onDismiss?.())}),Z())};l(()=>x.dismissTimer,()=>{Q(),q.value=!1,x.dismissTimer&&x.dismissTimer>0&&U()}),s(()=>{w&&(H.value=B()+1,F.value||(F.value=R(),F.value.start(100,e=>{100===Math.min(e,100)&&(F.value?.stop(),C.value=!0,x.dismissTimer&&F.value?.start(I,e=>{Math.min(e,I)===I&&(F.value?.stop(),U())}))})),document.addEventListener("visibilitychange",X))}),a(()=>{w&&(Q(),F.value=void 0,document.removeEventListener("visibilitychange",X)),C.value=!1,q.value||(q.value=!0,x.onDismiss?.())});const{clearEventListeners:Z}=S({escHandler:Y});return i(()=>{Z()}),(t,o)=>(u(),r("output",{ref_key:"elem",ref:k,class:d(c(P)),"data-testid":e.testId,style:n({zIndex:c(H),"--clll-toast-width":e.width,...c(A)({color:e.color})}),onMouseenter:V,onMouseleave:W,onFocusin:V,onFocusout:W},[m("div",{class:d(`${N}__body`)},[m("div",{class:d(`${N}__content`)},[e.icon?(u(),r("div",{key:0,class:d(`${N}__icon`)},[_(c(g),{filled:e.iconFilled,name:e.icon,size:e.iconSize},null,8,["filled","name","size"])],2)):v("",!0),m("div",{class:d(`${N}__text`)},[e.title?(u(),b(c($),{key:0,color:c(L).Neutral,"test-id":`${N}__title`,type:c(D).Body,bold:""},{default:p(()=>[f(y(e.title),1)]),_:1},8,["color","test-id","type"])):v("",!0),e.message?(u(),b(c($),{key:1,color:c(L).Neutral,"test-id":`${N}__message`,type:e.title?c(D).Medium:c(D).Body},{default:p(()=>[f(y(e.message),1)]),_:1},8,["color","test-id","type"])):v("",!0)],2),e.onAction&&e.actionLabel?(u(),r("div",{key:1,class:d(`${N}__action-button`)},[_(c(h),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${N}__action-button`,variant:c(T).Soft},{default:p(()=>[f(y(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):v("",!0)],2),m("div",{class:d(`${N}__dismiss-button`)},[_(c(h),{"aria-label":"Dismiss toast",color:c(L).Neutral,"border-radius":e.borderRadius,"icon-before":c(M).Delete,"icon-size":c(z).Tiny,"on-click":Y,size:c(j).Tiny,"test-id":`${N}__dismiss-button`,variant:c(T).Text},null,8,["color","border-radius","icon-before","icon-size","size","test-id","variant"])],2)],2)],46,E))}});export{H as _};
2
+ import{defineComponent as e,ref as t,computed as o,watch as l,onMounted as s,onUnmounted as a,onBeforeUnmount as i,createElementBlock as r,openBlock as u,normalizeStyle as n,normalizeClass as d,unref as c,createElementVNode as m,createCommentVNode as v,createVNode as _,createBlock as b,withCtx as p,createTextVNode as f,toDisplayString as y}from"vue";import{_ as h}from"./CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as g}from"./CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{_ as $}from"./CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as T,CLMode as x,CLColors as L,CLToastPosition as k,CLIconSizes as z,CLTextTypes as D,CLSizes as j,CLIconNames as M}from"../index.js";import{i as w,g as B,a as R}from"./helper-C542dSLs.js";import{useEsc as S}from"../composables/useEsc.js";import{g as C}from"./utils-DVxwAjJ4.js";import{useTheme as F}from"../composables/useTheme.js";const A=({color:e})=>{const{colors:t,darkMode:o}=F(),l=C({color:e,colors:t.value,mode:(o.value,x.Light),variant:T.Soft}),s=C({color:L.Neutral,colors:t.value,mode:o.value?x.Light:x.Dark,variant:T.Text});return{"--clll-toast-bg-color":o.value?"white":"#322F35","--clll-toast-text-color":s?.textBody,"--clll-toast-action-button-text-color":l?.text,"--clll-toast-action-button-bg-color":l?.bg,"--clll-toast-action-button-hover-color":l?.hover,"--clll-toast-dismiss-button-text-color":s?.text,"--clll-toast-dismiss-button-bg-color":s?.bg,"--clll-toast-dismiss-button-hover-color":s?.hover,"--clll-toast-icon-bg":l?.bg,"--clll-toast-icon-color":l?.text,"--clll-toast-theme-radius":"var(--clll-default-radius)"}},E=["data-testid"],I=300,N="clll-toast",H=/* @__PURE__ */e({name:"CLToast",__name:"CLToast",props:{actionLabel:{},borderRadius:{},color:{default:L.Secondary},dismissTimer:{default:5},icon:{},iconSize:{default:z.Small},iconFilled:{type:Boolean,default:!1},message:{},onAction:{},onDismiss:{},position:{default:k.TopRight},rounded:{type:Boolean,default:!0},testId:{default:"clll-toast"},title:{},width:{default:"24rem"}},setup(e){const x=e,k=t(),C=t(!1),F=t(),H=t(0),q=t(!1),G=t(null),J=t(0),K=t(0),O=t(!1),P=o(()=>[N,x.borderRadius?`${N}--${x.borderRadius}`:"",x.dismissTimer?`${N}--has-timer`:"",x.icon?`${N}--has-icon`:"",x.message&&!x.title?`${N}--has-messageonly`:"",C.value?`${N}--mounted`:"",x.onAction&&x.actionLabel?`${N}--has-action`:"",x.rounded?`${N}--rounded`:`${N}--box`,x.title&&!x.message?`${N}--has-titleonly`:"",x.title&&x.message?`${N}--has-titleandmessage`:"",`${N}--${x.position}`]),Q=()=>{null!==G.value&&(clearTimeout(G.value),G.value=null),F.value?.stop()},U=()=>{x.dismissTimer&&!q.value&&(Q(),J.value=Date.now(),K.value=1e3*x.dismissTimer,O.value=!1,G.value=setTimeout(()=>{O.value||q.value||Y()},K.value))},V=()=>{if(!x.dismissTimer||O.value||q.value)return;O.value=!0;const e=Date.now()-J.value;K.value=Math.max(0,K.value-e),Q()},W=()=>{x.dismissTimer&&O.value&&!q.value&&(O.value=!1,J.value=Date.now(),G.value=setTimeout(()=>{O.value||q.value||Y()},K.value))},X=()=>{document.hidden?V():W()},Y=()=>{q.value||(q.value=!0,C.value=!1,Q(),F.value&&F.value.start(I,e=>{Math.min(e,I)===I&&(F.value?.stop(),x.onDismiss?.())}),Z())};l(()=>x.dismissTimer,()=>{Q(),q.value=!1,x.dismissTimer&&x.dismissTimer>0&&U()}),s(()=>{w&&(H.value=B()+1,F.value||(F.value=R(),F.value.start(100,e=>{100===Math.min(e,100)&&(F.value?.stop(),C.value=!0,x.dismissTimer&&F.value?.start(I,e=>{Math.min(e,I)===I&&(F.value?.stop(),U())}))})),document.addEventListener("visibilitychange",X))}),a(()=>{w&&(Q(),F.value=void 0,document.removeEventListener("visibilitychange",X)),C.value=!1,q.value||(q.value=!0,x.onDismiss?.())});const{clearEventListeners:Z}=S({escHandler:Y});return i(()=>{Z()}),(t,o)=>(u(),r("output",{ref_key:"elem",ref:k,class:d(c(P)),"data-testid":e.testId,style:n({zIndex:c(H),"--clll-toast-width":e.width,...c(A)({color:e.color})}),onMouseenter:V,onMouseleave:W,onFocusin:V,onFocusout:W},[m("div",{class:d(`${N}__body`)},[m("div",{class:d(`${N}__content`)},[e.icon?(u(),r("div",{key:0,class:d(`${N}__icon`)},[_(c(g),{filled:e.iconFilled,name:e.icon,size:e.iconSize},null,8,["filled","name","size"])],2)):v("",!0),m("div",{class:d(`${N}__text`)},[e.title?(u(),b(c($),{key:0,color:c(L).Neutral,"test-id":`${N}__title`,type:c(D).Body,bold:""},{default:p(()=>[f(y(e.title),1)]),_:1},8,["color","test-id","type"])):v("",!0),e.message?(u(),b(c($),{key:1,color:c(L).Neutral,"test-id":`${N}__message`,type:e.title?c(D).Medium:c(D).Body},{default:p(()=>[f(y(e.message),1)]),_:1},8,["color","test-id","type"])):v("",!0)],2),e.onAction&&e.actionLabel?(u(),r("div",{key:1,class:d(`${N}__action-button`)},[_(c(h),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${N}__action-button`,variant:c(T).Soft},{default:p(()=>[f(y(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):v("",!0)],2),m("div",{class:d(`${N}__dismiss-button`)},[_(c(h),{"aria-label":"Dismiss toast",color:c(L).Neutral,"border-radius":e.borderRadius,"icon-before":c(M).Delete,"icon-size":c(z).Tiny,"on-click":Y,size:c(j).Tiny,"test-id":`${N}__dismiss-button`,variant:c(T).Text},null,8,["color","border-radius","icon-before","icon-size","size","test-id","variant"])],2)],2)],46,E))}});export{H as _};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLButton.css';
3
- import{_ as t}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";export{t as CLButton,t as default};
3
+ import{_ as t}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";export{t as CLButton,t as default};
@@ -1,3 +1,3 @@
1
1
  import '../../assets/core.css';
2
2
  import './CLIcon.css';
3
- import{_ as e}from"../../chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";export{e as CLIcon,e as default};
3
+ import{_ as e}from"../../chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";export{e as CLIcon,e as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLCard.css';
3
- import{_ as a}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-DPQxSLkQ.js";export{a as CLCard,a as default};
3
+ import{_ as a}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BGKjh5vA.js";export{a as CLCard,a as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLCarousel.css';
3
- import{defineComponent as e,computed as a,createElementBlock as l,openBlock as o,Fragment as i,createCommentVNode as t,unref as n,normalizeClass as s,renderList as r,createBlock as c,createElementVNode as v,createVNode as d,withCtx as u,createTextVNode as p,toDisplayString as f,useCssVars as g,ref as h,onMounted as b,nextTick as m,onUnmounted as _,watch as w,renderSlot as y}from"vue";import{_ as x}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as T}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLPaginationType as $,CLColorVariants as k,CLSizes as L,CLIconSizes as z,CLIconNames as P,CLTextTypes as C,CLAlign as S,CLOrder as B,CLColors as E}from"../../../index.js";import{i as M,d as I,e as N}from"../../../chunks/helper-C542dSLs.js";import{useHasSlotContent as A}from"../../../composables/useHasSlotContent.js";const W=/* @__PURE__ */e({name:"CLCarouselNavigation",__name:"CLCarouselNavigation",props:{color:{},currentPage:{},enabled:{type:Boolean},gotoPage:{},moreAriaLabel:{default:"Navigate to page to see more results"},moreLabel:{},nextPageEnabled:{type:Boolean},paginationType:{},prefix:{},prevPageEnabled:{type:Boolean},showMore:{},showNextItems:{},showPrevItems:{},totalPages:{},variant:{}},setup(e){const g=e,h=a(()=>[`${g.prefix}__dots-container`]),b=a(()=>[`${g.prefix}__arrows-container`]),m=a(()=>[`${g.prefix}__numbered-container`]),_=a(()=>[`${g.prefix}__inline-container`]),w=a(()=>[`${g.prefix}__prev-page`]),y=a(()=>[`${g.prefix}__next-page`]),B=a(()=>[`${g.prefix}__page-indicator`]),E=a(()=>[`${g.prefix}__show-more`]),M=e=>g.currentPage===e,I=a(()=>!g.enabled||!g.prevPageEnabled),N=a(()=>!g.enabled||!g.nextPageEnabled);return(a,g)=>(o(),l(i,null,[e.paginationType===n($).Dots?(o(),l("div",{key:0,class:s(n(h))},[(o(!0),l(i,null,r(e.totalPages,a=>(o(),c(n(x),{key:`dot-${a}`,"aria-label":`Show page ${a}`,color:e.color,disabled:M(a),height:"0.75rem","on-click":()=>e.gotoPage(a),width:"0.75rem",variant:M(a)?n(k).Outline:e.variant,wrap:""},null,8,["aria-label","color","disabled","on-click","variant"]))),128))],2)):t("",!0),e.paginationType===n($).Numbered?(o(),l("div",{key:1,class:s(n(m))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides",color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(B))},[d(n(T),{type:n(C).Small},{default:u(()=>[p(f(e.currentPage)+" / "+f(e.totalPages),1)]),_:1},8,["type"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides",color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),e.showMore?(o(),l("div",{key:0,class:s(n(E))},[d(n(x),{"aria-label":e.moreAriaLabel,color:e.color,size:n(L).Small,"on-click":e.showMore,variant:e.variant},{default:u(()=>[p(f(e.moreLabel),1)]),_:1},8,["aria-label","color","size","on-click","variant"])],2)):t("",!0)],2)):t("",!0),e.paginationType===n($).Arrows?(o(),l("div",{key:2,class:s(n(b))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides",color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides",color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0),e.paginationType===n($).Inline?(o(),l("div",{key:3,class:s(n(_))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides","align-content":n(S).Center,color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Small,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant,width:"30px",height:"30px",wrap:""},null,8,["align-content","color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides","align-content":n(S).Center,color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Small,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant,width:"30px",height:"30px",wrap:""},null,8,["align-content","color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0)],64))}}),j=["data-testid"],H=["hidden"],O=/* @__PURE__ */e({name:"CLCarousel",__name:"CLCarousel",props:{color:{default:E.Neutral},controlAlign:{default:S.Right},controlPosition:{default:B.Before},enabled:{type:Boolean,default:!0},infinite:{type:Boolean,default:!1},moreLabel:{default:"More"},onShowMore:{},paginationType:{default:$.Numbered},perPage:{default:3},perPageByBreakpoints:{},testId:{default:"clll-carousel"},title:{},variant:{default:k.Soft},width:{default:"100%"}},setup(e){g(e=>({v3ba68b74:e.width,v1ab12a15:n(Q)}));const r="clll-carousel",c=e,x=h(),k=h(!1),L=h(1),z=h(c.perPage),P=h(0),C=A("title"),E=h(!1),O=h(!1),R=h(!1),q=h(0),D=h(!1),F=h(),G=h(!1),J=h(),K=h(),Q=h("100%"),U=h(0),V=h(0),X=()=>{if(c.perPageByBreakpoints?.length){z.value=c.perPage;for(const[e,a]of c.perPageByBreakpoints){window.matchMedia(`(min-width: ${e}px)`).matches&&(z.value=a)}}},Y=()=>{const e=J?.value;if(e&&V.value){const e=Math.ceil(V.value/z.value);U.value=e,c.infinite?(O.value=!0,R.value=!0):e>1&&(O.value=!0)}},Z=e=>{x.value&&m(()=>{const a=I(x.value)&&!C.value;a||!e.title&&e.controlPosition!==B.Before?k.value=a:k.value=!1})},ee=e=>{const a=J?.value,l=a.offsetWidth;if(a&&l)if(c.infinite&&c.enabled&&q.value>0){const o=l/z.value*(P.value/2)+l*(e-1);a.scrollTo({left:o,behavior:"smooth"})}else{const o=l*(e-1);a.scrollTo({left:o,behavior:"smooth"})}},ae=()=>{D.value=!0;const e=z.value;X(),ie(),Y();const a=J?.value,l=a.offsetWidth;if(a)if(c.infinite&&c.enabled&&q.value>0){const o=l/z.value,i=l/e,t=P.value/2,n=i*t,s=a.scrollLeft-n;if(e!==z.value){const e=a.querySelectorAll(`div[class="${r}__slides"] > *`),l=Array.from(e),o=l.slice(t,l.length-t);a.innerHTML="",o.forEach(e=>a.appendChild(e));const i=Math.min(z.value,o.length);if(i>0&&o.length>0){o.slice(-i).forEach(e=>{const l=e.cloneNode(!0);a.insertBefore(l,o[0])});o.slice(0,i).forEach(e=>{const l=e.cloneNode(!0);a.appendChild(l)}),P.value=2*i}}const c=o*(P.value/2)+s;m(()=>{a.scrollLeft=c})}else{L.value=1;const e=l*(L.value-1);a.scrollLeft=e}M&&D.value&&(window.clearTimeout(F.value),F.value=window.setTimeout(()=>{D.value&&(D.value=!1),window.clearTimeout(F.value)},300))},le=()=>{D.value||(G.value=!0,M&&G.value&&(window.clearTimeout(K.value),K.value=window.setTimeout(()=>{G.value&&oe(),window.clearTimeout(K.value)},200)))},oe=()=>{D.value||(G.value=!1,E.value||m(()=>{let e,a;const l=J?.value;if(l){const o=l?.querySelectorAll(`div[class="${r}__slides"] > *`)??[];if(c.infinite&&c.enabled&&q.value>0){const e=l.offsetWidth,a=e/z.value,o=l.scrollLeft,i=a*(P.value/2),t=a*q.value;let n=o-i;n<0&&(n=t+n);const s=Math.floor(n/e)+1;if(s<1?L.value=U.value:s>U.value?L.value=1:L.value=s,!E.value)if(o<i){E.value=!0;const e=o+t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{E.value=!1},50)}else if(o>=i+t){E.value=!0;const e=o-t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{E.value=!1},50)}}else{const i=V.value-1;for(let t=0;t<U.value;t++){const n=z.value*(t+1)-1,s=n<i?o[n]:o[i],r=n<i?n:i;N({parent:l,child:s,leftOffset:40,rightOffset:40,threshold:.5})&&(r===i?(a=i,e=t+1):(a=r,e=t+1))}void 0!==a&&a>-1&&e&&(L.value=e,e>1&&(R.value=!0),1===e&&(R.value=!1),e<U.value&&(O.value=!0),e===U.value&&(O.value=!1))}}}))},ie=()=>{const e=J?.value;if(e){const a=e.offsetWidth;V.value>=z.value?Q.value=a/z.value+"px":Q.value=a/V.value+"px"}},te=()=>{const e=J?.value,a=e.offsetWidth;if(e&&a)if(c.infinite&&c.enabled&&q.value>0){const l=e.scrollLeft+a;e.scrollTo({left:l,behavior:"smooth"})}else{const l=a*L.value;e.scrollTo({left:l,behavior:"smooth"})}},ne=()=>{const e=J?.value,a=e.offsetWidth;if(e&&a)if(c.infinite&&c.enabled&&q.value>0){const l=e.scrollLeft-a;e.scrollTo({left:l,behavior:"smooth"})}else{const l=a*(L.value-1-1);e.scrollTo({left:l,behavior:"smooth"})}};b(()=>{if(M){window.addEventListener("resize",ae);const e=J?.value;if(e){const a=e?.querySelectorAll(`div[class="${r}__slides"] > *`)??[];if(q.value=a.length,V.value=a.length,c.infinite&&c.enabled&&a.length>0){const l=Array.from(a),o=Math.min(z.value,l.length);l.slice(-o).forEach(a=>{const o=a.cloneNode(!0);e.insertBefore(o,l[0])});l.slice(0,o).forEach(a=>{const l=a.cloneNode(!0);e.appendChild(l)}),P.value=2*o,m(()=>{const a=e.offsetWidth/z.value*o;e.scrollLeft=a})}e.addEventListener("scroll",le),e.addEventListener("scrollend",oe)}Z(c),X(),ie(),Y()}}),_(()=>{if(M){window.removeEventListener("resize",ae),F.value&&window.clearTimeout(F.value),K.value&&window.clearTimeout(K.value);const e=J?.value;e&&(e.removeEventListener("scroll",le),e.removeEventListener("scrollend",oe))}});const se=a(()=>[r,`${r}--${c.controlAlign}`,`${r}--${c.controlPosition}`,`${r}--${c.paginationType}`,c.enabled?`${r}--enabled`:`${r}--disabled`,k.value?"":`${r}--hastitle`,c.onShowMore?`${r}--has-more`:""]),re=a(()=>[`${r}__slide-controls`,C.value?`${r}__slide-controls--hascustomtitle`:""]),ce=a(()=>[`${r}__slides`,D.value?`${r}__slides--resizing`:"",G.value?`${r}__slides--scrolling`:"",E.value?`${r}__slides--jumping`:""]),ve=a(()=>[`${r}__navigation`,`${r}__navigation--${c.controlAlign}`,`${r}__navigation--${c.controlPosition}`]);return w(c,e=>{Z(e)}),(a,c)=>(o(),l("div",{class:s(n(se)),"data-testid":e.testId},[v("div",{ref_key:"beforeControls",ref:x,class:s(n(re)),hidden:n(k)},[v("div",{class:s(`${r}__custom-title`)},[y(a.$slots,"title")],2),e.title?(o(),l("div",{key:0,class:s(`${r}__title`)},[d(n(T),{align:n(C)?n(S).Center:n(S).Left,label:"",truncate:""},{default:u(()=>[p(f(e.title),1)]),_:1},8,["align"])],2)):t("",!0),e.controlPosition!==n(B).Before||[n($).Inline,n($).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:1},[n(U)&&n(V)>n(z)?(o(),l("div",{key:0,class:s(n(ve))},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,"prev-page-enabled":n(R),prefix:r,"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)):t("",!0)],64))],10,H),v("div",{ref_key:"scrollContainer",ref:J,class:s(n(ce)),tabindex:"0"},[y(a.$slots,"default")],2),e.controlPosition!==n(B).After||[n($).Inline,n($).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:0},[n(U)&&n(V)>n(z)?(o(),l("div",{key:0,class:s(`${r}__slide-controls`)},[v("div",{class:s(n(ve))},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,prefix:r,"prev-page-enabled":n(R),"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)],2)):t("",!0)],64)),e.paginationType===n($).Inline?(o(),l("div",{key:1,class:s(`${r}__slide-controls ${r}__slide-controls--inline`)},[v("div",{class:s(`${r}__navigation`)},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,prefix:r,"prev-page-enabled":n(R),"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)],2)):t("",!0)],10,j))}}),R=(e,a)=>{const l=e.__vccOpts||e;for(const[o,i]of a)l[o]=i;return l},q={},D={class:/*@__PURE__*/s(["clll-carousel__slide"])};const F=/*#__PURE__*/R(q,[["render",function(e,a){return o(),l("div",D,[y(e.$slots,"default")])}]]),G=O;G.Slide=F;export{G as CLCarousel,G as default};
3
+ import{defineComponent as e,computed as a,createElementBlock as l,openBlock as o,Fragment as i,createCommentVNode as t,unref as n,normalizeClass as s,renderList as r,createBlock as c,createElementVNode as v,createVNode as d,withCtx as u,createTextVNode as p,toDisplayString as f,useCssVars as g,ref as h,onMounted as b,nextTick as m,onUnmounted as _,watch as w,renderSlot as y}from"vue";import{_ as x}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as T}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLPaginationType as $,CLColorVariants as k,CLSizes as L,CLIconSizes as z,CLIconNames as P,CLTextTypes as C,CLAlign as S,CLOrder as B,CLColors as E}from"../../../index.js";import{i as M,d as I,e as N}from"../../../chunks/helper-C542dSLs.js";import{useHasSlotContent as A}from"../../../composables/useHasSlotContent.js";const W=/* @__PURE__ */e({name:"CLCarouselNavigation",__name:"CLCarouselNavigation",props:{color:{},currentPage:{},enabled:{type:Boolean},gotoPage:{},moreAriaLabel:{default:"Navigate to page to see more results"},moreLabel:{},nextPageEnabled:{type:Boolean},paginationType:{},prefix:{},prevPageEnabled:{type:Boolean},showMore:{},showNextItems:{},showPrevItems:{},totalPages:{},variant:{}},setup(e){const g=e,h=a(()=>[`${g.prefix}__dots-container`]),b=a(()=>[`${g.prefix}__arrows-container`]),m=a(()=>[`${g.prefix}__numbered-container`]),_=a(()=>[`${g.prefix}__inline-container`]),w=a(()=>[`${g.prefix}__prev-page`]),y=a(()=>[`${g.prefix}__next-page`]),B=a(()=>[`${g.prefix}__page-indicator`]),E=a(()=>[`${g.prefix}__show-more`]),M=e=>g.currentPage===e,I=a(()=>!g.enabled||!g.prevPageEnabled),N=a(()=>!g.enabled||!g.nextPageEnabled);return(a,g)=>(o(),l(i,null,[e.paginationType===n($).Dots?(o(),l("div",{key:0,class:s(n(h))},[(o(!0),l(i,null,r(e.totalPages,a=>(o(),c(n(x),{key:`dot-${a}`,"aria-label":`Show page ${a}`,color:e.color,disabled:M(a),height:"0.75rem","on-click":()=>e.gotoPage(a),width:"0.75rem",variant:M(a)?n(k).Outline:e.variant,wrap:""},null,8,["aria-label","color","disabled","on-click","variant"]))),128))],2)):t("",!0),e.paginationType===n($).Numbered?(o(),l("div",{key:1,class:s(n(m))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides",color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(B))},[d(n(T),{type:n(C).Small},{default:u(()=>[p(f(e.currentPage)+" / "+f(e.totalPages),1)]),_:1},8,["type"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides",color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),e.showMore?(o(),l("div",{key:0,class:s(n(E))},[d(n(x),{"aria-label":e.moreAriaLabel,color:e.color,size:n(L).Small,"on-click":e.showMore,variant:e.variant},{default:u(()=>[p(f(e.moreLabel),1)]),_:1},8,["aria-label","color","size","on-click","variant"])],2)):t("",!0)],2)):t("",!0),e.paginationType===n($).Arrows?(o(),l("div",{key:2,class:s(n(b))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides",color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides",color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Tiny,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0),e.paginationType===n($).Inline?(o(),l("div",{key:3,class:s(n(_))},[v("div",{class:s(n(w))},[d(n(x),{"aria-label":"Show previous page of slides","align-content":n(S).Center,color:e.color,disabled:n(I),"icon-before":n(P).ChevronLeft,"icon-size":n(z).Small,size:n(L).Tiny,"on-click":e.showPrevItems,variant:n(I)?n(k).Text:e.variant,width:"30px",height:"30px",wrap:""},null,8,["align-content","color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(y))},[d(n(x),{"aria-label":"Show next page of slides","align-content":n(S).Center,color:e.color,disabled:n(N),"icon-before":n(P).ChevronRight,"icon-size":n(z).Small,size:n(L).Tiny,"on-click":e.showNextItems,variant:n(N)?n(k).Text:e.variant,width:"30px",height:"30px",wrap:""},null,8,["align-content","color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0)],64))}}),j=["data-testid"],H=["hidden"],O=/* @__PURE__ */e({name:"CLCarousel",__name:"CLCarousel",props:{color:{default:E.Neutral},controlAlign:{default:S.Right},controlPosition:{default:B.Before},enabled:{type:Boolean,default:!0},infinite:{type:Boolean,default:!1},moreLabel:{default:"More"},onShowMore:{},paginationType:{default:$.Numbered},perPage:{default:3},perPageByBreakpoints:{},testId:{default:"clll-carousel"},title:{},variant:{default:k.Soft},width:{default:"100%"}},setup(e){g(e=>({v3ba68b74:e.width,v1ab12a15:n(Q)}));const r="clll-carousel",c=e,x=h(),k=h(!1),L=h(1),z=h(c.perPage),P=h(0),C=A("title"),E=h(!1),O=h(!1),R=h(!1),q=h(0),D=h(!1),F=h(),G=h(!1),J=h(),K=h(),Q=h("100%"),U=h(0),V=h(0),X=()=>{if(c.perPageByBreakpoints?.length){z.value=c.perPage;for(const[e,a]of c.perPageByBreakpoints){window.matchMedia(`(min-width: ${e}px)`).matches&&(z.value=a)}}},Y=()=>{const e=J?.value;if(e&&V.value){const e=Math.ceil(V.value/z.value);U.value=e,c.infinite?(O.value=!0,R.value=!0):e>1&&(O.value=!0)}},Z=e=>{x.value&&m(()=>{const a=I(x.value)&&!C.value;a||!e.title&&e.controlPosition!==B.Before?k.value=a:k.value=!1})},ee=e=>{const a=J?.value,l=a.offsetWidth;if(a&&l)if(c.infinite&&c.enabled&&q.value>0){const o=l/z.value*(P.value/2)+l*(e-1);a.scrollTo({left:o,behavior:"smooth"})}else{const o=l*(e-1);a.scrollTo({left:o,behavior:"smooth"})}},ae=()=>{D.value=!0;const e=z.value;X(),ie(),Y();const a=J?.value,l=a.offsetWidth;if(a)if(c.infinite&&c.enabled&&q.value>0){const o=l/z.value,i=l/e,t=P.value/2,n=i*t,s=a.scrollLeft-n;if(e!==z.value){const e=a.querySelectorAll(`div[class="${r}__slides"] > *`),l=Array.from(e),o=l.slice(t,l.length-t);a.innerHTML="",o.forEach(e=>a.appendChild(e));const i=Math.min(z.value,o.length);if(i>0&&o.length>0){o.slice(-i).forEach(e=>{const l=e.cloneNode(!0);a.insertBefore(l,o[0])});o.slice(0,i).forEach(e=>{const l=e.cloneNode(!0);a.appendChild(l)}),P.value=2*i}}const c=o*(P.value/2)+s;m(()=>{a.scrollLeft=c})}else{L.value=1;const e=l*(L.value-1);a.scrollLeft=e}M&&D.value&&(window.clearTimeout(F.value),F.value=window.setTimeout(()=>{D.value&&(D.value=!1),window.clearTimeout(F.value)},300))},le=()=>{D.value||(G.value=!0,M&&G.value&&(window.clearTimeout(K.value),K.value=window.setTimeout(()=>{G.value&&oe(),window.clearTimeout(K.value)},200)))},oe=()=>{D.value||(G.value=!1,E.value||m(()=>{let e,a;const l=J?.value;if(l){const o=l?.querySelectorAll(`div[class="${r}__slides"] > *`)??[];if(c.infinite&&c.enabled&&q.value>0){const e=l.offsetWidth,a=e/z.value,o=l.scrollLeft,i=a*(P.value/2),t=a*q.value;let n=o-i;n<0&&(n=t+n);const s=Math.floor(n/e)+1;if(s<1?L.value=U.value:s>U.value?L.value=1:L.value=s,!E.value)if(o<i){E.value=!0;const e=o+t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{E.value=!1},50)}else if(o>=i+t){E.value=!0;const e=o-t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{E.value=!1},50)}}else{const i=V.value-1;for(let t=0;t<U.value;t++){const n=z.value*(t+1)-1,s=n<i?o[n]:o[i],r=n<i?n:i;N({parent:l,child:s,leftOffset:40,rightOffset:40,threshold:.5})&&(r===i?(a=i,e=t+1):(a=r,e=t+1))}void 0!==a&&a>-1&&e&&(L.value=e,e>1&&(R.value=!0),1===e&&(R.value=!1),e<U.value&&(O.value=!0),e===U.value&&(O.value=!1))}}}))},ie=()=>{const e=J?.value;if(e){const a=e.offsetWidth;V.value>=z.value?Q.value=a/z.value+"px":Q.value=a/V.value+"px"}},te=()=>{const e=J?.value,a=e.offsetWidth;if(e&&a)if(c.infinite&&c.enabled&&q.value>0){const l=e.scrollLeft+a;e.scrollTo({left:l,behavior:"smooth"})}else{const l=a*L.value;e.scrollTo({left:l,behavior:"smooth"})}},ne=()=>{const e=J?.value,a=e.offsetWidth;if(e&&a)if(c.infinite&&c.enabled&&q.value>0){const l=e.scrollLeft-a;e.scrollTo({left:l,behavior:"smooth"})}else{const l=a*(L.value-1-1);e.scrollTo({left:l,behavior:"smooth"})}};b(()=>{if(M){window.addEventListener("resize",ae);const e=J?.value;if(e){const a=e?.querySelectorAll(`div[class="${r}__slides"] > *`)??[];if(q.value=a.length,V.value=a.length,c.infinite&&c.enabled&&a.length>0){const l=Array.from(a),o=Math.min(z.value,l.length);l.slice(-o).forEach(a=>{const o=a.cloneNode(!0);e.insertBefore(o,l[0])});l.slice(0,o).forEach(a=>{const l=a.cloneNode(!0);e.appendChild(l)}),P.value=2*o,m(()=>{const a=e.offsetWidth/z.value*o;e.scrollLeft=a})}e.addEventListener("scroll",le),e.addEventListener("scrollend",oe)}Z(c),X(),ie(),Y()}}),_(()=>{if(M){window.removeEventListener("resize",ae),F.value&&window.clearTimeout(F.value),K.value&&window.clearTimeout(K.value);const e=J?.value;e&&(e.removeEventListener("scroll",le),e.removeEventListener("scrollend",oe))}});const se=a(()=>[r,`${r}--${c.controlAlign}`,`${r}--${c.controlPosition}`,`${r}--${c.paginationType}`,c.enabled?`${r}--enabled`:`${r}--disabled`,k.value?"":`${r}--hastitle`,c.onShowMore?`${r}--has-more`:""]),re=a(()=>[`${r}__slide-controls`,C.value?`${r}__slide-controls--hascustomtitle`:""]),ce=a(()=>[`${r}__slides`,D.value?`${r}__slides--resizing`:"",G.value?`${r}__slides--scrolling`:"",E.value?`${r}__slides--jumping`:""]),ve=a(()=>[`${r}__navigation`,`${r}__navigation--${c.controlAlign}`,`${r}__navigation--${c.controlPosition}`]);return w(c,e=>{Z(e)}),(a,c)=>(o(),l("div",{class:s(n(se)),"data-testid":e.testId},[v("div",{ref_key:"beforeControls",ref:x,class:s(n(re)),hidden:n(k)},[v("div",{class:s(`${r}__custom-title`)},[y(a.$slots,"title")],2),e.title?(o(),l("div",{key:0,class:s(`${r}__title`)},[d(n(T),{align:n(C)?n(S).Center:n(S).Left,label:"",truncate:""},{default:u(()=>[p(f(e.title),1)]),_:1},8,["align"])],2)):t("",!0),e.controlPosition!==n(B).Before||[n($).Inline,n($).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:1},[n(U)&&n(V)>n(z)?(o(),l("div",{key:0,class:s(n(ve))},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,"prev-page-enabled":n(R),prefix:r,"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)):t("",!0)],64))],10,H),v("div",{ref_key:"scrollContainer",ref:J,class:s(n(ce)),tabindex:"0"},[y(a.$slots,"default")],2),e.controlPosition!==n(B).After||[n($).Inline,n($).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:0},[n(U)&&n(V)>n(z)?(o(),l("div",{key:0,class:s(`${r}__slide-controls`)},[v("div",{class:s(n(ve))},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,prefix:r,"prev-page-enabled":n(R),"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)],2)):t("",!0)],64)),e.paginationType===n($).Inline?(o(),l("div",{key:1,class:s(`${r}__slide-controls ${r}__slide-controls--inline`)},[v("div",{class:s(`${r}__navigation`)},[d(W,{color:e.color,"current-page":n(L),enabled:!n(G),"goto-page":ee,"more-label":e.moreLabel,"next-page-enabled":n(O),"pagination-type":e.paginationType,prefix:r,"prev-page-enabled":n(R),"show-more":e.onShowMore,"show-next-items":te,"show-prev-items":ne,"total-pages":n(U),variant:e.variant},null,8,["color","current-page","enabled","more-label","next-page-enabled","pagination-type","prev-page-enabled","show-more","total-pages","variant"])],2)],2)):t("",!0)],10,j))}}),R=(e,a)=>{const l=e.__vccOpts||e;for(const[o,i]of a)l[o]=i;return l},q={},D={class:/*@__PURE__*/s(["clll-carousel__slide"])};const F=/*#__PURE__*/R(q,[["render",function(e,a){return o(),l("div",D,[y(e.$slots,"default")])}]]),G=O;G.Slide=F;export{G as CLCarousel,G as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLDisclosure.css';
3
- import{defineComponent as e,ref as a,computed as t,onBeforeUnmount as d,createElementBlock as o,openBlock as n,normalizeStyle as i,normalizeClass as s,unref as l,createVNode as r,createElementVNode as u,withKeys as c,withCtx as p,createBlock as _,createCommentVNode as g,renderSlot as $,createTextVNode as f,toDisplayString as m}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js";import{_ as v}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as b}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{_ as h}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as x,CLSizes as B,CLTextTypes as S,CLIconSizes as z,CLIconNames as C,CLHeadingTypes as k,CLColors as I}from"../../../index.js";import{d as L}from"../../../chunks/utils-Dst7nzvj.js";import{useEsc as H}from"../../../composables/useEsc.js";import{useHasSlotContent as j}from"../../../composables/useHasSlotContent.js";const T=["data-testid"],A=["id","aria-labelledby","aria-hidden"],D=/* @__PURE__ */e({name:"CLDisclosure",__name:"CLDisclosure",props:{bordered:{type:Boolean,default:!0},borderRadius:{},color:{default:I.Neutral},compact:{type:Boolean,default:!1},contentSpacing:{type:Boolean,default:!0},disclosureId:{},expanded:{type:Boolean,default:!1},expandedIcon:{default:C.ChevronUp},heading:{},headingLevel:{},headingType:{default:k.Section},iconAfter:{default:C.ChevronDown},iconBefore:{},iconSize:{default:z.Medium},rounded:{type:Boolean,default:!0},subHeading:{},subHeadingType:{default:S.Body},testId:{default:"clll-disclosure"},triggerButtonSize:{default:B.Medium},variant:{default:x.Soft}},setup(e){const x="clll-disclosure",B=e;let S=a();const z=a(B.expanded),C=j("trailing"),k=t(()=>[x,`${x}--${B.color}--${B.variant}`,`${x}--${B.triggerButtonSize}`,B.bordered?`${x}--bordered`:"",B.borderRadius?`${x}--${B.borderRadius}`:"",B.contentSpacing?`${x}--padded`:`${x}--nopadding`,B.compact?`${x}--compact`:"",z.value?`${x}--expanded`:`${x}--collapsed`,B.heading?`${x}--hasheading`:"",B.subHeading||C.value?`${x}--hassubheading`:"",B.rounded?`${x}--rounded`:`${x}--box`,`${x}--${B.triggerButtonSize}`]),I=t(()=>[`${x}__content`,`${x}__content--${B.triggerButtonSize}`]),D=()=>{z.value?z.value=!1:z.value=!0},{clearEventListeners:E}=H({escHandler:D,triggerElem:S});return d(()=>{E()}),(a,t)=>(n(),o("div",{class:s(l(k)),style:i(l(L)({color:e.color,variant:e.variant})),"data-testid":e.testId},[r(l(y),{id:`${x}__button--${e.disclosureId}`,"aria-controls":`${x}--${e.disclosureId}`,"aria-expanded":l(z),color:e.color,enabled:!0,fluid:!0,rounded:e.rounded,role:"button",onClick:D,onKeyup:c(D,["enter"])},{default:p(()=>[u("div",{class:s(`${x}__trigger`)},[u("span",{class:s(`${x}__heading`)},[e.iconBefore?(n(),_(l(b),{key:0,name:e.iconBefore,size:e.iconSize},null,8,["name","size"])):g("",!0),u("span",{class:s(`${x}__heading-text`)},[e.heading?(n(),_(l(v),{key:0,class:s(`${x}__text-heading`),type:e.headingType,level:e.headingLevel},{default:p(()=>[f(m(e.heading),1)]),_:1},8,["class","type","level"])):g("",!0),e.subHeading?(n(),_(l(h),{key:1,class:s(`${x}__text-subheading`),type:e.subHeadingType,truncate:""},{default:p(()=>[f(m(e.subHeading),1)]),_:1},8,["class","type"])):g("",!0)],2),$(a.$slots,"trailing"),e.iconAfter?(n(),_(l(b),{key:1,name:l(z)?e.expandedIcon:e.iconAfter,size:e.iconSize},null,8,["name","size"])):g("",!0)],2)],2)]),_:3},8,["id","aria-controls","aria-expanded","color","rounded"]),u("div",{id:`${x}--${e.disclosureId}`,"aria-labelledby":`${x}__button--${e.disclosureId}`,"aria-hidden":!l(z),class:s(l(I))},[$(a.$slots,"default")],10,A)],14,T))}});export{D as CLDisclosure,D as default};
3
+ import{defineComponent as e,ref as a,computed as t,onBeforeUnmount as d,createElementBlock as o,openBlock as n,normalizeStyle as i,normalizeClass as s,unref as l,createVNode as r,createElementVNode as u,withKeys as c,withCtx as p,createBlock as _,createCommentVNode as g,renderSlot as $,createTextVNode as f,toDisplayString as m}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js";import{_ as v}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as b}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{_ as h}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as x,CLSizes as B,CLTextTypes as S,CLIconSizes as z,CLIconNames as C,CLHeadingTypes as k,CLColors as I}from"../../../index.js";import{d as L}from"../../../chunks/utils-Dst7nzvj.js";import{useEsc as H}from"../../../composables/useEsc.js";import{useHasSlotContent as j}from"../../../composables/useHasSlotContent.js";const T=["data-testid"],A=["id","aria-labelledby","aria-hidden"],D=/* @__PURE__ */e({name:"CLDisclosure",__name:"CLDisclosure",props:{bordered:{type:Boolean,default:!0},borderRadius:{},color:{default:I.Neutral},compact:{type:Boolean,default:!1},contentSpacing:{type:Boolean,default:!0},disclosureId:{},expanded:{type:Boolean,default:!1},expandedIcon:{default:C.ChevronUp},heading:{},headingLevel:{},headingType:{default:k.Section},iconAfter:{default:C.ChevronDown},iconBefore:{},iconSize:{default:z.Medium},rounded:{type:Boolean,default:!0},subHeading:{},subHeadingType:{default:S.Body},testId:{default:"clll-disclosure"},triggerButtonSize:{default:B.Medium},variant:{default:x.Soft}},setup(e){const x="clll-disclosure",B=e;let S=a();const z=a(B.expanded),C=j("trailing"),k=t(()=>[x,`${x}--${B.color}--${B.variant}`,`${x}--${B.triggerButtonSize}`,B.bordered?`${x}--bordered`:"",B.borderRadius?`${x}--${B.borderRadius}`:"",B.contentSpacing?`${x}--padded`:`${x}--nopadding`,B.compact?`${x}--compact`:"",z.value?`${x}--expanded`:`${x}--collapsed`,B.heading?`${x}--hasheading`:"",B.subHeading||C.value?`${x}--hassubheading`:"",B.rounded?`${x}--rounded`:`${x}--box`,`${x}--${B.triggerButtonSize}`]),I=t(()=>[`${x}__content`,`${x}__content--${B.triggerButtonSize}`]),D=()=>{z.value?z.value=!1:z.value=!0},{clearEventListeners:E}=H({escHandler:D,triggerElem:S});return d(()=>{E()}),(a,t)=>(n(),o("div",{class:s(l(k)),style:i(l(L)({color:e.color,variant:e.variant})),"data-testid":e.testId},[r(l(y),{id:`${x}__button--${e.disclosureId}`,"aria-controls":`${x}--${e.disclosureId}`,"aria-expanded":l(z),color:e.color,enabled:!0,fluid:!0,rounded:e.rounded,role:"button",onClick:D,onKeyup:c(D,["enter"])},{default:p(()=>[u("div",{class:s(`${x}__trigger`)},[u("span",{class:s(`${x}__heading`)},[e.iconBefore?(n(),_(l(b),{key:0,name:e.iconBefore,size:e.iconSize},null,8,["name","size"])):g("",!0),u("span",{class:s(`${x}__heading-text`)},[e.heading?(n(),_(l(v),{key:0,class:s(`${x}__text-heading`),type:e.headingType,level:e.headingLevel},{default:p(()=>[f(m(e.heading),1)]),_:1},8,["class","type","level"])):g("",!0),e.subHeading?(n(),_(l(h),{key:1,class:s(`${x}__text-subheading`),type:e.subHeadingType,truncate:""},{default:p(()=>[f(m(e.subHeading),1)]),_:1},8,["class","type"])):g("",!0)],2),$(a.$slots,"trailing"),e.iconAfter?(n(),_(l(b),{key:1,name:l(z)?e.expandedIcon:e.iconAfter,size:e.iconSize},null,8,["name","size"])):g("",!0)],2)],2)]),_:3},8,["id","aria-controls","aria-expanded","color","rounded"]),u("div",{id:`${x}--${e.disclosureId}`,"aria-labelledby":`${x}__button--${e.disclosureId}`,"aria-hidden":!l(z),class:s(l(I))},[$(a.$slots,"default")],10,A)],14,T))}});export{D as CLDisclosure,D as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLCalendar.css';
3
- import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BAfGE35e.js";export{a as CLCalendar,a as default};
3
+ import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js";export{a as CLCalendar,a as default};
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLCheckbox.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as s,computed as o,createBlock as d,openBlock as u,withCtx as i,createElementVNode as t,createCommentVNode as n,normalizeStyle as r,normalizeClass as c,unref as m,withDirectives as b,vModelCheckbox as f,createVNode as p,createTextVNode as _,toDisplayString as y}from"vue";import{_ as X,c as v,a as L}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLSizes as h,CLIconSizes as x,CLTextTypes as k,CLIconNames as C,CLColorVariants as B,CLColors as T}from"../../../index.js";const q=["data-testid"],M=["for","disabled"],F=["id","aria-label","disabled","form","name","required","value"],z=/* @__PURE__ */e({name:"CLCheckbox",__name:"CLCheckbox",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:T.Neutral},disabled:{type:Boolean,default:!1},form:{default:void 0},id:{},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:h.Small},testId:{default:"clll-checkbox"},value:{type:[String,Number,Boolean],default:void 0},variant:{default:B.Outline}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const B={[h.Tiny]:x.Tiny,[h.Small]:x.Tiny,[h.Medium]:x.Small,[h.Large]:x.Medium,[h.XL]:x.Medium,[h.XXL]:x.Large,[h.XXXL]:x.Large,[h.XXXXL]:x.XL},T={[h.Tiny]:k.Small,[h.Small]:k.Medium,[h.Medium]:k.Medium,[h.Large]:k.Large,[h.XL]:k.XL,[h.XXL]:k.XXL,[h.XXXL]:k.XXXL,[h.XXXXL]:k.XXXXL},z=e,S=l("checkbox-ref"),j=s(e,"modelValue"),I="clll-checkbox",R=o(()=>[I,z.borderRadius?`${I}--${z.borderRadius}`:"",z.busy?`${I}--busy`:`${I}--ready`,z.disabled?`${I}--disabled`:`${I}--active`,z.label?`${I}--haslabel`:"",`${I}--${z.color}`,`${I}--${z.size}`,z.messageType?`${I}--${z.messageType}`:"",z.rounded?`${I}--rounded`:`${I}--box`,z.required?`${I}--required`:`${I}--optional`]),V=o(()=>[`${I}__checkbox-container`,`${I}--${z.variant}`]),N=()=>{S.value&&S.value.focus()};return a({checkboxRef:S}),(a,l)=>(u(),d(X,null,{default:i(()=>[t("span",{class:c(m(R)),style:r(m(v)({color:e.color,variant:e.variant})),"data-testid":e.testId},[t("span",{class:c(m(V)),onClick:N},[t("label",{for:e.id,class:c(`${I}__label`),disabled:e.disabled},[t("span",{class:c([`${I}__checkbox-frame`,"form-control-flex"])},[b(t("input",{id:e.id,ref:"checkbox-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:c(`${I}__checkbox`),disabled:e.disabled||e.busy,form:e.form,name:e.name,required:e.required,type:"checkbox",value:e.value,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},null,42,F),[[f,j.value]]),t("span",{class:c(`${I}__icon`)},[p(m($),{name:m(C).Check,size:B[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(m(g),{key:0,as:"span",type:T[e.size],class:c(e.required?`${I}__label--required`:"")},{default:i(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,M)],2)],14,q),e.id?(u(),d(L,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{z as CLCheckbox,z as default};
4
+ import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as s,computed as o,createBlock as d,openBlock as u,withCtx as i,createElementVNode as t,createCommentVNode as n,normalizeStyle as r,normalizeClass as c,unref as m,withDirectives as b,vModelCheckbox as f,createVNode as p,createTextVNode as _,toDisplayString as y}from"vue";import{_ as X,c as v,a as L}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLSizes as h,CLIconSizes as x,CLTextTypes as k,CLIconNames as C,CLColorVariants as B,CLColors as T}from"../../../index.js";const q=["data-testid"],M=["for","disabled"],F=["id","aria-label","disabled","form","name","required","value"],z=/* @__PURE__ */e({name:"CLCheckbox",__name:"CLCheckbox",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:T.Neutral},disabled:{type:Boolean,default:!1},form:{default:void 0},id:{},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:h.Small},testId:{default:"clll-checkbox"},value:{type:[String,Number,Boolean],default:void 0},variant:{default:B.Outline}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const B={[h.Tiny]:x.Tiny,[h.Small]:x.Tiny,[h.Medium]:x.Small,[h.Large]:x.Medium,[h.XL]:x.Medium,[h.XXL]:x.Large,[h.XXXL]:x.Large,[h.XXXXL]:x.XL},T={[h.Tiny]:k.Small,[h.Small]:k.Medium,[h.Medium]:k.Medium,[h.Large]:k.Large,[h.XL]:k.XL,[h.XXL]:k.XXL,[h.XXXL]:k.XXXL,[h.XXXXL]:k.XXXXL},z=e,S=l("checkbox-ref"),j=s(e,"modelValue"),I="clll-checkbox",R=o(()=>[I,z.borderRadius?`${I}--${z.borderRadius}`:"",z.busy?`${I}--busy`:`${I}--ready`,z.disabled?`${I}--disabled`:`${I}--active`,z.label?`${I}--haslabel`:"",`${I}--${z.color}`,`${I}--${z.size}`,z.messageType?`${I}--${z.messageType}`:"",z.rounded?`${I}--rounded`:`${I}--box`,z.required?`${I}--required`:`${I}--optional`]),V=o(()=>[`${I}__checkbox-container`,`${I}--${z.variant}`]),N=()=>{S.value&&S.value.focus()};return a({checkboxRef:S}),(a,l)=>(u(),d(X,null,{default:i(()=>[t("span",{class:c(m(R)),style:r(m(v)({color:e.color,variant:e.variant})),"data-testid":e.testId},[t("span",{class:c(m(V)),onClick:N},[t("label",{for:e.id,class:c(`${I}__label`),disabled:e.disabled},[t("span",{class:c([`${I}__checkbox-frame`,"form-control-flex"])},[b(t("input",{id:e.id,ref:"checkbox-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:c(`${I}__checkbox`),disabled:e.disabled||e.busy,form:e.form,name:e.name,required:e.required,type:"checkbox",value:e.value,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},null,42,F),[[f,j.value]]),t("span",{class:c(`${I}__icon`)},[p(m($),{name:m(C).Check,size:B[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(m(g),{key:0,as:"span",type:T[e.size],class:c(e.required?`${I}__label--required`:"")},{default:i(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,M)],2)],14,q),e.id?(u(),d(L,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{z as CLCheckbox,z as default};
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInput.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,computed as l,createElementBlock as a,openBlock as o,normalizeClass as i,unref as t,createBlock as r,Fragment as d,createTextVNode as n,toDisplayString as u,createVNode as s,ref as p,watch as c,createCommentVNode as f,mergeModels as m,useTemplateRef as b,useModel as y,withCtx as x,createElementVNode as v,normalizeStyle as _,withDirectives as g,vModelDynamic as h,isRef as L}from"vue";import{_ as X,i as C,a as z}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as k}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{_ as I}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{_ as F}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{CLSizes as S,CLColors as B,CLBorderRadius as T,CLIconSizes as R,CLColorVariants as V,CLIconNames as P,CLInputTypes as j,CLOrientation as q,CLCharCounterLayout as w}from"../../../index.js";import{_ as M}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-BVsLNnfE.js";const N=["data-testid"],U=/* @__PURE__ */e({name:"CLInputPrefix",__name:"CLInputPrefix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},prefix:{},size:{default:S.Small},testId:{default:"clll-input-prefix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(s.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.prefix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--left-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.prefix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.prefix)?(o(),r(t(I),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.prefix),1)],64))],8,N))],2))}}),A=["data-testid"],O=/* @__PURE__ */e({name:"CLInputSuffix",__name:"CLInputSuffix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},suffix:{},size:{default:S.Small},testId:{default:"clll-input-suffix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(s.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.suffix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--right-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.suffix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.suffix)?(o(),r(t(I),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.suffix),1)],64))],8,A))],2))}}),E=["data-testid"],G=/* @__PURE__ */e({name:"CLInputPill",__name:"CLInputPill",props:{color:{default:B.Neutral},label:{},testId:{default:"clll-input-pill"}},setup:e=>(l,r)=>(o(),a("span",{class:i("clll-input__pill"),"data-testid":e.testId},[s(t(M),{color:e.color,label:e.label,variant:t(V).Soft},null,8,["color","label","variant"])],10,E))}),H=["data-testid"],D=/* @__PURE__ */e({name:"CLInputColorTools",__name:"CLInputColorTools",props:{copied:{type:Boolean,default:!1},initialValue:{default:void 0},modelValue:{default:void 0},size:{default:S.Small},testId:{default:"clll-input-color-tools"}},emits:["copy","reset","update:copied"],setup(e,{emit:l}){const d=e,n=l,u="clll-input",s=p(d.copied),m={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},b=async()=>{try{d.modelValue&&(await navigator.clipboard.writeText(d.modelValue.toString()),s.value=!0,n("update:copied",!0),n("copy"))}catch(e){console.error(e)}},y=()=>{n("reset",d.initialValue)};return c(()=>d.copied,e=>{s.value=e}),c(()=>d.modelValue,()=>{s.value=!1,n("update:copied",!1)}),(l,d)=>(o(),a("span",{class:i(`${u}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(o(),r(t(F),{key:0,"aria-label":"Copy color to clipboard",class:i(`${u}__copy-to-clipboard`),color:t(B).Neutral,"icon-before":t(s)?t(P).Check:t(P).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(s)?"Color copied to clipboard":"Copy color to clipboard",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(o(),r(t(F),{key:1,"aria-label":"Reset selected color",class:i(`${u}__reset-selected-color`),color:t(B).Neutral,"on-click":y,"icon-before":t(P).Restore,"icon-size":m[e.size],size:e.size,title:"Reset selected color",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","variant"])):f("",!0)],10,H))}}),J=["data-testid"],K=["id","name","aria-label","autocomplete","disabled","form","maxlength","minlength","pattern","placeholder","readonly","required","spellcheck","type"],Q=/* @__PURE__ */e({name:"CLInput",__name:"CLInput",props:/* @__PURE__ */m({ariaLabel:{default:void 0},autoComplete:{type:Boolean,default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},charCounter:{type:Boolean,default:!1},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},grouped:{type:Boolean,default:!1},id:{},label:{default:void 0},maxLength:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},minLength:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onInput:{type:Function,default:void 0},onPrefixClick:{type:Function,default:void 0},onSuffixClick:{type:Function,default:void 0},orientation:{default:q.Vertical},pattern:{default:void 0},pill:{default:void 0},placeholder:{default:void 0},prefix:{default:void 0},prefixAriaLabel:{default:void 0},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:S.Small},spellCheck:{type:Boolean,default:void 0},suffix:{default:void 0},suffixAriaLabel:{default:void 0},testId:{default:"clll-input"},type:{default:j.Text},variant:{default:V.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:n}){const s=e,m=n,I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");s.type!==j.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(P).includes(e),V=l(()=>[I,s.borderRadius?`${I}--${s.borderRadius}`:"",s.busy?`${I}--busy`:`${I}--ready`,`${I}--${s.color}`,`${I}--${s.size}`,`${I}--${s.type}`,`${I}--${s.variant}`,s.disabled||s.busy?`${I}--disabled`:`${I}--active`,s.fluid||s.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,s.grouped?`${I}--grouped`:"",s.label?`${I}--haslabel`:"",s.messageType?`${I}--${s.messageType}`:"",s.orientation?`${I}--${s.orientation}`:"",s.pill?`${I}--haspill`:"",s.charCounter&&s.maxLength&&[j.Email,j.None,j.Text,j.Url].includes(s.type)?`${I}--hascharcounter`:"",s.prefix&&![j.Color,j.File].includes(s.type)?`${I}--hasprefix`:"",s.prefix&&![j.Color,j.File].includes(s.type)?R(s.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",s.readonly?`${I}--readonly`:`${I}--writeable`,s.rounded?`${I}--rounded`:`${I}--box`,s.required?`${I}--required`:`${I}--optional`,s.suffix&&![j.Color,j.File].includes(s.type)?`${I}--hassuffix`:"",s.suffix&&![j.Color,j.File].includes(s.type)?R(s.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),M=l(()=>[`${I}__input`,{"--nocolor":s.type===j.Color&&!B.value},{"--input-group":s.grouped||s.prefix||s.suffix}]),N=e=>{B.value=e,m("reset",B.value)},A=e=>{!e.target.closest('button, a, [role="button"]')&&S.value&&S.value.focus()};return c(B,()=>{F.value=!1}),d({inputRef:S}),(l,d)=>(o(),r(X,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(V)),style:_(t(C)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(o(),r($,{key:0,"css-prefix":I,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):f("",!0),v("span",{class:i([`${I}__input-container`,"--focus-within"]),onClick:A},[e.prefix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(U,{key:0,prefix:e.prefix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onPrefixClick,"aria-label":e.prefixAriaLabel,disabled:e.disabled||e.busy},null,8,["prefix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),v("span",{class:i(`${I}__input-border-control`)},[g(v("input",{id:e.id,ref:"input-elem","onUpdate:modelValue":d[0]||(d[0]=e=>B.value=e),name:e.name,"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:i(t(M)),disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,type:e.type,onBlur:d[1]||(d[1]=(...l)=>e.onBlur&&e.onBlur(...l)),onChange:d[2]||(d[2]=(...l)=>e.onChange&&e.onChange(...l)),onFocus:d[3]||(d[3]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:d[4]||(d[4]=(...l)=>e.onInput&&e.onInput(...l))},null,42,K),[[h,B.value]])],2),e.type===t(j).Color?(o(),a("span",{key:1,class:i(`${I}__selected-color`)},u(B.value||"none"),3)):f("",!0),e.type===t(j).Color?(o(),r(D,{key:2,modelValue:B.value,"onUpdate:modelValue":d[5]||(d[5]=e=>B.value=e),copied:t(F),"onUpdate:copied":d[6]||(d[6]=e=>L(F)?F.value=e:null),"initial-value":t(T),size:e.size,onReset:N},null,8,["modelValue","copied","initial-value","size"])):f("",!0),e.suffix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(O,{key:3,suffix:e.suffix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onSuffixClick,"aria-label":e.suffixAriaLabel,disabled:e.disabled||e.busy},null,8,["suffix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),e.charCounter&&e.maxLength&&[t(j).Email,t(j).None,t(j).Text,t(j).Url].includes(e.type)?(o(),r(k,{key:4,color:e.color,"css-prefix":I,"current-length":B.value?B.value.toString().length:0,"max-length":e.maxLength,layout:t(w).Inline,size:e.size},null,8,["color","current-length","max-length","layout","size"])):f("",!0)],2)],14,J),e.pill&&e.label&&e.orientation===t(q).Horizontal?(o(),a("span",{key:0,class:i(`${I}__spacer`)},null,2)):f("",!0),e.pill?(o(),r(G,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(o(),r(z,{key:2,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):f("",!0)]),_:1},8,["fluid","has-pill","has-char-counter","orientation"]))}});Q.Prefix=U,Q.Suffix=O,Q.Pill=G,Q.ColorTools=D;export{Q as CLInput,Q as default};
4
+ import{defineComponent as e,computed as l,createElementBlock as a,openBlock as o,normalizeClass as i,unref as t,createBlock as r,Fragment as d,createTextVNode as n,toDisplayString as u,createVNode as s,ref as p,watch as c,createCommentVNode as f,mergeModels as m,useTemplateRef as b,useModel as y,withCtx as x,createElementVNode as v,normalizeStyle as _,withDirectives as g,vModelDynamic as h,isRef as L}from"vue";import{_ as X,i as C,a as z}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as k}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{_ as I}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{_ as F}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{CLSizes as S,CLColors as B,CLBorderRadius as T,CLIconSizes as R,CLColorVariants as V,CLIconNames as P,CLInputTypes as j,CLOrientation as q,CLCharCounterLayout as w}from"../../../index.js";import{_ as M}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-DCtH-u0_.js";const N=["data-testid"],U=/* @__PURE__ */e({name:"CLInputPrefix",__name:"CLInputPrefix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},prefix:{},size:{default:S.Small},testId:{default:"clll-input-prefix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(s.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.prefix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--left-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.prefix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.prefix)?(o(),r(t(I),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.prefix),1)],64))],8,N))],2))}}),A=["data-testid"],O=/* @__PURE__ */e({name:"CLInputSuffix",__name:"CLInputSuffix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},suffix:{},size:{default:S.Small},testId:{default:"clll-input-suffix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(s.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.suffix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--right-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.suffix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.suffix)?(o(),r(t(I),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.suffix),1)],64))],8,A))],2))}}),E=["data-testid"],G=/* @__PURE__ */e({name:"CLInputPill",__name:"CLInputPill",props:{color:{default:B.Neutral},label:{},testId:{default:"clll-input-pill"}},setup:e=>(l,r)=>(o(),a("span",{class:i("clll-input__pill"),"data-testid":e.testId},[s(t(M),{color:e.color,label:e.label,variant:t(V).Soft},null,8,["color","label","variant"])],10,E))}),H=["data-testid"],D=/* @__PURE__ */e({name:"CLInputColorTools",__name:"CLInputColorTools",props:{copied:{type:Boolean,default:!1},initialValue:{default:void 0},modelValue:{default:void 0},size:{default:S.Small},testId:{default:"clll-input-color-tools"}},emits:["copy","reset","update:copied"],setup(e,{emit:l}){const d=e,n=l,u="clll-input",s=p(d.copied),m={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},b=async()=>{try{d.modelValue&&(await navigator.clipboard.writeText(d.modelValue.toString()),s.value=!0,n("update:copied",!0),n("copy"))}catch(e){console.error(e)}},y=()=>{n("reset",d.initialValue)};return c(()=>d.copied,e=>{s.value=e}),c(()=>d.modelValue,()=>{s.value=!1,n("update:copied",!1)}),(l,d)=>(o(),a("span",{class:i(`${u}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(o(),r(t(F),{key:0,"aria-label":"Copy color to clipboard",class:i(`${u}__copy-to-clipboard`),color:t(B).Neutral,"icon-before":t(s)?t(P).Check:t(P).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(s)?"Color copied to clipboard":"Copy color to clipboard",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(o(),r(t(F),{key:1,"aria-label":"Reset selected color",class:i(`${u}__reset-selected-color`),color:t(B).Neutral,"on-click":y,"icon-before":t(P).Restore,"icon-size":m[e.size],size:e.size,title:"Reset selected color",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","variant"])):f("",!0)],10,H))}}),J=["data-testid"],K=["id","name","aria-label","autocomplete","disabled","form","maxlength","minlength","pattern","placeholder","readonly","required","spellcheck","type"],Q=/* @__PURE__ */e({name:"CLInput",__name:"CLInput",props:/* @__PURE__ */m({ariaLabel:{default:void 0},autoComplete:{type:Boolean,default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},charCounter:{type:Boolean,default:!1},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},grouped:{type:Boolean,default:!1},id:{},label:{default:void 0},maxLength:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},minLength:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onInput:{type:Function,default:void 0},onPrefixClick:{type:Function,default:void 0},onSuffixClick:{type:Function,default:void 0},orientation:{default:q.Vertical},pattern:{default:void 0},pill:{default:void 0},placeholder:{default:void 0},prefix:{default:void 0},prefixAriaLabel:{default:void 0},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:S.Small},spellCheck:{type:Boolean,default:void 0},suffix:{default:void 0},suffixAriaLabel:{default:void 0},testId:{default:"clll-input"},type:{default:j.Text},variant:{default:V.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:n}){const s=e,m=n,I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");s.type!==j.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(P).includes(e),V=l(()=>[I,s.borderRadius?`${I}--${s.borderRadius}`:"",s.busy?`${I}--busy`:`${I}--ready`,`${I}--${s.color}`,`${I}--${s.size}`,`${I}--${s.type}`,`${I}--${s.variant}`,s.disabled||s.busy?`${I}--disabled`:`${I}--active`,s.fluid||s.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,s.grouped?`${I}--grouped`:"",s.label?`${I}--haslabel`:"",s.messageType?`${I}--${s.messageType}`:"",s.orientation?`${I}--${s.orientation}`:"",s.pill?`${I}--haspill`:"",s.charCounter&&s.maxLength&&[j.Email,j.None,j.Text,j.Url].includes(s.type)?`${I}--hascharcounter`:"",s.prefix&&![j.Color,j.File].includes(s.type)?`${I}--hasprefix`:"",s.prefix&&![j.Color,j.File].includes(s.type)?R(s.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",s.readonly?`${I}--readonly`:`${I}--writeable`,s.rounded?`${I}--rounded`:`${I}--box`,s.required?`${I}--required`:`${I}--optional`,s.suffix&&![j.Color,j.File].includes(s.type)?`${I}--hassuffix`:"",s.suffix&&![j.Color,j.File].includes(s.type)?R(s.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),M=l(()=>[`${I}__input`,{"--nocolor":s.type===j.Color&&!B.value},{"--input-group":s.grouped||s.prefix||s.suffix}]),N=e=>{B.value=e,m("reset",B.value)},A=e=>{!e.target.closest('button, a, [role="button"]')&&S.value&&S.value.focus()};return c(B,()=>{F.value=!1}),d({inputRef:S}),(l,d)=>(o(),r(X,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(V)),style:_(t(C)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(o(),r($,{key:0,"css-prefix":I,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):f("",!0),v("span",{class:i([`${I}__input-container`,"--focus-within"]),onClick:A},[e.prefix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(U,{key:0,prefix:e.prefix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onPrefixClick,"aria-label":e.prefixAriaLabel,disabled:e.disabled||e.busy},null,8,["prefix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),v("span",{class:i(`${I}__input-border-control`)},[g(v("input",{id:e.id,ref:"input-elem","onUpdate:modelValue":d[0]||(d[0]=e=>B.value=e),name:e.name,"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:i(t(M)),disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,type:e.type,onBlur:d[1]||(d[1]=(...l)=>e.onBlur&&e.onBlur(...l)),onChange:d[2]||(d[2]=(...l)=>e.onChange&&e.onChange(...l)),onFocus:d[3]||(d[3]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:d[4]||(d[4]=(...l)=>e.onInput&&e.onInput(...l))},null,42,K),[[h,B.value]])],2),e.type===t(j).Color?(o(),a("span",{key:1,class:i(`${I}__selected-color`)},u(B.value||"none"),3)):f("",!0),e.type===t(j).Color?(o(),r(D,{key:2,modelValue:B.value,"onUpdate:modelValue":d[5]||(d[5]=e=>B.value=e),copied:t(F),"onUpdate:copied":d[6]||(d[6]=e=>L(F)?F.value=e:null),"initial-value":t(T),size:e.size,onReset:N},null,8,["modelValue","copied","initial-value","size"])):f("",!0),e.suffix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(O,{key:3,suffix:e.suffix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onSuffixClick,"aria-label":e.suffixAriaLabel,disabled:e.disabled||e.busy},null,8,["suffix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),e.charCounter&&e.maxLength&&[t(j).Email,t(j).None,t(j).Text,t(j).Url].includes(e.type)?(o(),r(k,{key:4,color:e.color,"css-prefix":I,"current-length":B.value?B.value.toString().length:0,"max-length":e.maxLength,layout:t(w).Inline,size:e.size},null,8,["color","current-length","max-length","layout","size"])):f("",!0)],2)],14,J),e.pill&&e.label&&e.orientation===t(q).Horizontal?(o(),a("span",{key:0,class:i(`${I}__spacer`)},null,2)):f("",!0),e.pill?(o(),r(G,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(o(),r(z,{key:2,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):f("",!0)]),_:1},8,["fluid","has-pill","has-char-counter","orientation"]))}});Q.Prefix=U,Q.Suffix=O,Q.Pill=G,Q.ColorTools=D;export{Q as CLInput,Q as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInputDatePicker.css';
3
- import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as u,computed as d,onMounted as n,onBeforeUnmount as o,createElementBlock as s,openBlock as i,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as v,normalizeStyle as c,withCtx as b,createElementVNode as y}from"vue";import{u as g,a as _,o as h,f as k,s as C}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as D}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-DPQxSLkQ.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BAfGE35e.js";import{CLIconNames as I,CLColorVariants as L,CLPlacement as V,CLOrientation as M,CLSizes as x,CLColors as B}from"../../../index.js";import{i as j}from"../../../chunks/helper-C542dSLs.js";import{useEsc as E}from"../../../composables/useEsc.js";import{useDateInputMask as F}from"../../../composables/useDateInputMask.js";const S=/* @__PURE__ */e({name:"CLInputDatePicker",__name:"CLInputDatePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:B.Neutral},size:{default:x.Small},variant:{default:L.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},id:{},isRange:{type:Boolean,default:!0},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},orientation:{default:M.Vertical},placement:{default:V.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-date-picker"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,V="clll-input-date-picker",M=l(!1),x=l(),B=l(),S=l(),$=t(e,"modelValue"),z=l(""),{handleDateInput:w,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?z.value=`${e} - ${l}`:z.value=e:z.value=""},{immediate:!0,deep:!0});const P=d(()=>x.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),k(),C()],placement:l(a.placement),whileElementsMounted:_,open:M}),G=()=>{a.disabled||a.busy||(M.value=!M.value,M.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=d(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{M.value&&(M.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=x.value?.$el,t=S.value;M.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&N()},J=()=>{H.value&&(B.value?.apply(),N(),a.onChange?.())},K=e=>{const l=O(e,a.isRange),t=x.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&w(e,z,a.isRange,()=>{K(z.value)})},W=e=>{if(!e)return;const l=e.target.value,t=K(l);if(!l.trim())return $.value={start:null,end:null},void a.onChange?.();if(t){if(a.isRange){const[e,a]=l.split("-").map(e=>e.trim());$.value={start:T(e),end:T(a)}}else $.value={start:T(l.trim()),end:null};a.onChange?.()}};return n(()=>{j&&document.addEventListener("click",A)}),o(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(i(),s("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{ref_key:"inputRef",ref:x,modelValue:p(z),"onUpdate:modelValue":l[0]||(l[0]=e=>v(z)?z.value=e:null),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,id:e.id,label:e.label,messages:e.messages,"message-type":e.messageType,name:e.name,orientation:e.orientation,placeholder:e.placeholder||(e.isRange?"YYYY/MM/DD - YYYY/MM/DD":"YYYY/MM/DD"),required:e.required,rounded:e.rounded,size:e.size,suffix:p(I).Calendar,"suffix-aria-label":e.ariaLabel||"Open calendar","test-id":e.testId,variant:e.variant,onInput:Q,onChange:W,onSuffixClick:G},null,8,["modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","id","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),p(M)?(i(),s("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:c({...p(U),zIndex:100})},[f(p(D),{"border-radius":e.borderRadius,variant:p(L).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:b(()=>[y("div",{class:r(`${V}__calendar-container`)},[f(p(R),{ref_key:"calendarRef",ref:B,modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=e=>$.value=e),disabled:e.disabled,busy:e.busy,"is-range":e.isRange,onDateSelect:J,fluid:""},null,8,["modelValue","disabled","busy","is-range"])],2)]),_:1},8,["border-radius","variant","rounded"])],6)):m("",!0)],2))}});export{S as CLInputDatePicker,S as default};
3
+ import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as u,computed as d,onMounted as n,onBeforeUnmount as o,createElementBlock as s,openBlock as i,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as v,normalizeStyle as c,withCtx as b,createElementVNode as y}from"vue";import{u as g,a as _,o as h,f as k,s as C}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as D}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BGKjh5vA.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js";import{CLIconNames as I,CLColorVariants as L,CLPlacement as V,CLOrientation as M,CLSizes as x,CLColors as B}from"../../../index.js";import{i as j}from"../../../chunks/helper-C542dSLs.js";import{useEsc as E}from"../../../composables/useEsc.js";import{useDateInputMask as F}from"../../../composables/useDateInputMask.js";const S=/* @__PURE__ */e({name:"CLInputDatePicker",__name:"CLInputDatePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:B.Neutral},size:{default:x.Small},variant:{default:L.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},id:{},isRange:{type:Boolean,default:!0},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},orientation:{default:M.Vertical},placement:{default:V.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-date-picker"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,V="clll-input-date-picker",M=l(!1),x=l(),B=l(),S=l(),$=t(e,"modelValue"),z=l(""),{handleDateInput:w,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?z.value=`${e} - ${l}`:z.value=e:z.value=""},{immediate:!0,deep:!0});const P=d(()=>x.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),k(),C()],placement:l(a.placement),whileElementsMounted:_,open:M}),G=()=>{a.disabled||a.busy||(M.value=!M.value,M.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=d(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{M.value&&(M.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=x.value?.$el,t=S.value;M.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&N()},J=()=>{H.value&&(B.value?.apply(),N(),a.onChange?.())},K=e=>{const l=O(e,a.isRange),t=x.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&w(e,z,a.isRange,()=>{K(z.value)})},W=e=>{if(!e)return;const l=e.target.value,t=K(l);if(!l.trim())return $.value={start:null,end:null},void a.onChange?.();if(t){if(a.isRange){const[e,a]=l.split("-").map(e=>e.trim());$.value={start:T(e),end:T(a)}}else $.value={start:T(l.trim()),end:null};a.onChange?.()}};return n(()=>{j&&document.addEventListener("click",A)}),o(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(i(),s("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{ref_key:"inputRef",ref:x,modelValue:p(z),"onUpdate:modelValue":l[0]||(l[0]=e=>v(z)?z.value=e:null),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,id:e.id,label:e.label,messages:e.messages,"message-type":e.messageType,name:e.name,orientation:e.orientation,placeholder:e.placeholder||(e.isRange?"YYYY/MM/DD - YYYY/MM/DD":"YYYY/MM/DD"),required:e.required,rounded:e.rounded,size:e.size,suffix:p(I).Calendar,"suffix-aria-label":e.ariaLabel||"Open calendar","test-id":e.testId,variant:e.variant,onInput:Q,onChange:W,onSuffixClick:G},null,8,["modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","id","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),p(M)?(i(),s("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:c({...p(U),zIndex:100})},[f(p(D),{"border-radius":e.borderRadius,variant:p(L).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:b(()=>[y("div",{class:r(`${V}__calendar-container`)},[f(p(R),{ref_key:"calendarRef",ref:B,modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=e=>$.value=e),disabled:e.disabled,busy:e.busy,"is-range":e.isRange,onDateSelect:J,fluid:""},null,8,["modelValue","disabled","busy","is-range"])],2)]),_:1},8,["border-radius","variant","rounded"])],6)):m("",!0)],2))}});export{S as CLInputDatePicker,S as default};
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLSelect.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,s as L,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as C}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as X}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-yF4CdZbV.js";import{CLSizes as q,CLIconSizes as x,CLOrientation as z,CLIconNames as B,CLColorVariants as k,CLColors as T}from"../../../index.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:T.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:z.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:q.Small},testId:{default:"clll-select"},variant:{default:k.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const k={[q.Tiny]:x.Tiny,[q.Small]:x.Tiny,[q.Medium]:x.Small,[q.Large]:x.Medium,[q.XL]:x.Medium,[q.XXL]:x.Large,[q.XXXL]:x.Large,[q.XXXXL]:x.XL},T=e,V="clll-select",j=l(e,"modelValue"),I=s("select-ref"),R=()=>{I.value&&I.value.focus()},w=o(()=>[V,T.borderRadius?`${V}--${T.borderRadius}`:"",T.busy?`${V}--busy`:`${V}--ready`,`${V}--${T.color}`,`${V}--${T.size}`,`${V}--${T.variant}`,T.disabled||T.busy?`${V}--disabled`:`${V}--active`,T.fluid||T.orientation===z.Horizontal?`${V}--fluid`:`${V}--fixed`,T.label?`${V}--haslabel`:"",T.messageType?`${V}--${T.messageType}`:"",T.orientation?`${V}--${T.orientation}`:"",T.rounded?`${V}--rounded`:`${V}--box`,T.required?`${V}--required`:`${V}--optional`]);return a({selectRef:I}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(w)),style:u(c(L)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(t(),i(C,{key:0,"css-prefix":V,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):n("",!0),d("span",{class:m(`${V}__select-container`),onClick:R},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${V}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===j.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,j.value]]),d("span",{class:m([`${V}__icon`,"form-select-icon-flex"])},[v(c(X),{name:c(B).ChevronDown,size:k[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
4
+ import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,s as L,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as C}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as X}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js";import{CLSizes as q,CLIconSizes as x,CLOrientation as z,CLIconNames as B,CLColorVariants as k,CLColors as T}from"../../../index.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:T.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:z.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:q.Small},testId:{default:"clll-select"},variant:{default:k.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const k={[q.Tiny]:x.Tiny,[q.Small]:x.Tiny,[q.Medium]:x.Small,[q.Large]:x.Medium,[q.XL]:x.Medium,[q.XXL]:x.Large,[q.XXXL]:x.Large,[q.XXXXL]:x.XL},T=e,V="clll-select",j=l(e,"modelValue"),I=s("select-ref"),R=()=>{I.value&&I.value.focus()},w=o(()=>[V,T.borderRadius?`${V}--${T.borderRadius}`:"",T.busy?`${V}--busy`:`${V}--ready`,`${V}--${T.color}`,`${V}--${T.size}`,`${V}--${T.variant}`,T.disabled||T.busy?`${V}--disabled`:`${V}--active`,T.fluid||T.orientation===z.Horizontal?`${V}--fluid`:`${V}--fixed`,T.label?`${V}--haslabel`:"",T.messageType?`${V}--${T.messageType}`:"",T.orientation?`${V}--${T.orientation}`:"",T.rounded?`${V}--rounded`:`${V}--box`,T.required?`${V}--required`:`${V}--optional`]);return a({selectRef:I}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(w)),style:u(c(L)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(t(),i(C,{key:0,"css-prefix":V,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):n("",!0),d("span",{class:m(`${V}__select-container`),onClick:R},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${V}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===j.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,j.value]]),d("span",{class:m([`${V}__icon`,"form-select-icon-flex"])},[v(c(X),{name:c(B).ChevronDown,size:k[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLBanner.css';
3
- import{defineComponent as e,computed as t,createBlock as o,openBlock as a,unref as i,withCtx as n,createElementVNode as s,normalizeStyle as l,normalizeClass as r,createElementBlock as d,createCommentVNode as u,createTextVNode as c,toDisplayString as _,createVNode as b}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as f}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as k}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js";import{_ as p}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as v,CLColors as g,CLAlign as $,CLHeadingTypes as h,CLTextTypes as L,CLSizes as C,CLIconSizes as x,CLIconNames as B}from"../../../index.js";import{a as j}from"../../../chunks/utils-CCWSWRuR.js";const S=["data-testid"],D=/* @__PURE__ */e({name:"CLBanner",__name:"CLBanner",props:{actionLabel:{},align:{default:$.Left},ariaLabel:{},bordered:{type:Boolean,default:!0},borderRadius:{},busy:{type:Boolean,default:!1},color:{default:g.Neutral},height:{default:"auto"},message:{},onAction:{},onClick:{},onDismiss:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-banner"},title:{},width:{default:"100%"},variant:{default:v.Soft}},setup(e){const g=e,$="clll-banner",D=t(()=>[$,g.actionLabel?`${$}--actionable`:"",g.busy?`${$}--busy`:`${$}--ready`,g.bordered&&g.variant!==v.Ghost?`${$}--bordered`:"",g.borderRadius?`${$}--${g.borderRadius}`:"",g.onDismiss?`${$}--dismissable`:"",`${$}--${g.color}--${g.variant}`,`${$}--align-${g.align}`,g.rounded?`${$}--rounded`:`${$}--box`]);return(t,g)=>(a(),o(i(y),{color:e.color,enabled:!(!e.onClick||!e.ariaLabel),rounded:e.rounded},{default:n(()=>[s("div",{class:r(i(D)),"data-testid":e.testId,style:l({...i(j)({color:e.color,variant:e.variant}),width:e.width,height:e.height})},[s("div",{class:r(`${$}__content`)},[s("div",{class:r(`${$}__nested_content`)},[e.busy?(a(),o(i(k),{key:0,"border-radius":e.borderRadius,height:"28px","test-id":`${$}__skeleton-title`},null,8,["border-radius","test-id"])):u("",!0),e.busy?(a(),o(i(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px","test-id":`${$}__skeleton-message`},null,8,["border-radius","test-id"])):u("",!0),e.title&&!e.busy?(a(),o(i(f),{key:2,align:e.align,color:e.color,type:i(h).Section},{default:n(()=>[c(_(e.title),1)]),_:1},8,["align","color","type"])):u("",!0),e.message&&!e.busy?(a(),o(i(p),{key:3,align:e.align,color:e.color,type:i(L).Summary},{default:n(()=>[c(_(e.message),1)]),_:1},8,["align","color","type"])):u("",!0)],2),e.onAction&&e.actionLabel?(a(),d("div",{key:0,class:r(`${$}__action-button`)},[b(i(m),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${$}__action-button`,variant:e.variant===i(v).Solid?i(v).Soft:i(v).Solid},{default:n(()=>[c(_(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):u("",!0)],2),e.onDismiss?(a(),d("div",{key:0,class:r(`${$}__dismiss-button`)},[b(i(m),{"aria-label":"Dismiss banner",color:e.color,"icon-before":i(B).Delete,"icon-size":i(x).Tiny,"on-click":e.onDismiss,size:i(C).Tiny,"test-id":`${$}__dismiss-button`,variant:e.variant},null,8,["color","icon-before","icon-size","on-click","size","test-id","variant"])],2)):u("",!0),e.onClick&&e.ariaLabel?(a(),d("button",{key:1,class:"sr-only","data-expand-click-area":"",onClick:g[0]||(g[0]=(...t)=>e.onClick&&e.onClick(...t))},_(e.ariaLabel),1)):u("",!0)],14,S)]),_:1},8,["color","enabled","rounded"]))}});export{D as CLBanner,D as default};
3
+ import{defineComponent as e,computed as t,createBlock as o,openBlock as a,unref as i,withCtx as n,createElementVNode as s,normalizeStyle as l,normalizeClass as r,createElementBlock as d,createCommentVNode as u,createTextVNode as c,toDisplayString as _,createVNode as b}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as f}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";import{_ as k}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js";import{_ as p}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLColorVariants as v,CLColors as g,CLAlign as $,CLHeadingTypes as h,CLTextTypes as L,CLSizes as C,CLIconSizes as x,CLIconNames as B}from"../../../index.js";import{a as j}from"../../../chunks/utils-CCWSWRuR.js";const S=["data-testid"],D=/* @__PURE__ */e({name:"CLBanner",__name:"CLBanner",props:{actionLabel:{},align:{default:$.Left},ariaLabel:{},bordered:{type:Boolean,default:!0},borderRadius:{},busy:{type:Boolean,default:!1},color:{default:g.Neutral},height:{default:"auto"},message:{},onAction:{},onClick:{},onDismiss:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-banner"},title:{},width:{default:"100%"},variant:{default:v.Soft}},setup(e){const g=e,$="clll-banner",D=t(()=>[$,g.actionLabel?`${$}--actionable`:"",g.busy?`${$}--busy`:`${$}--ready`,g.bordered&&g.variant!==v.Ghost?`${$}--bordered`:"",g.borderRadius?`${$}--${g.borderRadius}`:"",g.onDismiss?`${$}--dismissable`:"",`${$}--${g.color}--${g.variant}`,`${$}--align-${g.align}`,g.rounded?`${$}--rounded`:`${$}--box`]);return(t,g)=>(a(),o(i(y),{color:e.color,enabled:!(!e.onClick||!e.ariaLabel),rounded:e.rounded},{default:n(()=>[s("div",{class:r(i(D)),"data-testid":e.testId,style:l({...i(j)({color:e.color,variant:e.variant}),width:e.width,height:e.height})},[s("div",{class:r(`${$}__content`)},[s("div",{class:r(`${$}__nested_content`)},[e.busy?(a(),o(i(k),{key:0,"border-radius":e.borderRadius,height:"28px","test-id":`${$}__skeleton-title`},null,8,["border-radius","test-id"])):u("",!0),e.busy?(a(),o(i(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px","test-id":`${$}__skeleton-message`},null,8,["border-radius","test-id"])):u("",!0),e.title&&!e.busy?(a(),o(i(f),{key:2,align:e.align,color:e.color,type:i(h).Section},{default:n(()=>[c(_(e.title),1)]),_:1},8,["align","color","type"])):u("",!0),e.message&&!e.busy?(a(),o(i(p),{key:3,align:e.align,color:e.color,type:i(L).Summary},{default:n(()=>[c(_(e.message),1)]),_:1},8,["align","color","type"])):u("",!0)],2),e.onAction&&e.actionLabel?(a(),d("div",{key:0,class:r(`${$}__action-button`)},[b(i(m),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${$}__action-button`,variant:e.variant===i(v).Solid?i(v).Soft:i(v).Solid},{default:n(()=>[c(_(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):u("",!0)],2),e.onDismiss?(a(),d("div",{key:0,class:r(`${$}__dismiss-button`)},[b(i(m),{"aria-label":"Dismiss banner",color:e.color,"icon-before":i(B).Delete,"icon-size":i(x).Tiny,"on-click":e.onDismiss,size:i(C).Tiny,"test-id":`${$}__dismiss-button`,variant:e.variant},null,8,["color","icon-before","icon-size","on-click","size","test-id","variant"])],2)):u("",!0),e.onClick&&e.ariaLabel?(a(),d("button",{key:1,class:"sr-only","data-expand-click-area":"",onClick:g[0]||(g[0]=(...t)=>e.onClick&&e.onClick(...t))},_(e.ariaLabel),1)):u("",!0)],14,S)]),_:1},8,["color","enabled","rounded"]))}});export{D as CLBanner,D as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLPill.css';
3
- import{_ as e}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-BVsLNnfE.js";export{e as CLPill,e as default};
3
+ import{_ as e}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-DCtH-u0_.js";export{e as CLPill,e as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLModal.css';
3
- import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-CwdYGfO9.js";export{a as CLModal,a as default};
3
+ import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js";export{a as CLModal,a as default};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLModalDatePicker.css';
3
- import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,onBeforeUnmount as o,createElementBlock as i,openBlock as u,normalizeClass as n,unref as r,createVNode as s,withCtx as b,createTextVNode as c,toDisplayString as f,createElementVNode as p,nextTick as v}from"vue";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-3vGTMU-k.js";import{_ as y}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-CwdYGfO9.js";import{_}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BAfGE35e.js";import{CLSizes as L,CLIconSizes as X,CLIconNames as $,CLBorderRadius as g,CLColorVariants as k,CLColors as h}from"../../../index.js";import{i as C}from"../../../chunks/helper-C542dSLs.js";import{useDatePicker as w}from"../../../composables/useDatePicker.js";const B=["data-testid"],S=/* @__PURE__ */e({name:"CLModalDatePicker",__name:"CLModalDatePicker",props:/* @__PURE__ */a({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:h.Primary},buttonLabel:{default:"Select dates"},buttonSize:{default:L.Small},buttonVariant:{default:k.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},id:{},isRange:{type:Boolean,default:!0},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},rounded:{type:Boolean,default:!1},testId:{default:"clll-date-picker-modal"},title:{default:"Select dates"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,S="clll-date-picker-modal",z=t(!1),R=l(()=>`date-picker-modal-${a.id}`),x=t(),V=d(e,"modelValue"),{rangeLabel:M}=w({appliedStart:l(()=>V.value?.start??null),appliedEnd:l(()=>V.value?.end??null),isRange:a.isRange}),E=t(!1),F=()=>{C&&(E.value=window.innerWidth<480)},j=()=>{if(a.disabled||a.busy)return;F(),z.value=!0,v(()=>{x.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});a.onFocus?.(e)},P=()=>{z.value=!1,x.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});a.onBlur?.(e)},D=()=>{x.value?.apply(),z.value=!1,a.onChange?.()},W=()=>{x.value?.reset(),a.onChange?.()},A=l(()=>E.value);C&&(F(),window.addEventListener("resize",F),o(()=>{window.removeEventListener("resize",F)}));const I={[L.Tiny]:X.Tiny,[L.Small]:X.Small,[L.Medium]:X.Medium,[L.Large]:X.Large,[L.XL]:X.XL,[L.XXL]:X.XXL,[L.XXXL]:X.XXXL,[L.XXXXL]:X.XXXXL},N=l(()=>[S,a.buttonBorderRadius?`${S}--${a.buttonBorderRadius}`:"",a.busy?`${S}--busy`:`${S}--ready`,`${S}--${a.buttonColor}`,`${S}--${a.buttonSize}`,`${S}--${a.buttonVariant}`,a.disabled||a.busy?`${S}--disabled`:`${S}--active`,a.fluid?`${S}--fluid`:`${S}--fixed`,a.rounded?`${S}--rounded`:`${S}--box`]),G=l(()=>{const e=x.value?.draftStart,t=x.value?.draftEnd;return a.isRange?!!e&&!!t:!!e});return(a,t)=>(u(),i("div",{class:n(r(N)),"data-testid":e.testId},[s(r(m),{"aria-label":e.buttonAriaLabel||"Open date picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":r($).Calendar,"icon-size":I[e.buttonSize],"on-click":j,rounded:e.rounded,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:b(()=>[c(f(r(M)||e.buttonLabel),1)]),_:1},8,["aria-label","border-radius","busy","color","disabled","icon-before","icon-size","rounded","test-id","size","variant","width","wrap"]),s(r(y),{"border-radius":r(A)?r(g).None:r(g).Medium,fullscreen:r(A),"is-open":r(z),"max-width":"336px","modal-id":r(R),"on-close":P,title:e.title},{body:b(()=>[s(r(_),{ref_key:"calendarRef",ref:x,modelValue:V.value,"onUpdate:modelValue":t[0]||(t[0]=e=>V.value=e),busy:e.busy,disabled:e.disabled,fluid:r(A),"is-range":e.isRange},null,8,["modelValue","busy","disabled","fluid","is-range"])]),footer:b(()=>[p("div",{class:n(`${S}__footer-actions`)},[s(r(m),{color:r(h).Neutral,"on-click":P,variant:r(k).Ghost},{default:b(()=>[...t[1]||(t[1]=[c(" Cancel ",-1)])]),_:1},8,["color","variant"]),p("div",{class:n(`${S}__footer-right`)},[s(r(m),{color:r(h).Neutral,disabled:!r(x)?.draftStart&&!r(x)?.draftEnd,"on-click":W,variant:r(k).Ghost},{default:b(()=>[...t[2]||(t[2]=[c(" Reset ",-1)])]),_:1},8,["color","disabled","variant"]),s(r(m),{color:r(h).Primary,disabled:!r(G),"on-click":D},{default:b(()=>[...t[3]||(t[3]=[c(" Apply ",-1)])]),_:1},8,["color","disabled"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,B))}});export{S as CLModalDatePicker,S as default};
3
+ import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,onMounted as o,onBeforeUnmount as i,createElementBlock as u,openBlock as n,normalizeClass as r,unref as s,createVNode as b,withCtx as c,createTextVNode as f,toDisplayString as p,createElementVNode as v,nextTick as m}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js";import{_ as L}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js";import{CLSizes as X,CLIconSizes as $,CLIconNames as g,CLBorderRadius as k,CLColorVariants as h,CLColors as C}from"../../../index.js";import{i as w}from"../../../chunks/helper-C542dSLs.js";import{useDatePicker as B}from"../../../composables/useDatePicker.js";const S=["data-testid"],z=/* @__PURE__ */e({name:"CLModalDatePicker",__name:"CLModalDatePicker",props:/* @__PURE__ */a({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:C.Primary},buttonLabel:{default:"Select dates"},buttonSize:{default:X.Small},buttonVariant:{default:h.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},id:{},isRange:{type:Boolean,default:!0},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},rounded:{type:Boolean,default:!1},testId:{default:"clll-date-picker-modal"},title:{default:"Select dates"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,z="clll-date-picker-modal",R=t(!1),x=l(()=>`date-picker-modal-${a.id}`),V=t(),M=d(e,"modelValue"),{rangeLabel:E}=B({appliedStart:l(()=>M.value?.start??null),appliedEnd:l(()=>M.value?.end??null),isRange:a.isRange}),F=t(!1),j=()=>{w&&(F.value=window.innerWidth<480)},P=()=>{if(a.disabled||a.busy)return;j(),R.value=!0,m(()=>{V.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});a.onFocus?.(e)},D=()=>{R.value=!1,V.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});a.onBlur?.(e)},W=()=>{V.value?.apply(),R.value=!1,a.onChange?.()},A=()=>{V.value?.reset(),a.onChange?.()},I=l(()=>F.value);o(()=>{w&&(j(),window.addEventListener("resize",j))}),i(()=>{w&&window.removeEventListener("resize",j)});const N={[X.Tiny]:$.Tiny,[X.Small]:$.Small,[X.Medium]:$.Medium,[X.Large]:$.Large,[X.XL]:$.XL,[X.XXL]:$.XXL,[X.XXXL]:$.XXXL,[X.XXXXL]:$.XXXXL},G=l(()=>[z,a.buttonBorderRadius?`${z}--${a.buttonBorderRadius}`:"",a.busy?`${z}--busy`:`${z}--ready`,`${z}--${a.buttonColor}`,`${z}--${a.buttonSize}`,`${z}--${a.buttonVariant}`,a.disabled||a.busy?`${z}--disabled`:`${z}--active`,a.fluid?`${z}--fluid`:`${z}--fixed`,a.rounded?`${z}--rounded`:`${z}--box`]),T=l(()=>{const e=V.value?.draftStart,t=V.value?.draftEnd;return a.isRange?!!e&&!!t:!!e});return(a,t)=>(n(),u("div",{class:r(s(G)),"data-testid":e.testId},[b(s(y),{"aria-label":e.buttonAriaLabel||"Open date picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":s(g).Calendar,"icon-size":N[e.buttonSize],"on-click":P,rounded:e.rounded,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:c(()=>[f(p(s(E)||e.buttonLabel),1)]),_:1},8,["aria-label","border-radius","busy","color","disabled","icon-before","icon-size","rounded","test-id","size","variant","width","wrap"]),b(s(_),{"border-radius":s(I)?s(k).None:s(k).Medium,fullscreen:s(I),"is-open":s(R),"max-width":"336px","modal-id":s(x),"on-close":D,title:e.title},{body:c(()=>[b(s(L),{ref_key:"calendarRef",ref:V,modelValue:M.value,"onUpdate:modelValue":t[0]||(t[0]=e=>M.value=e),busy:e.busy,disabled:e.disabled,fluid:s(I),"is-range":e.isRange},null,8,["modelValue","busy","disabled","fluid","is-range"])]),footer:c(()=>[v("div",{class:r(`${z}__footer-actions`)},[b(s(y),{color:s(C).Neutral,"on-click":D,variant:s(h).Ghost},{default:c(()=>[...t[1]||(t[1]=[f(" Cancel ",-1)])]),_:1},8,["color","variant"]),v("div",{class:r(`${z}__footer-right`)},[b(s(y),{color:s(C).Neutral,disabled:!s(V)?.draftStart&&!s(V)?.draftEnd,"on-click":A,variant:s(h).Ghost},{default:c(()=>[...t[2]||(t[2]=[f(" Reset ",-1)])]),_:1},8,["color","disabled","variant"]),b(s(y),{color:s(C).Primary,disabled:!s(T),"on-click":W},{default:c(()=>[...t[3]||(t[3]=[f(" Apply ",-1)])]),_:1},8,["color","disabled"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,S))}});export{z as CLModalDatePicker,z as default};