@pismo/marola 1.0.0-beta.42 → 1.0.0-beta.44

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.
@@ -1,225 +1,226 @@
1
1
  import '../../assets/Input.css';
2
- import { jsxs as q, jsx as S } from "react/jsx-runtime";
3
- import * as f from "react";
2
+ import { jsxs as H, jsx as T } from "react/jsx-runtime";
3
+ import * as q from "react";
4
4
  import { forwardRef as de, useState as ce, useId as _e, useMemo as me } from "react";
5
- import { c as E } from "../../clsx-DB4S2d7J.js";
5
+ import { c as R } from "../../clsx-DB4S2d7J.js";
6
+ import { Icon as fe } from "../Icon/Icon.js";
6
7
  import { Typography as L } from "../Typography/Typography.js";
7
- import { g as he, a as fe, u as ye, f as z, b as y, _ as ge, c as Q, i as be, P as e, d as ve, e as we } from "../../useSlotProps-C_I1kEHr.js";
8
- function Ce(s) {
8
+ import { g as he, a as ye, u as ge, f as Y, b as h, _ as be, c as Q, i as Ce, P as e, d as we, e as qe } from "../../useSlotProps-C_I1kEHr.js";
9
+ function xe(s) {
9
10
  let l = "https://mui.com/production-error/?code=" + s;
10
- for (let p = 1; p < arguments.length; p += 1)
11
- l += "&args[]=" + encodeURIComponent(arguments[p]);
11
+ for (let d = 1; d < arguments.length; d += 1)
12
+ l += "&args[]=" + encodeURIComponent(arguments[d]);
12
13
  return "Minified MUI error #" + s + "; visit " + l + " for the full message.";
13
14
  }
14
15
  const X = "Input";
15
- function xe(s) {
16
+ function Pe(s) {
16
17
  return he(X, s);
17
18
  }
18
- fe(X, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
19
- const Z = /* @__PURE__ */ f.createContext(void 0);
19
+ ye(X, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
+ const Z = /* @__PURE__ */ q.createContext(void 0);
20
21
  process.env.NODE_ENV !== "production" && (Z.displayName = "FormControlContext");
21
- function Pe() {
22
- return f.useContext(Z);
22
+ function Ne() {
23
+ return q.useContext(Z);
23
24
  }
24
- function Ne(s = {}) {
25
+ function ve(s = {}) {
25
26
  const {
26
27
  defaultValue: l,
27
- disabled: p = !1,
28
- error: d = !1,
28
+ disabled: d = !1,
29
+ error: u = !1,
29
30
  onBlur: c,
30
31
  onChange: m,
31
32
  onFocus: x,
32
33
  required: P = !1,
33
- value: F,
34
+ value: E,
34
35
  inputRef: N
35
- } = s, n = Pe();
36
- let b, h, v, w, g;
36
+ } = s, n = Ne();
37
+ let g, f, b, C, y;
37
38
  if (n) {
38
- var I, _, O;
39
- if (b = void 0, h = (I = n.disabled) != null ? I : !1, v = (_ = n.error) != null ? _ : !1, w = (O = n.required) != null ? O : !1, g = n.value, process.env.NODE_ENV !== "production") {
40
- const t = ["defaultValue", "disabled", "error", "required", "value"].filter((o) => s[o] !== void 0);
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(`
39
+ var F, _, I;
40
+ if (g = void 0, f = (F = n.disabled) != null ? F : !1, b = (_ = n.error) != null ? _ : !1, C = (I = n.required) != null ? I : !1, y = n.value, process.env.NODE_ENV !== "production") {
41
+ const o = ["defaultValue", "disabled", "error", "required", "value"].filter((t) => s[t] !== void 0);
42
+ o.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: ${o.join(", ")}`].join(`
42
43
  `));
43
44
  }
44
45
  } else
45
- b = l, h = p, v = d, w = P, g = F;
46
+ g = l, f = d, b = u, C = P, y = E;
46
47
  const {
47
48
  current: k
48
- } = f.useRef(g != null), B = f.useCallback((t) => {
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(`
49
+ } = q.useRef(y != null), B = q.useCallback((o) => {
50
+ process.env.NODE_ENV !== "production" && o && o.nodeName !== "INPUT" && !o.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
51
  `));
51
- }, []), C = f.useRef(null), T = ye(C, N, B), [R, a] = f.useState(!1);
52
- f.useEffect(() => {
53
- !n && h && R && (a(!1), c == null || c());
54
- }, [n, h, R, c]);
55
- const V = (t) => (o) => {
52
+ }, []), w = q.useRef(null), O = ge(w, N, B), [v, a] = q.useState(!1);
53
+ q.useEffect(() => {
54
+ !n && f && v && (a(!1), c == null || c());
55
+ }, [n, f, v, c]);
56
+ const U = (o) => (t) => {
56
57
  var r;
57
58
  if (n != null && n.disabled) {
58
- o.stopPropagation();
59
+ t.stopPropagation();
59
60
  return;
60
61
  }
61
- if ((r = t.onFocus) == null || r.call(t, o), n && n.onFocus) {
62
+ if ((r = o.onFocus) == null || r.call(o, t), n && n.onFocus) {
62
63
  var i;
63
64
  n == null || (i = n.onFocus) == null || i.call(n);
64
65
  } else
65
66
  a(!0);
66
- }, M = (t) => (o) => {
67
+ }, V = (o) => (t) => {
67
68
  var r;
68
- (r = t.onBlur) == null || r.call(t, o), n && n.onBlur ? n.onBlur() : a(!1);
69
- }, U = (t) => (o, ...r) => {
70
- var i, H;
71
- if (!k && (o.target || C.current) == null)
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." : Ce(17));
73
- n == null || (i = n.onChange) == null || i.call(n, o), (H = t.onChange) == null || H.call(t, o, ...r);
74
- }, A = (t) => (o) => {
69
+ (r = o.onBlur) == null || r.call(o, t), n && n.onBlur ? n.onBlur() : a(!1);
70
+ }, S = (o) => (t, ...r) => {
71
+ var i, M;
72
+ if (!k && (t.target || w.current) == null)
73
+ 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." : xe(17));
74
+ n == null || (i = n.onChange) == null || i.call(n, t), (M = o.onChange) == null || M.call(o, t, ...r);
75
+ }, A = (o) => (t) => {
75
76
  var r;
76
- C.current && o.currentTarget === o.target && C.current.focus(), (r = t.onClick) == null || r.call(t, o);
77
+ w.current && t.currentTarget === t.target && w.current.focus(), (r = o.onClick) == null || r.call(o, t);
77
78
  };
78
79
  return {
79
- disabled: h,
80
- error: v,
81
- focused: R,
80
+ disabled: f,
81
+ error: b,
82
+ focused: v,
82
83
  formControlContext: n,
83
- getInputProps: (t = {}) => {
84
- const r = y({}, {
84
+ getInputProps: (o = {}) => {
85
+ const r = h({}, {
85
86
  onBlur: c,
86
87
  onChange: m,
87
88
  onFocus: x
88
- }, z(t)), i = y({}, r, {
89
- onBlur: M(r),
90
- onChange: U(r),
91
- onFocus: V(r)
89
+ }, Y(o)), i = h({}, r, {
90
+ onBlur: V(r),
91
+ onChange: S(r),
92
+ onFocus: U(r)
92
93
  });
93
- return y({}, i, {
94
- "aria-invalid": v || void 0,
95
- defaultValue: b,
96
- value: g,
97
- required: w,
98
- disabled: h
99
- }, t, {
100
- ref: T
94
+ return h({}, i, {
95
+ "aria-invalid": b || void 0,
96
+ defaultValue: g,
97
+ value: y,
98
+ required: C,
99
+ disabled: f
100
+ }, o, {
101
+ ref: O
101
102
  }, i);
102
103
  },
103
- getRootProps: (t = {}) => {
104
- const o = z(s, ["onBlur", "onChange", "onFocus"]), r = y({}, o, z(t));
105
- return y({}, t, r, {
104
+ getRootProps: (o = {}) => {
105
+ const t = Y(s, ["onBlur", "onChange", "onFocus"]), r = h({}, t, Y(o));
106
+ return h({}, o, r, {
106
107
  onClick: A(r)
107
108
  });
108
109
  },
109
- inputRef: T,
110
- required: w,
111
- value: g
110
+ inputRef: O,
111
+ required: C,
112
+ value: y
112
113
  };
113
114
  }
114
115
  const Re = ["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"], Ee = (s) => {
115
116
  const {
116
117
  disabled: l,
117
- error: p,
118
- focused: d,
118
+ error: d,
119
+ focused: u,
119
120
  formControlContext: c,
120
121
  multiline: m,
121
122
  startAdornment: x,
122
123
  endAdornment: P
123
124
  } = s;
124
- return ve({
125
- root: ["root", l && "disabled", p && "error", d && "focused", !!c && "formControl", m && "multiline", !!x && "adornedStart", !!P && "adornedEnd"],
125
+ return we({
126
+ root: ["root", l && "disabled", d && "error", u && "focused", !!c && "formControl", m && "multiline", !!x && "adornedStart", !!P && "adornedEnd"],
126
127
  input: ["input", l && "disabled", m && "multiline"]
127
- }, we(xe));
128
- }, ee = /* @__PURE__ */ f.forwardRef(function(l, p) {
129
- var d, c, m;
128
+ }, qe(Pe));
129
+ }, ee = /* @__PURE__ */ q.forwardRef(function(l, d) {
130
+ var u, c, m;
130
131
  const {
131
132
  "aria-describedby": x,
132
133
  "aria-label": P,
133
- "aria-labelledby": F,
134
+ "aria-labelledby": E,
134
135
  autoComplete: N,
135
136
  autoFocus: n,
136
- className: b,
137
- defaultValue: h,
138
- disabled: v,
139
- endAdornment: w,
140
- error: g,
141
- id: I,
137
+ className: g,
138
+ defaultValue: f,
139
+ disabled: b,
140
+ endAdornment: C,
141
+ error: y,
142
+ id: F,
142
143
  multiline: _ = !1,
143
- name: O,
144
+ name: I,
144
145
  onClick: k,
145
146
  onChange: B,
146
- onKeyDown: C,
147
- onKeyUp: T,
148
- onFocus: R,
147
+ onKeyDown: w,
148
+ onKeyUp: O,
149
+ onFocus: v,
149
150
  onBlur: a,
150
- placeholder: V,
151
- readOnly: M,
152
- required: U,
151
+ placeholder: U,
152
+ readOnly: V,
153
+ required: S,
153
154
  startAdornment: A,
154
155
  value: D,
155
156
  type: j,
156
- rows: t,
157
- slotProps: o = {},
157
+ rows: o,
158
+ slotProps: t = {},
158
159
  slots: r = {},
159
160
  minRows: i,
160
- maxRows: H
161
- } = l, Y = ge(l, Re), {
162
- getRootProps: te,
163
- getInputProps: oe,
161
+ maxRows: M
162
+ } = l, W = be(l, Re), {
163
+ getRootProps: oe,
164
+ getInputProps: te,
164
165
  focused: ne,
165
166
  formControlContext: re,
166
167
  error: ae,
167
168
  disabled: se
168
- } = Ne({
169
- disabled: v,
170
- defaultValue: h,
171
- error: g,
169
+ } = ve({
170
+ disabled: b,
171
+ defaultValue: f,
172
+ error: y,
172
173
  onBlur: a,
173
174
  onClick: k,
174
175
  onChange: B,
175
- onFocus: R,
176
- required: U,
176
+ onFocus: v,
177
+ required: S,
177
178
  value: D
178
- }), W = _ ? void 0 : j ?? "text", $ = y({}, l, {
179
+ }), z = _ ? void 0 : j ?? "text", $ = h({}, l, {
179
180
  disabled: se,
180
181
  error: ae,
181
182
  focused: ne,
182
183
  formControlContext: re,
183
184
  multiline: _,
184
- type: W
185
+ type: z
185
186
  }), G = Ee($), le = {
186
187
  "aria-describedby": x,
187
188
  "aria-label": P,
188
- "aria-labelledby": F,
189
+ "aria-labelledby": E,
189
190
  autoComplete: N,
190
191
  autoFocus: n,
191
- id: I,
192
- onKeyDown: C,
193
- onKeyUp: T,
194
- name: O,
195
- placeholder: V,
196
- readOnly: M,
197
- type: W
198
- }, J = (d = r.root) != null ? d : "div", ie = Q({
192
+ id: F,
193
+ onKeyDown: w,
194
+ onKeyUp: O,
195
+ name: I,
196
+ placeholder: U,
197
+ readOnly: V,
198
+ type: z
199
+ }, J = (u = r.root) != null ? u : "div", ie = Q({
199
200
  elementType: J,
200
- getSlotProps: te,
201
- externalSlotProps: o.root,
202
- externalForwardedProps: Y,
201
+ getSlotProps: oe,
202
+ externalSlotProps: t.root,
203
+ externalForwardedProps: W,
203
204
  additionalProps: {
204
- ref: p
205
+ ref: d
205
206
  },
206
207
  ownerState: $,
207
- className: [G.root, b]
208
+ className: [G.root, g]
208
209
  }), K = _ ? (c = r.textarea) != null ? c : "textarea" : (m = r.input) != null ? m : "input", ue = Q({
209
210
  elementType: K,
210
- getSlotProps: (pe) => oe(y({}, le, pe)),
211
- externalSlotProps: o.input,
212
- additionalProps: y({
213
- rows: _ ? t : void 0
214
- }, _ && !be(K) && {
215
- minRows: t || i,
216
- maxRows: t || H
211
+ getSlotProps: (pe) => te(h({}, le, pe)),
212
+ externalSlotProps: t.input,
213
+ additionalProps: h({
214
+ rows: _ ? o : void 0
215
+ }, _ && !Ce(K) && {
216
+ minRows: o || i,
217
+ maxRows: o || M
217
218
  }),
218
219
  ownerState: $,
219
220
  className: G.input
220
221
  });
221
- return process.env.NODE_ENV !== "production" && _ && t && (i || H) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ q(J, y({}, ie, {
222
- children: [A, /* @__PURE__ */ S(K, y({}, ue)), w]
222
+ return process.env.NODE_ENV !== "production" && _ && o && (i || M) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ H(J, h({}, ie, {
223
+ children: [A, /* @__PURE__ */ T(K, h({}, ue)), C]
223
224
  }));
224
225
  });
225
226
  process.env.NODE_ENV !== "production" && (ee.propTypes = {
@@ -372,75 +373,70 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
372
373
  */
373
374
  value: e.any
374
375
  });
375
- const Fe = (s) => /* @__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
- fill: "currentcolor",
377
- color: "currentcolor",
378
- width: "1em",
379
- height: "1em"
380
- }, ...s }, /* @__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" })), Ie = "_input__label_6va87_78", Oe = "_input_6va87_57", u = {
381
- "u-typography-h1": "_u-typography-h1_6va87_1",
382
- "u-typography-h2": "_u-typography-h2_6va87_8",
383
- "u-typography-h3": "_u-typography-h3_6va87_15",
384
- "u-typography-h4": "_u-typography-h4_6va87_22",
385
- "u-typography-h5": "_u-typography-h5_6va87_29",
386
- "u-typography-h6": "_u-typography-h6_6va87_36",
387
- "u-typography-base": "_u-typography-base_6va87_43",
388
- "u-typography-base--xxl": "_u-typography-base--xxl_6va87_49",
389
- "u-typography-base--xl": "_u-typography-base--xl_6va87_53",
390
- "u-typography-base--lg": "_u-typography-base--lg_6va87_57",
391
- "input__input-el": "_input__input-el_6va87_57",
392
- "u-typography-base--sm": "_u-typography-base--sm_6va87_61",
393
- "u-typography-base--bold": "_u-typography-base--bold_6va87_65",
394
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_6va87_68",
395
- "u-typography-base--underlined": "_u-typography-base--underlined_6va87_71",
396
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_6va87_74",
376
+ const Fe = "_input_1iqdc_57", Ie = "_input__label_1iqdc_81", p = {
377
+ "u-typography-h1": "_u-typography-h1_1iqdc_1",
378
+ "u-typography-h2": "_u-typography-h2_1iqdc_8",
379
+ "u-typography-h3": "_u-typography-h3_1iqdc_15",
380
+ "u-typography-h4": "_u-typography-h4_1iqdc_22",
381
+ "u-typography-h5": "_u-typography-h5_1iqdc_29",
382
+ "u-typography-h6": "_u-typography-h6_1iqdc_36",
383
+ "u-typography-base": "_u-typography-base_1iqdc_43",
384
+ "u-typography-base--xxl": "_u-typography-base--xxl_1iqdc_49",
385
+ "u-typography-base--xl": "_u-typography-base--xl_1iqdc_53",
386
+ "u-typography-base--lg": "_u-typography-base--lg_1iqdc_57",
387
+ "input__input-el": "_input__input-el_1iqdc_57",
388
+ "u-typography-base--sm": "_u-typography-base--sm_1iqdc_61",
389
+ "u-typography-base--bold": "_u-typography-base--bold_1iqdc_65",
390
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1iqdc_68",
391
+ "u-typography-base--underlined": "_u-typography-base--underlined_1iqdc_71",
392
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1iqdc_74",
393
+ input: Fe,
397
394
  input__label: Ie,
398
- "input__input-el-wrapper": "_input__input-el-wrapper_6va87_83",
399
- "input__left-icon": "_input__left-icon_6va87_101",
400
- "input__right-icon": "_input__right-icon_6va87_101",
401
- "input__messages-wrapper": "_input__messages-wrapper_6va87_113",
402
- "input__info-message": "_input__info-message_6va87_121",
403
- "input__error-message": "_input__error-message_6va87_121",
404
- "input__chars-counter": "_input__chars-counter_6va87_132",
405
- "input--disabled": "_input--disabled_6va87_136",
406
- input: Oe,
407
- "input--focused": "_input--focused_6va87_142",
408
- "input--error": "_input--error_6va87_145"
409
- }, Me = de(
395
+ "input__input-el-wrapper": "_input__input-el-wrapper_1iqdc_86",
396
+ "input__left-icon": "_input__left-icon_1iqdc_105",
397
+ "input__right-icon": "_input__right-icon_1iqdc_105",
398
+ "input__messages-wrapper": "_input__messages-wrapper_1iqdc_117",
399
+ "input__info-message": "_input__info-message_1iqdc_130",
400
+ "input__error-message": "_input__error-message_1iqdc_130",
401
+ "input__chars-counter": "_input__chars-counter_1iqdc_141",
402
+ "input--disabled": "_input--disabled_1iqdc_145",
403
+ "input--focused": "_input--focused_1iqdc_151",
404
+ "input--error": "_input--error_1iqdc_154"
405
+ }, Se = de(
410
406
  ({
411
407
  label: s,
412
408
  infoMessage: l,
413
- error: p,
414
- errorMessage: d,
409
+ error: d,
410
+ errorMessage: u,
415
411
  leftIcon: c,
416
412
  rightIcon: m,
417
413
  id: x,
418
414
  disabled: P,
419
- type: F = "text",
415
+ type: E = "text",
420
416
  maxLength: N,
421
417
  hideCharsCounter: n = !1,
422
- onChange: b,
423
- classNameWrapper: h,
424
- classNameLabel: v,
425
- classNameInput: w,
426
- classNameInfoMessage: g,
427
- classNameErrorMessage: I,
418
+ onChange: g,
419
+ classNameWrapper: f,
420
+ classNameLabel: b,
421
+ classNameInput: C,
422
+ classNameInfoMessage: y,
423
+ classNameErrorMessage: F,
428
424
  classNameCharsCounter: _,
429
- "data-testid-wrapper": O,
425
+ "data-testid-wrapper": I,
430
426
  "data-testid-label": k,
431
427
  "data-testid-input": B,
432
- "data-testid-infoMessage": C,
433
- "data-testid-errorMessage": T,
434
- "data-testid-charsCounter": R,
428
+ "data-testid-infoMessage": w,
429
+ "data-testid-errorMessage": O,
430
+ "data-testid-charsCounter": v,
435
431
  ...a
436
- }, V) => {
437
- const [M, U] = ce(0), A = _e(), D = x || `input_${A}`;
432
+ }, U) => {
433
+ const [V, S] = ce(0), A = _e(), D = x || `input_${A}`;
438
434
  Object.assign(a, { "data-testid": B });
439
- const j = (o) => {
435
+ const j = (t) => {
440
436
  var r, i;
441
- U((i = (r = o == null ? void 0 : o.target) == null ? void 0 : r.value) == null ? void 0 : i.length), b && b(o);
442
- }, t = me(() => a.multiline !== !0 ? {
443
- type: F,
437
+ S((i = (r = t == null ? void 0 : t.target) == null ? void 0 : r.value) == null ? void 0 : i.length), g && g(t);
438
+ }, o = me(() => a.multiline !== !0 ? {
439
+ type: E,
444
440
  multiline: a.multiline
445
441
  } : {
446
442
  type: void 0,
@@ -449,64 +445,64 @@ const Fe = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3
449
445
  minRows: a == null ? void 0 : a.minRows,
450
446
  maxRows: a == null ? void 0 : a.maxRows
451
447
  }, [a]);
452
- return /* @__PURE__ */ q("div", { className: E(u.input, h), "data-testid": O, children: [
453
- s && /* @__PURE__ */ S(
448
+ return /* @__PURE__ */ H("div", { className: R(p.input, f), "data-testid": I, children: [
449
+ s && /* @__PURE__ */ T(
454
450
  L,
455
451
  {
456
452
  element: "label",
457
453
  elementProps: { htmlFor: D },
458
- className: E(u.input__label, v),
454
+ className: R(p.input__label, b),
459
455
  "data-testid": k,
460
456
  children: s
461
457
  }
462
458
  ),
463
- /* @__PURE__ */ S(
459
+ /* @__PURE__ */ T(
464
460
  ee,
465
461
  {
466
462
  id: D,
467
463
  disabled: P,
468
- error: typeof p == "boolean" ? p : !!d,
464
+ error: typeof d == "boolean" ? d : !!u,
469
465
  "aria-label": s,
470
466
  slotProps: {
471
- root: (o) => ({
472
- className: E(u["input__input-el-wrapper"], {
473
- [u["input--disabled"]]: o.disabled,
474
- [u["input--focused"]]: o.focused,
475
- [u["input--error"]]: o.error
467
+ root: (t) => ({
468
+ className: R(p["input__input-el-wrapper"], {
469
+ [p["input--disabled"]]: t.disabled,
470
+ [p["input--focused"]]: t.focused,
471
+ [p["input--error"]]: t.error
476
472
  })
477
473
  }),
478
474
  input: {
479
- ref: V,
480
- className: E(u["input__input-el"], w),
475
+ ref: U,
476
+ className: R(p["input__input-el"], C),
481
477
  maxLength: N,
482
478
  onChange: j,
483
479
  ...a
484
480
  }
485
481
  },
486
- startAdornment: c && /* @__PURE__ */ S("span", { className: u["input__left-icon"], children: c }),
487
- endAdornment: m && /* @__PURE__ */ S("span", { className: u["input__right-icon"], children: m }),
488
- ...t
482
+ startAdornment: c && /* @__PURE__ */ T("span", { className: p["input__left-icon"], children: c }),
483
+ endAdornment: m && /* @__PURE__ */ T("span", { className: p["input__right-icon"], children: m }),
484
+ ...o
489
485
  }
490
486
  ),
491
- /* @__PURE__ */ q("div", { className: u["input__messages-wrapper"], children: [
492
- (d || l) && /* @__PURE__ */ q(
487
+ /* @__PURE__ */ H("div", { className: p["input__messages-wrapper"], children: [
488
+ (u || l) && /* @__PURE__ */ H(
493
489
  L,
494
490
  {
495
- className: d ? E(u["input__error-message"], I) : E(u["input__info-message"], g),
496
- "data-testid": d ? T : C,
491
+ className: u ? R(p["input__error-message"], F) : R(p["input__info-message"], y),
492
+ "data-testid": u ? O : w,
497
493
  children: [
498
- /* @__PURE__ */ S(Fe, {}),
499
- d || l
494
+ /* @__PURE__ */ T(fe, { icon: u ? "circle-exclamation" : "circle-info" }),
495
+ u || l
500
496
  ]
501
497
  }
502
498
  ),
503
- N && !n && /* @__PURE__ */ q(
499
+ N && !n && /* @__PURE__ */ H(
504
500
  L,
505
501
  {
506
- className: E(u["input__chars-counter"], _),
507
- "data-testid": R,
502
+ className: R(p["input__chars-counter"], _),
503
+ "data-testid": v,
508
504
  children: [
509
- M,
505
+ V,
510
506
  " / ",
511
507
  N
512
508
  ]
@@ -517,5 +513,5 @@ const Fe = (s) => /* @__PURE__ */ f.createElement("svg", { xmlns: "http://www.w3
517
513
  }
518
514
  );
519
515
  export {
520
- Me as Input
516
+ Se as Input
521
517
  };
@@ -15,9 +15,11 @@ export type PopoverProps = {
15
15
  className?: string;
16
16
  /** Id to be applied as `data-testid` on the root element */
17
17
  'data-testid'?: string;
18
+ /** Callback fired when a "click away" event is detected. */
19
+ onClickAway?: (event: MouseEvent | TouchEvent) => void;
18
20
  };
19
21
  export declare const Popover: {
20
- ({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
22
+ ({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, onClickAway, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
21
23
  Header: ({ children }: {
22
24
  children: import('react').ReactNode;
23
25
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,24 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { c as d } from "../../clsx-DB4S2d7J.js";
3
- import { s as f } from "../../Popover.module-B4boCutS.js";
4
- import { PopoverBody as c } from "./PopoverBody.js";
5
- import { PopoverFooter as v } from "./PopoverFooter.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as f } from "../../clsx-DB4S2d7J.js";
3
+ import { s as v } from "../../Popover.module-B4boCutS.js";
4
+ import { PopoverBody as l } from "./PopoverBody.js";
5
+ import { PopoverFooter as n } from "./PopoverFooter.js";
6
6
  import { PopoverHeader as P } from "./PopoverHeader.js";
7
- import { P as l } from "../../Popup-Ck3XlWMq.js";
8
- const o = ({
7
+ import { P as y } from "../../Popup-Ck3XlWMq.js";
8
+ import { C as h } from "../../ClickAwayListener-DbEYZpyh.js";
9
+ const r = ({
9
10
  anchorRef: t,
10
- open: e,
11
+ open: m,
11
12
  children: p,
12
- placement: m,
13
+ placement: i,
13
14
  className: s,
14
15
  offset: a,
15
- "data-testid": i
16
- }) => /* @__PURE__ */ r(l, { offset: a, placement: m, open: e, anchor: t, children: /* @__PURE__ */ r("div", { "data-testid": i, className: d(f.popover, s), children: p }) });
17
- o.Header = P;
18
- o.Footer = v;
19
- o.Body = c;
16
+ "data-testid": d,
17
+ onClickAway: e
18
+ }) => /* @__PURE__ */ o(h, { onClickAway: (c) => e ? e(c) : void 0, children: /* @__PURE__ */ o(y, { offset: a, placement: i, open: m, anchor: t, children: /* @__PURE__ */ o("div", { "data-testid": d, className: f(v.popover, s), children: p }) }) });
19
+ r.Header = P;
20
+ r.Footer = n;
21
+ r.Body = l;
20
22
  export {
21
- o as Popover
23
+ r as Popover
22
24
  };
@@ -4,7 +4,7 @@ import { StoryObj } from '@storybook/react';
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: {
7
- ({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
7
+ ({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, onClickAway, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
8
8
  Header: ({ children }: {
9
9
  children: import('react').ReactNode;
10
10
  }) => import("react/jsx-runtime").JSX.Element;