@codeandfunction/callaloo 5.17.1 → 5.19.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/{CLA11yButton.vue_vue_type_style_index_0_lang-BQBmDfM8.js → CLA11yButton.vue_vue_type_style_index_0_lang-CklXklqV.js} +1 -1
- package/dist/chunks/CLBadge.vue_vue_type_style_index_0_lang-CV_7_Qyj.js +2 -0
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-BDVfH3lv.js +2 -0
- package/dist/chunks/{CLCalendar.vue_vue_type_style_index_0_lang-D35OH5qI.js → CLCalendar.vue_vue_type_style_index_0_lang-Ce6IXgNC.js} +1 -1
- package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-CAg8Jmzv.js → CLCard.vue_vue_type_style_index_0_lang-DXnIhiU_.js} +1 -1
- package/dist/chunks/{CLFormCharCounter.vue_vue_type_style_index_0_lang-D3Ao581E.js → CLFormCharCounter.vue_vue_type_style_index_0_lang-SV4Y0w3M.js} +1 -1
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-Cv4WHr_X.js → CLFormLabel.vue_vue_type_script_setup_true_lang-C5yGBUgu.js} +1 -1
- package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-CYgxrrIE.js → CLHeading.vue_vue_type_style_index_0_lang-D0XEmw1o.js} +1 -1
- package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-BmRKmzSl.js → CLIcon.vue_vue_type_style_index_0_lang-DE5m8Y_9.js} +1 -1
- package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-gkHODA90.js → CLInputMessages.vue_vue_type_style_index_0_lang-c_7B01YR.js} +1 -1
- package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-B94b55if.js → CLLink.vue_vue_type_style_index_0_lang-BfxsKfKS.js} +1 -1
- package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-DFQqYIGs.js → CLModal.vue_vue_type_style_index_0_lang-BdTm9WEw.js} +1 -1
- package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-BXjSe15F.js → CLNavLink.vue_vue_type_script_setup_true_lang-DTLk6e9Z.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-CY8F0FJJ.js → CLPill.vue_vue_type_style_index_0_lang-C2pscKHY.js} +1 -1
- package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-DAHFJ7wZ.js → CLSkeleton.vue_vue_type_style_index_0_lang-CDLBI5eJ.js} +1 -1
- package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-DPEknyfT.js +2 -0
- package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-BAAbTVfM.js +2 -0
- package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-DM_9Iykj.js → CLToast.vue_vue_type_style_index_0_lang-nRCsJXlT.js} +1 -1
- package/dist/chunks/icons-P5t3hFEA.js +1 -0
- package/dist/chunks/{index-DsloP0ml.js → index-B12lvfc1.js} +1 -1
- package/dist/chunks/{utils-BVrLpGWo.js → utils-B9d9FGrx.js} +1 -1
- package/dist/chunks/{utils-BolqCol3.js → utils-BoV9808p.js} +1 -1
- package/dist/chunks/{utils-CGcDgs5c.js → utils-Bwwl2IrH.js} +1 -1
- package/dist/chunks/utils-By5hNPYe.js +1 -0
- package/dist/chunks/{utils-jYeghjKF.js → utils-C_TTXNNJ.js} +1 -1
- package/dist/chunks/utils-Le7SULjh.js +1 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.css +1 -1
- package/dist/components/Buttons/CLButton/CLButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +10 -1
- package/dist/components/CLIcon/CLIcon.js +1 -1
- package/dist/components/CLTable/CLTable.js +1 -1
- package/dist/components/Containers/CLCard/CLCard.js +1 -1
- package/dist/components/Containers/CLCard/CLCard.vue.d.ts +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/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/CLInput/CLInput.vue.d.ts +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +2 -2
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.js +1 -1
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.vue.d.ts +2 -2
- package/dist/components/Form/CLInputTimePicker/index.d.ts +2 -2
- 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/CLBadge/CLBadge.css +1 -1
- package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
- package/dist/components/Indicators/CLBadge/CLBadge.vue.d.ts +3 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLPill/CLPill.vue.d.ts +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.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/CLLink/CLLink.js +1 -1
- package/dist/components/Navigation/CLNavLink/CLNavLink.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/CLDropdownMenu/CLDropdownMenu.vue.d.ts +12 -3
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.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/useTheme.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-pE0JrYmS.js +0 -2
- package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-B4PAMCz6.js +0 -2
- package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-DR2zoTEJ.js +0 -2
- package/dist/chunks/icons-B_JpVsf3.js +0 -1
- package/dist/chunks/utils-D0LERx2k.js +0 -1
- package/dist/chunks/utils-DNuPk_OL.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLDrawer.css';
|
|
3
|
-
import{defineComponent as e,useTemplateRef as t,ref as o,computed as a,watch as l,nextTick as s,onMounted as n,onBeforeUnmount as
|
|
3
|
+
import{defineComponent as e,useTemplateRef as t,ref as o,computed as a,watch as l,nextTick as s,onMounted as n,onBeforeUnmount as d,createElementBlock as r,createCommentVNode as i,unref as u,openBlock as v,normalizeStyle as c,normalizeClass as p,createElementVNode as m,renderSlot as f}from"vue";import{m as w}from"../../../chunks/index-B12lvfc1.js";import{a as h}from"../../../chunks/utils-B9d9FGrx.js";import{useEsc as y}from"../../../composables/useEsc.js";import{useTheme as b}from"../../../composables/useTheme.js";import{SizeDimension as x,useElementSize as z,SizeMode as I}from"../../../composables/useElementSize.js";import{b as _,i as S,g as O,a as $}from"../../../chunks/helper-BlxFN3eF.js";const g=["data-testid"],C=/* @__PURE__ */e({name:"CLDrawer",__name:"CLDrawer",props:{autoSize:{type:Boolean,default:!1},borderRadius:{default:void 0},detached:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!0},isOpen:{type:Boolean,default:!1},left:{default:void 0},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},position:{default:w.Left},resetScrollKey:{default:void 0},resetScrollOnOpen:{type:Boolean,default:!0},rounded:{type:Boolean,default:!1},snapPoint:{default:1},testId:{default:"clll-drawer"},width:{default:void 0},zIndex:{default:100}},emits:["drawer-open","drawer-close"],setup(e,{expose:C,emit:L}){const B=L,T=b(),j=t("drawer-content"),k=300,E=o(!1),D=o(),M=o(0),P=o(!1),R=a(()=>H.isOpen||P.value),H=e,A="clll-drawer",K="clll-prevent-scroll",W=a(()=>H.position===w.Top||H.position===w.Bottom?x.Height:x.Width),{size:F,measure:q,destroy:G}=z({elementRef:j,dimension:W,mode:a(()=>H.autoSize?I.Auto:I.Percentage),snapPoint:a(()=>H.snapPoint),observeChanges:!0,debounceDelay:50,isActive:a(()=>H.isOpen&&E.value)}),J=()=>{S&&window?.document.body.classList.add(K)},N=()=>{S&&window?.document.body.classList.remove(K)},Q=a(()=>[A,`${A}--${H.position}`,E.value?`${A}--mounted`:""]),U=a(()=>[`${A}__content`,`${A}__content--${H.position}`,H.detached?`${A}__content--detached`:"",H.rounded?`${A}__content--rounded`:"",H.borderRadius?`${A}__content--${H.borderRadius}`:""]),V=a(()=>{if("auto"===H.zIndex)return H.zIndex;const e=_(H.zIndex)?parseInt(H.zIndex,10):H.zIndex;return e>0?e.toString():M.value.toString()}),X=a(()=>((_(H.zIndex)?parseInt(H.zIndex,10):H.zIndex)-1).toString()),Y=a(()=>{const e={...h(T),zIndex:V.value};return void 0!==H.left&&(e.left=H.left,void 0===H.width&&(e.width="auto")),void 0!==H.width&&(e.width=H.width),e}),Z=a(()=>{const e=H.position===w.Top||H.position===w.Bottom,t=e?"height":"width",o={zIndex:V.value,[t]:F.value};return H.autoSize&&(e?o.maxHeight=H.detached?"calc(100dvh - var(--clll-unit-8))":"100dvh":o.maxWidth=H.detached?"calc(100vw - var(--clll-unit-8))":"100vw"),o}),ee=e=>{try{(e=>{try{const t=e?.target,o=j.value;return!(!S||!o||o.contains(t))}catch(t){return console.error(t),!1}})(e)&&(S&&window.removeEventListener("mousedown",ee),ae())}catch(t){console.error(t)}},te=()=>{S&&window.removeEventListener("mousedown",ee)},oe=()=>{S&&(D.value&&D.value.stop(),te(),N(),P.value=!1,G())},ae=()=>{H.isOpen&&(P.value=!0,E.value=!1,S?(D.value&&D.value.stop(),D.value||(D.value=$()),D.value.start(k,e=>{Math.min(e,k)===k&&(D.value?.stop(),H.onClose?.(),oe())})):(H.onClose?.(),oe()))},le=e=>{j.value&&("number"==typeof e?j.value.scrollTop=e:e?j.value.scrollTo(e):j.value.scrollTop=0)};l(()=>H.resetScrollKey,()=>{le()}),l(()=>H.isOpen,e=>{e?(H.resetScrollOnOpen&&s(()=>le()),P.value=!1,B("drawer-open"),J(),S&&(M.value=O()+1,D.value||(D.value=$()),D.value.start(100,e=>{100===Math.min(e,100)&&(D.value?.stop(),E.value=!0,H.dismissible&&(te(),setTimeout(()=>{S&&window.addEventListener("mousedown",ee)},100)))}),j.value&&j.value.focus())):(P.value=!0,j.value&&j.value.blur(),N(),te(),D.value?(E.value=!1,D.value.start(k,e=>{Math.min(e,k)===k&&(D.value?.stop(),H.onClose?.(),oe())})):(E.value=!1,H.onClose?.(),oe()),B("drawer-close"))}),n(()=>{H.isOpen&&S&&(H.resetScrollOnOpen&&s(()=>le()),J(),M.value=O()+1,D.value||(D.value=$()),D.value.start(100,e=>{100===Math.min(e,100)&&(D.value?.stop(),E.value=!0)}),j.value&&j.value.focus())});const{clearEventListeners:se}=y({escHandler:H.dismissible?ae:void 0});return d(()=>{oe(),se(),D.value&&D.value.stop()}),C({drawerContent:j,recalculateSize:()=>{s(()=>{q()})},scrollToTop:le}),(t,o)=>u(R)?(v(),r("div",{key:0,class:p(u(Q)),"data-testid":e.testId,style:c(u(Y))},[m("div",{ref:"drawer-content",class:p(u(U)),style:c(u(Z)),role:"dialog",tabindex:-1},[f(t.$slots,"default")],6),e.overlay?(v(),r("div",{key:0,class:p(`${A}__overlay`),style:c({zIndex:u(X)}),onClick:o[0]||(o[0]=t=>e.dismissible?ae():void 0)},null,6)):i("",!0)],14,g)):i("",!0)}});export{C as CLDrawer,C as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLCalendar.css';
|
|
3
|
-
import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-Ce6IXgNC.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
|
|
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-c_7B01YR.js";import{_ as L}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DE5m8Y_9.js";import{_ as h}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BAAbTVfM.js";import{C as g,e as $,a as k,f as x,c as C,d as B}from"../../../chunks/index-B12lvfc1.js";import{a as T}from"../../../chunks/utils-C_TTXNNJ.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 s,createTextVNode as d,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-gkHODA90.js";import{_ as k}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-Cv4WHr_X.js";import{_ as z}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-D3Ao581E.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-BmRKmzSl.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-pE0JrYmS.js";import{c as F,b as S,h as B,e as T,a as R,f as V}from"../../../chunks/index-DsloP0ml.js";import{_ as j}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-CY8F0FJJ.js";import{h as P,a as q,C as w}from"../../../chunks/index-wkMXT2wB.js";import{b as M}from"../../../chunks/utils-jYeghjKF.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(s,{key:1},[d(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(s,{key:1},[d(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 s=e,d=l,n="clll-input",u=p(s.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{s.modelValue&&(await navigator.clipboard.writeText(s.modelValue.toString()),u.value=!0,d("update:copied",!0),d("copy"))}catch(e){console.error(e)}},y=()=>{d("reset",s.initialValue)};return c(()=>s.copied,e=>{u.value=e}),c(()=>s.modelValue,()=>{u.value=!1,d("update:copied",!1)}),(l,s)=>(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:s,emit:d}){const u=e,m=d,$=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}),s({inputRef:S}),(l,s)=>(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":s[0]||(s[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:s[1]||(s[1]=(...l)=>e.onBlur&&e.onBlur(...l)),onChange:s[2]||(s[2]=(...l)=>e.onChange&&e.onChange(...l)),onFocus:s[3]||(s[3]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:s[4]||(s[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":s[5]||(s[5]=e=>B.value=e),copied:t(F),"onUpdate:copied":s[6]||(s[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-c_7B01YR.js";import{_ as k}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-C5yGBUgu.js";import{_ as z}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-SV4Y0w3M.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DE5m8Y_9.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-BDVfH3lv.js";import{C as F,d as S,h as B,e as T,c as R,f as V}from"../../../chunks/index-B12lvfc1.js";import{_ as j}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-C2pscKHY.js";import{h as P,a as q,C as w}from"../../../chunks/index-wkMXT2wB.js";import{b as M}from"../../../chunks/utils-C_TTXNNJ.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};
|
|
@@ -107,8 +107,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
107
107
|
onChange: CLGenericFunction;
|
|
108
108
|
onInput: CLGenericInputFunction;
|
|
109
109
|
borderRadius: CLBorderRadius;
|
|
110
|
-
required: boolean;
|
|
111
110
|
prefix: string | CLIconNames;
|
|
111
|
+
required: boolean;
|
|
112
112
|
ariaLabel: string;
|
|
113
113
|
busy: boolean;
|
|
114
114
|
disabled: boolean;
|
|
@@ -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-
|
|
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-DXnIhiU_.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-Ce6IXgNC.js";import{f as I,c as L,n as V,C as x,d as M}from"../../../chunks/index-B12lvfc1.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};
|
|
@@ -119,8 +119,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
119
119
|
onChange: CLGenericFunction;
|
|
120
120
|
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
121
121
|
borderRadius: CLBorderRadius;
|
|
122
|
-
required: boolean;
|
|
123
122
|
prefix: string | CLIconNames;
|
|
123
|
+
required: boolean;
|
|
124
124
|
ariaLabel: string;
|
|
125
125
|
busy: boolean;
|
|
126
126
|
disabled: boolean;
|
|
@@ -173,8 +173,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
173
173
|
onChange: CLGenericFunction;
|
|
174
174
|
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
175
175
|
borderRadius: CLBorderRadius;
|
|
176
|
-
required: boolean;
|
|
177
176
|
prefix: string | CLIconNames;
|
|
177
|
+
required: boolean;
|
|
178
178
|
ariaLabel: string;
|
|
179
179
|
busy: boolean;
|
|
180
180
|
disabled: boolean;
|
|
@@ -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
|
|
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-BDVfH3lv.js";import{_ as L}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-DXnIhiU_.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-B12lvfc1.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};
|
|
@@ -110,8 +110,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
110
110
|
onChange: CLGenericFunction;
|
|
111
111
|
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
112
112
|
borderRadius: CLBorderRadius;
|
|
113
|
-
required: boolean;
|
|
114
113
|
prefix: string | CLIconNames;
|
|
114
|
+
required: boolean;
|
|
115
115
|
ariaLabel: string;
|
|
116
116
|
busy: boolean;
|
|
117
117
|
disabled: boolean;
|
|
@@ -164,8 +164,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
164
164
|
onChange: CLGenericFunction;
|
|
165
165
|
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
166
166
|
borderRadius: CLBorderRadius;
|
|
167
|
-
required: boolean;
|
|
168
167
|
prefix: string | CLIconNames;
|
|
168
|
+
required: boolean;
|
|
169
169
|
ariaLabel: string;
|
|
170
170
|
busy: boolean;
|
|
171
171
|
disabled: boolean;
|
|
@@ -58,8 +58,8 @@ export declare const CLInputTimePicker: import('vue').DefineComponent<{
|
|
|
58
58
|
onChange: import('../../..').CLGenericFunction;
|
|
59
59
|
onInput: import('../../..').CLGenericInputFunction;
|
|
60
60
|
borderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
61
|
-
required: boolean;
|
|
62
61
|
prefix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
62
|
+
required: boolean;
|
|
63
63
|
ariaLabel: string;
|
|
64
64
|
busy: boolean;
|
|
65
65
|
disabled: boolean;
|
|
@@ -112,8 +112,8 @@ export declare const CLInputTimePicker: import('vue').DefineComponent<{
|
|
|
112
112
|
onChange: import('../../..').CLGenericFunction;
|
|
113
113
|
onInput: import('../../..').CLGenericInputFunction;
|
|
114
114
|
borderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
115
|
-
required: boolean;
|
|
116
115
|
prefix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
116
|
+
required: boolean;
|
|
117
117
|
ariaLabel: string;
|
|
118
118
|
busy: boolean;
|
|
119
119
|
disabled: boolean;
|
|
@@ -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 u,createElementVNode as r,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as
|
|
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 u,createElementVNode as r,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as _,createTextVNode as b,toDisplayString as y}from"vue";import{_ as f}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-c_7B01YR.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BAAbTVfM.js";import{C as v,a as X,c as L,d as h}from"../../../chunks/index-B12lvfc1.js";import{a as B}from"../../../chunks/utils-C_TTXNNJ.js";import{useTheme as k}from"../../../composables/useTheme.js";const C=["data-testid"],x=["for"],q=["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:v.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={[v.Tiny]:X.Small,[v.Small]:X.Medium,[v.Medium]:X.Medium,[v.Large]:X.Large,[v.XL]:X.XL,[v.XXL]:X.XXL,[v.XXXL]:X.XXXL,[v.XXXXL]:X.XXXXL},h=e,R=k(),T="clll-radiobutton",j=l(e,"modelValue"),F=s("radiobutton-ref"),M=()=>{F.value&&F.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:F}),(a,l)=>(t(),d(f,null,{default:u(()=>[r("span",{class:m(c(S)),style:i(c(B)({color:e.color,variant:e.variant,theme:c(R)})),"data-testid":e.testId},[r("span",{class:m(c(V)),onClick:M},[r("label",{for:e.id,class:m(`${T}__label`)},[r("span",{class:m([`${T}__radiobutton-frame`,"form-control-flex"])},[p(r("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,q),[[_,j.value]]),r("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:u(()=>[b(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,x)],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
|
|
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 _,renderList as b,toDisplayString as y,vModelSelect as $,createVNode as v}from"vue";import{_ as g}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-c_7B01YR.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-C5yGBUgu.js";import{_ as C}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-DE5m8Y_9.js";import{C as k,e as x,f as X,c as q,d as z}from"../../../chunks/index-B12lvfc1.js";import{a as B}from"../../../chunks/index-wkMXT2wB.js";import{s as j}from"../../../chunks/utils-C_TTXNNJ.js";import{useTheme as T}from"../../../composables/useTheme.js";const F=["data-testid"],S=["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=T(),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(j)({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(_,{key:0},b(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===R.value,disabled:a.disabled},y(a.label),9,M))),128)):n("",!0)],42,S),[[$,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,F),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 u,createCommentVNode as i,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_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 u,createCommentVNode as i,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-c_7B01YR.js";import{_ as g}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-C5yGBUgu.js";import{_}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-SV4Y0w3M.js";import{c as b,C as x,d as $}from"../../../chunks/index-B12lvfc1.js";import{a as C,C as v}from"../../../chunks/index-wkMXT2wB.js";import{b as L}from"../../../chunks/utils-C_TTXNNJ.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:x.Small},spellCheck:{type:Boolean},testId:{default:"clll-textarea"},variant:{default:b.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const b=e,x=k(),$="clll-textarea",q=l("textarea-ref"),j=o(e,"modelValue"),F=()=>{q.value&&q.value.focus()},T=t(()=>[$,b.borderRadius?`${$}--${b.borderRadius}`:"",b.busy?`${$}--busy`:`${$}--ready`,`${$}--${b.color}`,`${$}--${b.size}`,`${$}--${b.variant}`,b.disabled||b.busy?`${$}--disabled`:`${$}--active`,b.charCounter&&b.maxLength?`${$}--hascharcounter`:"",b.fluid||b.orientation===C.Horizontal?`${$}--fluid`:`${$}--fixed`,b.label?`${$}--haslabel`:"",b.messageType?`${$}--${b.messageType}`:"",b.orientation?`${$}--${b.orientation}`:"",b.resizable?`${$}--resizable`:"",b.readonly?`${$}--readonly`:`${$}--writeable`,b.rounded?`${$}--rounded`:`${$}--box`,b.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(()=>[u("span",{class:m(p(T)),style:d(p(L)({color:e.color,variant:e.variant,theme:p(x)})),"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"])):i("",!0),u("span",{class:m(`${$}__input-container`),onClick:F},[c(u("textarea",{id:e.id,ref:"textarea-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.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,j.value]])],2),e.charCounter&&e.maxLength?(n(),r(_,{key:1,"css-prefix":$,"current-length":j.value?j.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"])):i("",!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"])):i("",!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
|
|
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-BAAbTVfM.js";import{d as x,a as M}from"../../../chunks/index-B12lvfc1.js";import{t as S}from"../../../chunks/utils-C_TTXNNJ.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=>({v6249f3d5: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 +1 @@
|
|
|
1
|
-
.clll-badge{width:fit-content;background-color:var(--clll-badge-bg-color, transparent);border-color:var(--clll-badge-border-color, transparent);border-style:var(--clll-badge-border-style, none);border-width:var(--clll-badge-border-width, 0);position:relative;overflow:hidden;border-radius:var(--clll-rounded-full);flex:none;
|
|
1
|
+
.clll-badge{width:fit-content;background-color:var(--clll-badge-bg-color, transparent);border-color:var(--clll-badge-border-color, transparent);border-style:var(--clll-badge-border-style, none);border-width:var(--clll-badge-border-width, 0);position:relative;overflow:hidden;border-radius:var(--clll-rounded-full);flex:none;padding:var(--clll-py-xs) var(--clll-px-xs);min-width:var(--clll-unit-2);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.clll-badge.clll-badge--rounded-full,.clll-badge.clll-badge--rounded-full .clll-{border-radius:var(--clll-rounded-full)}.clll-badge.clll-badge--rounded-lg,.clll-badge.clll-badge--rounded-lg .clll-{border-radius:var(--clll-rounded-lg)}.clll-badge.clll-badge--rounded-md,.clll-badge.clll-badge--rounded-md .clll-{border-radius:var(--clll-rounded-md)}.clll-badge.clll-badge--rounded-sm,.clll-badge.clll-badge--rounded-sm .clll-{border-radius:var(--clll-rounded-sm)}.clll-badge.clll-badge--rounded-xs,.clll-badge.clll-badge--rounded-xs .clll-{border-radius:var(--clll-rounded-xs)}.clll-badge.clll-badge--rounded-xl,.clll-badge.clll-badge--rounded-xl .clll-{border-radius:var(--clll-rounded-xl)}.clll-badge.clll-badge--rounded-2xl,.clll-badge.clll-badge--rounded-2xl .clll-{border-radius:var(--clll-rounded-2xl)}.clll-badge.clll-badge--rounded-3xl,.clll-badge.clll-badge--rounded-3xl .clll-{border-radius:var(--clll-rounded-3xl)}.clll-badge.clll-badge--rounded-none,.clll-badge.clll-badge--rounded-none .clll-{border-radius:0}.clll-badge:not([class*=clll-badge--rounded-]){border-radius:var(--clll-badge-theme-radius)}.clll-badge.clll-badge--dot{width:var(--clll-unit-2);height:var(--clll-unit-2);min-width:var(--clll-unit-2);min-height:var(--clll-unit-2);padding:0;border-radius:var(--clll-rounded-full)}.clll-badge .clll-badge__count{color:var(--clll-badge-text-color, inherit);font-weight:400;font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;margin:0;font-size:var(--clll-unit-3);line-height:var(--clll-unit-5);line-height:1;white-space:nowrap}.clll-badge.clll-badge--elevated{box-shadow:0 0 var(--clll-unit-3) var(--clll-unit-0_5) #0000001f,0 0 var(--clll-unit-1) var(--clll-unit-0_5) #00000005}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLBadge.css';
|
|
3
|
-
import{
|
|
3
|
+
import{_ as e}from"../../../chunks/CLBadge.vue_vue_type_style_index_0_lang-CV_7_Qyj.js";export{e as CLBadge,e as default};
|
|
@@ -7,7 +7,7 @@ export interface CLBadgeProps {
|
|
|
7
7
|
/** The `elevated` property displays a shadow to indicate elevation. */
|
|
8
8
|
elevated?: boolean;
|
|
9
9
|
/** The count to display in the Badge. */
|
|
10
|
-
label
|
|
10
|
+
label?: string | number;
|
|
11
11
|
/** The maximum amount of characters to display. Once the amount characters goes beyond the limit, a plus sign is added after the displayed characters. */
|
|
12
12
|
limit?: number;
|
|
13
13
|
/** Sets a custom ID used for unit tests. */
|
|
@@ -16,9 +16,11 @@ export interface CLBadgeProps {
|
|
|
16
16
|
variant?: CLColorVariants;
|
|
17
17
|
}
|
|
18
18
|
declare const _default: import('vue').DefineComponent<CLBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLBadgeProps> & Readonly<{}>, {
|
|
19
|
+
label: string | number;
|
|
19
20
|
color: CLColors;
|
|
20
21
|
variant: CLColorVariants;
|
|
21
22
|
testId: string;
|
|
22
23
|
elevated: boolean;
|
|
24
|
+
limit: number;
|
|
23
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
26
|
export default _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-
|
|
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-CklXklqV.js";import{_ as m}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-BDVfH3lv.js";import{_ as k}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-D0XEmw1o.js";import{_ as f}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-CDLBI5eJ.js";import{_ as p}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BAAbTVfM.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-B12lvfc1.js";import{a as j}from"../../../chunks/utils-By5hNPYe.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(f),{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(f),{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(k),{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-C2pscKHY.js";export{e as CLPill,e as default};
|
|
@@ -30,7 +30,7 @@ declare const _default: import('vue').DefineComponent<CLPillProps, {}, {}, {}, {
|
|
|
30
30
|
variant: CLColorVariants;
|
|
31
31
|
rounded: boolean;
|
|
32
32
|
testId: string;
|
|
33
|
-
iconFilled: boolean;
|
|
34
33
|
elevated: boolean;
|
|
34
|
+
iconFilled: boolean;
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
36
36
|
export default _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
|
|
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-BAAbTVfM.js";import{a as v,d as y,C as $}from"../../../chunks/index-B12lvfc1.js";import{c as g}from"../../../chunks/utils-By5hNPYe.js";import{useTheme as b}from"../../../composables/useTheme.js";const h=["data-testid"],k=/* @__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(),k=t(e,"modelValue"),C="clll-progress",j=a(()=>[C,`${C}--${s.color}`,`${C}--${s.size}`,s.inverted?`${C}--inverted`:"",s.rounded?`${C}--rounded`:`${C}--not-rounded`]),x=a(()=>`${k.value}%`);return(s,t)=>(o(),l("div",{class:d(u(j)),"data-testid":e.testId,style:r({...u(g)({color:e.color,theme:u($)}),"--clll-progress-value":k.value})},[e.status?(o(),l("div",{key:0,class:d(`${C}__status__container`)},[n("div",{class:d(`${C}__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(`${C}__bar-container`)},[n("div",{class:d(`${C}__bar`)},null,2)],2)],14,h))}});export{k as CLProgress,k as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLSkeleton.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-CDLBI5eJ.js";export{e as CLSkeleton,e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLSpinner.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLSpinner.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLSpinner.vue_vue_type_style_index_0_lang-DPEknyfT.js";export{e as CLSpinner,e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLModal.css';
|
|
3
|
-
import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-BdTm9WEw.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,toRef as o,onMounted as i,onBeforeUnmount as r,createBlock as u,openBlock as n,withCtx as s,createElementVNode as b,normalizeClass as c,unref as f,createCommentVNode as p,createVNode as m,createElementBlock as
|
|
3
|
+
import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,toRef as o,onMounted as i,onBeforeUnmount as r,createBlock as u,openBlock as n,withCtx as s,createElementVNode as b,normalizeClass as c,unref as f,createCommentVNode as p,createVNode as m,createElementBlock as v,createTextVNode as _,toDisplayString as y,nextTick as h}from"vue";import{_ as L}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-BDVfH3lv.js";import{_ as k}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as $}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-C5yGBUgu.js";import{_ as w}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-BdTm9WEw.js";import{_ as g}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-Ce6IXgNC.js";import{C as X,e as C,f as B,h as R,c as z,d as S}from"../../../chunks/index-B12lvfc1.js";import{a as x}from"../../../chunks/index-wkMXT2wB.js";import{i as D}from"../../../chunks/helper-BlxFN3eF.js";import{useDatePicker as F}from"../../../composables/useDatePicker.js";const j=["data-testid"],q=["name","value","required"],V=/* @__PURE__ */e({name:"CLModalDatePicker",__name:"CLModalDatePicker",props:/* @__PURE__ */a({allowedDates:{type:[Array,Object,Function],default:void 0},buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:S.Primary},buttonLabel:{default:"Select dates"},buttonSize:{default:X.Small},buttonVariant:{default:z.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},label:{default:void 0},name:{default:void 0},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onReset:{},orientation:{default:x.Vertical},required:{type:Boolean,default:!1},testId:{default:"clll-date-picker-modal"},title:{default:"Select dates"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,V="clll-date-picker-modal",M=t(!1),E=l(()=>`date-picker-modal-${a.id}`),P=t(),W=d(e,"modelValue"),{rangeLabel:A}=F({allowedDates:o(a,"allowedDates"),appliedStart:l(()=>W.value?.start??null),appliedEnd:l(()=>W.value?.end??null),isRange:a.isRange}),I=t(!1),N=()=>{D&&(I.value=window.innerWidth<480)},G=()=>{if(a.disabled||a.busy)return;N(),M.value=!0,h(()=>{P.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});a.onFocus?.(e)},O=()=>{M.value=!1,P.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});a.onBlur?.(e)},T=()=>{P.value?.apply(),M.value=!1,a.onChange?.()},H=()=>{P.value?.reset(),a.onReset?.()},U=l(()=>I.value);i(()=>{D&&(N(),window.addEventListener("resize",N))}),r(()=>{D&&window.removeEventListener("resize",N)});const J={[X.Tiny]:C.Tiny,[X.Small]:C.Small,[X.Medium]:C.Medium,[X.Large]:C.Large,[X.XL]:C.XL,[X.XXL]:C.XXL,[X.XXXL]:C.XXXL,[X.XXXXL]:C.XXXXL},K=l(()=>[V,a.buttonBorderRadius?`${V}--${a.buttonBorderRadius}`:"",a.busy?`${V}--busy`:`${V}--ready`,`${V}--${a.buttonColor}`,`${V}--${a.buttonSize}`,`${V}--${a.buttonVariant}`,a.disabled||a.busy?`${V}--disabled`:`${V}--active`,a.fluid||a.orientation===x.Horizontal?`${V}--fluid`:`${V}--fixed`,a.label?`${V}--haslabel`:"",a.orientation?`${V}--${a.orientation}`:"",a.required?`${V}--required`:`${V}--optional`]),Q=l(()=>{const e=P.value?.draftStart,t=P.value?.draftEnd;return a.allowedDates?!!e:a.isRange?!!e&&!!t:!!e});return(a,t)=>(n(),u(k,{fluid:e.fluid,orientation:e.orientation},{default:s(()=>[b("div",{class:c(f(K)),"data-testid":e.testId},[e.label?(n(),u($,{key:0,"css-prefix":V,"html-for":e.id,label:e.label,required:e.required,size:e.buttonSize,onClick:G},null,8,["html-for","label","required","size"])):p("",!0),m(f(L),{id:e.id,"aria-label":e.buttonAriaLabel||"Open date picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":f(B).Calendar,"icon-size":J[e.buttonSize],"on-click":G,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:s(()=>[_(y(f(A)||e.buttonLabel),1)]),_:1},8,["id","aria-label","border-radius","busy","color","disabled","icon-before","icon-size","test-id","size","variant","width","wrap"]),e.name||e.required?(n(),v("input",{key:1,class:c(`${V}__hidden-input`),name:e.name,value:f(A)||"",required:e.required,tabindex:"-1","aria-hidden":"true"},null,10,q)):p("",!0),m(f(w),{"border-radius":f(U)?f(R).None:f(R).Medium,fullscreen:f(U),"is-open":f(M),"max-width":"336px","modal-id":f(E),"on-close":O,title:e.title},{body:s(()=>[m(f(g),{ref_key:"calendarRef",ref:P,modelValue:W.value,"onUpdate:modelValue":t[0]||(t[0]=e=>W.value=e),"allowed-dates":e.allowedDates,busy:e.busy,disabled:e.disabled,fluid:f(U),"is-range":!e.allowedDates&&e.isRange},null,8,["modelValue","allowed-dates","busy","disabled","fluid","is-range"])]),footer:s(()=>[b("div",{class:c(`${V}__footer-actions`)},[m(f(L),{"border-radius":e.buttonBorderRadius,color:f(S).Neutral,"on-click":O,variant:f(z).Ghost},{default:s(()=>[...t[1]||(t[1]=[_(" Cancel ",-1)])]),_:1},8,["border-radius","color","variant"]),b("div",{class:c(`${V}__footer-right`)},[m(f(L),{"border-radius":e.buttonBorderRadius,color:f(S).Neutral,disabled:!f(P)?.draftStart&&!f(P)?.draftEnd,"on-click":H,variant:f(z).Ghost},{default:s(()=>[...t[2]||(t[2]=[_(" Reset ",-1)])]),_:1},8,["border-radius","color","disabled","variant"]),m(f(L),{"border-radius":e.buttonBorderRadius,color:f(S).Primary,disabled:!f(Q),"on-click":T},{default:s(()=>[...t[3]||(t[3]=[_(" Apply ",-1)])]),_:1},8,["border-radius","color","disabled"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,j)]),_:1},8,["fluid","orientation"]))}});export{V as CLModalDatePicker,V as default};
|