@codeandfunction/callaloo 4.3.0 → 4.5.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 (49) hide show
  1. package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-1hhRUMgR.js → CLButton.vue_vue_type_style_index_0_lang-Ddoes-Ee.js} +1 -1
  2. package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-CImCt0f6.js → CLCard.vue_vue_type_style_index_0_lang-DIPohqn6.js} +2 -2
  3. package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-r6hBiMgq.js → CLIcon.vue_vue_type_style_index_0_lang-CX2_4ukW.js} +2 -2
  4. package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-BTjLe8m6.js → CLLink.vue_vue_type_style_index_0_lang-BXyEYnRQ.js} +1 -1
  5. package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-B5DiOsML.js → CLNavLink.vue_vue_type_script_setup_true_lang-DG5Au49r.js} +1 -1
  6. package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-MaGtvvXD.js → CLPill.vue_vue_type_style_index_0_lang-D1W4PnWB.js} +2 -2
  7. package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-CdL1bLuX.js → CLToast.vue_vue_type_style_index_0_lang-DMGCjGnQ.js} +3 -3
  8. package/dist/chunks/{helper-oZuRnF9g.js → helper-qUkciePY.js} +2 -2
  9. package/dist/chunks/icons-DllZKtC2.js +4 -0
  10. package/dist/chunks/utils-Ca0eSzWQ.js +49 -0
  11. package/dist/components/Buttons/CLButton/CLButton.js +1 -1
  12. package/dist/components/CLIcon/CLIcon.js +1 -1
  13. package/dist/components/Containers/CLCard/CLCard.js +1 -1
  14. package/dist/components/Containers/CLCarousel/CLCarousel.js +2 -2
  15. package/dist/components/Containers/CLDisclosure/CLDisclosure.js +3 -3
  16. package/dist/components/Containers/CLDrawer/CLDrawer.css +1 -0
  17. package/dist/components/Containers/CLDrawer/CLDrawer.js +121 -0
  18. package/dist/components/Containers/CLDrawer/CLDrawer.vue.d.ts +48 -0
  19. package/dist/components/Containers/CLDrawer/index.d.ts +4 -0
  20. package/dist/components/Containers/index.d.ts +1 -0
  21. package/dist/components/Containers/utils.d.ts +4 -0
  22. package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
  23. package/dist/components/Form/CLInput/CLInput.css +1 -1
  24. package/dist/components/Form/CLInput/CLInput.js +174 -166
  25. package/dist/components/Form/CLInput/CLInputPrefix.vue.d.ts +3 -0
  26. package/dist/components/Form/CLInput/CLInputSuffix.vue.d.ts +3 -0
  27. package/dist/components/Form/CLSelect/CLSelect.js +1 -1
  28. package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
  29. package/dist/components/Indicators/CLPill/CLPill.js +1 -1
  30. package/dist/components/Modals/CLModal/CLModal.js +2 -2
  31. package/dist/components/Modals/CLModal/CLModal.vue.d.ts +4 -4
  32. package/dist/components/Navigation/CLLink/CLLink.js +1 -1
  33. package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
  34. package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
  35. package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +3 -3
  36. package/dist/components/Popups/CLToast/CLToast.js +1 -1
  37. package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +4 -4
  38. package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
  39. package/dist/composables/index.d.ts +2 -0
  40. package/dist/composables/useDropdown.js +1 -1
  41. package/dist/composables/useElementSize.d.ts +35 -0
  42. package/dist/composables/useElementSize.js +74 -0
  43. package/dist/composables/useEsc.js +1 -1
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.js +8 -7
  46. package/dist/types.d.ts +6 -0
  47. package/package.json +45 -41
  48. package/dist/chunks/icons-B1yhKPll.js +0 -4
  49. package/dist/chunks/utils-BwiU4N7s.js +0 -37
@@ -1,139 +1,145 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLInput.css';
3
3
  import '../../../assets/shared/form-utilities.css';
4
- import { defineComponent as I, computed as z, createBlock as x, createElementBlock as $, unref as i, openBlock as s, normalizeClass as y, Fragment as M, createTextVNode as q, toDisplayString as P, createVNode as K, ref as A, watch as N, createCommentVNode as v, mergeModels as w, useTemplateRef as Q, useModel as W, withCtx as Y, createElementVNode as S, normalizeStyle as Z, withDirectives as _, vModelDynamic as ee, isRef as le } from "vue";
5
- import { _ as te, i as ie, a as ae } from "../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-CF_lxNr8.js";
4
+ import { defineComponent as p, computed as z, createBlock as b, createElementBlock as $, unref as i, openBlock as r, normalizeClass as x, Fragment as M, createTextVNode as q, toDisplayString as P, createVNode as K, ref as A, watch as N, createCommentVNode as v, mergeModels as w, useTemplateRef as Q, useModel as W, withCtx as Y, createElementVNode as S, normalizeStyle as Z, withDirectives as _, vModelDynamic as ee, isRef as le } from "vue";
5
+ import { _ as ae, i as ie, a as te } from "../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-CF_lxNr8.js";
6
6
  import { _ as oe } from "../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BcHOofhM.js";
7
7
  import { _ as ne } from "../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-CJ4VrvmR.js";
8
- import { _ as E } from "../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-r6hBiMgq.js";
9
- import { _ as F } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-1hhRUMgR.js";
10
- import { CLSizes as a, CLColors as k, CLBorderRadius as V, CLIconSizes as r, CLColorVariants as p, CLIconNames as X, CLInputTypes as u, CLOrientation as R, CLCharCounterLayout as ue } from "../../../index.js";
11
- import { _ as re } from "../../../chunks/CLPill.vue_vue_type_style_index_0_lang-MaGtvvXD.js";
12
- const de = ["data-testid"], H = /* @__PURE__ */ I({
8
+ import { _ as E } from "../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-CX2_4ukW.js";
9
+ import { _ as F } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Ddoes-Ee.js";
10
+ import { CLSizes as o, CLColors as k, CLBorderRadius as V, CLIconSizes as u, CLColorVariants as I, CLIconNames as X, CLInputTypes as d, CLOrientation as R, CLCharCounterLayout as de } from "../../../index.js";
11
+ import { _ as ue } from "../../../chunks/CLPill.vue_vue_type_style_index_0_lang-D1W4PnWB.js";
12
+ const se = ["data-testid"], H = /* @__PURE__ */ p({
13
13
  name: "CLInputPrefix",
14
14
  __name: "CLInputPrefix",
15
15
  props: {
16
16
  ariaLabel: { default: void 0 },
17
17
  borderRadius: { default: V.XS },
18
18
  color: { default: k.Neutral },
19
+ disabled: { type: Boolean, default: !1 },
19
20
  grouped: { type: Boolean, default: !1 },
20
21
  onClick: { type: Function, default: void 0 },
21
22
  prefix: {},
22
- size: { default: a.Small },
23
+ size: { default: o.Small },
23
24
  testId: { default: "clll-input-prefix" }
24
25
  },
25
26
  setup(e) {
26
- const o = e, c = "clll-input", l = (n) => Object.values(X).includes(n), C = (n) => n, t = (n) => n?.replace("rounded-", "") || "xs", b = {
27
- [a.Tiny]: r.Tiny,
28
- [a.Small]: r.Small,
29
- [a.Medium]: r.Medium,
30
- [a.Large]: r.Large,
31
- [a.XL]: r.XL,
32
- [a.XXL]: r.XXL,
33
- [a.XXXL]: r.XXXL,
34
- [a.XXXXL]: r.XXXXL
35
- }, g = z(() => !!o.onClick && l(o.prefix)), d = z(() => [
27
+ const t = e, c = "clll-input", l = (n) => Object.values(X).includes(n), C = (n) => n, a = (n) => n?.replace("rounded-", "") || "xs", y = {
28
+ [o.Tiny]: u.Tiny,
29
+ [o.Small]: u.Small,
30
+ [o.Medium]: u.Medium,
31
+ [o.Large]: u.Large,
32
+ [o.XL]: u.XL,
33
+ [o.XXL]: u.XXL,
34
+ [o.XXXL]: u.XXXL,
35
+ [o.XXXXL]: u.XXXXL
36
+ }, g = z(() => !!t.onClick && l(t.prefix)), s = z(() => [
36
37
  `${c}__input-prefix`,
37
38
  "form-addon-flex",
38
39
  "form-addon-flex--left",
39
- l(o.prefix) ? `${c}__input-prefix--icon form-addon-flex--icon` : `${c}__input-prefix--string form-addon-flex--string`,
40
+ l(t.prefix) ? `${c}__input-prefix--icon form-addon-flex--icon` : `${c}__input-prefix--string form-addon-flex--string`,
40
41
  { "--interactive": g },
41
- { "--input-group": o.grouped || o.prefix },
42
- o.grouped ? `form-addon-radius--left-${t(o.borderRadius)}` : ""
42
+ { "--input-group": t.grouped || t.prefix },
43
+ { "--disabled": t.disabled },
44
+ t.grouped ? `form-addon-radius--left-${a(t.borderRadius)}` : ""
43
45
  ]), L = (n) => {
44
- o.onClick && n && (n.stopPropagation(), o.onClick(n));
46
+ t.onClick && n && !t.disabled && (n.stopPropagation(), t.onClick(n));
45
47
  };
46
- return (n, T) => i(g) ? (s(), x(i(F), {
48
+ return (n, T) => i(g) ? (r(), b(i(F), {
47
49
  key: 0,
48
50
  "aria-label": e.ariaLabel,
49
51
  "border-radius": i(V).None,
50
- class: y(i(d)),
52
+ class: x(i(s)),
51
53
  color: e.color,
54
+ disabled: e.disabled,
52
55
  "icon-before": C(e.prefix),
53
- "icon-size": b[e.size],
56
+ "icon-size": y[e.size],
54
57
  "on-click": L,
55
58
  size: e.size,
56
59
  "test-id": e.testId,
57
- variant: i(p).Ghost,
60
+ variant: i(I).Text,
58
61
  wrap: ""
59
- }, null, 8, ["aria-label", "border-radius", "class", "color", "icon-before", "icon-size", "size", "test-id", "variant"])) : (s(), $("span", {
62
+ }, null, 8, ["aria-label", "border-radius", "class", "color", "disabled", "icon-before", "icon-size", "size", "test-id", "variant"])) : (r(), $("span", {
60
63
  key: 1,
61
- class: y(i(d)),
64
+ class: x(i(s)),
62
65
  "data-testid": e.testId
63
66
  }, [
64
- l(e.prefix) ? (s(), x(i(E), {
67
+ l(e.prefix) ? (r(), b(i(E), {
65
68
  key: 0,
66
69
  name: C(e.prefix),
67
- size: b[e.size],
70
+ size: y[e.size],
68
71
  color: e.color
69
- }, null, 8, ["name", "size", "color"])) : (s(), $(M, { key: 1 }, [
72
+ }, null, 8, ["name", "size", "color"])) : (r(), $(M, { key: 1 }, [
70
73
  q(P(e.prefix), 1)
71
74
  ], 64))
72
- ], 10, de));
75
+ ], 10, se));
73
76
  }
74
- }), se = ["data-testid"], O = /* @__PURE__ */ I({
77
+ }), re = ["data-testid"], O = /* @__PURE__ */ p({
75
78
  name: "CLInputSuffix",
76
79
  __name: "CLInputSuffix",
77
80
  props: {
78
81
  ariaLabel: { default: void 0 },
79
82
  borderRadius: { default: V.XS },
80
83
  color: { default: k.Neutral },
84
+ disabled: { type: Boolean, default: !1 },
81
85
  grouped: { type: Boolean, default: !1 },
82
86
  onClick: { type: Function, default: void 0 },
83
87
  suffix: {},
84
- size: { default: a.Small },
88
+ size: { default: o.Small },
85
89
  testId: { default: "clll-input-suffix" }
86
90
  },
87
91
  setup(e) {
88
- const o = e, c = "clll-input", l = (n) => Object.values(X).includes(n), C = (n) => n, t = (n) => n?.replace("rounded-", "") || "xs", b = {
89
- [a.Tiny]: r.Tiny,
90
- [a.Small]: r.Small,
91
- [a.Medium]: r.Medium,
92
- [a.Large]: r.Large,
93
- [a.XL]: r.XL,
94
- [a.XXL]: r.XXL,
95
- [a.XXXL]: r.XXXL,
96
- [a.XXXXL]: r.XXXXL
97
- }, g = z(() => !!o.onClick && l(o.suffix)), d = z(() => [
92
+ const t = e, c = "clll-input", l = (n) => Object.values(X).includes(n), C = (n) => n, a = (n) => n?.replace("rounded-", "") || "xs", y = {
93
+ [o.Tiny]: u.Tiny,
94
+ [o.Small]: u.Small,
95
+ [o.Medium]: u.Medium,
96
+ [o.Large]: u.Large,
97
+ [o.XL]: u.XL,
98
+ [o.XXL]: u.XXL,
99
+ [o.XXXL]: u.XXXL,
100
+ [o.XXXXL]: u.XXXXL
101
+ }, g = z(() => !!t.onClick && l(t.suffix)), s = z(() => [
98
102
  `${c}__input-suffix`,
99
103
  "form-addon-flex",
100
104
  "form-addon-flex--right",
101
- l(o.suffix) ? `${c}__input-suffix--icon form-addon-flex--icon` : `${c}__input-suffix--string form-addon-flex--string`,
105
+ l(t.suffix) ? `${c}__input-suffix--icon form-addon-flex--icon` : `${c}__input-suffix--string form-addon-flex--string`,
102
106
  { "--interactive": g },
103
- { "--input-group": o.grouped || o.suffix },
104
- o.grouped ? `form-addon-radius--right-${t(o.borderRadius)}` : ""
107
+ { "--input-group": t.grouped || t.suffix },
108
+ { "--disabled": t.disabled },
109
+ t.grouped ? `form-addon-radius--right-${a(t.borderRadius)}` : ""
105
110
  ]), L = (n) => {
106
- o.onClick && n && (n.stopPropagation(), o.onClick(n));
111
+ t.onClick && n && !t.disabled && (n.stopPropagation(), t.onClick(n));
107
112
  };
108
- return (n, T) => i(g) ? (s(), x(i(F), {
113
+ return (n, T) => i(g) ? (r(), b(i(F), {
109
114
  key: 0,
110
115
  "aria-label": e.ariaLabel,
111
116
  "border-radius": i(V).None,
112
- class: y(i(d)),
117
+ class: x(i(s)),
113
118
  color: e.color,
119
+ disabled: e.disabled,
114
120
  "icon-before": C(e.suffix),
115
- "icon-size": b[e.size],
121
+ "icon-size": y[e.size],
116
122
  "on-click": L,
117
123
  size: e.size,
118
124
  "test-id": e.testId,
119
- variant: i(p).Ghost,
125
+ variant: i(I).Text,
120
126
  wrap: ""
121
- }, null, 8, ["aria-label", "border-radius", "class", "color", "icon-before", "icon-size", "size", "test-id", "variant"])) : (s(), $("span", {
127
+ }, null, 8, ["aria-label", "border-radius", "class", "color", "disabled", "icon-before", "icon-size", "size", "test-id", "variant"])) : (r(), $("span", {
122
128
  key: 1,
123
- class: y(i(d)),
129
+ class: x(i(s)),
124
130
  "data-testid": e.testId
125
131
  }, [
126
- l(e.suffix) ? (s(), x(i(E), {
132
+ l(e.suffix) ? (r(), b(i(E), {
127
133
  key: 0,
128
134
  name: C(e.suffix),
129
- size: b[e.size],
135
+ size: y[e.size],
130
136
  color: e.color
131
- }, null, 8, ["name", "size", "color"])) : (s(), $(M, { key: 1 }, [
137
+ }, null, 8, ["name", "size", "color"])) : (r(), $(M, { key: 1 }, [
132
138
  q(P(e.suffix), 1)
133
139
  ], 64))
134
- ], 10, se));
140
+ ], 10, re));
135
141
  }
136
- }), ce = ["data-testid"], U = /* @__PURE__ */ I({
142
+ }), ce = ["data-testid"], U = /* @__PURE__ */ p({
137
143
  name: "CLInputPill",
138
144
  __name: "CLInputPill",
139
145
  props: {
@@ -142,85 +148,85 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
142
148
  testId: { default: "clll-input-pill" }
143
149
  },
144
150
  setup(e) {
145
- const o = "clll-input";
146
- return (c, l) => (s(), $("span", {
147
- class: y(`${o}__pill`),
151
+ const t = "clll-input";
152
+ return (c, l) => (r(), $("span", {
153
+ class: x(`${t}__pill`),
148
154
  "data-testid": e.testId
149
155
  }, [
150
- K(i(re), {
156
+ K(i(ue), {
151
157
  color: e.color,
152
158
  label: e.label,
153
- variant: i(p).Soft
159
+ variant: i(I).Soft
154
160
  }, null, 8, ["color", "label", "variant"])
155
161
  ], 10, ce));
156
162
  }
157
- }), fe = ["data-testid"], G = /* @__PURE__ */ I({
163
+ }), fe = ["data-testid"], j = /* @__PURE__ */ p({
158
164
  name: "CLInputColorTools",
159
165
  __name: "CLInputColorTools",
160
166
  props: {
161
167
  copied: { type: Boolean, default: !1 },
162
168
  initialValue: { default: void 0 },
163
169
  modelValue: { default: void 0 },
164
- size: { default: a.Small },
170
+ size: { default: o.Small },
165
171
  testId: { default: "clll-input-color-tools" }
166
172
  },
167
173
  emits: ["copy", "reset", "update:copied"],
168
- setup(e, { emit: o }) {
169
- const c = e, l = o, C = "clll-input", t = A(c.copied), b = {
170
- [a.Tiny]: r.Tiny,
171
- [a.Small]: r.Small,
172
- [a.Medium]: r.Medium,
173
- [a.Large]: r.Large,
174
- [a.XL]: r.XL,
175
- [a.XXL]: r.XXL,
176
- [a.XXXL]: r.XXXL,
177
- [a.XXXXL]: r.XXXXL
174
+ setup(e, { emit: t }) {
175
+ const c = e, l = t, C = "clll-input", a = A(c.copied), y = {
176
+ [o.Tiny]: u.Tiny,
177
+ [o.Small]: u.Small,
178
+ [o.Medium]: u.Medium,
179
+ [o.Large]: u.Large,
180
+ [o.XL]: u.XL,
181
+ [o.XXL]: u.XXL,
182
+ [o.XXXL]: u.XXXL,
183
+ [o.XXXXL]: u.XXXXL
178
184
  }, g = async () => {
179
185
  try {
180
- c.modelValue && (await navigator.clipboard.writeText(c.modelValue.toString()), t.value = !0, l("update:copied", !0), l("copy"));
186
+ c.modelValue && (await navigator.clipboard.writeText(c.modelValue.toString()), a.value = !0, l("update:copied", !0), l("copy"));
181
187
  } catch (L) {
182
188
  console.error(L);
183
189
  }
184
- }, d = () => {
190
+ }, s = () => {
185
191
  l("reset", c.initialValue);
186
192
  };
187
193
  return N(() => c.copied, (L) => {
188
- t.value = L;
194
+ a.value = L;
189
195
  }), N(() => c.modelValue, () => {
190
- t.value = !1, l("update:copied", !1);
191
- }), (L, n) => (s(), $("span", {
192
- class: y(`${C}__selected-color-tools`),
196
+ a.value = !1, l("update:copied", !1);
197
+ }), (L, n) => (r(), $("span", {
198
+ class: x(`${C}__selected-color-tools`),
193
199
  "data-testid": e.testId
194
200
  }, [
195
- e.modelValue ? (s(), x(i(F), {
201
+ e.modelValue ? (r(), b(i(F), {
196
202
  key: 0,
197
203
  "aria-label": "Copy color to clipboard",
198
- class: y(`${C}__copy-to-clipboard`),
204
+ class: x(`${C}__copy-to-clipboard`),
199
205
  color: i(k).Neutral,
200
- "icon-before": i(t) ? i(X).Check : i(X).Copy,
201
- "icon-size": b[e.size],
206
+ "icon-before": i(a) ? i(X).Check : i(X).Copy,
207
+ "icon-size": y[e.size],
202
208
  "on-click": g,
203
209
  size: e.size,
204
- title: i(t) ? "Color copied to clipboard" : "Copy color to clipboard",
205
- variant: i(p).Ghost,
210
+ title: i(a) ? "Color copied to clipboard" : "Copy color to clipboard",
211
+ variant: i(I).Ghost,
206
212
  wrap: ""
207
213
  }, null, 8, ["class", "color", "icon-before", "icon-size", "size", "title", "variant"])) : v("", !0),
208
- e.modelValue ? (s(), x(i(F), {
214
+ e.modelValue ? (r(), b(i(F), {
209
215
  key: 1,
210
216
  "aria-label": "Reset selected color",
211
- class: y(`${C}__reset-selected-color`),
217
+ class: x(`${C}__reset-selected-color`),
212
218
  color: i(k).Neutral,
213
- "on-click": d,
219
+ "on-click": s,
214
220
  "icon-before": i(X).Restore,
215
- "icon-size": b[e.size],
221
+ "icon-size": y[e.size],
216
222
  size: e.size,
217
223
  title: "Reset selected color",
218
- variant: i(p).Ghost,
224
+ variant: i(I).Ghost,
219
225
  wrap: ""
220
226
  }, null, 8, ["class", "color", "icon-before", "icon-size", "size", "variant"])) : v("", !0)
221
227
  ], 10, fe));
222
228
  }
223
- }), me = ["data-testid"], xe = ["id", "name", "aria-label", "autocomplete", "disabled", "form", "maxlength", "minlength", "pattern", "placeholder", "readonly", "required", "spellcheck", "type"], ye = /* @__PURE__ */ I({
229
+ }), me = ["data-testid"], be = ["id", "name", "aria-label", "autocomplete", "disabled", "form", "maxlength", "minlength", "pattern", "placeholder", "readonly", "required", "spellcheck", "type"], xe = /* @__PURE__ */ p({
224
230
  name: "CLInput",
225
231
  __name: "CLInput",
226
232
  props: /* @__PURE__ */ w({
@@ -256,58 +262,58 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
256
262
  readonly: { type: Boolean, default: !1 },
257
263
  required: { type: Boolean, default: !1 },
258
264
  rounded: { type: Boolean, default: !0 },
259
- size: { default: a.Small },
265
+ size: { default: o.Small },
260
266
  spellCheck: { type: Boolean, default: void 0 },
261
267
  suffix: { default: void 0 },
262
268
  suffixAriaLabel: { default: void 0 },
263
269
  testId: { default: "clll-input" },
264
- type: { default: u.Text },
265
- variant: { default: p.Outline }
270
+ type: { default: d.Text },
271
+ variant: { default: I.Outline }
266
272
  }, {
267
273
  modelValue: {},
268
274
  modelModifiers: {}
269
275
  }),
270
276
  emits: /* @__PURE__ */ w(["reset"], ["update:modelValue"]),
271
- setup(e, { expose: o, emit: c }) {
272
- const l = e, C = c, t = "clll-input", b = A(!1), g = Q("input-elem"), d = W(e, "modelValue");
273
- l.type === u.Color && !d.value && (d.value = "#FFFFFF");
274
- const L = d.value?.toString(), n = (h) => Object.values(X).includes(h), T = z(() => [
275
- t,
276
- l.borderRadius ? `${t}--${l.borderRadius}` : "",
277
- l.busy ? `${t}--busy` : `${t}--ready`,
278
- `${t}--${l.color}`,
279
- `${t}--${l.size}`,
280
- `${t}--${l.type}`,
281
- `${t}--${l.variant}`,
282
- l.disabled || l.busy ? `${t}--disabled` : `${t}--active`,
283
- l.fluid || l.orientation === R.Horizontal ? `${t}--fluid` : `${t}--fixed`,
284
- l.grouped ? `${t}--grouped` : "",
285
- l.label ? `${t}--haslabel` : "",
286
- l.messageType ? `${t}--${l.messageType}` : "",
287
- l.orientation ? `${t}--${l.orientation}` : "",
288
- l.pill ? `${t}--haspill` : "",
289
- l.charCounter && l.maxLength && [u.Email, u.None, u.Text, u.Url].includes(l.type) ? `${t}--hascharcounter` : "",
290
- l.prefix && ![u.Color, u.File].includes(l.type) ? `${t}--hasprefix` : "",
291
- l.prefix && ![u.Color, u.File].includes(l.type) ? n(l.prefix) ? `${t}--hasiconprefix` : `${t}--hascustomprefix` : "",
292
- l.readonly ? `${t}--readonly` : `${t}--writeable`,
293
- l.rounded ? `${t}--rounded` : `${t}--box`,
294
- l.required ? `${t}--required` : `${t}--optional`,
295
- l.suffix && ![u.Color, u.File].includes(l.type) ? `${t}--hassuffix` : "",
296
- l.suffix && ![u.Color, u.File].includes(l.type) ? n(l.suffix) ? `${t}--hasiconsuffix` : `${t}--hascustomsuffix` : ""
297
- ]), j = z(() => [
298
- `${t}__input`,
299
- { "--nocolor": l.type === u.Color && !d.value },
277
+ setup(e, { expose: t, emit: c }) {
278
+ const l = e, C = c, a = "clll-input", y = A(!1), g = Q("input-elem"), s = W(e, "modelValue");
279
+ l.type === d.Color && !s.value && (s.value = "#FFFFFF");
280
+ const L = s.value?.toString(), n = (h) => Object.values(X).includes(h), T = z(() => [
281
+ a,
282
+ l.borderRadius ? `${a}--${l.borderRadius}` : "",
283
+ l.busy ? `${a}--busy` : `${a}--ready`,
284
+ `${a}--${l.color}`,
285
+ `${a}--${l.size}`,
286
+ `${a}--${l.type}`,
287
+ `${a}--${l.variant}`,
288
+ l.disabled || l.busy ? `${a}--disabled` : `${a}--active`,
289
+ l.fluid || l.orientation === R.Horizontal ? `${a}--fluid` : `${a}--fixed`,
290
+ l.grouped ? `${a}--grouped` : "",
291
+ l.label ? `${a}--haslabel` : "",
292
+ l.messageType ? `${a}--${l.messageType}` : "",
293
+ l.orientation ? `${a}--${l.orientation}` : "",
294
+ l.pill ? `${a}--haspill` : "",
295
+ l.charCounter && l.maxLength && [d.Email, d.None, d.Text, d.Url].includes(l.type) ? `${a}--hascharcounter` : "",
296
+ l.prefix && ![d.Color, d.File].includes(l.type) ? `${a}--hasprefix` : "",
297
+ l.prefix && ![d.Color, d.File].includes(l.type) ? n(l.prefix) ? `${a}--hasiconprefix` : `${a}--hascustomprefix` : "",
298
+ l.readonly ? `${a}--readonly` : `${a}--writeable`,
299
+ l.rounded ? `${a}--rounded` : `${a}--box`,
300
+ l.required ? `${a}--required` : `${a}--optional`,
301
+ l.suffix && ![d.Color, d.File].includes(l.type) ? `${a}--hassuffix` : "",
302
+ l.suffix && ![d.Color, d.File].includes(l.type) ? n(l.suffix) ? `${a}--hasiconsuffix` : `${a}--hascustomsuffix` : ""
303
+ ]), D = z(() => [
304
+ `${a}__input`,
305
+ { "--nocolor": l.type === d.Color && !s.value },
300
306
  { "--input-group": l.grouped || l.prefix || l.suffix }
301
- ]), D = (h) => {
302
- d.value = h, C("reset", d.value);
307
+ ]), G = (h) => {
308
+ s.value = h, C("reset", s.value);
303
309
  }, J = (h) => {
304
310
  !h.target.closest('button, a, [role="button"]') && g.value && g.value.focus();
305
311
  };
306
- return N(d, () => {
307
- b.value = !1;
308
- }), o({
312
+ return N(s, () => {
313
+ y.value = !1;
314
+ }), t({
309
315
  inputRef: g
310
- }), (h, f) => (s(), x(te, {
316
+ }), (h, f) => (r(), b(ae, {
311
317
  fluid: e.fluid,
312
318
  "has-pill": !!e.pill,
313
319
  "has-char-counter": !!(e.charCounter && e.maxLength),
@@ -315,23 +321,23 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
315
321
  }, {
316
322
  default: Y(() => [
317
323
  S("span", {
318
- class: y(i(T)),
324
+ class: x(i(T)),
319
325
  style: Z(i(ie)({ color: e.color, variant: e.variant })),
320
326
  "data-testid": e.testId
321
327
  }, [
322
- e.label ? (s(), x(oe, {
328
+ e.label ? (r(), b(oe, {
323
329
  key: 0,
324
- "css-prefix": t,
330
+ "css-prefix": a,
325
331
  "html-for": e.id,
326
332
  label: e.label,
327
333
  required: e.required,
328
334
  size: e.size
329
335
  }, null, 8, ["html-for", "label", "required", "size"])) : v("", !0),
330
336
  S("span", {
331
- class: y([`${t}__input-container`, "--focus-within"]),
337
+ class: x([`${a}__input-container`, "--focus-within"]),
332
338
  onClick: J
333
339
  }, [
334
- e.prefix && ![i(u).Color, i(u).File].includes(e.type) ? (s(), x(H, {
340
+ e.prefix && ![i(d).Color, i(d).File].includes(e.type) ? (r(), b(H, {
335
341
  key: 0,
336
342
  prefix: e.prefix,
337
343
  size: e.size,
@@ -339,19 +345,20 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
339
345
  "border-radius": e.borderRadius,
340
346
  color: e.color,
341
347
  "on-click": e.onPrefixClick,
342
- "aria-label": e.prefixAriaLabel
343
- }, null, 8, ["prefix", "size", "grouped", "border-radius", "color", "on-click", "aria-label"])) : v("", !0),
348
+ "aria-label": e.prefixAriaLabel,
349
+ disabled: e.disabled || e.busy
350
+ }, null, 8, ["prefix", "size", "grouped", "border-radius", "color", "on-click", "aria-label", "disabled"])) : v("", !0),
344
351
  S("span", {
345
- class: y(`${t}__input-border-control`)
352
+ class: x(`${a}__input-border-control`)
346
353
  }, [
347
354
  _(S("input", {
348
355
  id: e.id,
349
356
  ref: "input-elem",
350
- "onUpdate:modelValue": f[0] || (f[0] = (m) => d.value = m),
357
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => s.value = m),
351
358
  name: e.name,
352
359
  "aria-label": e.ariaLabel,
353
360
  autocomplete: e.autoComplete ? "on" : "off",
354
- class: y(i(j)),
361
+ class: x(i(D)),
355
362
  disabled: e.disabled || e.busy,
356
363
  form: e.form,
357
364
  maxlength: e.maxLength,
@@ -370,25 +377,25 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
370
377
  (...m) => e.onFocus && e.onFocus(...m)),
371
378
  onInput: f[4] || (f[4] = //@ts-ignore
372
379
  (...m) => e.onInput && e.onInput(...m))
373
- }, null, 42, xe), [
374
- [ee, d.value]
380
+ }, null, 42, be), [
381
+ [ee, s.value]
375
382
  ])
376
383
  ], 2),
377
- e.type === i(u).Color ? (s(), $("span", {
384
+ e.type === i(d).Color ? (r(), $("span", {
378
385
  key: 1,
379
- class: y(`${t}__selected-color`)
380
- }, P(d.value || "none"), 3)) : v("", !0),
381
- e.type === i(u).Color ? (s(), x(G, {
386
+ class: x(`${a}__selected-color`)
387
+ }, P(s.value || "none"), 3)) : v("", !0),
388
+ e.type === i(d).Color ? (r(), b(j, {
382
389
  key: 2,
383
- modelValue: d.value,
384
- "onUpdate:modelValue": f[5] || (f[5] = (m) => d.value = m),
385
- copied: i(b),
386
- "onUpdate:copied": f[6] || (f[6] = (m) => le(b) ? b.value = m : null),
390
+ modelValue: s.value,
391
+ "onUpdate:modelValue": f[5] || (f[5] = (m) => s.value = m),
392
+ copied: i(y),
393
+ "onUpdate:copied": f[6] || (f[6] = (m) => le(y) ? y.value = m : null),
387
394
  "initial-value": i(L),
388
395
  size: e.size,
389
- onReset: D
396
+ onReset: G
390
397
  }, null, 8, ["modelValue", "copied", "initial-value", "size"])) : v("", !0),
391
- e.suffix && ![i(u).Color, i(u).File].includes(e.type) ? (s(), x(O, {
398
+ e.suffix && ![i(d).Color, i(d).File].includes(e.type) ? (r(), b(O, {
392
399
  key: 3,
393
400
  suffix: e.suffix,
394
401
  size: e.size,
@@ -396,29 +403,30 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
396
403
  "border-radius": e.borderRadius,
397
404
  color: e.color,
398
405
  "on-click": e.onSuffixClick,
399
- "aria-label": e.suffixAriaLabel
400
- }, null, 8, ["suffix", "size", "grouped", "border-radius", "color", "on-click", "aria-label"])) : v("", !0),
401
- e.charCounter && e.maxLength && [i(u).Email, i(u).None, i(u).Text, i(u).Url].includes(e.type) ? (s(), x(ne, {
406
+ "aria-label": e.suffixAriaLabel,
407
+ disabled: e.disabled || e.busy
408
+ }, null, 8, ["suffix", "size", "grouped", "border-radius", "color", "on-click", "aria-label", "disabled"])) : v("", !0),
409
+ e.charCounter && e.maxLength && [i(d).Email, i(d).None, i(d).Text, i(d).Url].includes(e.type) ? (r(), b(ne, {
402
410
  key: 4,
403
411
  color: e.color,
404
- "css-prefix": t,
405
- "current-length": d.value ? d.value.toString().length : 0,
412
+ "css-prefix": a,
413
+ "current-length": s.value ? s.value.toString().length : 0,
406
414
  "max-length": e.maxLength,
407
- layout: i(ue).Inline,
415
+ layout: i(de).Inline,
408
416
  size: e.size
409
417
  }, null, 8, ["color", "current-length", "max-length", "layout", "size"])) : v("", !0)
410
418
  ], 2)
411
419
  ], 14, me),
412
- e.pill && e.label && e.orientation === i(R).Horizontal ? (s(), $("span", {
420
+ e.pill && e.label && e.orientation === i(R).Horizontal ? (r(), $("span", {
413
421
  key: 0,
414
- class: y(`${t}__spacer`)
422
+ class: x(`${a}__spacer`)
415
423
  }, null, 2)) : v("", !0),
416
- e.pill ? (s(), x(U, {
424
+ e.pill ? (r(), b(U, {
417
425
  key: 1,
418
426
  label: e.pill,
419
427
  color: e.color
420
428
  }, null, 8, ["label", "color"])) : v("", !0),
421
- e.id ? (s(), x(ae, {
429
+ e.id ? (r(), b(te, {
422
430
  key: 2,
423
431
  id: e.id,
424
432
  messages: e.messages,
@@ -428,11 +436,11 @@ const de = ["data-testid"], H = /* @__PURE__ */ I({
428
436
  _: 1
429
437
  }, 8, ["fluid", "has-pill", "has-char-counter", "orientation"]));
430
438
  }
431
- }), B = ye;
439
+ }), B = xe;
432
440
  B.Prefix = H;
433
441
  B.Suffix = O;
434
442
  B.Pill = U;
435
- B.ColorTools = G;
443
+ B.ColorTools = j;
436
444
  export {
437
445
  B as CLInput,
438
446
  B as default
@@ -6,6 +6,8 @@ export interface CLInputPrefixProps {
6
6
  borderRadius?: CLBorderRadius;
7
7
  /** Sets the color of the prefix icon. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
8
8
  color?: CLColors;
9
+ /** Set the disabled state. */
10
+ disabled?: boolean;
9
11
  /** Whether input is grouped */
10
12
  grouped?: boolean;
11
13
  /** A callback function which handles when the prefix is clicked. */
@@ -24,6 +26,7 @@ declare const _default: import('vue').DefineComponent<CLInputPrefixProps, {}, {}
24
26
  size: CLSizes;
25
27
  ariaLabel: string;
26
28
  borderRadius: CLBorderRadius;
29
+ disabled: boolean;
27
30
  grouped: boolean;
28
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
32
  export default _default;
@@ -6,6 +6,8 @@ export interface CLInputSuffixProps {
6
6
  borderRadius?: CLBorderRadius;
7
7
  /** Sets the color of the suffix icon. The property can be one of `CLColors`, e.g. `CLColors.Primary`. */
8
8
  color?: CLColors;
9
+ /** Set the disabled state. */
10
+ disabled?: boolean;
9
11
  /** Whether input is grouped */
10
12
  grouped?: boolean;
11
13
  /** A callback function which handles when the suffix is clicked. */
@@ -24,6 +26,7 @@ declare const _default: import('vue').DefineComponent<CLInputSuffixProps, {}, {}
24
26
  size: CLSizes;
25
27
  ariaLabel: string;
26
28
  borderRadius: CLBorderRadius;
29
+ disabled: boolean;
27
30
  grouped: boolean;
28
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
32
  export default _default;
@@ -4,7 +4,7 @@ import '../../../assets/shared/form-utilities.css';
4
4
  import { defineComponent as B, mergeModels as S, useModel as h, useTemplateRef as X, computed as q, createBlock as f, openBlock as s, withCtx as x, createElementVNode as d, createCommentVNode as $, normalizeStyle as T, normalizeClass as r, unref as u, withDirectives as V, createElementBlock as b, Fragment as k, renderList as M, toDisplayString as F, vModelSelect as I, createVNode as N } from "vue";
5
5
  import { _ as R, s as D, a as w } from "../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-CF_lxNr8.js";
6
6
  import { _ as E } from "../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-BcHOofhM.js";
7
- import { _ as H } from "../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-r6hBiMgq.js";
7
+ import { _ as H } from "../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-CX2_4ukW.js";
8
8
  import { CLSizes as i, CLIconSizes as n, CLOrientation as y, CLIconNames as O, CLColorVariants as P, CLColors as U } from "../../../index.js";
9
9
  const j = ["data-testid"], A = ["id", "aria-label", "disabled", "name", "placeholder", "form", "required"], G = ["value", "selected", "disabled"], p = /* @__PURE__ */ B({
10
10
  name: "CLSelect",
@@ -2,7 +2,7 @@ import '../../../assets/core.css';
2
2
  import './CLBanner.css';
3
3
  import { defineComponent as L, computed as h, createBlock as l, openBlock as n, unref as a, withCtx as s, createElementVNode as u, normalizeStyle as v, normalizeClass as r, createElementBlock as b, createCommentVNode as o, createTextVNode as m, toDisplayString as c, createVNode as y } from "vue";
4
4
  import { _ as x } from "../../../chunks/CLA11yButton.vue_vue_type_style_index_0_lang-fn1ix3QX.js";
5
- import { _ as $ } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-1hhRUMgR.js";
5
+ import { _ as $ } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-Ddoes-Ee.js";
6
6
  import { _ as S } from "../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-DntAR1dI.js";
7
7
  import { _ as C } from "../../../chunks/CLSkeleton.vue_vue_type_style_index_0_lang-DO-kZ629.js";
8
8
  import { _ as B } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-DVwTAVXM.js";
@@ -1,6 +1,6 @@
1
1
  import '../../../assets/core.css';
2
2
  import './CLPill.css';
3
- import { _ as s } from "../../../chunks/CLPill.vue_vue_type_style_index_0_lang-MaGtvvXD.js";
3
+ import { _ as s } from "../../../chunks/CLPill.vue_vue_type_style_index_0_lang-D1W4PnWB.js";
4
4
  export {
5
5
  s as CLPill,
6
6
  s as default