@codeandfunction/callaloo 5.15.1 → 5.17.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/assets/CLFormField.css +1 -0
- package/dist/assets/CLInputMessages.css +1 -1
- package/dist/callaloo.global.js +1 -1
- package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-BnJRXVwW.js → CLA11yButton.vue_vue_type_style_index_0_lang-BQBmDfM8.js} +1 -1
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-pE0JrYmS.js +2 -0
- package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-DUc5dHAZ.js +2 -0
- package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-D3JriMVx.js → CLCard.vue_vue_type_style_index_0_lang-CY-Qr_CV.js} +1 -1
- package/dist/chunks/{CLFormCharCounter.vue_vue_type_style_index_0_lang-hB5Ua5Ta.js → CLFormCharCounter.vue_vue_type_style_index_0_lang-D3Ao581E.js} +1 -1
- package/dist/chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js +2 -0
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-D7UZMu_6.js → CLFormLabel.vue_vue_type_script_setup_true_lang-DoM5X-sA.js} +1 -1
- package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-Bp0Hmc-g.js → CLHeading.vue_vue_type_style_index_0_lang-PCOhAZkN.js} +1 -1
- package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-BN_rKLKK.js → CLIcon.vue_vue_type_style_index_0_lang-BmRKmzSl.js} +1 -1
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-gkHODA90.js +2 -0
- package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-DoqyJ8FL.js → CLLink.vue_vue_type_style_index_0_lang-B94b55if.js} +1 -1
- package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-DNUsoevN.js → CLModal.vue_vue_type_style_index_0_lang-DLUfvRC_.js} +1 -1
- package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-B2DxfBQx.js → CLNavLink.vue_vue_type_script_setup_true_lang-BXjSe15F.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-mVxJKPLS.js → CLPill.vue_vue_type_style_index_0_lang-BjrbTAI3.js} +1 -1
- package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-B6zTBcne.js → CLSkeleton.vue_vue_type_style_index_0_lang-DAHFJ7wZ.js} +1 -1
- package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-C70Q-aOu.js → CLSpinner.vue_vue_type_style_index_0_lang-B4PAMCz6.js} +1 -1
- package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-BZQzsJMF.js → CLText.vue_vue_type_style_index_0_lang-CdA4TW0N.js} +1 -1
- package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-D2V4LMvh.js → CLToast.vue_vue_type_style_index_0_lang-D7KGFx9t.js} +1 -1
- package/dist/chunks/{index-DwjW-Z-U.js → index-DsloP0ml.js} +1 -1
- package/dist/chunks/{index-C9S3C1LU.js → index-wkMXT2wB.js} +1 -1
- package/dist/chunks/{utils-CYyJsKfZ.js → utils-BVrLpGWo.js} +1 -1
- package/dist/chunks/utils-BfamOHei.js +1 -0
- package/dist/chunks/{utils-FFu1_F8K.js → utils-BolqCol3.js} +1 -1
- package/dist/chunks/utils-CGcDgs5c.js +1 -0
- package/dist/chunks/{utils-D1egvxnD.js → utils-D0LERx2k.js} +1 -1
- package/dist/chunks/{utils-BDThP-Sb.js → utils-jYeghjKF.js} +1 -1
- 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 +4 -4
- 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 +2 -2
- package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
- package/dist/components/Containers/CLCarousel/CLCarousel.vue.d.ts +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 +2 -2
- package/dist/components/Form/CLCalendar/CLCalendar.css +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.vue.d.ts +14 -11
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
- package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +3 -3
- package/dist/components/Form/CLInput/CLInput.js +1 -1
- package/dist/components/Form/CLInput/CLInput.vue.d.ts +3 -3
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +25 -23
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.js +1 -1
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.vue.d.ts +10 -10
- package/dist/components/Form/CLInputTimePicker/index.d.ts +10 -10
- 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/Form/CLTimePicker/CLTimePicker.vue.d.ts +1 -1
- package/dist/components/Form/CLTimePicker/index.d.ts +1 -1
- package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.vue.d.ts +2 -2
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.vue.d.ts +2 -2
- package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
- package/dist/components/Modals/CLModal/CLModal.js +1 -1
- package/dist/components/Modals/CLModal/CLModal.vue.d.ts +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.css +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.vue.d.ts +35 -17
- package/dist/components/Modals/CLModalDatePicker/index.d.ts +1 -0
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.css +1 -1
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.js +1 -1
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.vue.d.ts +16 -4
- package/dist/components/Modals/CLModalTimePicker/index.d.ts +7 -3
- 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 +9 -9
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Popups/CLToast/CLToast.vue.d.ts +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/useDatePicker.d.ts +31 -21
- package/dist/composables/useDatePicker.js +1 -1
- package/dist/composables/useTheme.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-hSiZPrZr.js +0 -2
- package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-BsB4QKTu.js +0 -2
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-CtGriC2l.js +0 -2
- package/dist/chunks/utils-DBWrbn3p.js +0 -1
- package/dist/chunks/utils-DxfNBBvx.js +0 -1
|
@@ -38,9 +38,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
|
|
|
38
38
|
"onModal-open"?: (() => any) | undefined;
|
|
39
39
|
"onModal-close"?: (() => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
+
title: string;
|
|
41
42
|
close: boolean;
|
|
42
43
|
testId: string;
|
|
43
|
-
title: string;
|
|
44
44
|
borderRadius: CLBorderRadius;
|
|
45
45
|
overlay: boolean;
|
|
46
46
|
dismissible: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.clll-date-picker-modal{box-sizing:border-box}.clll-date-picker-modal--fluid{width:100%}.clll-date-picker-modal__footer-actions{display:flex;justify-content:space-between;align-items:center;width:100%}.clll-date-picker-modal__footer-right{display:flex;gap:var(--clll-unit-2)}
|
|
1
|
+
.clll-date-picker-modal{position:relative;overflow:hidden;border-radius:0;flex:none;display:inline-flex;align-items:center;box-sizing:border-box;align-items:flex-start;overflow:visible}.clll-date-picker-modal__hidden-input{position:absolute;bottom:0;left:0;width:100%;height:1px;opacity:0;pointer-events:none;z-index:-1}.clll-date-picker-modal.clll-date-picker-modal--haslabel .clll-date-picker-modal__label .clll-text.clll-date-picker-modal__label--required:after{position:relative;top:var(--clll-unit-1);content:"*";font-size:var(--clll-unit-4_5);font-weight:500;font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;color:var(--clll-input-required-asterisk-color, red);text-decoration:unset;margin-inline-start:var(--clll-unit-0_5);box-sizing:content-box;line-height:0}.clll-date-picker-modal.clll-date-picker-modal--vertical{flex-direction:column}.clll-date-picker-modal.clll-date-picker-modal--vertical.clll-date-picker-modal--haslabel>:not([hidden])~:not([hidden]){margin-top:var(--clll-unit-1_5)}.clll-date-picker-modal.clll-date-picker-modal--horizontal.clll-date-picker-modal--haslabel{flex-direction:row;align-items:center;flex-wrap:wrap}.clll-date-picker-modal.clll-date-picker-modal--horizontal.clll-date-picker-modal--haslabel .clll-date-picker-modal__label,.clll-date-picker-modal.clll-date-picker-modal--horizontal.clll-date-picker-modal--haslabel .clll-button{width:50%}.clll-date-picker-modal--fluid{width:100%}.clll-date-picker-modal__footer-actions{display:flex;justify-content:space-between;align-items:center;width:100%}.clll-date-picker-modal__footer-right{display:flex;gap:var(--clll-unit-2)}
|
|
@@ -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
|
|
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 _,createTextVNode as v,toDisplayString as y,nextTick as h}from"vue";import{_ as L}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-pE0JrYmS.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-DoM5X-sA.js";import{_ as w}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DLUfvRC_.js";import{_ as g}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-DUc5dHAZ.js";import{c as X,e as C,f as B,h as R,a as z,b as S}from"../../../chunks/index-DsloP0ml.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(()=>[v(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(),_("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]=[v(" 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]=[v(" 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]=[v(" 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};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLSizes } from '../../../index.ts';
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLOrientation, CLSizes } from '../../../index.ts';
|
|
2
|
+
import { CLAllowedDates } from '../../../composables/useDatePicker';
|
|
2
3
|
export interface CLModalDatePickerProps {
|
|
4
|
+
/** Allowed dates or range of dates that can be selected. When specified, all other dates appear disabled and the picker allows single date selection. */
|
|
5
|
+
allowedDates?: CLAllowedDates;
|
|
3
6
|
/** Sets the aria-label on the trigger button. It should be used when there is no label present. */
|
|
4
7
|
buttonAriaLabel?: string;
|
|
5
8
|
/** The border radius size. The property can be one of `CLBorderRadius`, e.g. `CLBorderRadius.Medium`. */
|
|
@@ -26,6 +29,10 @@ export interface CLModalDatePickerProps {
|
|
|
26
29
|
id: string;
|
|
27
30
|
/** Whether to allow range selection or single date selection. */
|
|
28
31
|
isRange?: boolean;
|
|
32
|
+
/** The label text to be displayed which is associated to the date picker. */
|
|
33
|
+
label?: string;
|
|
34
|
+
/** A string representing name of the date picker submitted with form. */
|
|
35
|
+
name?: string;
|
|
29
36
|
/** A callback function which handles when the date picker loses focus. */
|
|
30
37
|
onBlur?: CLGenericFocusFunction;
|
|
31
38
|
/** A callback function which handles when the date picker value changes. */
|
|
@@ -34,6 +41,10 @@ export interface CLModalDatePickerProps {
|
|
|
34
41
|
onFocus?: CLGenericFocusFunction;
|
|
35
42
|
/** A callback function which handles when the date picker is reset. */
|
|
36
43
|
onReset?: CLGenericFunction;
|
|
44
|
+
/** Sets the label position to be above or to the left of the form element. The property can be one of `CLOrientation` */
|
|
45
|
+
orientation?: CLOrientation;
|
|
46
|
+
/** Set the required state. */
|
|
47
|
+
required?: boolean;
|
|
37
48
|
/** Sets a custom ID used for unit tests. */
|
|
38
49
|
testId?: string;
|
|
39
50
|
/** The title content of the Modal. */
|
|
@@ -60,15 +71,20 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
60
71
|
start: string | null;
|
|
61
72
|
} | null) => any) | undefined;
|
|
62
73
|
}>, {
|
|
74
|
+
label: string;
|
|
75
|
+
title: string;
|
|
76
|
+
allowedDates: CLAllowedDates;
|
|
77
|
+
isRange: boolean;
|
|
78
|
+
name: string;
|
|
63
79
|
fluid: boolean;
|
|
64
80
|
testId: string;
|
|
65
|
-
title: string;
|
|
66
81
|
onFocus: CLGenericFocusFunction;
|
|
67
82
|
onBlur: CLGenericFocusFunction;
|
|
68
83
|
onChange: CLGenericFunction;
|
|
84
|
+
required: boolean;
|
|
69
85
|
busy: boolean;
|
|
70
86
|
disabled: boolean;
|
|
71
|
-
|
|
87
|
+
orientation: CLOrientation;
|
|
72
88
|
buttonAriaLabel: string;
|
|
73
89
|
buttonBorderRadius: CLBorderRadius;
|
|
74
90
|
buttonColor: CLColors;
|
|
@@ -80,13 +96,13 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
80
96
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
81
97
|
calendarRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
82
98
|
modelValue?: {
|
|
83
|
-
end: import('../../../
|
|
84
|
-
start: import('../../../
|
|
99
|
+
end: import('../../../index.ts').CLISODate | null;
|
|
100
|
+
start: import('../../../index.ts').CLISODate | null;
|
|
85
101
|
} | null;
|
|
86
102
|
} & import('../../Form/CLCalendar/CLCalendar.vue').CLCalendarProps> & Readonly<{
|
|
87
103
|
"onUpdate:modelValue"?: ((value: {
|
|
88
|
-
end: import('../../../
|
|
89
|
-
start: import('../../../
|
|
104
|
+
end: import('../../../index.ts').CLISODate | null;
|
|
105
|
+
start: import('../../../index.ts').CLISODate | null;
|
|
90
106
|
} | null) => any) | undefined;
|
|
91
107
|
"onDate-select"?: ((date: string) => any) | undefined;
|
|
92
108
|
}>, {
|
|
@@ -98,18 +114,19 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
98
114
|
reset: () => void;
|
|
99
115
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
100
116
|
"update:modelValue": (value: {
|
|
101
|
-
end: import('../../../
|
|
102
|
-
start: import('../../../
|
|
117
|
+
end: import('../../../index.ts').CLISODate | null;
|
|
118
|
+
start: import('../../../index.ts').CLISODate | null;
|
|
103
119
|
} | null) => any;
|
|
104
120
|
"date-select": (date: string) => any;
|
|
105
121
|
}, import('vue').PublicProps, {
|
|
122
|
+
width: string;
|
|
123
|
+
allowedDates: CLAllowedDates;
|
|
124
|
+
isRange: boolean;
|
|
106
125
|
color: CLColors;
|
|
107
126
|
fluid: boolean;
|
|
108
127
|
testId: string;
|
|
109
|
-
width: string;
|
|
110
128
|
busy: boolean;
|
|
111
129
|
disabled: boolean;
|
|
112
|
-
isRange: boolean;
|
|
113
130
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
114
131
|
P: {};
|
|
115
132
|
B: {};
|
|
@@ -119,13 +136,13 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
119
136
|
Defaults: {};
|
|
120
137
|
}, Readonly<{
|
|
121
138
|
modelValue?: {
|
|
122
|
-
end: import('../../../
|
|
123
|
-
start: import('../../../
|
|
139
|
+
end: import('../../../index.ts').CLISODate | null;
|
|
140
|
+
start: import('../../../index.ts').CLISODate | null;
|
|
124
141
|
} | null;
|
|
125
142
|
} & import('../../Form/CLCalendar/CLCalendar.vue').CLCalendarProps> & Readonly<{
|
|
126
143
|
"onUpdate:modelValue"?: ((value: {
|
|
127
|
-
end: import('../../../
|
|
128
|
-
start: import('../../../
|
|
144
|
+
end: import('../../../index.ts').CLISODate | null;
|
|
145
|
+
start: import('../../../index.ts').CLISODate | null;
|
|
129
146
|
} | null) => any) | undefined;
|
|
130
147
|
"onDate-select"?: ((date: string) => any) | undefined;
|
|
131
148
|
}>, {
|
|
@@ -136,13 +153,14 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
136
153
|
initializeDraft: () => void;
|
|
137
154
|
reset: () => void;
|
|
138
155
|
}, {}, {}, {}, {
|
|
156
|
+
width: string;
|
|
157
|
+
allowedDates: CLAllowedDates;
|
|
158
|
+
isRange: boolean;
|
|
139
159
|
color: CLColors;
|
|
140
160
|
fluid: boolean;
|
|
141
161
|
testId: string;
|
|
142
|
-
width: string;
|
|
143
162
|
busy: boolean;
|
|
144
163
|
disabled: boolean;
|
|
145
|
-
isRange: boolean;
|
|
146
164
|
}> | null;
|
|
147
165
|
}, HTMLDivElement>;
|
|
148
166
|
export default _default;
|
|
@@ -2,3 +2,4 @@ import { default as CLModalDatePickerComponent } from './CLModalDatePicker.vue';
|
|
|
2
2
|
export { CLModalDatePickerComponent as CLModalDatePicker };
|
|
3
3
|
export default CLModalDatePickerComponent;
|
|
4
4
|
export type CLModalDatePicker = InstanceType<typeof CLModalDatePickerComponent>;
|
|
5
|
+
export type { CLModalDatePickerProps } from './CLModalDatePicker.vue';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.clll-time-picker-modal{box-sizing:border-box}.clll-time-picker-modal--fluid{width:100%}.clll-time-picker-modal__footer-actions{display:flex;justify-content:space-between;align-items:center;width:100%}.clll-time-picker-modal__footer-right{display:flex;gap:var(--clll-unit-2)}
|
|
1
|
+
.clll-time-picker-modal{position:relative;overflow:hidden;border-radius:0;flex:none;display:inline-flex;align-items:center;box-sizing:border-box;align-items:flex-start;overflow:visible}.clll-time-picker-modal__hidden-input{position:absolute;bottom:0;left:0;width:100%;height:1px;opacity:0;pointer-events:none;z-index:-1}.clll-time-picker-modal.clll-time-picker-modal--haslabel .clll-time-picker-modal__label .clll-text.clll-time-picker-modal__label--required:after{position:relative;top:var(--clll-unit-1);content:"*";font-size:var(--clll-unit-4_5);font-weight:500;font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;color:var(--clll-input-required-asterisk-color, red);text-decoration:unset;margin-inline-start:var(--clll-unit-0_5);box-sizing:content-box;line-height:0}.clll-time-picker-modal.clll-time-picker-modal--vertical{flex-direction:column}.clll-time-picker-modal.clll-time-picker-modal--vertical.clll-time-picker-modal--haslabel>:not([hidden])~:not([hidden]){margin-top:var(--clll-unit-1_5)}.clll-time-picker-modal.clll-time-picker-modal--horizontal.clll-time-picker-modal--haslabel{flex-direction:row;align-items:center;flex-wrap:wrap}.clll-time-picker-modal.clll-time-picker-modal--horizontal.clll-time-picker-modal--haslabel .clll-time-picker-modal__label,.clll-time-picker-modal.clll-time-picker-modal--horizontal.clll-time-picker-modal--haslabel .clll-button{width:50%}.clll-time-picker-modal--fluid{width:100%}.clll-time-picker-modal__footer-actions{display:flex;justify-content:space-between;align-items:center;width:100%}.clll-time-picker-modal__footer-right{display:flex;gap:var(--clll-unit-2)}
|
|
@@ -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
|
|
3
|
+
import{defineComponent as e,mergeModels as t,ref as a,computed as o,useModel as i,onMounted as l,onBeforeUnmount as u,createBlock as r,openBlock as d,withCtx as n,createElementVNode as s,normalizeClass as b,createCommentVNode as c,createVNode as m,createElementBlock as f,unref as p,createTextVNode as v,toDisplayString as _,nextTick as y}from"vue";import{_ as h}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-pE0JrYmS.js";import{_ as k}from"../../../chunks/CLFormField.vue_vue_type_style_index_0_lang-Rf_Mo_VS.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-DoM5X-sA.js";import{CLTimePicker as $}from"../../Form/CLTimePicker/CLTimePicker.js";import{_ as X}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DLUfvRC_.js";import{c as C,e as B,f as z,h as w,a as g,b as F}from"../../../chunks/index-DsloP0ml.js";import{a as x}from"../../../chunks/index-wkMXT2wB.js";import{useTimePicker as R}from"../../../composables/useTimePicker.js";import{i as S}from"../../../chunks/helper-BlxFN3eF.js";const q=["data-testid"],V=["name","value","required"],j=/* @__PURE__ */e({name:"CLModalTimePicker",__name:"CLModalTimePicker",props:/* @__PURE__ */t({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:F.Primary},buttonLabel:{default:"Select time"},buttonSize:{default:C.Small},buttonVariant:{default:g.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:{},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:{type:Function,default:void 0},orientation:{default:x.Vertical},required:{type:Boolean,default:!1},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,j="clll-time-picker-modal",P=a(!1),T=o(()=>`time-picker-modal-${t.id}`),M=a(),H=i(e,"modelValue"),{formattedLabel:W}=R({appliedTime:H,use24Hour:t.use24Hour}),E=a(!1),A=()=>{S&&(E.value=window.innerWidth<480)},I=()=>{if(t.disabled||t.busy)return;A(),P.value=!0,y(()=>{M.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});t.onFocus?.(e)},N=()=>{P.value=!1,M.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});t.onBlur?.(e)},G=()=>{M.value?.apply(),P.value=!1,t.onChange?.()},D=()=>{M.value?.reset(),t.onReset?.(),t.onChange?.()},O=o(()=>E.value);l(()=>{S&&(A(),window.addEventListener("resize",A))}),u(()=>{S&&window.removeEventListener("resize",A)});const U={[C.Tiny]:B.Tiny,[C.Small]:B.Small,[C.Medium]:B.Medium,[C.Large]:B.Large,[C.XL]:B.XL,[C.XXL]:B.XXL,[C.XXXL]:B.XXXL,[C.XXXXL]:B.XXXXL},J=o(()=>[j,t.buttonBorderRadius?`${j}--${t.buttonBorderRadius}`:"",t.busy?`${j}--busy`:`${j}--ready`,`${j}--${t.buttonColor}`,`${j}--${t.buttonSize}`,`${j}--${t.buttonVariant}`,t.disabled||t.busy?`${j}--disabled`:`${j}--active`,t.fluid||t.orientation===x.Horizontal?`${j}--fluid`:`${j}--fixed`,t.label?`${j}--haslabel`:"",t.orientation?`${j}--${t.orientation}`:"",t.required?`${j}--required`:`${j}--optional`]);return(t,a)=>(d(),r(k,{fluid:e.fluid,orientation:e.orientation},{default:n(()=>[s("div",{class:b(J.value),"data-testid":e.testId},[e.label?(d(),r(L,{key:0,"css-prefix":j,"html-for":e.id,label:e.label,required:e.required,size:e.buttonSize,onClick:I},null,8,["html-for","label","required","size"])):c("",!0),m(p(h),{id:e.id,"aria-label":e.buttonAriaLabel||"Open time picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":p(z).Clock,"icon-size":U[e.buttonSize],"on-click":I,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:n(()=>[v(_(p(W)||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?(d(),f("input",{key:1,class:b(`${j}__hidden-input`),name:e.name,value:p(W)||"",required:e.required,tabindex:"-1","aria-hidden":"true"},null,10,V)):c("",!0),m(p(X),{"border-radius":O.value?p(w).None:p(w).Medium,fullscreen:O.value,"is-open":P.value,"max-width":"340px","modal-id":T.value,"on-close":N,title:e.title},{body:n(()=>[m(p($),{ref_key:"timePickerRef",ref:M,modelValue:H.value,"onUpdate:modelValue":a[0]||(a[0]=e=>H.value=e),busy:e.busy,disabled:e.disabled,fluid:O.value,"use24-hour":e.use24Hour},null,8,["modelValue","busy","disabled","fluid","use24-hour"])]),footer:n(()=>[s("div",{class:b(`${j}__footer-actions`)},[m(p(h),{"border-radius":e.buttonBorderRadius,color:p(F).Neutral,variant:p(g).Ghost,"on-click":N},{default:n(()=>[...a[1]||(a[1]=[v(" Cancel ",-1)])]),_:1},8,["border-radius","color","variant"]),s("div",{class:b(`${j}__footer-right`)},[m(p(h),{"border-radius":e.buttonBorderRadius,color:p(F).Neutral,variant:p(g).Ghost,"on-click":D},{default:n(()=>[...a[2]||(a[2]=[v(" Reset ",-1)])]),_:1},8,["border-radius","color","variant"]),m(p(h),{"border-radius":e.buttonBorderRadius,color:p(F).Primary,"on-click":G},{default:n(()=>[...a[3]||(a[3]=[v(" Apply ",-1)])]),_:1},8,["border-radius","color"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,q)]),_:1},8,["fluid","orientation"]))}});export{j as CLModalTimePicker,j as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLSizes } from '../../../index.ts';
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLOrientation, CLSizes } from '../../../index.ts';
|
|
2
2
|
export interface CLModalTimePickerProps {
|
|
3
3
|
/** Sets aria-label on trigger button. */
|
|
4
4
|
buttonAriaLabel?: string;
|
|
@@ -24,6 +24,10 @@ export interface CLModalTimePickerProps {
|
|
|
24
24
|
fluid?: boolean;
|
|
25
25
|
/** Unique ID, required. */
|
|
26
26
|
id: string;
|
|
27
|
+
/** The label text to be displayed which is associated to the time picker. */
|
|
28
|
+
label?: string;
|
|
29
|
+
/** A string representing name of the time picker submitted with form. */
|
|
30
|
+
name?: string;
|
|
27
31
|
/** Callback when focus is lost. */
|
|
28
32
|
onBlur?: CLGenericFocusFunction;
|
|
29
33
|
/** Callback when value changes. */
|
|
@@ -32,6 +36,10 @@ export interface CLModalTimePickerProps {
|
|
|
32
36
|
onFocus?: CLGenericFocusFunction;
|
|
33
37
|
/** Callback when reset is triggered. */
|
|
34
38
|
onReset?: CLGenericFunction;
|
|
39
|
+
/** Sets the label position to be above or to the left of the form element. The property can be one of `CLOrientation` */
|
|
40
|
+
orientation?: CLOrientation;
|
|
41
|
+
/** Set the required state. */
|
|
42
|
+
required?: boolean;
|
|
35
43
|
/** Custom test ID. */
|
|
36
44
|
testId?: string;
|
|
37
45
|
/** Modal header title. */
|
|
@@ -48,16 +56,20 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
48
56
|
} & CLModalTimePickerProps> & Readonly<{
|
|
49
57
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
50
58
|
}>, {
|
|
59
|
+
label: string;
|
|
60
|
+
title: string;
|
|
61
|
+
name: string;
|
|
51
62
|
fluid: boolean;
|
|
52
63
|
testId: string;
|
|
53
|
-
title: string;
|
|
54
64
|
onFocus: CLGenericFocusFunction;
|
|
55
65
|
onBlur: CLGenericFocusFunction;
|
|
56
66
|
onChange: CLGenericFunction;
|
|
57
67
|
onReset: CLGenericFunction;
|
|
58
68
|
use24Hour: boolean;
|
|
69
|
+
required: boolean;
|
|
59
70
|
busy: boolean;
|
|
60
71
|
disabled: boolean;
|
|
72
|
+
orientation: CLOrientation;
|
|
61
73
|
buttonAriaLabel: string;
|
|
62
74
|
buttonBorderRadius: CLBorderRadius;
|
|
63
75
|
buttonColor: CLColors;
|
|
@@ -85,10 +97,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
85
97
|
"update:modelValue": (value: string | null) => any;
|
|
86
98
|
"time-select": (time: string) => any;
|
|
87
99
|
}, import('vue').PublicProps, {
|
|
100
|
+
width: string;
|
|
88
101
|
color: CLColors;
|
|
89
102
|
fluid: boolean;
|
|
90
103
|
testId: string;
|
|
91
|
-
width: string;
|
|
92
104
|
use24Hour: boolean;
|
|
93
105
|
busy: boolean;
|
|
94
106
|
disabled: boolean;
|
|
@@ -115,10 +127,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
115
127
|
initializeDraft: () => void;
|
|
116
128
|
reset: () => void;
|
|
117
129
|
}, {}, {}, {}, {
|
|
130
|
+
width: string;
|
|
118
131
|
color: CLColors;
|
|
119
132
|
fluid: boolean;
|
|
120
133
|
testId: string;
|
|
121
|
-
width: string;
|
|
122
134
|
use24Hour: boolean;
|
|
123
135
|
busy: boolean;
|
|
124
136
|
disabled: boolean;
|
|
@@ -8,16 +8,20 @@ export declare const CLModalTimePicker: import('vue').DefineComponent<{
|
|
|
8
8
|
} & import('./CLModalTimePicker.vue').CLModalTimePickerProps> & Readonly<{
|
|
9
9
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
10
10
|
}>, {
|
|
11
|
+
label: string;
|
|
12
|
+
title: string;
|
|
13
|
+
name: string;
|
|
11
14
|
fluid: boolean;
|
|
12
15
|
testId: string;
|
|
13
|
-
title: string;
|
|
14
16
|
onFocus: import('../../..').CLGenericFocusFunction;
|
|
15
17
|
onBlur: import('../../..').CLGenericFocusFunction;
|
|
16
18
|
onChange: import('../../..').CLGenericFunction;
|
|
17
19
|
onReset: import('../../..').CLGenericFunction;
|
|
18
20
|
use24Hour: boolean;
|
|
21
|
+
required: boolean;
|
|
19
22
|
busy: boolean;
|
|
20
23
|
disabled: boolean;
|
|
24
|
+
orientation: import('@codeandfunction/callaloo-types').CLOrientation;
|
|
21
25
|
buttonAriaLabel: string;
|
|
22
26
|
buttonBorderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
23
27
|
buttonColor: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
@@ -45,10 +49,10 @@ export declare const CLModalTimePicker: import('vue').DefineComponent<{
|
|
|
45
49
|
"update:modelValue": (value: string | null) => any;
|
|
46
50
|
"time-select": (time: string) => any;
|
|
47
51
|
}, import('vue').PublicProps, {
|
|
52
|
+
width: string;
|
|
48
53
|
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
49
54
|
fluid: boolean;
|
|
50
55
|
testId: string;
|
|
51
|
-
width: string;
|
|
52
56
|
use24Hour: boolean;
|
|
53
57
|
busy: boolean;
|
|
54
58
|
disabled: boolean;
|
|
@@ -75,10 +79,10 @@ export declare const CLModalTimePicker: import('vue').DefineComponent<{
|
|
|
75
79
|
initializeDraft: () => void;
|
|
76
80
|
reset: () => void;
|
|
77
81
|
}, {}, {}, {}, {
|
|
82
|
+
width: string;
|
|
78
83
|
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
79
84
|
fluid: boolean;
|
|
80
85
|
testId: string;
|
|
81
|
-
width: string;
|
|
82
86
|
use24Hour: boolean;
|
|
83
87
|
busy: boolean;
|
|
84
88
|
disabled: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLLink.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLLink.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLLink.vue_vue_type_style_index_0_lang-B94b55if.js";export{e as CLLink,e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{_ as a}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import{_ as a}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-BXjSe15F.js";export{a as CLNavLink,a 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-
|
|
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-BXjSe15F.js";import{_ as m}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CdA4TW0N.js";import{b as p}from"../../../chunks/index-DsloP0ml.js";import{a as f}from"../../../chunks/index-wkMXT2wB.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-
|
|
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-pE0JrYmS.js";import{_ as y}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-CY-Qr_CV.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 I,f as C,a as E,c as L,b as D,i as S}from"../../../chunks/index-DsloP0ml.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:C.ChevronDown},iconBefore:{},iconSize:{default:I.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 I=e;let C=t(),L=t();const S=t(),O=t(),A=t(I.isOpen),W=t(I.placement),R="clll-dropdown-menu",M=o(()=>"auto"===I.zIndex||B(I.zIndex)?I.zIndex:I.zIndex.toString()),V=e=>{e&&(C.value=e)},G=e=>{e&&(L.value=e)},N=()=>{T.value?F():q()},{open:T,openDropdown:q,closeDropdown:F,clearEventListeners:J}=z({triggerElem:C,dropdownRef:O,openDropdownHandler:()=>{A.value=!0,I?.onOpenHandler?.(),P(),$&&document.addEventListener("click",Q)},closeDropdownHandler:()=>{A.value=!1,I?.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:C});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};
|
|
@@ -126,18 +126,18 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
|
|
|
126
126
|
$emit: (event: string, ...args: any[]) => void;
|
|
127
127
|
$el: any;
|
|
128
128
|
$options: import('vue').ComponentOptionsBase<Readonly<import('../../Buttons/CLButton/CLButton.vue').CLButtonProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
129
|
+
width: string;
|
|
130
|
+
height: string;
|
|
131
|
+
form: string;
|
|
132
|
+
title: string;
|
|
129
133
|
size: CLSizes;
|
|
130
134
|
color: CLColors;
|
|
131
135
|
variant: CLColorVariants;
|
|
132
136
|
rounded: boolean;
|
|
133
137
|
testId: string;
|
|
134
138
|
type: import('../../../types').CLButtonTypes;
|
|
135
|
-
form: string;
|
|
136
|
-
title: string;
|
|
137
139
|
onClick: (event?: Event) => void;
|
|
138
140
|
target: import('@codeandfunction/callaloo-types').CLLinkTarget;
|
|
139
|
-
width: string;
|
|
140
|
-
height: string;
|
|
141
141
|
borderRadius: CLBorderRadius;
|
|
142
142
|
iconFilled: boolean;
|
|
143
143
|
iconSize: CLIconSizes;
|
|
@@ -175,18 +175,18 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
|
|
|
175
175
|
$nextTick: typeof import('vue').nextTick;
|
|
176
176
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
177
177
|
} & Readonly<{
|
|
178
|
+
width: string;
|
|
179
|
+
height: string;
|
|
180
|
+
form: string;
|
|
181
|
+
title: string;
|
|
178
182
|
size: CLSizes;
|
|
179
183
|
color: CLColors;
|
|
180
184
|
variant: CLColorVariants;
|
|
181
185
|
rounded: boolean;
|
|
182
186
|
testId: string;
|
|
183
187
|
type: import('../../../types').CLButtonTypes;
|
|
184
|
-
form: string;
|
|
185
|
-
title: string;
|
|
186
188
|
onClick: (event?: Event) => void;
|
|
187
189
|
target: import('@codeandfunction/callaloo-types').CLLinkTarget;
|
|
188
|
-
width: string;
|
|
189
|
-
height: string;
|
|
190
190
|
borderRadius: CLBorderRadius;
|
|
191
191
|
iconFilled: boolean;
|
|
192
192
|
iconSize: CLIconSizes;
|
|
@@ -203,7 +203,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
|
|
|
203
203
|
iconBefore: CLIconNames | null;
|
|
204
204
|
pill: boolean;
|
|
205
205
|
wrap: boolean;
|
|
206
|
-
}> & Omit<Readonly<import('../../Buttons/CLButton/CLButton.vue').CLButtonProps> & Readonly<{}>, "
|
|
206
|
+
}> & Omit<Readonly<import('../../Buttons/CLButton/CLButton.vue').CLButtonProps> & Readonly<{}>, "width" | "height" | "form" | "title" | "size" | "color" | "variant" | "rounded" | "testId" | "type" | "onClick" | "target" | "borderRadius" | "iconFilled" | "iconSize" | "href" | "active" | "alignContent" | "ariaLabel" | "as" | "busy" | "disabled" | "elevated" | "forwardRef" | "iconAfter" | "iconBefore" | "pill" | "wrap"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
207
207
|
$slots: {
|
|
208
208
|
default?(_: {}): any;
|
|
209
209
|
};
|
|
@@ -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-D7KGFx9t.js";export{s as CLToast,s as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CLIconSizes, CLColors, CLToastPosition, CLToastProps } from '../../../index.ts';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<CLToastProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLToastProps> & Readonly<{}>, {
|
|
3
|
+
width: string;
|
|
3
4
|
color: CLColors;
|
|
4
5
|
rounded: boolean;
|
|
5
6
|
testId: string;
|
|
6
|
-
width: string;
|
|
7
7
|
dismissTimer: number;
|
|
8
8
|
iconFilled: boolean;
|
|
9
9
|
iconSize: CLIconSizes;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{ref as e,defineComponent as o,provide as t,onMounted as a,onBeforeUnmount as r,watch as s,createBlock as l,openBlock as d,resolveDynamicComponent as i,normalizeStyle as n,normalizeClass as c,unref as u,withCtx as m,renderSlot as f}from"vue";import{D as h,p as k}from"../../../chunks/index-
|
|
2
|
+
import{ref as e,defineComponent as o,provide as t,onMounted as a,onBeforeUnmount as r,watch as s,createBlock as l,openBlock as d,resolveDynamicComponent as i,normalizeStyle as n,normalizeClass as c,unref as u,withCtx as m,renderSlot as f}from"vue";import{D as h,p as k}from"../../../chunks/index-DsloP0ml.js";import{T as v}from"../../../chunks/context-BrNC8CsD.js";import{i as p,c as M}from"../../../chunks/helper-BlxFN3eF.js";const g=/* @__PURE__ */o({__name:"CLThemeProvider",props:{tag:{default:"div"},themeConfig:{},autoDetectDarkMode:{type:Boolean,default:!0}},setup(o){const g=o,y=(o=>{const t=e(o?.borderRadius||h.borderRadius),a=e(o?.darkMode??h.darkMode),r=e(o?.fontFamily??h.fontFamily),s=k(h.colors,o?.colors),l=e(s);return{borderRadius:t,colors:l,darkMode:a,fontFamily:r,setBorderRadius:e=>{t.value=e},setColors:e=>{l.value={...l.value,...e}},setDarkMode:e=>{a.value=e},setFontFamily:e=>{r.value=e}}})(g.themeConfig);t(v,y);const{borderRadius:D,darkMode:C,fontFamily:F,setBorderRadius:R,setColors:b,setDarkMode:j,setFontFamily:L}=y;let x=null;const B=()=>{if(g.autoDetectDarkMode&&p){const e=M();j(e)}};return a(()=>{g.autoDetectDarkMode&&p&&(B(),x=window.matchMedia("(prefers-color-scheme: dark)"),x.addEventListener("change",B))}),r(()=>{x&&p&&x.removeEventListener("change",B)}),s(()=>g.themeConfig?.borderRadius,e=>{R(e)}),s(()=>g.themeConfig?.colors,e=>{e&&b(e)}),s(()=>g.themeConfig?.darkMode,e=>{void 0===e||g.autoDetectDarkMode||j(e)}),s(()=>g.themeConfig?.fontFamily,e=>{L(e)}),(e,t)=>(d(),l(i(o.tag),{class:c(["clll-theme-provider","--clll-color-theme-"+(u(C)?"dark":"light")]),style:n({"--clll-font-family":u(F),"--clll-default-radius":u(D)?`var(--clll-${u(D)})`:void 0})},{default:m(()=>[f(e.$slots,"default")]),_:3},8,["class","style"]))}});export{g as CLThemeProvider,h as DEFAULT_THEME,v as ThemeInjectionKey,g 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-D7KGFx9t.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-PCOhAZkN.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-CdA4TW0N.js";export{e as CLText,e as default};
|
|
@@ -1,41 +1,51 @@
|
|
|
1
1
|
import { ComputedRef, MaybeRef, Ref } from 'vue';
|
|
2
|
-
export type
|
|
3
|
-
export
|
|
4
|
-
|
|
2
|
+
export type CLISODate = string;
|
|
3
|
+
export type ISODate = CLISODate;
|
|
4
|
+
export type CLAllowedDates = CLISODate[] | {
|
|
5
|
+
end?: CLISODate | null;
|
|
6
|
+
start?: CLISODate | null;
|
|
7
|
+
} | ((date: CLISODate) => boolean);
|
|
8
|
+
export type AllowedDates = CLAllowedDates;
|
|
9
|
+
export interface CLCalendarCell {
|
|
10
|
+
date: CLISODate | null;
|
|
5
11
|
day: number | null;
|
|
12
|
+
isDisabled: boolean;
|
|
6
13
|
isOutsideMonth: boolean;
|
|
7
14
|
}
|
|
15
|
+
export type CalendarCell = CLCalendarCell;
|
|
8
16
|
interface Input {
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
allowedDates?: MaybeRef<CLAllowedDates | undefined>;
|
|
18
|
+
appliedEnd?: Ref<CLISODate | null>;
|
|
19
|
+
appliedStart?: Ref<CLISODate | null>;
|
|
11
20
|
isRange?: MaybeRef<boolean>;
|
|
12
21
|
}
|
|
13
22
|
interface Return {
|
|
14
|
-
calendarGrid: ComputedRef<
|
|
23
|
+
calendarGrid: ComputedRef<CLCalendarCell[]>;
|
|
15
24
|
cancelDraft: () => void;
|
|
16
25
|
clearDraft: () => void;
|
|
17
26
|
currentDate: Ref<Date>;
|
|
18
27
|
currentMonthLabel: ComputedRef<string>;
|
|
19
|
-
draftEnd: Ref<
|
|
20
|
-
draftStart: Ref<
|
|
21
|
-
formatDateToISO: (date: Date) =>
|
|
22
|
-
formatHumanDate: (iso:
|
|
23
|
-
formatLongDate: (iso:
|
|
24
|
-
formatShortNoYear: (iso:
|
|
25
|
-
formatShortWithYear: (iso:
|
|
26
|
-
getDayAriaLabel: (iso:
|
|
28
|
+
draftEnd: Ref<CLISODate | null>;
|
|
29
|
+
draftStart: Ref<CLISODate | null>;
|
|
30
|
+
formatDateToISO: (date: Date) => CLISODate;
|
|
31
|
+
formatHumanDate: (iso: CLISODate) => string;
|
|
32
|
+
formatLongDate: (iso: CLISODate) => string;
|
|
33
|
+
formatShortNoYear: (iso: CLISODate) => string;
|
|
34
|
+
formatShortWithYear: (iso: CLISODate) => string;
|
|
35
|
+
getDayAriaLabel: (iso: CLISODate) => string;
|
|
27
36
|
handleNextMonth: () => void;
|
|
28
37
|
handlePrevMonth: () => void;
|
|
29
38
|
initializeDraft: () => void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
isDateDisabled: (iso: CLISODate) => boolean;
|
|
40
|
+
isDraftEnd: (iso: CLISODate) => boolean;
|
|
41
|
+
isDraftSameDay: (iso: CLISODate) => boolean;
|
|
42
|
+
isDraftStart: (iso: CLISODate) => boolean;
|
|
43
|
+
isInDraftRange: (iso: CLISODate) => boolean;
|
|
44
|
+
isoToLocalDate: (iso: CLISODate) => Date;
|
|
45
|
+
onDayClick: (iso: CLISODate | null) => void;
|
|
36
46
|
rangeLabel: ComputedRef<string | undefined>;
|
|
37
47
|
setCalendarMonthToAppliedOrToday: () => void;
|
|
38
48
|
weekDays: string[];
|
|
39
49
|
}
|
|
40
|
-
export declare const useDatePicker: ({ appliedEnd, appliedStart, isRange }?: Input) => Return;
|
|
50
|
+
export declare const useDatePicker: ({ allowedDates, appliedEnd, appliedStart, isRange }?: Input) => Return;
|
|
41
51
|
export {};
|