@codeandfunction/callaloo 4.11.1 → 4.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/callaloo.global.js +1 -1
  2. package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-RwSPgx8U.js +2 -0
  3. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-Bi7GC71m.js +2 -0
  4. package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-BxZBofc_.js +2 -0
  5. package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-Lb49WiaW.js +2 -0
  6. package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js → CLFormLabel.vue_vue_type_script_setup_true_lang-BesVgApW.js} +1 -1
  7. package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-C7RHX0J4.js +2 -0
  8. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-CaZM-HFg.js +2 -0
  9. package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js +2 -0
  10. package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-7e7xSEg0.js +2 -0
  11. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-CWceRHGW.js +2 -0
  12. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-Dm81o6kG.js → CLNavLink.vue_vue_type_script_setup_true_lang-I-qjKZJQ.js} +1 -1
  13. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-B7EJOOmg.js → CLPill.vue_vue_type_style_index_0_lang-BSi1ljPG.js} +1 -1
  14. package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BtFHeFjp.js +2 -0
  15. package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-Ch4Vh_y3.js +2 -0
  16. package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-Tv0xzrRz.js +2 -0
  17. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-zgtfLRPh.js +2 -0
  18. package/dist/chunks/utils-BMhH7W6x.js +1 -0
  19. package/dist/chunks/utils-CdeA8xWg.js +1 -0
  20. package/dist/chunks/utils-Dea4wPBy.js +1 -0
  21. package/dist/chunks/{utils-CCWSWRuR.js → utils-DfgurNgA.js} +1 -1
  22. package/dist/chunks/utils-fXNd28fD.js +1 -0
  23. package/dist/chunks/utils-rZl51JEP.js +1 -0
  24. package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
  25. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  26. package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +4 -4
  27. package/dist/components/Buttons/utils.d.ts +9 -3
  28. package/dist/components/CLIcon/CLIcon.js +1 -1
  29. package/dist/components/CLIcon/CLIcon.vue.d.ts +1 -1
  30. package/dist/components/CLIcon/utils.d.ts +8 -2
  31. package/dist/components/CLTable/CLTable.js +1 -1
  32. package/dist/components/CLTable/CLTableCell.vue.d.ts +1 -1
  33. package/dist/components/CLTable/utils.d.ts +8 -1
  34. package/dist/components/Containers/CLCard/CLCard.css +1 -1
  35. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  36. package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
  37. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
  38. package/dist/components/Containers/CLDisclosure/CLDisclosure.vue.d.ts +1 -1
  39. package/dist/components/Containers/CLDrawer/CLDrawer.js +1 -1
  40. package/dist/components/Containers/CLDrawer/CLDrawer.vue.d.ts +1 -1
  41. package/dist/components/Containers/utils.d.ts +10 -4
  42. package/dist/components/Form/CLCalendar/CLCalendar.css +1 -1
  43. package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
  44. package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
  45. package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +3 -3
  46. package/dist/components/Form/CLFormCharCounter/CLFormCharCounter.vue.d.ts +1 -1
  47. package/dist/components/Form/CLFormLabel/CLFormLabel.vue.d.ts +1 -1
  48. package/dist/components/Form/CLInput/CLInput.js +1 -1
  49. package/dist/components/Form/CLInput/CLInput.vue.d.ts +2 -2
  50. package/dist/components/Form/CLInput/CLInputColorTools.vue.d.ts +1 -1
  51. package/dist/components/Form/CLInput/CLInputPrefix.vue.d.ts +2 -2
  52. package/dist/components/Form/CLInput/CLInputSuffix.vue.d.ts +2 -2
  53. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
  54. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +6 -6
  55. package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -1
  56. package/dist/components/Form/CLRadioButton/CLRadioButton.vue.d.ts +1 -1
  57. package/dist/components/Form/CLSelect/CLSelect.js +1 -1
  58. package/dist/components/Form/CLSelect/CLSelect.vue.d.ts +1 -1
  59. package/dist/components/Form/CLTextArea/CLTextArea.js +1 -1
  60. package/dist/components/Form/CLTextArea/CLTextArea.vue.d.ts +1 -1
  61. package/dist/components/Form/utils.d.ts +14 -5
  62. package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
  63. package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
  64. package/dist/components/Indicators/CLPill/CLPill.css +1 -1
  65. package/dist/components/Indicators/CLPill/CLPill.js +1 -1
  66. package/dist/components/Indicators/CLPill/CLPill.vue.d.ts +1 -1
  67. package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
  68. package/dist/components/Indicators/CLProgress/CLProgress.vue.d.ts +1 -1
  69. package/dist/components/Indicators/utils.d.ts +8 -2
  70. package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
  71. package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
  72. package/dist/components/Loading/CLSpinner/CLSpinner.vue.d.ts +2 -2
  73. package/dist/components/Loading/utils.d.ts +9 -3
  74. package/dist/components/Modals/CLModal/CLModal.js +1 -1
  75. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
  76. package/dist/components/Modals/utils.d.ts +8 -1
  77. package/dist/components/Navigation/CLLink/CLLink.js +1 -1
  78. package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
  79. package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
  80. package/dist/components/Navigation/utils.d.ts +8 -2
  81. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
  82. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +10 -10
  83. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  84. package/dist/components/Popups/CLToast/CLToast.vue.d.ts +3 -3
  85. package/dist/components/Popups/utils.d.ts +8 -2
  86. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +1 -1
  87. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  88. package/dist/components/Typography/CLHeading/CLHeading.css +1 -1
  89. package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
  90. package/dist/components/Typography/CLText/CLText.js +1 -1
  91. package/dist/components/Typography/utils.d.ts +8 -2
  92. package/dist/composables/useTheme.js +1 -1
  93. package/dist/composables/useToast.d.ts +30 -5
  94. package/dist/composables/useToast.js +1 -1
  95. package/dist/styles.css +1 -1
  96. package/package.json +1 -1
  97. package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js +0 -2
  98. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-CqwRXex5.js +0 -2
  99. package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-US_3N22Q.js +0 -2
  100. package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-CMQi_nx9.js +0 -2
  101. package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js +0 -2
  102. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-MCaGYSd9.js +0 -2
  103. package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js +0 -2
  104. package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-DDtyvg4a.js +0 -2
  105. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-wrr29HDF.js +0 -2
  106. package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js +0 -2
  107. package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-DgZLt9T1.js +0 -2
  108. package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js +0 -2
  109. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-BTKkG8MZ.js +0 -2
  110. package/dist/chunks/utils-C1iUBPIL.js +0 -1
  111. package/dist/chunks/utils-CYywa195.js +0 -1
  112. package/dist/chunks/utils-Dst7nzvj.js +0 -1
  113. package/dist/chunks/utils-MElq6rY3.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 s,onMounted as n,onBeforeUnmount as l,createElementBlock as i,createCommentVNode as u,unref as r,openBlock as d,normalizeStyle as v,normalizeClass as p,createElementVNode as c,renderSlot as m}from"vue";import{CLDrawerPosition as w}from"../../../index.js";import{a as f}from"../../../chunks/utils-Dst7nzvj.js";import{useEsc as y}from"../../../composables/useEsc.js";import{SizeDimension as h,useElementSize as x,SizeMode as z}from"../../../composables/useElementSize.js";import{c as I,i as b,g,a as C}from"../../../chunks/helper-C542dSLs.js";const L=["data-testid"],$=/* @__PURE__ */e({name:"CLDrawer",__name:"CLDrawer",props:{autoSize:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!0},isOpen:{type:Boolean,default:!1},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},position:{default:w.Left},snapPoint:{default:1},testId:{default:"clll-drawer"},zIndex:{default:100}},emits:["drawer-open","drawer-close"],setup(e,{emit:$}){const _=$,S=t("drawer-content"),k=300,B=o(!1),E=o(),O=o(0),j=o(!1),D=a(()=>M.isOpen||j.value),M=e,P="clll-drawer",H="clll-prevent-scroll",T=a(()=>M.position===w.Top||M.position===w.Bottom?h.Height:h.Width),{size:A,destroy:W}=x({elementRef:S,dimension:T.value,mode:M.autoSize?z.Auto:z.Percentage,snapPoint:M.snapPoint,observeChanges:!0,debounceDelay:50,isActive:a(()=>M.isOpen&&B.value)}),F=()=>{b&&window?.document.body.classList.add(H)},R=()=>{b&&window?.document.body.classList.remove(H)},q=a(()=>[P,`${P}--${M.position}`,B.value?`${P}--mounted`:""]),G=a(()=>[`${P}__content`,`${P}__content--${M.position}`]),J=a(()=>{if("auto"===M.zIndex)return M.zIndex;const e=I(M.zIndex)?parseInt(M.zIndex,10):M.zIndex;return e>0?e.toString():O.value.toString()}),K=a(()=>((I(M.zIndex)?parseInt(M.zIndex,10):M.zIndex)-1).toString()),N=a(()=>{const e=M.position===w.Top||M.position===w.Bottom,t=e?"height":"width",o={zIndex:J.value,[t]:A.value};return M.autoSize&&(e?o.maxHeight="100dvh":o.maxWidth="100vw"),o}),Q=e=>{try{(e=>{try{const t=e?.target,o=S.value;return!(!b||!o||o.contains(t))}catch(t){return console.error(t),!1}})(e)&&(b&&window.removeEventListener("mousedown",Q),X())}catch(t){console.error(t)}},U=()=>{b&&window.removeEventListener("mousedown",Q)},V=()=>{b&&(E.value&&E.value.stop(),U(),R(),j.value=!1,W())},X=()=>{M.isOpen&&(j.value=!0,B.value=!1,b?(E.value&&E.value.stop(),E.value||(E.value=C()),E.value.start(k,e=>{Math.min(e,k)===k&&(E.value?.stop(),M.onClose?.(),V())})):(M.onClose?.(),V()))};s(()=>M.isOpen,e=>{e?(j.value=!1,_("drawer-open"),F(),b&&(O.value=g()+1,E.value||(E.value=C()),E.value.start(100,e=>{100===Math.min(e,100)&&(E.value?.stop(),B.value=!0,M.dismissible&&(U(),setTimeout(()=>{b&&window.addEventListener("mousedown",Q)},100)))}),S.value&&S.value.focus())):(j.value=!0,S.value&&S.value.blur(),R(),U(),E.value?(B.value=!1,E.value.start(k,e=>{Math.min(e,k)===k&&(E.value?.stop(),M.onClose?.(),V())})):(B.value=!1,M.onClose?.(),V()),_("drawer-close"))}),n(()=>{M.isOpen&&b&&(F(),O.value=g()+1,E.value||(E.value=C()),E.value.start(100,e=>{100===Math.min(e,100)&&(E.value?.stop(),B.value=!0)}),S.value&&S.value.focus())});const{clearEventListeners:Y}=y({escHandler:M.dismissible?X:void 0});return l(()=>{V(),Y(),E.value&&E.value.stop()}),(t,o)=>r(D)?(d(),i("div",{key:0,class:p(r(q)),"data-testid":e.testId,style:v({...r(f)(),zIndex:r(J)})},[c("div",{ref:"drawer-content",class:p(r(G)),style:v(r(N)),role:"dialog",tabindex:-1},[m(t.$slots,"default")],6),e.overlay?(d(),i("div",{key:0,class:p(`${P}__overlay`),style:v({zIndex:r(K)}),onClick:o[0]||(o[0]=t=>e.dismissible?X():void 0)},null,6)):u("",!0)],14,L)):u("",!0)}});export{$ as CLDrawer,$ as default};
3
+ import{defineComponent as e,useTemplateRef as t,ref as o,computed as a,watch as s,onMounted as l,onBeforeUnmount as n,createElementBlock as i,createCommentVNode as r,unref as u,openBlock as d,normalizeStyle as v,normalizeClass as p,createElementVNode as m,renderSlot as c}from"vue";import{CLDrawerPosition as w}from"../../../index.js";import{a as f}from"../../../chunks/utils-Dea4wPBy.js";import{useEsc as h}from"../../../composables/useEsc.js";import{useTheme as y}from"../../../composables/useTheme.js";import{SizeDimension as x,useElementSize as z,SizeMode as I}from"../../../composables/useElementSize.js";import{c as b,i as g,g as C,a as L}from"../../../chunks/helper-C542dSLs.js";const $=["data-testid"],_=/* @__PURE__ */e({name:"CLDrawer",__name:"CLDrawer",props:{autoSize:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!0},isOpen:{type:Boolean,default:!1},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},position:{default:w.Left},snapPoint:{default:1},testId:{default:"clll-drawer"},zIndex:{default:100}},emits:["drawer-open","drawer-close"],setup(e,{emit:_}){const S=_,j=y(),B=t("drawer-content"),E=300,O=o(!1),k=o(),D=o(0),M=o(!1),P=a(()=>T.isOpen||M.value),T=e,H="clll-drawer",A="clll-prevent-scroll",W=a(()=>T.position===w.Top||T.position===w.Bottom?x.Height:x.Width),{size:F,destroy:R}=z({elementRef:B,dimension:W.value,mode:T.autoSize?I.Auto:I.Percentage,snapPoint:T.snapPoint,observeChanges:!0,debounceDelay:50,isActive:a(()=>T.isOpen&&O.value)}),q=()=>{g&&window?.document.body.classList.add(A)},G=()=>{g&&window?.document.body.classList.remove(A)},J=a(()=>[H,`${H}--${T.position}`,O.value?`${H}--mounted`:""]),K=a(()=>[`${H}__content`,`${H}__content--${T.position}`]),N=a(()=>{if("auto"===T.zIndex)return T.zIndex;const e=b(T.zIndex)?parseInt(T.zIndex,10):T.zIndex;return e>0?e.toString():D.value.toString()}),Q=a(()=>((b(T.zIndex)?parseInt(T.zIndex,10):T.zIndex)-1).toString()),U=a(()=>{const e=T.position===w.Top||T.position===w.Bottom,t=e?"height":"width",o={zIndex:N.value,[t]:F.value};return T.autoSize&&(e?o.maxHeight="100dvh":o.maxWidth="100vw"),o}),V=e=>{try{(e=>{try{const t=e?.target,o=B.value;return!(!g||!o||o.contains(t))}catch(t){return console.error(t),!1}})(e)&&(g&&window.removeEventListener("mousedown",V),Z())}catch(t){console.error(t)}},X=()=>{g&&window.removeEventListener("mousedown",V)},Y=()=>{g&&(k.value&&k.value.stop(),X(),G(),M.value=!1,R())},Z=()=>{T.isOpen&&(M.value=!0,O.value=!1,g?(k.value&&k.value.stop(),k.value||(k.value=L()),k.value.start(E,e=>{Math.min(e,E)===E&&(k.value?.stop(),T.onClose?.(),Y())})):(T.onClose?.(),Y()))};s(()=>T.isOpen,e=>{e?(M.value=!1,S("drawer-open"),q(),g&&(D.value=C()+1,k.value||(k.value=L()),k.value.start(100,e=>{100===Math.min(e,100)&&(k.value?.stop(),O.value=!0,T.dismissible&&(X(),setTimeout(()=>{g&&window.addEventListener("mousedown",V)},100)))}),B.value&&B.value.focus())):(M.value=!0,B.value&&B.value.blur(),G(),X(),k.value?(O.value=!1,k.value.start(E,e=>{Math.min(e,E)===E&&(k.value?.stop(),T.onClose?.(),Y())})):(O.value=!1,T.onClose?.(),Y()),S("drawer-close"))}),l(()=>{T.isOpen&&g&&(q(),D.value=C()+1,k.value||(k.value=L()),k.value.start(100,e=>{100===Math.min(e,100)&&(k.value?.stop(),O.value=!0)}),B.value&&B.value.focus())});const{clearEventListeners:ee}=h({escHandler:T.dismissible?Z:void 0});return n(()=>{Y(),ee(),k.value&&k.value.stop()}),(t,o)=>u(P)?(d(),i("div",{key:0,class:p(u(J)),"data-testid":e.testId,style:v({...u(f)(u(j)),zIndex:u(N)})},[m("div",{ref:"drawer-content",class:p(u(K)),style:v(u(U)),role:"dialog",tabindex:-1},[c(t.$slots,"default")],6),e.overlay?(d(),i("div",{key:0,class:p(`${H}__overlay`),style:v({zIndex:u(Q)}),onClick:o[0]||(o[0]=t=>e.dismissible?Z():void 0)},null,6)):r("",!0)],14,$)):r("",!0)}});export{_ as CLDrawer,_ as default};
@@ -28,8 +28,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<CL
28
28
  }>, {
29
29
  testId: string;
30
30
  position: CLDrawerPosition;
31
- overlay: boolean;
32
31
  snapPoint: number;
32
+ overlay: boolean;
33
33
  autoSize: boolean;
34
34
  dismissible: boolean;
35
35
  isOpen: boolean;
@@ -1,9 +1,15 @@
1
- import { CLColors, CLColorVariants } from '../../index.ts';
1
+ import { Ref } from 'vue';
2
+ import { CLColors, CLColorVariants, CLPalette } from '../../index.ts';
3
+ interface ThemeContext {
4
+ colors: Ref<CLPalette>;
5
+ darkMode: Ref<boolean | undefined>;
6
+ }
2
7
  interface ThemeProps {
3
8
  color: CLColors;
4
9
  variant: CLColorVariants;
10
+ theme?: ThemeContext;
5
11
  }
6
- export declare const cardTheme: ({ color, variant }: ThemeProps) => {
12
+ export declare const cardTheme: ({ color, variant, theme }: ThemeProps) => {
7
13
  '--clll-card-border-color': string;
8
14
  '--clll-card-bg-color': string;
9
15
  '--clll-card-image-bg': string;
@@ -12,7 +18,7 @@ export declare const cardTheme: ({ color, variant }: ThemeProps) => {
12
18
  '--clll-card-focus-shadow': string;
13
19
  '--clll-card-theme-radius': string;
14
20
  };
15
- export declare const disclosureTheme: ({ color, variant }: ThemeProps) => {
21
+ export declare const disclosureTheme: ({ color, variant, theme }: ThemeProps) => {
16
22
  '--clll-disclosure-border-color': string;
17
23
  '--clll-disclosure-text-color': string;
18
24
  '--clll-disclosure-content-border': string;
@@ -20,7 +26,7 @@ export declare const disclosureTheme: ({ color, variant }: ThemeProps) => {
20
26
  '--clll-disclosure-trigger-hover-bg-color': string;
21
27
  '--clll-disclosure-theme-radius': string;
22
28
  };
23
- export declare const drawerTheme: () => {
29
+ export declare const drawerTheme: (theme?: ThemeContext) => {
24
30
  '--clll-drawer-overlay-bg': string;
25
31
  '--clll-drawer-content-bg': string;
26
32
  };
@@ -1 +1 @@
1
- .clll-calendar{display:flex;flex-direction:column;background-color:#fff;box-sizing:border-box;width:var(--v63768322)}.clll-calendar__fluid{width:100%;max-width:none}.clll-calendar__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--clll-unit-4)}.clll-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--clll-unit-1)}.clll-calendar__weekday{text-align:center;padding-bottom:var(--clll-unit-1)}.clll-calendar__cell{aspect-ratio:1;display:flex;justify-content:center;align-items:center}.clll-calendar__cell--outside{opacity:.55}
1
+ .clll-calendar{display:flex;flex-direction:column;background-color:var(--clll-calendar-content-bg);box-sizing:border-box;width:var(--v0d5ceeb8)}.clll-calendar__fluid{width:100%;max-width:none}.clll-calendar__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--clll-unit-4)}.clll-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--clll-unit-1)}.clll-calendar__weekday{text-align:center;padding-bottom:var(--clll-unit-1)}.clll-calendar__cell{aspect-ratio:1;display:flex;justify-content:center;align-items:center}.clll-calendar__cell--outside{opacity:.55}
@@ -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-US_3N22Q.js";export{a as CLCalendar,a as default};
3
+ import{_ as a}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BxZBofc_.js";export{a as CLCalendar,a as default};
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLCheckbox.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as s,computed as o,createBlock as d,openBlock as u,withCtx as i,createElementVNode as t,createCommentVNode as n,normalizeStyle as r,normalizeClass as c,unref as m,withDirectives as b,vModelCheckbox as f,createVNode as p,createTextVNode as _,toDisplayString as y}from"vue";import{_ as X,c as v,a as L}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-MCaGYSd9.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLSizes as h,CLIconSizes as x,CLTextTypes as k,CLIconNames as C,CLColorVariants as B,CLColors as T}from"../../../index.js";const q=["data-testid"],M=["for","disabled"],F=["id","aria-label","disabled","form","name","required","value"],z=/* @__PURE__ */e({name:"CLCheckbox",__name:"CLCheckbox",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:T.Neutral},disabled:{type:Boolean,default:!1},form:{default:void 0},id:{},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:h.Small},testId:{default:"clll-checkbox"},value:{type:[String,Number,Boolean],default:void 0},variant:{default:B.Outline}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const B={[h.Tiny]:x.Tiny,[h.Small]:x.Tiny,[h.Medium]:x.Small,[h.Large]:x.Medium,[h.XL]:x.Medium,[h.XXL]:x.Large,[h.XXXL]:x.Large,[h.XXXXL]:x.XL},T={[h.Tiny]:k.Small,[h.Small]:k.Medium,[h.Medium]:k.Medium,[h.Large]:k.Large,[h.XL]:k.XL,[h.XXL]:k.XXL,[h.XXXL]:k.XXXL,[h.XXXXL]:k.XXXXL},z=e,S=l("checkbox-ref"),j=s(e,"modelValue"),I="clll-checkbox",R=o(()=>[I,z.borderRadius?`${I}--${z.borderRadius}`:"",z.busy?`${I}--busy`:`${I}--ready`,z.disabled?`${I}--disabled`:`${I}--active`,z.label?`${I}--haslabel`:"",`${I}--${z.color}`,`${I}--${z.size}`,z.messageType?`${I}--${z.messageType}`:"",z.rounded?`${I}--rounded`:`${I}--box`,z.required?`${I}--required`:`${I}--optional`]),V=o(()=>[`${I}__checkbox-container`,`${I}--${z.variant}`]),N=()=>{S.value&&S.value.focus()};return a({checkboxRef:S}),(a,l)=>(u(),d(X,null,{default:i(()=>[t("span",{class:c(m(R)),style:r(m(v)({color:e.color,variant:e.variant})),"data-testid":e.testId},[t("span",{class:c(m(V)),onClick:N},[t("label",{for:e.id,class:c(`${I}__label`),disabled:e.disabled},[t("span",{class:c([`${I}__checkbox-frame`,"form-control-flex"])},[b(t("input",{id:e.id,ref:"checkbox-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:c(`${I}__checkbox`),disabled:e.disabled||e.busy,form:e.form,name:e.name,required:e.required,type:"checkbox",value:e.value,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},null,42,F),[[f,j.value]]),t("span",{class:c(`${I}__icon`)},[p(m($),{name:m(C).Check,size:B[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(m(g),{key:0,as:"span",type:T[e.size],class:c(e.required?`${I}__label--required`:"")},{default:i(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,M)],2)],14,q),e.id?(u(),d(L,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{z as CLCheckbox,z as default};
4
+ import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as s,computed as o,createBlock as d,openBlock as u,withCtx as i,createElementVNode as t,createCommentVNode as n,normalizeStyle as r,normalizeClass as m,unref as c,withDirectives as p,vModelCheckbox as b,createVNode as f,createTextVNode as _,toDisplayString as y}from"vue";import{_ as X,a as v}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js";import{_ as L}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-CaZM-HFg.js";import{_ as $}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-Tv0xzrRz.js";import{CLSizes as g,CLIconSizes as h,CLTextTypes as x,CLIconNames as k,CLColorVariants as C,CLColors as B}from"../../../index.js";import{a as T}from"../../../chunks/utils-CdeA8xWg.js";import{useTheme as q}from"../../../composables/useTheme.js";const M=["data-testid"],F=["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]:h.Tiny,[g.Small]:h.Tiny,[g.Medium]:h.Small,[g.Large]:h.Medium,[g.XL]:h.Medium,[g.XXL]:h.Large,[g.XXXL]:h.Large,[g.XXXXL]:h.XL},B={[g.Tiny]:x.Small,[g.Small]:x.Medium,[g.Medium]:x.Medium,[g.Large]:x.Large,[g.XL]:x.XL,[g.XXL]:x.XXL,[g.XXXL]:x.XXXL,[g.XXXXL]:x.XXXXL},z=e,S=q(),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(X,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),[[b,R.value]]),t("span",{class:m(`${V}__icon`)},[f(c(L),{name:c(k).Check,size:C[e.size]},null,8,["name","size"])],2)],2),e.label?(u(),d(c($),{key:0,as:"span",type:B[e.size],class:m(e.required?`${V}__label--required`:"")},{default:i(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,F)],2)],14,M),e.id?(u(),d(v,{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};
@@ -54,6 +54,7 @@ declare const _default: import('vue').DefineComponent<{
54
54
  }>, {
55
55
  color: CLColors;
56
56
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
57
+ size: CLSizes;
57
58
  rounded: boolean;
58
59
  testId: string;
59
60
  form: string;
@@ -61,13 +62,12 @@ declare const _default: import('vue').DefineComponent<{
61
62
  onFocus: CLGenericFocusFunction;
62
63
  onBlur: CLGenericFocusFunction;
63
64
  onChange: CLGenericFunction;
64
- size: CLSizes;
65
+ borderRadius: CLBorderRadius;
66
+ value: string | number | boolean;
65
67
  required: boolean;
66
68
  ariaLabel: string;
67
- borderRadius: CLBorderRadius;
68
69
  busy: boolean;
69
70
  disabled: boolean;
70
- value: string | number | boolean;
71
71
  messages: string[];
72
72
  messageType: CLColors;
73
73
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -17,8 +17,8 @@ export interface CLFormCharCounterProps {
17
17
  }
18
18
  declare const _default: import('vue').DefineComponent<CLFormCharCounterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLFormCharCounterProps> & Readonly<{}>, {
19
19
  color: CLColors;
20
- testId: string;
21
20
  size: CLSizes;
21
+ testId: string;
22
22
  layout: CLCharCounterLayout;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
24
24
  export default _default;
@@ -14,8 +14,8 @@ export interface CLFormLabelProps {
14
14
  testId?: string;
15
15
  }
16
16
  declare const _default: import('vue').DefineComponent<CLFormLabelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLFormLabelProps> & Readonly<{}>, {
17
- testId: string;
18
17
  size: CLSizes;
18
+ testId: string;
19
19
  required: boolean;
20
20
  cssPrefix: string;
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInput.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,computed as l,createElementBlock as a,openBlock as o,normalizeClass as i,unref as t,createBlock as r,Fragment as d,createTextVNode as n,toDisplayString as u,createVNode as s,ref as p,watch as c,createCommentVNode as f,mergeModels as m,useTemplateRef as b,useModel as y,withCtx as x,createElementVNode as v,normalizeStyle as _,withDirectives as g,vModelDynamic as h,isRef as L}from"vue";import{_ as X,i as C,a as z}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as $}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as k}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{_ as I}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-MCaGYSd9.js";import{_ as F}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-CqwRXex5.js";import{CLSizes as S,CLColors as B,CLBorderRadius as T,CLIconSizes as R,CLColorVariants as V,CLIconNames as P,CLInputTypes as j,CLOrientation as q,CLCharCounterLayout as w}from"../../../index.js";import{_ as M}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-B7EJOOmg.js";const N=["data-testid"],U=/* @__PURE__ */e({name:"CLInputPrefix",__name:"CLInputPrefix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},prefix:{},size:{default:S.Small},testId:{default:"clll-input-prefix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(s.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.prefix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--left-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.prefix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.prefix)?(o(),r(t(I),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.prefix),1)],64))],8,N))],2))}}),A=["data-testid"],O=/* @__PURE__ */e({name:"CLInputSuffix",__name:"CLInputSuffix",props:{ariaLabel:{default:void 0},borderRadius:{default:T.XS},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},grouped:{type:Boolean,default:!1},onClick:{type:Function,default:void 0},suffix:{},size:{default:S.Small},testId:{default:"clll-input-suffix"}},setup(e){const s=e,p="clll-input",c=e=>Object.values(P).includes(e),f={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},m=l(()=>!!s.onClick&&c(s.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(s.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.suffix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--right-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(o(),a("div",{class:i(t(b))},[t(m)?(o(),r(t(F),{key:0,"aria-label":e.ariaLabel,"border-radius":e.borderRadius,color:e.color,disabled:e.disabled,"icon-before":e.suffix,"icon-size":f[e.size],"on-click":y,size:e.size,"test-id":e.testId,variant:t(V).Text,wrap:""},null,8,["aria-label","border-radius","color","disabled","icon-before","icon-size","size","test-id","variant"])):(o(),a("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.suffix)?(o(),r(t(I),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(o(),a(d,{key:1},[n(u(e.suffix),1)],64))],8,A))],2))}}),E=["data-testid"],G=/* @__PURE__ */e({name:"CLInputPill",__name:"CLInputPill",props:{color:{default:B.Neutral},label:{},testId:{default:"clll-input-pill"}},setup:e=>(l,r)=>(o(),a("span",{class:i("clll-input__pill"),"data-testid":e.testId},[s(t(M),{color:e.color,label:e.label,variant:t(V).Soft},null,8,["color","label","variant"])],10,E))}),H=["data-testid"],D=/* @__PURE__ */e({name:"CLInputColorTools",__name:"CLInputColorTools",props:{copied:{type:Boolean,default:!1},initialValue:{default:void 0},modelValue:{default:void 0},size:{default:S.Small},testId:{default:"clll-input-color-tools"}},emits:["copy","reset","update:copied"],setup(e,{emit:l}){const d=e,n=l,u="clll-input",s=p(d.copied),m={[S.Tiny]:R.Tiny,[S.Small]:R.Small,[S.Medium]:R.Medium,[S.Large]:R.Large,[S.XL]:R.XL,[S.XXL]:R.XXL,[S.XXXL]:R.XXXL,[S.XXXXL]:R.XXXXL},b=async()=>{try{d.modelValue&&(await navigator.clipboard.writeText(d.modelValue.toString()),s.value=!0,n("update:copied",!0),n("copy"))}catch(e){console.error(e)}},y=()=>{n("reset",d.initialValue)};return c(()=>d.copied,e=>{s.value=e}),c(()=>d.modelValue,()=>{s.value=!1,n("update:copied",!1)}),(l,d)=>(o(),a("span",{class:i(`${u}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(o(),r(t(F),{key:0,"aria-label":"Copy color to clipboard",class:i(`${u}__copy-to-clipboard`),color:t(B).Neutral,"icon-before":t(s)?t(P).Check:t(P).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(s)?"Color copied to clipboard":"Copy color to clipboard",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(o(),r(t(F),{key:1,"aria-label":"Reset selected color",class:i(`${u}__reset-selected-color`),color:t(B).Neutral,"on-click":y,"icon-before":t(P).Restore,"icon-size":m[e.size],size:e.size,title:"Reset selected color",variant:t(V).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","variant"])):f("",!0)],10,H))}}),J=["data-testid"],K=["id","name","aria-label","autocomplete","disabled","form","maxlength","minlength","pattern","placeholder","readonly","required","spellcheck","type"],Q=/* @__PURE__ */e({name:"CLInput",__name:"CLInput",props:/* @__PURE__ */m({ariaLabel:{default:void 0},autoComplete:{type:Boolean,default:void 0},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},charCounter:{type:Boolean,default:!1},color:{default:B.Neutral},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},grouped:{type:Boolean,default:!1},id:{},label:{default:void 0},maxLength:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},minLength:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onInput:{type:Function,default:void 0},onPrefixClick:{type:Function,default:void 0},onSuffixClick:{type:Function,default:void 0},orientation:{default:q.Vertical},pattern:{default:void 0},pill:{default:void 0},placeholder:{default:void 0},prefix:{default:void 0},prefixAriaLabel:{default:void 0},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:S.Small},spellCheck:{type:Boolean,default:void 0},suffix:{default:void 0},suffixAriaLabel:{default:void 0},testId:{default:"clll-input"},type:{default:j.Text},variant:{default:V.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:n}){const s=e,m=n,I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");s.type!==j.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(P).includes(e),V=l(()=>[I,s.borderRadius?`${I}--${s.borderRadius}`:"",s.busy?`${I}--busy`:`${I}--ready`,`${I}--${s.color}`,`${I}--${s.size}`,`${I}--${s.type}`,`${I}--${s.variant}`,s.disabled||s.busy?`${I}--disabled`:`${I}--active`,s.fluid||s.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,s.grouped?`${I}--grouped`:"",s.label?`${I}--haslabel`:"",s.messageType?`${I}--${s.messageType}`:"",s.orientation?`${I}--${s.orientation}`:"",s.pill?`${I}--haspill`:"",s.charCounter&&s.maxLength&&[j.Email,j.None,j.Text,j.Url].includes(s.type)?`${I}--hascharcounter`:"",s.prefix&&![j.Color,j.File].includes(s.type)?`${I}--hasprefix`:"",s.prefix&&![j.Color,j.File].includes(s.type)?R(s.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",s.readonly?`${I}--readonly`:`${I}--writeable`,s.rounded?`${I}--rounded`:`${I}--box`,s.required?`${I}--required`:`${I}--optional`,s.suffix&&![j.Color,j.File].includes(s.type)?`${I}--hassuffix`:"",s.suffix&&![j.Color,j.File].includes(s.type)?R(s.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),M=l(()=>[`${I}__input`,{"--nocolor":s.type===j.Color&&!B.value},{"--input-group":s.grouped||s.prefix||s.suffix}]),N=e=>{B.value=e,m("reset",B.value)},A=e=>{!e.target.closest('button, a, [role="button"]')&&S.value&&S.value.focus()};return c(B,()=>{F.value=!1}),d({inputRef:S}),(l,d)=>(o(),r(X,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(V)),style:_(t(C)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(o(),r($,{key:0,"css-prefix":I,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):f("",!0),v("span",{class:i([`${I}__input-container`,"--focus-within"]),onClick:A},[e.prefix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(U,{key:0,prefix:e.prefix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onPrefixClick,"aria-label":e.prefixAriaLabel,disabled:e.disabled||e.busy},null,8,["prefix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),v("span",{class:i(`${I}__input-border-control`)},[g(v("input",{id:e.id,ref:"input-elem","onUpdate:modelValue":d[0]||(d[0]=e=>B.value=e),name:e.name,"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:i(t(M)),disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,type:e.type,onBlur:d[1]||(d[1]=(...l)=>e.onBlur&&e.onBlur(...l)),onChange:d[2]||(d[2]=(...l)=>e.onChange&&e.onChange(...l)),onFocus:d[3]||(d[3]=(...l)=>e.onFocus&&e.onFocus(...l)),onInput:d[4]||(d[4]=(...l)=>e.onInput&&e.onInput(...l))},null,42,K),[[h,B.value]])],2),e.type===t(j).Color?(o(),a("span",{key:1,class:i(`${I}__selected-color`)},u(B.value||"none"),3)):f("",!0),e.type===t(j).Color?(o(),r(D,{key:2,modelValue:B.value,"onUpdate:modelValue":d[5]||(d[5]=e=>B.value=e),copied:t(F),"onUpdate:copied":d[6]||(d[6]=e=>L(F)?F.value=e:null),"initial-value":t(T),size:e.size,onReset:N},null,8,["modelValue","copied","initial-value","size"])):f("",!0),e.suffix&&![t(j).Color,t(j).File].includes(e.type)?(o(),r(O,{key:3,suffix:e.suffix,size:e.size,grouped:e.grouped,"border-radius":e.borderRadius,color:e.color,"on-click":e.onSuffixClick,"aria-label":e.suffixAriaLabel,disabled:e.disabled||e.busy},null,8,["suffix","size","grouped","border-radius","color","on-click","aria-label","disabled"])):f("",!0),e.charCounter&&e.maxLength&&[t(j).Email,t(j).None,t(j).Text,t(j).Url].includes(e.type)?(o(),r(k,{key:4,color:e.color,"css-prefix":I,"current-length":B.value?B.value.toString().length:0,"max-length":e.maxLength,layout:t(w).Inline,size:e.size},null,8,["color","current-length","max-length","layout","size"])):f("",!0)],2)],14,J),e.pill&&e.label&&e.orientation===t(q).Horizontal?(o(),a("span",{key:0,class:i(`${I}__spacer`)},null,2)):f("",!0),e.pill?(o(),r(G,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(o(),r(z,{key:2,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):f("",!0)]),_:1},8,["fluid","has-pill","has-char-counter","orientation"]))}});Q.Prefix=U,Q.Suffix=O,Q.Pill=G,Q.ColorTools=D;export{Q as CLInput,Q as default};
4
+ import{defineComponent as e,computed as l,createElementBlock as o,openBlock as a,normalizeClass as i,unref as t,createBlock as r,Fragment as d,createTextVNode as n,toDisplayString as u,createVNode as s,ref as p,watch as c,createCommentVNode as f,mergeModels as m,useTemplateRef as b,useModel as y,withCtx as x,createElementVNode as v,normalizeStyle as _,withDirectives as g,vModelDynamic as h,isRef as L}from"vue";import{_ as X,a as C}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js";import{_ as k}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BesVgApW.js";import{_ as z}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{_ as $}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-CaZM-HFg.js";import{_ as I}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Bi7GC71m.js";import{CLSizes as F,CLColors as S,CLBorderRadius as B,CLIconSizes as T,CLColorVariants as R,CLIconNames as V,CLInputTypes as j,CLOrientation as P,CLCharCounterLayout as q}from"../../../index.js";import{_ as w}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-BSi1ljPG.js";import{i as M}from"../../../chunks/utils-CdeA8xWg.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 s=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(()=>!!s.onClick&&c(s.prefix)),b=l(()=>{return[`${p}__input-prefix`,"form-addon-flex","form-addon-flex--left",c(s.prefix)?`${p}__input-prefix--icon form-addon-flex--icon`:`${p}__input-prefix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.prefix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--left-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(a(),o("div",{class:i(t(b))},[t(m)?(a(),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"])):(a(),o("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.prefix)?(a(),r(t($),{key:0,name:e.prefix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(a(),o(d,{key:1},[n(u(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 s=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(()=>!!s.onClick&&c(s.suffix)),b=l(()=>{return[`${p}__input-suffix`,"form-addon-flex","form-addon-flex--right",c(s.suffix)?`${p}__input-suffix--icon form-addon-flex--icon`:`${p}__input-suffix--string form-addon-flex--string`,{"--interactive":m},{"--input-group":s.grouped||s.suffix},{"--disabled":s.disabled},s.grouped?`form-addon-radius--right-${e=s.borderRadius,e?.replace("rounded-","")||"xs"}`:""];var e}),y=e=>{s.onClick&&e&&!s.disabled&&(e.stopPropagation(),s.onClick(e))};return(l,s)=>(a(),o("div",{class:i(t(b))},[t(m)?(a(),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"])):(a(),o("span",{key:1,class:"icon-container","data-testid":e.testId},[c(e.suffix)?(a(),r(t($),{key:0,name:e.suffix,size:f[e.size],color:e.color},null,8,["name","size","color"])):(a(),o(d,{key:1},[n(u(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)=>(a(),o("span",{class:i("clll-input__pill"),"data-testid":e.testId},[s(t(w),{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,n=l,u="clll-input",s=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()),s.value=!0,n("update:copied",!0),n("copy"))}catch(e){console.error(e)}},y=()=>{n("reset",d.initialValue)};return c(()=>d.copied,e=>{s.value=e}),c(()=>d.modelValue,()=>{s.value=!1,n("update:copied",!1)}),(l,d)=>(a(),o("span",{class:i(`${u}__selected-color-tools`),"data-testid":e.testId},[e.modelValue?(a(),r(t(I),{key:0,"aria-label":"Copy color to clipboard",class:i(`${u}__copy-to-clipboard`),color:t(S).Neutral,"icon-before":t(s)?t(V).Check:t(V).Copy,"icon-size":m[e.size],"on-click":b,size:e.size,title:t(s)?"Color copied to clipboard":"Copy color to clipboard",variant:t(R).Ghost,wrap:""},null,8,["class","color","icon-before","icon-size","size","title","variant"])):f("",!0),e.modelValue?(a(),r(t(I),{key:1,"aria-label":"Reset selected color",class:i(`${u}__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:P.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:j.Text},variant:{default:R.Outline}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(["reset"],["update:modelValue"]),setup(e,{expose:d,emit:n}){const s=e,m=n,$=N(),I="clll-input",F=p(!1),S=b("input-elem"),B=y(e,"modelValue");s.type!==j.Color||B.value||(B.value="#FFFFFF");const T=B.value?.toString(),R=e=>Object.values(V).includes(e),w=l(()=>[I,s.borderRadius?`${I}--${s.borderRadius}`:"",s.busy?`${I}--busy`:`${I}--ready`,`${I}--${s.color}`,`${I}--${s.size}`,`${I}--${s.type}`,`${I}--${s.variant}`,s.disabled||s.busy?`${I}--disabled`:`${I}--active`,s.fluid||s.orientation===P.Horizontal?`${I}--fluid`:`${I}--fixed`,s.grouped?`${I}--grouped`:"",s.label?`${I}--haslabel`:"",s.messageType?`${I}--${s.messageType}`:"",s.orientation?`${I}--${s.orientation}`:"",s.pill?`${I}--haspill`:"",s.charCounter&&s.maxLength&&[j.Email,j.None,j.Text,j.Url].includes(s.type)?`${I}--hascharcounter`:"",s.prefix&&![j.Color,j.File].includes(s.type)?`${I}--hasprefix`:"",s.prefix&&![j.Color,j.File].includes(s.type)?R(s.prefix)?`${I}--hasiconprefix`:`${I}--hascustomprefix`:"",s.readonly?`${I}--readonly`:`${I}--writeable`,s.rounded?`${I}--rounded`:`${I}--box`,s.required?`${I}--required`:`${I}--optional`,s.suffix&&![j.Color,j.File].includes(s.type)?`${I}--hassuffix`:"",s.suffix&&![j.Color,j.File].includes(s.type)?R(s.suffix)?`${I}--hasiconsuffix`:`${I}--hascustomsuffix`:""]),U=l(()=>[`${I}__input`,{"--nocolor":s.type===j.Color&&!B.value},{"--input-group":s.grouped||s.prefix||s.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)=>(a(),r(X,{fluid:e.fluid,"has-pill":!!e.pill,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:x(()=>[v("span",{class:i(t(w)),style:_(t(M)({color:e.color,variant:e.variant,theme:t($)})),"data-testid":e.testId},[e.label?(a(),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(j).Color,t(j).File].includes(e.type)?(a(),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(j).Color?(a(),o("span",{key:1,class:i(`${I}__selected-color`)},u(B.value||"none"),3)):f("",!0),e.type===t(j).Color?(a(),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(j).Color,t(j).File].includes(e.type)?(a(),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(j).Email,t(j).None,t(j).Text,t(j).Url].includes(e.type)?(a(),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(q).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(P).Horizontal?(a(),o("span",{key:0,class:i(`${I}__spacer`)},null,2)):f("",!0),e.pill?(a(),r(H,{key:1,label:e.pill,color:e.color},null,8,["label","color"])):f("",!0),e.id?(a(),r(C,{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};
@@ -94,6 +94,7 @@ declare const _default: import('vue').DefineComponent<{
94
94
  }>, {
95
95
  color: CLColors;
96
96
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
97
+ size: CLSizes;
97
98
  fluid: boolean;
98
99
  rounded: boolean;
99
100
  testId: string;
@@ -105,11 +106,10 @@ declare const _default: import('vue').DefineComponent<{
105
106
  onBlur: CLGenericFocusFunction;
106
107
  onChange: CLGenericFunction;
107
108
  onInput: CLGenericInputFunction;
108
- size: CLSizes;
109
+ borderRadius: CLBorderRadius;
109
110
  required: boolean;
110
111
  prefix: string | CLIconNames;
111
112
  ariaLabel: string;
112
- borderRadius: CLBorderRadius;
113
113
  busy: boolean;
114
114
  disabled: boolean;
115
115
  pill: string;
@@ -20,8 +20,8 @@ declare const _default: import('vue').DefineComponent<CLInputColorToolsProps, {}
20
20
  onReset?: ((value: string | number | undefined) => any) | undefined;
21
21
  "onUpdate:copied"?: ((copied: boolean) => any) | undefined;
22
22
  }>, {
23
- testId: string;
24
23
  size: CLSizes;
24
+ testId: string;
25
25
  modelValue: string | number;
26
26
  copied: boolean;
27
27
  initialValue: string;
@@ -21,11 +21,11 @@ export interface CLInputPrefixProps {
21
21
  }
22
22
  declare const _default: import('vue').DefineComponent<CLInputPrefixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLInputPrefixProps> & Readonly<{}>, {
23
23
  color: CLColors;
24
+ size: CLSizes;
24
25
  testId: string;
25
26
  onClick: (event?: MouseEvent) => void;
26
- size: CLSizes;
27
- ariaLabel: string;
28
27
  borderRadius: CLBorderRadius;
28
+ ariaLabel: string;
29
29
  disabled: boolean;
30
30
  grouped: boolean;
31
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -21,11 +21,11 @@ export interface CLInputSuffixProps {
21
21
  }
22
22
  declare const _default: import('vue').DefineComponent<CLInputSuffixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CLInputSuffixProps> & Readonly<{}>, {
23
23
  color: CLColors;
24
+ size: CLSizes;
24
25
  testId: string;
25
26
  onClick: (event?: MouseEvent) => void;
26
- size: CLSizes;
27
- ariaLabel: string;
28
27
  borderRadius: CLBorderRadius;
28
+ ariaLabel: string;
29
29
  disabled: boolean;
30
30
  grouped: boolean;
31
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInputDatePicker.css';
3
- import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as u,computed as d,onMounted as n,onBeforeUnmount as o,createElementBlock as s,openBlock as i,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as v,normalizeStyle as c,withCtx as b,createElementVNode as y}from"vue";import{u as g,a as _,o as h,f as k,s as C}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as D}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-CMQi_nx9.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-US_3N22Q.js";import{CLIconNames as I,CLColorVariants as L,CLPlacement as V,CLOrientation as M,CLSizes as x,CLColors as B}from"../../../index.js";import{i as j}from"../../../chunks/helper-C542dSLs.js";import{useEsc as E}from"../../../composables/useEsc.js";import{useDateInputMask as F}from"../../../composables/useDateInputMask.js";const S=/* @__PURE__ */e({name:"CLInputDatePicker",__name:"CLInputDatePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:B.Neutral},size:{default:x.Small},variant:{default:L.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},id:{},isRange:{type:Boolean,default:!0},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},orientation:{default:M.Vertical},placement:{default:V.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-date-picker"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,V="clll-input-date-picker",M=l(!1),x=l(),B=l(),S=l(),$=t(e,"modelValue"),z=l(""),{handleDateInput:w,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?z.value=`${e} - ${l}`:z.value=e:z.value=""},{immediate:!0,deep:!0});const P=d(()=>x.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),k(),C()],placement:l(a.placement),whileElementsMounted:_,open:M}),G=()=>{a.disabled||a.busy||(M.value=!M.value,M.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=d(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{M.value&&(M.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=x.value?.$el,t=S.value;M.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&N()},J=()=>{H.value&&(B.value?.apply(),N(),a.onChange?.())},K=e=>{const l=O(e,a.isRange),t=x.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&w(e,z,a.isRange,()=>{K(z.value)})},W=e=>{if(!e)return;const l=e.target.value,t=K(l);if(!l.trim())return $.value={start:null,end:null},void a.onChange?.();if(t){if(a.isRange){const[e,a]=l.split("-").map(e=>e.trim());$.value={start:T(e),end:T(a)}}else $.value={start:T(l.trim()),end:null};a.onChange?.()}};return n(()=>{j&&document.addEventListener("click",A)}),o(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(i(),s("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{id:e.id,ref_key:"inputRef",ref:x,modelValue:p(z),"onUpdate:modelValue":l[0]||(l[0]=e=>v(z)?z.value=e:null),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,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(M)?(i(),s("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:c({...p(U),zIndex:100})},[f(p(D),{"border-radius":e.borderRadius,variant:p(L).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:b(()=>[y("div",{class:r(`${V}__calendar-container`)},[f(p(R),{ref_key:"calendarRef",ref:B,modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=e=>$.value=e),disabled:e.disabled,busy:e.busy,"is-range":e.isRange,fluid:"",onDateSelect:J},null,8,["modelValue","disabled","busy","is-range"])],2)]),_:1},8,["border-radius","variant","rounded"])],6)):m("",!0)],2))}});export{S as CLInputDatePicker,S as default};
3
+ import{defineComponent as e,mergeModels as a,ref as l,useModel as t,watch as u,computed as d,onMounted as n,onBeforeUnmount as o,createElementBlock as i,openBlock as s,normalizeClass as r,createVNode as f,createCommentVNode as m,unref as p,isRef as v,normalizeStyle as c,withCtx as b,createElementVNode as y}from"vue";import{u as g,a as _,o as h,f as C,s as k}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as D}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-Lb49WiaW.js";import{CLInput as Y}from"../CLInput/CLInput.js";import{_ as R}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BxZBofc_.js";import{CLIconNames as I,CLColorVariants as L,CLPlacement as V,CLOrientation as M,CLSizes as x,CLColors as B}from"../../../index.js";import{i as j}from"../../../chunks/helper-C542dSLs.js";import{useEsc as E}from"../../../composables/useEsc.js";import{useDateInputMask as F}from"../../../composables/useDateInputMask.js";const S=/* @__PURE__ */e({name:"CLInputDatePicker",__name:"CLInputDatePicker",props:/* @__PURE__ */a({ariaLabel:{default:void 0},borderRadius:{default:void 0},color:{default:B.Neutral},size:{default:x.Small},variant:{default:L.Outline},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},form:{default:void 0},id:{},isRange:{type:Boolean,default:!0},label:{default:void 0},messages:{default:()=>[]},messageType:{default:void 0},name:{},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},orientation:{default:M.Vertical},placement:{default:V.BottomStart},placeholder:{default:void 0},required:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},testId:{default:"clll-input-date-picker"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,V="clll-input-date-picker",M=l(!1),x=l(),B=l(),S=l(),$=t(e,"modelValue"),z=l(""),{handleDateInput:w,isoToSlash:q,slashToISO:T,validateDate:O}=F();u($,()=>{const e=q($.value?.start??null),l=q($.value?.end??null);e?a.isRange&&l?z.value=`${e} - ${l}`:z.value=e:z.value=""},{immediate:!0,deep:!0});const P=d(()=>x.value?.$el),{floatingStyles:U}=g(P,S,{middleware:[h(8),C(),k()],placement:l(a.placement),whileElementsMounted:_,open:M}),G=()=>{a.disabled||a.busy||(M.value=!M.value,M.value?(a.onFocus?.(new FocusEvent("focus")),B.value?.initializeDraft()):a.onBlur?.(new FocusEvent("blur")))},H=d(()=>{const e=B.value?.draftStart,l=B.value?.draftEnd;return a.isRange?!!e&&!!l:!!e}),N=()=>{M.value&&(M.value=!1,a.onBlur?.(new FocusEvent("blur")))};E({escHandler:N});const A=e=>{const a=e.target,l=x.value?.$el,t=S.value;M.value&&l&&t&&!l.contains(a)&&!t.contains(a)&&N()},J=()=>{H.value&&(B.value?.apply(),N(),a.onChange?.())},K=e=>{const l=O(e,a.isRange),t=x.value?.inputRef;return t&&(e&&!l?t.setCustomValidity("Invalid date format. Use YYYY/MM/DD"):t.setCustomValidity("")),l},Q=e=>{e&&w(e,z,a.isRange,()=>{K(z.value)})},W=e=>{if(!e)return;const l=e.target.value,t=K(l);if(!l.trim())return $.value={start:null,end:null},void a.onChange?.();if(t){if(a.isRange){const[e,a]=l.split("-").map(e=>e.trim());$.value={start:T(e),end:T(a)}}else $.value={start:T(l.trim()),end:null};a.onChange?.()}};return n(()=>{j&&document.addEventListener("click",A)}),o(()=>{j&&document.removeEventListener("click",A)}),(a,l)=>(s(),i("div",{class:r([V,e.fluid?`${V}--fluid`:""])},[f(p(Y),{id:e.id,ref_key:"inputRef",ref:x,modelValue:p(z),"onUpdate:modelValue":l[0]||(l[0]=e=>v(z)?z.value=e:null),"aria-label":e.ariaLabel,"border-radius":e.borderRadius,busy:e.busy,color:e.color,disabled:e.disabled,fluid:e.fluid,form:e.form,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(M)?(s(),i("div",{key:0,ref_key:"popoverRef",ref:S,class:r(`${V}__popover`),style:c({...p(U),zIndex:100})},[f(p(D),{"border-radius":e.borderRadius,variant:p(L).Ghost,padded:!1,rounded:e.rounded,elevated:""},{default:b(()=>[y("div",{class:r(`${V}__calendar-container`)},[f(p(R),{ref_key:"calendarRef",ref:B,modelValue:$.value,"onUpdate:modelValue":l[1]||(l[1]=e=>$.value=e),disabled:e.disabled,busy:e.busy,"is-range":e.isRange,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};
@@ -72,6 +72,7 @@ declare const _default: import('vue').DefineComponent<{
72
72
  }>, {
73
73
  color: CLColors;
74
74
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
75
+ size: CLSizes;
75
76
  fluid: boolean;
76
77
  rounded: boolean;
77
78
  testId: string;
@@ -80,10 +81,9 @@ declare const _default: import('vue').DefineComponent<{
80
81
  onFocus: CLGenericFocusFunction;
81
82
  onBlur: CLGenericFocusFunction;
82
83
  onChange: CLGenericFunction;
83
- size: CLSizes;
84
+ borderRadius: CLBorderRadius;
84
85
  required: boolean;
85
86
  ariaLabel: string;
86
- borderRadius: CLBorderRadius;
87
87
  busy: boolean;
88
88
  disabled: boolean;
89
89
  placeholder: string;
@@ -106,6 +106,7 @@ declare const _default: import('vue').DefineComponent<{
106
106
  }, import('vue').PublicProps, {
107
107
  color: CLColors;
108
108
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
109
+ size: CLSizes;
109
110
  fluid: boolean;
110
111
  rounded: boolean;
111
112
  testId: string;
@@ -117,11 +118,10 @@ declare const _default: import('vue').DefineComponent<{
117
118
  onBlur: CLGenericFocusFunction;
118
119
  onChange: CLGenericFunction;
119
120
  onInput: import('../../../index.ts').CLGenericInputFunction;
120
- size: CLSizes;
121
+ borderRadius: CLBorderRadius;
121
122
  required: boolean;
122
123
  prefix: string | CLIconNames;
123
124
  ariaLabel: string;
124
- borderRadius: CLBorderRadius;
125
125
  busy: boolean;
126
126
  disabled: boolean;
127
127
  pill: string;
@@ -160,6 +160,7 @@ declare const _default: import('vue').DefineComponent<{
160
160
  }, {}, {}, {}, {
161
161
  color: CLColors;
162
162
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
163
+ size: CLSizes;
163
164
  fluid: boolean;
164
165
  rounded: boolean;
165
166
  testId: string;
@@ -171,11 +172,10 @@ declare const _default: import('vue').DefineComponent<{
171
172
  onBlur: CLGenericFocusFunction;
172
173
  onChange: CLGenericFunction;
173
174
  onInput: import('../../../index.ts').CLGenericInputFunction;
174
- size: CLSizes;
175
+ borderRadius: CLBorderRadius;
175
176
  required: boolean;
176
177
  prefix: string | CLIconNames;
177
178
  ariaLabel: string;
178
- borderRadius: CLBorderRadius;
179
179
  busy: boolean;
180
180
  disabled: boolean;
181
181
  pill: string;
@@ -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 o,computed as s,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as $,c as f,a as g}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as X}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLSizes as v,CLTextTypes as L,CLColorVariants as B,CLColors as h}from"../../../index.js";const C=["data-testid"],k=["for"],q=["id","aria-label","checked","disabled","name","value","required"],x=/* @__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:B.Outline},onBlur:{},onChange:{},onFocus:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const B={[v.Tiny]:L.Small,[v.Small]:L.Medium,[v.Medium]:L.Medium,[v.Large]:L.Large,[v.XL]:L.XL,[v.XXL]:L.XXL,[v.XXXL]:L.XXXL,[v.XXXXL]:L.XXXXL},h=e,x="clll-radiobutton",R=l(e,"modelValue"),T=o("radiobutton-ref"),M=()=>{T.value&&T.value.focus()},F=s(()=>[x,h.borderRadius?`${x}--${h.borderRadius}`:"",h.busy?`${x}--busy`:`${x}--ready`,`${x}--${h.color}`,`${x}--${h.size}`,h.disabled?`${x}--disabled`:`${x}--active`,h.label?`${x}--haslabel`:"",h.messageType?`${x}--${h.messageType}`:"",h.rounded?`${x}--rounded`:`${x}--box`,h.required?`${x}--required`:`${x}--optional`]),S=s(()=>[`${x}__radiobutton-container`,`${x}--${h.variant}`]);return a({radiobuttonRef:T}),(a,l)=>(t(),d($,null,{default:r(()=>[u("span",{class:m(c(F)),style:i(c(f)({color:e.color,variant:e.variant})),"data-testid":e.testId},[u("span",{class:m(c(S)),onClick:M},[u("label",{for:e.id,class:m(`${x}__label`)},[u("span",{class:m([`${x}__radiobutton-frame`,"form-control-flex"])},[p(u("input",{id:e.id,ref:"radiobutton-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${x}__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),[[b,R.value]]),u("span",{class:m(`${x}__indicator`)},null,2)],2),e.label?(t(),d(c(X),{key:0,as:"span",type:B[e.size],class:m(e.required?`${x}__label--required`:"")},{default:r(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,k)],2)],14,C),e.id?(t(),d(g,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{x as CLRadioButton,x as default};
4
+ import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as o,computed as s,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as p,withDirectives as c,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as f,a as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-Tv0xzrRz.js";import{CLSizes as X,CLTextTypes as v,CLColorVariants as L,CLColors as h}from"../../../index.js";import{a as B}from"../../../chunks/utils-CdeA8xWg.js";import{useTheme as k}from"../../../composables/useTheme.js";const C=["data-testid"],q=["for"],x=["id","aria-label","checked","disabled","name","value","required"],R=/* @__PURE__ */e({name:"CLRadioButton",__name:"CLRadioButton",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},checked:{type:Boolean},color:{default:h.Neutral},disabled:{type:Boolean},form:{},id:{},label:{},messages:{},messageType:{},name:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:X.Small},testId:{default:"clll-radiobutton"},value:{type:[String,Number,Boolean]},variant:{default:L.Outline},onBlur:{},onChange:{},onFocus:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const L={[X.Tiny]:v.Small,[X.Small]:v.Medium,[X.Medium]:v.Medium,[X.Large]:v.Large,[X.XL]:v.XL,[X.XXL]:v.XXL,[X.XXXL]:v.XXXL,[X.XXXXL]:v.XXXXL},h=e,R=k(),T="clll-radiobutton",j=l(e,"modelValue"),M=o("radiobutton-ref"),F=()=>{M.value&&M.value.focus()},S=s(()=>[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=s(()=>[`${T}__radiobutton-container`,`${T}--${h.variant}`]);return a({radiobuttonRef:M}),(a,l)=>(t(),d(f,null,{default:r(()=>[u("span",{class:m(p(S)),style:i(p(B)({color:e.color,variant:e.variant,theme:p(R)})),"data-testid":e.testId},[u("span",{class:m(p(V)),onClick:F},[u("label",{for:e.id,class:m(`${T}__label`)},[u("span",{class:m([`${T}__radiobutton-frame`,"form-control-flex"])},[c(u("input",{id:e.id,ref:"radiobutton-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${T}__radiobutton`),checked:e.checked,disabled:e.disabled||e.busy,name:e.name,value:e.value,required:e.required,type:"radio",onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},null,42,x),[[b,j.value]]),u("span",{class:m(`${T}__indicator`)},null,2)],2),e.label?(t(),d(p(g),{key:0,as:"span",type:L[e.size],class:m(e.required?`${T}__label--required`:"")},{default:r(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,q)],2)],14,C),e.id?(t(),d($,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{R as CLRadioButton,R as default};
@@ -56,9 +56,9 @@ declare const _default: import('vue').DefineComponent<{
56
56
  }>, {
57
57
  color: CLColors;
58
58
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
59
+ size: CLSizes;
59
60
  rounded: boolean;
60
61
  testId: string;
61
- size: CLSizes;
62
62
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
63
63
  'radiobutton-ref': HTMLInputElement;
64
64
  }, HTMLDivElement>;
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLSelect.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,s as L,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as C}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as X}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-MCaGYSd9.js";import{CLSizes as q,CLIconSizes as x,CLOrientation as z,CLIconNames as B,CLColorVariants as k,CLColors as T}from"../../../index.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:T.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:z.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:q.Small},testId:{default:"clll-select"},variant:{default:k.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const k={[q.Tiny]:x.Tiny,[q.Small]:x.Tiny,[q.Medium]:x.Small,[q.Large]:x.Medium,[q.XL]:x.Medium,[q.XXL]:x.Large,[q.XXXL]:x.Large,[q.XXXXL]:x.XL},T=e,V="clll-select",j=l(e,"modelValue"),I=s("select-ref"),R=()=>{I.value&&I.value.focus()},w=o(()=>[V,T.borderRadius?`${V}--${T.borderRadius}`:"",T.busy?`${V}--busy`:`${V}--ready`,`${V}--${T.color}`,`${V}--${T.size}`,`${V}--${T.variant}`,T.disabled||T.busy?`${V}--disabled`:`${V}--active`,T.fluid||T.orientation===z.Horizontal?`${V}--fluid`:`${V}--fixed`,T.label?`${V}--haslabel`:"",T.messageType?`${V}--${T.messageType}`:"",T.orientation?`${V}--${T.orientation}`:"",T.rounded?`${V}--rounded`:`${V}--box`,T.required?`${V}--required`:`${V}--optional`]);return a({selectRef:I}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(w)),style:u(c(L)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(t(),i(C,{key:0,"css-prefix":V,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):n("",!0),d("span",{class:m(`${V}__select-container`),onClick:R},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${V}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===j.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,j.value]]),d("span",{class:m([`${V}__icon`,"form-select-icon-flex"])},[v(c(X),{name:c(B).ChevronDown,size:k[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
4
+ import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BesVgApW.js";import{_ as C}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-CaZM-HFg.js";import{CLSizes as X,CLIconSizes as k,CLOrientation as q,CLIconNames as x,CLColorVariants as z,CLColors as B}from"../../../index.js";import{s as T}from"../../../chunks/utils-CdeA8xWg.js";import{useTheme as j}from"../../../composables/useTheme.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:B.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:q.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:X.Small},testId:{default:"clll-select"},variant:{default:z.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const z={[X.Tiny]:k.Tiny,[X.Small]:k.Tiny,[X.Medium]:k.Small,[X.Large]:k.Medium,[X.XL]:k.Medium,[X.XXL]:k.Large,[X.XXXL]:k.Large,[X.XXXXL]:k.XL},B=e,V=j(),I="clll-select",R=l(e,"modelValue"),w=s("select-ref"),D=()=>{w.value&&w.value.focus()},H=o(()=>[I,B.borderRadius?`${I}--${B.borderRadius}`:"",B.busy?`${I}--busy`:`${I}--ready`,`${I}--${B.color}`,`${I}--${B.size}`,`${I}--${B.variant}`,B.disabled||B.busy?`${I}--disabled`:`${I}--active`,B.fluid||B.orientation===q.Horizontal?`${I}--fluid`:`${I}--fixed`,B.label?`${I}--haslabel`:"",B.messageType?`${I}--${B.messageType}`:"",B.orientation?`${I}--${B.orientation}`:"",B.rounded?`${I}--rounded`:`${I}--box`,B.required?`${I}--required`:`${I}--optional`]);return a({selectRef:w}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(H)),style:u(c(T)({color:e.color,variant:e.variant,theme:c(V)})),"data-testid":e.testId},[e.label?(t(),i(L,{key:0,"css-prefix":I,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):n("",!0),d("span",{class:m(`${I}__select-container`),onClick:D},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${I}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===R.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,R.value]]),d("span",{class:m([`${I}__icon`,"form-select-icon-flex"])},[v(c(C),{name:c(x).ChevronDown,size:z[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
@@ -60,10 +60,10 @@ declare const _default: import('vue').DefineComponent<{
60
60
  }>, {
61
61
  color: CLColors;
62
62
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
63
+ size: CLSizes;
63
64
  fluid: boolean;
64
65
  rounded: boolean;
65
66
  testId: string;
66
- size: CLSizes;
67
67
  orientation: CLOrientation;
68
68
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
69
69
  'select-ref': HTMLSelectElement;
@@ -1,4 +1,4 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLTextArea.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as p,unref as m,withDirectives as c,vModelText as h}from"vue";import{_ as y,i as f,a as g}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js";import{_ as b}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js";import{_ as $}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{CLOrientation as x,CLCharCounterLayout as _,CLColorVariants as C,CLSizes as v,CLColors as L}from"../../../index.js";const B=["data-testid"],k=["id","aria-label","autocomplete","cols","disabled","form","maxlength","minlength","name","pattern","placeholder","readonly","required","spellcheck","rows"],z=/* @__PURE__ */e({name:"CLTextArea",__name:"CLTextArea",props:/* @__PURE__ */a({ariaLabel:{},autoComplete:{type:Boolean},borderRadius:{},busy:{type:Boolean},charCounter:{type:Boolean},color:{default:L.Neutral},cols:{},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},maxLength:{},messages:{},messageType:{},minLength:{},name:{},onBlur:{},onChange:{},onFocus:{},onInput:{},orientation:{default:x.Vertical},pattern:{},placeholder:{},readonly:{type:Boolean},required:{type:Boolean},resizable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},rows:{},size:{default:v.Small},spellCheck:{type:Boolean},testId:{default:"clll-textarea"},variant:{default:C.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const C=e,v="clll-textarea",L=l("textarea-ref"),z=o(e,"modelValue"),q=()=>{L.value&&L.value.focus()},I=t(()=>[v,C.borderRadius?`${v}--${C.borderRadius}`:"",C.busy?`${v}--busy`:`${v}--ready`,`${v}--${C.color}`,`${v}--${C.size}`,`${v}--${C.variant}`,C.disabled||C.busy?`${v}--disabled`:`${v}--active`,C.charCounter&&C.maxLength?`${v}--hascharcounter`:"",C.fluid||C.orientation===x.Horizontal?`${v}--fluid`:`${v}--fixed`,C.label?`${v}--haslabel`:"",C.messageType?`${v}--${C.messageType}`:"",C.orientation?`${v}--${C.orientation}`:"",C.resizable?`${v}--resizable`:"",C.readonly?`${v}--readonly`:`${v}--writeable`,C.rounded?`${v}--rounded`:`${v}--box`,C.required?`${v}--required`:`${v}--optional`]);return a({textareaRef:L}),(a,l)=>(n(),r(y,{fluid:e.fluid,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:s(()=>[i("span",{class:p(m(I)),style:d(m(f)({color:e.color,variant:e.variant})),"data-testid":e.testId},[e.label?(n(),r(b,{key:0,"css-prefix":v,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):u("",!0),i("span",{class:p(`${v}__input-container`),onClick:q},[c(i("textarea",{id:e.id,ref:"textarea-ref","onUpdate:modelValue":l[0]||(l[0]=e=>z.value=e),"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:p(`${v}__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,k),[[h,z.value]])],2),e.charCounter&&e.maxLength?(n(),r($,{key:1,"css-prefix":v,"current-length":z.value?z.value.toString().length:0,"max-length":e.maxLength,color:e.color,size:e.size,layout:m(_).Block},null,8,["current-length","max-length","color","size","layout"])):u("",!0)],14,B),e.id?(n(),r(g,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):u("",!0)]),_:1},8,["fluid","has-char-counter","orientation"]))}});export{z as CLTextArea,z as default};
4
+ import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f,a as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-BrlOiHsE.js";import{_ as g}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BesVgApW.js";import{_ as b}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js";import{CLOrientation as $,CLCharCounterLayout as x,CLColorVariants as _,CLSizes as C,CLColors as v}from"../../../index.js";import{i as L}from"../../../chunks/utils-CdeA8xWg.js";import{useTheme as B}from"../../../composables/useTheme.js";const k=["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:v.Neutral},cols:{},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},maxLength:{},messages:{},messageType:{},minLength:{},name:{},onBlur:{},onChange:{},onFocus:{},onInput:{},orientation:{default:$.Vertical},pattern:{},placeholder:{},readonly:{type:Boolean},required:{type:Boolean},resizable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},rows:{},size:{default:C.Small},spellCheck:{type:Boolean},testId:{default:"clll-textarea"},variant:{default:_.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const _=e,C=B(),v="clll-textarea",q=l("textarea-ref"),T=o(e,"modelValue"),I=()=>{q.value&&q.value.focus()},j=t(()=>[v,_.borderRadius?`${v}--${_.borderRadius}`:"",_.busy?`${v}--busy`:`${v}--ready`,`${v}--${_.color}`,`${v}--${_.size}`,`${v}--${_.variant}`,_.disabled||_.busy?`${v}--disabled`:`${v}--active`,_.charCounter&&_.maxLength?`${v}--hascharcounter`:"",_.fluid||_.orientation===$.Horizontal?`${v}--fluid`:`${v}--fixed`,_.label?`${v}--haslabel`:"",_.messageType?`${v}--${_.messageType}`:"",_.orientation?`${v}--${_.orientation}`:"",_.resizable?`${v}--resizable`:"",_.readonly?`${v}--readonly`:`${v}--writeable`,_.rounded?`${v}--rounded`:`${v}--box`,_.required?`${v}--required`:`${v}--optional`]);return a({textareaRef:q}),(a,l)=>(n(),r(f,{fluid:e.fluid,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:s(()=>[i("span",{class:m(p(j)),style:d(p(L)({color:e.color,variant:e.variant,theme:p(C)})),"data-testid":e.testId},[e.label?(n(),r(g,{key:0,"css-prefix":v,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):u("",!0),i("span",{class:m(`${v}__input-container`),onClick:I},[c(i("textarea",{id:e.id,ref:"textarea-ref","onUpdate:modelValue":l[0]||(l[0]=e=>T.value=e),"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:m(`${v}__input`),cols:e.cols,disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,name:e.name,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,rows:e.rows,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a)),onInput:l[4]||(l[4]=(...a)=>e.onInput&&e.onInput(...a))},null,42,z),[[h,T.value]])],2),e.charCounter&&e.maxLength?(n(),r(b,{key:1,"css-prefix":v,"current-length":T.value?T.value.toString().length:0,"max-length":e.maxLength,color:e.color,size:e.size,layout:p(x).Block},null,8,["current-length","max-length","color","size","layout"])):u("",!0)],14,k),e.id?(n(),r(y,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):u("",!0)]),_:1},8,["fluid","has-char-counter","orientation"]))}});export{q as CLTextArea,q as default};
@@ -80,10 +80,10 @@ declare const _default: import('vue').DefineComponent<{
80
80
  }>, {
81
81
  color: CLColors;
82
82
  variant: CLColorVariants.Outline | CLColorVariants.Ghost;
83
+ size: CLSizes;
83
84
  fluid: boolean;
84
85
  rounded: boolean;
85
86
  testId: string;
86
- size: CLSizes;
87
87
  orientation: CLOrientation;
88
88
  resizable: boolean;
89
89
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -1,12 +1,18 @@
1
- import { CLColors, CLColorVariants } from '../../index.ts';
1
+ import { Ref } from 'vue';
2
+ import { CLColors, CLColorVariants, CLPalette } from '../../index.ts';
3
+ interface ThemeContext {
4
+ colors: Ref<CLPalette>;
5
+ darkMode: Ref<boolean | undefined>;
6
+ }
2
7
  interface ThemeProps {
3
8
  color: CLColors;
4
9
  component?: string;
5
10
  disabled?: boolean;
6
11
  readonly?: boolean;
7
12
  variant?: CLColorVariants.Outline | CLColorVariants.Ghost;
13
+ theme?: ThemeContext;
8
14
  }
9
- export declare const checkboxTheme: ({ color, variant }: ThemeProps) => {
15
+ export declare const checkboxTheme: ({ color, variant, theme }: ThemeProps) => {
10
16
  '--clll-checkbox-bg': string;
11
17
  '--clll-checkbox-border': string;
12
18
  '--clll-checkbox-disabled-border': string;
@@ -22,7 +28,7 @@ export declare const checkboxTheme: ({ color, variant }: ThemeProps) => {
22
28
  '--clll-checkbox-outline-width': string;
23
29
  '--clll-checkbox-required-asterisk-color': string;
24
30
  };
25
- export declare const inputTheme: ({ color, variant }: ThemeProps) => {
31
+ export declare const inputTheme: ({ color, variant, theme }: ThemeProps) => {
26
32
  '--clll-input-bg': string;
27
33
  '--clll-input-border': string;
28
34
  '--clll-input-disabled-border': string;
@@ -39,10 +45,10 @@ export declare const inputTheme: ({ color, variant }: ThemeProps) => {
39
45
  '--clll-input-ghost-padding': string | undefined;
40
46
  '--clll-input-required-asterisk-color': string;
41
47
  };
42
- export declare const inputMessagesTheme: ({ color }: ThemeProps) => {
48
+ export declare const inputMessagesTheme: ({ color, theme }: ThemeProps) => {
43
49
  '--clll-input-message-color': string;
44
50
  };
45
- export declare const selectTheme: ({ color, variant }: ThemeProps) => {
51
+ export declare const selectTheme: ({ color, variant, theme }: ThemeProps) => {
46
52
  '--clll-select-bg': string;
47
53
  '--clll-select-border': string;
48
54
  '--clll-select-disabled-border': string;
@@ -57,4 +63,7 @@ export declare const selectTheme: ({ color, variant }: ThemeProps) => {
57
63
  '--clll-select-ghost-padding': string | undefined;
58
64
  '--clll-select-required-asterisk-color': string;
59
65
  };
66
+ export declare const calendarTheme: (theme?: ThemeContext) => {
67
+ '--clll-calendar-content-bg': string;
68
+ };
60
69
  export {};
@@ -1,3 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLBadge.css';
3
- import{defineComponent as t,computed as e,createElementBlock as a,openBlock as l,normalizeStyle as r,normalizeClass as o,unref as d,createElementVNode as s,toDisplayString as i}from"vue";import{CLColorVariants as n,CLColors as u}from"../../../index.js";import{b as c}from"../../../chunks/utils-CCWSWRuR.js";const m=["data-testid"],f=/* @__PURE__ */t({name:"CLBadge",__name:"CLBadge",props:{borderRadius:{},color:{default:u.Neutral},elevated:{type:Boolean,default:!1},label:{},limit:{},testId:{default:"clll-badge"},variant:{default:n.Soft}},setup(t){const n=t,u="clll-badge",f=e(()=>{const t=n.limit??0,e=n.label??"";return t&&e.toString().length>t?`${e.toString().slice(0,t)}+`:e}),p=e(()=>[u,n.borderRadius?`${u}--${n.borderRadius}`:"",n.elevated?`${u}--elevated`:"",`${u}--${n.color}--${n.variant}`]);return(e,n)=>(l(),a("div",{class:o(d(p)),"data-testid":t.testId,style:r(d(c)({color:t.color,variant:t.variant}))},[s("span",{class:o(`${u}__count`)},i(d(f)),3)],14,m))}});export{f as CLBadge,f as default};
3
+ import{defineComponent as t,computed as e,createElementBlock as a,openBlock as l,normalizeStyle as r,normalizeClass as o,unref as d,createElementVNode as s,toDisplayString as i}from"vue";import{CLColorVariants as n,CLColors as u}from"../../../index.js";import{b as c}from"../../../chunks/utils-DfgurNgA.js";const m=["data-testid"],f=/* @__PURE__ */t({name:"CLBadge",__name:"CLBadge",props:{borderRadius:{},color:{default:u.Neutral},elevated:{type:Boolean,default:!1},label:{},limit:{},testId:{default:"clll-badge"},variant:{default:n.Soft}},setup(t){const n=t,u="clll-badge",f=e(()=>{const t=n.limit??0,e=n.label??"";return t&&e.toString().length>t?`${e.toString().slice(0,t)}+`:e}),p=e(()=>[u,n.borderRadius?`${u}--${n.borderRadius}`:"",n.elevated?`${u}--elevated`:"",`${u}--${n.color}--${n.variant}`]);return(e,n)=>(l(),a("div",{class:o(d(p)),"data-testid":t.testId,style:r(d(c)({color:t.color,variant:t.variant}))},[s("span",{class:o(`${u}__count`)},i(d(f)),3)],14,m))}});export{f as CLBadge,f as default};