@codeandfunction/callaloo 3.15.3 → 3.16.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.
- package/README.md +7 -3
- package/dist/assets/CLFormCharCounter.css +1 -0
- package/dist/assets/CLInputMessages.css +1 -0
- package/dist/chunks/CLA11yButton.vue_vue_type_style_index_0_lang-Cdx5rsou.js +45 -0
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-CrhjC50b.js +128 -0
- package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-DVuAcV5A.js +252 -0
- package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-CJ4VrvmR.js +38 -0
- package/dist/chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-fddy-FWI.js +43 -0
- package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js +50 -0
- package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-CZB8svPf.js +83 -0
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-RMOT1TQk.js +120 -0
- package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-BUgw8Rpy.js +59 -0
- package/dist/chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Ckz9MEj5.js +44 -0
- package/dist/chunks/CLPill.vue_vue_type_style_index_0_lang-mkIKVHjg.js +88 -0
- package/dist/chunks/CLProgress.vue_vue_type_style_index_0_lang-CSf7WiNb.js +65 -0
- package/dist/chunks/CLSkeleton.vue_vue_type_style_index_0_lang-E-bZeUWT.js +33 -0
- package/dist/chunks/CLSpinner.vue_vue_type_style_index_0_lang-C8s8K4zb.js +53 -0
- package/dist/chunks/CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js +46 -0
- package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-DOI4DZGg.js +178 -0
- package/dist/chunks/base-theme-C9_Hz5HW.js +832 -0
- package/dist/chunks/useEsc-C9QIDZ_8.js +19 -0
- package/dist/chunks/useHasSlotContent-DDqs5uK9.js +14 -0
- package/dist/chunks/useTheme-yoEfuNvB.js +417 -0
- package/dist/chunks/utils-C7Yjsqk-.js +25 -0
- package/dist/chunks/utils-DFnkOeYP.js +72 -0
- package/dist/chunks/utils-DTWXs4YX.js +14 -0
- package/dist/chunks/utils-D_WP3vZz.js +29 -0
- package/dist/chunks/utils-Da9LXXQ0.js +28 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.css +1 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +6 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.vue.d.ts +2 -2
- package/dist/components/Buttons/CLButton/CLButton.css +1 -0
- package/dist/components/Buttons/CLButton/CLButton.js +6 -0
- package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +7 -7
- package/dist/components/CLIcon/CLIcon.css +1 -0
- package/dist/components/CLIcon/CLIcon.js +6 -0
- package/dist/components/{Assets/CLIcon → CLIcon}/CLIcon.vue.d.ts +1 -1
- package/dist/components/CLTable/CLTable.css +1 -0
- package/dist/components/CLTable/CLTable.js +196 -0
- package/dist/components/{Table → CLTable}/index.d.ts +0 -7
- package/dist/components/Containers/CLCard/CLCard.css +1 -0
- package/dist/components/Containers/CLCard/CLCard.js +6 -0
- package/dist/components/Containers/CLCard/CLCard.vue.d.ts +6 -6
- package/dist/components/Containers/CLCarousel/CLCarousel.css +1 -0
- package/dist/components/Containers/CLCarousel/CLCarousel.js +436 -0
- package/dist/components/Containers/CLCarousel/CLCarousel.vue.d.ts +2 -2
- package/dist/components/Containers/CLCarousel/CLCarouselNavigation.vue.d.ts +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.css +1 -0
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +137 -0
- package/dist/components/Containers/CLDisclosure/CLDisclosure.vue.d.ts +3 -3
- package/dist/components/Form/CLCheckbox/CLCheckbox.css +1 -0
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +147 -0
- package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +4 -4
- package/dist/components/Form/CLFormLabel/CLFormLabel.vue.d.ts +1 -1
- package/dist/components/Form/CLInput/CLInput.css +1 -0
- package/dist/components/Form/CLInput/CLInput.js +378 -0
- package/dist/components/Form/CLInput/CLInput.vue.d.ts +5 -5
- package/dist/components/Form/CLInput/CLInputPill.vue.d.ts +1 -1
- package/dist/components/Form/CLRadioButton/CLRadioButton.css +1 -0
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +132 -0
- package/dist/components/Form/CLRadioButton/CLRadioButton.vue.d.ts +1 -1
- package/dist/components/Form/CLSelect/CLSelect.css +1 -0
- package/dist/components/Form/CLSelect/CLSelect.js +137 -0
- package/dist/components/Form/CLSelect/CLSelect.vue.d.ts +3 -3
- package/dist/components/Form/CLTextArea/CLTextArea.css +1 -0
- package/dist/components/Form/CLTextArea/CLTextArea.js +149 -0
- package/dist/components/Form/CLTextArea/CLTextArea.vue.d.ts +2 -2
- package/dist/components/Form/index.d.ts +5 -9
- package/dist/components/Indicators/CLBadge/CLBadge.css +1 -0
- package/dist/components/Indicators/CLBadge/CLBadge.js +40 -0
- package/dist/components/Indicators/CLBadge/CLBadge.vue.d.ts +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.css +1 -0
- package/dist/components/Indicators/CLBanner/CLBanner.js +147 -0
- package/dist/components/Indicators/CLBanner/CLBanner.vue.d.ts +3 -3
- package/dist/components/Indicators/CLPill/CLPill.css +1 -0
- package/dist/components/Indicators/CLPill/CLPill.js +6 -0
- package/dist/components/Indicators/CLPill/CLPill.vue.d.ts +3 -3
- package/dist/components/Indicators/CLProgress/CLProgress.css +1 -0
- package/dist/components/Indicators/CLProgress/CLProgress.js +6 -0
- package/dist/components/Indicators/CLProgress/CLProgress.vue.d.ts +2 -2
- package/dist/components/Loading/CLSkeleton/CLSkeleton.css +1 -0
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +6 -0
- package/dist/components/Loading/CLSkeleton/CLSkeleton.vue.d.ts +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.css +1 -0
- package/dist/components/Loading/CLSpinner/CLSpinner.js +6 -0
- package/dist/components/Loading/CLSpinner/CLSpinner.vue.d.ts +1 -1
- package/dist/components/Modals/CLModal/CLModal.css +1 -0
- package/dist/components/Modals/CLModal/CLModal.js +175 -0
- package/dist/components/Modals/CLModal/CLModal.vue.d.ts +2 -2
- package/dist/components/Navigation/CLLink/CLLink.css +1 -0
- package/dist/components/Navigation/CLLink/CLLink.js +6 -0
- package/dist/components/Navigation/CLLink/CLLink.vue.d.ts +2 -2
- package/dist/components/Navigation/CLNavLink/CLNavLink.js +5 -0
- package/dist/components/Navigation/CLNavLink/CLNavLink.vue.d.ts +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.css +1 -0
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +55 -0
- package/dist/components/Navigation/CLNavSection/CLNavSection.vue.d.ts +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.css +1 -0
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1233 -0
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +29 -29
- package/dist/components/Popups/CLToast/CLToast.css +1 -0
- package/dist/components/Popups/CLToast/CLToast.js +6 -0
- package/dist/components/Popups/CLToast/CLToast.vue.d.ts +2 -2
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +44 -0
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.vue.d.ts +27 -0
- package/dist/components/Providers/CLThemeProvider/base-theme.d.ts +22 -0
- package/dist/components/Providers/CLThemeProvider/index.d.ts +6 -0
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +45 -0
- package/dist/components/Providers/{Toast → CLToastProvider}/CLToastProvider.vue.d.ts +1 -7
- package/dist/components/Providers/CLToastProvider/index.d.ts +4 -0
- package/dist/components/Providers/index.d.ts +2 -6
- package/dist/components/Typography/CLHeading/CLHeading.css +1 -0
- package/dist/components/Typography/CLHeading/CLHeading.js +6 -0
- package/dist/components/Typography/CLText/CLText.css +1 -0
- package/dist/components/Typography/CLText/CLText.js +6 -0
- package/dist/composables/useTheme.d.ts +26 -0
- package/dist/index.d.ts +0 -15
- package/dist/index.js +27 -5899
- package/package.json +124 -13
- package/dist/assets/styles.css +0 -1
- package/dist/components/Assets/index.d.ts +0 -2
- package/dist/components/Form/CLFormCharCounter/index.d.ts +0 -5
- package/dist/components/Form/CLFormLabel/index.d.ts +0 -5
- package/dist/components/Providers/Theme/CLThemeProvider.vue.d.ts +0 -26
- package/dist/components/Providers/Theme/base-theme.d.ts +0 -48
- package/dist/constants.d.ts +0 -22
- package/dist/chunks/{icons.QRYZHNAf.js → icons-QRYZHNAf.js} +0 -0
- package/dist/components/{Assets/CLIcon → CLIcon}/index.d.ts +0 -0
- package/dist/components/{Assets → CLIcon}/utils.d.ts +0 -0
- package/dist/components/{Table → CLTable}/CLTable.vue.d.ts +1 -1
- /package/dist/components/{Table → CLTable}/CLTableBody.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableCell.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableFooter.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableHeader.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableNestedCell.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/CLTableRow.vue.d.ts +0 -0
- /package/dist/components/{Table → CLTable}/utils.d.ts +0 -0
- /package/dist/components/Providers/{Theme → CLThemeProvider}/utils.d.ts +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { defineComponent as U, useCssVars as F, ref as b, computed as P, watch as X, onMounted as Z, onUnmounted as j, onBeforeUnmount as q, createElementBlock as k, openBlock as u, normalizeStyle as G, normalizeClass as c, unref as a, createElementVNode as g, createBlock as x, createCommentVNode as $, createVNode as L, withCtx as z, createTextVNode as S, toDisplayString as _, isRef as J } from "vue";
|
|
2
|
+
import { _ as M } from "./CLButton.vue_vue_type_style_index_0_lang-CrhjC50b.js";
|
|
3
|
+
import { _ as K } from "./CLIcon.vue_vue_type_style_index_0_lang-CZB8svPf.js";
|
|
4
|
+
import { _ as O } from "./CLProgress.vue_vue_type_style_index_0_lang-CSf7WiNb.js";
|
|
5
|
+
import { _ as Q } from "./CLText.vue_vue_type_style_index_0_lang-V7LSR7DF.js";
|
|
6
|
+
import { _ as W } from "./CLHeading.vue_vue_type_style_index_0_lang-DILwNSgn.js";
|
|
7
|
+
import { CLMode as R, CLColorVariants as N, CLToastPosition as Y, CLIconSizes as B, CLColors as C, CLHeadingTypes as p, CLTextTypes as I, CLSizes as w, CLIconNames as ee } from "../index.js";
|
|
8
|
+
import { i as A, g as te, e as oe } from "./base-theme-C9_Hz5HW.js";
|
|
9
|
+
import { u as ae } from "./useEsc-C9QIDZ_8.js";
|
|
10
|
+
import { u as se, g as ie, c as E, a as le } from "./useTheme-yoEfuNvB.js";
|
|
11
|
+
const ne = ({ color: e, variant: t }) => {
|
|
12
|
+
const { borderRadius: y, colors: d, darkMode: n } = se(), s = n.value ? R.Dark : R.Light, r = ie({
|
|
13
|
+
color: e,
|
|
14
|
+
colors: d.value,
|
|
15
|
+
mode: s,
|
|
16
|
+
variant: t
|
|
17
|
+
}), T = n.value ? "black" : "white";
|
|
18
|
+
let m;
|
|
19
|
+
return y.value && (m = E`&:not([class*='clll-toast--rounded-']){&.clll-toast.clll-toast--rounded{border-radius:var(--clll-${y.value});}}`), le(E`background-color:${T};color:${r?.text};.clll-toast__body{.clll-toast__content{.clll-toast__icon{background-color:${r?.bg ?? "transparent"};.clll-icon{color:${r?.text};}}}}.clll-toast__timer-bar{background-color:${r?.textDisabled};}`, m);
|
|
20
|
+
}, re = ["data-testid"], f = 300, o = "clll-toast", Ce = /* @__PURE__ */ U({
|
|
21
|
+
name: "CLToast",
|
|
22
|
+
__name: "CLToast",
|
|
23
|
+
props: {
|
|
24
|
+
actionLabel: {},
|
|
25
|
+
borderRadius: {},
|
|
26
|
+
color: { default: C.Secondary },
|
|
27
|
+
dismissTimer: { default: 5 },
|
|
28
|
+
icon: {},
|
|
29
|
+
iconSize: { default: B.Small },
|
|
30
|
+
message: {},
|
|
31
|
+
onAction: {},
|
|
32
|
+
onDismiss: {},
|
|
33
|
+
position: { default: Y.TopRight },
|
|
34
|
+
rounded: { type: Boolean, default: !0 },
|
|
35
|
+
testId: { default: "clll-toast" },
|
|
36
|
+
title: {},
|
|
37
|
+
variant: { default: N.Soft },
|
|
38
|
+
width: { default: "24rem" }
|
|
39
|
+
},
|
|
40
|
+
setup(e) {
|
|
41
|
+
F((i) => ({
|
|
42
|
+
v1fbbc974: i.width
|
|
43
|
+
}));
|
|
44
|
+
const t = e, y = b(), d = b(100), n = b(!1), s = b(), r = b(0), T = P(() => [
|
|
45
|
+
o,
|
|
46
|
+
t.borderRadius ? `${o}--${t.borderRadius}` : "",
|
|
47
|
+
t.dismissTimer ? `${o}--has-timer` : "",
|
|
48
|
+
t.icon ? `${o}--has-icon` : "",
|
|
49
|
+
t.message && !t.title ? `${o}--has-messageonly` : "",
|
|
50
|
+
n.value ? `${o}--mounted` : "",
|
|
51
|
+
t.onAction && t.actionLabel ? `${o}--has-action` : "",
|
|
52
|
+
t.rounded ? `${o}--rounded` : `${o}--box`,
|
|
53
|
+
t.title && !t.message ? `${o}--has-titleonly` : "",
|
|
54
|
+
t.title && t.message ? `${o}--has-titleandmessage` : "",
|
|
55
|
+
`${o}--${t.position}`
|
|
56
|
+
]), m = () => {
|
|
57
|
+
n.value = !1, s.value && (s.value.stop(), s.value.start(f, (i) => {
|
|
58
|
+
Math.min(i, f) === f && (s.value?.stop(), t.onDismiss?.());
|
|
59
|
+
})), V();
|
|
60
|
+
}, H = () => {
|
|
61
|
+
const i = t.dismissTimer * 1e3, l = i / 100;
|
|
62
|
+
s.value?.start(i, (v) => {
|
|
63
|
+
const h = Math.min(v / 100, l);
|
|
64
|
+
d.value = 100 - h / l * 100, h === l && m();
|
|
65
|
+
});
|
|
66
|
+
}, D = () => {
|
|
67
|
+
s.value || (s.value = oe(), s.value.start(100, (i) => {
|
|
68
|
+
Math.min(i, 100) === 100 && (s.value?.stop(), n.value = !0, t?.dismissTimer && s.value?.start(f, (v) => {
|
|
69
|
+
Math.min(v, f) === f && (s.value?.stop(), H());
|
|
70
|
+
}));
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
X(t, () => {
|
|
74
|
+
s.value && (s.value.stop(), s.value = void 0), t?.dismissTimer && D();
|
|
75
|
+
}), Z(() => {
|
|
76
|
+
A && (r.value = te() + 1, D());
|
|
77
|
+
}), j(() => {
|
|
78
|
+
A && t?.dismissTimer && s.value && (s.value.stop(), s.value = void 0), n.value = !1, t.onDismiss?.();
|
|
79
|
+
});
|
|
80
|
+
const { clearEventListeners: V } = ae({ escHandler: m });
|
|
81
|
+
return q(() => {
|
|
82
|
+
V();
|
|
83
|
+
}), (i, l) => (u(), k("output", {
|
|
84
|
+
ref_key: "elem",
|
|
85
|
+
ref: y,
|
|
86
|
+
class: c([a(T), a(ne)({ color: e.color, variant: e.variant })]),
|
|
87
|
+
"data-testid": e.testId,
|
|
88
|
+
style: G({ zIndex: a(r) })
|
|
89
|
+
}, [
|
|
90
|
+
g("div", {
|
|
91
|
+
class: c(`${o}__body`)
|
|
92
|
+
}, [
|
|
93
|
+
g("div", {
|
|
94
|
+
class: c(`${o}__content`)
|
|
95
|
+
}, [
|
|
96
|
+
e.icon ? (u(), k("div", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: c(`${o}__icon`)
|
|
99
|
+
}, [
|
|
100
|
+
L(a(K), {
|
|
101
|
+
name: e.icon,
|
|
102
|
+
size: e.iconSize
|
|
103
|
+
}, null, 8, ["name", "size"])
|
|
104
|
+
], 2)) : $("", !0),
|
|
105
|
+
g("div", {
|
|
106
|
+
class: c(`${o}__text`)
|
|
107
|
+
}, [
|
|
108
|
+
e.title ? (u(), x(a(W), {
|
|
109
|
+
key: 0,
|
|
110
|
+
color: a(C).Neutral,
|
|
111
|
+
"test-id": `${o}__title`,
|
|
112
|
+
type: a(p).Section
|
|
113
|
+
}, {
|
|
114
|
+
default: z(() => [
|
|
115
|
+
S(_(e.title), 1)
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["color", "test-id", "type"])) : $("", !0),
|
|
119
|
+
e.message ? (u(), x(a(Q), {
|
|
120
|
+
key: 1,
|
|
121
|
+
color: a(C).Neutral,
|
|
122
|
+
"test-id": `${o}__message`,
|
|
123
|
+
type: e.title ? a(I).Medium : a(I).Body
|
|
124
|
+
}, {
|
|
125
|
+
default: z(() => [
|
|
126
|
+
S(_(e.message), 1)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["color", "test-id", "type"])) : $("", !0)
|
|
130
|
+
], 2),
|
|
131
|
+
e.onAction && e.actionLabel ? (u(), k("div", {
|
|
132
|
+
key: 1,
|
|
133
|
+
class: c(`${o}__action-button`)
|
|
134
|
+
}, [
|
|
135
|
+
L(a(M), {
|
|
136
|
+
color: e.color,
|
|
137
|
+
"border-radius": e.borderRadius,
|
|
138
|
+
"on-click": e.onAction,
|
|
139
|
+
"test-id": `${o}__action-button`,
|
|
140
|
+
variant: e.variant
|
|
141
|
+
}, {
|
|
142
|
+
default: z(() => [
|
|
143
|
+
S(_(e.actionLabel), 1)
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}, 8, ["color", "border-radius", "on-click", "test-id", "variant"])
|
|
147
|
+
], 2)) : $("", !0)
|
|
148
|
+
], 2),
|
|
149
|
+
g("div", {
|
|
150
|
+
class: c(`${o}__dismiss-button`)
|
|
151
|
+
}, [
|
|
152
|
+
L(a(M), {
|
|
153
|
+
"aria-label": "Dismiss toast",
|
|
154
|
+
color: a(C).Neutral,
|
|
155
|
+
"border-radius": e.borderRadius,
|
|
156
|
+
"icon-before": a(ee).Delete,
|
|
157
|
+
"icon-size": a(B).Tiny,
|
|
158
|
+
"on-click": m,
|
|
159
|
+
size: a(w).Tiny,
|
|
160
|
+
"test-id": `${o}__dismiss-button`,
|
|
161
|
+
variant: a(N).Text
|
|
162
|
+
}, null, 8, ["color", "border-radius", "icon-before", "icon-size", "size", "test-id", "variant"])
|
|
163
|
+
], 2)
|
|
164
|
+
], 2),
|
|
165
|
+
e.dismissTimer ? (u(), x(a(O), {
|
|
166
|
+
key: 0,
|
|
167
|
+
modelValue: a(d),
|
|
168
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => J(d) ? d.value = v : null),
|
|
169
|
+
color: e.color,
|
|
170
|
+
rounded: !1,
|
|
171
|
+
size: a(w).Small
|
|
172
|
+
}, null, 8, ["modelValue", "color", "size"])) : $("", !0)
|
|
173
|
+
], 14, re));
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
export {
|
|
177
|
+
Ce as _
|
|
178
|
+
};
|