@codeandfunction/callaloo 5.12.0 → 5.13.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.
- package/dist/callaloo.global.js +1 -1
- package/dist/chunks/{CLCalendar.vue_vue_type_style_index_0_lang-CwAEgFEm.js → CLCalendar.vue_vue_type_style_index_0_lang-DcHQwUiD.js} +1 -1
- package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-BuKAc6nL.js → CLCard.vue_vue_type_style_index_0_lang-Chi6OUG_.js} +1 -1
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-BPIS5Blr.js → CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js} +1 -1
- package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-CkBRxbai.js → CLHeading.vue_vue_type_style_index_0_lang-BkfH2FiT.js} +1 -1
- package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-DiAv1zbI.js → CLModal.vue_vue_type_style_index_0_lang-CZzQ8wCU.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-BVGPKA_O.js → CLPill.vue_vue_type_style_index_0_lang-CoaDiJJy.js} +1 -1
- package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-lBlmBzp8.js → CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js} +1 -1
- package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-CiXYEOQ5.js → CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js} +1 -1
- package/dist/chunks/utils-CQ3b50lb.js +1 -0
- package/dist/components/CLTable/CLTable.js +1 -1
- package/dist/components/Containers/CLCard/CLCard.js +1 -1
- package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
- package/dist/components/Containers/CLDrawer/CLDrawer.js +1 -1
- package/dist/components/Containers/CLDrawer/CLDrawer.vue.d.ts +11 -1
- package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
- package/dist/components/Form/CLInput/CLInput.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.js +1 -1
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -1
- package/dist/components/Form/CLSelect/CLSelect.js +1 -1
- package/dist/components/Form/CLTextArea/CLTextArea.js +1 -1
- package/dist/components/Form/CLTimePicker/CLTimePicker.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Modals/CLModal/CLModal.js +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.js +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
- package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
- package/dist/components/Typography/CLText/CLText.js +1 -1
- package/dist/composables/useElementSize.d.ts +4 -4
- package/dist/composables/useElementSize.js +1 -1
- package/dist/composables/useTheme.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/utils-CzgS4t52.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLRadioButton.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as f,a as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as f,a as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{C as X,a as v,c as L,d as h}from"../../../chunks/index-CGlfDAYR.js";import{a as B}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as k}from"../../../composables/useTheme.js";const C=["data-testid"],q=["for"],x=["id","aria-label","checked","disabled","name","value","required"],R=/* @__PURE__ */e({name:"CLRadioButton",__name:"CLRadioButton",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},checked:{type:Boolean},color:{default:h.Neutral},disabled:{type:Boolean},form:{},id:{},label:{},messages:{},messageType:{},name:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:X.Small},testId:{default:"clll-radiobutton"},value:{type:[String,Number,Boolean]},variant:{default:L.Outline},onBlur:{},onChange:{},onFocus:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const L={[X.Tiny]:v.Small,[X.Small]:v.Medium,[X.Medium]:v.Medium,[X.Large]:v.Large,[X.XL]:v.XL,[X.XXL]:v.XXL,[X.XXXL]:v.XXXL,[X.XXXXL]:v.XXXXL},h=e,R=k(),T="clll-radiobutton",j=l(e,"modelValue"),M=s("radiobutton-ref"),F=()=>{M.value&&M.value.focus()},S=o(()=>[T,h.borderRadius?`${T}--${h.borderRadius}`:"",h.busy?`${T}--busy`:`${T}--ready`,`${T}--${h.color}`,`${T}--${h.size}`,h.disabled?`${T}--disabled`:`${T}--active`,h.label?`${T}--haslabel`:"",h.messageType?`${T}--${h.messageType}`:"",h.rounded?`${T}--rounded`:`${T}--box`,h.required?`${T}--required`:`${T}--optional`]),V=o(()=>[`${T}__radiobutton-container`,`${T}--${h.variant}`]);return a({radiobuttonRef:M}),(a,l)=>(t(),d(f,null,{default:r(()=>[u("span",{class:m(c(S)),style:i(c(B)({color:e.color,variant:e.variant,theme:c(R)})),"data-testid":e.testId},[u("span",{class:m(c(V)),onClick:F},[u("label",{for:e.id,class:m(`${T}__label`)},[u("span",{class:m([`${T}__radiobutton-frame`,"form-control-flex"])},[p(u("input",{id:e.id,ref:"radiobutton-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${T}__radiobutton`),checked:e.checked,disabled:e.disabled||e.busy,name:e.name,value:e.value,required:e.required,type:"radio",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,x),[[b,j.value]]),u("span",{class:m(`${T}__indicator`)},null,2)],2),e.label?(t(),d(c(g),{key:0,as:"span",type:L[e.size],class:m(e.required?`${T}__label--required`:"")},{default:r(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,q)],2)],14,C),e.id?(t(),d($,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{R as CLRadioButton,R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLSelect.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js";import{_ as C}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-C21socAp.js";import{C as k,e as X,f as x,c as q,d as z}from"../../../chunks/index-CGlfDAYR.js";import{f as B}from"../../../chunks/index-C9S3C1LU.js";import{s as T}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as j}from"../../../composables/useTheme.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:z.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:B.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:k.Small},testId:{default:"clll-select"},variant:{default:q.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const q={[k.Tiny]:X.Tiny,[k.Small]:X.Tiny,[k.Medium]:X.Small,[k.Large]:X.Medium,[k.XL]:X.Medium,[k.XXL]:X.Large,[k.XXXL]:X.Large,[k.XXXXL]:X.XL},z=e,V=j(),I="clll-select",R=l(e,"modelValue"),w=s("select-ref"),D=()=>{w.value&&w.value.focus()},H=o(()=>[I,z.borderRadius?`${I}--${z.borderRadius}`:"",z.busy?`${I}--busy`:`${I}--ready`,`${I}--${z.color}`,`${I}--${z.size}`,`${I}--${z.variant}`,z.disabled||z.busy?`${I}--disabled`:`${I}--active`,z.fluid||z.orientation===B.Horizontal?`${I}--fluid`:`${I}--fixed`,z.label?`${I}--haslabel`:"",z.messageType?`${I}--${z.messageType}`:"",z.orientation?`${I}--${z.orientation}`:"",z.rounded?`${I}--rounded`:`${I}--box`,z.required?`${I}--required`:`${I}--optional`]);return a({selectRef:w}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(H)),style:u(c(T)({color:e.color,variant:e.variant,theme:c(V)})),"data-testid":e.testId},[e.label?(t(),i(L,{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"])):n("",!0),d("span",{class:m(`${I}__select-container`),onClick:D},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${I}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===R.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,R.value]]),d("span",{class:m([`${I}__icon`,"form-select-icon-flex"])},[v(c(C),{name:c(x).ChevronDown,size:q[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLTextArea.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f,a as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f,a as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js";import{_ as b}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-FFNlcIuE.js";import{c as x,C as $,d as _}from"../../../chunks/index-CGlfDAYR.js";import{f as C,C as v}from"../../../chunks/index-C9S3C1LU.js";import{i as L}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as k}from"../../../composables/useTheme.js";const B=["data-testid"],z=["id","aria-label","autocomplete","cols","disabled","form","maxlength","minlength","name","pattern","placeholder","readonly","required","spellcheck","rows"],q=/* @__PURE__ */e({name:"CLTextArea",__name:"CLTextArea",props:/* @__PURE__ */a({ariaLabel:{},autoComplete:{type:Boolean},borderRadius:{},busy:{type:Boolean},charCounter:{type:Boolean},color:{default:_.Neutral},cols:{},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},maxLength:{},messages:{},messageType:{},minLength:{},name:{},onBlur:{},onChange:{},onFocus:{},onInput:{},orientation:{default:C.Vertical},pattern:{},placeholder:{},readonly:{type:Boolean},required:{type:Boolean},resizable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},rows:{},size:{default:$.Small},spellCheck:{type:Boolean},testId:{default:"clll-textarea"},variant:{default:x.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const x=e,$=k(),_="clll-textarea",q=l("textarea-ref"),T=o(e,"modelValue"),j=()=>{q.value&&q.value.focus()},I=t(()=>[_,x.borderRadius?`${_}--${x.borderRadius}`:"",x.busy?`${_}--busy`:`${_}--ready`,`${_}--${x.color}`,`${_}--${x.size}`,`${_}--${x.variant}`,x.disabled||x.busy?`${_}--disabled`:`${_}--active`,x.charCounter&&x.maxLength?`${_}--hascharcounter`:"",x.fluid||x.orientation===C.Horizontal?`${_}--fluid`:`${_}--fixed`,x.label?`${_}--haslabel`:"",x.messageType?`${_}--${x.messageType}`:"",x.orientation?`${_}--${x.orientation}`:"",x.resizable?`${_}--resizable`:"",x.readonly?`${_}--readonly`:`${_}--writeable`,x.rounded?`${_}--rounded`:`${_}--box`,x.required?`${_}--required`:`${_}--optional`]);return a({textareaRef:q}),(a,l)=>(n(),r(f,{fluid:e.fluid,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:s(()=>[i("span",{class:m(p(I)),style:d(p(L)({color:e.color,variant:e.variant,theme:p($)})),"data-testid":e.testId},[e.label?(n(),r(g,{key:0,"css-prefix":_,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):u("",!0),i("span",{class:m(`${_}__input-container`),onClick:j},[c(i("textarea",{id:e.id,ref:"textarea-ref","onUpdate:modelValue":l[0]||(l[0]=e=>T.value=e),"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:m(`${_}__input`),cols:e.cols,disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,name:e.name,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,rows:e.rows,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)),onInput:l[4]||(l[4]=(...a)=>e.onInput&&e.onInput(...a))},null,42,z),[[h,T.value]])],2),e.charCounter&&e.maxLength?(n(),r(b,{key:1,"css-prefix":_,"current-length":T.value?T.value.toString().length:0,"max-length":e.maxLength,color:e.color,size:e.size,layout:p(v).Block},null,8,["current-length","max-length","color","size","layout"])):u("",!0)],14,B),e.id?(n(),r(y,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):u("",!0)]),_:1},8,["fluid","has-char-counter","orientation"]))}});export{q as CLTextArea,q as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLTimePicker.css';
|
|
3
|
-
import{defineComponent as e,mergeModels as l,useCssVars as a,ref as t,useModel as u,toRef as i,watch as s,createElementBlock as o,openBlock as r,normalizeStyle as d,normalizeClass as n,unref as c,createCommentVNode as p,createElementVNode as m,createVNode as v,withCtx as _,createTextVNode as b,toDisplayString as f,withDirectives as y,isRef as g,vModelText as h}from"vue";import{_ as $}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,mergeModels as l,useCssVars as a,ref as t,useModel as u,toRef as i,watch as s,createElementBlock as o,openBlock as r,normalizeStyle as d,normalizeClass as n,unref as c,createCommentVNode as p,createElementVNode as m,createVNode as v,withCtx as _,createTextVNode as b,toDisplayString as f,withDirectives as y,isRef as g,vModelText as h}from"vue";import{_ as $}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{d as x,a as M}from"../../../chunks/index-CGlfDAYR.js";import{t as S}from"../../../chunks/utils-B5AOZV7T.js";import{useTimePicker as k}from"../../../composables/useTimePicker.js";import{useTheme as H}from"../../../composables/useTheme.js";const P=["data-testid"],D=["disabled"],I=["disabled"],T=["disabled"],j=["disabled"],B=/* @__PURE__ */e({name:"CLTimePicker",__name:"CLTimePicker",props:/* @__PURE__ */l({color:{default:x.Primary},disabled:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},headerLabel:{default:"Enter time"},testId:{default:"clll-time-picker"},use24Hour:{type:Boolean,default:!1},width:{default:"auto"}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */l(["time-select"],["update:modelValue"]),setup(e,{expose:l,emit:B}){a(e=>({v09187e41:e.width}));const L=e,C=B,V=H(),A="clll-time-picker",F=t(null),N=u(e,"modelValue"),w=t(N.value??null),{cancelDraft:z,clearDraft:U,draftHour:E,draftMinute:O,draftPeriod:q,formatTimeObject:G,getFormattedDraft:J,initializeDraft:K,parseTime:Q}=k({appliedTime:w,use24Hour:i(L,"use24Hour")});s(N,e=>{w.value=e??null,K()},{immediate:!0});const R=e=>{let l=e.target.value.replace(/\D/g,"");if(!l)return void(E.value="");let a=parseInt(l,10);L.use24Hour?a>23&&(a=23):(a>12&&(a=12),a<1&&l.length>=2&&(a=1)),E.value=String(a).padStart(l.length>=2?2:l.length,"0")},W=()=>{F.value="hour"},X=()=>{if(F.value=null,E.value&&"0"!==E.value&&"00"!==E.value){const e=parseInt(E.value,10);E.value=String(e).padStart(2,"0")}else E.value=L.use24Hour?"00":"12";ae()},Y=e=>{let l=e.target.value.replace(/\D/g,"");if(!l)return void(O.value="");let a=parseInt(l,10);a>59&&(a=59),O.value=String(a).padStart(l.length>=2?2:l.length,"0")},Z=()=>{F.value="minute"},ee=()=>{if(F.value=null,O.value){const e=parseInt(O.value,10);O.value=String(e).padStart(2,"0")}else O.value="00";ae()},le=e=>{L.disabled||L.busy||(q.value=e,ae())},ae=()=>{const e=J();C("time-select",e)};return l({apply:()=>{const e=J();w.value=e,N.value=e},cancel:()=>{z()},draftHour:E,draftMinute:O,draftPeriod:q,getFormattedDraft:J,initializeDraft:K,reset:()=>{U(),w.value=null,N.value=null}}),(l,a)=>(r(),o("div",{class:n([A,e.fluid?`${A}--fluid`:""]),"data-testid":e.testId,style:d(c(S)({color:e.color,theme:c(V)}))},[e.headerLabel?(r(),o("div",{key:0,class:n(`${A}__header`)},[v(c($),{type:c(M).Small,color:c(x).Neutral,medium:""},{default:_(()=>[b(f(e.headerLabel),1)]),_:1},8,["type","color"])],2)):p("",!0),m("div",{class:n(`${A}__controls`)},[m("div",{class:n(`${A}__unit-container`)},[m("div",{class:n([`${A}__box`,"hour"===F.value?`${A}__box--active`:""])},[y(m("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>g(E)?E.value=e:null),type:"text",inputmode:"numeric",maxlength:"2",disabled:e.disabled||e.busy,class:n(`${A}__input`),"aria-label":"Hour input",onInput:R,onFocus:W,onBlur:X},null,42,D),[[h,c(E)]])],2),v(c($),{type:c(M).Small,color:c(x).Neutral,class:n(`${A}__sublabel`)},{default:_(()=>[...a[4]||(a[4]=[b(" Hour ",-1)])]),_:1},8,["type","color","class"])],2),m("div",{class:n(`${A}__separator`)},":",2),m("div",{class:n(`${A}__unit-container`)},[m("div",{class:n([`${A}__box`,"minute"===F.value?`${A}__box--active`:""])},[y(m("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>g(O)?O.value=e:null),type:"text",inputmode:"numeric",maxlength:"2",disabled:e.disabled||e.busy,class:n(`${A}__input`),"aria-label":"Minute input",onInput:Y,onFocus:Z,onBlur:ee},null,42,I),[[h,c(O)]])],2),v(c($),{type:c(M).Small,color:c(x).Neutral,class:n(`${A}__sublabel`)},{default:_(()=>[...a[5]||(a[5]=[b(" Minute ",-1)])]),_:1},8,["type","color","class"])],2),e.use24Hour?p("",!0):(r(),o("div",{key:0,class:n(`${A}__period-toggle`)},[m("button",{type:"button",class:n([`${A}__period-btn`,"AM"===c(q)?`${A}__period-btn--active`:""]),disabled:e.disabled||e.busy,"aria-label":"Select AM",onClick:a[2]||(a[2]=e=>le("AM"))}," AM ",10,T),m("button",{type:"button",class:n([`${A}__period-btn`,"PM"===c(q)?`${A}__period-btn--active`:""]),disabled:e.disabled||e.busy,"aria-label":"Select PM",onClick:a[3]||(a[3]=e=>le("PM"))}," PM ",10,j)],2))],2)],14,P))}});export{B as CLTimePicker,B as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLBanner.css';
|
|
3
|
-
import{defineComponent as e,computed as a,createBlock as t,openBlock as o,unref as i,withCtx as s,createElementVNode as n,normalizeStyle as l,normalizeClass as r,createElementBlock as d,createCommentVNode as u,createTextVNode as c,toDisplayString as _,createVNode as b}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-DmZZOodW.js";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_ as f}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,computed as a,createBlock as t,openBlock as o,unref as i,withCtx as s,createElementVNode as n,normalizeStyle as l,normalizeClass as r,createElementBlock as d,createCommentVNode as u,createTextVNode as c,toDisplayString as _,createVNode as b}from"vue";import{_ as y}from"../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-DmZZOodW.js";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_ as f}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-BkfH2FiT.js";import{_ as k}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-_qLiUhKp.js";import{_ as p}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{c as v,d as g,i as h,l as $,a as L,C,e as x,f as B}from"../../../chunks/index-CGlfDAYR.js";import{a as j}from"../../../chunks/utils-iQnJybN9.js";const S=["data-testid"],D=/* @__PURE__ */e({name:"CLBanner",__name:"CLBanner",props:{actionLabel:{},align:{default:h.Left},ariaLabel:{},bordered:{type:Boolean,default:!0},borderRadius:{},busy:{type:Boolean,default:!1},color:{default:g.Neutral},height:{default:"auto"},message:{},onAction:{},onClick:{},onDismiss:{},rounded:{type:Boolean,default:!0},testId:{default:"clll-banner"},title:{},width:{default:"100%"},variant:{default:v.Soft}},setup(e){const g=e,h="clll-banner",D=a(()=>[h,g.actionLabel?`${h}--actionable`:"",g.busy?`${h}--busy`:`${h}--ready`,g.bordered&&g.variant!==v.Ghost?`${h}--bordered`:"",g.borderRadius?`${h}--${g.borderRadius}`:"",g.onDismiss?`${h}--dismissable`:"",`${h}--${g.color}--${g.variant}`,`${h}--align-${g.align}`,g.rounded?`${h}--rounded`:`${h}--box`]);return(a,g)=>(o(),t(i(y),{color:e.color,enabled:!(!e.onClick||!e.ariaLabel),rounded:e.rounded},{default:s(()=>[n("div",{class:r(i(D)),"data-testid":e.testId,style:l({...i(j)({color:e.color,variant:e.variant}),width:e.width,height:e.height})},[n("div",{class:r(`${h}__content`)},[n("div",{class:r(`${h}__nested_content`)},[e.busy?(o(),t(i(k),{key:0,"border-radius":e.borderRadius,height:"28px","test-id":`${h}__skeleton-title`},null,8,["border-radius","test-id"])):u("",!0),e.busy?(o(),t(i(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px","test-id":`${h}__skeleton-message`},null,8,["border-radius","test-id"])):u("",!0),e.title&&!e.busy?(o(),t(i(f),{key:2,align:e.align,color:e.color,type:i($).Section},{default:s(()=>[c(_(e.title),1)]),_:1},8,["align","color","type"])):u("",!0),e.message&&!e.busy?(o(),t(i(p),{key:3,align:e.align,color:e.color,type:i(L).Summary},{default:s(()=>[c(_(e.message),1)]),_:1},8,["align","color","type"])):u("",!0)],2),e.onAction&&e.actionLabel?(o(),d("div",{key:0,class:r(`${h}__action-button`)},[b(i(m),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${h}__action-button`,variant:e.variant===i(v).Solid?i(v).Soft:i(v).Solid},{default:s(()=>[c(_(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):u("",!0)],2),e.onDismiss?(o(),d("div",{key:0,class:r(`${h}__dismiss-button`)},[b(i(m),{"aria-label":"Dismiss banner",color:e.color,"icon-before":i(B).Delete,"icon-size":i(x).Tiny,"on-click":e.onDismiss,size:i(C).Tiny,"test-id":`${h}__dismiss-button`,variant:e.variant},null,8,["color","icon-before","icon-size","on-click","size","test-id","variant"])],2)):u("",!0),e.onClick&&e.ariaLabel?(o(),d("button",{key:1,class:"sr-only","data-expand-click-area":"",onClick:g[0]||(g[0]=(...a)=>e.onClick&&e.onClick(...a))},_(e.ariaLabel),1)):u("",!0)],14,S)]),_:1},8,["color","enabled","rounded"]))}});export{D as CLBanner,D as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLPill.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-CoaDiJJy.js";export{e as CLPill,e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLProgress.css';
|
|
3
|
-
import{defineComponent as e,mergeModels as s,useModel as t,computed as a,createElementBlock as l,openBlock as o,normalizeStyle as r,normalizeClass as d,unref as u,createCommentVNode as i,createElementVNode as n,createVNode as m,withCtx as c,createTextVNode as _,toDisplayString as p}from"vue";import{_ as f}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,mergeModels as s,useModel as t,computed as a,createElementBlock as l,openBlock as o,normalizeStyle as r,normalizeClass as d,unref as u,createCommentVNode as i,createElementVNode as n,createVNode as m,withCtx as c,createTextVNode as _,toDisplayString as p}from"vue";import{_ as f}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{a as v,d as y,C as $}from"../../../chunks/index-CGlfDAYR.js";import{c as g}from"../../../chunks/utils-iQnJybN9.js";import{useTheme as b}from"../../../composables/useTheme.js";const h=["data-testid"],C=/* @__PURE__ */e({name:"CLProgress",__name:"CLProgress",props:/* @__PURE__ */s({color:{default:y.Primary},inverted:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:$.Medium},status:{type:Boolean,default:!1},testId:{default:"clll-progress"}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const s=e,$=b(),C=t(e,"modelValue"),j="clll-progress",k=a(()=>[j,`${j}--${s.color}`,`${j}--${s.size}`,s.inverted?`${j}--inverted`:"",s.rounded?`${j}--rounded`:`${j}--not-rounded`]),x=a(()=>`${C.value}%`);return(s,t)=>(o(),l("div",{class:d(u(k)),"data-testid":e.testId,style:r({...u(g)({color:e.color,theme:u($)}),"--clll-progress-value":C.value})},[e.status?(o(),l("div",{key:0,class:d(`${j}__status__container`)},[n("div",{class:d(`${j}__status__label`)},[m(u(f),{color:u(y).Neutral,type:u(v).Summary},{default:c(()=>[_(p(u(x)),1)]),_:1},8,["color","type"])],2)],2)):i("",!0),n("div",{class:d(`${j}__bar-container`)},[n("div",{class:d(`${j}__bar`)},null,2)],2)],14,h))}});export{C as CLProgress,C as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLModal.css';
|
|
3
|
-
import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-CZzQ8wCU.js";export{a as CLModal,a as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLModalDatePicker.css';
|
|
3
|
-
import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,onMounted as o,onBeforeUnmount as i,createElementBlock as u,openBlock as n,normalizeClass as r,unref as s,createVNode as b,withCtx as c,createTextVNode as f,toDisplayString as p,createElementVNode as v,nextTick as m}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,onMounted as o,onBeforeUnmount as i,createElementBlock as u,openBlock as n,normalizeClass as r,unref as s,createVNode as b,withCtx as c,createTextVNode as f,toDisplayString as p,createElementVNode as v,nextTick as m}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-CZzQ8wCU.js";import{_ as L}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-DcHQwUiD.js";import{C as X,e as k,f as g,h,c as $,d as C}from"../../../chunks/index-CGlfDAYR.js";import{i as w}from"../../../chunks/helper-BlxFN3eF.js";import{useDatePicker as R}from"../../../composables/useDatePicker.js";const S=["data-testid"],B=/* @__PURE__ */e({name:"CLModalDatePicker",__name:"CLModalDatePicker",props:/* @__PURE__ */a({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:C.Primary},buttonLabel:{default:"Select dates"},buttonSize:{default:X.Small},buttonVariant:{default:$.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},id:{},isRange:{type:Boolean,default:!0},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onReset:{},testId:{default:"clll-date-picker-modal"},title:{default:"Select dates"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,B="clll-date-picker-modal",z=t(!1),V=l(()=>`date-picker-modal-${a.id}`),x=t(),M=d(e,"modelValue"),{rangeLabel:E}=R({appliedStart:l(()=>M.value?.start??null),appliedEnd:l(()=>M.value?.end??null),isRange:a.isRange}),F=t(!1),j=()=>{w&&(F.value=window.innerWidth<480)},P=()=>{if(a.disabled||a.busy)return;j(),z.value=!0,m(()=>{x.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});a.onFocus?.(e)},D=()=>{z.value=!1,x.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});a.onBlur?.(e)},W=()=>{x.value?.apply(),z.value=!1,a.onChange?.()},A=()=>{x.value?.reset(),a.onReset?.()},I=l(()=>F.value);o(()=>{w&&(j(),window.addEventListener("resize",j))}),i(()=>{w&&window.removeEventListener("resize",j)});const N={[X.Tiny]:k.Tiny,[X.Small]:k.Small,[X.Medium]:k.Medium,[X.Large]:k.Large,[X.XL]:k.XL,[X.XXL]:k.XXL,[X.XXXL]:k.XXXL,[X.XXXXL]:k.XXXXL},G=l(()=>[B,a.buttonBorderRadius?`${B}--${a.buttonBorderRadius}`:"",a.busy?`${B}--busy`:`${B}--ready`,`${B}--${a.buttonColor}`,`${B}--${a.buttonSize}`,`${B}--${a.buttonVariant}`,a.disabled||a.busy?`${B}--disabled`:`${B}--active`,a.fluid?`${B}--fluid`:`${B}--fixed`]),T=l(()=>{const e=x.value?.draftStart,t=x.value?.draftEnd;return a.isRange?!!e&&!!t:!!e});return(a,t)=>(n(),u("div",{class:r(s(G)),"data-testid":e.testId},[b(s(y),{"aria-label":e.buttonAriaLabel||"Open date picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":s(g).Calendar,"icon-size":N[e.buttonSize],"on-click":P,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:c(()=>[f(p(s(E)||e.buttonLabel),1)]),_:1},8,["aria-label","border-radius","busy","color","disabled","icon-before","icon-size","test-id","size","variant","width","wrap"]),b(s(_),{"border-radius":s(I)?s(h).None:s(h).Medium,fullscreen:s(I),"is-open":s(z),"max-width":"336px","modal-id":s(V),"on-close":D,title:e.title},{body:c(()=>[b(s(L),{ref_key:"calendarRef",ref:x,modelValue:M.value,"onUpdate:modelValue":t[0]||(t[0]=e=>M.value=e),busy:e.busy,disabled:e.disabled,fluid:s(I),"is-range":e.isRange},null,8,["modelValue","busy","disabled","fluid","is-range"])]),footer:c(()=>[v("div",{class:r(`${B}__footer-actions`)},[b(s(y),{color:s(C).Neutral,"on-click":D,variant:s($).Ghost},{default:c(()=>[...t[1]||(t[1]=[f(" Cancel ",-1)])]),_:1},8,["color","variant"]),v("div",{class:r(`${B}__footer-right`)},[b(s(y),{color:s(C).Neutral,disabled:!s(x)?.draftStart&&!s(x)?.draftEnd,"on-click":A,variant:s($).Ghost},{default:c(()=>[...t[2]||(t[2]=[f(" Reset ",-1)])]),_:1},8,["color","disabled","variant"]),b(s(y),{color:s(C).Primary,disabled:!s(T),"on-click":W},{default:c(()=>[...t[3]||(t[3]=[f(" Apply ",-1)])]),_:1},8,["color","disabled"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,S))}});export{B as CLModalDatePicker,B as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLModalTimePicker.css';
|
|
3
|
-
import{defineComponent as e,mergeModels as t,ref as o,computed as a,useModel as l,onMounted as i,onBeforeUnmount as u,createElementBlock as d,openBlock as r,normalizeClass as n,createVNode as s,unref as c,withCtx as b,createTextVNode as m,toDisplayString as f,createElementVNode as p,nextTick as v}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{CLTimePicker as _}from"../../Form/CLTimePicker/CLTimePicker.js";import{_ as L}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,mergeModels as t,ref as o,computed as a,useModel as l,onMounted as i,onBeforeUnmount as u,createElementBlock as d,openBlock as r,normalizeClass as n,createVNode as s,unref as c,withCtx as b,createTextVNode as m,toDisplayString as f,createElementVNode as p,nextTick as v}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{CLTimePicker as _}from"../../Form/CLTimePicker/CLTimePicker.js";import{_ as L}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-CZzQ8wCU.js";import{C as k,e as h,f as X,h as $,c as C,d as w}from"../../../chunks/index-CGlfDAYR.js";import{useTimePicker as B}from"../../../composables/useTimePicker.js";import{i as z}from"../../../chunks/helper-BlxFN3eF.js";const g=["data-testid"],S=/* @__PURE__ */e({name:"CLModalTimePicker",__name:"CLModalTimePicker",props:/* @__PURE__ */t({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:w.Primary},buttonLabel:{default:"Select time"},buttonSize:{default:k.Small},buttonVariant:{default:C.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},id:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onReset:{type:Function,default:void 0},testId:{default:"clll-time-picker-modal"},title:{default:"Select time"},use24Hour:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,S="clll-time-picker-modal",F=o(!1),V=a(()=>`time-picker-modal-${t.id}`),P=o(),R=l(e,"modelValue"),{formattedLabel:T}=B({appliedTime:R,use24Hour:t.use24Hour}),x=o(!1),M=()=>{z&&(x.value=window.innerWidth<480)},j=()=>{if(t.disabled||t.busy)return;M(),F.value=!0,v(()=>{P.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});t.onFocus?.(e)},W=()=>{F.value=!1,P.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});t.onBlur?.(e)},E=()=>{P.value?.apply(),F.value=!1,t.onChange?.()},H=()=>{P.value?.reset(),t.onReset?.(),t.onChange?.()},A=a(()=>x.value);i(()=>{z&&(M(),window.addEventListener("resize",M))}),u(()=>{z&&window.removeEventListener("resize",M)});const I={[k.Tiny]:h.Tiny,[k.Small]:h.Small,[k.Medium]:h.Medium,[k.Large]:h.Large,[k.XL]:h.XL,[k.XXL]:h.XXL,[k.XXXL]:h.XXXL,[k.XXXXL]:h.XXXXL},N=a(()=>[S,t.buttonBorderRadius?`${S}--${t.buttonBorderRadius}`:"",t.busy?`${S}--busy`:`${S}--ready`,`${S}--${t.buttonColor}`,`${S}--${t.buttonSize}`,`${S}--${t.buttonVariant}`,t.disabled||t.busy?`${S}--disabled`:`${S}--active`,t.fluid?`${S}--fluid`:`${S}--fixed`]);return(t,o)=>(r(),d("div",{class:n(N.value),"data-testid":e.testId},[s(c(y),{"aria-label":e.buttonAriaLabel||"Open time picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":c(X).Clock,"icon-size":I[e.buttonSize],"on-click":j,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:b(()=>[m(f(c(T)||e.buttonLabel),1)]),_:1},8,["aria-label","border-radius","busy","color","disabled","icon-before","icon-size","test-id","size","variant","width","wrap"]),s(c(L),{"border-radius":A.value?c($).None:c($).Medium,fullscreen:A.value,"is-open":F.value,"max-width":"340px","modal-id":V.value,"on-close":W,title:e.title},{body:b(()=>[s(c(_),{ref_key:"timePickerRef",ref:P,modelValue:R.value,"onUpdate:modelValue":o[0]||(o[0]=e=>R.value=e),busy:e.busy,disabled:e.disabled,fluid:A.value,"use24-hour":e.use24Hour},null,8,["modelValue","busy","disabled","fluid","use24-hour"])]),footer:b(()=>[p("div",{class:n(`${S}__footer-actions`)},[s(c(y),{color:c(w).Neutral,variant:c(C).Ghost,"on-click":W},{default:b(()=>[...o[1]||(o[1]=[m(" Cancel ",-1)])]),_:1},8,["color","variant"]),p("div",{class:n(`${S}__footer-right`)},[s(c(y),{color:c(w).Neutral,variant:c(C).Ghost,"on-click":H},{default:b(()=>[...o[2]||(o[2]=[m(" Reset ",-1)])]),_:1},8,["color","variant"]),s(c(y),{color:c(w).Primary,"on-click":E},{default:b(()=>[...o[3]||(o[3]=[m(" Apply ",-1)])]),_:1},8,["color"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,g))}});export{S as CLModalTimePicker,S as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLNavSection.css';
|
|
3
|
-
import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeClass as r,unref as n,Fragment as s,renderList as i,createVNode as o,withCtx as c,createTextVNode as u,toDisplayString as d}from"vue";import{_}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-BDDQvo5I.js";import{_ as m}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeClass as r,unref as n,Fragment as s,renderList as i,createVNode as o,withCtx as c,createTextVNode as u,toDisplayString as d}from"vue";import{_}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-BDDQvo5I.js";import{_ as m}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{d as p}from"../../../chunks/index-CGlfDAYR.js";import{f}from"../../../chunks/index-C9S3C1LU.js";const v=["data-testid"],k=/* @__PURE__ */e({name:"CLNavSection",__name:"CLNavSection",props:{color:{default:p.Primary},navItems:{},testId:{default:"clll-nav-section"},type:{default:f.Horizontal}},setup(e){const p=e,f="clll-nav-section",k=t(()=>[f,`${f}--${p.type}`]);return(t,p)=>(l(),a("ul",{class:r(n(k)),"data-testid":e.testId},[(l(!0),a(s,null,i(e.navItems,(t,r)=>(l(),a("li",{key:`link-${t.id}-${r}`,class:"clll-nav-section__item"},[o(n(_),{id:t.id,"aria-label":t.ariaLabel,color:e.color,external:t.external,href:t.href,rel:t.rel,target:t.target,"on-click":t.onClick},{default:c(()=>[o(n(m),{as:"span"},{default:c(()=>[u(d(t.label),1)]),_:2},1024)]),_:2},1032,["id","aria-label","color","external","href","rel","target","on-click"])]))),128))],10,v))}});export{k as CLNavSection,k as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLDropdownMenu.css';
|
|
3
|
-
import{defineComponent as e,ref as t,computed as o,onBeforeUnmount as n,createElementBlock as a,openBlock as d,normalizeClass as r,createVNode as l,createCommentVNode as i,unref as s,withCtx as u,createTextVNode as c,toDisplayString as p,normalizeStyle as f,renderSlot as b}from"vue";import{u as m,a as _,f as v,o as w,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as h}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_ as y}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,ref as t,computed as o,onBeforeUnmount as n,createElementBlock as a,openBlock as d,normalizeClass as r,createVNode as l,createCommentVNode as i,unref as s,withCtx as u,createTextVNode as c,toDisplayString as p,normalizeStyle as f,renderSlot as b}from"vue";import{u as m,a as _,f as v,o as w,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as h}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_ as y}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-Chi6OUG_.js";import{b as B,i as $}from"../../../chunks/helper-BlxFN3eF.js";import{useDropdown as z}from"../../../composables/useDropdown.js";import{useEsc as k}from"../../../composables/useEsc.js";import{n as x,e as C,f as I,c as E,C as L,d as D,i as S}from"../../../chunks/index-CGlfDAYR.js";const H=["data-testid"],j=["id","aria-labelledby","aria-hidden"],O=/* @__PURE__ */e({name:"CLDropdownMenu",__name:"CLDropdownMenu",props:{buttonAlign:{default:S.Center},buttonAriaLabel:{},buttonBorderRadius:{},buttonBusy:{type:Boolean},buttonColor:{default:D.Secondary},buttonDisabled:{type:Boolean},buttonHeight:{default:"auto"},buttonSize:{default:L.Small},buttonVariant:{default:E.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean},containerBordered:{type:Boolean,default:!0},containerBorderRadius:{},containerElevated:{type:Boolean,default:!1},contentWidth:{default:"auto"},dropdownId:{},fluid:{type:Boolean,default:!1},iconAfter:{default:I.ChevronDown},iconBefore:{},iconSize:{default:C.Tiny},isOpen:{type:Boolean,default:!1},label:{},onCloseHandler:{},onOpenHandler:{},placement:{default:x.BottomStart},testId:{default:"clll-dropdown-menu"},zIndex:{default:30}},setup(e,{expose:x}){const C=e;let I=t(),L=t();const S=t(),O=t(),A=t(C.isOpen),W=t(C.placement),R="clll-dropdown-menu",M=o(()=>"auto"===C.zIndex||B(C.zIndex)?C.zIndex:C.zIndex.toString()),V=e=>{e&&(I.value=e)},G=e=>{e&&(L.value=e)},N=()=>{T.value?F():q()},{open:T,openDropdown:q,closeDropdown:F,clearEventListeners:J}=z({triggerElem:I,dropdownRef:O,openDropdownHandler:()=>{A.value=!0,C?.onOpenHandler?.(),P(),$&&document.addEventListener("click",Q)},closeDropdownHandler:()=>{A.value=!1,C?.onCloseHandler?.(),$&&document.removeEventListener("click",Q),U(),J()}});x({close:()=>{F(),J(),U()},open:()=>{q()}});const{floatingStyles:K,update:P}=m(S,O,{middleware:[v(),w(10),g()],placement:W,open:A,whileElementsMounted:_}),Q=e=>{A.value&&O.value?.contains(e?.target)&&F()},{clearEventListeners:U}=k({escHandler:F,triggerElem:I});return n(()=>{$&&document.removeEventListener("click",Q),U(),J()}),(t,o)=>(d(),a("div",{class:r([`${R}__menu`,e.fluid?`${R}__menu--fluid`:""]),"data-testid":e.testId},[l(s(h),{id:`${R}__toggle--${e.dropdownId}`,ref_key:"anchor",ref:S,"aria-controls":`${R}--${e.dropdownId}`,"aria-expanded":s(A)||e.isOpen,"aria-label":e.buttonAriaLabel,"align-content":e.buttonAlign,busy:e.buttonBusy,disabled:e.buttonDisabled||e.buttonBusy,class:r(`${R}__toggle`),color:e.buttonColor,"border-radius":e.buttonBorderRadius,"forward-ref":V,height:e.buttonHeight,"icon-after":e.iconAfter,"icon-before":e.iconBefore,"icon-size":e.iconSize,size:e.buttonSize,"test-id":`${R}__toggle`,variant:e.buttonVariant,width:e.fluid?"100%":e.buttonWidth,wrap:e.buttonWrapped,"on-click":N},{default:u(()=>[c(p(e.label),1)]),_:1},8,["id","aria-controls","aria-expanded","aria-label","align-content","busy","disabled","class","color","border-radius","height","icon-after","icon-before","icon-size","size","test-id","variant","width","wrap"]),s(A)||e.isOpen?(d(),a("div",{key:0,id:`${R}--${e.dropdownId}`,ref_key:"dropdownElem",ref:O,"aria-labelledby":`${R}__toggle--${e.dropdownId}`,"aria-hidden":!(s(A)||e.isOpen),class:r([`${R}__dropdown`,`${R}__dropdown--${s(W)}`]),style:f({...s(K),zIndex:s(M)})},[l(s(y),{bordered:e.containerBordered,"border-radius":e.containerBorderRadius,color:s(D).Neutral,elevated:e.containerElevated,"forward-ref":G,padded:!1,"test-id":`${R}__content`,variant:s(E).Ghost,width:e.contentWidth},{default:u(()=>[b(t.$slots,"content")]),_:3},8,["bordered","border-radius","color","elevated","test-id","variant","width"])],14,j)):i("",!0)],10,H))}});export{O as CLDropdownMenu,O as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLToast.css';
|
|
3
|
-
import{_ as s}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as s}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js";export{s as CLToast,s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{defineComponent as s,ref as i,provide as o,createElementBlock as e,openBlock as r,createBlock as a,createCommentVNode as t,renderSlot as d,unref as u,mergeProps as l}from"vue";import{_ as m}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import{defineComponent as s,ref as i,provide as o,createElementBlock as e,openBlock as r,createBlock as a,createCommentVNode as t,renderSlot as d,unref as u,mergeProps as l}from"vue";import{_ as m}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js";import{T as n}from"../../../chunks/context-JmPivI9V.js";const v={class:"clll-toast-provider"},p=/* @__PURE__ */s({name:"CLToastProvider",__name:"CLToastProvider",props:{borderRadius:{},dismissTimer:{},position:{}},setup(s){const p=s,T=i({}),_=i(!1),c=()=>{_.value=!1,T.value={}};return o(n,{visible:_,showToast:s=>{T.value={...s,borderRadius:s.borderRadius??p.borderRadius,dismissTimer:s.dismissTimer??p.dismissTimer,position:s.position??p.position},_.value=!0},hideToast:c}),(s,i)=>(r(),e("div",v,[_.value?(r(),a(u(m),l({key:0},T.value,{"on-dismiss":c}),null,16)):t("",!0),d(s.$slots,"default")]))}});export{p as CLToastProvider,n as ToastInjectionKey,p as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLHeading.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-BkfH2FiT.js";export{e as CLHeading,e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLText.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";export{e as CLText,e as default};
|
|
@@ -11,17 +11,17 @@ interface Input {
|
|
|
11
11
|
/** The element reference to measure */
|
|
12
12
|
elementRef?: Ref<HTMLElement | undefined | null>;
|
|
13
13
|
/** The dimension to measure ('width' or 'height') */
|
|
14
|
-
dimension?: SizeDimension
|
|
14
|
+
dimension?: SizeDimension | ComputedRef<SizeDimension> | Ref<SizeDimension>;
|
|
15
15
|
/** Size calculation mode: 'percentage' uses snapPoint, 'auto' measures content */
|
|
16
|
-
mode?: SizeMode
|
|
16
|
+
mode?: SizeMode | ComputedRef<SizeMode> | Ref<SizeMode>;
|
|
17
17
|
/** When mode is 'percentage', this value (0-1) determines the size as a percentage of viewport */
|
|
18
|
-
snapPoint?: number
|
|
18
|
+
snapPoint?: number | ComputedRef<number> | Ref<number>;
|
|
19
19
|
/** When mode is 'auto', whether to observe content changes */
|
|
20
20
|
observeChanges?: boolean;
|
|
21
21
|
/** Debounce delay in milliseconds for ResizeObserver updates */
|
|
22
22
|
debounceDelay?: number;
|
|
23
23
|
/** Whether the element is currently visible/mounted */
|
|
24
|
-
isActive?: boolean | ComputedRef<boolean>;
|
|
24
|
+
isActive?: boolean | ComputedRef<boolean> | Ref<boolean>;
|
|
25
25
|
}
|
|
26
26
|
interface Return {
|
|
27
27
|
/** Computed size value (e.g., '50%' or '300px') */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../assets/core.css';
|
|
2
|
-
import{ref as e,computed as t,watch as a,nextTick as l}from"vue";import{i as u,a as i}from"../chunks/helper-BlxFN3eF.js";var o=/* @__PURE__ */(e=>(e.Width="width",e.Height="height",e))(o||{}),r=/* @__PURE__ */(e=>(e.Percentage="percentage",e.Auto="auto",e))(r||{});const n=({elementRef:o,dimension:r="width",mode:n="percentage",snapPoint:s=1,observeChanges:h=!0,debounceDelay:v=50,isActive:c=!1})=>{const d=e({}),m=e(null),g=e(),y=e(n),
|
|
2
|
+
import{ref as e,computed as t,watch as a,nextTick as l}from"vue";import{i as u,a as i}from"../chunks/helper-BlxFN3eF.js";var o=/* @__PURE__ */(e=>(e.Width="width",e.Height="height",e))(o||{}),r=/* @__PURE__ */(e=>(e.Percentage="percentage",e.Auto="auto",e))(r||{});const n=({elementRef:o,dimension:r="width",mode:n="percentage",snapPoint:s=1,observeChanges:h=!0,debounceDelay:v=50,isActive:c=!1})=>{const d=e({}),m=e(null),g=e(),y=e=>"object"==typeof e&&null!==e&&"value"in e?e.value:e,p=t(()=>y(n)),w=t(()=>y(s)),f=t(()=>y(r)),x=t(()=>{const e=w.value??1;return Math.max(0,Math.min(1,e))}),b=t(()=>"boolean"==typeof c?c:c.value),H=()=>{if(u&&o?.value&&"auto"===p.value)try{const e=o.value,t=e.style.width,a=e.style.height,l=e.style.maxWidth,u=e.style.maxHeight;e.style.width="auto",e.style.height="auto",e.style.maxWidth="none",e.style.maxHeight="none";const i=e.scrollWidth,r=e.scrollHeight,n=window.innerWidth,s=window.innerHeight;if(e.style.width=t,e.style.height=a,e.style.maxWidth=l,e.style.maxHeight=u,"height"===f.value){const e=Math.min(r,s);d.value={height:`${e}px`}}else{const e=Math.min(i,n);d.value={width:`${e}px`}}}catch(e){console.error("Error measuring element size:",e)}},W=()=>{if(u&&o?.value&&"auto"===p.value&&h)try{m.value&&m.value.disconnect(),m.value=new ResizeObserver(()=>{(()=>{if(u)try{g.value&&g.value.stop(),g.value||(g.value=i()),g.value.start(v,e=>{Math.min(e,v)===v&&(g.value?.stop(),H())})}catch(e){console.error("Error in debounced measure:",e)}})()}),m.value.observe(o.value)}catch(e){console.error("Error setting up ResizeObserver:",e)}},M=()=>{m.value&&(m.value.disconnect(),m.value=null)},z=t(()=>{if(!u)return"100%";if("auto"===p.value)return"height"===f.value?d.value.height||"auto":d.value.width||"auto";return 100*x.value+"%"});a(p,e=>{"auto"===e&&b.value?l(()=>{H(),W()}):(M(),d.value={})}),a(b,e=>{e&&"auto"===p.value?l(()=>{H(),W()}):(M(),e||(d.value={}))});return{size:z,measure:H,destroy:()=>{u&&(M(),g.value&&g.value.stop(),d.value={})}}};export{o as SizeDimension,r as SizeMode,n as useElementSize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../assets/core.css';
|
|
2
|
-
import{
|
|
2
|
+
import{ref as o,getCurrentInstance as e,inject as r}from"vue";import{D as a}from"../chunks/index-CGlfDAYR.js";import{T as n}from"../chunks/context-BrNC8CsD.js";const s=o(a.borderRadius),t=o(a.darkMode),l=o(a.fontFamily),u=o(a.colors||{primary:{},secondary:{},neutral:{},danger:{},warning:{},success:{},info:{}}),m=()=>{const o=e(),a=o?.type.name||"(anonymous component)",m=r(n,null);return m||(console.warn(`[Callaloo]: useTheme() must be used within a <CLThemeProvider />. Called from component: ${a}`,(new Error).stack),{borderRadius:s,colors:u,darkMode:t,fontFamily:l,setBorderRadius:o=>{s.value=o},setColors:o=>{u.value={...u.value,...o}},setDarkMode:o=>{t.value=o},setFontFamily:o=>{l.value=o}})};export{m as useTheme};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as o,g as e,d as r,c as t}from"./index-CGlfDAYR.js";import{useTheme as s}from"../composables/useTheme.js";const a=({color:a=r.Neutral,theme:l})=>{const{colors:c,darkMode:m}=l??s(),i=m.value?o.Dark:o.Light,d=e({color:a,colors:c.value,mode:i,variant:t.Text});return{"--clll-text-color":d?.textBody??"inherit"}};export{a as t};
|