@codeandfunction/callaloo 4.9.4 → 4.9.5

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-3vGTMU-k.js +2 -0
  4. package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-BAfGE35e.js +2 -0
  5. package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-DPQxSLkQ.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-yF4CdZbV.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-CCyY39MJ.js +2 -0
  12. package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-CwdYGfO9.js +2 -0
  13. package/dist/chunks/CLNavLink.vue_vue_type_script_setup_true_lang-Ds2aJNK9.js +1 -0
  14. package/dist/chunks/CLPill.vue_vue_type_style_index_0_lang-BVsLNnfE.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-BIehrtqC.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,52 +0,0 @@
1
- import '../components/Typography/CLHeading/CLHeading.css';
2
- import { defineComponent as i, computed as r, createBlock as u, openBlock as f, resolveDynamicComponent as p, unref as o, normalizeStyle as m, normalizeClass as g, withCtx as C, renderSlot as y } from "vue";
3
- import { CLHeadingTypes as l, CLColors as $, CLAlign as L, CLHeadingLevels as n } from "../index.js";
4
- import { t as h } from "./utils-eBt2zUZl.js";
5
- const b = /* @__PURE__ */ i({
6
- name: "CLHeading",
7
- __name: "CLHeading",
8
- props: {
9
- align: { default: L.Left },
10
- bolder: { type: Boolean, default: !1 },
11
- color: { default: $.Secondary },
12
- level: {},
13
- testId: { default: "clll-heading" },
14
- truncate: { type: Boolean, default: !1 },
15
- type: { default: l.Title }
16
- },
17
- setup(a) {
18
- const e = a, t = "clll-heading", s = r(() => {
19
- if (e.level) return e.level;
20
- switch (e.type) {
21
- case l.Section:
22
- return n.H2;
23
- case l.SubSection:
24
- return n.H3;
25
- case l.PageTitle:
26
- case l.Title:
27
- default:
28
- return n.H1;
29
- }
30
- }), c = r(() => [
31
- t,
32
- `${t}--${e.align}`,
33
- `${t}--${e.color}`,
34
- `${t}--${e.truncate ? "wrap" : "nowrap"}`,
35
- `${t}--${e.type}`,
36
- e.bolder ? `${t}--bolder` : ""
37
- ]);
38
- return (d, H) => (f(), u(p(o(s)), {
39
- class: g(o(c)),
40
- "data-testid": a.testId,
41
- style: m(o(h)({ color: a.color }))
42
- }, {
43
- default: C(() => [
44
- y(d.$slots, "default")
45
- ]),
46
- _: 3
47
- }, 8, ["class", "data-testid", "style"]));
48
- }
49
- });
50
- export {
51
- b as _
52
- };
@@ -1,113 +0,0 @@
1
- import '../components/CLIcon/CLIcon.css';
2
- import { defineComponent as X, ref as M, computed as m, watch as _, onMounted as $, createElementBlock as v, openBlock as y, normalizeStyle as b, normalizeClass as L, unref as f, createElementVNode as N } from "vue";
3
- import { CLMode as C, CLColors as E, CLColorVariants as k, CLIconSizes as o } from "../index.js";
4
- import { g as T } from "./utils-D00IXMTR.js";
5
- import { useTheme as V } from "../composables/useTheme.js";
6
- import { i as x } from "./helper-qUkciePY.js";
7
- const q = ({ color: s = E.Neutral }) => {
8
- const { colors: e, darkMode: n } = V(), r = n.value ? C.Dark : C.Light;
9
- return {
10
- "--clll-icon-color": T({
11
- color: s,
12
- colors: e.value,
13
- mode: r,
14
- variant: k.Text
15
- })?.textBody ?? "inherit"
16
- };
17
- }, D = ["data-testid"], O = ["height", "width"], j = ["href"], J = /* @__PURE__ */ X({
18
- name: "CLIcon",
19
- __name: "CLIcon",
20
- props: {
21
- color: { default: E.Neutral },
22
- filled: { type: Boolean, default: !1 },
23
- name: {},
24
- size: { default: o.Small },
25
- testId: { default: "clll-icon" }
26
- },
27
- setup(s) {
28
- const e = s, n = "clll-icon", r = {
29
- [o.Tiny]: 20,
30
- [o.Small]: 24,
31
- [o.Medium]: 28,
32
- [o.Large]: 32,
33
- [o.XL]: 36,
34
- [o.XXL]: 40,
35
- [o.XXXL]: 44,
36
- [o.XXXXL]: 48
37
- }, i = /* @__PURE__ */ new Map(), a = M(!1), B = (t) => {
38
- if (!x) return !1;
39
- if (i.has(t))
40
- return i.get(t);
41
- const l = document.getElementById("clll-icons");
42
- if (!l)
43
- return !1;
44
- const c = document.getElementById(t), d = c !== null && l.contains(c);
45
- return i.set(t, d), d;
46
- }, h = m(() => !e.filled || e.name.endsWith("-filled") ? e.name : e.name.replace("tabler:", "tabler:") + "-filled"), p = m(() => {
47
- const t = h.value;
48
- return !e.filled || t === e.name || B(t) ? t : e.name;
49
- }), S = m(() => [
50
- n,
51
- `${n}--${e.name}`,
52
- `${n}--${e.size}`,
53
- { [`${n}--filled`]: e.filled && p.value === h.value }
54
- ]), w = m(() => ({
55
- ...q({ color: e.color }),
56
- width: r[e.size] + 4 + "px",
57
- height: r[e.size] + 4 + "px"
58
- }));
59
- _(() => a.value, (t) => {
60
- t && i.clear();
61
- });
62
- const z = async () => {
63
- if (!x) return;
64
- let t = document.getElementById("clll-icons");
65
- if (t) {
66
- a.value = !0;
67
- return;
68
- }
69
- try {
70
- const c = (/* @__PURE__ */ Object.assign({
71
- "/src/icons.svg": () => import("./icons-DllZKtC2.js").then((I) => I.default)
72
- }))["/src/icons.svg"];
73
- if (!c)
74
- return;
75
- const d = await c();
76
- if (t = document.getElementById("clll-icons"), t) {
77
- a.value = !0;
78
- return;
79
- }
80
- const u = document.createElement("div");
81
- u.id = "clll-icons", u.style.display = "none", u.innerHTML = d.toString();
82
- const g = () => {
83
- document.body.insertBefore(u, document.body.childNodes[0]), a.value = !0;
84
- };
85
- document.readyState === "loading" ? window.addEventListener("DOMContentLoaded", g, { once: !0 }) : g();
86
- } catch (l) {
87
- console.error("[Callaloo] Failed to load icon sprite:", l);
88
- }
89
- };
90
- return $(() => {
91
- z();
92
- }), (t, l) => (y(), v("span", {
93
- class: L(f(S)),
94
- "data-testid": s.testId,
95
- style: b(f(w))
96
- }, [
97
- (y(), v("svg", {
98
- "aria-hidden": "true",
99
- class: L(`${n}-sprite`),
100
- height: r[s.size],
101
- width: r[s.size],
102
- viewBox: "0 0 24 24"
103
- }, [
104
- N("use", {
105
- href: `#${f(p)}`
106
- }, null, 8, j)
107
- ], 10, O))
108
- ], 14, D));
109
- }
110
- });
111
- export {
112
- J as _
113
- };
@@ -1,149 +0,0 @@
1
- import '../assets/CLInputMessages.css';
2
- import { defineComponent as D, createElementBlock as w, openBlock as $, normalizeClass as y, unref as S, renderSlot as T, Fragment as q, renderList as P, normalizeStyle as G, createElementVNode as O, toDisplayString as A } from "vue";
3
- import { CLOrientation as z, CLMode as n, CLColorVariants as a, CLColors as F } from "../index.js";
4
- import { useTheme as v } from "../composables/useTheme.js";
5
- import { g as u } from "./utils-D00IXMTR.js";
6
- const f = "clll-form-field", R = /* @__PURE__ */ D({
7
- __name: "CLFormField",
8
- props: {
9
- fluid: { type: Boolean },
10
- hasPill: { type: Boolean },
11
- hasCharCounter: { type: Boolean },
12
- orientation: {}
13
- },
14
- setup(e) {
15
- return (r, t) => ($(), w("div", {
16
- class: y([
17
- f,
18
- e.fluid || e.orientation === S(z).Horizontal ? `${f}--fluid` : `${f}--fixed`,
19
- e.orientation ? `${f}--${e.orientation}` : "",
20
- e.hasPill ? `${f}--haspill` : "",
21
- e.hasCharCounter ? `${f}--hascharcounter` : ""
22
- ])
23
- }, [
24
- T(r.$slots, "default")
25
- ], 2));
26
- }
27
- }), j = ({ color: e, variant: r }) => {
28
- const { colors: t, darkMode: o } = v(), s = o.value ? n.Dark : n.Light, c = r === a.Ghost, b = u({
29
- color: e,
30
- colors: t.value,
31
- mode: s,
32
- variant: a.Solid
33
- }), l = u({
34
- color: e,
35
- colors: t.value,
36
- mode: s,
37
- variant: a.Outline
38
- }), h = o.value ? "black" : "white", g = l?.border, C = l?.disabled, p = o.value ? "black" : b?.textDisabled, k = l?.focus, m = l?.focus, i = l?.text, d = l?.textDisabled, x = L();
39
- return {
40
- "--clll-checkbox-bg": c ? "transparent" : h ?? "white",
41
- "--clll-checkbox-border": c ? "transparent" : g ?? "transparent",
42
- "--clll-checkbox-disabled-border": C ?? "transparent",
43
- "--clll-checkbox-disabled-bg": p ?? "transparent",
44
- "--clll-checkbox-checked-bg": h ?? "white",
45
- "--clll-checkbox-focus-border": k ?? "transparent",
46
- "--clll-checkbox-focus-shadow": m ?? "transparent",
47
- "--clll-checkbox-icon-color": i ?? "inherit",
48
- "--clll-checkbox-disabled-icon-color": d ?? "transparent",
49
- "--clll-checkbox-indicator-color": i ?? "inherit",
50
- "--clll-checkbox-disabled-indicator-color": d ?? "transparent",
51
- "--clll-checkbox-theme-radius": "var(--clll-default-radius)",
52
- "--clll-checkbox-outline-width": c ? "0px" : "2px",
53
- "--clll-checkbox-required-asterisk-color": x ?? "red"
54
- };
55
- }, J = ({ color: e, variant: r }) => {
56
- const { colors: t, darkMode: o } = v(), s = o.value ? n.Dark : n.Light, c = r === a.Ghost, b = u({
57
- color: e,
58
- colors: t.value,
59
- mode: s,
60
- variant: a.Solid
61
- }), l = u({
62
- color: e,
63
- colors: t.value,
64
- mode: s,
65
- variant: a.Outline
66
- }), h = o.value ? "black" : "white", g = o.value ? "black" : b?.textDisabled, C = l?.border, p = l?.disabled, k = o.value ? "black" : b?.textDisabled, m = l?.focus, i = l?.focus, d = l?.text, x = l?.focus, M = L();
67
- return {
68
- "--clll-input-bg": c ? "transparent" : h ?? "white",
69
- "--clll-input-border": c ? "transparent" : C ?? "transparent",
70
- "--clll-input-disabled-border": p ?? "transparent",
71
- "--clll-input-disabled-bg": k ?? "transparent",
72
- "--clll-input-readonly-border": p ?? "transparent",
73
- "--clll-input-readonly-bg": k ?? "transparent",
74
- "--clll-input-focus-border": m ?? "transparent",
75
- "--clll-input-focus-shadow": i ?? "transparent",
76
- "--clll-input-text": d ?? "inherit",
77
- "--clll-input-text-placeholder": x ?? "transparent",
78
- "--clll-input-grouped-bg": g ?? "transparent",
79
- "--clll-input-prefix-suffix-color": x ?? "transparent",
80
- "--clll-input-theme-radius": "var(--clll-default-radius)",
81
- "--clll-input-ghost-padding": c ? "0" : void 0,
82
- "--clll-input-required-asterisk-color": M ?? "red"
83
- };
84
- }, V = ({ color: e }) => {
85
- const { colors: r, darkMode: t } = v(), o = t.value ? n.Dark : n.Light;
86
- return {
87
- "--clll-input-message-color": u({
88
- color: e,
89
- colors: r.value,
90
- mode: o,
91
- variant: a.Outline
92
- })?.textBody ?? "inherit"
93
- };
94
- }, K = ({ color: e, variant: r }) => {
95
- const { colors: t, darkMode: o } = v(), s = o.value ? n.Dark : n.Light, c = r === a.Ghost, b = u({
96
- color: e,
97
- colors: t.value,
98
- mode: s,
99
- variant: a.Solid
100
- }), l = u({
101
- color: e,
102
- colors: t.value,
103
- mode: s,
104
- variant: a.Outline
105
- }), h = o.value ? "black" : "white", g = l?.border, C = l?.disabled, p = o.value ? "black" : b?.textDisabled, k = l?.focus, m = l?.focus, i = l?.text, d = l?.focus, x = L();
106
- return {
107
- "--clll-select-bg": c ? "transparent" : h ?? "white",
108
- "--clll-select-border": c ? "transparent" : g ?? "transparent",
109
- "--clll-select-disabled-border": C ?? "transparent",
110
- "--clll-select-disabled-bg": p ?? "transparent",
111
- "--clll-select-focus-border": k ?? "transparent",
112
- "--clll-select-focus-shadow": m ?? "transparent",
113
- "--clll-select-text": i ?? "inherit",
114
- "--clll-select-text-placeholder": d ?? "transparent",
115
- "--clll-select-icon-color": i ?? "inherit",
116
- "--clll-select-disabled-icon-color": d ?? "transparent",
117
- "--clll-select-theme-radius": "var(--clll-default-radius)",
118
- "--clll-select-ghost-padding": c ? "0" : void 0,
119
- "--clll-select-required-asterisk-color": x ?? "red"
120
- };
121
- }, L = () => {
122
- const { colors: e, darkMode: r } = v();
123
- return r.value ? e.value.danger?.["400"] : e.value.danger?.["700"];
124
- }, B = "clll-input__message", Q = /* @__PURE__ */ D({
125
- __name: "CLInputMessages",
126
- props: {
127
- id: {},
128
- messages: {},
129
- messageType: { default: F.Neutral }
130
- },
131
- setup(e) {
132
- return (r, t) => ($(!0), w(q, null, P(e.messages, (o, s) => ($(), w("span", {
133
- key: `${e.id}-message-${s}`,
134
- class: y([B, `${B}--${e.messageType}`]),
135
- style: G(S(V)({ color: e.messageType }))
136
- }, [
137
- O("span", {
138
- class: y([`${B}__text`])
139
- }, A(o), 3)
140
- ], 6))), 128));
141
- }
142
- });
143
- export {
144
- R as _,
145
- Q as a,
146
- j as c,
147
- J as i,
148
- K as s
149
- };
@@ -1,69 +0,0 @@
1
- import '../components/Navigation/CLLink/CLLink.css';
2
- import { defineComponent as k, computed as C, createElementBlock as x, openBlock as s, normalizeStyle as L, normalizeClass as b, unref as n, renderSlot as h, createBlock as v, createCommentVNode as y } from "vue";
3
- import { _ as g } from "./CLIcon.vue_vue_type_style_index_0_lang-Dhr2tI-g.js";
4
- import { CLMode as d, CLColors as u, CLColorVariants as $, CLLinkTarget as B, CLIconSizes as z, CLIconNames as I } from "../index.js";
5
- import { g as S } from "./utils-D00IXMTR.js";
6
- import { useTheme as D } from "../composables/useTheme.js";
7
- const H = ({
8
- color: e = u.Primary,
9
- underline: r = !0
10
- }) => {
11
- const { colors: t, darkMode: o } = D(), a = o.value ? d.Dark : d.Light, l = S({
12
- color: e,
13
- colors: t.value,
14
- mode: a,
15
- variant: $.Outline
16
- }), i = l?.border, m = l?.textDisabled, c = l?.textBody, f = o.value ? l?.borderHover : l?.textDisabled;
17
- return {
18
- "--clll-link-text-color": c ?? "inherit",
19
- "--clll-link-text-hover": f ?? "inherit",
20
- "--clll-link-underline-color": r ? i ?? "transparent" : "transparent",
21
- "--clll-link-underline-hover": r ? m ?? "transparent" : "transparent",
22
- "--clll-link-focus-border": c ?? "transparent",
23
- "--clll-link-focus-shadow": l?.shadow ?? "transparent"
24
- };
25
- }, T = ["aria-label", "data-testid", "href", "rel", "target"], P = /* @__PURE__ */ k({
26
- name: "CLLink",
27
- __name: "CLLink",
28
- props: {
29
- ariaLabel: {},
30
- color: { default: u.Primary },
31
- external: { type: Boolean, default: !1 },
32
- href: {},
33
- onClick: {},
34
- rel: { default: "noreferrer noopener" },
35
- target: { default: B.Self },
36
- testId: { default: "clll-link" },
37
- underline: { type: Boolean, default: !0 }
38
- },
39
- setup(e) {
40
- const r = e, t = "clll-link", o = C(() => [
41
- t,
42
- `${t}--${r.color}`,
43
- `${t}--${r.external ? "external" : "internal"}`,
44
- r.underline ? `${t}--underline` : `${t}--nounderline`
45
- ]);
46
- return (a, l) => (s(), x("a", {
47
- "aria-label": e.ariaLabel,
48
- class: b(n(o)),
49
- "data-testid": e.testId,
50
- href: e.href,
51
- rel: e.external ? e.rel : "",
52
- target: e.target,
53
- style: L(n(H)({ color: e.color, underline: e.underline })),
54
- onClick: l[0] || (l[0] = //@ts-ignore
55
- (...i) => e.onClick && e.onClick(...i))
56
- }, [
57
- h(a.$slots, "default"),
58
- e.external ? (s(), v(n(g), {
59
- key: 0,
60
- color: e.color,
61
- name: n(I).ExternalLink,
62
- size: n(z).Tiny
63
- }, null, 8, ["color", "name", "size"])) : y("", !0)
64
- ], 14, T));
65
- }
66
- });
67
- export {
68
- P as _
69
- };
@@ -1,176 +0,0 @@
1
- import '../components/Modals/CLModal/CLModal.css';
2
- import { defineComponent as W, useTemplateRef as F, useSlots as U, ref as Z, computed as m, watch as j, onMounted as q, onBeforeUnmount as A, createElementBlock as p, createCommentVNode as v, openBlock as w, normalizeStyle as y, normalizeClass as l, unref as n, createElementVNode as d, createBlock as B, renderSlot as $, withCtx as G, createTextVNode as J, toDisplayString as K } from "vue";
3
- import { _ as P } from "./CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
4
- import { _ as Q } from "./CLHeading.vue_vue_type_style_index_0_lang-DH5oJc1C.js";
5
- import { CLMode as k, CLColors as T, CLColorVariants as N, CLBorderRadius as X, CLIconSizes as Y, CLIconNames as ee, CLHeadingTypes as oe } from "../index.js";
6
- import { g as te } from "./utils-D00IXMTR.js";
7
- import { useTheme as ne } from "../composables/useTheme.js";
8
- import { useEsc as le } from "../composables/useEsc.js";
9
- import { c as S, i as a } from "./helper-qUkciePY.js";
10
- const se = () => {
11
- const { colors: t, darkMode: _ } = ne(), f = _.value ? k.Dark : k.Light, r = te({
12
- color: T.Neutral,
13
- colors: t.value,
14
- mode: f,
15
- variant: N.Solid
16
- }), c = _.value ? "black" : "white";
17
- return {
18
- "--clll-modal-overlay-bg": r?.bg ?? "transparent",
19
- "--clll-modal-content-bg": c,
20
- "--clll-modal-theme-radius": "var(--clll-default-radius)"
21
- };
22
- }, ae = ["id", "data-testid"], re = ["aria-labelledby"], we = /* @__PURE__ */ W({
23
- name: "CLModal",
24
- __name: "CLModal",
25
- props: {
26
- borderRadius: { default: void 0 },
27
- close: { type: Boolean, default: !0 },
28
- closeBorderRadius: { default: X.Full },
29
- dismissible: { type: Boolean, default: !0 },
30
- fullscreen: { type: Boolean, default: !1 },
31
- isOpen: { type: Boolean, default: !1 },
32
- maxWidth: { default: "640px" },
33
- modalId: {},
34
- onClose: { type: Function, default: void 0 },
35
- overlay: { type: Boolean, default: !0 },
36
- testId: { default: "clll-modal" },
37
- title: { default: void 0 },
38
- zIndex: { default: 100 }
39
- },
40
- emits: ["modal-open", "modal-close"],
41
- setup(t, { emit: _ }) {
42
- const f = _, r = F("modal-window"), c = U(), o = t, e = "clll-modal", x = "clll-prevent-scroll", u = Z(), I = () => {
43
- a && window?.document.body.classList.add(x);
44
- }, C = () => {
45
- a && window?.document.body.classList.remove(x);
46
- }, R = m(() => [
47
- e
48
- ]), E = m(() => [
49
- `${e}__window`,
50
- o.fullscreen ? `${e}__window--fullscreen` : ""
51
- ]), M = m(() => [
52
- `${e}__content`,
53
- o.borderRadius ? `${e}__content--${o.borderRadius}` : "",
54
- o.close ? `${e}__content--has-close-button` : `${e}__content--has-no-close-button`,
55
- c.body ? `${e}__content--has-body` : `${e}__content--has-no-body`,
56
- c.footer ? `${e}__content--has-footer` : `${e}__content--has-no-footer`,
57
- c.header || o.title ? `${e}__content--has-header` : `${e}__content--has-no-header`,
58
- o.title ? `${e}__content--has-title` : `${e}__content--has-no-title`
59
- ]), O = m(() => o.zIndex === "auto" || S(o.zIndex) ? o.zIndex : o.zIndex.toString()), V = m(() => o.zIndex === "auto" ? o.zIndex : ((S(o.zIndex) ? parseInt(o.zIndex, 10) : o.zIndex) + 100).toString()), H = (s) => {
60
- try {
61
- const i = s?.target, g = r.value;
62
- return a && g && !g.contains(i) ? !0 : void 0;
63
- } catch (i) {
64
- console.error(i);
65
- return;
66
- }
67
- }, b = (s) => {
68
- try {
69
- H(s) && (a && window.removeEventListener("mousedown", b), L());
70
- } catch (i) {
71
- console.error(i);
72
- }
73
- }, h = () => {
74
- a && window.removeEventListener("mousedown", b);
75
- }, z = () => {
76
- a && (u.value && a && window.clearTimeout(u.value), h(), C());
77
- }, L = () => {
78
- o.isOpen && (o.onClose?.(), z());
79
- };
80
- j(o, (s) => {
81
- s.isOpen ? (f("modal-open"), I(), r.value && r.value.focus(), a && s.dismissible && (h(), u.value = window.setTimeout(() => {
82
- window.addEventListener("mousedown", b);
83
- }, 100))) : (r.value && r.value.blur(), C(), h(), u.value && a && window.clearTimeout(u.value), f("modal-close"));
84
- }), q(() => {
85
- o.isOpen && a && (I(), r.value && r.value.focus());
86
- });
87
- const { clearEventListeners: D } = le({ escHandler: o.dismissible ? L : void 0 });
88
- return A(() => {
89
- z(), D();
90
- }), (s, i) => t.isOpen ? (w(), p("div", {
91
- key: 0,
92
- id: t.modalId,
93
- class: l(n(R)),
94
- "data-testid": t.testId,
95
- style: y({ ...n(se)(), zIndex: n(O) })
96
- }, [
97
- d("div", {
98
- class: l(n(E)),
99
- style: y({ zIndex: n(V) })
100
- }, [
101
- d("div", {
102
- ref: "modal-window",
103
- "aria-modal": "true",
104
- "aria-labelledby": `${e}__content__header__title`,
105
- class: l(n(M)),
106
- role: "dialog",
107
- tabindex: -1,
108
- style: y({ "--clll-modal-max-width": t.maxWidth })
109
- }, [
110
- d("div", {
111
- class: l(`${e}__close-button`)
112
- }, [
113
- t.onClose && t.close ? (w(), B(n(P), {
114
- key: 0,
115
- "aria-label": "Close modal",
116
- "border-radius": t.closeBorderRadius,
117
- color: n(T).Neutral,
118
- "icon-before": n(ee).Delete,
119
- "icon-size": n(Y).Tiny,
120
- "on-click": t.onClose,
121
- "test-id": `${e}__close-button`,
122
- variant: n(N).Text
123
- }, null, 8, ["border-radius", "color", "icon-before", "icon-size", "on-click", "test-id", "variant"])) : v("", !0)
124
- ], 2),
125
- d("div", {
126
- class: l(`${e}__content__header`)
127
- }, [
128
- d("div", {
129
- class: l(`${e}__content__title`)
130
- }, [
131
- d("div", {
132
- class: l(`${e}__content__header__container`)
133
- }, [
134
- t.title ? (w(), B(n(Q), {
135
- key: 0,
136
- id: `${e}__content__header__title`,
137
- class: l(`${e}__content__header__title`),
138
- type: n(oe).Section
139
- }, {
140
- default: G(() => [
141
- J(K(t.title), 1)
142
- ]),
143
- _: 1
144
- }, 8, ["id", "class", "type"])) : v("", !0),
145
- $(s.$slots, "header")
146
- ], 2)
147
- ], 2)
148
- ], 2),
149
- d("div", {
150
- class: l(`${e}__content__scroller`)
151
- }, [
152
- d("div", {
153
- class: l(`${e}__content__body`)
154
- }, [
155
- $(s.$slots, "body")
156
- ], 2)
157
- ], 2),
158
- d("div", {
159
- class: l(`${e}__content__footer`)
160
- }, [
161
- $(s.$slots, "footer")
162
- ], 2)
163
- ], 14, re)
164
- ], 6),
165
- t.overlay ? (w(), p("div", {
166
- key: 0,
167
- ref: "overlay-ref",
168
- class: l(`${e}__overlay`),
169
- style: y({ zIndex: t.zIndex })
170
- }, null, 6)) : v("", !0)
171
- ], 14, ae)) : v("", !0);
172
- }
173
- });
174
- export {
175
- we as _
176
- };
@@ -1,44 +0,0 @@
1
- import { defineComponent as i, createBlock as o, openBlock as c, unref as d, withCtx as f, renderSlot as m } from "vue";
2
- import { _ as u } from "./CLLink.vue_vue_type_style_index_0_lang-BXysZqLn.js";
3
- import { CLColors as k } from "../index.js";
4
- const x = /* @__PURE__ */ i({
5
- name: "CLNavLink",
6
- __name: "CLNavLink",
7
- props: {
8
- ariaLabel: {},
9
- color: { default: k.Neutral },
10
- external: { type: Boolean, default: !1 },
11
- href: {},
12
- id: {},
13
- onClick: {},
14
- rel: { default: "noreferrer noopener" },
15
- target: {},
16
- testId: { default: "clll-navlink" }
17
- },
18
- emits: ["click"],
19
- setup(e, { emit: a }) {
20
- const l = e, r = a, n = (t) => {
21
- l.onClick && l.onClick(t), r("click", t);
22
- };
23
- return (t, s) => (c(), o(d(u), {
24
- id: e.id,
25
- "aria-label": e.ariaLabel,
26
- color: e.color,
27
- "data-testid": e.testId,
28
- external: e.external,
29
- href: e.href,
30
- rel: e.rel,
31
- target: e.target,
32
- underline: !e.onClick,
33
- onClick: n
34
- }, {
35
- default: f(() => [
36
- m(t.$slots, "default")
37
- ]),
38
- _: 3
39
- }, 8, ["id", "aria-label", "color", "data-testid", "external", "href", "rel", "target", "underline"]));
40
- }
41
- });
42
- export {
43
- x as _
44
- };