@codeandfunction/callaloo 3.16.1 → 3.16.3

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/README.md +5 -3
  2. package/dist/assets/CLFormCharCounter.css +1 -1
  3. package/dist/assets/CLInputMessages.css +1 -1
  4. package/dist/assets/core.css +1 -0
  5. package/dist/assets/shared/form-utilities.css +1 -0
  6. package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-Cdx5rsou.js → CLA11yButton.vue_vue_type_style_index_0_lang-Caaw-9_c.js} +1 -1
  7. package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-CrhjC50b.js → CLButton.vue_vue_type_style_index_0_lang-N3EWoTbB.js} +4 -4
  8. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-DVuAcV5A.js → CLCard.vue_vue_type_style_index_0_lang-CpReGucs.js} +6 -6
  9. package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-fddy-FWI.js → CLFormLabel.vue_vue_type_script_setup_true_lang-Cw3nPc64.js} +1 -1
  10. package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js → CLHeading.vue_vue_type_style_index_0_lang-BcCh5-Bx.js} +1 -1
  11. package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-CZB8svPf.js → CLIcon.vue_vue_type_style_index_0_lang-BaCl5yQI.js} +23 -22
  12. package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-RMOT1TQk.js → CLInputMessages.vue_vue_type_style_index_0_lang-BNGT0om7.js} +12 -11
  13. package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-BUgw8Rpy.js → CLLink.vue_vue_type_style_index_0_lang-BMUevw_4.js} +12 -11
  14. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-Ckz9MEj5.js → CLNavLink.vue_vue_type_script_setup_true_lang-D2oCLUGX.js} +1 -1
  15. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-mkIKVHjg.js → CLPill.vue_vue_type_style_index_0_lang-DYXrV-YE.js} +3 -3
  16. package/dist/chunks/{CLProgress.vue_vue_type_style_index_0_lang-CSf7WiNb.js → CLProgress.vue_vue_type_style_index_0_lang-Cu3FhEX0.js} +2 -2
  17. package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-E-bZeUWT.js → CLSkeleton.vue_vue_type_style_index_0_lang-DblqrUXo.js} +1 -1
  18. package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-C8s8K4zb.js → CLSpinner.vue_vue_type_style_index_0_lang-DskZL4VC.js} +1 -1
  19. package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js → CLText.vue_vue_type_style_index_0_lang-Cz9Sv2AC.js} +1 -1
  20. package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js → CLToast.vue_vue_type_style_index_0_lang-CYcPXUMQ.js} +24 -23
  21. package/dist/chunks/base-theme-Bg6XMoeN.js +275 -0
  22. package/dist/chunks/helper--hRjZVm6.js +62 -0
  23. package/dist/chunks/utils-Bp7YeySh.js +29 -0
  24. package/dist/chunks/utils-C9rOAW29.js +387 -0
  25. package/dist/chunks/{utils-C7Yjsqk-.js → utils-D-5TdmRW.js} +10 -9
  26. package/dist/chunks/{utils-D_WP3vZz.js → utils-DRsWhcFX.js} +13 -12
  27. package/dist/chunks/{utils-DFnkOeYP.js → utils-DVR3a-_d.js} +26 -25
  28. package/dist/chunks/utils-nC7WS9e0.js +15 -0
  29. package/dist/components/Buttons/CLA11yButton/CLA11yButton.css +1 -1
  30. package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +2 -1
  31. package/dist/components/Buttons/CLButton/CLButton.css +1 -1
  32. package/dist/components/Buttons/CLButton/CLButton.js +2 -1
  33. package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +3 -3
  34. package/dist/components/CLIcon/CLIcon.css +1 -1
  35. package/dist/components/CLIcon/CLIcon.js +2 -1
  36. package/dist/components/CLTable/CLTable.css +1 -1
  37. package/dist/components/CLTable/CLTable.js +31 -29
  38. package/dist/components/Containers/CLCard/CLCard.css +1 -1
  39. package/dist/components/Containers/CLCard/CLCard.js +2 -1
  40. package/dist/components/Containers/CLCard/CLCard.vue.d.ts +2 -2
  41. package/dist/components/Containers/CLCarousel/CLCarousel.css +1 -1
  42. package/dist/components/Containers/CLCarousel/CLCarousel.js +17 -16
  43. package/dist/components/Containers/CLCarousel/CLCarousel.vue.d.ts +1 -1
  44. package/dist/components/Containers/CLDisclosure/CLDisclosure.css +1 -1
  45. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +7 -6
  46. package/dist/components/Form/CLCheckbox/CLCheckbox.css +1 -1
  47. package/dist/components/Form/CLCheckbox/CLCheckbox.js +5 -3
  48. package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +2 -2
  49. package/dist/components/Form/CLInput/CLInput.css +1 -1
  50. package/dist/components/Form/CLInput/CLInput.js +7 -5
  51. package/dist/components/Form/CLInput/CLInput.vue.d.ts +2 -2
  52. package/dist/components/Form/CLRadioButton/CLRadioButton.css +1 -1
  53. package/dist/components/Form/CLRadioButton/CLRadioButton.js +4 -2
  54. package/dist/components/Form/CLRadioButton/CLRadioButton.vue.d.ts +1 -1
  55. package/dist/components/Form/CLSelect/CLSelect.css +1 -1
  56. package/dist/components/Form/CLSelect/CLSelect.js +5 -3
  57. package/dist/components/Form/CLSelect/CLSelect.vue.d.ts +1 -1
  58. package/dist/components/Form/CLTextArea/CLTextArea.css +1 -1
  59. package/dist/components/Form/CLTextArea/CLTextArea.js +4 -2
  60. package/dist/components/Form/CLTextArea/CLTextArea.vue.d.ts +1 -1
  61. package/dist/components/Indicators/CLBadge/CLBadge.css +1 -1
  62. package/dist/components/Indicators/CLBadge/CLBadge.js +2 -1
  63. package/dist/components/Indicators/CLBanner/CLBanner.css +1 -1
  64. package/dist/components/Indicators/CLBanner/CLBanner.js +7 -6
  65. package/dist/components/Indicators/CLBanner/CLBanner.vue.d.ts +2 -2
  66. package/dist/components/Indicators/CLPill/CLPill.css +1 -1
  67. package/dist/components/Indicators/CLPill/CLPill.js +2 -1
  68. package/dist/components/Indicators/CLProgress/CLProgress.css +1 -1
  69. package/dist/components/Indicators/CLProgress/CLProgress.js +2 -1
  70. package/dist/components/Loading/CLSkeleton/CLSkeleton.css +1 -1
  71. package/dist/components/Loading/CLSkeleton/CLSkeleton.js +2 -1
  72. package/dist/components/Loading/CLSkeleton/CLSkeleton.vue.d.ts +2 -2
  73. package/dist/components/Loading/CLSpinner/CLSpinner.css +1 -1
  74. package/dist/components/Loading/CLSpinner/CLSpinner.js +2 -1
  75. package/dist/components/Modals/CLModal/CLModal.css +1 -1
  76. package/dist/components/Modals/CLModal/CLModal.js +17 -15
  77. package/dist/components/Navigation/CLLink/CLLink.css +1 -1
  78. package/dist/components/Navigation/CLLink/CLLink.js +2 -1
  79. package/dist/components/Navigation/CLNavLink/CLNavLink.js +2 -1
  80. package/dist/components/Navigation/CLNavSection/CLNavSection.css +1 -1
  81. package/dist/components/Navigation/CLNavSection/CLNavSection.js +3 -2
  82. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.css +1 -1
  83. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +510 -551
  84. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +7 -7
  85. package/dist/components/Popups/CLToast/CLToast.css +1 -1
  86. package/dist/components/Popups/CLToast/CLToast.js +2 -1
  87. package/dist/components/Popups/CLToast/CLToast.vue.d.ts +1 -1
  88. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +20 -17
  89. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +2 -1
  90. package/dist/components/Typography/CLHeading/CLHeading.css +1 -1
  91. package/dist/components/Typography/CLHeading/CLHeading.js +2 -1
  92. package/dist/components/Typography/CLText/CLText.css +1 -1
  93. package/dist/components/Typography/CLText/CLText.js +2 -1
  94. package/dist/composables/index.d.ts +2 -0
  95. package/dist/composables/useDropdown.js +50 -0
  96. package/dist/{chunks/useEsc-C9QIDZ_8.js → composables/useEsc.js} +3 -2
  97. package/dist/{chunks/useHasSlotContent-DDqs5uK9.js → composables/useHasSlotContent.js} +3 -2
  98. package/dist/composables/useTheme.js +31 -0
  99. package/dist/composables/useToast.js +15 -0
  100. package/dist/index.js +1 -0
  101. package/dist/utils/merge.d.ts +18 -0
  102. package/package.json +32 -30
  103. package/dist/chunks/base-theme-C9_Hz5HW.js +0 -832
  104. package/dist/chunks/useTheme-yoEfuNvB.js +0 -417
  105. package/dist/chunks/utils-DTWXs4YX.js +0 -14
  106. package/dist/chunks/utils-Da9LXXQ0.js +0 -28
@@ -0,0 +1,275 @@
1
+ import { ref as t, provide as E } from "vue";
2
+ import { CLMode as o } from "../index.js";
3
+ function x(e, s) {
4
+ if (!s)
5
+ return e;
6
+ const a = { ...e };
7
+ for (const r in s)
8
+ if (Object.prototype.hasOwnProperty.call(s, r)) {
9
+ const f = s[r], d = a[r];
10
+ i(d) && i(f) ? a[r] = x(d, f) : a[r] = f;
11
+ }
12
+ return a;
13
+ }
14
+ function i(e) {
15
+ return e !== null && typeof e == "object" && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof Map) && !(e instanceof Set);
16
+ }
17
+ const b = {
18
+ borderRadius: void 0,
19
+ colors: {
20
+ primary: {
21
+ 0: "#ffffff",
22
+ 100: "#def5ff",
23
+ 200: "#b6eeff",
24
+ 300: "#75e3ff",
25
+ 400: "#2cd6ff",
26
+ 500: "#00c8ff",
27
+ 600: "#009cd4",
28
+ 700: "#007cab",
29
+ 800: "#00688d",
30
+ 900: "#065674"
31
+ },
32
+ secondary: {
33
+ 0: "#ffffff",
34
+ 100: "#DEE2E8",
35
+ 200: "#BFC7D4",
36
+ 300: "#9EAABD",
37
+ 400: "#8090A8",
38
+ 500: "#61738E",
39
+ 600: "#4F5D73",
40
+ 700: "#3A4555",
41
+ 800: "#272F3A",
42
+ 900: "#13161B"
43
+ },
44
+ neutral: {
45
+ 0: "#ffffff",
46
+ 100: "#F7F7F7",
47
+ 200: "#F2F2F2",
48
+ 300: "#EBEBEB",
49
+ 400: "#E6E6E6",
50
+ 500: "#DEDEDE",
51
+ 600: "#B3B3B3",
52
+ 700: "#858585",
53
+ 800: "#595959",
54
+ 900: "#2B2B2B"
55
+ },
56
+ danger: {
57
+ 0: "#ffffff",
58
+ 100: "#ffd3ce",
59
+ 200: "#ffb2ac",
60
+ 300: "#ff8e88",
61
+ 400: "#fe6561",
62
+ 500: "#e74c4c",
63
+ 600: "#d20e27",
64
+ 700: "#9b0018",
65
+ 800: "#63000c",
66
+ 900: "#360003"
67
+ },
68
+ warning: {
69
+ 0: "#ffffff",
70
+ 100: "#ffeaba",
71
+ 200: "#ffdf95",
72
+ 300: "#ffd36a",
73
+ 400: "#fdc836",
74
+ 500: "#f5be1a",
75
+ 600: "#c79800",
76
+ 700: "#8a6900",
77
+ 800: "#4f3b00",
78
+ 900: "#211700"
79
+ },
80
+ success: {
81
+ 0: "#ffffff",
82
+ 100: "#9effb2",
83
+ 200: "#69f68d",
84
+ 300: "#56e57e",
85
+ 400: "#41d56e",
86
+ 500: "#22c55d",
87
+ 600: "#00a147",
88
+ 700: "#007230",
89
+ 800: "#00441a",
90
+ 900: "#001f08"
91
+ },
92
+ info: {
93
+ 0: "#ffffff",
94
+ 100: "#cfe2ff",
95
+ 200: "#afceff",
96
+ 300: "#8eb9ff",
97
+ 400: "#6ca4ff",
98
+ 500: "#4e8ff8",
99
+ 600: "#2470e7",
100
+ 700: "#004cb5",
101
+ 800: "#002e73",
102
+ 900: "#00153e"
103
+ }
104
+ },
105
+ darkMode: !1,
106
+ fontFamily: "BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif"
107
+ }, m = {
108
+ contrast: {
109
+ [o.Light]: {
110
+ border: 900,
111
+ borderHover: 700,
112
+ bg: 900,
113
+ disabled: 500,
114
+ focus: 900,
115
+ hover: 800,
116
+ shadow: 900,
117
+ text: 0,
118
+ textDisabled: 800
119
+ },
120
+ [o.Dark]: {
121
+ border: 400,
122
+ borderHover: 700,
123
+ bg: 100,
124
+ disabled: 500,
125
+ focus: 400,
126
+ hover: 200,
127
+ shadow: 400,
128
+ text: 900,
129
+ textDisabled: 500
130
+ }
131
+ },
132
+ ghost: {
133
+ [o.Light]: {
134
+ disabled: 100,
135
+ focus: 700,
136
+ text: 800,
137
+ textDisabled: 800
138
+ },
139
+ [o.Dark]: {
140
+ disabled: 700,
141
+ focus: 300,
142
+ text: 300,
143
+ textDisabled: 700
144
+ }
145
+ },
146
+ outline: {
147
+ [o.Light]: {
148
+ border: 300,
149
+ borderHover: 700,
150
+ disabled: 400,
151
+ focus: 700,
152
+ hover: 100,
153
+ text: 900,
154
+ textBody: 700,
155
+ textDisabled: 800
156
+ },
157
+ [o.Dark]: {
158
+ border: 500,
159
+ borderHover: 500,
160
+ disabled: 800,
161
+ focus: 300,
162
+ hover: 900,
163
+ text: 300,
164
+ textBody: 300,
165
+ textDisabled: 700
166
+ }
167
+ },
168
+ soft: {
169
+ [o.Light]: {
170
+ bg: 100,
171
+ border: 300,
172
+ borderHover: 700,
173
+ disabled: 100,
174
+ focus: 400,
175
+ hover: 200,
176
+ shadow: 200,
177
+ text: 900,
178
+ textDisabled: 800
179
+ },
180
+ [o.Dark]: {
181
+ bg: 900,
182
+ border: 100,
183
+ borderHover: 300,
184
+ disabled: 800,
185
+ focus: 100,
186
+ hover: 800,
187
+ shadow: 800,
188
+ text: 300,
189
+ textDisabled: 500
190
+ }
191
+ },
192
+ solid: {
193
+ [o.Light]: {
194
+ bg: 600,
195
+ border: 700,
196
+ borderHover: 900,
197
+ disabled: 500,
198
+ focus: 700,
199
+ hover: 500,
200
+ shadow: 700,
201
+ text: 0,
202
+ textDisabled: 100
203
+ },
204
+ [o.Dark]: {
205
+ bg: 400,
206
+ border: 100,
207
+ borderHover: 300,
208
+ disabled: 600,
209
+ focus: 100,
210
+ hover: 500,
211
+ shadow: 100,
212
+ text: 900,
213
+ textDisabled: 800
214
+ }
215
+ },
216
+ text: {
217
+ [o.Light]: {
218
+ border: 100,
219
+ borderHover: 300,
220
+ disabled: 100,
221
+ focus: 800,
222
+ hover: 200,
223
+ text: 800,
224
+ textBody: 300,
225
+ textDisabled: 700
226
+ },
227
+ [o.Dark]: {
228
+ border: 300,
229
+ borderHover: 500,
230
+ disabled: 800,
231
+ focus: 300,
232
+ hover: 900,
233
+ text: 300,
234
+ textBody: 800,
235
+ textDisabled: 500
236
+ }
237
+ }
238
+ }, v = t(), h = t(), y = t(), c = t({
239
+ primary: {},
240
+ secondary: {},
241
+ neutral: {},
242
+ danger: {},
243
+ warning: {},
244
+ success: {},
245
+ info: {}
246
+ }), l = (e) => {
247
+ v.value = e;
248
+ }, n = (e) => {
249
+ c.value = { ...c.value, ...e };
250
+ }, u = (e) => {
251
+ h.value = e;
252
+ }, D = (e) => {
253
+ y.value = e;
254
+ }, R = (e) => {
255
+ const s = e?.borderRadius || b.borderRadius, a = t(s), r = x(b.colors, e?.colors), f = t(r), d = e?.darkMode || b.darkMode, B = t(d ?? !1), F = e?.fontFamily || b.fontFamily, g = t(F);
256
+ f.value && n(f.value), l(a.value), u(B.value), D(g.value), E("clll-theme", {
257
+ borderRadius: v,
258
+ colors: c,
259
+ darkMode: h,
260
+ fontFamily: y,
261
+ setBorderRadius: l,
262
+ setColors: n,
263
+ setDarkMode: u,
264
+ setFontFamily: D
265
+ });
266
+ };
267
+ export {
268
+ m as C,
269
+ b as D,
270
+ l as a,
271
+ n as b,
272
+ u as c,
273
+ D as d,
274
+ R as s
275
+ };
@@ -0,0 +1,62 @@
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
+ };
@@ -0,0 +1,29 @@
1
+ import { CLMode as a, CLColorVariants as u } from "../index.js";
2
+ import { g as b, c as s, a as h, f as v } from "./utils-C9rOAW29.js";
3
+ import { useTheme as m } from "../composables/useTheme.js";
4
+ const $ = ({ color: d }) => {
5
+ const { borderRadius: r, colors: e, darkMode: c } = m(), n = c.value ? a.Dark : a.Light, t = b({
6
+ color: d,
7
+ colors: e.value,
8
+ mode: n,
9
+ variant: u.Solid
10
+ });
11
+ let l;
12
+ return r.value && (l = s`&.clll-a11y__button.--rounded{border-radius:var(--clll-${r.value});}`), h(s`${v({ borderColor: t?.focus, shadowColor: t?.shadow, shadowWidth: "--clll-unit-0" })}`, l);
13
+ }, g = ({
14
+ color: d,
15
+ variant: r = u.Soft
16
+ }) => {
17
+ const { borderRadius: e, colors: c, darkMode: n } = m(), t = n.value ? a.Dark : a.Light, l = r === u.Outline, o = b({
18
+ color: d,
19
+ colors: c.value,
20
+ mode: t,
21
+ variant: r
22
+ });
23
+ let i;
24
+ return e.value && (i = s`&:not([class*='clll-button--rounded-']){&.clll-button.clll-button--rounded{border-radius:var(--clll-${e.value})}}`), h(s`.clll-button__content,.clll-icon{color:${o?.text};}border-color:${l ? o?.border : "transparent"};background-color:${o?.bg ?? "transparent"};&:hover:not([disabled]){background-color:${o?.hover ?? "transparent"};border-color:${l ? o?.borderHover : "transparent"};}${v({ borderColor: o?.focus, shadowColor: o?.shadow, shadowWidth: "--clll-unit-0" })}`, i);
25
+ };
26
+ export {
27
+ $ as a,
28
+ g as b
29
+ };