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