@pismo/marola 1.0.0-beta.27 → 1.0.0-beta.28

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.
@@ -7,7 +7,9 @@ export type InputProps = InputHTMLAttributes<HTMLInputElement> & {
7
7
  label?: string;
8
8
  /** Info message text */
9
9
  infoMessage?: string;
10
- /** Error message text */
10
+ /** Show the field layout as an error */
11
+ error?: boolean;
12
+ /** Error message text, if has "errorMessage", the "error" props will be "true" */
11
13
  errorMessage?: string;
12
14
  /** Left icon element */
13
15
  leftIcon?: ReactNode;
@@ -47,7 +49,9 @@ export declare const Input: import('react').ForwardRefExoticComponent<InputHTMLA
47
49
  label?: string | undefined;
48
50
  /** Info message text */
49
51
  infoMessage?: string | undefined;
50
- /** Error message text */
52
+ /** Show the field layout as an error */
53
+ error?: boolean | undefined;
54
+ /** Error message text, if has "errorMessage", the "error" props will be "true" */
51
55
  errorMessage?: string | undefined;
52
56
  /** Left icon element */
53
57
  leftIcon?: ReactNode;
@@ -1,164 +1,164 @@
1
1
  import '../../assets/Input.css';
2
- import { jsxs as j, jsx as S } from "react/jsx-runtime";
3
- import * as h from "react";
2
+ import { jsxs as H, jsx as T } from "react/jsx-runtime";
3
+ import * as f from "react";
4
4
  import { forwardRef as de, useState as ce, useId as _e } from "react";
5
- import { c as R } from "../../clsx-DB4S2d7J.js";
5
+ import { c as E } from "../../clsx-DB4S2d7J.js";
6
6
  import { Typography as L } from "../Typography/Typography.js";
7
- import { g as he, a as fe, u as me, f as z, b as f, _ as ye, c as Q, i as ge, P as e, d as be, e as Ce } from "../../useSlotProps-C_I1kEHr.js";
7
+ import { g as he, a as fe, u as me, f as z, b as m, _ as ye, c as Q, i as ge, P as e, d as be, e as Ce } from "../../useSlotProps-C_I1kEHr.js";
8
8
  function we(a) {
9
- let l = "https://mui.com/production-error/?code=" + a;
10
- for (let s = 1; s < arguments.length; s += 1)
11
- l += "&args[]=" + encodeURIComponent(arguments[s]);
12
- return "Minified MUI error #" + a + "; visit " + l + " for the full message.";
9
+ let s = "https://mui.com/production-error/?code=" + a;
10
+ for (let u = 1; u < arguments.length; u += 1)
11
+ s += "&args[]=" + encodeURIComponent(arguments[u]);
12
+ return "Minified MUI error #" + a + "; visit " + s + " for the full message.";
13
13
  }
14
14
  const X = "Input";
15
15
  function ve(a) {
16
16
  return he(X, a);
17
17
  }
18
18
  fe(X, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
19
- const Z = /* @__PURE__ */ h.createContext(void 0);
19
+ const Z = /* @__PURE__ */ f.createContext(void 0);
20
20
  process.env.NODE_ENV !== "production" && (Z.displayName = "FormControlContext");
21
21
  function xe() {
22
- return h.useContext(Z);
22
+ return f.useContext(Z);
23
23
  }
24
24
  function qe(a = {}) {
25
25
  const {
26
- defaultValue: l,
27
- disabled: s = !1,
28
- error: m = !1,
29
- onBlur: i,
30
- onChange: y,
31
- onFocus: q,
32
- required: N = !1,
33
- value: b,
34
- inputRef: k
26
+ defaultValue: s,
27
+ disabled: u = !1,
28
+ error: i = !1,
29
+ onBlur: p,
30
+ onChange: _,
31
+ onFocus: x,
32
+ required: q = !1,
33
+ value: R,
34
+ inputRef: N
35
35
  } = a, o = xe();
36
- let P, _, C, w, g;
36
+ let g, h, b, C, y;
37
37
  if (o) {
38
38
  var F, d, I;
39
- if (P = void 0, _ = (F = o.disabled) != null ? F : !1, C = (d = o.error) != null ? d : !1, w = (I = o.required) != null ? I : !1, g = o.value, process.env.NODE_ENV !== "production") {
40
- const t = ["defaultValue", "disabled", "error", "required", "value"].filter((n) => a[n] !== void 0);
39
+ if (g = void 0, h = (F = o.disabled) != null ? F : !1, b = (d = o.error) != null ? d : !1, C = (I = o.required) != null ? I : !1, y = o.value, process.env.NODE_ENV !== "production") {
40
+ const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => a[r] !== void 0);
41
41
  t.length > 0 && console.warn(["MUI: You have set props on an input that is inside a FormControl.", "Set these props on a FormControl instead. Otherwise they will be ignored.", `Ignored props: ${t.join(", ")}`].join(`
42
42
  `));
43
43
  }
44
44
  } else
45
- P = l, _ = s, C = m, w = N, g = b;
45
+ g = s, h = u, b = i, C = q, y = R;
46
46
  const {
47
- current: B
48
- } = h.useRef(g != null), V = h.useCallback((t) => {
47
+ current: S
48
+ } = f.useRef(y != null), k = f.useCallback((t) => {
49
49
  process.env.NODE_ENV !== "production" && t && t.nodeName !== "INPUT" && !t.focus && console.error(["MUI: You have provided a `slots.input` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
50
50
  `));
51
- }, []), v = h.useRef(null), O = me(v, k, V), [x, E] = h.useState(!1);
52
- h.useEffect(() => {
53
- !o && _ && x && (E(!1), i == null || i());
54
- }, [o, _, x, i]);
55
- const U = (t) => (n) => {
56
- var r;
51
+ }, []), w = f.useRef(null), O = me(w, N, k), [P, v] = f.useState(!1);
52
+ f.useEffect(() => {
53
+ !o && h && P && (v(!1), p == null || p());
54
+ }, [o, h, P, p]);
55
+ const B = (t) => (r) => {
56
+ var n;
57
57
  if (o != null && o.disabled) {
58
- n.stopPropagation();
58
+ r.stopPropagation();
59
59
  return;
60
60
  }
61
- if ((r = t.onFocus) == null || r.call(t, n), o && o.onFocus) {
61
+ if ((n = t.onFocus) == null || n.call(t, r), o && o.onFocus) {
62
62
  var c;
63
63
  o == null || (c = o.onFocus) == null || c.call(o);
64
64
  } else
65
- E(!0);
66
- }, M = (t) => (n) => {
67
- var r;
68
- (r = t.onBlur) == null || r.call(t, n), o && o.onBlur ? o.onBlur() : E(!1);
69
- }, A = (t) => (n, ...r) => {
70
- var c, D;
71
- if (!B && (n.target || v.current) == null)
65
+ v(!0);
66
+ }, V = (t) => (r) => {
67
+ var n;
68
+ (n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : v(!1);
69
+ }, U = (t) => (r, ...n) => {
70
+ var c, j;
71
+ if (!S && (r.target || w.current) == null)
72
72
  throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `slots.input` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : we(17));
73
- o == null || (c = o.onChange) == null || c.call(o, n), (D = t.onChange) == null || D.call(t, n, ...r);
74
- }, T = (t) => (n) => {
75
- var r;
76
- v.current && n.currentTarget === n.target && v.current.focus(), (r = t.onClick) == null || r.call(t, n);
73
+ o == null || (c = o.onChange) == null || c.call(o, r), (j = t.onChange) == null || j.call(t, r, ...n);
74
+ }, M = (t) => (r) => {
75
+ var n;
76
+ w.current && r.currentTarget === r.target && w.current.focus(), (n = t.onClick) == null || n.call(t, r);
77
77
  };
78
78
  return {
79
- disabled: _,
80
- error: C,
81
- focused: x,
79
+ disabled: h,
80
+ error: b,
81
+ focused: P,
82
82
  formControlContext: o,
83
83
  getInputProps: (t = {}) => {
84
- const r = f({}, {
85
- onBlur: i,
86
- onChange: y,
87
- onFocus: q
88
- }, z(t)), c = f({}, r, {
89
- onBlur: M(r),
90
- onChange: A(r),
91
- onFocus: U(r)
84
+ const n = m({}, {
85
+ onBlur: p,
86
+ onChange: _,
87
+ onFocus: x
88
+ }, z(t)), c = m({}, n, {
89
+ onBlur: V(n),
90
+ onChange: U(n),
91
+ onFocus: B(n)
92
92
  });
93
- return f({}, c, {
94
- "aria-invalid": C || void 0,
95
- defaultValue: P,
96
- value: g,
97
- required: w,
98
- disabled: _
93
+ return m({}, c, {
94
+ "aria-invalid": b || void 0,
95
+ defaultValue: g,
96
+ value: y,
97
+ required: C,
98
+ disabled: h
99
99
  }, t, {
100
100
  ref: O
101
101
  }, c);
102
102
  },
103
103
  getRootProps: (t = {}) => {
104
- const n = z(a, ["onBlur", "onChange", "onFocus"]), r = f({}, n, z(t));
105
- return f({}, t, r, {
106
- onClick: T(r)
104
+ const r = z(a, ["onBlur", "onChange", "onFocus"]), n = m({}, r, z(t));
105
+ return m({}, t, n, {
106
+ onClick: M(n)
107
107
  });
108
108
  },
109
109
  inputRef: O,
110
- required: w,
111
- value: g
110
+ required: C,
111
+ value: y
112
112
  };
113
113
  }
114
114
  const Ne = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "endAdornment", "error", "id", "multiline", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "startAdornment", "value", "type", "rows", "slotProps", "slots", "minRows", "maxRows"], Pe = (a) => {
115
115
  const {
116
- disabled: l,
117
- error: s,
118
- focused: m,
119
- formControlContext: i,
120
- multiline: y,
121
- startAdornment: q,
122
- endAdornment: N
116
+ disabled: s,
117
+ error: u,
118
+ focused: i,
119
+ formControlContext: p,
120
+ multiline: _,
121
+ startAdornment: x,
122
+ endAdornment: q
123
123
  } = a;
124
124
  return be({
125
- root: ["root", l && "disabled", s && "error", m && "focused", !!i && "formControl", y && "multiline", !!q && "adornedStart", !!N && "adornedEnd"],
126
- input: ["input", l && "disabled", y && "multiline"]
125
+ root: ["root", s && "disabled", u && "error", i && "focused", !!p && "formControl", _ && "multiline", !!x && "adornedStart", !!q && "adornedEnd"],
126
+ input: ["input", s && "disabled", _ && "multiline"]
127
127
  }, Ce(ve));
128
- }, ee = /* @__PURE__ */ h.forwardRef(function(l, s) {
129
- var m, i, y;
128
+ }, ee = /* @__PURE__ */ f.forwardRef(function(s, u) {
129
+ var i, p, _;
130
130
  const {
131
- "aria-describedby": q,
132
- "aria-label": N,
133
- "aria-labelledby": b,
134
- autoComplete: k,
131
+ "aria-describedby": x,
132
+ "aria-label": q,
133
+ "aria-labelledby": R,
134
+ autoComplete: N,
135
135
  autoFocus: o,
136
- className: P,
137
- defaultValue: _,
138
- disabled: C,
139
- endAdornment: w,
140
- error: g,
136
+ className: g,
137
+ defaultValue: h,
138
+ disabled: b,
139
+ endAdornment: C,
140
+ error: y,
141
141
  id: F,
142
142
  multiline: d = !1,
143
143
  name: I,
144
- onClick: B,
145
- onChange: V,
146
- onKeyDown: v,
144
+ onClick: S,
145
+ onChange: k,
146
+ onKeyDown: w,
147
147
  onKeyUp: O,
148
- onFocus: x,
149
- onBlur: E,
150
- placeholder: U,
151
- readOnly: M,
152
- required: A,
153
- startAdornment: T,
154
- value: H,
155
- type: p,
148
+ onFocus: P,
149
+ onBlur: v,
150
+ placeholder: B,
151
+ readOnly: V,
152
+ required: U,
153
+ startAdornment: M,
154
+ value: A,
155
+ type: D,
156
156
  rows: t,
157
- slotProps: n = {},
158
- slots: r = {},
157
+ slotProps: r = {},
158
+ slots: n = {},
159
159
  minRows: c,
160
- maxRows: D
161
- } = l, Y = ye(l, Ne), {
160
+ maxRows: j
161
+ } = s, Y = ye(s, Ne), {
162
162
  getRootProps: te,
163
163
  getInputProps: oe,
164
164
  focused: ne,
@@ -166,16 +166,16 @@ const Ne = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
166
166
  error: ae,
167
167
  disabled: se
168
168
  } = qe({
169
- disabled: C,
170
- defaultValue: _,
171
- error: g,
172
- onBlur: E,
173
- onClick: B,
174
- onChange: V,
175
- onFocus: x,
176
- required: A,
177
- value: H
178
- }), W = d ? void 0 : p ?? "text", $ = f({}, l, {
169
+ disabled: b,
170
+ defaultValue: h,
171
+ error: y,
172
+ onBlur: v,
173
+ onClick: S,
174
+ onChange: k,
175
+ onFocus: P,
176
+ required: U,
177
+ value: A
178
+ }), W = d ? void 0 : D ?? "text", $ = m({}, s, {
179
179
  disabled: se,
180
180
  error: ae,
181
181
  focused: ne,
@@ -183,43 +183,43 @@ const Ne = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete",
183
183
  multiline: d,
184
184
  type: W
185
185
  }), G = Pe($), le = {
186
- "aria-describedby": q,
187
- "aria-label": N,
188
- "aria-labelledby": b,
189
- autoComplete: k,
186
+ "aria-describedby": x,
187
+ "aria-label": q,
188
+ "aria-labelledby": R,
189
+ autoComplete: N,
190
190
  autoFocus: o,
191
191
  id: F,
192
- onKeyDown: v,
192
+ onKeyDown: w,
193
193
  onKeyUp: O,
194
194
  name: I,
195
- placeholder: U,
196
- readOnly: M,
195
+ placeholder: B,
196
+ readOnly: V,
197
197
  type: W
198
- }, J = (m = r.root) != null ? m : "div", ue = Q({
198
+ }, J = (i = n.root) != null ? i : "div", ue = Q({
199
199
  elementType: J,
200
200
  getSlotProps: te,
201
- externalSlotProps: n.root,
201
+ externalSlotProps: r.root,
202
202
  externalForwardedProps: Y,
203
203
  additionalProps: {
204
- ref: s
204
+ ref: u
205
205
  },
206
206
  ownerState: $,
207
- className: [G.root, P]
208
- }), K = d ? (i = r.textarea) != null ? i : "textarea" : (y = r.input) != null ? y : "input", ie = Q({
207
+ className: [G.root, g]
208
+ }), K = d ? (p = n.textarea) != null ? p : "textarea" : (_ = n.input) != null ? _ : "input", ie = Q({
209
209
  elementType: K,
210
- getSlotProps: (pe) => oe(f({}, le, pe)),
211
- externalSlotProps: n.input,
212
- additionalProps: f({
210
+ getSlotProps: (pe) => oe(m({}, le, pe)),
211
+ externalSlotProps: r.input,
212
+ additionalProps: m({
213
213
  rows: d ? t : void 0
214
214
  }, d && !ge(K) && {
215
215
  minRows: t || c,
216
- maxRows: t || D
216
+ maxRows: t || j
217
217
  }),
218
218
  ownerState: $,
219
219
  className: G.input
220
220
  });
221
- return process.env.NODE_ENV !== "production" && d && t && (c || D) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ j(J, f({}, ue, {
222
- children: [T, /* @__PURE__ */ S(K, f({}, ie)), w]
221
+ return process.env.NODE_ENV !== "production" && d && t && (c || j) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ H(J, m({}, ue, {
222
+ children: [M, /* @__PURE__ */ T(K, m({}, ie)), C]
223
223
  }));
224
224
  });
225
225
  process.env.NODE_ENV !== "production" && (ee.propTypes = {
@@ -372,12 +372,12 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
372
372
  */
373
373
  value: e.any
374
374
  });
375
- const Ee = (a) => /* @__PURE__ */ h.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/solid/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
375
+ const Ee = (a) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", "data-waves-icon": "fa/solid/circle-exclamation", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
376
376
  fill: "currentcolor",
377
377
  color: "currentcolor",
378
378
  width: "1em",
379
379
  height: "1em"
380
- }, ...a }, /* @__PURE__ */ h.createElement("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z" })), Re = "_input__label_1lq2e_78", Fe = "_input_1lq2e_57", u = {
380
+ }, ...a }, /* @__PURE__ */ f.createElement("path", { d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z" })), Re = "_input__label_1lq2e_78", Fe = "_input_1lq2e_57", l = {
381
381
  "u-typography-h1": "_u-typography-h1_1lq2e_1",
382
382
  "u-typography-h2": "_u-typography-h2_1lq2e_8",
383
383
  "u-typography-h3": "_u-typography-h3_1lq2e_15",
@@ -409,96 +409,97 @@ const Ee = (a) => /* @__PURE__ */ h.createElement("svg", { xmlns: "http://www.w3
409
409
  }, Be = de(
410
410
  ({
411
411
  label: a,
412
- infoMessage: l,
413
- errorMessage: s,
414
- leftIcon: m,
415
- rightIcon: i,
416
- id: y,
412
+ infoMessage: s,
413
+ error: u,
414
+ errorMessage: i,
415
+ leftIcon: p,
416
+ rightIcon: _,
417
+ id: x,
417
418
  disabled: q,
418
- type: N = "text",
419
- maxLength: b,
420
- hideCharsCounter: k = !1,
421
- onChange: o,
422
- classNameWrapper: P,
423
- classNameLabel: _,
419
+ type: R = "text",
420
+ maxLength: N,
421
+ hideCharsCounter: o = !1,
422
+ onChange: g,
423
+ classNameWrapper: h,
424
+ classNameLabel: b,
424
425
  classNameInput: C,
425
- classNameInfoMessage: w,
426
- classNameErrorMessage: g,
427
- classNameCharsCounter: F,
428
- "data-testid-wrapper": d,
429
- "data-testid-label": I,
430
- "data-testid-input": B,
431
- "data-testid-infoMessage": V,
432
- "data-testid-errorMessage": v,
433
- "data-testid-charsCounter": O,
434
- ...x
435
- }, E) => {
436
- const [U, M] = ce(0), A = _e(), T = y || `input_${A}`;
437
- Object.assign(x, { "data-testid": B });
438
- const H = (p) => {
439
- var t, n;
440
- M((n = (t = p == null ? void 0 : p.target) == null ? void 0 : t.value) == null ? void 0 : n.length), o && o(p);
426
+ classNameInfoMessage: y,
427
+ classNameErrorMessage: F,
428
+ classNameCharsCounter: d,
429
+ "data-testid-wrapper": I,
430
+ "data-testid-label": S,
431
+ "data-testid-input": k,
432
+ "data-testid-infoMessage": w,
433
+ "data-testid-errorMessage": O,
434
+ "data-testid-charsCounter": P,
435
+ ...v
436
+ }, B) => {
437
+ const [V, U] = ce(0), M = _e(), A = x || `input_${M}`;
438
+ Object.assign(v, { "data-testid": k });
439
+ const D = (t) => {
440
+ var r, n;
441
+ U((n = (r = t == null ? void 0 : t.target) == null ? void 0 : r.value) == null ? void 0 : n.length), g && g(t);
441
442
  };
442
- return /* @__PURE__ */ j("div", { className: R(u.input, P), "data-testid": d, children: [
443
- a && /* @__PURE__ */ S(
443
+ return /* @__PURE__ */ H("div", { className: E(l.input, h), "data-testid": I, children: [
444
+ a && /* @__PURE__ */ T(
444
445
  L,
445
446
  {
446
447
  element: "label",
447
- elementProps: { htmlFor: T },
448
- className: R(u.input__label, _),
449
- "data-testid": I,
448
+ elementProps: { htmlFor: A },
449
+ className: E(l.input__label, b),
450
+ "data-testid": S,
450
451
  children: a
451
452
  }
452
453
  ),
453
- /* @__PURE__ */ S(
454
+ /* @__PURE__ */ T(
454
455
  ee,
455
456
  {
456
- id: T,
457
- type: N,
457
+ id: A,
458
+ type: R,
458
459
  disabled: q,
459
- error: !!s,
460
+ error: typeof u == "boolean" ? u : !!i,
460
461
  "aria-label": a,
461
462
  slotProps: {
462
- root: (p) => ({
463
- className: R(u["input__input-el-wrapper"], {
464
- [u["input--disabled"]]: p.disabled,
465
- [u["input--focused"]]: p.focused,
466
- [u["input--error"]]: p.error
463
+ root: (t) => ({
464
+ className: E(l["input__input-el-wrapper"], {
465
+ [l["input--disabled"]]: t.disabled,
466
+ [l["input--focused"]]: t.focused,
467
+ [l["input--error"]]: t.error
467
468
  })
468
469
  }),
469
470
  input: {
470
- ref: E,
471
- className: R(u["input__input-el"], C),
472
- maxLength: b,
473
- onChange: H,
474
- ...x
471
+ ref: B,
472
+ className: E(l["input__input-el"], C),
473
+ maxLength: N,
474
+ onChange: D,
475
+ ...v
475
476
  }
476
477
  },
477
- startAdornment: m && /* @__PURE__ */ S("span", { className: u["input__left-icon"], children: m }),
478
- endAdornment: i && /* @__PURE__ */ S("span", { className: u["input__right-icon"], children: i })
478
+ startAdornment: p && /* @__PURE__ */ T("span", { className: l["input__left-icon"], children: p }),
479
+ endAdornment: _ && /* @__PURE__ */ T("span", { className: l["input__right-icon"], children: _ })
479
480
  }
480
481
  ),
481
- /* @__PURE__ */ j("div", { className: u["input__messages-wrapper"], children: [
482
- (s || l) && /* @__PURE__ */ j(
482
+ /* @__PURE__ */ H("div", { className: l["input__messages-wrapper"], children: [
483
+ (i || s) && /* @__PURE__ */ H(
483
484
  L,
484
485
  {
485
- className: s ? R(u["input__error-message"], g) : R(u["input__info-message"], w),
486
- "data-testid": s ? v : V,
486
+ className: i ? E(l["input__error-message"], F) : E(l["input__info-message"], y),
487
+ "data-testid": i ? O : w,
487
488
  children: [
488
- /* @__PURE__ */ S(Ee, {}),
489
- s || l
489
+ /* @__PURE__ */ T(Ee, {}),
490
+ i || s
490
491
  ]
491
492
  }
492
493
  ),
493
- b && !k && /* @__PURE__ */ j(
494
+ N && !o && /* @__PURE__ */ H(
494
495
  L,
495
496
  {
496
- className: R(u["input__chars-counter"], F),
497
- "data-testid": O,
497
+ className: E(l["input__chars-counter"], d),
498
+ "data-testid": P,
498
499
  children: [
499
- U,
500
+ V,
500
501
  " / ",
501
- b
502
+ N
502
503
  ]
503
504
  }
504
505
  )
@@ -5,6 +5,7 @@ declare const meta: {
5
5
  component: import('react').ForwardRefExoticComponent<import('react').InputHTMLAttributes<HTMLInputElement> & {
6
6
  label?: string | undefined;
7
7
  infoMessage?: string | undefined;
8
+ error?: boolean | undefined;
8
9
  errorMessage?: string | undefined;
9
10
  leftIcon?: import('react').ReactNode;
10
11
  rightIcon?: import('react').ReactNode;
@@ -7,6 +7,7 @@ declare const meta: {
7
7
  } & import('react').InputHTMLAttributes<HTMLInputElement> & {
8
8
  label?: string | undefined;
9
9
  infoMessage?: string | undefined;
10
+ error?: boolean | undefined;
10
11
  errorMessage?: string | undefined;
11
12
  leftIcon?: import('react').ReactNode;
12
13
  rightIcon?: import('react').ReactNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.0.0-beta.27",
4
+ "version": "1.0.0-beta.28",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -60,6 +60,7 @@
60
60
  "@types/react-dom": "^18.2.22",
61
61
  "@typescript-eslint/eslint-plugin": "^7.6.0",
62
62
  "@typescript-eslint/parser": "^7.6.0",
63
+ "@vitest/coverage-v8": "^1.4.0",
63
64
  "@vitejs/plugin-react": "^4.2.1",
64
65
  "clsx": "^2.1.0",
65
66
  "commitlint": "^19.2.1",