@codeandfunction/callaloo 4.9.4 → 4.9.6

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 (106) hide show
  1. package/dist/callaloo.global.js +1 -1
  2. package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-BHF3fJsf.js +2 -0
  3. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js +2 -0
  4. package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js +2 -0
  5. package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-BGKjh5vA.js +2 -0
  6. package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BYHbqaf0.js +2 -0
  7. package/dist/chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BPwFZq94.js +1 -0
  8. package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js +2 -0
  9. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-Cjt6fX90.js +2 -0
  10. package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DCByJ7MB.js +2 -0
  11. package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-C9_EwMBi.js +2 -0
  12. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js +2 -0
  13. package/dist/chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dqr8A_2Z.js +1 -0
  14. package/dist/chunks/CLPill.vue_vue_type_style_index_0_lang-DCtH-u0_.js +2 -0
  15. package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js +2 -0
  16. package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-DgZLt9T1.js +2 -0
  17. package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js +2 -0
  18. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-CtXJMlF9.js +2 -0
  19. package/dist/chunks/context-CRxE5KWX.js +1 -0
  20. package/dist/chunks/context-JmPivI9V.js +1 -0
  21. package/dist/chunks/floating-ui.vue-C0JWy0Dz.js +1 -0
  22. package/dist/chunks/helper-C542dSLs.js +1 -0
  23. package/dist/chunks/icons-6SVrmx7c.js +1 -0
  24. package/dist/chunks/utils-C1iUBPIL.js +1 -0
  25. package/dist/chunks/utils-CCWSWRuR.js +1 -0
  26. package/dist/chunks/utils-CYywa195.js +1 -0
  27. package/dist/chunks/utils-DVxwAjJ4.js +1 -0
  28. package/dist/chunks/utils-Dst7nzvj.js +1 -0
  29. package/dist/chunks/utils-MElq6rY3.js +1 -0
  30. package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -5
  31. package/dist/components/Buttons/CLButton/CLButton.js +1 -5
  32. package/dist/components/CLIcon/CLIcon.js +1 -5
  33. package/dist/components/CLTable/CLTable.js +1 -192
  34. package/dist/components/Containers/CLCard/CLCard.js +1 -5
  35. package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -544
  36. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -139
  37. package/dist/components/Containers/CLDrawer/CLDrawer.js +1 -119
  38. package/dist/components/Form/CLCalendar/CLCalendar.js +1 -5
  39. package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -150
  40. package/dist/components/Form/CLInput/CLInput.js +1 -450
  41. package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -178
  42. package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -135
  43. package/dist/components/Form/CLSelect/CLSelect.js +1 -140
  44. package/dist/components/Form/CLTextArea/CLTextArea.js +1 -149
  45. package/dist/components/Indicators/CLBadge/CLBadge.js +1 -40
  46. package/dist/components/Indicators/CLBanner/CLBanner.js +1 -145
  47. package/dist/components/Indicators/CLPill/CLPill.js +1 -5
  48. package/dist/components/Indicators/CLProgress/CLProgress.js +1 -64
  49. package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -5
  50. package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -5
  51. package/dist/components/Modals/CLModal/CLModal.js +1 -5
  52. package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -182
  53. package/dist/components/Navigation/CLLink/CLLink.js +1 -5
  54. package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -5
  55. package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -54
  56. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -150
  57. package/dist/components/Popups/CLToast/CLToast.js +1 -5
  58. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +1 -8
  59. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -7
  60. package/dist/components/Typography/CLHeading/CLHeading.js +1 -5
  61. package/dist/components/Typography/CLText/CLText.js +1 -5
  62. package/dist/composables/useDateInputMask.js +1 -38
  63. package/dist/composables/useDatePicker.js +1 -140
  64. package/dist/composables/useDropdown.js +1 -49
  65. package/dist/composables/useElementSize.js +1 -73
  66. package/dist/composables/useEsc.js +1 -19
  67. package/dist/composables/useHasSlotContent.js +1 -14
  68. package/dist/composables/useTheme.js +1 -40
  69. package/dist/composables/useToast.js +1 -17
  70. package/dist/index.js +1 -30
  71. package/package.json +20 -20
  72. package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-zGLnnSIW.js +0 -47
  73. package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js +0 -136
  74. package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-Bz1JdT1A.js +0 -163
  75. package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-Sre7UYZd.js +0 -263
  76. package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-CJ4VrvmR.js +0 -39
  77. package/dist/chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-CIQxM6aH.js +0 -46
  78. package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-DH5oJc1C.js +0 -52
  79. package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-Dhr2tI-g.js +0 -113
  80. package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DTWvAACK.js +0 -149
  81. package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-BXysZqLn.js +0 -69
  82. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js +0 -176
  83. package/dist/chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dhnmfa9W.js +0 -44
  84. package/dist/chunks/CLPill.vue_vue_type_style_index_0_lang-BQim03ge.js +0 -94
  85. package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-DduoX6Cu.js +0 -31
  86. package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-DlXqnsi8.js +0 -55
  87. package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js +0 -48
  88. package/dist/chunks/CLThemeProvider.vue_vue_type_script_setup_true_lang-jaJYKZL8.js +0 -59
  89. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-CzSDeL_X.js +0 -202
  90. package/dist/chunks/CLToastProvider.vue_vue_type_script_setup_true_lang-DkGK0H4Z.js +0 -35
  91. package/dist/chunks/context-CEvx70FY.js +0 -264
  92. package/dist/chunks/context-dkA4VoF7.js +0 -4
  93. package/dist/chunks/floating-ui.vue-Fx4CxKut.js +0 -1057
  94. package/dist/chunks/helper-qUkciePY.js +0 -81
  95. package/dist/chunks/icons-DllZKtC2.js +0 -4
  96. package/dist/chunks/magic-string.es-uPKorP4O.js +0 -663
  97. package/dist/chunks/utils-BfOa9ckr.js +0 -24
  98. package/dist/chunks/utils-BjZURPWx.js +0 -51
  99. package/dist/chunks/utils-C1xiySYN.js +0 -41
  100. package/dist/chunks/utils-D00IXMTR.js +0 -25
  101. package/dist/chunks/utils-eBt2zUZl.js +0 -17
  102. package/dist/chunks/utils-nD3K7jh9.js +0 -85
  103. package/dist/chunks/vue-test-utils.esm-bundler-BeQTU4qG.js +0 -18679
  104. package/dist/composables/useDatePicker.spec.js +0 -232
  105. package/dist/composables/useTheme.spec.js +0 -88
  106. package/dist/composables/useToast.spec.js +0 -45
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLPill.css';
3
- import { _ as s } from "../../../chunks/CLPill.vue_vue_type_style_index_0_lang-BQim03ge.js";
4
- export {
5
- s as CLPill,
6
- s as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLPill.vue_vue_type_style_index_0_lang-DCtH-u0_.js";export{e as CLPill,e as default};
@@ -1,66 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLProgress.css';
3
- import { defineComponent as f, mergeModels as p, useModel as _, computed as d, createElementBlock as n, openBlock as c, normalizeStyle as y, normalizeClass as s, unref as t, createCommentVNode as $, createElementVNode as l, createVNode as g, withCtx as C, createTextVNode as v, toDisplayString as V } from "vue";
4
- import { _ as x } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
5
- import { CLTextTypes as L, CLColors as u, CLSizes as N } from "../../../index.js";
6
- import { c as z } from "../../../chunks/utils-nD3K7jh9.js";
7
- const B = ["data-testid"], k = /* @__PURE__ */ f({
8
- name: "CLProgress",
9
- __name: "CLProgress",
10
- props: /* @__PURE__ */ p({
11
- color: { default: u.Primary },
12
- inverted: { type: Boolean, default: !1 },
13
- rounded: { type: Boolean, default: !0 },
14
- size: { default: N.Medium },
15
- status: { type: Boolean, default: !1 },
16
- testId: { default: "clll-progress" }
17
- }, {
18
- modelValue: { type: Number, default: 0 },
19
- modelModifiers: {}
20
- }),
21
- emits: ["update:modelValue"],
22
- setup(o) {
23
- const r = o, a = _(o, "modelValue"), e = "clll-progress", i = d(() => [
24
- e,
25
- `${e}--${r.color}`,
26
- `${e}--${r.size}`,
27
- r.inverted ? `${e}--inverted` : "",
28
- r.rounded ? `${e}--rounded` : `${e}--not-rounded`
29
- ]), m = d(() => `${a.value}%`);
30
- return (P, b) => (c(), n("div", {
31
- class: s(t(i)),
32
- "data-testid": o.testId,
33
- style: y({ ...t(z)({ color: o.color }), "--clll-progress-value": a.value })
34
- }, [
35
- o.status ? (c(), n("div", {
36
- key: 0,
37
- class: s(`${e}__status__container`)
38
- }, [
39
- l("div", {
40
- class: s(`${e}__status__label`)
41
- }, [
42
- g(t(x), {
43
- color: t(u).Neutral,
44
- type: t(L).Summary
45
- }, {
46
- default: C(() => [
47
- v(V(t(m)), 1)
48
- ]),
49
- _: 1
50
- }, 8, ["color", "type"])
51
- ], 2)
52
- ], 2)) : $("", !0),
53
- l("div", {
54
- class: s(`${e}__bar-container`)
55
- }, [
56
- l("div", {
57
- class: s(`${e}__bar`)
58
- }, null, 2)
59
- ], 2)
60
- ], 14, B));
61
- }
62
- });
63
- export {
64
- k as CLProgress,
65
- k as default
66
- };
3
+ import{defineComponent as e,mergeModels as t,useModel as s,computed as l,createElementBlock as o,openBlock as a,normalizeStyle as r,normalizeClass as d,unref as u,createCommentVNode as i,createElementVNode as n,createVNode as _,withCtx as c,createTextVNode as m,toDisplayString as p}from"vue";import{_ as f}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLTextTypes as v,CLColors as y,CLSizes as $}from"../../../index.js";import{c as g}from"../../../chunks/utils-CCWSWRuR.js";const b=["data-testid"],x=/* @__PURE__ */e({name:"CLProgress",__name:"CLProgress",props:/* @__PURE__ */t({color:{default:y.Primary},inverted:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:$.Medium},status:{type:Boolean,default:!1},testId:{default:"clll-progress"}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,$=s(e,"modelValue"),x="clll-progress",C=l(()=>[x,`${x}--${t.color}`,`${x}--${t.size}`,t.inverted?`${x}--inverted`:"",t.rounded?`${x}--rounded`:`${x}--not-rounded`]),L=l(()=>`${$.value}%`);return(t,s)=>(a(),o("div",{class:d(u(C)),"data-testid":e.testId,style:r({...u(g)({color:e.color}),"--clll-progress-value":$.value})},[e.status?(a(),o("div",{key:0,class:d(`${x}__status__container`)},[n("div",{class:d(`${x}__status__label`)},[_(u(f),{color:u(y).Neutral,type:u(v).Summary},{default:c(()=>[m(p(u(L)),1)]),_:1},8,["color","type"])],2)],2)):i("",!0),n("div",{class:d(`${x}__bar-container`)},[n("div",{class:d(`${x}__bar`)},null,2)],2)],14,b))}});export{x as CLProgress,x as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLSkeleton.css';
3
- import { _ as e } from "../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-DduoX6Cu.js";
4
- export {
5
- e as CLSkeleton,
6
- e as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-BmjT9fQ_.js";export{e as CLSkeleton,e as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLSpinner.css';
3
- import { _ as r } from "../../../chunks/CLSpinner.vue_vue_type_style_index_0_lang-DlXqnsi8.js";
4
- export {
5
- r as CLSpinner,
6
- r as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLSpinner.vue_vue_type_style_index_0_lang-DgZLt9T1.js";export{e as CLSpinner,e as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLModal.css';
3
- import { _ as o } from "../../../chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js";
4
- export {
5
- o as CLModal,
6
- o as default
7
- };
3
+ import{_ as a}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js";export{a as CLModal,a as default};
@@ -1,184 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLModalDatePicker.css';
3
- import { defineComponent as N, mergeModels as P, ref as $, computed as u, useModel as I, onBeforeUnmount as W, createElementBlock as A, openBlock as T, normalizeClass as X, unref as e, createVNode as s, withCtx as c, createTextVNode as v, toDisplayString as G, createElementVNode as B, nextTick as O } from "vue";
4
- import { _ as y } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
5
- import { _ as U } from "../../../chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js";
6
- import { _ as j } from "../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-Bz1JdT1A.js";
7
- import { CLSizes as n, CLIconSizes as i, CLIconNames as q, CLBorderRadius as p, CLColorVariants as g, CLColors as L } from "../../../index.js";
8
- import { i as w } from "../../../chunks/helper-qUkciePY.js";
9
- import { useDatePicker as H } from "../../../composables/useDatePicker.js";
10
- const J = ["data-testid"], ae = /* @__PURE__ */ N({
11
- name: "CLModalDatePicker",
12
- __name: "CLModalDatePicker",
13
- props: /* @__PURE__ */ P({
14
- buttonAriaLabel: { default: void 0 },
15
- buttonBorderRadius: { default: void 0 },
16
- buttonColor: { default: L.Primary },
17
- buttonLabel: { default: "Select dates" },
18
- buttonSize: { default: n.Small },
19
- buttonVariant: { default: g.Soft },
20
- buttonWidth: { default: "auto" },
21
- buttonWrapped: { type: Boolean, default: !1 },
22
- busy: { type: Boolean, default: !1 },
23
- disabled: { type: Boolean, default: !1 },
24
- fluid: { type: Boolean, default: !1 },
25
- id: {},
26
- isRange: { type: Boolean, default: !0 },
27
- onBlur: { type: Function, default: void 0 },
28
- onChange: { type: Function, default: void 0 },
29
- onFocus: { type: Function, default: void 0 },
30
- rounded: { type: Boolean, default: !1 },
31
- testId: { default: "clll-date-picker-modal" },
32
- title: { default: "Select dates" }
33
- }, {
34
- modelValue: {
35
- default: () => ({ end: null, start: null })
36
- },
37
- modelModifiers: {}
38
- }),
39
- emits: ["update:modelValue"],
40
- setup(t) {
41
- const a = t, l = "clll-date-picker-modal", f = $(!1), z = u(() => `date-picker-modal-${a.id}`), d = $(), b = I(t, "modelValue"), { rangeLabel: M } = H({
42
- appliedStart: u(() => b.value?.start ?? null),
43
- appliedEnd: u(() => b.value?.end ?? null),
44
- isRange: a.isRange
45
- }), S = $(!1), m = () => {
46
- w && (S.value = window.innerWidth < 480);
47
- }, R = () => {
48
- if (a.disabled || a.busy) return;
49
- m(), f.value = !0, O(() => {
50
- d.value?.initializeDraft();
51
- });
52
- const r = new FocusEvent("focus", { bubbles: !0, cancelable: !0 });
53
- a.onFocus?.(r);
54
- }, k = () => {
55
- f.value = !1, d.value?.cancel();
56
- const r = new FocusEvent("blur", { bubbles: !0, cancelable: !0 });
57
- a.onBlur?.(r);
58
- }, V = () => {
59
- d.value?.apply(), f.value = !1, a.onChange?.();
60
- }, E = () => {
61
- d.value?.reset(), a.onChange?.();
62
- }, C = u(() => S.value);
63
- w && (m(), window.addEventListener("resize", m), W(() => {
64
- window.removeEventListener("resize", m);
65
- }));
66
- const x = {
67
- [n.Tiny]: i.Tiny,
68
- [n.Small]: i.Small,
69
- [n.Medium]: i.Medium,
70
- [n.Large]: i.Large,
71
- [n.XL]: i.XL,
72
- [n.XXL]: i.XXL,
73
- [n.XXXL]: i.XXXL,
74
- [n.XXXXL]: i.XXXXL
75
- }, h = u(() => [
76
- l,
77
- a.buttonBorderRadius ? `${l}--${a.buttonBorderRadius}` : "",
78
- a.busy ? `${l}--busy` : `${l}--ready`,
79
- `${l}--${a.buttonColor}`,
80
- `${l}--${a.buttonSize}`,
81
- `${l}--${a.buttonVariant}`,
82
- a.disabled || a.busy ? `${l}--disabled` : `${l}--active`,
83
- a.fluid ? `${l}--fluid` : `${l}--fixed`,
84
- a.rounded ? `${l}--rounded` : `${l}--box`
85
- ]), F = u(() => {
86
- const r = d.value?.draftStart, o = d.value?.draftEnd;
87
- return a.isRange ? !!r && !!o : !!r;
88
- });
89
- return (r, o) => (T(), A("div", {
90
- class: X(e(h)),
91
- "data-testid": t.testId
92
- }, [
93
- s(e(y), {
94
- "aria-label": t.buttonAriaLabel || "Open date picker",
95
- "border-radius": t.buttonBorderRadius,
96
- busy: t.busy,
97
- color: t.buttonColor,
98
- disabled: t.disabled || t.busy,
99
- "icon-before": e(q).Calendar,
100
- "icon-size": x[t.buttonSize],
101
- "on-click": R,
102
- rounded: t.rounded,
103
- "test-id": `${t.testId}__trigger`,
104
- size: t.buttonSize,
105
- variant: t.buttonVariant,
106
- width: t.buttonWidth,
107
- wrap: t.buttonWrapped
108
- }, {
109
- default: c(() => [
110
- v(G(e(M) || t.buttonLabel), 1)
111
- ]),
112
- _: 1
113
- }, 8, ["aria-label", "border-radius", "busy", "color", "disabled", "icon-before", "icon-size", "rounded", "test-id", "size", "variant", "width", "wrap"]),
114
- s(e(U), {
115
- "border-radius": e(C) ? e(p).None : e(p).Medium,
116
- fullscreen: e(C),
117
- "is-open": e(f),
118
- "max-width": "336px",
119
- "modal-id": e(z),
120
- "on-close": k,
121
- title: t.title
122
- }, {
123
- body: c(() => [
124
- s(e(j), {
125
- ref_key: "calendarRef",
126
- ref: d,
127
- modelValue: b.value,
128
- "onUpdate:modelValue": o[0] || (o[0] = (D) => b.value = D),
129
- busy: t.busy,
130
- disabled: t.disabled,
131
- fluid: e(C),
132
- "is-range": t.isRange
133
- }, null, 8, ["modelValue", "busy", "disabled", "fluid", "is-range"])
134
- ]),
135
- footer: c(() => [
136
- B("div", {
137
- class: X(`${l}__footer-actions`)
138
- }, [
139
- s(e(y), {
140
- color: e(L).Neutral,
141
- "on-click": k,
142
- variant: e(g).Ghost
143
- }, {
144
- default: c(() => [...o[1] || (o[1] = [
145
- v(" Cancel ", -1)
146
- ])]),
147
- _: 1
148
- }, 8, ["color", "variant"]),
149
- B("div", {
150
- class: X(`${l}__footer-right`)
151
- }, [
152
- s(e(y), {
153
- color: e(L).Neutral,
154
- disabled: !e(d)?.draftStart && !e(d)?.draftEnd,
155
- "on-click": E,
156
- variant: e(g).Ghost
157
- }, {
158
- default: c(() => [...o[2] || (o[2] = [
159
- v(" Reset ", -1)
160
- ])]),
161
- _: 1
162
- }, 8, ["color", "disabled", "variant"]),
163
- s(e(y), {
164
- color: e(L).Primary,
165
- disabled: !e(F),
166
- "on-click": V
167
- }, {
168
- default: c(() => [...o[3] || (o[3] = [
169
- v(" Apply ", -1)
170
- ])]),
171
- _: 1
172
- }, 8, ["color", "disabled"])
173
- ], 2)
174
- ], 2)
175
- ]),
176
- _: 1
177
- }, 8, ["border-radius", "fullscreen", "is-open", "modal-id", "title"])
178
- ], 10, J));
179
- }
180
- });
181
- export {
182
- ae as CLModalDatePicker,
183
- ae as default
184
- };
3
+ import{defineComponent as e,mergeModels as a,ref as t,computed as l,useModel as d,onMounted as o,onBeforeUnmount as i,createElementBlock as u,openBlock as n,normalizeClass as r,unref as s,createVNode as b,withCtx as c,createTextVNode as f,toDisplayString as p,createElementVNode as v,nextTick as m}from"vue";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_}from"../../../chunks/CLModal.vue_vue_type_style_index_0_lang-DroQPRWC.js";import{_ as L}from"../../../chunks/CLCalendar.vue_vue_type_style_index_0_lang-BqrGuMVB.js";import{CLSizes as X,CLIconSizes as $,CLIconNames as g,CLBorderRadius as k,CLColorVariants as h,CLColors as C}from"../../../index.js";import{i as w}from"../../../chunks/helper-C542dSLs.js";import{useDatePicker as B}from"../../../composables/useDatePicker.js";const S=["data-testid"],z=/* @__PURE__ */e({name:"CLModalDatePicker",__name:"CLModalDatePicker",props:/* @__PURE__ */a({buttonAriaLabel:{default:void 0},buttonBorderRadius:{default:void 0},buttonColor:{default:C.Primary},buttonLabel:{default:"Select dates"},buttonSize:{default:X.Small},buttonVariant:{default:h.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},id:{},isRange:{type:Boolean,default:!0},onBlur:{type:Function,default:void 0},onChange:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},rounded:{type:Boolean,default:!1},testId:{default:"clll-date-picker-modal"},title:{default:"Select dates"}},{modelValue:{default:()=>({end:null,start:null})},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=e,z="clll-date-picker-modal",R=t(!1),x=l(()=>`date-picker-modal-${a.id}`),V=t(),M=d(e,"modelValue"),{rangeLabel:E}=B({appliedStart:l(()=>M.value?.start??null),appliedEnd:l(()=>M.value?.end??null),isRange:a.isRange}),F=t(!1),j=()=>{w&&(F.value=window.innerWidth<480)},P=()=>{if(a.disabled||a.busy)return;j(),R.value=!0,m(()=>{V.value?.initializeDraft()});const e=new FocusEvent("focus",{bubbles:!0,cancelable:!0});a.onFocus?.(e)},D=()=>{R.value=!1,V.value?.cancel();const e=new FocusEvent("blur",{bubbles:!0,cancelable:!0});a.onBlur?.(e)},W=()=>{V.value?.apply(),R.value=!1,a.onChange?.()},A=()=>{V.value?.reset(),a.onChange?.()},I=l(()=>F.value);o(()=>{w&&(j(),window.addEventListener("resize",j))}),i(()=>{w&&window.removeEventListener("resize",j)});const N={[X.Tiny]:$.Tiny,[X.Small]:$.Small,[X.Medium]:$.Medium,[X.Large]:$.Large,[X.XL]:$.XL,[X.XXL]:$.XXL,[X.XXXL]:$.XXXL,[X.XXXXL]:$.XXXXL},G=l(()=>[z,a.buttonBorderRadius?`${z}--${a.buttonBorderRadius}`:"",a.busy?`${z}--busy`:`${z}--ready`,`${z}--${a.buttonColor}`,`${z}--${a.buttonSize}`,`${z}--${a.buttonVariant}`,a.disabled||a.busy?`${z}--disabled`:`${z}--active`,a.fluid?`${z}--fluid`:`${z}--fixed`,a.rounded?`${z}--rounded`:`${z}--box`]),T=l(()=>{const e=V.value?.draftStart,t=V.value?.draftEnd;return a.isRange?!!e&&!!t:!!e});return(a,t)=>(n(),u("div",{class:r(s(G)),"data-testid":e.testId},[b(s(y),{"aria-label":e.buttonAriaLabel||"Open date picker","border-radius":e.buttonBorderRadius,busy:e.busy,color:e.buttonColor,disabled:e.disabled||e.busy,"icon-before":s(g).Calendar,"icon-size":N[e.buttonSize],"on-click":P,rounded:e.rounded,"test-id":`${e.testId}__trigger`,size:e.buttonSize,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped},{default:c(()=>[f(p(s(E)||e.buttonLabel),1)]),_:1},8,["aria-label","border-radius","busy","color","disabled","icon-before","icon-size","rounded","test-id","size","variant","width","wrap"]),b(s(_),{"border-radius":s(I)?s(k).None:s(k).Medium,fullscreen:s(I),"is-open":s(R),"max-width":"336px","modal-id":s(x),"on-close":D,title:e.title},{body:c(()=>[b(s(L),{ref_key:"calendarRef",ref:V,modelValue:M.value,"onUpdate:modelValue":t[0]||(t[0]=e=>M.value=e),busy:e.busy,disabled:e.disabled,fluid:s(I),"is-range":e.isRange},null,8,["modelValue","busy","disabled","fluid","is-range"])]),footer:c(()=>[v("div",{class:r(`${z}__footer-actions`)},[b(s(y),{color:s(C).Neutral,"on-click":D,variant:s(h).Ghost},{default:c(()=>[...t[1]||(t[1]=[f(" Cancel ",-1)])]),_:1},8,["color","variant"]),v("div",{class:r(`${z}__footer-right`)},[b(s(y),{color:s(C).Neutral,disabled:!s(V)?.draftStart&&!s(V)?.draftEnd,"on-click":A,variant:s(h).Ghost},{default:c(()=>[...t[2]||(t[2]=[f(" Reset ",-1)])]),_:1},8,["color","disabled","variant"]),b(s(y),{color:s(C).Primary,disabled:!s(T),"on-click":W},{default:c(()=>[...t[3]||(t[3]=[f(" Apply ",-1)])]),_:1},8,["color","disabled"])],2)],2)]),_:1},8,["border-radius","fullscreen","is-open","modal-id","title"])],10,S))}});export{z as CLModalDatePicker,z as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLLink.css';
3
- import { _ as s } from "../../../chunks/CLLink.vue_vue_type_style_index_0_lang-BXysZqLn.js";
4
- export {
5
- s as CLLink,
6
- s as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLLink.vue_vue_type_style_index_0_lang-C9_EwMBi.js";export{e as CLLink,e as default};
@@ -1,6 +1,2 @@
1
1
  import '../../../assets/core.css';
2
- import { _ as s } from "../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dhnmfa9W.js";
3
- export {
4
- s as CLNavLink,
5
- s as default
6
- };
2
+ import{_ as a}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dqr8A_2Z.js";export{a as CLNavLink,a as default};
@@ -1,56 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLNavSection.css';
3
- import { defineComponent as f, computed as u, createElementBlock as a, openBlock as l, normalizeClass as m, unref as r, Fragment as p, renderList as _, createVNode as i, withCtx as n, createTextVNode as C, toDisplayString as x } from "vue";
4
- import { _ as k } from "../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dhnmfa9W.js";
5
- import { _ as L } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
6
- import { CLOrientation as h, CLColors as $ } from "../../../index.js";
7
- const g = ["data-testid"], V = /* @__PURE__ */ f({
8
- name: "CLNavSection",
9
- __name: "CLNavSection",
10
- props: {
11
- color: { default: $.Primary },
12
- navItems: {},
13
- testId: { default: "clll-nav-section" },
14
- type: { default: h.Horizontal }
15
- },
16
- setup(t) {
17
- const c = t, o = "clll-nav-section", s = u(() => [
18
- o,
19
- `${o}--${c.type}`
20
- ]);
21
- return (y, N) => (l(), a("ul", {
22
- class: m(r(s)),
23
- "data-testid": t.testId
24
- }, [
25
- (l(!0), a(p, null, _(t.navItems, (e, d) => (l(), a("li", {
26
- key: `link-${e.id}-${d}`,
27
- class: "clll-nav-section__item"
28
- }, [
29
- i(r(k), {
30
- id: e.id,
31
- "aria-label": e.ariaLabel,
32
- color: t.color,
33
- external: e.external,
34
- href: e.href,
35
- rel: e.rel,
36
- target: e.target,
37
- "on-click": e.onClick
38
- }, {
39
- default: n(() => [
40
- i(r(L), { as: "span" }, {
41
- default: n(() => [
42
- C(x(e.label), 1)
43
- ]),
44
- _: 2
45
- }, 1024)
46
- ]),
47
- _: 2
48
- }, 1032, ["id", "aria-label", "color", "external", "href", "rel", "target", "on-click"])
49
- ]))), 128))
50
- ], 10, g));
51
- }
52
- });
53
- export {
54
- V as CLNavSection,
55
- V as default
56
- };
3
+ import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeClass as r,unref as n,Fragment as i,renderList as o,createVNode as s,withCtx as c,createTextVNode as _,toDisplayString as u}from"vue";import{_ as d}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Dqr8A_2Z.js";import{_ as p}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";import{CLOrientation as f,CLColors as m}from"../../../index.js";const v=["data-testid"],k=/* @__PURE__ */e({name:"CLNavSection",__name:"CLNavSection",props:{color:{default:m.Primary},navItems:{},testId:{default:"clll-nav-section"},type:{default:f.Horizontal}},setup(e){const f=e,m="clll-nav-section",k=t(()=>[m,`${m}--${f.type}`]);return(t,f)=>(l(),a("ul",{class:r(n(k)),"data-testid":e.testId},[(l(!0),a(i,null,o(e.navItems,(t,r)=>(l(),a("li",{key:`link-${t.id}-${r}`,class:"clll-nav-section__item"},[s(n(d),{id:t.id,"aria-label":t.ariaLabel,color:e.color,external:t.external,href:t.href,rel:t.rel,target:t.target,"on-click":t.onClick},{default:c(()=>[s(n(p),{as:"span"},{default:c(()=>[_(u(t.label),1)]),_:2},1024)]),_:2},1032,["id","aria-label","color","external","href","rel","target","on-click"])]))),128))],10,v))}});export{k as CLNavSection,k as default};
@@ -1,152 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLDropdownMenu.css';
3
- import { defineComponent as V, ref as d, computed as W, onBeforeUnmount as N, createElementBlock as h, openBlock as v, normalizeClass as m, createVNode as C, createCommentVNode as A, unref as o, withCtx as y, createTextVNode as M, toDisplayString as F, normalizeStyle as T, renderSlot as U } from "vue";
4
- import { u as G, a as P, f as Z, o as j, s as q } from "../../../chunks/floating-ui.vue-Fx4CxKut.js";
5
- import { _ as J } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
6
- import { _ as K } from "../../../chunks/CLCard.vue_vue_type_style_index_0_lang-Sre7UYZd.js";
7
- import { c as Q, i as b } from "../../../chunks/helper-qUkciePY.js";
8
- import { useDropdown as X } from "../../../composables/useDropdown.js";
9
- import { useEsc as Y } from "../../../composables/useEsc.js";
10
- import { CLPlacement as _, CLIconSizes as ee, CLIconNames as te, CLColorVariants as B, CLSizes as oe, CLColors as z } from "../../../index.js";
11
- const ne = ["data-testid"], ae = ["id", "aria-labelledby", "aria-hidden"], ge = /* @__PURE__ */ V({
12
- name: "CLDropdownMenu",
13
- __name: "CLDropdownMenu",
14
- props: {
15
- buttonAriaLabel: {},
16
- buttonBorderRadius: {},
17
- buttonBusy: { type: Boolean },
18
- buttonColor: { default: z.Secondary },
19
- buttonDisabled: { type: Boolean },
20
- buttonHeight: { default: "auto" },
21
- buttonSize: { default: oe.Small },
22
- buttonVariant: { default: B.Soft },
23
- buttonWidth: { default: "auto" },
24
- buttonWrapped: { type: Boolean },
25
- containerBordered: { type: Boolean, default: !0 },
26
- containerBorderRadius: {},
27
- containerElevated: { type: Boolean, default: !1 },
28
- contentWidth: { default: "auto" },
29
- dropdownId: {},
30
- iconAfter: { default: te.ChevronDown },
31
- iconBefore: {},
32
- iconSize: { default: ee.Tiny },
33
- isOpen: { type: Boolean, default: !1 },
34
- label: {},
35
- onCloseHandler: {},
36
- onOpenHandler: {},
37
- placement: { default: _.BottomStart },
38
- testId: { default: "clll-dropdown-menu" },
39
- zIndex: { default: 30 }
40
- },
41
- setup(e, { expose: D }) {
42
- const n = e;
43
- let s = d(), E = d();
44
- const w = d(), i = d(), r = d(n.isOpen), g = d(n.placement), t = "clll-dropdown-menu", $ = W(() => n.zIndex === "auto" || Q(n.zIndex) ? n.zIndex : n.zIndex.toString()), I = (a) => {
45
- a && (s.value = a);
46
- }, L = () => {
47
- r.value = !0, n?.onOpenHandler?.(), R(), b && document.addEventListener("click", u);
48
- }, S = (a) => {
49
- a && (E.value = a);
50
- }, x = () => {
51
- r.value = !1, n?.onCloseHandler?.(), b && document.removeEventListener("click", u), f(), c();
52
- }, H = () => {
53
- k.value ? l() : p();
54
- }, {
55
- open: k,
56
- openDropdown: p,
57
- closeDropdown: l,
58
- clearEventListeners: c
59
- } = X({
60
- triggerElem: s,
61
- dropdownRef: i,
62
- openDropdownHandler: L,
63
- closeDropdownHandler: x
64
- });
65
- D({
66
- close: () => {
67
- l(), c(), f();
68
- },
69
- open: () => {
70
- p();
71
- }
72
- });
73
- const { floatingStyles: O, update: R } = G(w, i, {
74
- middleware: [Z(), j(10), q()],
75
- placement: g,
76
- open: r,
77
- whileElementsMounted: P
78
- }), u = (a) => {
79
- r.value && i.value?.contains(a?.target) && l();
80
- }, { clearEventListeners: f } = Y({ escHandler: l, triggerElem: s });
81
- return N(() => {
82
- b && document.removeEventListener("click", u), f(), c();
83
- }), (a, ie) => (v(), h("div", {
84
- class: m([`${t}__menu`]),
85
- "data-testid": e.testId
86
- }, [
87
- C(o(J), {
88
- id: `${t}__toggle--${e.dropdownId}`,
89
- ref_key: "anchor",
90
- ref: w,
91
- "aria-controls": `${t}--${e.dropdownId}`,
92
- "aria-expanded": o(r) || e.isOpen,
93
- "aria-label": e.buttonAriaLabel,
94
- busy: e.buttonBusy,
95
- disabled: e.buttonDisabled || e.buttonBusy,
96
- class: m(`${t}__toggle`),
97
- color: e.buttonColor,
98
- "border-radius": e.buttonBorderRadius,
99
- "forward-ref": I,
100
- height: e.buttonHeight,
101
- "icon-after": e.iconAfter,
102
- "icon-before": e.iconBefore,
103
- "icon-size": e.iconSize,
104
- size: e.buttonSize,
105
- "test-id": `${t}__toggle`,
106
- variant: e.buttonVariant,
107
- width: e.buttonWidth,
108
- wrap: e.buttonWrapped,
109
- "on-click": H
110
- }, {
111
- default: y(() => [
112
- M(F(e.label), 1)
113
- ]),
114
- _: 1
115
- }, 8, ["id", "aria-controls", "aria-expanded", "aria-label", "busy", "disabled", "class", "color", "border-radius", "height", "icon-after", "icon-before", "icon-size", "size", "test-id", "variant", "width", "wrap"]),
116
- o(r) || e.isOpen ? (v(), h("div", {
117
- key: 0,
118
- id: `${t}--${e.dropdownId}`,
119
- ref_key: "dropdownElem",
120
- ref: i,
121
- "aria-labelledby": `${t}__toggle--${e.dropdownId}`,
122
- "aria-hidden": !(o(r) || e.isOpen),
123
- class: m([
124
- `${t}__dropdown`,
125
- `${t}__dropdown--${o(g)}`
126
- ]),
127
- style: T({ ...o(O), zIndex: o($) })
128
- }, [
129
- C(o(K), {
130
- bordered: e.containerBordered,
131
- "border-radius": e.containerBorderRadius,
132
- color: o(z).Neutral,
133
- elevated: e.containerElevated,
134
- "forward-ref": S,
135
- padded: !1,
136
- "test-id": `${t}__content`,
137
- variant: o(B).Ghost,
138
- width: e.contentWidth
139
- }, {
140
- default: y(() => [
141
- U(a.$slots, "content")
142
- ]),
143
- _: 3
144
- }, 8, ["bordered", "border-radius", "color", "elevated", "test-id", "variant", "width"])
145
- ], 14, ae)) : A("", !0)
146
- ], 10, ne));
147
- }
148
- });
149
- export {
150
- ge as CLDropdownMenu,
151
- ge as default
152
- };
3
+ import{defineComponent as e,ref as o,computed as t,onBeforeUnmount as n,createElementBlock as a,openBlock as d,normalizeClass as r,createVNode as l,createCommentVNode as i,unref as s,withCtx as u,createTextVNode as c,toDisplayString as p,normalizeStyle as b,renderSlot as f}from"vue";import{u as m,a as _,f as v,o as w,s as h}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as y}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-hEXnJ7H1.js";import{_ as g}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BGKjh5vA.js";import{c as B,i as $}from"../../../chunks/helper-C542dSLs.js";import{useDropdown as z}from"../../../composables/useDropdown.js";import{useEsc as x}from"../../../composables/useEsc.js";import{CLPlacement as I,CLIconSizes as k,CLIconNames as E,CLColorVariants as L,CLSizes as C,CLColors as D}from"../../../index.js";const S=["data-testid"],H=["id","aria-labelledby","aria-hidden"],j=/* @__PURE__ */e({name:"CLDropdownMenu",__name:"CLDropdownMenu",props:{buttonAriaLabel:{},buttonBorderRadius:{},buttonBusy:{type:Boolean},buttonColor:{default:D.Secondary},buttonDisabled:{type:Boolean},buttonHeight:{default:"auto"},buttonSize:{default:C.Small},buttonVariant:{default:L.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean},containerBordered:{type:Boolean,default:!0},containerBorderRadius:{},containerElevated:{type:Boolean,default:!1},contentWidth:{default:"auto"},dropdownId:{},iconAfter:{default:E.ChevronDown},iconBefore:{},iconSize:{default:k.Tiny},isOpen:{type:Boolean,default:!1},label:{},onCloseHandler:{},onOpenHandler:{},placement:{default:I.BottomStart},testId:{default:"clll-dropdown-menu"},zIndex:{default:30}},setup(e,{expose:I}){const k=e;let E=o(),C=o();const j=o(),O=o(),W=o(k.isOpen),R=o(k.placement),A="clll-dropdown-menu",M=t(()=>"auto"===k.zIndex||B(k.zIndex)?k.zIndex:k.zIndex.toString()),V=e=>{e&&(E.value=e)},G=e=>{e&&(C.value=e)},N=()=>{T.value?F():q()},{open:T,openDropdown:q,closeDropdown:F,clearEventListeners:J}=z({triggerElem:E,dropdownRef:O,openDropdownHandler:()=>{W.value=!0,k?.onOpenHandler?.(),P(),$&&document.addEventListener("click",Q)},closeDropdownHandler:()=>{W.value=!1,k?.onCloseHandler?.(),$&&document.removeEventListener("click",Q),U(),J()}});I({close:()=>{F(),J(),U()},open:()=>{q()}});const{floatingStyles:K,update:P}=m(j,O,{middleware:[v(),w(10),h()],placement:R,open:W,whileElementsMounted:_}),Q=e=>{W.value&&O.value?.contains(e?.target)&&F()},{clearEventListeners:U}=x({escHandler:F,triggerElem:E});return n(()=>{$&&document.removeEventListener("click",Q),U(),J()}),(o,t)=>(d(),a("div",{class:r([`${A}__menu`]),"data-testid":e.testId},[l(s(y),{id:`${A}__toggle--${e.dropdownId}`,ref_key:"anchor",ref:j,"aria-controls":`${A}--${e.dropdownId}`,"aria-expanded":s(W)||e.isOpen,"aria-label":e.buttonAriaLabel,busy:e.buttonBusy,disabled:e.buttonDisabled||e.buttonBusy,class:r(`${A}__toggle`),color:e.buttonColor,"border-radius":e.buttonBorderRadius,"forward-ref":V,height:e.buttonHeight,"icon-after":e.iconAfter,"icon-before":e.iconBefore,"icon-size":e.iconSize,size:e.buttonSize,"test-id":`${A}__toggle`,variant:e.buttonVariant,width:e.buttonWidth,wrap:e.buttonWrapped,"on-click":N},{default:u(()=>[c(p(e.label),1)]),_:1},8,["id","aria-controls","aria-expanded","aria-label","busy","disabled","class","color","border-radius","height","icon-after","icon-before","icon-size","size","test-id","variant","width","wrap"]),s(W)||e.isOpen?(d(),a("div",{key:0,id:`${A}--${e.dropdownId}`,ref_key:"dropdownElem",ref:O,"aria-labelledby":`${A}__toggle--${e.dropdownId}`,"aria-hidden":!(s(W)||e.isOpen),class:r([`${A}__dropdown`,`${A}__dropdown--${s(R)}`]),style:b({...s(K),zIndex:s(M)})},[l(s(g),{bordered:e.containerBordered,"border-radius":e.containerBorderRadius,color:s(D).Neutral,elevated:e.containerElevated,"forward-ref":G,padded:!1,"test-id":`${A}__content`,variant:s(L).Ghost,width:e.contentWidth},{default:u(()=>[f(o.$slots,"content")]),_:3},8,["bordered","border-radius","color","elevated","test-id","variant","width"])],14,H)):i("",!0)],10,S))}});export{j as CLDropdownMenu,j as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLToast.css';
3
- import { _ as s } from "../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CzSDeL_X.js";
4
- export {
5
- s as CLToast,
6
- s as default
7
- };
3
+ import{_ as s}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CtXJMlF9.js";export{s as CLToast,s as default};
@@ -1,9 +1,2 @@
1
1
  import '../../../assets/core.css';
2
- import { _ as a } from "../../../chunks/CLThemeProvider.vue_vue_type_script_setup_true_lang-jaJYKZL8.js";
3
- import { D as m, T as s } from "../../../chunks/context-CEvx70FY.js";
4
- export {
5
- a as CLThemeProvider,
6
- m as DEFAULT_THEME,
7
- s as ThemeInjectionKey,
8
- a as default
9
- };
2
+ import{defineComponent as e,provide as t,onMounted as o,onBeforeUnmount as a,watch as r,createBlock as s,openBlock as l,resolveDynamicComponent as i,normalizeStyle as d,unref as n,withCtx as m,renderSlot as f}from"vue";import{s as c,T as u,D as h}from"../../../chunks/context-CRxE5KWX.js";import{i as g,b as C}from"../../../chunks/helper-C542dSLs.js";const p=/* @__PURE__ */e({__name:"CLThemeProvider",props:{tag:{default:"div"},themeConfig:{},autoDetectDarkMode:{type:Boolean,default:!0}},setup(e){const p=e,v=c(p.themeConfig);t(u,v);const{setBorderRadius:k,setColors:D,setDarkMode:y,setFontFamily:M}=v;let F=null;const b=()=>{if(p.autoDetectDarkMode&&g){const e=C();y(e)}};return o(()=>{p.autoDetectDarkMode&&g&&(b(),F=window.matchMedia("(prefers-color-scheme: dark)"),F.addEventListener("change",b))}),a(()=>{F&&g&&F.removeEventListener("change",b)}),r(()=>p.themeConfig?.borderRadius,e=>{k(e)}),r(()=>p.themeConfig?.colors,e=>{e&&D(e)}),r(()=>p.themeConfig?.darkMode,e=>{void 0===e||p.autoDetectDarkMode||y(e)}),r(()=>p.themeConfig?.fontFamily,e=>{M(e)}),(t,o)=>(l(),s(i(e.tag),{class:"clll-theme-provider",style:d({"--clll-font-family":e.themeConfig?.fontFamily||n(h).fontFamily,"--clll-default-radius":e.themeConfig?.borderRadius?`var(--clll-${e.themeConfig.borderRadius})`:void 0})},{default:m(()=>[f(t.$slots,"default")]),_:3},8,["style"]))}});export{p as CLThemeProvider,h as DEFAULT_THEME,u as ThemeInjectionKey,p as default};
@@ -1,8 +1,2 @@
1
1
  import '../../../assets/core.css';
2
- import { _ as a } from "../../../chunks/CLToastProvider.vue_vue_type_script_setup_true_lang-DkGK0H4Z.js";
3
- import { T as t } from "../../../chunks/context-dkA4VoF7.js";
4
- export {
5
- a as CLToastProvider,
6
- t as ToastInjectionKey,
7
- a as default
8
- };
2
+ import{defineComponent as s,ref as i,provide as o,createElementBlock as e,openBlock as r,createBlock as a,createCommentVNode as t,renderSlot as d,unref as u,mergeProps as l}from"vue";import{_ as m}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CtXJMlF9.js";import{T as n}from"../../../chunks/context-JmPivI9V.js";const v={class:"clll-toast-provider"},p=/* @__PURE__ */s({name:"CLToastProvider",__name:"CLToastProvider",props:{borderRadius:{},dismissTimer:{},position:{}},setup(s){const p=s,T=i({}),_=i(!1),c=()=>{_.value=!1,T.value={}};return o(n,{visible:_,showToast:s=>{T.value={...s,borderRadius:s.borderRadius??p.borderRadius,dismissTimer:s.dismissTimer??p.dismissTimer,position:s.position??p.position},_.value=!0},hideToast:c}),(s,i)=>(r(),e("div",v,[_.value?(r(),a(u(m),l({key:0},T.value,{"on-dismiss":c}),null,16)):t("",!0),d(s.$slots,"default")]))}});export{p as CLToastProvider,n as ToastInjectionKey,p as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLHeading.css';
3
- import { _ as s } from "../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-DH5oJc1C.js";
4
- export {
5
- s as CLHeading,
6
- s as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-CsmrsD6c.js";export{e as CLHeading,e as default};
@@ -1,7 +1,3 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLText.css';
3
- import { _ as s } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
4
- export {
5
- s as CLText,
6
- s as default
7
- };
3
+ import{_ as e}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-CMXJdE-D.js";export{e as CLText,e as default};
@@ -1,39 +1,2 @@
1
1
  import '../assets/core.css';
2
- import { nextTick as g } from "vue";
3
- const m = () => {
4
- const u = (e, s) => {
5
- const i = e.replace(/\D/g, ""), l = s ? 16 : 8, r = i.slice(0, l), n = (t) => t.length > 6 ? `${t.slice(0, 4)}/${t.slice(4, 6)}/${t.slice(6)}` : t.length > 4 ? `${t.slice(0, 4)}/${t.slice(4)}` : t;
6
- if (!s)
7
- return n(r);
8
- const a = r.slice(0, 8), c = r.slice(8);
9
- let o = n(a);
10
- return r.length > 8 && (o += ` - ${n(c)}`), o;
11
- };
12
- return {
13
- formatAsDate: u,
14
- handleDateInput: (e, s, i, l) => {
15
- const r = e.target, n = r.value, a = e.inputType?.includes("delete"), c = r.selectionStart;
16
- if (a) {
17
- s.value = n, l?.();
18
- return;
19
- }
20
- const o = u(n, i);
21
- n !== o ? (s.value = o, g(() => {
22
- if (c !== null) {
23
- let t = c;
24
- const d = o.length - n.length;
25
- d > 0 && (t += d), r.setSelectionRange(t, t);
26
- }
27
- })) : s.value = n, l?.();
28
- },
29
- isoToSlash: (e) => e ? e.replace(/-/g, "/") : "",
30
- slashToISO: (e) => e ? e.replace(/\//g, "-") : "",
31
- validateDate: (e, s) => {
32
- const i = /^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/, l = /^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])\s*-\s*\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/;
33
- return s ? l.test(e) : i.test(e);
34
- }
35
- };
36
- };
37
- export {
38
- m as useDateInputMask
39
- };
2
+ import{nextTick as e}from"vue";const t=()=>{const t=(e,t)=>{const l=t?16:8,s=e.replace(/\D/g,"").slice(0,l),n=e=>e.length>6?`${e.slice(0,4)}/${e.slice(4,6)}/${e.slice(6)}`:e.length>4?`${e.slice(0,4)}/${e.slice(4)}`:e;if(!t)return n(s);const c=s.slice(0,8),a=s.slice(8);let i=n(c);return s.length>8&&(i+=` - ${n(a)}`),i};return{formatAsDate:t,handleDateInput:(l,s,n,c)=>{const a=l.target,i=a.value,o=l.inputType?.includes("delete"),r=a.selectionStart;if(o)return s.value=i,void c?.();const u=t(i,n);i!==u?(s.value=u,e(()=>{if(null!==r){let e=r;const t=u.length-i.length;t>0&&(e+=t),a.setSelectionRange(e,e)}})):s.value=i,c?.()},isoToSlash:e=>e?e.replace(/-/g,"/"):"",slashToISO:e=>e?e.replace(/\//g,"-"):"",validateDate:(e,t)=>t?/^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])\s*-\s*\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/.test(e):/^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/.test(e)}};export{t as useDateInputMask};