@codeandfunction/callaloo 3.17.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-Cl1pOJvL.js → CLA11yButton.vue_vue_type_style_index_0_lang-sAuatKyL.js} +1 -1
  2. package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-BN8ZGIfe.js → CLButton.vue_vue_type_style_index_0_lang-B1tl-0Ef.js} +3 -3
  3. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-VQ9e4mL2.js → CLCard.vue_vue_type_style_index_0_lang-jyU5jmxW.js} +5 -5
  4. package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-CaHCD2xF.js → CLFormLabel.vue_vue_type_script_setup_true_lang-DU9hc287.js} +1 -1
  5. package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-nUnSpm32.js → CLHeading.vue_vue_type_style_index_0_lang-DSJj-OSE.js} +1 -1
  6. package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-_OXcDRz_.js → CLIcon.vue_vue_type_style_index_0_lang-BUqElOVr.js} +2 -2
  7. package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-CtXwFFjZ.js → CLInputMessages.vue_vue_type_style_index_0_lang-yVPk0TXA.js} +1 -1
  8. package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-C5Pac9Ux.js → CLLink.vue_vue_type_style_index_0_lang-CgSM5z3j.js} +2 -2
  9. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-BwawdHNA.js → CLNavLink.vue_vue_type_script_setup_true_lang-Be-7l9wP.js} +1 -1
  10. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-B0jCw5QR.js → CLPill.vue_vue_type_style_index_0_lang-BEJDdVVt.js} +3 -3
  11. package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-DT23xe5d.js → CLSkeleton.vue_vue_type_style_index_0_lang-0bIkQhjj.js} +1 -1
  12. package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-DU0dl3yu.js → CLSpinner.vue_vue_type_style_index_0_lang-Bt2htES9.js} +1 -1
  13. package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-BJoS9z9q.js → CLText.vue_vue_type_style_index_0_lang-Bm4JS6YC.js} +1 -1
  14. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-BQU4HvPV.js +187 -0
  15. package/dist/chunks/{base-theme-Bg6XMoeN.js → base-theme-Dp5l5R6W.js} +3 -3
  16. package/dist/chunks/helper-BYpahJAh.js +63 -0
  17. package/dist/chunks/{utils-C_e2F4X7.js → utils-BaOvsXrB.js} +2 -2
  18. package/dist/chunks/{utils-CS9Gz4oX.js → utils-COeAI8Q8.js} +1 -1
  19. package/dist/chunks/{utils-DxdFsNHx.js → utils-Cxr8PSje.js} +1 -1
  20. package/dist/chunks/{utils-BipQQo6V.js → utils-D3pF04kL.js} +1 -1
  21. package/dist/chunks/{utils-DmkkE-9U.js → utils-c_6HU3mP.js} +1 -1
  22. package/dist/chunks/{utils-B_-25pfO.js → utils-lYiECXLy.js} +3 -3
  23. package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
  24. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  25. package/dist/components/CLIcon/CLIcon.js +1 -1
  26. package/dist/components/CLTable/CLTable.css +1 -1
  27. package/dist/components/CLTable/CLTable.js +2 -2
  28. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  29. package/dist/components/Containers/CLCarousel/CLCarousel.js +3 -3
  30. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +5 -5
  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 +62 -3
  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 +4 -4
  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 +3 -3
  47. package/dist/components/Popups/CLToast/CLToast.css +1 -1
  48. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  49. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +37 -23
  50. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.vue.d.ts +3 -0
  51. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  52. package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
  53. package/dist/components/Typography/CLText/CLText.js +1 -1
  54. package/dist/composables/useDropdown.js +1 -1
  55. package/dist/composables/useEsc.js +1 -1
  56. package/dist/composables/useTheme.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/chunks/CLProgress.vue_vue_type_style_index_0_lang-Cqdkf70C.js +0 -64
  59. package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-DBSD8ucy.js +0 -183
  60. package/dist/chunks/helper--hRjZVm6.js +0 -62
@@ -1,183 +0,0 @@
1
- import '../components/Popups/CLToast/CLToast.css';
2
- import { defineComponent as U, ref as f, computed as _, watch as F, onMounted as P, onUnmounted as X, onBeforeUnmount as Z, createElementBlock as C, openBlock as d, normalizeStyle as j, normalizeClass as r, unref as s, createElementVNode as b, createBlock as x, createCommentVNode as v, createVNode as k, withCtx as L, createTextVNode as z, toDisplayString as S, isRef as q } from "vue";
3
- import { _ as V } from "./CLButton.vue_vue_type_style_index_0_lang-BN8ZGIfe.js";
4
- import { _ as G } from "./CLIcon.vue_vue_type_style_index_0_lang-_OXcDRz_.js";
5
- import { _ as J } from "./CLProgress.vue_vue_type_style_index_0_lang-Cqdkf70C.js";
6
- import { _ as K } from "./CLText.vue_vue_type_style_index_0_lang-BJoS9z9q.js";
7
- import { _ as O } from "./CLHeading.vue_vue_type_style_index_0_lang-nUnSpm32.js";
8
- import { CLMode as N, CLColorVariants as w, CLToastPosition as Q, CLIconSizes as B, CLColors as $, CLHeadingTypes as W, CLTextTypes as I, CLSizes as R, CLIconNames as Y } from "../index.js";
9
- import { i as A, g as p, a as ee } from "./helper--hRjZVm6.js";
10
- import { useEsc as te } from "../composables/useEsc.js";
11
- import { g as oe } from "./utils-CS9Gz4oX.js";
12
- import { useTheme as ae } from "../composables/useTheme.js";
13
- const se = ({ color: e, variant: t }) => {
14
- const { colors: g, darkMode: l } = ae(), c = l.value ? N.Dark : N.Light, o = oe({
15
- color: e,
16
- colors: g.value,
17
- mode: c,
18
- variant: t
19
- });
20
- return {
21
- "--clll-toast-bg-color": l.value ? "black" : "white",
22
- "--clll-toast-text-color": o?.text ?? "inherit",
23
- "--clll-toast-icon-bg": o?.bg ?? "transparent",
24
- "--clll-toast-icon-color": o?.text ?? "inherit",
25
- "--clll-toast-timer-bg": o?.textDisabled ?? "transparent",
26
- "--clll-toast-theme-radius": "var(--clll-default-radius)"
27
- };
28
- }, ie = ["data-testid"], m = 300, a = "clll-toast", ge = /* @__PURE__ */ U({
29
- name: "CLToast",
30
- __name: "CLToast",
31
- props: {
32
- actionLabel: {},
33
- borderRadius: {},
34
- color: { default: $.Secondary },
35
- dismissTimer: { default: 5 },
36
- icon: {},
37
- iconSize: { default: B.Small },
38
- message: {},
39
- onAction: {},
40
- onDismiss: {},
41
- position: { default: Q.TopRight },
42
- rounded: { type: Boolean, default: !0 },
43
- testId: { default: "clll-toast" },
44
- title: {},
45
- variant: { default: w.Soft },
46
- width: { default: "24rem" }
47
- },
48
- setup(e) {
49
- const t = e, g = f(), l = f(100), c = f(!1), o = f(), h = f(0), E = _(() => [
50
- a,
51
- t.borderRadius ? `${a}--${t.borderRadius}` : "",
52
- t.dismissTimer ? `${a}--has-timer` : "",
53
- t.icon ? `${a}--has-icon` : "",
54
- t.message && !t.title ? `${a}--has-messageonly` : "",
55
- c.value ? `${a}--mounted` : "",
56
- t.onAction && t.actionLabel ? `${a}--has-action` : "",
57
- t.rounded ? `${a}--rounded` : `${a}--box`,
58
- t.title && !t.message ? `${a}--has-titleonly` : "",
59
- t.title && t.message ? `${a}--has-titleandmessage` : "",
60
- `${a}--${t.position}`
61
- ]), y = () => {
62
- c.value = !1, o.value && (o.value.stop(), o.value.start(m, (n) => {
63
- Math.min(n, m) === m && (o.value?.stop(), t.onDismiss?.());
64
- })), M();
65
- }, H = () => {
66
- const n = t.dismissTimer * 1e3, i = n / 100;
67
- o.value?.start(n, (u) => {
68
- const T = Math.min(u / 100, i);
69
- l.value = 100 - T / i * 100, T === i && y();
70
- });
71
- }, D = () => {
72
- o.value || (o.value = ee(), o.value.start(100, (n) => {
73
- Math.min(n, 100) === 100 && (o.value?.stop(), c.value = !0, t?.dismissTimer && o.value?.start(m, (u) => {
74
- Math.min(u, m) === m && (o.value?.stop(), H());
75
- }));
76
- }));
77
- };
78
- F(t, () => {
79
- o.value && (o.value.stop(), o.value = void 0), t?.dismissTimer && D();
80
- }), P(() => {
81
- A && (h.value = p() + 1, D());
82
- }), X(() => {
83
- A && t?.dismissTimer && o.value && (o.value.stop(), o.value = void 0), c.value = !1, t.onDismiss?.();
84
- });
85
- const { clearEventListeners: M } = te({ escHandler: y });
86
- return Z(() => {
87
- M();
88
- }), (n, i) => (d(), C("output", {
89
- ref_key: "elem",
90
- ref: g,
91
- class: r(s(E)),
92
- "data-testid": e.testId,
93
- style: j({ zIndex: s(h), "--clll-toast-width": e.width, ...s(se)({ color: e.color, variant: e.variant }) })
94
- }, [
95
- b("div", {
96
- class: r(`${a}__body`)
97
- }, [
98
- b("div", {
99
- class: r(`${a}__content`)
100
- }, [
101
- e.icon ? (d(), C("div", {
102
- key: 0,
103
- class: r(`${a}__icon`)
104
- }, [
105
- k(s(G), {
106
- name: e.icon,
107
- size: e.iconSize
108
- }, null, 8, ["name", "size"])
109
- ], 2)) : v("", !0),
110
- b("div", {
111
- class: r(`${a}__text`)
112
- }, [
113
- e.title ? (d(), x(s(O), {
114
- key: 0,
115
- color: s($).Neutral,
116
- "test-id": `${a}__title`,
117
- type: s(W).Section
118
- }, {
119
- default: L(() => [
120
- z(S(e.title), 1)
121
- ]),
122
- _: 1
123
- }, 8, ["color", "test-id", "type"])) : v("", !0),
124
- e.message ? (d(), x(s(K), {
125
- key: 1,
126
- color: s($).Neutral,
127
- "test-id": `${a}__message`,
128
- type: e.title ? s(I).Medium : s(I).Body
129
- }, {
130
- default: L(() => [
131
- z(S(e.message), 1)
132
- ]),
133
- _: 1
134
- }, 8, ["color", "test-id", "type"])) : v("", !0)
135
- ], 2),
136
- e.onAction && e.actionLabel ? (d(), C("div", {
137
- key: 1,
138
- class: r(`${a}__action-button`)
139
- }, [
140
- k(s(V), {
141
- color: e.color,
142
- "border-radius": e.borderRadius,
143
- "on-click": e.onAction,
144
- "test-id": `${a}__action-button`,
145
- variant: e.variant
146
- }, {
147
- default: L(() => [
148
- z(S(e.actionLabel), 1)
149
- ]),
150
- _: 1
151
- }, 8, ["color", "border-radius", "on-click", "test-id", "variant"])
152
- ], 2)) : v("", !0)
153
- ], 2),
154
- b("div", {
155
- class: r(`${a}__dismiss-button`)
156
- }, [
157
- k(s(V), {
158
- "aria-label": "Dismiss toast",
159
- color: s($).Neutral,
160
- "border-radius": e.borderRadius,
161
- "icon-before": s(Y).Delete,
162
- "icon-size": s(B).Tiny,
163
- "on-click": y,
164
- size: s(R).Tiny,
165
- "test-id": `${a}__dismiss-button`,
166
- variant: s(w).Text
167
- }, null, 8, ["color", "border-radius", "icon-before", "icon-size", "size", "test-id", "variant"])
168
- ], 2)
169
- ], 2),
170
- e.dismissTimer ? (d(), x(s(J), {
171
- key: 0,
172
- modelValue: s(l),
173
- "onUpdate:modelValue": i[0] || (i[0] = (u) => q(l) ? l.value = u : null),
174
- color: e.color,
175
- rounded: !1,
176
- size: s(R).Small
177
- }, null, 8, ["modelValue", "color", "size"])) : v("", !0)
178
- ], 14, ie));
179
- }
180
- });
181
- export {
182
- ge as _
183
- };
@@ -1,62 +0,0 @@
1
- const b = () => {
2
- let t, i, o, e = !1, r, s;
3
- const d = (n) => {
4
- if (e) return;
5
- i === void 0 && (i = n);
6
- const a = n - i;
7
- o !== n && s?.(a), r && a < r && (o = n, e || (t = window.requestAnimationFrame(d)));
8
- }, l = () => {
9
- t = void 0, i = void 0, o = void 0, e = !1, r = void 0;
10
- };
11
- return {
12
- start: (n, a) => {
13
- s = a, r = n, t = window.requestAnimationFrame(d);
14
- },
15
- stop: () => {
16
- e = !0, t && window.cancelAnimationFrame(t), l();
17
- }
18
- };
19
- }, A = ({
20
- parent: t,
21
- child: i,
22
- threshold: o = 0.1,
23
- leftOffset: e = 0,
24
- rightOffset: r = 0
25
- }) => {
26
- const {
27
- top: s,
28
- left: d,
29
- bottom: l,
30
- right: n,
31
- width: a,
32
- height: u
33
- } = t?.getBoundingClientRect() || {}, {
34
- top: g,
35
- left: p,
36
- bottom: m,
37
- right: h
38
- } = i.getBoundingClientRect() || {};
39
- let w = d + e, y = n - r, v = a - (e + r), f = 0, c = 0;
40
- return p <= y && (f = (h - w) / v * 100 / 100), g <= l && (c = (m - s) / u * 100 / 100), f > o && c > o;
41
- }, B = () => N ? Math.max(
42
- ...Array.from(
43
- document?.querySelectorAll("body *"),
44
- (t) => parseFloat(window?.getComputedStyle(t).zIndex)
45
- ).filter((t) => !Number.isNaN(t)),
46
- 0
47
- ) : 0, N = typeof document < "u", C = (t) => t != null && typeof t.valueOf() == "string", D = (t) => {
48
- if (!t) return !0;
49
- let i = 0;
50
- const o = ["#comment"];
51
- return t.childNodes.forEach((e) => {
52
- !o.includes(e.nodeName) && e.childNodes.length && i++;
53
- }), i === 0;
54
- };
55
- export {
56
- b as a,
57
- C as b,
58
- D as c,
59
- A as d,
60
- B as g,
61
- N as i
62
- };