@codeandfunction/callaloo 5.20.2 → 5.22.0

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 (50) hide show
  1. package/dist/callaloo.global.js +1 -1
  2. package/dist/chunks/CLBadge.vue_vue_type_style_index_0_lang-C03m_R_c.js +2 -0
  3. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js +2 -0
  4. package/dist/chunks/{CLCalendar.vue_vue_type_style_index_0_lang-B2c3R_eo.js → CLCalendar.vue_vue_type_style_index_0_lang-CTVzNLog.js} +1 -1
  5. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-BqfDwuqz.js → CLCard.vue_vue_type_style_index_0_lang-BBOuR1kL.js} +1 -1
  6. package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-0GTnIrod.js → CLFormLabel.vue_vue_type_script_setup_true_lang-BM767yIM.js} +1 -1
  7. package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-DP9O-gHu.js → CLHeading.vue_vue_type_style_index_0_lang-BnYA-db5.js} +1 -1
  8. package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-CJ9DJWEy.js → CLModal.vue_vue_type_style_index_0_lang-B0Q7BwUW.js} +1 -1
  9. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-CknufCvq.js → CLPill.vue_vue_type_style_index_0_lang-DzfYfqQl.js} +1 -1
  10. package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js → CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js} +1 -1
  11. package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-Cr6pyZr3.js → CLToast.vue_vue_type_style_index_0_lang-CyZeRWVs.js} +1 -1
  12. package/dist/chunks/utils-Bz2onxXq.js +1 -0
  13. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  14. package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +3 -0
  15. package/dist/components/CLTable/CLTable.js +1 -1
  16. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  17. package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
  18. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
  19. package/dist/components/Containers/CLDisclosure/CLDisclosure.vue.d.ts +1 -0
  20. package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
  21. package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
  22. package/dist/components/Form/CLInput/CLInput.js +1 -1
  23. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
  24. package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.js +1 -1
  25. package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -1
  26. package/dist/components/Form/CLSelect/CLSelect.js +1 -1
  27. package/dist/components/Form/CLTextArea/CLTextArea.js +1 -1
  28. package/dist/components/Form/CLTimePicker/CLTimePicker.js +1 -1
  29. package/dist/components/Indicators/CLBadge/CLBadge.css +1 -1
  30. package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
  31. package/dist/components/Indicators/CLBadge/CLBadge.vue.d.ts +3 -0
  32. package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
  33. package/dist/components/Indicators/CLPill/CLPill.js +1 -1
  34. package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
  35. package/dist/components/Modals/CLModal/CLModal.js +1 -1
  36. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
  37. package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.js +1 -1
  38. package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
  39. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
  40. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +4 -1
  41. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  42. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  43. package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
  44. package/dist/components/Typography/CLText/CLText.js +1 -1
  45. package/dist/composables/useTheme.js +1 -1
  46. package/dist/styles.css +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunks/CLBadge.vue_vue_type_style_index_0_lang-DXfUBYqW.js +0 -2
  49. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js +0 -2
  50. package/dist/chunks/utils-CCkMvR9Y.js +0 -1
@@ -0,0 +1,2 @@
1
+ import '../components/Indicators/CLBadge/CLBadge.css';
2
+ import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeStyle as d,normalizeClass as o,unref as r,createCommentVNode as s,toDisplayString as i}from"vue";import{c as u,d as n}from"./index-Djy51eo9.js";import{b as c}from"./utils-HL8DrT3H.js";const v=["data-testid"],p=/* @__PURE__ */e({name:"CLBadge",__name:"CLBadge",props:{borderRadius:{},color:{default:n.Neutral},elevated:{type:Boolean,default:!1},label:{default:void 0},limit:{default:void 0},pulse:{type:Boolean,default:!1},testId:{default:"clll-badge"},variant:{default:u.Soft}},setup(e){const u=e,n="clll-badge",p=t(()=>void 0===u.label||null===u.label||""===u.label),f=t(()=>{if(p.value)return"";const e=u.limit??0,t=u.label;return e&&t.toString().length>e?`${t.toString().slice(0,e)}+`:t}),b=t(()=>[n,u.borderRadius?`${n}--${u.borderRadius}`:"",u.elevated?`${n}--elevated`:"",p.value?`${n}--dot`:"",u.pulse?`${n}--pulse`:"",`${n}--${u.color}--${u.variant}`]);return(t,u)=>(l(),a("div",{class:o(r(b)),"data-testid":e.testId,style:d(r(c)({color:e.color,variant:e.variant}))},[r(p)?s("",!0):(l(),a("span",{key:0,class:o(`${n}__count`)},i(r(f)),3))],14,v))}});export{p as _};
@@ -0,0 +1,2 @@
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 s,resolveDynamicComponent as r,normalizeStyle as n,normalizeClass as u,unref as f,withCtx as c,createCommentVNode as b,createElementBlock as p,renderSlot as m}from"vue";import{_ as v}from"./CLBadge.vue_vue_type_style_index_0_lang-C03m_R_c.js";import{_ as y}from"./CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as g}from"./CLSpinner.vue_vue_type_style_index_0_lang-DEt4Ycyj.js";import{CLButtonTypes as _}from"../index.js";import{b as $}from"./utils-CSguj38n.js";import{useHasSlotContent as h}from"../composables/useHasSlotContent.js";import{useTheme as B}from"../composables/useTheme.js";import{c as C,C as L,e as z,d as S,i as X,j,h as k}from"./index-Djy51eo9.js";import{b as w}from"./index-wkMXT2wB.js";const x=/* @__PURE__ */e({name:"CLButton",__name:"CLButton",props:{active:{type:Boolean,default:!1},alignContent:{default:X.Center},ariaLabel:{default:void 0},as:{default:"button"},badge:{type:[Boolean,Number,String],default:void 0},badgeColor:{default:S.Danger},badgeLimit:{default:void 0},badgePulse:{type:Boolean,default:!1},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:S.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:z.Small},onClick:{type:Function,default:void 0},pill:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:L.Small},target:{default:w.Self},testId:{default:"clll-button"},title:{default:void 0},type:{default:_.Button},variant:{default:C.Soft},width:{default:"auto"},wrap:{type:Boolean,default:!1}},setup(e){const _=e,z=B(),S=h();t();const w=a(),x="clll-button",F=o(()=>void 0!==_.badge&&!1!==_.badge&&"false"!==_.badge&&""!==_.badge),I=o(()=>{if("boolean"!=typeof _.badge&&"true"!==_.badge)return _.badge}),R=o(()=>[x,`${x}--${_.type}`,`${x}--${_.color}--${_.variant}`,`${x}--${_.size}`,`${x}--${_.alignContent}`,_.active?`${x}--active`:"",_.busy?`${x}--busy`:"",_.disabled?`${x}--disabled`:"",_.wrap?`${x}--wrapped`:"",_.rounded?`${x}--rounded`:"",_.borderRadius?`${x}--${_.borderRadius}`:"",S.value?`${x}--has-content`:`${x}--no-content`,_.iconBefore?`${x}--icon-before`:"",_.iconAfter?`${x}--icon-after`:"",_.elevated?`${x}--elevated`:"",_.pill?`${x}--pill`:"",F.value?`${x}--has-badge`:""]),A=()=>{switch(_.size){case L.Medium:case L.Large:return L.Small;case L.XL:case L.XXL:return L.Medium;case L.XXXL:return L.Large;case L.XXXXL:return L.XL;case L.Tiny:default:return L.Tiny}};l(()=>{i(()=>{w.value&&_.forwardRef?.(w.value)})});const T=e=>{_.onClick?.(e)};return(t,a)=>(s(),d(r(e.as),{ref_key:"buttonRef",ref:w,"aria-label":e.ariaLabel,class:u(f(R)),"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:n({width:e.width,height:e.height,...f($)({color:e.color,variant:e.variant,theme:f(z)})}),onClick:T},{default:c(()=>[e.iconBefore?(s(),d(f(y),{key:0,filled:e.iconFilled,name:e.iconBefore,size:e.iconSize,"test-id":`${e.testId}-icon-before`},null,8,["filled","name","size","test-id"])):b("",!0),f(S)?(s(),p("span",{key:1,class:u(`${x}__content`)},[m(t.$slots,"default")],2)):b("",!0),e.iconAfter?(s(),d(f(y),{key:2,filled:e.iconFilled,name:e.iconAfter,size:e.iconSize,"test-id":`${e.testId}-icon-after`},null,8,["filled","name","size","test-id"])):b("",!0),e.busy?(s(),d(f(g),{key:3,align:f(X).Center,position:f(j).Absolute,size:A(),color:e.color},null,8,["align","position","size","color"])):b("",!0),f(F)?(s(),d(f(v),{key:4,"border-radius":f(k).Full,class:u(`${x}__badge`),color:e.badgeColor,label:f(I),limit:e.badgeLimit,pulse:e.badgePulse,"test-id":`${e.testId}-badge`,variant:f(C).Solid},null,8,["border-radius","class","color","label","limit","pulse","test-id","variant"])):b("",!0)]),_:3},8,["aria-label","class","data-testid","disabled","form","href","target","title","type","style"]))}});export{x 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 s,createElementBlock as o,openBlock as n,normalizeStyle as u,normalizeClass as c,unref as p,createElementVNode as f,createVNode as v,withCtx as y,createTextVNode as m,toDisplayString as _,Fragment as b,renderList as h,createBlock as D,createCommentVNode as g}from"vue";import{_ as k}from"./CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{_ as w}from"./CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{c as x,C as z,e as C,f as S,h as $,a as j,d as L,i as M}from"./index-Djy51eo9.js";import{c as T}from"./utils-nqwT3s9o.js";import{useDatePicker as B}from"../composables/useDatePicker.js";import{useTheme as P}from"../composables/useTheme.js";const R=["data-testid"],E=/* @__PURE__ */e({name:"CLCalendar",__name:"CLCalendar",props:/* @__PURE__ */a({allowedDates:{type:[Array,Object,Function],default:void 0},color:{default:L.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:E}){l(e=>({v2a0ead45:e.width}));const F=e,G=E,I=P(),N="clll-calendar",V=t(e,"modelValue"),A=i(V.value?.end??null),O=i(V.value?.start??null),{calendarGrid:q,cancelDraft:H,clearDraft:J,currentMonthLabel:K,draftEnd:Q,draftStart:U,getDayAriaLabel:W,handleNextMonth:X,handlePrevMonth:Y,initializeDraft:Z,isDraftEnd:ee,isDraftSameDay:ae,isDraftStart:le,isInDraftRange:te,onDayClick:ie,weekDays:de}=B({allowedDates:d(F,"allowedDates"),appliedEnd:A,appliedStart:O,isRange:d(F,"isRange")});r(V,e=>{O.value=e?.start??null,A.value=e?.end??null,Z()},{deep:!0}),s(()=>{Z()});return a({apply:()=>{O.value=U.value,A.value=Q.value,V.value={end:A.value,start:O.value}},cancel:()=>{H()},draftEnd:Q,draftStart:U,initializeDraft:Z,reset:()=>{J(),O.value=null,A.value=null,V.value=null}}),(a,l)=>(n(),o("div",{class:c([N,e.fluid?`${N}__fluid`:""]),"data-testid":e.testId,style:u(p(T)(p(I)))},[f("div",{class:c(`${N}__header`)},[v(p(k),{"aria-label":"Previous month","border-radius":p($).Full,"icon-before":p(S).ChevronLeft,"icon-size":p(C).Tiny,"on-click":p(Y),size:p(z).Tiny,variant:p(x).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"]),v(p(w),{type:p(j).Medium,medium:""},{default:y(()=>[m(_(p(K)),1)]),_:1},8,["type"]),v(p(k),{"aria-label":"Next month","border-radius":p($).Full,"icon-before":p(S).ChevronRight,"icon-size":p(C).Tiny,"on-click":p(X),size:p(z).Tiny,variant:p(x).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"])],2),f("div",{class:c(`${N}__grid`)},[(n(!0),o(b,null,h(p(de),e=>(n(),o("div",{key:e,class:c(`${N}__weekday`)},[v(p(w),{align:p(M).Center,color:p(L).Neutral,type:p(j).Small},{default:y(()=>[m(_(e),1)]),_:2},1032,["align","color","type"])],2))),128)),(n(!0),o(b,null,h(p(q),(a,l)=>(n(),o("div",{key:a.date??`pad-${l}`,class:c([`${N}__cell`,a.isOutsideMonth||a.isDisabled?`${N}__cell--outside`:"",a.date&&p(ae)(a.date)?`${N}__cell--same-day`:""])},[a.day&&a.date?(n(),D(p(k),{key:0,"aria-label":p(W)(a.date),"border-radius":p($).Full,color:p(le)(a.date)||p(ee)(a.date)?e.color:p(L).Secondary,disabled:e.disabled||e.busy||a.isDisabled,size:p(z).Small,height:"100%",width:"100%","on-click":e=>((e,a)=>{a?.preventDefault(),a?.stopPropagation(),F.disabled||F.busy||!e||(ie(e),G("date-select",e))})(a.date,e),variant:p(le)(a.date)||p(ee)(a.date)?p(x).Solid:p(te)(a.date)?p(x).Soft:p(x).Ghost,wrap:""},{default:y(()=>[m(_(a.day),1)]),_:2},1032,["aria-label","border-radius","color","disabled","size","on-click","variant"])):g("",!0)],2))),128))],2)],14,R))}});export{E 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 s,createElementBlock as o,openBlock as n,normalizeStyle as u,normalizeClass as c,unref as p,createElementVNode as f,createVNode as v,withCtx as y,createTextVNode as m,toDisplayString as _,Fragment as b,renderList as h,createBlock as D,createCommentVNode as g}from"vue";import{_ as k}from"./CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{_ as w}from"./CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{c as x,C as z,e as C,f as S,h as $,a as j,d as L,i as M}from"./index-Djy51eo9.js";import{c as T}from"./utils-nqwT3s9o.js";import{useDatePicker as B}from"../composables/useDatePicker.js";import{useTheme as P}from"../composables/useTheme.js";const R=["data-testid"],E=/* @__PURE__ */e({name:"CLCalendar",__name:"CLCalendar",props:/* @__PURE__ */a({allowedDates:{type:[Array,Object,Function],default:void 0},color:{default:L.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:E}){l(e=>({v2a0ead45:e.width}));const F=e,G=E,I=P(),N="clll-calendar",V=t(e,"modelValue"),A=i(V.value?.end??null),O=i(V.value?.start??null),{calendarGrid:q,cancelDraft:H,clearDraft:J,currentMonthLabel:K,draftEnd:Q,draftStart:U,getDayAriaLabel:W,handleNextMonth:X,handlePrevMonth:Y,initializeDraft:Z,isDraftEnd:ee,isDraftSameDay:ae,isDraftStart:le,isInDraftRange:te,onDayClick:ie,weekDays:de}=B({allowedDates:d(F,"allowedDates"),appliedEnd:A,appliedStart:O,isRange:d(F,"isRange")});r(V,e=>{O.value=e?.start??null,A.value=e?.end??null,Z()},{deep:!0}),s(()=>{Z()});return a({apply:()=>{O.value=U.value,A.value=Q.value,V.value={end:A.value,start:O.value}},cancel:()=>{H()},draftEnd:Q,draftStart:U,initializeDraft:Z,reset:()=>{J(),O.value=null,A.value=null,V.value=null}}),(a,l)=>(n(),o("div",{class:c([N,e.fluid?`${N}__fluid`:""]),"data-testid":e.testId,style:u(p(T)(p(I)))},[f("div",{class:c(`${N}__header`)},[v(p(k),{"aria-label":"Previous month","border-radius":p($).Full,"icon-before":p(S).ChevronLeft,"icon-size":p(C).Tiny,"on-click":p(Y),size:p(z).Tiny,variant:p(x).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"]),v(p(w),{type:p(j).Medium,medium:""},{default:y(()=>[m(_(p(K)),1)]),_:1},8,["type"]),v(p(k),{"aria-label":"Next month","border-radius":p($).Full,"icon-before":p(S).ChevronRight,"icon-size":p(C).Tiny,"on-click":p(X),size:p(z).Tiny,variant:p(x).Ghost,height:"32px",width:"32px",wrap:""},null,8,["border-radius","icon-before","icon-size","on-click","size","variant"])],2),f("div",{class:c(`${N}__grid`)},[(n(!0),o(b,null,h(p(de),e=>(n(),o("div",{key:e,class:c(`${N}__weekday`)},[v(p(w),{align:p(M).Center,color:p(L).Neutral,type:p(j).Small},{default:y(()=>[m(_(e),1)]),_:2},1032,["align","color","type"])],2))),128)),(n(!0),o(b,null,h(p(q),(a,l)=>(n(),o("div",{key:a.date??`pad-${l}`,class:c([`${N}__cell`,a.isOutsideMonth||a.isDisabled?`${N}__cell--outside`:"",a.date&&p(ae)(a.date)?`${N}__cell--same-day`:""])},[a.day&&a.date?(n(),D(p(k),{key:0,"aria-label":p(W)(a.date),"border-radius":p($).Full,color:p(le)(a.date)||p(ee)(a.date)?e.color:p(L).Secondary,disabled:e.disabled||e.busy||a.isDisabled,size:p(z).Small,height:"100%",width:"100%","on-click":e=>((e,a)=>{a?.preventDefault(),a?.stopPropagation(),F.disabled||F.busy||!e||(ie(e),G("date-select",e))})(a.date,e),variant:p(le)(a.date)||p(ee)(a.date)?p(x).Solid:p(te)(a.date)?p(x).Soft:p(x).Ghost,wrap:""},{default:y(()=>[m(_(a.day),1)]),_:2},1032,["aria-label","border-radius","color","disabled","size","on-click","variant"])):g("",!0)],2))),128))],2)],14,R))}});export{E 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 s,normalizeStyle as n,normalizeClass as u,unref as c,createCommentVNode as g,createElementVNode as h,createBlock as y,renderSlot as f,Fragment as m,withCtx as b,createTextVNode as _,toDisplayString as v}from"vue";import{_ as $}from"./CLHeading.vue_vue_type_style_index_0_lang-DP9O-gHu.js";import{_ as p}from"./CLLink.vue_vue_type_style_index_0_lang-DW4e29JA.js";import{_ as k}from"./CLSkeleton.vue_vue_type_style_index_0_lang-Cmpsbo-A.js";import{_ as C}from"./CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{c as w,k as x,l as L,d as H,i as T,a as R}from"./index-Djy51eo9.js";import{c as j,b as B,d as S,e as A,f as O}from"./index-wkMXT2wB.js";import{c as W}from"./utils-DWWh7hCm.js";import{useHasSlotContent as E}from"../composables/useHasSlotContent.js";import{useTheme as I}from"../composables/useTheme.js";const N=["data-testid","tabindex"],q=["alt","loading","src"],G={key:0,class:"clll-card__header-skeleton"},K=["alt","loading","src"],M=["aria-label","href","target"],z=/* @__PURE__ */e({name:"CLCard",__name:"CLCard",props:{active:{type:Boolean,default:!1},align:{default:T.Left},ariaLabel:{},borderRadius:{},bordered:{type:Boolean,default:!0},busy:{type:Boolean,default:!1},byline:{},color:{default:H.Neutral},compact:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},forwardRef:{},height:{default:"auto"},href:{},image:{},imageAltText:{default:""},imageHeight:{default:"auto"},imageLoading:{default:A.Eager},imageOrder:{},imageWidth:{default:"auto"},onClick:{},overflow:{default:S.Hidden},padded:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},target:{default:B.Self},testId:{default:"clll-card"},title:{},titleHLevel:{default:j.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=I(),H=e,T=E(),j=a(),B=t(),S=t(),A=["a","button"],z=t(),D=l(()=>[x,`${x}--${H.type}`,`${x}--${H.color}-${H.variant}`,`${x}--${H.variant}`,`${x}--align-${H.align}`,H.rounded?`${x}--rounded`:`${x}--box`,H.bordered?`${x}--bordered`:"",H.borderRadius?`${x}--${H.borderRadius}`:"",H.busy?`${x}--busy`:`${x}--ready`,H.compact?`${x}--compact`:`${x}--no-compact`,H.title||H.byline?`${x}--has-header`:`${x}--no-header`,H.byline?`${x}--has-byline`:`${x}--no-byline`,B.value?`${x}--has-heading`:`${x}--no-heading`,T.value?`${x}--has-content`:`${x}--no-content`,S.value?`${x}--has-footer`:`${x}--no-footer`,H.image?`${x}--has-image`:`${x}--has-no-image`,H.imageOrder?`${x}--image-${H.imageOrder}`:"",H.active?`${x}--active`:`${x}--inactive`,H.onClick?`${x}--has-link`:"",H.truncateTitle?`${x}--has-truncated-title`:"",H.elevated?`${x}--elevated`:"",H.overflow?`${x}--overflow-${H.overflow}`:"",H.padded?"":`${x}--no-padding`]),F=e=>{if(H.busy||!H.onClick)return;const{target:a}=e,t=a?a.closest("a,button"):void 0,l=[...z.value?.querySelectorAll("[data-expand-click-area]")??[]];if(l.length){const a=l[0],i=t?A.includes(t.tagName.toLowerCase()):null;t||a===e.target||i||a.click()}};return i(async()=>{await r(),z.value&&H.forwardRef?.(z.value),B.value=j?.heading,S.value=j?.footer}),(a,t)=>(d(),o("div",{ref_key:"refExpandedArea",ref:z,class:u(c(D)),style:n({...c(W)({color:e.color,variant:e.variant,theme:c(L)}),width:e.width,height:e.height,overflow:e.overflow}),"data-testid":e.testId,tabindex:e.onClick?0:void 0,onClick:F,onKeyup:s(F,["enter"])},[!e.image||e.imageOrder!==c(O).Before&&e.imageOrder?g("",!0):(d(),o("div",{key:0,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),y(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,q)):g("",!0)],6)),h("div",{class:u(`${x}__content`)},[h("div",{class:u(["clll-card__header",{busy:e.busy}])},[e.busy&&(c(B)||e.title||e.byline)?(d(),o("div",G,[c(B)||e.title?(d(),y(c(k),{key:0,"border-radius":e.borderRadius,height:"27px"},null,8,["border-radius"])):g("",!0),e.byline?(d(),y(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(B)&&(e.onClick||e.href)?(d(),y(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:b(()=>[f(a.$slots,"heading"),e.title?(d(),y(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(),y(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(),y(c(C),{key:3,align:e.align,class:u(`${x}__byline`),color:e.color,type:c(R).Small},{default:b(()=>[_(v(e.byline),1)]),_:1},8,["align","class","color","type"])):g("",!0)],2),h("div",{class:u(`${x}__slot`)},[h("div",{ref:"slot-content",class:u([`${x}__slot-content`,{busy:e.busy}])},[c(T)&&e.busy?(d(),y(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"100%"},null,8,["border-radius"])):g("",!0),h("div",null,[f(a.$slots,"default")])],2)],2),h("div",{class:u(["clll-card__footer",{busy:e.busy}])},[c(S)&&e.busy?(d(),y(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(O).After?(d(),o("div",{key:1,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),y(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,K)):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,M)),e.onClick&&e.variant!==c(w).Ghost?(d(),o("div",{key:3,class:u(`${x}__hover-elem`)},null,2)):g("",!0)],46,N))}});export{z 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 s,normalizeStyle as n,normalizeClass as u,unref as c,createCommentVNode as g,createElementVNode as h,createBlock as y,renderSlot as f,Fragment as m,withCtx as b,createTextVNode as _,toDisplayString as v}from"vue";import{_ as $}from"./CLHeading.vue_vue_type_style_index_0_lang-BnYA-db5.js";import{_ as p}from"./CLLink.vue_vue_type_style_index_0_lang-DW4e29JA.js";import{_ as k}from"./CLSkeleton.vue_vue_type_style_index_0_lang-Cmpsbo-A.js";import{_ as C}from"./CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{c as w,k as x,l as L,d as H,i as T,a as R}from"./index-Djy51eo9.js";import{c as j,b as B,d as S,e as A,f as O}from"./index-wkMXT2wB.js";import{c as W}from"./utils-DWWh7hCm.js";import{useHasSlotContent as E}from"../composables/useHasSlotContent.js";import{useTheme as I}from"../composables/useTheme.js";const N=["data-testid","tabindex"],q=["alt","loading","src"],G={key:0,class:"clll-card__header-skeleton"},K=["alt","loading","src"],M=["aria-label","href","target"],z=/* @__PURE__ */e({name:"CLCard",__name:"CLCard",props:{active:{type:Boolean,default:!1},align:{default:T.Left},ariaLabel:{},borderRadius:{},bordered:{type:Boolean,default:!0},busy:{type:Boolean,default:!1},byline:{},color:{default:H.Neutral},compact:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},forwardRef:{},height:{default:"auto"},href:{},image:{},imageAltText:{default:""},imageHeight:{default:"auto"},imageLoading:{default:A.Eager},imageOrder:{},imageWidth:{default:"auto"},onClick:{},overflow:{default:S.Hidden},padded:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},target:{default:B.Self},testId:{default:"clll-card"},title:{},titleHLevel:{default:j.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=I(),H=e,T=E(),j=a(),B=t(),S=t(),A=["a","button"],z=t(),D=l(()=>[x,`${x}--${H.type}`,`${x}--${H.color}-${H.variant}`,`${x}--${H.variant}`,`${x}--align-${H.align}`,H.rounded?`${x}--rounded`:`${x}--box`,H.bordered?`${x}--bordered`:"",H.borderRadius?`${x}--${H.borderRadius}`:"",H.busy?`${x}--busy`:`${x}--ready`,H.compact?`${x}--compact`:`${x}--no-compact`,H.title||H.byline?`${x}--has-header`:`${x}--no-header`,H.byline?`${x}--has-byline`:`${x}--no-byline`,B.value?`${x}--has-heading`:`${x}--no-heading`,T.value?`${x}--has-content`:`${x}--no-content`,S.value?`${x}--has-footer`:`${x}--no-footer`,H.image?`${x}--has-image`:`${x}--has-no-image`,H.imageOrder?`${x}--image-${H.imageOrder}`:"",H.active?`${x}--active`:`${x}--inactive`,H.onClick?`${x}--has-link`:"",H.truncateTitle?`${x}--has-truncated-title`:"",H.elevated?`${x}--elevated`:"",H.overflow?`${x}--overflow-${H.overflow}`:"",H.padded?"":`${x}--no-padding`]),F=e=>{if(H.busy||!H.onClick)return;const{target:a}=e,t=a?a.closest("a,button"):void 0,l=[...z.value?.querySelectorAll("[data-expand-click-area]")??[]];if(l.length){const a=l[0],i=t?A.includes(t.tagName.toLowerCase()):null;t||a===e.target||i||a.click()}};return i(async()=>{await r(),z.value&&H.forwardRef?.(z.value),B.value=j?.heading,S.value=j?.footer}),(a,t)=>(d(),o("div",{ref_key:"refExpandedArea",ref:z,class:u(c(D)),style:n({...c(W)({color:e.color,variant:e.variant,theme:c(L)}),width:e.width,height:e.height,overflow:e.overflow}),"data-testid":e.testId,tabindex:e.onClick?0:void 0,onClick:F,onKeyup:s(F,["enter"])},[!e.image||e.imageOrder!==c(O).Before&&e.imageOrder?g("",!0):(d(),o("div",{key:0,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),y(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,q)):g("",!0)],6)),h("div",{class:u(`${x}__content`)},[h("div",{class:u(["clll-card__header",{busy:e.busy}])},[e.busy&&(c(B)||e.title||e.byline)?(d(),o("div",G,[c(B)||e.title?(d(),y(c(k),{key:0,"border-radius":e.borderRadius,height:"27px"},null,8,["border-radius"])):g("",!0),e.byline?(d(),y(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(B)&&(e.onClick||e.href)?(d(),y(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:b(()=>[f(a.$slots,"heading"),e.title?(d(),y(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(),y(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(),y(c(C),{key:3,align:e.align,class:u(`${x}__byline`),color:e.color,type:c(R).Small},{default:b(()=>[_(v(e.byline),1)]),_:1},8,["align","class","color","type"])):g("",!0)],2),h("div",{class:u(`${x}__slot`)},[h("div",{ref:"slot-content",class:u([`${x}__slot-content`,{busy:e.busy}])},[c(T)&&e.busy?(d(),y(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"100%"},null,8,["border-radius"])):g("",!0),h("div",null,[f(a.$slots,"default")])],2)],2),h("div",{class:u(["clll-card__footer",{busy:e.busy}])},[c(S)&&e.busy?(d(),y(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(O).After?(d(),o("div",{key:1,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),y(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,K)):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,M)),e.onClick&&e.variant!==c(w).Ghost?(d(),o("div",{key:3,class:u(`${x}__hover-elem`)},null,2)):g("",!0)],46,N))}});export{z as _};
@@ -1 +1 @@
1
- import{defineComponent as e,createElementBlock as l,openBlock as a,normalizeClass as s,createVNode as t,unref as r,withCtx as o,createTextVNode as d,toDisplayString as X}from"vue";import{_ as i}from"./CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{C as m,a as f}from"./index-Djy51eo9.js";const u=["for","data-testid"],_=/* @__PURE__ */e({name:"CLFormLabel",__name:"CLFormLabel",props:{cssPrefix:{default:"clll-form"},htmlFor:{},label:{},required:{type:Boolean,default:!1},size:{default:m.Small},testId:{default:"clll-form-label"}},setup(e){const _={[m.Tiny]:f.Tiny,[m.Small]:f.Small,[m.Medium]:f.Medium,[m.Large]:f.Body,[m.XL]:f.XL,[m.XXL]:f.XXL,[m.XXXL]:f.XXXL,[m.XXXXL]:f.XXXXL};return(m,f)=>(a(),l("label",{for:e.htmlFor,class:s(`${e.cssPrefix}__label`),"data-testid":e.testId},[t(r(i),{as:"span",type:_[e.size],class:s(e.required?`${e.cssPrefix}__label--required`:"")},{default:o(()=>[d(X(e.label),1)]),_:1},8,["type","class"])],10,u))}});export{_};
1
+ import{defineComponent as e,createElementBlock as l,openBlock as a,normalizeClass as s,createVNode as t,unref as r,withCtx as o,createTextVNode as d,toDisplayString as X}from"vue";import{_ as i}from"./CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{C as m,a as f}from"./index-Djy51eo9.js";const u=["for","data-testid"],_=/* @__PURE__ */e({name:"CLFormLabel",__name:"CLFormLabel",props:{cssPrefix:{default:"clll-form"},htmlFor:{},label:{},required:{type:Boolean,default:!1},size:{default:m.Small},testId:{default:"clll-form-label"}},setup(e){const _={[m.Tiny]:f.Tiny,[m.Small]:f.Small,[m.Medium]:f.Medium,[m.Large]:f.Body,[m.XL]:f.XL,[m.XXL]:f.XXL,[m.XXXL]:f.XXXL,[m.XXXXL]:f.XXXXL};return(m,f)=>(a(),l("label",{for:e.htmlFor,class:s(`${e.cssPrefix}__label`),"data-testid":e.testId},[t(r(i),{as:"span",type:_[e.size],class:s(e.required?`${e.cssPrefix}__label--required`:"")},{default:o(()=>[d(X(e.label),1)]),_:1},8,["type","class"])],10,u))}});export{_};
@@ -1,2 +1,2 @@
1
1
  import '../components/Typography/CLHeading/CLHeading.css';
2
- import{defineComponent as e,computed as t,createBlock as l,openBlock as a,resolveDynamicComponent as o,unref as s,normalizeStyle as r,normalizeClass as d,withCtx as n,renderSlot as i}from"vue";import{l as c,d as u,i as p}from"./index-Djy51eo9.js";import{c as f}from"./index-wkMXT2wB.js";import{t as m}from"./utils-CCkMvR9Y.js";import{useTheme as $}from"../composables/useTheme.js";const y=/* @__PURE__ */e({name:"CLHeading",__name:"CLHeading",props:{align:{default:p.Left},bolder:{type:Boolean,default:!1},color:{default:u.Secondary},level:{},testId:{default:"clll-heading"},truncate:{type:Boolean,default:!1},type:{default:c.Title}},setup(e){const u=e,p=$(),y="clll-heading",g=t(()=>{if(u.level)return u.level;switch(u.type){case c.Section:return f.H2;case c.SubSection:return f.H3;case c.PageTitle:case c.Title:default:return f.H1}}),h=t(()=>[y,`${y}--${u.align}`,`${y}--${u.color}`,`${y}--${u.truncate?"wrap":"nowrap"}`,`${y}--${u.type}`,u.bolder?`${y}--bolder`:""]);return(t,c)=>(a(),l(o(s(g)),{class:d(s(h)),"data-testid":e.testId,style:r(s(m)({color:e.color,theme:s(p)}))},{default:n(()=>[i(t.$slots,"default")]),_:3},8,["class","data-testid","style"]))}});export{y as _};
2
+ import{defineComponent as e,computed as t,createBlock as l,openBlock as a,resolveDynamicComponent as o,unref as s,normalizeStyle as r,normalizeClass as d,withCtx as n,renderSlot as i}from"vue";import{l as c,d as u,i as p}from"./index-Djy51eo9.js";import{c as f}from"./index-wkMXT2wB.js";import{t as m}from"./utils-Bz2onxXq.js";import{useTheme as $}from"../composables/useTheme.js";const y=/* @__PURE__ */e({name:"CLHeading",__name:"CLHeading",props:{align:{default:p.Left},bolder:{type:Boolean,default:!1},color:{default:u.Secondary},level:{},testId:{default:"clll-heading"},truncate:{type:Boolean,default:!1},type:{default:c.Title}},setup(e){const u=e,p=$(),y="clll-heading",g=t(()=>{if(u.level)return u.level;switch(u.type){case c.Section:return f.H2;case c.SubSection:return f.H3;case c.PageTitle:case c.Title:default:return f.H1}}),h=t(()=>[y,`${y}--${u.align}`,`${y}--${u.color}`,`${y}--${u.truncate?"wrap":"nowrap"}`,`${y}--${u.type}`,u.bolder?`${y}--bolder`:""]);return(t,c)=>(a(),l(o(s(g)),{class:d(s(h)),"data-testid":e.testId,style:r(s(m)({color:e.color,theme:s(p)}))},{default:n(()=>[i(t.$slots,"default")]),_:3},8,["class","data-testid","style"]))}});export{y as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Modals/CLModal/CLModal.css';
2
- import{defineComponent as e,useTemplateRef as o,useSlots as l,ref as t,computed as a,watch as d,onMounted as n,onBeforeUnmount as s,createBlock as r,openBlock as i,Teleport as c,createElementBlock as _,createCommentVNode as u,normalizeStyle as v,normalizeClass as m,unref as f,createElementVNode as p,renderSlot as y,withCtx as b,createTextVNode as h,toDisplayString as $}from"vue";import{_ as w}from"./CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{_ as x}from"./CLHeading.vue_vue_type_style_index_0_lang-DP9O-gHu.js";import{b as I,g as z,d as g,c as k,h as L,e as B,f as C,l as T}from"./index-Djy51eo9.js";import{useTheme as j}from"../composables/useTheme.js";import{useEsc as R}from"../composables/useEsc.js";import{b as E,i as O}from"./helper-BlxFN3eF.js";const M=e=>{const{borderRadius:o,colors:l,darkMode:t,fontFamily:a}=e??j(),d=t.value?I.Dark:I.Light,n=z({color:g.Neutral,colors:l.value,mode:d,variant:k.Solid}),s=t.value?"black":"white",r=o?.value?`var(--clll-${o.value})`:void 0;return{"--clll-modal-overlay-bg":n?.bg??"transparent","--clll-modal-content-bg":s,"--clll-default-radius":r,"--clll-modal-theme-radius":r??"var(--clll-default-radius)","--clll-font-family":a?.value}},S=["id","data-testid"],F=["aria-labelledby"],D=/* @__PURE__ */e({name:"CLModal",__name:"CLModal",props:{borderRadius:{default:void 0},close:{type:Boolean,default:!0},closeBorderRadius:{default:L.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},teleport:{type:Boolean,default:!0},teleportTo:{default:"body"},testId:{default:"clll-modal"},title:{default:void 0},zIndex:{default:100}},emits:["modal-open","modal-close"],setup(e,{emit:I}){const z=I,L=j(),D=o("modal-window"),H=l(),N=e,W="clll-modal",q="clll-prevent-scroll",A=t(),G=()=>{O&&window?.document.body.classList.add(q)},J=()=>{O&&window?.document.body.classList.remove(q)},K=a(()=>[W,"clll-theme-provider","--clll-color-theme-"+(L.darkMode?.value?"dark":"light")]),P=a(()=>[`${W}__window`,N.fullscreen?`${W}__window--fullscreen`:""]),Q=a(()=>[`${W}__content`,N.borderRadius?`${W}__content--${N.borderRadius}`:"",N.close?`${W}__content--has-close-button`:`${W}__content--has-no-close-button`,H.body?`${W}__content--has-body`:`${W}__content--has-no-body`,H.footer?`${W}__content--has-footer`:`${W}__content--has-no-footer`,H.header||N.title?`${W}__content--has-header`:`${W}__content--has-no-header`,N.title?`${W}__content--has-title`:`${W}__content--has-no-title`]),U=a(()=>"auto"===N.zIndex||E(N.zIndex)?N.zIndex:N.zIndex.toString()),V=a(()=>{if("auto"===N.zIndex)return N.zIndex;return((E(N.zIndex)?parseInt(N.zIndex,10):N.zIndex)+100).toString()}),X=e=>{try{(e=>{try{const o=e?.target,l=D.value;return!(!O||!l||l.contains(o))||void 0}catch(o){return void console.error(o)}})(e)&&(O&&window.removeEventListener("mousedown",X),ee())}catch(o){console.error(o)}},Y=()=>{O&&window.removeEventListener("mousedown",X)},Z=()=>{O&&(A.value&&O&&window.clearTimeout(A.value),Y(),J())},ee=()=>{N.isOpen&&(N.onClose?.(),Z())};d(N,e=>{e.isOpen?(z("modal-open"),G(),D.value&&D.value.focus(),O&&e.dismissible&&(Y(),A.value=window.setTimeout(()=>{window.addEventListener("mousedown",X)},100))):(D.value&&D.value.blur(),J(),Y(),A.value&&O&&window.clearTimeout(A.value),z("modal-close"))}),n(()=>{N.isOpen&&O&&(G(),D.value&&D.value.focus())});const{clearEventListeners:oe}=R({escHandler:N.dismissible?ee:void 0});return s(()=>{Z(),oe()}),(o,l)=>(i(),r(c,{to:e.teleportTo,disabled:!e.teleport},[e.isOpen?(i(),_("div",{key:0,id:e.modalId,class:m(f(K)),"data-testid":e.testId,style:v({...f(M)(f(L)),zIndex:f(U)})},[p("div",{class:m(f(P)),style:v({zIndex:f(V)})},[p("div",{ref:"modal-window","aria-modal":"true","aria-labelledby":`${W}__content__header__title`,class:m(f(Q)),role:"dialog",tabindex:-1,style:v({"--clll-modal-max-width":e.maxWidth})},[p("div",{class:m(`${W}__close-button`)},[e.onClose&&e.close?(i(),r(f(w),{key:0,"aria-label":"Close modal","border-radius":e.closeBorderRadius,color:f(g).Neutral,"icon-before":f(C).Delete,"icon-size":f(B).Tiny,"on-click":e.onClose,"test-id":`${W}__close-button`,variant:f(k).Text},null,8,["border-radius","color","icon-before","icon-size","on-click","test-id","variant"])):u("",!0)],2),p("div",{class:m(`${W}__content__header`)},[p("div",{class:m(`${W}__content__title`)},[p("div",{class:m(`${W}__content__header__container`)},[e.title?(i(),r(f(x),{key:0,id:`${W}__content__header__title`,class:m(`${W}__content__header__title`),type:f(T).Section},{default:b(()=>[h($(e.title),1)]),_:1},8,["id","class","type"])):u("",!0),y(o.$slots,"header")],2)],2)],2),p("div",{class:m(`${W}__content__scroller`)},[p("div",{class:m(`${W}__content__body`)},[y(o.$slots,"body")],2)],2),p("div",{class:m(`${W}__content__footer`)},[y(o.$slots,"footer")],2)],14,F)],6),e.overlay?(i(),_("div",{key:0,ref:"overlay-ref",class:m(`${W}__overlay`),style:v({zIndex:e.zIndex})},null,6)):u("",!0)],14,S)):u("",!0)],8,["to","disabled"]))}});export{D as _};
2
+ import{defineComponent as e,useTemplateRef as o,useSlots as l,ref as t,computed as a,watch as d,onMounted as n,onBeforeUnmount as s,createBlock as r,openBlock as i,Teleport as c,createElementBlock as _,createCommentVNode as u,normalizeStyle as v,normalizeClass as m,unref as f,createElementVNode as p,renderSlot as y,withCtx as b,createTextVNode as h,toDisplayString as $}from"vue";import{_ as w}from"./CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{_ as x}from"./CLHeading.vue_vue_type_style_index_0_lang-BnYA-db5.js";import{b as I,g as z,d as g,c as k,h as L,e as B,f as C,l as T}from"./index-Djy51eo9.js";import{useTheme as j}from"../composables/useTheme.js";import{useEsc as R}from"../composables/useEsc.js";import{b as E,i as O}from"./helper-BlxFN3eF.js";const M=e=>{const{borderRadius:o,colors:l,darkMode:t,fontFamily:a}=e??j(),d=t.value?I.Dark:I.Light,n=z({color:g.Neutral,colors:l.value,mode:d,variant:k.Solid}),s=t.value?"black":"white",r=o?.value?`var(--clll-${o.value})`:void 0;return{"--clll-modal-overlay-bg":n?.bg??"transparent","--clll-modal-content-bg":s,"--clll-default-radius":r,"--clll-modal-theme-radius":r??"var(--clll-default-radius)","--clll-font-family":a?.value}},S=["id","data-testid"],F=["aria-labelledby"],D=/* @__PURE__ */e({name:"CLModal",__name:"CLModal",props:{borderRadius:{default:void 0},close:{type:Boolean,default:!0},closeBorderRadius:{default:L.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},teleport:{type:Boolean,default:!0},teleportTo:{default:"body"},testId:{default:"clll-modal"},title:{default:void 0},zIndex:{default:100}},emits:["modal-open","modal-close"],setup(e,{emit:I}){const z=I,L=j(),D=o("modal-window"),H=l(),N=e,W="clll-modal",q="clll-prevent-scroll",A=t(),G=()=>{O&&window?.document.body.classList.add(q)},J=()=>{O&&window?.document.body.classList.remove(q)},K=a(()=>[W,"clll-theme-provider","--clll-color-theme-"+(L.darkMode?.value?"dark":"light")]),P=a(()=>[`${W}__window`,N.fullscreen?`${W}__window--fullscreen`:""]),Q=a(()=>[`${W}__content`,N.borderRadius?`${W}__content--${N.borderRadius}`:"",N.close?`${W}__content--has-close-button`:`${W}__content--has-no-close-button`,H.body?`${W}__content--has-body`:`${W}__content--has-no-body`,H.footer?`${W}__content--has-footer`:`${W}__content--has-no-footer`,H.header||N.title?`${W}__content--has-header`:`${W}__content--has-no-header`,N.title?`${W}__content--has-title`:`${W}__content--has-no-title`]),U=a(()=>"auto"===N.zIndex||E(N.zIndex)?N.zIndex:N.zIndex.toString()),V=a(()=>{if("auto"===N.zIndex)return N.zIndex;return((E(N.zIndex)?parseInt(N.zIndex,10):N.zIndex)+100).toString()}),X=e=>{try{(e=>{try{const o=e?.target,l=D.value;return!(!O||!l||l.contains(o))||void 0}catch(o){return void console.error(o)}})(e)&&(O&&window.removeEventListener("mousedown",X),ee())}catch(o){console.error(o)}},Y=()=>{O&&window.removeEventListener("mousedown",X)},Z=()=>{O&&(A.value&&O&&window.clearTimeout(A.value),Y(),J())},ee=()=>{N.isOpen&&(N.onClose?.(),Z())};d(N,e=>{e.isOpen?(z("modal-open"),G(),D.value&&D.value.focus(),O&&e.dismissible&&(Y(),A.value=window.setTimeout(()=>{window.addEventListener("mousedown",X)},100))):(D.value&&D.value.blur(),J(),Y(),A.value&&O&&window.clearTimeout(A.value),z("modal-close"))}),n(()=>{N.isOpen&&O&&(G(),D.value&&D.value.focus())});const{clearEventListeners:oe}=R({escHandler:N.dismissible?ee:void 0});return s(()=>{Z(),oe()}),(o,l)=>(i(),r(c,{to:e.teleportTo,disabled:!e.teleport},[e.isOpen?(i(),_("div",{key:0,id:e.modalId,class:m(f(K)),"data-testid":e.testId,style:v({...f(M)(f(L)),zIndex:f(U)})},[p("div",{class:m(f(P)),style:v({zIndex:f(V)})},[p("div",{ref:"modal-window","aria-modal":"true","aria-labelledby":`${W}__content__header__title`,class:m(f(Q)),role:"dialog",tabindex:-1,style:v({"--clll-modal-max-width":e.maxWidth})},[p("div",{class:m(`${W}__close-button`)},[e.onClose&&e.close?(i(),r(f(w),{key:0,"aria-label":"Close modal","border-radius":e.closeBorderRadius,color:f(g).Neutral,"icon-before":f(C).Delete,"icon-size":f(B).Tiny,"on-click":e.onClose,"test-id":`${W}__close-button`,variant:f(k).Text},null,8,["border-radius","color","icon-before","icon-size","on-click","test-id","variant"])):u("",!0)],2),p("div",{class:m(`${W}__content__header`)},[p("div",{class:m(`${W}__content__title`)},[p("div",{class:m(`${W}__content__header__container`)},[e.title?(i(),r(f(x),{key:0,id:`${W}__content__header__title`,class:m(`${W}__content__header__title`),type:f(T).Section},{default:b(()=>[h($(e.title),1)]),_:1},8,["id","class","type"])):u("",!0),y(o.$slots,"header")],2)],2)],2),p("div",{class:m(`${W}__content__scroller`)},[p("div",{class:m(`${W}__content__body`)},[y(o.$slots,"body")],2)],2),p("div",{class:m(`${W}__content__footer`)},[y(o.$slots,"footer")],2)],14,F)],6),e.overlay?(i(),_("div",{key:0,ref:"overlay-ref",class:m(`${W}__overlay`),style:v({zIndex:e.zIndex})},null,6)):u("",!0)],14,S)):u("",!0)],8,["to","disabled"]))}});export{D as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Indicators/CLPill/CLPill.css';
2
- import{defineComponent as e,computed as l,createElementBlock as n,openBlock as a,normalizeStyle as i,normalizeClass as s,unref as o,createCommentVNode as t,createBlock as c,createVNode as d,withCtx as u,createTextVNode as r,toDisplayString as _,createElementVNode as m}from"vue";import{_ as p}from"./CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{_ as y}from"./CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as f}from"./CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{c as v,d as k,e as $,a as b,f as z}from"./index-Djy51eo9.js";import{p as C}from"./utils-HL8DrT3H.js";const x=["data-testid"],D=/* @__PURE__ */e({name:"CLPill",__name:"CLPill",props:{color:{default:k.Neutral},count:{},dismissable:{type:Boolean},elevated:{type:Boolean,default:!1},icon:{},iconFilled:{type:Boolean,default:!1},label:{},onClick:{},onDismiss:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-pill"},variant:{default:v.Soft}},setup(e){const v=e,k="clll-pill",D=l(()=>[k,`${k}--${v.color}--${v.variant}`,v.count?`${k}--has-count`:"",v.dismissable?`${k}--dismissable`:"",v.elevated?`${k}--elevated`:"",v.icon?`${k}--has-icon`:`${k}--has-noicon`,v.rounded?`${k}--rounded`:""]);return(l,v)=>(a(),n("div",{"data-testid":e.testId,class:s(o(D)),style:i(o(C)({color:e.color,variant:e.variant}))},[e.onClick||e.onDismiss?t("",!0):(a(),n("span",{key:0,class:s(`${k}__container`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.count?(a(),n("span",{key:1,class:s(`${k}__count`)},_(e.count),3)):t("",!0)],2)),e.onClick&&!e.dismissable?(a(),c(o(p),{key:1,color:e.color,"on-click":e.onClick,variant:e.variant,pill:"",rounded:e.rounded},{default:u(()=>[m("span",{class:s(`${k}__button`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.count?(a(),n("span",{key:1,class:s(`${k}__count`)},_(e.count),3)):t("",!0),e.dismissable?(a(),c(o(y),{key:2,name:o(z).Delete,size:o($).Tiny},null,8,["name","size"])):t("",!0)],2)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0),e.onDismiss&&e.dismissable?(a(),c(o(p),{key:2,color:e.color,"on-click":e.onDismiss,variant:e.variant,pill:"",rounded:e.rounded},{default:u(()=>[m("span",{class:s(`${k}__button`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.dismissable?(a(),c(o(y),{key:1,name:o(z).Delete,size:o($).Tiny},null,8,["name","size"])):t("",!0)],2)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0)],14,x))}});export{D as _};
2
+ import{defineComponent as e,computed as l,createElementBlock as n,openBlock as a,normalizeStyle as i,normalizeClass as s,unref as o,createCommentVNode as t,createBlock as c,createVNode as d,withCtx as u,createTextVNode as r,toDisplayString as _,createElementVNode as m}from"vue";import{_ as p}from"./CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{_ as y}from"./CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as f}from"./CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{c as v,d as k,e as $,a as b,f as z}from"./index-Djy51eo9.js";import{p as C}from"./utils-HL8DrT3H.js";const x=["data-testid"],D=/* @__PURE__ */e({name:"CLPill",__name:"CLPill",props:{color:{default:k.Neutral},count:{},dismissable:{type:Boolean},elevated:{type:Boolean,default:!1},icon:{},iconFilled:{type:Boolean,default:!1},label:{},onClick:{},onDismiss:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-pill"},variant:{default:v.Soft}},setup(e){const v=e,k="clll-pill",D=l(()=>[k,`${k}--${v.color}--${v.variant}`,v.count?`${k}--has-count`:"",v.dismissable?`${k}--dismissable`:"",v.elevated?`${k}--elevated`:"",v.icon?`${k}--has-icon`:`${k}--has-noicon`,v.rounded?`${k}--rounded`:""]);return(l,v)=>(a(),n("div",{"data-testid":e.testId,class:s(o(D)),style:i(o(C)({color:e.color,variant:e.variant}))},[e.onClick||e.onDismiss?t("",!0):(a(),n("span",{key:0,class:s(`${k}__container`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.count?(a(),n("span",{key:1,class:s(`${k}__count`)},_(e.count),3)):t("",!0)],2)),e.onClick&&!e.dismissable?(a(),c(o(p),{key:1,color:e.color,"on-click":e.onClick,variant:e.variant,pill:"",rounded:e.rounded},{default:u(()=>[m("span",{class:s(`${k}__button`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.count?(a(),n("span",{key:1,class:s(`${k}__count`)},_(e.count),3)):t("",!0),e.dismissable?(a(),c(o(y),{key:2,name:o(z).Delete,size:o($).Tiny},null,8,["name","size"])):t("",!0)],2)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0),e.onDismiss&&e.dismissable?(a(),c(o(p),{key:2,color:e.color,"on-click":e.onDismiss,variant:e.variant,pill:"",rounded:e.rounded},{default:u(()=>[m("span",{class:s(`${k}__button`)},[e.icon?(a(),c(o(y),{key:0,filled:e.iconFilled,name:e.icon,size:o($).Tiny},null,8,["filled","name","size"])):t("",!0),d(o(f),{as:"span",type:o(b).Small,truncate:""},{default:u(()=>[r(_(e.label),1)]),_:1},8,["type"]),e.dismissable?(a(),c(o(y),{key:1,name:o(z).Delete,size:o($).Tiny},null,8,["name","size"])):t("",!0)],2)]),_:1},8,["color","on-click","variant","rounded"])):t("",!0)],14,x))}});export{D as _};
@@ -1,2 +1,2 @@
1
1
  import '../components/Typography/CLText/CLText.css';
2
- import{defineComponent as t,computed as e,createBlock as l,openBlock as o,resolveDynamicComponent as a,normalizeStyle as d,normalizeClass as s,unref as r,withCtx as u,renderSlot as m}from"vue";import{a as p,d as n,i as f}from"./index-Djy51eo9.js";import{t as i}from"./utils-CCkMvR9Y.js";import{useTheme as c}from"../composables/useTheme.js";const $=/* @__PURE__ */t({name:"CLText",__name:"CLText",props:{align:{default:f.Left},as:{default:"p"},bold:{type:Boolean,default:!1},bolder:{type:Boolean,default:!1},color:{default:n.Secondary},light:{type:Boolean,default:!1},medium:{type:Boolean,default:!1},testId:{default:"clll-text"},truncate:{type:Boolean,default:!1},type:{default:p.Body}},setup(t){const p=t,n=c(),f="clll-text",$=e(()=>[f,`${f}--${p.align}`,`${f}--${p.color}`,`${f}--${p.truncate?"wrap":"nowrap"}`,`${f}--${p.type}`,{[`${f}--mediumbold`]:p.medium,[`${f}--light`]:p.light,[`${f}--bold`]:p.bold,[`${f}--bolder`]:p.bolder}]);return(e,p)=>(o(),l(a(t.as),{class:s(r($)),"data-testid":t.testId,style:d(r(i)({color:t.color,theme:r(n)}))},{default:u(()=>[m(e.$slots,"default")]),_:3},8,["class","data-testid","style"]))}});export{$ as _};
2
+ import{defineComponent as t,computed as e,createBlock as l,openBlock as o,resolveDynamicComponent as a,normalizeStyle as d,normalizeClass as s,unref as r,withCtx as u,renderSlot as m}from"vue";import{a as p,d as n,i as f}from"./index-Djy51eo9.js";import{t as i}from"./utils-Bz2onxXq.js";import{useTheme as c}from"../composables/useTheme.js";const $=/* @__PURE__ */t({name:"CLText",__name:"CLText",props:{align:{default:f.Left},as:{default:"p"},bold:{type:Boolean,default:!1},bolder:{type:Boolean,default:!1},color:{default:n.Secondary},light:{type:Boolean,default:!1},medium:{type:Boolean,default:!1},testId:{default:"clll-text"},truncate:{type:Boolean,default:!1},type:{default:p.Body}},setup(t){const p=t,n=c(),f="clll-text",$=e(()=>[f,`${f}--${p.align}`,`${f}--${p.color}`,`${f}--${p.truncate?"wrap":"nowrap"}`,`${f}--${p.type}`,{[`${f}--mediumbold`]:p.medium,[`${f}--light`]:p.light,[`${f}--bold`]:p.bold,[`${f}--bolder`]:p.bolder}]);return(e,p)=>(o(),l(a(t.as),{class:s(r($)),"data-testid":t.testId,style:d(r(i)({color:t.color,theme:r(n)}))},{default:u(()=>[m(e.$slots,"default")]),_:3},8,["class","data-testid","style"]))}});export{$ 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 h}from"vue";import{_ as y}from"./CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{_ as g}from"./CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as $}from"./CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{g as T,c as x,b as L,d as k,o as z,e as D,a as M,C as j,f as w}from"./index-Djy51eo9.js";import{i as B,g as C,a as R}from"./helper-BlxFN3eF.js";import{useEsc as S}from"../composables/useEsc.js";import{useTheme as F}from"../composables/useTheme.js";const A=({color:e,theme:t})=>{const{colors:o,darkMode:l}=t??F(),s=T({color:e,colors:o.value,mode:(l.value,L.Light),variant:x.Soft}),a=T({color:k.Neutral,colors:o.value,mode:l.value?L.Light:L.Dark,variant:x.Text});return{"--clll-toast-bg-color":l.value?"white":"#322F35","--clll-toast-text-color":a?.textBody,"--clll-toast-action-button-text-color":s?.text,"--clll-toast-action-button-bg-color":s?.bg,"--clll-toast-action-button-hover-color":s?.hover,"--clll-toast-dismiss-button-text-color":a?.text,"--clll-toast-dismiss-button-bg-color":a?.bg,"--clll-toast-dismiss-button-hover-color":a?.hover,"--clll-toast-icon-bg":s?.bg,"--clll-toast-icon-color":s?.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:k.Secondary},dismissTimer:{default:5},icon:{},iconFilled:{type:Boolean,default:!1},iconSize:{default:D.Small},message:{},onAction:{},onDismiss:{},position:{default:z.TopRight},rounded:{type:Boolean,default:!0},testId:{default:"clll-toast"},title:{},width:{default:"24rem"}},setup(e){const T=e,L=F(),z=t(),H=t(!1),q=t(),G=t(0),J=t(!1),K=t(null),O=t(0),P=t(0),Q=t(!1),U=o(()=>[N,T.borderRadius?`${N}--${T.borderRadius}`:"",T.dismissTimer?`${N}--has-timer`:"",T.icon?`${N}--has-icon`:"",T.message&&!T.title?`${N}--has-messageonly`:"",H.value?`${N}--mounted`:"",T.onAction&&T.actionLabel?`${N}--has-action`:"",T.rounded?`${N}--rounded`:`${N}--box`,T.title&&!T.message?`${N}--has-titleonly`:"",T.title&&T.message?`${N}--has-titleandmessage`:"",`${N}--${T.position}`]),V=()=>{null!==K.value&&(clearTimeout(K.value),K.value=null),q.value?.stop()},W=()=>{T.dismissTimer&&!J.value&&(V(),O.value=Date.now(),P.value=1e3*T.dismissTimer,Q.value=!1,K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},X=()=>{if(!T.dismissTimer||Q.value||J.value)return;Q.value=!0;const e=Date.now()-O.value;P.value=Math.max(0,P.value-e),V()},Y=()=>{T.dismissTimer&&Q.value&&!J.value&&(Q.value=!1,O.value=Date.now(),K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},Z=()=>{document.hidden?X():Y()},ee=()=>{J.value||(J.value=!0,H.value=!1,V(),q.value&&q.value.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),T.onDismiss?.())}),te())};l(()=>T.dismissTimer,()=>{V(),J.value=!1,T.dismissTimer&&T.dismissTimer>0&&W()}),s(()=>{B&&(G.value=C()+1,q.value||(q.value=R(),q.value.start(100,e=>{100===Math.min(e,100)&&(q.value?.stop(),H.value=!0,T.dismissTimer&&q.value?.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),W())}))})),document.addEventListener("visibilitychange",Z))}),a(()=>{B&&(V(),q.value=void 0,document.removeEventListener("visibilitychange",Z)),H.value=!1,J.value||(J.value=!0,T.onDismiss?.())});const{clearEventListeners:te}=S({escHandler:ee});return i(()=>{te()}),(t,o)=>(u(),r("output",{ref_key:"elem",ref:z,class:d(c(U)),"data-testid":e.testId,style:n({zIndex:c(G),"--clll-toast-width":e.width,...c(A)({color:e.color,theme:c(L)})}),onMouseenter:X,onMouseleave:Y,onFocusin:X,onFocusout:Y},[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(k).Neutral,"test-id":`${N}__title`,type:c(M).Body,bold:""},{default:p(()=>[f(h(e.title),1)]),_:1},8,["color","test-id","type"])):v("",!0),e.message?(u(),b(c($),{key:1,color:c(k).Neutral,"test-id":`${N}__message`,type:e.title?c(M).Medium:c(M).Body},{default:p(()=>[f(h(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(y),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${N}__action-button`,variant:c(x).Soft},{default:p(()=>[f(h(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(y),{"aria-label":"Dismiss toast",color:c(k).Neutral,"border-radius":e.borderRadius,"icon-before":c(w).Delete,"icon-size":c(D).Tiny,"on-click":ee,size:c(j).Tiny,"test-id":`${N}__dismiss-button`,variant:c(x).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 h}from"vue";import{_ as y}from"./CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{_ as g}from"./CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as $}from"./CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{g as T,c as x,b as L,d as k,o as z,e as D,a as M,C as j,f as w}from"./index-Djy51eo9.js";import{i as B,g as C,a as R}from"./helper-BlxFN3eF.js";import{useEsc as S}from"../composables/useEsc.js";import{useTheme as F}from"../composables/useTheme.js";const A=({color:e,theme:t})=>{const{colors:o,darkMode:l}=t??F(),s=T({color:e,colors:o.value,mode:(l.value,L.Light),variant:x.Soft}),a=T({color:k.Neutral,colors:o.value,mode:l.value?L.Light:L.Dark,variant:x.Text});return{"--clll-toast-bg-color":l.value?"white":"#322F35","--clll-toast-text-color":a?.textBody,"--clll-toast-action-button-text-color":s?.text,"--clll-toast-action-button-bg-color":s?.bg,"--clll-toast-action-button-hover-color":s?.hover,"--clll-toast-dismiss-button-text-color":a?.text,"--clll-toast-dismiss-button-bg-color":a?.bg,"--clll-toast-dismiss-button-hover-color":a?.hover,"--clll-toast-icon-bg":s?.bg,"--clll-toast-icon-color":s?.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:k.Secondary},dismissTimer:{default:5},icon:{},iconFilled:{type:Boolean,default:!1},iconSize:{default:D.Small},message:{},onAction:{},onDismiss:{},position:{default:z.TopRight},rounded:{type:Boolean,default:!0},testId:{default:"clll-toast"},title:{},width:{default:"24rem"}},setup(e){const T=e,L=F(),z=t(),H=t(!1),q=t(),G=t(0),J=t(!1),K=t(null),O=t(0),P=t(0),Q=t(!1),U=o(()=>[N,T.borderRadius?`${N}--${T.borderRadius}`:"",T.dismissTimer?`${N}--has-timer`:"",T.icon?`${N}--has-icon`:"",T.message&&!T.title?`${N}--has-messageonly`:"",H.value?`${N}--mounted`:"",T.onAction&&T.actionLabel?`${N}--has-action`:"",T.rounded?`${N}--rounded`:`${N}--box`,T.title&&!T.message?`${N}--has-titleonly`:"",T.title&&T.message?`${N}--has-titleandmessage`:"",`${N}--${T.position}`]),V=()=>{null!==K.value&&(clearTimeout(K.value),K.value=null),q.value?.stop()},W=()=>{T.dismissTimer&&!J.value&&(V(),O.value=Date.now(),P.value=1e3*T.dismissTimer,Q.value=!1,K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},X=()=>{if(!T.dismissTimer||Q.value||J.value)return;Q.value=!0;const e=Date.now()-O.value;P.value=Math.max(0,P.value-e),V()},Y=()=>{T.dismissTimer&&Q.value&&!J.value&&(Q.value=!1,O.value=Date.now(),K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},Z=()=>{document.hidden?X():Y()},ee=()=>{J.value||(J.value=!0,H.value=!1,V(),q.value&&q.value.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),T.onDismiss?.())}),te())};l(()=>T.dismissTimer,()=>{V(),J.value=!1,T.dismissTimer&&T.dismissTimer>0&&W()}),s(()=>{B&&(G.value=C()+1,q.value||(q.value=R(),q.value.start(100,e=>{100===Math.min(e,100)&&(q.value?.stop(),H.value=!0,T.dismissTimer&&q.value?.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),W())}))})),document.addEventListener("visibilitychange",Z))}),a(()=>{B&&(V(),q.value=void 0,document.removeEventListener("visibilitychange",Z)),H.value=!1,J.value||(J.value=!0,T.onDismiss?.())});const{clearEventListeners:te}=S({escHandler:ee});return i(()=>{te()}),(t,o)=>(u(),r("output",{ref_key:"elem",ref:z,class:d(c(U)),"data-testid":e.testId,style:n({zIndex:c(G),"--clll-toast-width":e.width,...c(A)({color:e.color,theme:c(L)})}),onMouseenter:X,onMouseleave:Y,onFocusin:X,onFocusout:Y},[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(k).Neutral,"test-id":`${N}__title`,type:c(M).Body,bold:""},{default:p(()=>[f(h(e.title),1)]),_:1},8,["color","test-id","type"])):v("",!0),e.message?(u(),b(c($),{key:1,color:c(k).Neutral,"test-id":`${N}__message`,type:e.title?c(M).Medium:c(M).Body},{default:p(()=>[f(h(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(y),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${N}__action-button`,variant:c(x).Soft},{default:p(()=>[f(h(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(y),{"aria-label":"Dismiss toast",color:c(k).Neutral,"border-radius":e.borderRadius,"icon-before":c(w).Delete,"icon-size":c(D).Tiny,"on-click":ee,size:c(j).Tiny,"test-id":`${N}__dismiss-button`,variant:c(x).Text},null,8,["color","border-radius","icon-before","icon-size","size","test-id","variant"])],2)],2)],46,E))}});export{H as _};
@@ -0,0 +1 @@
1
+ import{b as o,g as e,d as r,c as t}from"./index-Djy51eo9.js";import{useTheme as s}from"../composables/useTheme.js";const a=({color:a=r.Neutral,theme:l})=>{const{colors:c,darkMode:m}=l??s(),d=m.value?o.Dark:o.Light,i=e({color:a,colors:c.value,mode:d,variant:t.Text});return{"--clll-text-color":i?.textBody??"inherit"}};export{a as t};
@@ -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-CdKhRClI.js";export{t as CLButton,t as default};
3
+ import{_ as t}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";export{t as CLButton,t as default};
@@ -14,6 +14,8 @@ export interface CLButtonProps {
14
14
  badgeColor?: CLColors;
15
15
  /** The maximum amount of characters to display in the badge before appending a plus sign (+). */
16
16
  badgeLimit?: number;
17
+ /** When set to `true`, the badge pulsates to indicate a transient state, e.g. "thinking". The button remains interactive. */
18
+ badgePulse?: boolean;
17
19
  /** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
18
20
  borderRadius?: CLBorderRadius;
19
21
  /** A `boolean` value which dictates the busy state of the button */
@@ -88,6 +90,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
88
90
  badge: boolean | number | string;
89
91
  badgeColor: CLColors;
90
92
  badgeLimit: number;
93
+ badgePulse: boolean;
91
94
  busy: boolean;
92
95
  disabled: boolean;
93
96
  forwardRef: CLButtonForwardRefFunction;
@@ -1,3 +1,3 @@
1
1
  import '../../assets/core.css';
2
2
  import './CLTable.css';
3
- import{defineComponent as e,computed as l,createElementBlock as t,openBlock as a,normalizeStyle as o,normalizeClass as s,unref as d,createElementVNode as r,createCommentVNode as n,renderSlot as c,Fragment as i,renderList as u,createVNode as b,withCtx as p}from"vue";import{b as _,g as $,c as y,d as f,q as m,a as C}from"../../chunks/index-Djy51eo9.js";import{useTheme as h}from"../../composables/useTheme.js";import{_ as k}from"../../chunks/CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";const v=e=>{const{colors:l,darkMode:t}=e??h(),a=t.value?_.Dark:_.Light,o=$({color:f.Neutral,colors:l.value,mode:a,variant:y.Outline});return{"--clll-table-border-color":o?.border??"transparent","--clll-table-hover-bg":o?.hover??"transparent","--clll-table-theme-radius":"var(--clll-default-radius)"}},L=["data-testid"],T=["id"],B={key:0},w=/* @__PURE__ */e({name:"CLTable",__name:"CLTable",props:{bordered:{type:Boolean},borderRadius:{},colWidths:{},id:{default:"main"},rounded:{type:Boolean,default:!1},rowHeight:{default:"auto"},striped:{type:Boolean},testId:{default:"clll-table"},type:{default:m.Default},withVerticalLines:{type:Boolean}},setup(e){const b=e,p=h(),_="clll-table",$=l(()=>[`${_}-container`,b.bordered?`${_}--bordered`:void 0,b.borderRadius&&b.bordered?`${_}--${b.borderRadius}`:"",b.rounded?`${_}--rounded`:`${_}--box`]),y=l(()=>[_,`${_}--${b.type}`,b.striped?`${_}--striped`:void 0,b.withVerticalLines?`${_}--vertical-lines`:void 0,b.bordered?`${_}--bordered`:void 0]);return(l,b)=>(a(),t("div",{class:s(d($)),"data-testid":e.testId,style:o(d(v)(d(p)))},[r("table",{id:`${_}-${e.id}`,class:s(d(y)),style:o({"--clll-table-row-height":e.rowHeight})},[e.colWidths?.length?(a(),t("colgroup",B,[(a(!0),t(i,null,u(e.colWidths,(l,s)=>(a(),t("col",{key:`table-${e.id}-col-${s}`,style:o({width:l})},null,4))),128))])):n("",!0),c(l.$slots,"default")],14,T)],14,L))}}),g=/* @__PURE__ */e({name:"CLTableBody",__name:"CLTableBody",setup:e=>(e,l)=>(a(),t("tbody",{class:s(["clll-table__body"])},[c(e.$slots,"default")],2))}),H=["colspan"],A=["colspan"],N=/* @__PURE__ */e({name:"CLTableCell",__name:"CLTableCell",props:{colSpan:{default:1},isAction:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},isHeader:{type:Boolean,default:!1},isNumber:{type:Boolean,default:!1},onClick:{}},setup(e){const o=e,r="clll-table__cell",n=l(()=>[r,o.isHeader?`${r}--header`:`${r}--default`,o.isNumber?`${r}--number`:"",o.isAction?`${r}--hasactions`:"",o.isActive?`${r}--active`:"",o.onClick?`${r}--clickable`:""]),i=()=>o?.onClick?.();return(l,o)=>e.isHeader?(a(),t("th",{key:0,class:s(d(n)),colspan:e.colSpan,onClick:i},[e.isAction?(a(),t("div",{key:1,class:s(`${r}__actions`)},[c(l.$slots,"default")],2)):c(l.$slots,"default",{key:0})],10,H)):(a(),t("td",{key:1,class:s(d(n)),colspan:e.colSpan,onClick:i},[e.isAction?(a(),t("div",{key:1,class:s(`${r}__actions`)},[c(l.$slots,"default")],2)):c(l.$slots,"default",{key:0})],10,A))}}),R=/* @__PURE__ */e({name:"CLTableFooter",__name:"CLTableFooter",setup:e=>(e,l)=>(a(),t("tfoot",{class:s(["clll-table__footer"])},[c(e.$slots,"default")],2))}),x=/* @__PURE__ */e({name:"CLTableHeader",__name:"CLTableHeader",setup:e=>(e,l)=>(a(),t("thead",{class:s(["clll-table__header"])},[c(e.$slots,"default")],2))}),F=/* @__PURE__ */e({name:"CLTableNestedCell",__name:"CLTableNestedCell",props:{truncate:{type:Boolean}},setup:e=>(l,o)=>(a(),t("div",{class:s("clll-table__nested-cell")},[b(d(k),{type:d(C).Small,truncate:e.truncate},{default:p(()=>[c(l.$slots,"default")]),_:3},8,["type","truncate"])]))}),S=/* @__PURE__ */e({name:"CLTableRow",__name:"CLTableRow",props:{onClick:{type:Function}},setup(e){const o=e,r="clll-table__row",n=l(()=>[r,o.onClick?`${r}--clickable`:""]),i=()=>o?.onClick?.();return(e,l)=>(a(),t("tr",{class:s(d(n)),onClick:i},[c(e.$slots,"default")],2))}}),j=w;j.Body=g,j.Cell=N,j.Footer=R,j.Header=x,j.NestedCell=F,j.Row=S;export{j as CLTable,j as default};
3
+ import{defineComponent as e,computed as l,createElementBlock as t,openBlock as a,normalizeStyle as o,normalizeClass as s,unref as d,createElementVNode as r,createCommentVNode as n,renderSlot as c,Fragment as i,renderList as u,createVNode as b,withCtx as p}from"vue";import{b as _,g as $,c as y,d as f,q as m,a as C}from"../../chunks/index-Djy51eo9.js";import{useTheme as h}from"../../composables/useTheme.js";import{_ as k}from"../../chunks/CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";const v=e=>{const{colors:l,darkMode:t}=e??h(),a=t.value?_.Dark:_.Light,o=$({color:f.Neutral,colors:l.value,mode:a,variant:y.Outline});return{"--clll-table-border-color":o?.border??"transparent","--clll-table-hover-bg":o?.hover??"transparent","--clll-table-theme-radius":"var(--clll-default-radius)"}},L=["data-testid"],T=["id"],B={key:0},w=/* @__PURE__ */e({name:"CLTable",__name:"CLTable",props:{bordered:{type:Boolean},borderRadius:{},colWidths:{},id:{default:"main"},rounded:{type:Boolean,default:!1},rowHeight:{default:"auto"},striped:{type:Boolean},testId:{default:"clll-table"},type:{default:m.Default},withVerticalLines:{type:Boolean}},setup(e){const b=e,p=h(),_="clll-table",$=l(()=>[`${_}-container`,b.bordered?`${_}--bordered`:void 0,b.borderRadius&&b.bordered?`${_}--${b.borderRadius}`:"",b.rounded?`${_}--rounded`:`${_}--box`]),y=l(()=>[_,`${_}--${b.type}`,b.striped?`${_}--striped`:void 0,b.withVerticalLines?`${_}--vertical-lines`:void 0,b.bordered?`${_}--bordered`:void 0]);return(l,b)=>(a(),t("div",{class:s(d($)),"data-testid":e.testId,style:o(d(v)(d(p)))},[r("table",{id:`${_}-${e.id}`,class:s(d(y)),style:o({"--clll-table-row-height":e.rowHeight})},[e.colWidths?.length?(a(),t("colgroup",B,[(a(!0),t(i,null,u(e.colWidths,(l,s)=>(a(),t("col",{key:`table-${e.id}-col-${s}`,style:o({width:l})},null,4))),128))])):n("",!0),c(l.$slots,"default")],14,T)],14,L))}}),g=/* @__PURE__ */e({name:"CLTableBody",__name:"CLTableBody",setup:e=>(e,l)=>(a(),t("tbody",{class:s(["clll-table__body"])},[c(e.$slots,"default")],2))}),H=["colspan"],A=["colspan"],N=/* @__PURE__ */e({name:"CLTableCell",__name:"CLTableCell",props:{colSpan:{default:1},isAction:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},isHeader:{type:Boolean,default:!1},isNumber:{type:Boolean,default:!1},onClick:{}},setup(e){const o=e,r="clll-table__cell",n=l(()=>[r,o.isHeader?`${r}--header`:`${r}--default`,o.isNumber?`${r}--number`:"",o.isAction?`${r}--hasactions`:"",o.isActive?`${r}--active`:"",o.onClick?`${r}--clickable`:""]),i=()=>o?.onClick?.();return(l,o)=>e.isHeader?(a(),t("th",{key:0,class:s(d(n)),colspan:e.colSpan,onClick:i},[e.isAction?(a(),t("div",{key:1,class:s(`${r}__actions`)},[c(l.$slots,"default")],2)):c(l.$slots,"default",{key:0})],10,H)):(a(),t("td",{key:1,class:s(d(n)),colspan:e.colSpan,onClick:i},[e.isAction?(a(),t("div",{key:1,class:s(`${r}__actions`)},[c(l.$slots,"default")],2)):c(l.$slots,"default",{key:0})],10,A))}}),R=/* @__PURE__ */e({name:"CLTableFooter",__name:"CLTableFooter",setup:e=>(e,l)=>(a(),t("tfoot",{class:s(["clll-table__footer"])},[c(e.$slots,"default")],2))}),x=/* @__PURE__ */e({name:"CLTableHeader",__name:"CLTableHeader",setup:e=>(e,l)=>(a(),t("thead",{class:s(["clll-table__header"])},[c(e.$slots,"default")],2))}),F=/* @__PURE__ */e({name:"CLTableNestedCell",__name:"CLTableNestedCell",props:{truncate:{type:Boolean}},setup:e=>(l,o)=>(a(),t("div",{class:s("clll-table__nested-cell")},[b(d(k),{type:d(C).Small,truncate:e.truncate},{default:p(()=>[c(l.$slots,"default")]),_:3},8,["type","truncate"])]))}),S=/* @__PURE__ */e({name:"CLTableRow",__name:"CLTableRow",props:{onClick:{type:Function}},setup(e){const o=e,r="clll-table__row",n=l(()=>[r,o.onClick?`${r}--clickable`:""]),i=()=>o?.onClick?.();return(e,l)=>(a(),t("tr",{class:s(d(n)),onClick:i},[c(e.$slots,"default")],2))}}),j=w;j.Body=g,j.Cell=N,j.Footer=R,j.Header=x,j.NestedCell=F,j.Row=S;export{j as CLTable,j 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-BqfDwuqz.js";export{a as CLCard,a as default};
3
+ import{_ as a}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BBOuR1kL.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-CdKhRClI.js";import{_ as T}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{c as $,C as k,e as L,f as z,a as P,i as C,d as S}from"../../../chunks/index-Djy51eo9.js";import{g as B,f as E}from"../../../chunks/index-wkMXT2wB.js";import{i as M,d as I,e as N}from"../../../chunks/helper-BlxFN3eF.js";import{useHasSlotContent as A}from"../../../composables/useHasSlotContent.js";const j=/* @__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`]),S=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(B).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($).Outline:e.variant,wrap:""},null,8,["aria-label","color","disabled","on-click","variant"]))),128))],2)):t("",!0),e.paginationType===n(B).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(z).ChevronLeft,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(S))},[d(n(T),{type:n(P).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(z).ChevronRight,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).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(k).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(B).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(z).ChevronLeft,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).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(z).ChevronRight,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0),e.paginationType===n(B).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(C).Center,color:e.color,disabled:n(I),"icon-before":n(z).ChevronLeft,"icon-size":n(L).Small,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).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(C).Center,color:e.color,disabled:n(N),"icon-before":n(z).ChevronRight,"icon-size":n(L).Small,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).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))}}),W=["data-testid"],H=["hidden"],O=/* @__PURE__ */e({name:"CLCarousel",__name:"CLCarousel",props:{color:{default:S.Neutral},controlAlign:{default:C.Right},controlPosition:{default:E.Before},enabled:{type:Boolean,default:!0},infinite:{type:Boolean,default:!1},moreLabel:{default:"More"},onShowMore:{},paginationType:{default:B.Numbered},perPage:{default:3},perPageByBreakpoints:{},testId:{default:"clll-carousel"},title:{},variant:{default:$.Soft},width:{default:"100%"}},setup(e){g(e=>({fd2b86ea:e.width,v75596a20:n(Q)}));const r="clll-carousel",c=e,x=h(),$=h(!1),k=h(1),L=h(c.perPage),z=h(0),P=A("title"),S=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){L.value=c.perPage;for(const[e,a]of c.perPageByBreakpoints){window.matchMedia(`(min-width: ${e}px)`).matches&&(L.value=a)}}},Y=()=>{const e=J?.value;if(e&&V.value){const e=Math.ceil(V.value/L.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)&&!P.value;a||!e.title&&e.controlPosition!==E.Before?$.value=a:$.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/L.value*(z.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=L.value;X(),ie(),Y();const a=J?.value,l=a.offsetWidth;if(a)if(c.infinite&&c.enabled&&q.value>0){const o=l/L.value,i=l/e,t=z.value/2,n=i*t,s=a.scrollLeft-n;if(e!==L.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(L.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)}),z.value=2*i}}const c=o*(z.value/2)+s;m(()=>{a.scrollLeft=c})}else{k.value=1;const e=l*(k.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,S.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/L.value,o=l.scrollLeft,i=a*(z.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?k.value=U.value:s>U.value?k.value=1:k.value=s,!S.value)if(o<i){S.value=!0;const e=o+t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{S.value=!1},50)}else if(o>=i+t){S.value=!0;const e=o-t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{S.value=!1},50)}}else{const i=V.value-1;for(let t=0;t<U.value;t++){const n=L.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&&(k.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>=L.value?Q.value=a/L.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*k.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*(k.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(L.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)}),z.value=2*o,m(()=>{const a=e.offsetWidth/L.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`,$.value?"":`${r}--hastitle`,c.onShowMore?`${r}--has-more`:""]),re=a(()=>[`${r}__slide-controls`,P.value?`${r}__slide-controls--hascustomtitle`:""]),ce=a(()=>[`${r}__slides`,D.value?`${r}__slides--resizing`:"",G.value?`${r}__slides--scrolling`:"",S.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($)},[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(P)?n(C).Center:n(C).Left,label:"",truncate:""},{default:u(()=>[p(f(e.title),1)]),_:1},8,["align"])],2)):t("",!0),e.controlPosition!==n(E).Before||[n(B).Inline,n(B).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:1},[n(U)&&n(V)>n(L)?(o(),l("div",{key:0,class:s(n(ve))},[d(j,{color:e.color,"current-page":n(k),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(E).After||[n(B).Inline,n(B).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:0},[n(U)&&n(V)>n(L)?(o(),l("div",{key:0,class:s(`${r}__slide-controls`)},[v("div",{class:s(n(ve))},[d(j,{color:e.color,"current-page":n(k),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(B).Inline?(o(),l("div",{key:1,class:s(`${r}__slide-controls ${r}__slide-controls--inline`)},[v("div",{class:s(`${r}__navigation`)},[d(j,{color:e.color,"current-page":n(k),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,W))}}),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-Dzbe7JWZ.js";import{_ as T}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{c as $,C as k,e as L,f as z,a as P,i as C,d as S}from"../../../chunks/index-Djy51eo9.js";import{g as B,f as E}from"../../../chunks/index-wkMXT2wB.js";import{i as M,d as I,e as N}from"../../../chunks/helper-BlxFN3eF.js";import{useHasSlotContent as A}from"../../../composables/useHasSlotContent.js";const j=/* @__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`]),S=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(B).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($).Outline:e.variant,wrap:""},null,8,["aria-label","color","disabled","on-click","variant"]))),128))],2)):t("",!0),e.paginationType===n(B).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(z).ChevronLeft,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2),v("div",{class:s(n(S))},[d(n(T),{type:n(P).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(z).ChevronRight,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).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(k).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(B).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(z).ChevronLeft,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).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(z).ChevronRight,"icon-size":n(L).Tiny,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).Text:e.variant},null,8,["color","disabled","icon-before","icon-size","size","on-click","variant"])],2)],2)):t("",!0),e.paginationType===n(B).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(C).Center,color:e.color,disabled:n(I),"icon-before":n(z).ChevronLeft,"icon-size":n(L).Small,size:n(k).Tiny,"on-click":e.showPrevItems,variant:n(I)?n($).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(C).Center,color:e.color,disabled:n(N),"icon-before":n(z).ChevronRight,"icon-size":n(L).Small,size:n(k).Tiny,"on-click":e.showNextItems,variant:n(N)?n($).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))}}),W=["data-testid"],H=["hidden"],O=/* @__PURE__ */e({name:"CLCarousel",__name:"CLCarousel",props:{color:{default:S.Neutral},controlAlign:{default:C.Right},controlPosition:{default:E.Before},enabled:{type:Boolean,default:!0},infinite:{type:Boolean,default:!1},moreLabel:{default:"More"},onShowMore:{},paginationType:{default:B.Numbered},perPage:{default:3},perPageByBreakpoints:{},testId:{default:"clll-carousel"},title:{},variant:{default:$.Soft},width:{default:"100%"}},setup(e){g(e=>({fd2b86ea:e.width,v75596a20:n(Q)}));const r="clll-carousel",c=e,x=h(),$=h(!1),k=h(1),L=h(c.perPage),z=h(0),P=A("title"),S=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){L.value=c.perPage;for(const[e,a]of c.perPageByBreakpoints){window.matchMedia(`(min-width: ${e}px)`).matches&&(L.value=a)}}},Y=()=>{const e=J?.value;if(e&&V.value){const e=Math.ceil(V.value/L.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)&&!P.value;a||!e.title&&e.controlPosition!==E.Before?$.value=a:$.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/L.value*(z.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=L.value;X(),ie(),Y();const a=J?.value,l=a.offsetWidth;if(a)if(c.infinite&&c.enabled&&q.value>0){const o=l/L.value,i=l/e,t=z.value/2,n=i*t,s=a.scrollLeft-n;if(e!==L.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(L.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)}),z.value=2*i}}const c=o*(z.value/2)+s;m(()=>{a.scrollLeft=c})}else{k.value=1;const e=l*(k.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,S.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/L.value,o=l.scrollLeft,i=a*(z.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?k.value=U.value:s>U.value?k.value=1:k.value=s,!S.value)if(o<i){S.value=!0;const e=o+t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{S.value=!1},50)}else if(o>=i+t){S.value=!0;const e=o-t;l.scrollTo({left:e,behavior:"auto"}),setTimeout(()=>{S.value=!1},50)}}else{const i=V.value-1;for(let t=0;t<U.value;t++){const n=L.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&&(k.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>=L.value?Q.value=a/L.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*k.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*(k.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(L.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)}),z.value=2*o,m(()=>{const a=e.offsetWidth/L.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`,$.value?"":`${r}--hastitle`,c.onShowMore?`${r}--has-more`:""]),re=a(()=>[`${r}__slide-controls`,P.value?`${r}__slide-controls--hascustomtitle`:""]),ce=a(()=>[`${r}__slides`,D.value?`${r}__slides--resizing`:"",G.value?`${r}__slides--scrolling`:"",S.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($)},[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(P)?n(C).Center:n(C).Left,label:"",truncate:""},{default:u(()=>[p(f(e.title),1)]),_:1},8,["align"])],2)):t("",!0),e.controlPosition!==n(E).Before||[n(B).Inline,n(B).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:1},[n(U)&&n(V)>n(L)?(o(),l("div",{key:0,class:s(n(ve))},[d(j,{color:e.color,"current-page":n(k),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(E).After||[n(B).Inline,n(B).Hidden].includes(e.paginationType)?t("",!0):(o(),l(i,{key:0},[n(U)&&n(V)>n(L)?(o(),l("div",{key:0,class:s(`${r}__slide-controls`)},[v("div",{class:s(n(ve))},[d(j,{color:e.color,"current-page":n(k),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(B).Inline?(o(),l("div",{key:1,class:s(`${r}__slide-controls ${r}__slide-controls--inline`)},[v("div",{class:s(`${r}__navigation`)},[d(j,{color:e.color,"current-page":n(k),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,W))}}),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,watch as d,computed as t,onBeforeUnmount as o,createElementBlock as n,openBlock as s,normalizeStyle as l,normalizeClass as i,unref as r,createVNode as u,createElementVNode as c,withKeys as p,withCtx as _,createBlock as g,createCommentVNode as f,renderSlot as m,createTextVNode as $,toDisplayString as y}from"vue";import{_ as v}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-CXyQNvMA.js";import{_ as h}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-DP9O-gHu.js";import{_ as b}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as x}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{c as B,C,a as S,e as k,f as z,l as I,d as L}from"../../../chunks/index-Djy51eo9.js";import{d as j}from"../../../chunks/utils-DWWh7hCm.js";import{useEsc as H}from"../../../composables/useEsc.js";import{useHasSlotContent as T}from"../../../composables/useHasSlotContent.js";import{useTheme as A}from"../../../composables/useTheme.js";const D=["data-testid"],E=["id","aria-labelledby","aria-hidden"],R=/* @__PURE__ */e({name:"CLDisclosure",__name:"CLDisclosure",props:{bordered:{type:Boolean,default:!0},borderRadius:{},color:{default:L.Neutral},compact:{type:Boolean,default:!1},contentSpacing:{type:Boolean,default:!0},disclosureId:{},expanded:{type:Boolean,default:!1},expandedIcon:{default:z.ChevronUp},heading:{},headingLevel:{},headingType:{default:I.Section},iconAfter:{default:z.ChevronDown},iconBefore:{},iconSize:{default:k.Medium},rounded:{type:Boolean,default:!0},subHeading:{},subHeadingType:{default:S.Body},testId:{default:"clll-disclosure"},triggerButtonSize:{default:C.Medium},variant:{default:B.Soft}},emits:["disclosure-toggle","update:expanded"],setup(e,{expose:B,emit:C}){const S=C,k="clll-disclosure",z=A(),I=e;let L=a();const R=a(I.expanded);d(()=>I.expanded,e=>{R.value=e});const M=T("trailing"),w=t(()=>[k,`${k}--${I.color}--${I.variant}`,`${k}--${I.triggerButtonSize}`,I.bordered?`${k}--bordered`:"",I.borderRadius?`${k}--${I.borderRadius}`:"",I.contentSpacing?`${k}--padded`:`${k}--nopadding`,I.compact?`${k}--compact`:"",R.value?`${k}--expanded`:`${k}--collapsed`,I.heading?`${k}--hasheading`:"",I.subHeading||M.value?`${k}--hassubheading`:"",I.rounded?`${k}--rounded`:`${k}--box`,`${k}--${I.triggerButtonSize}`]),K=t(()=>[`${k}__content`,`${k}__content--${I.triggerButtonSize}`]),N=e=>{R.value="boolean"==typeof e?e:!R.value,S("update:expanded",R.value),S("disclosure-toggle",R.value)},U=()=>{N()},{clearEventListeners:q}=H({escHandler:U,triggerElem:L});return o(()=>{q()}),B({close:()=>{N(!1)},expanded:R,open:()=>{N(!0)},toggle:N}),(a,d)=>(s(),n("div",{class:i(r(w)),style:l(r(j)({color:e.color,variant:e.variant,theme:r(z)})),"data-testid":e.testId},[u(r(v),{id:`${k}__button--${e.disclosureId}`,"aria-controls":`${k}--${e.disclosureId}`,"aria-expanded":r(R),color:e.color,enabled:!0,fluid:!0,rounded:e.rounded,role:"button",onClick:U,onKeyup:p(U,["enter"])},{default:_(()=>[c("div",{class:i(`${k}__trigger`)},[c("span",{class:i(`${k}__heading`)},[e.iconBefore?(s(),g(r(b),{key:0,name:e.iconBefore,size:e.iconSize},null,8,["name","size"])):f("",!0),c("span",{class:i(`${k}__heading-text`)},[e.heading?(s(),g(r(h),{key:0,class:i(`${k}__text-heading`),type:e.headingType,level:e.headingLevel,truncate:""},{default:_(()=>[$(y(e.heading),1)]),_:1},8,["class","type","level"])):f("",!0),e.subHeading?(s(),g(r(x),{key:1,class:i(`${k}__text-subheading`),type:e.subHeadingType,truncate:""},{default:_(()=>[$(y(e.subHeading),1)]),_:1},8,["class","type"])):f("",!0)],2),m(a.$slots,"trailing"),e.iconAfter?(s(),g(r(b),{key:1,name:r(R)?e.expandedIcon:e.iconAfter,size:e.iconSize},null,8,["name","size"])):f("",!0)],2)],2)]),_:3},8,["id","aria-controls","aria-expanded","color","rounded"]),c("div",{id:`${k}--${e.disclosureId}`,"aria-labelledby":`${k}__button--${e.disclosureId}`,"aria-hidden":!r(R),class:i(r(K))},[m(a.$slots,"default")],10,E)],14,D))}});export{R as CLDisclosure,R as default};
3
+ import{defineComponent as e,ref as a,watch as d,computed as t,onBeforeUnmount as o,createElementBlock as n,openBlock as s,normalizeStyle as l,normalizeClass as i,unref as r,createVNode as u,createElementVNode as c,withKeys as p,withCtx as _,createBlock as g,createCommentVNode as f,renderSlot as m,createTextVNode as $,toDisplayString as y}from"vue";import{_ as v}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-CXyQNvMA.js";import{_ as h}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-BnYA-db5.js";import{_ as b}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as x}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{c as B,C,a as S,e as k,f as z,l as I,d as L}from"../../../chunks/index-Djy51eo9.js";import{d as j}from"../../../chunks/utils-DWWh7hCm.js";import{useEsc as H}from"../../../composables/useEsc.js";import{useHasSlotContent as T}from"../../../composables/useHasSlotContent.js";import{useTheme as A}from"../../../composables/useTheme.js";const D=["data-testid"],E=["id","aria-labelledby","aria-hidden"],R=/* @__PURE__ */e({name:"CLDisclosure",__name:"CLDisclosure",props:{bordered:{type:Boolean,default:!0},borderRadius:{},color:{default:L.Neutral},compact:{type:Boolean,default:!1},contentSpacing:{type:Boolean,default:!0},disclosureId:{},expanded:{type:Boolean,default:!1},expandedIcon:{default:z.ChevronUp},heading:{},headingLevel:{},headingType:{default:I.Section},iconAfter:{default:z.ChevronDown},iconBefore:{},iconSize:{default:k.Medium},rounded:{type:Boolean,default:!0},subHeading:{},subHeadingType:{default:S.Body},testId:{default:"clll-disclosure"},triggerButtonSize:{default:C.Medium},variant:{default:B.Soft}},emits:["disclosure-toggle","update:expanded"],setup(e,{expose:B,emit:C}){const S=C,k="clll-disclosure",z=A(),I=e;let L=a();const R=a(I.expanded);d(()=>I.expanded,e=>{R.value=e});const M=T("trailing"),w=t(()=>[k,`${k}--${I.color}--${I.variant}`,`${k}--${I.triggerButtonSize}`,I.bordered?`${k}--bordered`:"",I.borderRadius?`${k}--${I.borderRadius}`:"",I.contentSpacing?`${k}--padded`:`${k}--nopadding`,I.compact?`${k}--compact`:"",R.value?`${k}--expanded`:`${k}--collapsed`,I.heading?`${k}--hasheading`:"",I.subHeading||M.value?`${k}--hassubheading`:"",I.rounded?`${k}--rounded`:`${k}--box`,`${k}--${I.triggerButtonSize}`]),K=t(()=>[`${k}__content`,`${k}__content--${I.triggerButtonSize}`]),N=e=>{R.value="boolean"==typeof e?e:!R.value,S("update:expanded",R.value),S("disclosure-toggle",R.value)},U=()=>{N()},{clearEventListeners:q}=H({escHandler:U,triggerElem:L});return o(()=>{q()}),B({close:()=>{N(!1)},expanded:R,open:()=>{N(!0)},toggle:N}),(a,d)=>(s(),n("div",{class:i(r(w)),style:l(r(j)({color:e.color,variant:e.variant,theme:r(z)})),"data-testid":e.testId},[u(r(v),{id:`${k}__button--${e.disclosureId}`,"aria-controls":`${k}--${e.disclosureId}`,"aria-expanded":r(R),color:e.color,enabled:!0,fluid:!0,rounded:e.rounded,role:"button",onClick:U,onKeyup:p(U,["enter"])},{default:_(()=>[c("div",{class:i(`${k}__trigger`)},[c("span",{class:i(`${k}__heading`)},[e.iconBefore?(s(),g(r(b),{key:0,name:e.iconBefore,size:e.iconSize},null,8,["name","size"])):f("",!0),m(a.$slots,"leading"),c("span",{class:i(`${k}__heading-text`)},[e.heading?(s(),g(r(h),{key:0,class:i(`${k}__text-heading`),type:e.headingType,level:e.headingLevel,truncate:""},{default:_(()=>[$(y(e.heading),1)]),_:1},8,["class","type","level"])):f("",!0),e.subHeading?(s(),g(r(x),{key:1,class:i(`${k}__text-subheading`),type:e.subHeadingType,truncate:""},{default:_(()=>[$(y(e.subHeading),1)]),_:1},8,["class","type"])):f("",!0)],2),m(a.$slots,"trailing"),e.iconAfter?(s(),g(r(b),{key:1,name:r(R)?e.expandedIcon:e.iconAfter,size:e.iconSize},null,8,["name","size"])):f("",!0)],2)],2)]),_:3},8,["id","aria-controls","aria-expanded","color","rounded"]),c("div",{id:`${k}--${e.disclosureId}`,"aria-labelledby":`${k}__button--${e.disclosureId}`,"aria-hidden":!r(R),class:i(r(K))},[m(a.$slots,"default")],10,E)],14,D))}});export{R as CLDisclosure,R as default};
@@ -68,6 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
68
68
  subHeadingType: CLTextTypes;
69
69
  triggerButtonSize: CLSizes;
70
70
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
71
+ leading?(_: {}): any;
71
72
  trailing?(_: {}): any;
72
73
  default?(_: {}): any;
73
74
  }>;
@@ -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-B2c3R_eo.js";export{a as CLCalendar,a as default};
3
+ import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-CTVzNLog.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 m,unref as c,withDirectives as p,vModelCheckbox as f,createVNode as _,createTextVNode as b,toDisplayString as y}from"vue";import{_ as v}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as X}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-D5uLutM2.js";import{_ as L}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as h}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BLjU8vDW.js";import{C as g,e as $,a as k,f as x,c as C,d as B}from"../../../chunks/index-Djy51eo9.js";import{a as T}from"../../../chunks/utils-nqwT3s9o.js";import{useTheme as F}from"../../../composables/useTheme.js";const q=["data-testid"],M=["for","disabled"],j=["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:B.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:g.Small},testId:{default:"clll-checkbox"},value:{type:[String,Number,Boolean],default:void 0},variant:{default:C.Outline}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const C={[g.Tiny]:$.Tiny,[g.Small]:$.Tiny,[g.Medium]:$.Small,[g.Large]:$.Medium,[g.XL]:$.Medium,[g.XXL]:$.Large,[g.XXXL]:$.Large,[g.XXXXL]:$.XL},B={[g.Tiny]:k.Small,[g.Small]:k.Medium,[g.Medium]:k.Medium,[g.Large]:k.Large,[g.XL]:k.XL,[g.XXL]:k.XXL,[g.XXXL]:k.XXXL,[g.XXXXL]:k.XXXXL},z=e,S=F(),I=l("checkbox-ref"),R=s(e,"modelValue"),V="clll-checkbox",N=o(()=>[V,z.borderRadius?`${V}--${z.borderRadius}`:"",z.busy?`${V}--busy`:`${V}--ready`,z.disabled?`${V}--disabled`:`${V}--active`,z.label?`${V}--haslabel`:"",`${V}--${z.color}`,`${V}--${z.size}`,z.messageType?`${V}--${z.messageType}`:"",z.rounded?`${V}--rounded`:`${V}--box`,z.required?`${V}--required`:`${V}--optional`]),O=o(()=>[`${V}__checkbox-container`,`${V}--${z.variant}`]),U=()=>{I.value&&I.value.focus()};return a({checkboxRef:I}),(a,l)=>(u(),d(v,null,{default:i(()=>[t("span",{class:m(c(N)),style:r(c(T)({color:e.color,variant:e.variant,theme:c(S)})),"data-testid":e.testId},[t("span",{class:m(c(O)),onClick:U},[t("label",{for:e.id,class:m(`${V}__label`),disabled:e.disabled},[t("span",{class:m([`${V}__checkbox-frame`,"form-control-flex"])},[p(t("input",{id:e.id,ref:"checkbox-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${V}__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,j),[[f,R.value]]),t("span",{class:m(`${V}__icon`)},[_(c(L),{name:c(x).Check,size:C[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(c(h),{key:0,as:"span",type:B[e.size],class:m(e.required?`${V}__label--required`:"")},{default:i(()=>[b(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,M)],2)],14,q),e.id?(u(),d(X,{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 m,unref as c,withDirectives as p,vModelCheckbox as f,createVNode as _,createTextVNode as b,toDisplayString as y}from"vue";import{_ as v}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as X}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-D5uLutM2.js";import{_ as L}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as h}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-DYZ0PnLl.js";import{C as g,e as $,a as k,f as x,c as C,d as B}from"../../../chunks/index-Djy51eo9.js";import{a as T}from"../../../chunks/utils-nqwT3s9o.js";import{useTheme as F}from"../../../composables/useTheme.js";const q=["data-testid"],M=["for","disabled"],j=["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:B.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:g.Small},testId:{default:"clll-checkbox"},value:{type:[String,Number,Boolean],default:void 0},variant:{default:C.Outline}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const C={[g.Tiny]:$.Tiny,[g.Small]:$.Tiny,[g.Medium]:$.Small,[g.Large]:$.Medium,[g.XL]:$.Medium,[g.XXL]:$.Large,[g.XXXL]:$.Large,[g.XXXXL]:$.XL},B={[g.Tiny]:k.Small,[g.Small]:k.Medium,[g.Medium]:k.Medium,[g.Large]:k.Large,[g.XL]:k.XL,[g.XXL]:k.XXL,[g.XXXL]:k.XXXL,[g.XXXXL]:k.XXXXL},z=e,S=F(),I=l("checkbox-ref"),R=s(e,"modelValue"),V="clll-checkbox",N=o(()=>[V,z.borderRadius?`${V}--${z.borderRadius}`:"",z.busy?`${V}--busy`:`${V}--ready`,z.disabled?`${V}--disabled`:`${V}--active`,z.label?`${V}--haslabel`:"",`${V}--${z.color}`,`${V}--${z.size}`,z.messageType?`${V}--${z.messageType}`:"",z.rounded?`${V}--rounded`:`${V}--box`,z.required?`${V}--required`:`${V}--optional`]),O=o(()=>[`${V}__checkbox-container`,`${V}--${z.variant}`]),U=()=>{I.value&&I.value.focus()};return a({checkboxRef:I}),(a,l)=>(u(),d(v,null,{default:i(()=>[t("span",{class:m(c(N)),style:r(c(T)({color:e.color,variant:e.variant,theme:c(S)})),"data-testid":e.testId},[t("span",{class:m(c(O)),onClick:U},[t("label",{for:e.id,class:m(`${V}__label`),disabled:e.disabled},[t("span",{class:m([`${V}__checkbox-frame`,"form-control-flex"])},[p(t("input",{id:e.id,ref:"checkbox-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${V}__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,j),[[f,R.value]]),t("span",{class:m(`${V}__icon`)},[_(c(L),{name:c(x).Check,size:C[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(c(h),{key:0,as:"span",type:B[e.size],class:m(e.required?`${V}__label--required`:"")},{default:i(()=>[b(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,M)],2)],14,q),e.id?(u(),d(X,{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 s,toDisplayString as n,createVNode as u,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 C}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as X}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-D5uLutM2.js";import{_ as k}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-0GTnIrod.js";import{_ as z}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-DIg6S1RD.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{C as F,d as S,h as B,e as T,c as R,f as V}from"../../../chunks/index-Djy51eo9.js";import{_ as j}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-CknufCvq.js";import{h as P,a as q,C as w}from"../../../chunks/index-wkMXT2wB.js";import{b as M}from"../../../chunks/utils-nqwT3s9o.js";import{useTheme as N}from"../../../composables/useTheme.js";const U=["data-testid"],A=/* @__PURE__ */e({name:"CLInputPrefix",__name:"CLInputPrefix",props:{ariaLabel:{default:void 0},borderRadius:{default:B.XS},color:{default:S.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},prefix:{},size:{default:F.Small},testId:{default:"clll-input-prefix"}},setup(e){const u=e,p="clll-input",c=e=>Object.values(V).includes(e),f={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},m=l(()=>!!u.onClick&&c(u.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(u.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":u.grouped||u.prefix},{"--disabled":u.disabled},u.grouped?`form-addon-radius--left-${e=u.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{u.onClick&&e&&!u.disabled&&(e.stopPropagation(),u.onClick(e))};return(l,u)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(I),{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(R).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($),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[s(n(e.prefix),1)],64))],8,U))],2))}}),O=["data-testid"],E=/* @__PURE__ */e({name:"CLInputSuffix",__name:"CLInputSuffix",props:{ariaLabel:{default:void 0},borderRadius:{default:B.XS},color:{default:S.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},suffix:{},size:{default:F.Small},testId:{default:"clll-input-suffix"}},setup(e){const u=e,p="clll-input",c=e=>Object.values(V).includes(e),f={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},m=l(()=>!!u.onClick&&c(u.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(u.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":u.grouped||u.suffix},{"--disabled":u.disabled},u.grouped?`form-addon-radius--right-${e=u.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{u.onClick&&e&&!u.disabled&&(e.stopPropagation(),u.onClick(e))};return(l,u)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(I),{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(R).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($),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[s(n(e.suffix),1)],64))],8,O))],2))}}),G=["data-testid"],H=/* @__PURE__ */e({name:"CLInputPill",__name:"CLInputPill",props:{color:{default:S.Neutral},label:{},testId:{default:"clll-input-pill"}},setup:e=>(l,r)=>(o(),a("span",{class:i("clll-input__pill"),"data-testid":e.testId},[u(t(j),{color:e.color,label:e.label,variant:t(R).Soft},null,8,["color","label","variant"])],10,G))}),D=["data-testid"],J=/* @__PURE__ */e({name:"CLInputColorTools",__name:"CLInputColorTools",props:{copied:{type:Boolean,default:!1},initialValue:{default:void 0},modelValue:{default:void 0},size:{default:F.Small},testId:{default:"clll-input-color-tools"}},emits:["copy","reset","update:copied"],setup(e,{emit:l}){const d=e,s=l,n="clll-input",u=p(d.copied),m={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},b=async()=>{try{d.modelValue&&(await navigator.clipboard.writeText(d.modelValue.toString()),u.value=!0,s("update:copied",!0),s("copy"))}catch(e){console.error(e)}},y=()=>{s("reset",d.initialValue)};return c(()=>d.copied,e=>{u.value=e}),c(()=>d.modelValue,()=>{u.value=!1,s("update:copied",!1)}),(l,d)=>(o(),a("span",{class:i(`${n}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(o(),r(t(I),{key:0,"aria-label":"Copy color to clipboard",class:i(`${n}__copy-to-clipboard`),color:t(S).Neutral,"icon-before":t(u)?t(V).Check:t(V).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(u)?"Color copied to clipboard":"Copy color to clipboard",variant:t(R).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(o(),r(t(I),{key:1,"aria-label":"Reset selected color",class:i(`${n}__reset-selected-color`),color:t(S).Neutral,"on-click":y,"icon-before":t(V).Restore,"icon-size":m[e.size],size:e.size,title:"Reset selected color",variant:t(R).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","variant"])):f("",!0)],10,D))}}),K=["data-testid"],Q=["id","name","aria-label","autocomplete","disabled","form","maxlength","minlength","pattern","placeholder","readonly","required","spellcheck","type"],W=/* @__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:S.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:F.Small},spellCheck:{type:Boolean,default:void 0},suffix:{default:void 0},suffixAriaLabel:{default:void 0},testId:{default:"clll-input"},type:{default:P.Text},variant:{default:R.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:s}){const u=e,m=s,$=N(),I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");u.type!==P.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(V).includes(e),j=l(()=>[I,u.borderRadius?`${I}--${u.borderRadius}`:"",u.busy?`${I}--busy`:`${I}--ready`,`${I}--${u.color}`,`${I}--${u.size}`,`${I}--${u.type}`,`${I}--${u.variant}`,u.disabled||u.busy?`${I}--disabled`:`${I}--active`,u.fluid||u.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,u.grouped?`${I}--grouped`:"",u.label?`${I}--haslabel`:"",u.messageType?`${I}--${u.messageType}`:"",u.orientation?`${I}--${u.orientation}`:"",u.pill?`${I}--haspill`:"",u.charCounter&&u.maxLength&&[P.Email,P.None,P.Text,P.Url].includes(u.type)?`${I}--hascharcounter`:"",u.prefix&&![P.Color,P.File].includes(u.type)?`${I}--hasprefix`:"",u.prefix&&![P.Color,P.File].includes(u.type)?R(u.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",u.readonly?`${I}--readonly`:`${I}--writeable`,u.rounded?`${I}--rounded`:`${I}--box`,u.required?`${I}--required`:`${I}--optional`,u.suffix&&![P.Color,P.File].includes(u.type)?`${I}--hassuffix`:"",u.suffix&&![P.Color,P.File].includes(u.type)?R(u.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),U=l(()=>[`${I}__input`,{"--nocolor":u.type===P.Color&&!B.value},{"--input-group":u.grouped||u.prefix||u.suffix}]),O=e=>{B.value=e,m("reset",B.value)},G=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(C,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(j)),style:_(t(M)({color:e.color,variant:e.variant,theme:t($)})),"data-testid":e.testId},[e.label?(o(),r(k,{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:G},[e.prefix&&![t(P).Color,t(P).File].includes(e.type)?(o(),r(A,{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(U)),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,Q),[[h,B.value]])],2),e.type===t(P).Color?(o(),a("span",{key:1,class:i(`${I}__selected-color`)},n(B.value||"none"),3)):f("",!0),e.type===t(P).Color?(o(),r(J,{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:O},null,8,["modelValue","copied","initial-value","size"])):f("",!0),e.suffix&&![t(P).Color,t(P).File].includes(e.type)?(o(),r(E,{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(P).Email,t(P).None,t(P).Text,t(P).Url].includes(e.type)?(o(),r(z,{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,K),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(H,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(o(),r(X,{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"]))}});W.Prefix=A,W.Suffix=E,W.Pill=H,W.ColorTools=J;export{W as CLInput,W 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 s,toDisplayString as n,createVNode as u,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 C}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as X}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-D5uLutM2.js";import{_ as k}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BM767yIM.js";import{_ as z}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-DIg6S1RD.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DqkY3kf7.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{C as F,d as S,h as B,e as T,c as R,f as V}from"../../../chunks/index-Djy51eo9.js";import{_ as j}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-DzfYfqQl.js";import{h as P,a as q,C as w}from"../../../chunks/index-wkMXT2wB.js";import{b as M}from"../../../chunks/utils-nqwT3s9o.js";import{useTheme as N}from"../../../composables/useTheme.js";const U=["data-testid"],A=/* @__PURE__ */e({name:"CLInputPrefix",__name:"CLInputPrefix",props:{ariaLabel:{default:void 0},borderRadius:{default:B.XS},color:{default:S.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},prefix:{},size:{default:F.Small},testId:{default:"clll-input-prefix"}},setup(e){const u=e,p="clll-input",c=e=>Object.values(V).includes(e),f={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},m=l(()=>!!u.onClick&&c(u.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(u.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":u.grouped||u.prefix},{"--disabled":u.disabled},u.grouped?`form-addon-radius--left-${e=u.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{u.onClick&&e&&!u.disabled&&(e.stopPropagation(),u.onClick(e))};return(l,u)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(I),{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(R).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($),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[s(n(e.prefix),1)],64))],8,U))],2))}}),O=["data-testid"],E=/* @__PURE__ */e({name:"CLInputSuffix",__name:"CLInputSuffix",props:{ariaLabel:{default:void 0},borderRadius:{default:B.XS},color:{default:S.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},suffix:{},size:{default:F.Small},testId:{default:"clll-input-suffix"}},setup(e){const u=e,p="clll-input",c=e=>Object.values(V).includes(e),f={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},m=l(()=>!!u.onClick&&c(u.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(u.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":u.grouped||u.suffix},{"--disabled":u.disabled},u.grouped?`form-addon-radius--right-${e=u.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{u.onClick&&e&&!u.disabled&&(e.stopPropagation(),u.onClick(e))};return(l,u)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(I),{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(R).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($),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[s(n(e.suffix),1)],64))],8,O))],2))}}),G=["data-testid"],H=/* @__PURE__ */e({name:"CLInputPill",__name:"CLInputPill",props:{color:{default:S.Neutral},label:{},testId:{default:"clll-input-pill"}},setup:e=>(l,r)=>(o(),a("span",{class:i("clll-input__pill"),"data-testid":e.testId},[u(t(j),{color:e.color,label:e.label,variant:t(R).Soft},null,8,["color","label","variant"])],10,G))}),D=["data-testid"],J=/* @__PURE__ */e({name:"CLInputColorTools",__name:"CLInputColorTools",props:{copied:{type:Boolean,default:!1},initialValue:{default:void 0},modelValue:{default:void 0},size:{default:F.Small},testId:{default:"clll-input-color-tools"}},emits:["copy","reset","update:copied"],setup(e,{emit:l}){const d=e,s=l,n="clll-input",u=p(d.copied),m={[F.Tiny]:T.Tiny,[F.Small]:T.Small,[F.Medium]:T.Medium,[F.Large]:T.Large,[F.XL]:T.XL,[F.XXL]:T.XXL,[F.XXXL]:T.XXXL,[F.XXXXL]:T.XXXXL},b=async()=>{try{d.modelValue&&(await navigator.clipboard.writeText(d.modelValue.toString()),u.value=!0,s("update:copied",!0),s("copy"))}catch(e){console.error(e)}},y=()=>{s("reset",d.initialValue)};return c(()=>d.copied,e=>{u.value=e}),c(()=>d.modelValue,()=>{u.value=!1,s("update:copied",!1)}),(l,d)=>(o(),a("span",{class:i(`${n}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(o(),r(t(I),{key:0,"aria-label":"Copy color to clipboard",class:i(`${n}__copy-to-clipboard`),color:t(S).Neutral,"icon-before":t(u)?t(V).Check:t(V).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(u)?"Color copied to clipboard":"Copy color to clipboard",variant:t(R).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(o(),r(t(I),{key:1,"aria-label":"Reset selected color",class:i(`${n}__reset-selected-color`),color:t(S).Neutral,"on-click":y,"icon-before":t(V).Restore,"icon-size":m[e.size],size:e.size,title:"Reset selected color",variant:t(R).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","variant"])):f("",!0)],10,D))}}),K=["data-testid"],Q=["id","name","aria-label","autocomplete","disabled","form","maxlength","minlength","pattern","placeholder","readonly","required","spellcheck","type"],W=/* @__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:S.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:F.Small},spellCheck:{type:Boolean,default:void 0},suffix:{default:void 0},suffixAriaLabel:{default:void 0},testId:{default:"clll-input"},type:{default:P.Text},variant:{default:R.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:s}){const u=e,m=s,$=N(),I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");u.type!==P.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(V).includes(e),j=l(()=>[I,u.borderRadius?`${I}--${u.borderRadius}`:"",u.busy?`${I}--busy`:`${I}--ready`,`${I}--${u.color}`,`${I}--${u.size}`,`${I}--${u.type}`,`${I}--${u.variant}`,u.disabled||u.busy?`${I}--disabled`:`${I}--active`,u.fluid||u.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,u.grouped?`${I}--grouped`:"",u.label?`${I}--haslabel`:"",u.messageType?`${I}--${u.messageType}`:"",u.orientation?`${I}--${u.orientation}`:"",u.pill?`${I}--haspill`:"",u.charCounter&&u.maxLength&&[P.Email,P.None,P.Text,P.Url].includes(u.type)?`${I}--hascharcounter`:"",u.prefix&&![P.Color,P.File].includes(u.type)?`${I}--hasprefix`:"",u.prefix&&![P.Color,P.File].includes(u.type)?R(u.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",u.readonly?`${I}--readonly`:`${I}--writeable`,u.rounded?`${I}--rounded`:`${I}--box`,u.required?`${I}--required`:`${I}--optional`,u.suffix&&![P.Color,P.File].includes(u.type)?`${I}--hassuffix`:"",u.suffix&&![P.Color,P.File].includes(u.type)?R(u.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),U=l(()=>[`${I}__input`,{"--nocolor":u.type===P.Color&&!B.value},{"--input-group":u.grouped||u.prefix||u.suffix}]),O=e=>{B.value=e,m("reset",B.value)},G=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(C,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(j)),style:_(t(M)({color:e.color,variant:e.variant,theme:t($)})),"data-testid":e.testId},[e.label?(o(),r(k,{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:G},[e.prefix&&![t(P).Color,t(P).File].includes(e.type)?(o(),r(A,{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(U)),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,Q),[[h,B.value]])],2),e.type===t(P).Color?(o(),a("span",{key:1,class:i(`${I}__selected-color`)},n(B.value||"none"),3)):f("",!0),e.type===t(P).Color?(o(),r(J,{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:O},null,8,["modelValue","copied","initial-value","size"])):f("",!0),e.suffix&&![t(P).Color,t(P).File].includes(e.type)?(o(),r(E,{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(P).Email,t(P).None,t(P).Text,t(P).Url].includes(e.type)?(o(),r(z,{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,K),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(H,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(o(),r(X,{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"]))}});W.Prefix=A,W.Suffix=E,W.Pill=H,W.ColorTools=J;export{W as CLInput,W 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 n,onMounted as d,onBeforeUnmount as s,createElementBlock as o,openBlock as i,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as c,normalizeStyle as v,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-BqfDwuqz.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-B2c3R_eo.js";import{f as I,c as L,n as V,C as x,d as M}from"../../../chunks/index-Djy51eo9.js";import{a as B}from"../../../chunks/index-wkMXT2wB.js";import{i as j}from"../../../chunks/helper-BlxFN3eF.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:M.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:B.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",x=l(!1),M=l(),B=l(),S=l(),$=t(e,"modelValue"),w=l(""),{handleDateInput:z,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?w.value=`${e} - ${l}`:w.value=e:w.value=""},{immediate:!0,deep:!0});const P=n(()=>M.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),k(),C()],placement:l(a.placement),whileElementsMounted:_,open:x}),G=()=>{a.disabled||a.busy||(x.value=!x.value,x.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=n(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{x.value&&(x.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=M.value?.$el,t=S.value;x.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=M.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&z(e,w,a.isRange,()=>{K(w.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 d(()=>{j&&document.addEventListener("click",A)}),s(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(i(),o("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{id:e.id,ref_key:"inputRef",ref:M,modelValue:p(w),"onUpdate:modelValue":l[0]||(l[0]=e=>c(w)?w.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,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,["id","modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),p(x)?(i(),o("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:v({...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,fluid:"",onDateSelect:J},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 n,onMounted as d,onBeforeUnmount as s,createElementBlock as o,openBlock as i,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as c,normalizeStyle as v,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-BBOuR1kL.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-CTVzNLog.js";import{f as I,c as L,n as V,C as x,d as M}from"../../../chunks/index-Djy51eo9.js";import{a as B}from"../../../chunks/index-wkMXT2wB.js";import{i as j}from"../../../chunks/helper-BlxFN3eF.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:M.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:B.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",x=l(!1),M=l(),B=l(),S=l(),$=t(e,"modelValue"),w=l(""),{handleDateInput:z,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?w.value=`${e} - ${l}`:w.value=e:w.value=""},{immediate:!0,deep:!0});const P=n(()=>M.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),k(),C()],placement:l(a.placement),whileElementsMounted:_,open:x}),G=()=>{a.disabled||a.busy||(x.value=!x.value,x.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=n(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{x.value&&(x.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=M.value?.$el,t=S.value;x.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=M.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&z(e,w,a.isRange,()=>{K(w.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 d(()=>{j&&document.addEventListener("click",A)}),s(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(i(),o("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{id:e.id,ref_key:"inputRef",ref:M,modelValue:p(w),"onUpdate:modelValue":l[0]||(l[0]=e=>c(w)?w.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,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,["id","modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),p(x)?(i(),o("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:v({...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,fluid:"",onDateSelect:J},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,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInputTimePicker.css';
3
- import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as o,computed as u,onMounted as i,onBeforeUnmount as s,createElementBlock as r,openBlock as d,normalizeClass as n,createVNode as m,createCommentVNode as f,unref as c,normalizeStyle as p,withCtx as v,createElementVNode as b,createTextVNode as y}from"vue";import{u as _,a as h,o as k,f as C,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-CdKhRClI.js";import{_ as L}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BqfDwuqz.js";import{CLInput as z}from"../CLInput/CLInput.js";import{CLTimePicker as V}from"../CLTimePicker/CLTimePicker.js";import{f as x,c as B,C as H,d as j,n as R}from"../../../chunks/index-Djy51eo9.js";import{a as F}from"../../../chunks/index-wkMXT2wB.js";import{useEsc as T}from"../../../composables/useEsc.js";import{useTimeInputMask as P}from"../../../composables/useTimeInputMask.js";import{i as $}from"../../../chunks/helper-BlxFN3eF.js";const E=["data-testid"],M=/* @__PURE__ */e({name:"CLInputTimePicker",__name:"CLInputTimePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:j.Neutral},size:{default:H.Small},variant:{default:B.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{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},onReset:{type:Function,default:void 0},orientation:{default:F.Vertical},placement:{default:R.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-time-picker"},use24Hour:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,R="clll-input-time-picker",F=l(!1),M=l(),S=l(),w=l(),q=t(e,"modelValue"),U=l(""),{handleTimeInput:A,validateTime:G}=P();o(q,()=>{U.value=q.value??""},{immediate:!0});const N=u(()=>M.value?.$el),{floatingStyles:O}=_(N,w,{middleware:[k(8),C(),g()],placement:l(a.placement),whileElementsMounted:h,open:F}),D=()=>{a.disabled||a.busy||(F.value=!F.value,F.value?(a.onFocus?.(new FocusEvent("focus")),S.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},J=()=>{F.value&&(F.value=!1,S.value?.cancel(),a.onBlur?.(new FocusEvent("blur")))};T({escHandler:J});const K=e=>{const a=e.target,l=M.value?.$el,t=w.value;F.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&J()},Q=()=>{S.value?.apply(),F.value=!1,a.onChange?.()},W=()=>{S.value?.reset(),a.onReset?.(),a.onChange?.()},X=()=>{J()},Y=e=>{const l=G(e,a.use24Hour),t=M.value?.inputRef;return t&&(e&&!l?t.setCustomValidity(a.use24Hour?"Invalid format. Use HH:mm":"Invalid format. Use hh:mm AM/PM"):t.setCustomValidity("")),l},Z=e=>{e&&A(e,U,a.use24Hour,()=>{Y(U.value)})},ee=e=>{if(!e)return;const l=e.target.value,t=Y(l);if(!l.trim())return q.value=null,void a.onChange?.();t&&(q.value=l.trim(),a.onChange?.())};return i(()=>{$&&document.addEventListener("click",K)}),s(()=>{$&&document.removeEventListener("click",K)}),(a,l)=>(d(),r("div",{class:n([R,e.fluid?`${R}--fluid`:""]),"data-testid":e.testId},[m(c(z),{id:e.id,ref_key:"inputRef",ref:M,modelValue:U.value,"onUpdate:modelValue":l[0]||(l[0]=e=>U.value=e),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,label:e.label,messages:e.messages,"message-type":e.messageType,name:e.name,orientation:e.orientation,placeholder:e.placeholder||(e.use24Hour?"HH:mm":"hh:mm AM/PM"),required:e.required,rounded:e.rounded,size:e.size,suffix:c(x).Clock,"suffix-aria-label":e.ariaLabel||"Open time picker","test-id":`${e.testId}__input`,variant:e.variant,onInput:Z,onChange:ee,onSuffixClick:D},null,8,["id","modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),F.value?(d(),r("div",{key:0,ref_key:"popoverRef",ref:w,class:n(`${R}__popover`),style:p({...c(O),zIndex:100})},[m(c(L),{"border-radius":e.borderRadius,variant:c(B).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:v(()=>[b("div",{class:n(`${R}__container`)},[m(c(V),{ref_key:"timePickerRef",ref:S,modelValue:q.value,"onUpdate:modelValue":l[1]||(l[1]=e=>q.value=e),disabled:e.disabled,busy:e.busy,"use24-hour":e.use24Hour,fluid:""},null,8,["modelValue","disabled","busy","use24-hour"]),b("div",{class:n(`${R}__footer`)},[m(c(I),{color:c(j).Neutral,variant:c(B).Ghost,size:c(H).Small,onClick:X},{default:v(()=>[...l[2]||(l[2]=[y(" Cancel ",-1)])]),_:1},8,["color","variant","size"]),b("div",{class:n(`${R}__footer-right`)},[m(c(I),{color:c(j).Neutral,variant:c(B).Ghost,size:c(H).Small,onClick:W},{default:v(()=>[...l[3]||(l[3]=[y(" Reset ",-1)])]),_:1},8,["color","variant","size"]),m(c(I),{color:c(j).Primary,size:c(H).Small,onClick:Q},{default:v(()=>[...l[4]||(l[4]=[y(" Apply ",-1)])]),_:1},8,["color","size"])],2)],2)],2)]),_:1},8,["border-radius","variant","rounded"])],6)):f("",!0)],10,E))}});export{M as CLInputTimePicker,M as default};
3
+ import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as o,computed as u,onMounted as i,onBeforeUnmount as s,createElementBlock as r,openBlock as d,normalizeClass as n,createVNode as m,createCommentVNode as f,unref as c,normalizeStyle as p,withCtx as v,createElementVNode as b,createTextVNode as y}from"vue";import{u as _,a as h,o as k,f as C,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Dzbe7JWZ.js";import{_ as L}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BBOuR1kL.js";import{CLInput as z}from"../CLInput/CLInput.js";import{CLTimePicker as V}from"../CLTimePicker/CLTimePicker.js";import{f as x,c as B,C as H,d as j,n as R}from"../../../chunks/index-Djy51eo9.js";import{a as F}from"../../../chunks/index-wkMXT2wB.js";import{useEsc as T}from"../../../composables/useEsc.js";import{useTimeInputMask as P}from"../../../composables/useTimeInputMask.js";import{i as $}from"../../../chunks/helper-BlxFN3eF.js";const E=["data-testid"],M=/* @__PURE__ */e({name:"CLInputTimePicker",__name:"CLInputTimePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:j.Neutral},size:{default:H.Small},variant:{default:B.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{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},onReset:{type:Function,default:void 0},orientation:{default:F.Vertical},placement:{default:R.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-time-picker"},use24Hour:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,R="clll-input-time-picker",F=l(!1),M=l(),S=l(),w=l(),q=t(e,"modelValue"),U=l(""),{handleTimeInput:A,validateTime:G}=P();o(q,()=>{U.value=q.value??""},{immediate:!0});const N=u(()=>M.value?.$el),{floatingStyles:O}=_(N,w,{middleware:[k(8),C(),g()],placement:l(a.placement),whileElementsMounted:h,open:F}),D=()=>{a.disabled||a.busy||(F.value=!F.value,F.value?(a.onFocus?.(new FocusEvent("focus")),S.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},J=()=>{F.value&&(F.value=!1,S.value?.cancel(),a.onBlur?.(new FocusEvent("blur")))};T({escHandler:J});const K=e=>{const a=e.target,l=M.value?.$el,t=w.value;F.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&J()},Q=()=>{S.value?.apply(),F.value=!1,a.onChange?.()},W=()=>{S.value?.reset(),a.onReset?.(),a.onChange?.()},X=()=>{J()},Y=e=>{const l=G(e,a.use24Hour),t=M.value?.inputRef;return t&&(e&&!l?t.setCustomValidity(a.use24Hour?"Invalid format. Use HH:mm":"Invalid format. Use hh:mm AM/PM"):t.setCustomValidity("")),l},Z=e=>{e&&A(e,U,a.use24Hour,()=>{Y(U.value)})},ee=e=>{if(!e)return;const l=e.target.value,t=Y(l);if(!l.trim())return q.value=null,void a.onChange?.();t&&(q.value=l.trim(),a.onChange?.())};return i(()=>{$&&document.addEventListener("click",K)}),s(()=>{$&&document.removeEventListener("click",K)}),(a,l)=>(d(),r("div",{class:n([R,e.fluid?`${R}--fluid`:""]),"data-testid":e.testId},[m(c(z),{id:e.id,ref_key:"inputRef",ref:M,modelValue:U.value,"onUpdate:modelValue":l[0]||(l[0]=e=>U.value=e),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,label:e.label,messages:e.messages,"message-type":e.messageType,name:e.name,orientation:e.orientation,placeholder:e.placeholder||(e.use24Hour?"HH:mm":"hh:mm AM/PM"),required:e.required,rounded:e.rounded,size:e.size,suffix:c(x).Clock,"suffix-aria-label":e.ariaLabel||"Open time picker","test-id":`${e.testId}__input`,variant:e.variant,onInput:Z,onChange:ee,onSuffixClick:D},null,8,["id","modelValue","aria-label","border-radius","busy","color","disabled","fluid","form","label","messages","message-type","name","orientation","placeholder","required","rounded","size","suffix","suffix-aria-label","test-id","variant"]),F.value?(d(),r("div",{key:0,ref_key:"popoverRef",ref:w,class:n(`${R}__popover`),style:p({...c(O),zIndex:100})},[m(c(L),{"border-radius":e.borderRadius,variant:c(B).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:v(()=>[b("div",{class:n(`${R}__container`)},[m(c(V),{ref_key:"timePickerRef",ref:S,modelValue:q.value,"onUpdate:modelValue":l[1]||(l[1]=e=>q.value=e),disabled:e.disabled,busy:e.busy,"use24-hour":e.use24Hour,fluid:""},null,8,["modelValue","disabled","busy","use24-hour"]),b("div",{class:n(`${R}__footer`)},[m(c(I),{color:c(j).Neutral,variant:c(B).Ghost,size:c(H).Small,onClick:X},{default:v(()=>[...l[2]||(l[2]=[y(" Cancel ",-1)])]),_:1},8,["color","variant","size"]),b("div",{class:n(`${R}__footer-right`)},[m(c(I),{color:c(j).Neutral,variant:c(B).Ghost,size:c(H).Small,onClick:W},{default:v(()=>[...l[3]||(l[3]=[y(" Reset ",-1)])]),_:1},8,["color","variant","size"]),m(c(I),{color:c(j).Primary,size:c(H).Small,onClick:Q},{default:v(()=>[...l[4]||(l[4]=[y(" Apply ",-1)])]),_:1},8,["color","size"])],2)],2)],2)]),_:1},8,["border-radius","variant","rounded"])],6)):f("",!0)],10,E))}});export{M as CLInputTimePicker,M as default};