@pismo/marola 2.1.63 → 2.1.64

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 +1 @@
1
- ._u-typography-h1_1u4jg_2{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_1u4jg_9{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_1u4jg_16{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_1u4jg_23{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_1u4jg_30{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_1u4jg_37{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_1u4jg_44{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1u4jg_50{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1u4jg_54{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1u4jg_58,._input__input-el_1u4jg_58{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1u4jg_62{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1u4jg_66,._input__input-el_1u4jg_58{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1u4jg_69{text-decoration:line-through}._u-typography-base--underlined_1u4jg_72{text-decoration:underline}._u-typography-base--strikethrough-underlined_1u4jg_75{text-decoration:underline line-through}._input_1u4jg_58{position:relative}._input_1u4jg_58:has(._input__messages-wrapper_1u4jg_82:not(:empty)){padding-bottom:1.6875rem}._input__label_1u4jg_85{display:block;margin-bottom:.3125rem;color:var(--colors-neutral-text-color-text)}._input__input-el-wrapper_1u4jg_90{display:flex;align-items:center;height:2.5rem;border:solid .0625rem var(--gray-25);border-radius:.375rem;transition:all .3s}._input__input-el-wrapper_1u4jg_90:has(textarea){height:auto}._input__input-el-wrapper_1u4jg_90:has(input:disabled){background-color:var(--colors-neutral-bg-color-bg-container-disabled)}._input__input-el_1u4jg_58{all:unset;width:100%;height:2.5rem;padding:0 1rem;color:var(--gray-90);outline:none}._input__input-el_1u4jg_58::placeholder{color:var(--gray-50)}._input__left-icon_1u4jg_115,._input__right-icon_1u4jg_115{display:flex;align-items:center;justify-content:center;height:1rem}._input__left-icon_1u4jg_115{padding-left:1rem}._input__right-icon_1u4jg_115{padding-right:1rem}._input__messages-wrapper_1u4jg_82{position:absolute;display:flex;gap:1rem;justify-content:space-between;width:100%}._input__messages-wrapper_1u4jg_82:not(:empty){margin-top:.3125rem}._input__messages-wrapper_1u4jg_82 svg{min-width:1rem;min-height:1rem}._input__info-message_1u4jg_141,._input__error-message_1u4jg_141{display:flex;gap:.375rem;align-items:center}._input__info-message_1u4jg_141{color:var(--gray-75)}._input__error-message_1u4jg_141{color:var(--alert)}._input__chars-counter_1u4jg_152{margin-left:auto;color:var(--gray-75);white-space:nowrap}._input--disabled_1u4jg_157 ._input__input-el_1u4jg_58{color:var(--gray-50)}._input_1u4jg_58:has(._input--disabled_1u4jg_157) ._input__label_1u4jg_85{color:var(--gray-25)}._input--focused_1u4jg_163._input__input-el-wrapper_1u4jg_90{border-color:var(--accent)}._input--error_1u4jg_166._input__input-el-wrapper_1u4jg_90{border-color:var(--alert)}._input__input-el-wrapper_1u4jg_90:hover:not(._input--disabled_1u4jg_157,._input--focused_1u4jg_163,._input--error_1u4jg_166){border-color:var(--gray-75)}textarea._input__input-el_1u4jg_58{height:auto;padding:.5rem 1rem;overflow:hidden;resize:vertical}
1
+ ._u-typography-h1_14020_2{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_14020_9{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_14020_16{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_14020_23{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_14020_30{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_14020_37{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_14020_44{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_14020_50{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_14020_54{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_14020_58,._input__input-el_14020_58{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_14020_62{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_14020_66,._input__input-el_14020_58{font-weight:var(--base-bold)}._u-typography-base--strikethrough_14020_69{text-decoration:line-through}._u-typography-base--underlined_14020_72{text-decoration:underline}._u-typography-base--strikethrough-underlined_14020_75{text-decoration:underline line-through}._input_14020_58{position:relative}._input_14020_58:has(._input__messages-wrapper_14020_82:not(:empty)){padding-bottom:1.6875rem}._input__labelWrapper_14020_85{display:flex;gap:.5rem;align-items:center;margin-bottom:.3125rem}._input__label_14020_85{display:block;color:var(--colors-neutral-text-color-text)}._input__labelHelp_14020_95{display:inline-flex;align-items:center;color:var(--colors-neutral-text-color-secondary)}._input__input-el-wrapper_14020_100{display:flex;align-items:center;height:2.5rem;border:solid .0625rem var(--gray-25);border-radius:.375rem;transition:all .3s}._input__input-el-wrapper_14020_100:has(textarea){height:auto}._input__input-el-wrapper_14020_100:has(input:disabled){background-color:var(--colors-neutral-bg-color-bg-container-disabled)}._input__input-el_14020_58{all:unset;width:100%;height:2.5rem;padding:0 1rem;color:var(--gray-90);outline:none}._input__input-el_14020_58::placeholder{color:var(--gray-50)}._input__left-icon_14020_125,._input__right-icon_14020_125{display:flex;align-items:center;justify-content:center;height:1rem}._input__left-icon_14020_125{padding-left:1rem}._input__right-icon_14020_125{padding-right:1rem}._input__messages-wrapper_14020_82{position:absolute;display:flex;gap:1rem;justify-content:space-between;width:100%}._input__messages-wrapper_14020_82:not(:empty){margin-top:.3125rem}._input__messages-wrapper_14020_82 svg{min-width:1rem;min-height:1rem}._input__info-message_14020_151,._input__error-message_14020_151{display:flex;gap:.375rem;align-items:center}._input__info-message_14020_151{color:var(--gray-75)}._input__error-message_14020_151{color:var(--alert)}._input__chars-counter_14020_162{margin-left:auto;color:var(--gray-75);white-space:nowrap}._input--disabled_14020_167 ._input__input-el_14020_58{color:var(--gray-50)}._input_14020_58:has(._input--disabled_14020_167) ._input__label_14020_85{color:var(--gray-25)}._input--focused_14020_173._input__input-el-wrapper_14020_100{border-color:var(--accent)}._input--error_14020_176._input__input-el-wrapper_14020_100{border-color:var(--alert)}._input__input-el-wrapper_14020_100:hover:not(._input--disabled_14020_167,._input--focused_14020_173,._input--error_14020_176){border-color:var(--gray-75)}textarea._input__input-el_14020_58{height:auto;padding:.5rem 1rem;overflow:hidden;resize:vertical}
@@ -4,6 +4,8 @@ type CustomInputTypeAttribute = Exclude<HTMLInputTypeAttribute, ExcludedInputTyp
4
4
  export type SingleInputProps = InputHTMLAttributes<HTMLInputElement> & {
5
5
  /** Label text */
6
6
  label?: string;
7
+ /** Label help element */
8
+ labelHelp?: React.ReactNode;
7
9
  /** Info message text */
8
10
  infoMessage?: React.ReactNode;
9
11
  /** Show the field layout as an error */
@@ -1,229 +1,229 @@
1
- import { jsxs as M, jsx as H } from "react/jsx-runtime";
2
- import * as E from "react";
3
- import { forwardRef as Ne, useState as ye, useId as Ce, useRef as xe, useMemo as ie } from "react";
4
- import { formatDecimalValue as me, allowOnlyIntegerNumbers as ve, allowOnlyNumbers as Pe, parseToInteger as Re } from "../../utils/inputNumberAsText.js";
5
- import { c as B } from "../../clsx-OuTLNxxd.js";
6
- import { Icon as Ee } from "../Icon/Icon.js";
7
- import { Typography as se } from "../Typography/Typography.js";
8
- import { g as je, a as Ve, u as Fe, f as de, _ as y, b as Se, c as _e, i as Oe, d as Te, e as Ie, P as n } from "../../useSlotProps-CYHDC4TN.js";
9
- import '../../assets/Input.css';function Be(r) {
1
+ import { jsxs as j, jsx as A } from "react/jsx-runtime";
2
+ import * as F from "react";
3
+ import { forwardRef as ye, useState as Ce, useId as ve, useRef as xe, useMemo as se } from "react";
4
+ import { formatDecimalValue as _e, allowOnlyIntegerNumbers as Pe, allowOnlyNumbers as Re, parseToInteger as Ee } from "../../utils/inputNumberAsText.js";
5
+ import { c as U } from "../../clsx-OuTLNxxd.js";
6
+ import { Icon as Ve } from "../Icon/Icon.js";
7
+ import { Typography as de } from "../Typography/Typography.js";
8
+ import { g as Fe, a as Se, u as Oe, f as pe, _ as y, b as Te, c as be, i as Ie, d as Be, e as Ue, P as n } from "../../useSlotProps-CYHDC4TN.js";
9
+ import '../../assets/Input.css';function je(r) {
10
10
  let i = "https://mui.com/production-error/?code=" + r;
11
- for (let _ = 1; _ < arguments.length; _ += 1)
12
- i += "&args[]=" + encodeURIComponent(arguments[_]);
11
+ for (let f = 1; f < arguments.length; f += 1)
12
+ i += "&args[]=" + encodeURIComponent(arguments[f]);
13
13
  return "Minified MUI error #" + r + "; visit " + i + " for the full message.";
14
14
  }
15
15
  const ge = "Input";
16
- function Ue(r) {
17
- return je(ge, r);
16
+ function Ae(r) {
17
+ return Fe(ge, r);
18
18
  }
19
- Ve(ge, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
- const be = /* @__PURE__ */ E.createContext(void 0);
21
- process.env.NODE_ENV !== "production" && (be.displayName = "FormControlContext");
22
- function Ae() {
23
- return E.useContext(be);
19
+ Se(ge, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
20
+ const he = /* @__PURE__ */ F.createContext(void 0);
21
+ process.env.NODE_ENV !== "production" && (he.displayName = "FormControlContext");
22
+ function ke() {
23
+ return F.useContext(he);
24
24
  }
25
- function ke(r = {}) {
25
+ function He(r = {}) {
26
26
  const {
27
27
  defaultValue: i,
28
- disabled: _ = !1,
29
- error: c = !1,
30
- onBlur: g,
28
+ disabled: f = !1,
29
+ error: C = !1,
30
+ onBlur: u,
31
31
  onChange: h,
32
- onFocus: j,
33
- required: V = !1,
34
- value: f,
35
- inputRef: F
36
- } = r, o = Ae();
37
- let w, s, C, N, x;
38
- if (o) {
39
- var U, u, v;
40
- if (w = void 0, s = (U = o.disabled) != null ? U : !1, C = (u = o.error) != null ? u : !1, N = (v = o.required) != null ? v : !1, x = o.value, process.env.NODE_ENV !== "production") {
41
- const e = ["defaultValue", "disabled", "error", "required", "value"].filter((a) => r[a] !== void 0);
42
- e.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: ${e.join(", ")}`].join(`
32
+ onFocus: x,
33
+ required: S = !1,
34
+ value: k,
35
+ inputRef: m
36
+ } = r, l = ke();
37
+ let P, p, _, v, b;
38
+ if (l) {
39
+ var H, g, N;
40
+ if (P = void 0, p = (H = l.disabled) != null ? H : !1, _ = (g = l.error) != null ? g : !1, v = (N = l.required) != null ? N : !1, b = l.value, process.env.NODE_ENV !== "production") {
41
+ const o = ["defaultValue", "disabled", "error", "required", "value"].filter((e) => r[e] !== 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(`
43
43
  `));
44
44
  }
45
45
  } else
46
- w = i, s = _, C = c, N = V, x = f;
46
+ P = i, p = f, _ = C, v = S, b = k;
47
47
  const {
48
- current: K
49
- } = E.useRef(x != null), q = E.useCallback((e) => {
50
- process.env.NODE_ENV !== "production" && e && e.nodeName !== "INPUT" && !e.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(`
48
+ current: R
49
+ } = F.useRef(b != null), q = F.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(`
51
51
  `));
52
- }, []), R = E.useRef(null), A = Fe(R, F, q), [S, O] = E.useState(!1);
53
- E.useEffect(() => {
54
- !o && s && S && (O(!1), g == null || g());
55
- }, [o, s, S, g]);
56
- const D = (e) => (a) => {
57
- var l;
58
- if (o != null && o.disabled) {
59
- a.stopPropagation();
52
+ }, []), E = F.useRef(null), M = Oe(E, m, q), [O, T] = F.useState(!1);
53
+ F.useEffect(() => {
54
+ !l && p && O && (T(!1), u == null || u());
55
+ }, [l, p, O, u]);
56
+ const D = (o) => (e) => {
57
+ var a;
58
+ if (l != null && l.disabled) {
59
+ e.stopPropagation();
60
60
  return;
61
61
  }
62
- if ((l = e.onFocus) == null || l.call(e, a), o && o.onFocus) {
63
- var d;
64
- o == null || (d = o.onFocus) == null || d.call(o);
62
+ if ((a = o.onFocus) == null || a.call(o, e), l && l.onFocus) {
63
+ var c;
64
+ l == null || (c = l.onFocus) == null || c.call(l);
65
65
  } else
66
- O(!0);
67
- }, $ = (e) => (a) => {
68
- var l;
69
- (l = e.onBlur) == null || l.call(e, a), o && o.onBlur ? o.onBlur() : O(!1);
70
- }, Y = (e) => (a, ...l) => {
71
- var d, T;
72
- if (!K && (a.target || R.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." : Be(17));
74
- o == null || (d = o.onChange) == null || d.call(o, a), (T = e.onChange) == null || T.call(e, a, ...l);
75
- }, L = (e) => (a) => {
76
- var l;
77
- R.current && a.currentTarget === a.target && R.current.focus(), (l = e.onClick) == null || l.call(e, a);
66
+ T(!0);
67
+ }, $ = (o) => (e) => {
68
+ var a;
69
+ (a = o.onBlur) == null || a.call(o, e), l && l.onBlur ? l.onBlur() : T(!1);
70
+ }, W = (o) => (e, ...a) => {
71
+ var c, V;
72
+ if (!R && (e.target || E.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." : je(17));
74
+ l == null || (c = l.onChange) == null || c.call(l, e), (V = o.onChange) == null || V.call(o, e, ...a);
75
+ }, Y = (o) => (e) => {
76
+ var a;
77
+ E.current && e.currentTarget === e.target && E.current.focus(), (a = o.onClick) == null || a.call(o, e);
78
78
  };
79
79
  return {
80
- disabled: s,
81
- error: C,
82
- focused: S,
83
- formControlContext: o,
84
- getInputProps: (e = {}) => {
85
- const l = y({}, {
86
- onBlur: g,
80
+ disabled: p,
81
+ error: _,
82
+ focused: O,
83
+ formControlContext: l,
84
+ getInputProps: (o = {}) => {
85
+ const a = y({}, {
86
+ onBlur: u,
87
87
  onChange: h,
88
- onFocus: j
89
- }, de(e)), d = y({}, l, {
90
- onBlur: $(l),
91
- onChange: Y(l),
92
- onFocus: D(l)
88
+ onFocus: x
89
+ }, pe(o)), c = y({}, a, {
90
+ onBlur: $(a),
91
+ onChange: W(a),
92
+ onFocus: D(a)
93
93
  });
94
- return y({}, d, {
95
- "aria-invalid": C || void 0,
96
- defaultValue: w,
97
- value: x,
98
- required: N,
99
- disabled: s
100
- }, e, {
101
- ref: A
102
- }, d);
94
+ return y({}, c, {
95
+ "aria-invalid": _ || void 0,
96
+ defaultValue: P,
97
+ value: b,
98
+ required: v,
99
+ disabled: p
100
+ }, o, {
101
+ ref: M
102
+ }, c);
103
103
  },
104
- getRootProps: (e = {}) => {
105
- const a = de(r, ["onBlur", "onChange", "onFocus"]), l = y({}, a, de(e));
106
- return y({}, e, l, {
107
- onClick: L(l)
104
+ getRootProps: (o = {}) => {
105
+ const e = pe(r, ["onBlur", "onChange", "onFocus"]), a = y({}, e, pe(o));
106
+ return y({}, o, a, {
107
+ onClick: Y(a)
108
108
  });
109
109
  },
110
- inputRef: A,
111
- required: N,
112
- value: x
110
+ inputRef: M,
111
+ required: v,
112
+ value: b
113
113
  };
114
114
  }
115
- const Me = ["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"], He = (r) => {
115
+ const Me = ["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"], Ke = (r) => {
116
116
  const {
117
117
  disabled: i,
118
- error: _,
119
- focused: c,
120
- formControlContext: g,
118
+ error: f,
119
+ focused: C,
120
+ formControlContext: u,
121
121
  multiline: h,
122
- startAdornment: j,
123
- endAdornment: V
122
+ startAdornment: x,
123
+ endAdornment: S
124
124
  } = r;
125
- return Te({
126
- root: ["root", i && "disabled", _ && "error", c && "focused", !!g && "formControl", h && "multiline", !!j && "adornedStart", !!V && "adornedEnd"],
125
+ return Be({
126
+ root: ["root", i && "disabled", f && "error", C && "focused", !!u && "formControl", h && "multiline", !!x && "adornedStart", !!S && "adornedEnd"],
127
127
  input: ["input", i && "disabled", h && "multiline"]
128
- }, Ie(Ue));
129
- }, he = /* @__PURE__ */ E.forwardRef(function(i, _) {
130
- var c, g, h;
128
+ }, Ue(Ae));
129
+ }, Ne = /* @__PURE__ */ F.forwardRef(function(i, f) {
130
+ var C, u, h;
131
131
  const {
132
- "aria-describedby": j,
133
- "aria-label": V,
134
- "aria-labelledby": f,
135
- autoComplete: F,
136
- autoFocus: o,
137
- className: w,
138
- defaultValue: s,
139
- disabled: C,
140
- endAdornment: N,
141
- error: x,
142
- id: U,
143
- multiline: u = !1,
144
- name: v,
145
- onClick: K,
132
+ "aria-describedby": x,
133
+ "aria-label": S,
134
+ "aria-labelledby": k,
135
+ autoComplete: m,
136
+ autoFocus: l,
137
+ className: P,
138
+ defaultValue: p,
139
+ disabled: _,
140
+ endAdornment: v,
141
+ error: b,
142
+ id: H,
143
+ multiline: g = !1,
144
+ name: N,
145
+ onClick: R,
146
146
  onChange: q,
147
- onKeyDown: R,
148
- onKeyUp: A,
149
- onFocus: S,
150
- onBlur: O,
147
+ onKeyDown: E,
148
+ onKeyUp: M,
149
+ onFocus: O,
150
+ onBlur: T,
151
151
  placeholder: D,
152
152
  readOnly: $,
153
- required: Y,
154
- startAdornment: L,
155
- value: Z,
156
- type: W,
157
- rows: e,
158
- slotProps: a = {},
159
- slots: l = {},
160
- minRows: d,
161
- maxRows: T
162
- } = i, z = Se(i, Me), {
163
- getRootProps: G,
164
- getInputProps: J,
165
- focused: ae,
166
- formControlContext: ee,
167
- error: re,
153
+ required: W,
154
+ startAdornment: Y,
155
+ value: X,
156
+ type: L,
157
+ rows: o,
158
+ slotProps: e = {},
159
+ slots: a = {},
160
+ minRows: c,
161
+ maxRows: V
162
+ } = i, Z = Te(i, Me), {
163
+ getRootProps: ee,
164
+ getInputProps: z,
165
+ focused: G,
166
+ formControlContext: re,
167
+ error: ne,
168
168
  disabled: ue
169
- } = ke({
170
- disabled: C,
171
- defaultValue: s,
172
- error: x,
173
- onBlur: O,
174
- onClick: K,
169
+ } = He({
170
+ disabled: _,
171
+ defaultValue: p,
172
+ error: b,
173
+ onBlur: T,
174
+ onClick: R,
175
175
  onChange: q,
176
- onFocus: S,
177
- required: Y,
178
- value: Z
179
- }), ne = u ? void 0 : W ?? "text", Q = y({}, i, {
176
+ onFocus: O,
177
+ required: W,
178
+ value: X
179
+ }), te = g ? void 0 : L ?? "text", J = y({}, i, {
180
180
  disabled: ue,
181
- error: re,
182
- focused: ae,
183
- formControlContext: ee,
184
- multiline: u,
185
- type: ne
186
- }), te = He(Q), oe = {
187
- "aria-describedby": j,
188
- "aria-label": V,
189
- "aria-labelledby": f,
190
- autoComplete: F,
191
- autoFocus: o,
192
- id: U,
193
- onKeyDown: R,
194
- onKeyUp: A,
195
- name: v,
181
+ error: ne,
182
+ focused: G,
183
+ formControlContext: re,
184
+ multiline: g,
185
+ type: te
186
+ }), oe = Ke(J), ie = {
187
+ "aria-describedby": x,
188
+ "aria-label": S,
189
+ "aria-labelledby": k,
190
+ autoComplete: m,
191
+ autoFocus: l,
192
+ id: H,
193
+ onKeyDown: E,
194
+ onKeyUp: M,
195
+ name: N,
196
196
  placeholder: D,
197
197
  readOnly: $,
198
- type: ne
199
- }, X = (c = l.root) != null ? c : "div", t = _e({
200
- elementType: X,
201
- getSlotProps: G,
202
- externalSlotProps: a.root,
203
- externalForwardedProps: z,
198
+ type: te
199
+ }, Q = (C = a.root) != null ? C : "div", le = be({
200
+ elementType: Q,
201
+ getSlotProps: ee,
202
+ externalSlotProps: e.root,
203
+ externalForwardedProps: Z,
204
204
  additionalProps: {
205
- ref: _
205
+ ref: f
206
206
  },
207
- ownerState: Q,
208
- className: [te.root, w]
209
- }), b = u ? (g = l.textarea) != null ? g : "textarea" : (h = l.input) != null ? h : "input", I = _e({
210
- elementType: b,
211
- getSlotProps: (P) => J(y({}, oe, P)),
212
- externalSlotProps: a.input,
207
+ ownerState: J,
208
+ className: [oe.root, P]
209
+ }), t = g ? (u = a.textarea) != null ? u : "textarea" : (h = a.input) != null ? h : "input", w = be({
210
+ elementType: t,
211
+ getSlotProps: (I) => z(y({}, ie, I)),
212
+ externalSlotProps: e.input,
213
213
  additionalProps: y({
214
- rows: u ? e : void 0
215
- }, u && !Oe(b) && {
216
- minRows: e || d,
217
- maxRows: e || T
214
+ rows: g ? o : void 0
215
+ }, g && !Ie(t) && {
216
+ minRows: o || c,
217
+ maxRows: o || V
218
218
  }),
219
- ownerState: Q,
220
- className: te.input
219
+ ownerState: J,
220
+ className: oe.input
221
221
  });
222
- return process.env.NODE_ENV !== "production" && u && e && (d || T) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ M(X, y({}, t, {
223
- children: [L, /* @__PURE__ */ H(b, y({}, I)), N]
222
+ return process.env.NODE_ENV !== "production" && g && o && (c || V) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ j(Q, y({}, le, {
223
+ children: [Y, /* @__PURE__ */ A(t, y({}, w)), v]
224
224
  }));
225
225
  });
226
- process.env.NODE_ENV !== "production" && (he.propTypes = {
226
+ process.env.NODE_ENV !== "production" && (Ne.propTypes = {
227
227
  // ┌────────────────────────────── Warning ──────────────────────────────┐
228
228
  // │ These PropTypes are generated from the TypeScript type definitions. │
229
229
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -373,103 +373,106 @@ process.env.NODE_ENV !== "production" && (he.propTypes = {
373
373
  */
374
374
  value: n.any
375
375
  });
376
- const Ke = "_input_1u4jg_58", qe = "_input__label_1u4jg_85", m = {
377
- "input__input-el": "_input__input-el_1u4jg_58",
378
- input: Ke,
379
- "input__messages-wrapper": "_input__messages-wrapper_1u4jg_82",
380
- input__label: qe,
381
- "input__input-el-wrapper": "_input__input-el-wrapper_1u4jg_90",
382
- "input__left-icon": "_input__left-icon_1u4jg_115",
383
- "input__right-icon": "_input__right-icon_1u4jg_115",
384
- "input__info-message": "_input__info-message_1u4jg_141",
385
- "input__error-message": "_input__error-message_1u4jg_141",
386
- "input__chars-counter": "_input__chars-counter_1u4jg_152",
387
- "input--disabled": "_input--disabled_1u4jg_157",
388
- "input--focused": "_input--focused_1u4jg_163",
389
- "input--error": "_input--error_1u4jg_166"
390
- }, Je = Ne(
376
+ const qe = "_input_14020_58", De = "_input__labelWrapper_14020_85", $e = "_input__label_14020_85", We = "_input__labelHelp_14020_95", s = {
377
+ "input__input-el": "_input__input-el_14020_58",
378
+ input: qe,
379
+ "input__messages-wrapper": "_input__messages-wrapper_14020_82",
380
+ input__labelWrapper: De,
381
+ input__label: $e,
382
+ input__labelHelp: We,
383
+ "input__input-el-wrapper": "_input__input-el-wrapper_14020_100",
384
+ "input__left-icon": "_input__left-icon_14020_125",
385
+ "input__right-icon": "_input__right-icon_14020_125",
386
+ "input__info-message": "_input__info-message_14020_151",
387
+ "input__error-message": "_input__error-message_14020_151",
388
+ "input__chars-counter": "_input__chars-counter_14020_162",
389
+ "input--disabled": "_input--disabled_14020_167",
390
+ "input--focused": "_input--focused_14020_173",
391
+ "input--error": "_input--error_14020_176"
392
+ }, Ze = ye(
391
393
  ({
392
394
  label: r,
393
- infoMessage: i,
394
- error: _,
395
- errorMessage: c,
396
- leftIcon: g,
397
- rightIcon: h,
398
- id: j,
399
- disabled: V,
400
- type: f = "text",
401
- maxLength: F,
402
- allowLeadingZeros: o = !1,
403
- isInteger: w,
404
- useCommaInDecimal: s,
405
- allowNegativeNumbers: C = !1,
406
- decimalLength: N = 10,
407
- hideCharsCounter: x = !1,
408
- required: U,
409
- onChange: u,
410
- triggerDelay: v,
411
- classNameWrapper: K,
412
- classNameLabel: q,
413
- classNameInput: R,
414
- classNameInfoMessage: A,
415
- classNameErrorMessage: S,
416
- classNameCharsCounter: O,
417
- "data-testid-wrapper": D,
418
- "data-testid-label": $,
395
+ labelHelp: i,
396
+ infoMessage: f,
397
+ error: C,
398
+ errorMessage: u,
399
+ leftIcon: h,
400
+ rightIcon: x,
401
+ id: S,
402
+ disabled: k,
403
+ type: m = "text",
404
+ maxLength: l,
405
+ allowLeadingZeros: P = !1,
406
+ isInteger: p,
407
+ useCommaInDecimal: _,
408
+ allowNegativeNumbers: v = !1,
409
+ decimalLength: b = 10,
410
+ hideCharsCounter: H = !1,
411
+ required: g,
412
+ onChange: N,
413
+ triggerDelay: R,
414
+ classNameWrapper: q,
415
+ classNameLabel: E,
416
+ classNameInput: M,
417
+ classNameInfoMessage: O,
418
+ classNameErrorMessage: T,
419
+ classNameCharsCounter: D,
420
+ "data-testid-wrapper": $,
421
+ "data-testid-label": W,
419
422
  "data-testid-input": Y,
420
- "data-testid-infoMessage": L,
421
- "data-testid-errorMessage": Z,
422
- "data-testid-charsCounter": W,
423
+ "data-testid-infoMessage": X,
424
+ "data-testid-errorMessage": L,
425
+ "data-testid-charsCounter": o,
423
426
  ...e
424
427
  }, a) => {
425
- var oe, X;
426
- const [l, d] = ye(
427
- ((oe = e.value) == null ? void 0 : oe.length) || ((X = e.defaultValue) == null ? void 0 : X.length) || 0
428
- ), T = Ce(), z = j || `input_${T}`;
428
+ var Q, le;
429
+ const [c, V] = Ce(
430
+ ((Q = e.value) == null ? void 0 : Q.length) || ((le = e.defaultValue) == null ? void 0 : le.length) || 0
431
+ ), Z = ve(), ee = S || `input_${Z}`;
429
432
  Object.assign(e, { "data-testid": Y });
430
- const G = F && !x, J = xe(), ae = (t) => {
431
- J.current && clearTimeout(J.current), J.current = setTimeout(() => {
432
- ee(t);
433
- }, v);
434
- }, ee = (t) => {
435
- var b, I, P, pe;
436
- if (f === "number-as-text") {
437
- let p = w ? Re(t.target.value, o) : s ? t.target.value.replace(".", ",") : t.target.value.replace(",", ".");
438
- if (!w && N > 0) {
439
- const ce = String(p), [we, fe] = ce.split(/,|\./);
440
- ce !== "" && fe && (p = [we, fe.slice(0, N)].join(s ? "," : "."));
433
+ const z = l && !H, G = xe(), re = (t) => {
434
+ G.current && clearTimeout(G.current), G.current = setTimeout(() => {
435
+ ne(t);
436
+ }, R);
437
+ }, ne = (t) => {
438
+ var w, I, B, ce;
439
+ if (m === "number-as-text") {
440
+ let d = p ? Ee(t.target.value, P) : _ ? t.target.value.replace(".", ",") : t.target.value.replace(",", ".");
441
+ if (!p && b > 0) {
442
+ const fe = String(d), [we, me] = fe.split(/,|\./);
443
+ fe !== "" && me && (d = [we, me.slice(0, b)].join(_ ? "," : "."));
441
444
  }
442
- t.target.value = String(p);
443
- const le = !isNaN(Number(String(p).replace(",", "."))), k = String(p).length ? String(p).replace(",", ".") : "";
444
- u == null || u({
445
+ t.target.value = String(d);
446
+ const ae = !isNaN(Number(String(d).replace(",", "."))), K = String(d).length ? String(d).replace(",", ".") : "";
447
+ N == null || N({
445
448
  ...t,
446
449
  target: {
447
450
  ...t.target,
448
- value: k,
449
- valueAsNumber: le && String(p).length ? Number(String(p).replace(",", ".")) : NaN
451
+ value: K,
452
+ valueAsNumber: ae && String(d).length ? Number(String(d).replace(",", ".")) : NaN
450
453
  }
451
- }), G && d((I = (b = t == null ? void 0 : t.target) == null ? void 0 : b.value) == null ? void 0 : I.length);
454
+ }), z && V((I = (w = t == null ? void 0 : t.target) == null ? void 0 : w.value) == null ? void 0 : I.length);
452
455
  return;
453
456
  }
454
- if (f === "number") {
455
- let p = String(t.target.value);
456
- const [le, k] = p.split(".");
457
- p !== "" && (k != null && k.length ? p = [Number(le), k.slice(0, N)].join(".") : p = String(Number(le))), t.target.value = p;
457
+ if (m === "number") {
458
+ let d = String(t.target.value);
459
+ const [ae, K] = d.split(".");
460
+ d !== "" && (K != null && K.length ? d = [Number(ae), K.slice(0, b)].join(".") : d = String(Number(ae))), t.target.value = d;
458
461
  }
459
- G && d((pe = (P = t == null ? void 0 : t.target) == null ? void 0 : P.value) == null ? void 0 : pe.length), u && u(t);
460
- }, re = (t) => {
461
- var b;
462
- f === "number-as-text" && (w ? ve(t, C) : Pe(t, C)), (b = e == null ? void 0 : e.onKeyDown) == null || b.call(e, t);
462
+ z && V((ce = (B = t == null ? void 0 : t.target) == null ? void 0 : B.value) == null ? void 0 : ce.length), N && N(t);
463
463
  }, ue = (t) => {
464
- var b;
465
- if (f === "number-as-text" && t.target.value.length) {
466
- const I = w ? t.target.value.replace(/(,\.)/gi, "") : t.target.value.replace(",", ".");
467
- let P = String(o ? I : Number(I));
468
- isNaN(Number(P)) && (P = ""), t.target.value = s ? P.replace(".", ",") : P;
464
+ var w;
465
+ m === "number-as-text" && (p ? Pe(t, v) : Re(t, v)), (w = e == null ? void 0 : e.onKeyDown) == null || w.call(e, t);
466
+ }, te = (t) => {
467
+ var w;
468
+ if (m === "number-as-text" && t.target.value.length) {
469
+ const I = p ? t.target.value.replace(/(,\.)/gi, "") : t.target.value.replace(",", ".");
470
+ let B = String(P ? I : Number(I));
471
+ isNaN(Number(B)) && (B = ""), t.target.value = _ ? B.replace(".", ",") : B;
469
472
  }
470
- (b = e == null ? void 0 : e.onBlur) == null || b.call(e, t);
471
- }, ne = ie(() => e.multiline !== !0 ? {
472
- type: f === "number-as-text" ? "text" : f,
473
+ (w = e == null ? void 0 : e.onBlur) == null || w.call(e, t);
474
+ }, J = se(() => e.multiline !== !0 ? {
475
+ type: m === "number-as-text" ? "text" : m,
473
476
  multiline: e.multiline
474
477
  } : {
475
478
  type: void 0,
@@ -477,81 +480,84 @@ const Ke = "_input_1u4jg_58", qe = "_input__label_1u4jg_85", m = {
477
480
  rows: (e == null ? void 0 : e.rows) || 5,
478
481
  minRows: e == null ? void 0 : e.minRows,
479
482
  maxRows: e == null ? void 0 : e.maxRows
480
- }, [e]), Q = ie(() => {
481
- const t = v ? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.defaultValue) : e == null ? void 0 : e.defaultValue;
482
- return f === "number-as-text" && t ? me(t, s) : t;
483
- }, [e.defaultValue]), te = ie(() => {
484
- if (!v)
485
- return f === "number-as-text" && (e != null && e.value) ? me(e == null ? void 0 : e.value, s) : e == null ? void 0 : e.value;
483
+ }, [e]), oe = se(() => {
484
+ const t = R ? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.defaultValue) : e == null ? void 0 : e.defaultValue;
485
+ return m === "number-as-text" && t ? _e(t, _) : t;
486
+ }, [e.defaultValue]), ie = se(() => {
487
+ if (!R)
488
+ return m === "number-as-text" && (e != null && e.value) ? _e(e == null ? void 0 : e.value, _) : e == null ? void 0 : e.value;
486
489
  }, [e.value]);
487
- return /* @__PURE__ */ M("div", { className: B(m.input, K), "data-testid": D, children: [
488
- r && /* @__PURE__ */ M(
489
- se,
490
- {
491
- bold: !0,
492
- element: "label",
493
- elementProps: { htmlFor: z },
494
- className: B(m.input__label, q),
495
- "data-testid": $,
496
- children: [
497
- r,
498
- U && /* @__PURE__ */ H("span", { children: "*" })
499
- ]
500
- }
501
- ),
502
- /* @__PURE__ */ H(
503
- he,
490
+ return /* @__PURE__ */ j("div", { className: U(s.input, q), "data-testid": $, children: [
491
+ (r || i) && /* @__PURE__ */ j("div", { className: s.input__labelWrapper, children: [
492
+ r && /* @__PURE__ */ j(
493
+ de,
494
+ {
495
+ bold: !0,
496
+ element: "label",
497
+ elementProps: { htmlFor: ee },
498
+ className: U(s.input__label, E),
499
+ "data-testid": W,
500
+ children: [
501
+ r,
502
+ g && /* @__PURE__ */ A("span", { children: "*" })
503
+ ]
504
+ }
505
+ ),
506
+ i && /* @__PURE__ */ A("div", { className: s.input__labelHelp, children: i })
507
+ ] }),
508
+ /* @__PURE__ */ A(
509
+ Ne,
504
510
  {
505
- id: z,
506
- disabled: V,
507
- error: typeof _ == "boolean" ? _ : !!c,
511
+ id: ee,
512
+ disabled: k,
513
+ error: typeof C == "boolean" ? C : !!u,
508
514
  "aria-label": r,
509
515
  slotProps: {
510
516
  root: (t) => ({
511
- className: B(m["input__input-el-wrapper"], {
512
- [m["input--disabled"]]: t.disabled,
513
- [m["input--focused"]]: t.focused,
514
- [m["input--error"]]: t.error
517
+ className: U(s["input__input-el-wrapper"], {
518
+ [s["input--disabled"]]: t.disabled,
519
+ [s["input--focused"]]: t.focused,
520
+ [s["input--error"]]: t.error
515
521
  })
516
522
  }),
517
523
  input: {
518
524
  ref: a,
519
- className: B(m["input__input-el"], R),
520
- maxLength: F,
521
- onChange: v ? ae : ee,
525
+ className: U(s["input__input-el"], M),
526
+ maxLength: l,
527
+ onChange: R ? re : ne,
522
528
  ...e,
523
- onKeyDown: re,
524
- onBlur: ue,
525
- defaultValue: Q,
526
- value: te
529
+ onKeyDown: ue,
530
+ onBlur: te,
531
+ defaultValue: oe,
532
+ value: ie
527
533
  }
528
534
  },
529
- startAdornment: g && /* @__PURE__ */ H("span", { className: m["input__left-icon"], children: g }),
530
- endAdornment: h && /* @__PURE__ */ H("span", { className: m["input__right-icon"], children: h }),
531
- ...ne
535
+ startAdornment: h && /* @__PURE__ */ A("span", { className: s["input__left-icon"], children: h }),
536
+ endAdornment: x && /* @__PURE__ */ A("span", { className: s["input__right-icon"], children: x }),
537
+ ...J
532
538
  }
533
539
  ),
534
- /* @__PURE__ */ M("div", { className: m["input__messages-wrapper"], children: [
535
- (c || i) && /* @__PURE__ */ M(
536
- se,
540
+ /* @__PURE__ */ j("div", { className: s["input__messages-wrapper"], children: [
541
+ (u || f) && /* @__PURE__ */ j(
542
+ de,
537
543
  {
538
- className: c ? B(m["input__error-message"], S) : B(m["input__info-message"], A),
539
- "data-testid": c ? Z : L,
544
+ className: u ? U(s["input__error-message"], T) : U(s["input__info-message"], O),
545
+ "data-testid": u ? L : X,
540
546
  children: [
541
- /* @__PURE__ */ H(Ee, { icon: c ? "circle-exclamation" : "circle-info" }),
542
- c || i
547
+ /* @__PURE__ */ A(Ve, { icon: u ? "circle-exclamation" : "circle-info" }),
548
+ u || f
543
549
  ]
544
550
  }
545
551
  ),
546
- G && /* @__PURE__ */ M(
547
- se,
552
+ z && /* @__PURE__ */ j(
553
+ de,
548
554
  {
549
- className: B(m["input__chars-counter"], O),
550
- "data-testid": W,
555
+ className: U(s["input__chars-counter"], D),
556
+ "data-testid": o,
551
557
  children: [
552
- l,
558
+ c,
553
559
  " / ",
554
- F
560
+ l
555
561
  ]
556
562
  }
557
563
  )
@@ -560,5 +566,5 @@ const Ke = "_input_1u4jg_58", qe = "_input__label_1u4jg_85", m = {
560
566
  }
561
567
  );
562
568
  export {
563
- Je as Input
569
+ Ze as Input
564
570
  };
@@ -13,6 +13,8 @@ export declare const Simple: Story;
13
13
  export declare const SimpleNumberAsText: Story;
14
14
  export declare const WithLabel: Story;
15
15
  export declare const WithRequiredLabel: Story;
16
+ export declare const WithLabelHelp: Story;
17
+ export declare const WithLabelHelpSimple: Story;
16
18
  export declare const WithPlaceholder: Story;
17
19
  export declare const Disabled: Story;
18
20
  export declare const WithMaxLength: Story;
@@ -3,6 +3,7 @@ export declare const InputSearch: import('react').ForwardRefExoticComponent<(Omi
3
3
  ref?: ForwardedRef<HTMLInputElement> | undefined;
4
4
  } & import('react').InputHTMLAttributes<HTMLInputElement> & {
5
5
  label?: string | undefined;
6
+ labelHelp?: import('react').ReactNode;
6
7
  infoMessage?: import('react').ReactNode;
7
8
  error?: boolean | undefined;
8
9
  errorMessage?: import('react').ReactNode;
@@ -5,6 +5,7 @@ declare const meta: {
5
5
  ref?: import('react').ForwardedRef<HTMLInputElement> | undefined;
6
6
  } & import('react').InputHTMLAttributes<HTMLInputElement> & {
7
7
  label?: string | undefined;
8
+ labelHelp?: import('react').ReactNode;
8
9
  infoMessage?: import('react').ReactNode;
9
10
  error?: boolean | undefined;
10
11
  errorMessage?: 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": "2.1.63",
4
+ "version": "2.1.64",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -74,7 +74,7 @@
74
74
  "eslint-plugin-react-refresh": "^0.4.6",
75
75
  "eslint-plugin-simple-import-sort": "^12.0.0",
76
76
  "eslint-plugin-storybook": "^0.9.0",
77
- "glob": "^10.3.14",
77
+ "glob": "^11.1.0",
78
78
  "husky": "^9.0.11",
79
79
  "jsdom": "^26.0.0",
80
80
  "lint-staged": "^15.2.7",
@@ -111,7 +111,7 @@
111
111
  "esbuild": "^0.25.3",
112
112
  "express": "^5.1.0",
113
113
  "form-data": "^4.0.2",
114
- "glob": "^10.2.6",
114
+ "glob": "^11.1.0",
115
115
  "micromatch": "^4.0.8",
116
116
  "nanoid": "^3.3.11",
117
117
  "path-to-regexp": "^0.1.12",
@@ -122,6 +122,7 @@
122
122
  "ws": "^8.18.1",
123
123
  "tmp": "^0.2.5",
124
124
  "brace-expansion": "^2.0.2",
125
- "debug": "^4.4.3"
125
+ "debug": "^4.4.3",
126
+ "js-yaml": "^4.1.1"
126
127
  }
127
128
  }