@codeandfunction/callaloo 3.16.1 → 3.16.2

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 (62) hide show
  1. package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-Cdx5rsou.js → CLA11yButton.vue_vue_type_style_index_0_lang-BPM559Fj.js} +1 -1
  2. package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-CrhjC50b.js → CLButton.vue_vue_type_style_index_0_lang-DiT4TwiW.js} +4 -4
  3. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-DVuAcV5A.js → CLCard.vue_vue_type_style_index_0_lang-vXK1HBND.js} +6 -6
  4. package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-fddy-FWI.js → CLFormLabel.vue_vue_type_script_setup_true_lang-B9PYNMYy.js} +1 -1
  5. package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js → CLHeading.vue_vue_type_style_index_0_lang-HzXfA-v_.js} +1 -1
  6. package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-CZB8svPf.js → CLIcon.vue_vue_type_style_index_0_lang-YdXhAQ8-.js} +23 -22
  7. package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-RMOT1TQk.js → CLInputMessages.vue_vue_type_style_index_0_lang-BNAW5shz.js} +12 -11
  8. package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-BUgw8Rpy.js → CLLink.vue_vue_type_style_index_0_lang-iHWgurk-.js} +12 -11
  9. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-Ckz9MEj5.js → CLNavLink.vue_vue_type_script_setup_true_lang-DBu0BjSA.js} +1 -1
  10. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-mkIKVHjg.js → CLPill.vue_vue_type_style_index_0_lang-DZl8_301.js} +3 -3
  11. package/dist/chunks/{CLProgress.vue_vue_type_style_index_0_lang-CSf7WiNb.js → CLProgress.vue_vue_type_style_index_0_lang-B2TZA2aN.js} +2 -2
  12. package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-E-bZeUWT.js → CLSkeleton.vue_vue_type_style_index_0_lang-BDGFXnrV.js} +1 -1
  13. package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-C8s8K4zb.js → CLSpinner.vue_vue_type_style_index_0_lang-BsI680jS.js} +1 -1
  14. package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js → CLText.vue_vue_type_style_index_0_lang-CPdNgG4V.js} +1 -1
  15. package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js → CLToast.vue_vue_type_style_index_0_lang-C119uLhY.js} +24 -23
  16. package/dist/chunks/base-theme-CYXVp7iK.js +774 -0
  17. package/dist/chunks/helper--hRjZVm6.js +62 -0
  18. package/dist/chunks/{utils-DFnkOeYP.js → utils-B7dbJd6n.js} +26 -25
  19. package/dist/chunks/{utils-C7Yjsqk-.js → utils-CXZw87Wc.js} +10 -9
  20. package/dist/chunks/utils-Dgc7kbbm.js +15 -0
  21. package/dist/chunks/utils-UApzileu.js +387 -0
  22. package/dist/chunks/utils-aUf_lkSP.js +29 -0
  23. package/dist/chunks/{utils-D_WP3vZz.js → utils-m8fomrFl.js} +13 -12
  24. package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
  25. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  26. package/dist/components/CLIcon/CLIcon.js +1 -1
  27. package/dist/components/CLTable/CLTable.js +30 -29
  28. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  29. package/dist/components/Containers/CLCarousel/CLCarousel.js +16 -16
  30. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +6 -6
  31. package/dist/components/Form/CLCheckbox/CLCheckbox.js +3 -3
  32. package/dist/components/Form/CLInput/CLInput.js +5 -5
  33. package/dist/components/Form/CLRadioButton/CLRadioButton.js +2 -2
  34. package/dist/components/Form/CLSelect/CLSelect.js +3 -3
  35. package/dist/components/Form/CLTextArea/CLTextArea.js +2 -2
  36. package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
  37. package/dist/components/Indicators/CLBanner/CLBanner.js +6 -6
  38. package/dist/components/Indicators/CLPill/CLPill.js +1 -1
  39. package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
  40. package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
  41. package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
  42. package/dist/components/Modals/CLModal/CLModal.js +16 -15
  43. package/dist/components/Navigation/CLLink/CLLink.js +1 -1
  44. package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
  45. package/dist/components/Navigation/CLNavSection/CLNavSection.js +2 -2
  46. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +509 -551
  47. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  48. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +2 -2
  49. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  50. package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
  51. package/dist/components/Typography/CLText/CLText.js +1 -1
  52. package/dist/composables/index.d.ts +2 -0
  53. package/dist/composables/useDropdown.js +49 -0
  54. package/dist/{chunks/useEsc-C9QIDZ_8.js → composables/useEsc.js} +2 -2
  55. package/dist/{chunks/useHasSlotContent-DDqs5uK9.js → composables/useHasSlotContent.js} +2 -2
  56. package/dist/composables/useTheme.js +33 -0
  57. package/dist/composables/useToast.js +14 -0
  58. package/package.json +5 -3
  59. package/dist/chunks/base-theme-C9_Hz5HW.js +0 -832
  60. package/dist/chunks/useTheme-yoEfuNvB.js +0 -417
  61. package/dist/chunks/utils-DTWXs4YX.js +0 -14
  62. package/dist/chunks/utils-Da9LXXQ0.js +0 -28
@@ -1,5 +1,5 @@
1
1
  import './CLToast.css';
2
- import { _ as s } from "../../../chunks/CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js";
2
+ import { _ as s } from "../../../chunks/CLToast.vue_vue_type_style_index_0_lang-C119uLhY.js";
3
3
  export {
4
4
  s as CLToast,
5
5
  s as default
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, watch as o, createBlock as s, openBlock as i, resolveDynamicComponent as m, withCtx as n, renderSlot as d } from "vue";
2
- import { s as f, a as l, b as c, c as h, d as p } from "../../../chunks/base-theme-C9_Hz5HW.js";
3
- import { D as k } from "../../../chunks/base-theme-C9_Hz5HW.js";
2
+ import { s as f, a as l, b as c, c as h, d as p } from "../../../chunks/base-theme-CYXVp7iK.js";
3
+ import { D as k } from "../../../chunks/base-theme-CYXVp7iK.js";
4
4
  const v = /* @__PURE__ */ a({
5
5
  __name: "CLThemeProvider",
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as L, ref as i, provide as g, createElementBlock as k, openBlock as p, createBlock as z, createCommentVNode as B, renderSlot as S, unref as A } from "vue";
2
- import { _ as $ } from "../../../chunks/CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js";
2
+ import { _ as $ } from "../../../chunks/CLToast.vue_vue_type_style_index_0_lang-C119uLhY.js";
3
3
  const x = { class: "clll-toast-provider" }, N = /* @__PURE__ */ L({
4
4
  name: "CLToastProvider",
5
5
  __name: "CLToastProvider",
@@ -1,5 +1,5 @@
1
1
  import './CLHeading.css';
2
- import { _ as s } from "../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js";
2
+ import { _ as s } from "../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-HzXfA-v_.js";
3
3
  export {
4
4
  s as CLHeading,
5
5
  s as default
@@ -1,5 +1,5 @@
1
1
  import './CLText.css';
2
- import { _ as s } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js";
2
+ import { _ as s } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-CPdNgG4V.js";
3
3
  export {
4
4
  s as CLText,
5
5
  s as default
@@ -0,0 +1,2 @@
1
+ export { useTheme } from './useTheme';
2
+ export { useToast } from './useToast';
@@ -0,0 +1,49 @@
1
+ import { ref as v } from "vue";
2
+ import { i as n } from "../chunks/helper--hRjZVm6.js";
3
+ const E = ({
4
+ triggerElem: a,
5
+ dropdownRef: w,
6
+ openDropdownHandler: u,
7
+ closeDropdownHandler: s
8
+ }) => {
9
+ const t = v(!1), i = v(), d = () => {
10
+ try {
11
+ t.value = !t.value, t.value && n && (i.value = window.setTimeout(() => {
12
+ window.removeEventListener("click", e), window.removeEventListener("keyup", e), window.addEventListener("click", e), window.addEventListener("keyup", e);
13
+ }, 100)), u?.();
14
+ } catch (r) {
15
+ console.error(r);
16
+ }
17
+ }, m = (r) => {
18
+ try {
19
+ const o = r?.target, c = a?.value, l = w?.value;
20
+ return n && c && l && !c.contains(o) && !l.contains(o) ? !0 : void 0;
21
+ } catch (o) {
22
+ console.error(o);
23
+ return;
24
+ }
25
+ }, e = (r) => {
26
+ try {
27
+ m(r) && (n && (window.removeEventListener("click", e), window.removeEventListener("keyup", e)), t.value = !1, s?.());
28
+ } catch (o) {
29
+ console.error(o);
30
+ }
31
+ };
32
+ return {
33
+ open: t,
34
+ toggleDropdown: d,
35
+ closeDropdown: () => {
36
+ try {
37
+ n && (window.removeEventListener("click", e), window.removeEventListener("keyup", e)), t.value = !1, s?.();
38
+ } catch (r) {
39
+ console.error(r);
40
+ }
41
+ },
42
+ clearEventListeners: () => {
43
+ n && (i.value && window.clearTimeout(i.value), window.removeEventListener("click", e), window.removeEventListener("keyup", e));
44
+ }
45
+ };
46
+ };
47
+ export {
48
+ E as useDropdown
49
+ };
@@ -1,4 +1,4 @@
1
- import { i as n } from "./base-theme-C9_Hz5HW.js";
1
+ import { i as n } from "../chunks/helper--hRjZVm6.js";
2
2
  const v = ({ escHandler: t, triggerElem: e }) => {
3
3
  const s = (a) => {
4
4
  if (n)
@@ -15,5 +15,5 @@ const v = ({ escHandler: t, triggerElem: e }) => {
15
15
  };
16
16
  };
17
17
  export {
18
- v as u
18
+ v as useEsc
19
19
  };
@@ -1,5 +1,5 @@
1
1
  import { useSlots as i, computed as l } from "vue";
2
- const c = (e = "default") => {
2
+ const o = (e = "default") => {
3
3
  const n = i(), t = (s) => {
4
4
  try {
5
5
  return !!s?.[e]?.().some((r) => Array.isArray(r.children) ? !0 : typeof r.children == "string" && r.children.trim() ? !(r.children === "v-if" || r.children === "v-show") : typeof r.children == "object" ? t(r.children) : !1);
@@ -10,5 +10,5 @@ const c = (e = "default") => {
10
10
  return l(() => t(n));
11
11
  };
12
12
  export {
13
- c as u
13
+ o as useHasSlotContent
14
14
  };
@@ -0,0 +1,33 @@
1
+ import { ref as t, inject as a } from "vue";
2
+ const s = t(), r = t(), n = t(), o = t({
3
+ primary: {},
4
+ secondary: {},
5
+ neutral: {},
6
+ danger: {},
7
+ warning: {},
8
+ success: {},
9
+ info: {}
10
+ }), l = (e) => {
11
+ s.value = e;
12
+ }, c = (e) => {
13
+ o.value = { ...o.value, ...e };
14
+ }, u = (e) => {
15
+ r.value = e;
16
+ }, d = (e) => {
17
+ n.value = e, typeof window < "u" && e && window?.document.documentElement.style.setProperty(
18
+ "--clll-font-family",
19
+ e
20
+ );
21
+ }, f = () => a("clll-theme", {
22
+ borderRadius: s,
23
+ colors: o,
24
+ darkMode: r,
25
+ fontFamily: n,
26
+ setBorderRadius: l,
27
+ setColors: c,
28
+ setDarkMode: u,
29
+ setFontFamily: d
30
+ });
31
+ export {
32
+ f as useTheme
33
+ };
@@ -0,0 +1,14 @@
1
+ import { inject as e } from "vue";
2
+ const a = () => {
3
+ const o = e("clll-toast"), s = (t) => {
4
+ o?.showToast?.(t);
5
+ };
6
+ return {
7
+ visible: o?.visible?.value,
8
+ showToast: s,
9
+ hideToast: o?.hideToast
10
+ };
11
+ };
12
+ export {
13
+ a as useToast
14
+ };
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "ui components",
18
18
  "vuejs"
19
19
  ],
20
- "version": "3.16.1",
20
+ "version": "3.16.2",
21
21
  "license": "MIT",
22
22
  "type": "module",
23
23
  "scripts": {
@@ -165,10 +165,12 @@
165
165
  "import": "./dist/components/Typography/CLText/CLText.js"
166
166
  },
167
167
  "./composables/useTheme": {
168
- "types": "./dist/composables/useTheme.d.ts"
168
+ "types": "./dist/composables/useTheme.d.ts",
169
+ "import": "./dist/composables/useTheme.js"
169
170
  },
170
171
  "./composables/useToast": {
171
- "types": "./dist/composables/useToast.d.ts"
172
+ "types": "./dist/composables/useToast.d.ts",
173
+ "import": "./dist/composables/useToast.js"
172
174
  }
173
175
  },
174
176
  "devDependencies": {