@pismo/marola 1.1.1 → 1.1.3
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.
- package/dist/Dialog.module-CE1Q-5tJ.js +29 -0
- package/dist/Group-ZXteFV4M.js +2 -1
- package/dist/Popover.module-B4boCutS.js +2 -1
- package/dist/SelectButton-DbiTJagF.js +75 -0
- package/dist/Tabs.module-BNRwj3Z0.js +2 -1
- package/dist/Toggle-BuZjueQ7.js +2 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/components/Adornment/Adornment.js +2 -1
- package/dist/components/Advice/Advice.js +2 -1
- package/dist/components/Alert/Alert.js +2 -1
- package/dist/components/Autocomplete/Autocomplete.js +2 -1
- package/dist/components/Avatar/Avatar.js +2 -1
- package/dist/components/BankCard/BankCard.js +2 -1
- package/dist/components/Button/Button.js +2 -1
- package/dist/components/Calendar/Calendar.js +2 -1
- package/dist/components/Checkbox/Checkbox.js +2 -1
- package/dist/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +1 -1
- package/dist/components/Description/Description.js +2 -1
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +2 -1
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +2 -1
- package/dist/components/Input/Input.js +266 -260
- package/dist/components/Input/Input.stories.d.ts +1 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/InputSearch/InputSearch.js +2 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +2 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +2 -1
- package/dist/components/Pagination/Pagination.js +2 -1
- package/dist/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +2 -1
- package/dist/components/ResultWithChips/ResultWithChips.js +2 -1
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/Select.js +266 -261
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -1
- package/dist/components/Snackbar/Snackbar.js +2 -1
- package/dist/components/Snackbar/Snackbar.stories.d.ts +1 -1
- package/dist/components/SortTooltip/SortTooltip.js +2 -1
- package/dist/components/Stepper/Stepper.js +2 -1
- package/dist/components/StepperNavigator/StepperNavigator.js +2 -1
- package/dist/components/Table/Table.js +2 -1
- package/dist/components/Tag/Tag.js +2 -1
- package/dist/components/TextDisplay/TextDisplay.js +2 -1
- package/dist/components/Toggle/Toggle.js +2 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/TransactionRow/TransactionRow.js +2 -1
- package/dist/components/Typography/Typography.js +2 -1
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/marola.css +1 -1
- package/package.json +1 -1
- package/dist/Dialog.module-BlXtafuW.js +0 -28
- package/dist/SelectButton-B38avP9u.js +0 -74
|
@@ -1,228 +1,229 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
1
|
+
import '../../assets/Input.css';
|
|
2
|
+
import { jsxs as U, jsx as j } from "react/jsx-runtime";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { forwardRef as de, useState as ce, useId as _e, useMemo as me } from "react";
|
|
5
|
+
import { c as T } from "../../clsx-DB4S2d7J.js";
|
|
6
|
+
import { Icon as fe } from "../Icon/Icon.js";
|
|
7
|
+
import { Typography as X } from "../Typography/Typography.js";
|
|
8
|
+
import { g as he, a as ye, u as ge, f as Z, b as y, _ as be, c as ne, 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
|
|
11
|
-
l += "&args[]=" + encodeURIComponent(arguments[
|
|
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
|
-
const
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
const re = "Input";
|
|
16
|
+
function Ne(s) {
|
|
17
|
+
return he(re, s);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
-
function
|
|
22
|
-
return
|
|
19
|
+
ye(re, ["root", "formControl", "focused", "disabled", "error", "multiline", "input", "inputMultiline", "inputTypeSearch", "adornedStart", "adornedEnd"]);
|
|
20
|
+
const ae = /* @__PURE__ */ x.createContext(void 0);
|
|
21
|
+
process.env.NODE_ENV !== "production" && (ae.displayName = "FormControlContext");
|
|
22
|
+
function ve() {
|
|
23
|
+
return x.useContext(ae);
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function Pe(s = {}) {
|
|
25
26
|
const {
|
|
26
27
|
defaultValue: l,
|
|
27
|
-
disabled:
|
|
28
|
-
error:
|
|
29
|
-
onBlur:
|
|
28
|
+
disabled: d = !1,
|
|
29
|
+
error: u = !1,
|
|
30
|
+
onBlur: c,
|
|
30
31
|
onChange: f,
|
|
31
|
-
onFocus:
|
|
32
|
-
required:
|
|
33
|
-
value:
|
|
34
|
-
inputRef:
|
|
35
|
-
} = s, o =
|
|
36
|
-
let
|
|
32
|
+
onFocus: N,
|
|
33
|
+
required: v = !1,
|
|
34
|
+
value: P,
|
|
35
|
+
inputRef: R
|
|
36
|
+
} = s, o = ve();
|
|
37
|
+
let E, h, g, C, b;
|
|
37
38
|
if (o) {
|
|
38
|
-
var
|
|
39
|
-
if (
|
|
39
|
+
var k, m, S;
|
|
40
|
+
if (E = void 0, h = (k = o.disabled) != null ? k : !1, g = (m = o.error) != null ? m : !1, C = (S = o.required) != null ? S : !1, b = o.value, process.env.NODE_ENV !== "production") {
|
|
40
41
|
const t = ["defaultValue", "disabled", "error", "required", "value"].filter((r) => s[r] !== void 0);
|
|
41
42
|
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
43
|
`));
|
|
43
44
|
}
|
|
44
45
|
} else
|
|
45
|
-
|
|
46
|
+
E = l, h = d, g = u, C = v, b = P;
|
|
46
47
|
const {
|
|
47
|
-
current:
|
|
48
|
-
} =
|
|
48
|
+
current: A
|
|
49
|
+
} = x.useRef(b != null), D = x.useCallback((t) => {
|
|
49
50
|
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
51
|
`));
|
|
51
|
-
}, []),
|
|
52
|
-
|
|
53
|
-
!o &&
|
|
54
|
-
}, [o,
|
|
55
|
-
const
|
|
52
|
+
}, []), w = x.useRef(null), V = ge(w, R, D), [F, I] = x.useState(!1);
|
|
53
|
+
x.useEffect(() => {
|
|
54
|
+
!o && h && F && (I(!1), c == null || c());
|
|
55
|
+
}, [o, h, F, c]);
|
|
56
|
+
const M = (t) => (r) => {
|
|
56
57
|
var n;
|
|
57
58
|
if (o != null && o.disabled) {
|
|
58
59
|
r.stopPropagation();
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
if ((n = t.onFocus) == null || n.call(t, r), o && o.onFocus) {
|
|
62
|
-
var
|
|
63
|
-
o == null || (
|
|
63
|
+
var i;
|
|
64
|
+
o == null || (i = o.onFocus) == null || i.call(o);
|
|
64
65
|
} else
|
|
65
|
-
|
|
66
|
-
},
|
|
66
|
+
I(!0);
|
|
67
|
+
}, a = (t) => (r) => {
|
|
67
68
|
var n;
|
|
68
|
-
(n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() :
|
|
69
|
-
},
|
|
70
|
-
var
|
|
71
|
-
if (!
|
|
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." :
|
|
73
|
-
o == null || (
|
|
69
|
+
(n = t.onBlur) == null || n.call(t, r), o && o.onBlur ? o.onBlur() : I(!1);
|
|
70
|
+
}, H = (t) => (r, ...n) => {
|
|
71
|
+
var i, q;
|
|
72
|
+
if (!A && (r.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
|
+
o == null || (i = o.onChange) == null || i.call(o, r), (q = t.onChange) == null || q.call(t, r, ...n);
|
|
74
75
|
}, $ = (t) => (r) => {
|
|
75
76
|
var n;
|
|
76
|
-
|
|
77
|
+
w.current && r.currentTarget === r.target && w.current.focus(), (n = t.onClick) == null || n.call(t, r);
|
|
77
78
|
};
|
|
78
79
|
return {
|
|
79
|
-
disabled:
|
|
80
|
-
error:
|
|
81
|
-
focused:
|
|
80
|
+
disabled: h,
|
|
81
|
+
error: g,
|
|
82
|
+
focused: F,
|
|
82
83
|
formControlContext: o,
|
|
83
84
|
getInputProps: (t = {}) => {
|
|
84
|
-
const n =
|
|
85
|
-
onBlur:
|
|
85
|
+
const n = y({}, {
|
|
86
|
+
onBlur: c,
|
|
86
87
|
onChange: f,
|
|
87
|
-
onFocus:
|
|
88
|
-
},
|
|
89
|
-
onBlur:
|
|
90
|
-
onChange:
|
|
91
|
-
onFocus:
|
|
88
|
+
onFocus: N
|
|
89
|
+
}, Z(t)), i = y({}, n, {
|
|
90
|
+
onBlur: a(n),
|
|
91
|
+
onChange: H(n),
|
|
92
|
+
onFocus: M(n)
|
|
92
93
|
});
|
|
93
|
-
return
|
|
94
|
-
"aria-invalid":
|
|
95
|
-
defaultValue:
|
|
96
|
-
value:
|
|
97
|
-
required:
|
|
98
|
-
disabled:
|
|
94
|
+
return y({}, i, {
|
|
95
|
+
"aria-invalid": g || void 0,
|
|
96
|
+
defaultValue: E,
|
|
97
|
+
value: b,
|
|
98
|
+
required: C,
|
|
99
|
+
disabled: h
|
|
99
100
|
}, t, {
|
|
100
|
-
ref:
|
|
101
|
-
},
|
|
101
|
+
ref: V
|
|
102
|
+
}, i);
|
|
102
103
|
},
|
|
103
104
|
getRootProps: (t = {}) => {
|
|
104
|
-
const r =
|
|
105
|
-
return
|
|
105
|
+
const r = Z(s, ["onBlur", "onChange", "onFocus"]), n = y({}, r, Z(t));
|
|
106
|
+
return y({}, t, n, {
|
|
106
107
|
onClick: $(n)
|
|
107
108
|
});
|
|
108
109
|
},
|
|
109
|
-
inputRef:
|
|
110
|
-
required:
|
|
111
|
-
value:
|
|
110
|
+
inputRef: V,
|
|
111
|
+
required: C,
|
|
112
|
+
value: b
|
|
112
113
|
};
|
|
113
114
|
}
|
|
114
|
-
const
|
|
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:
|
|
118
|
-
focused:
|
|
119
|
-
formControlContext:
|
|
118
|
+
error: d,
|
|
119
|
+
focused: u,
|
|
120
|
+
formControlContext: c,
|
|
120
121
|
multiline: f,
|
|
121
|
-
startAdornment:
|
|
122
|
-
endAdornment:
|
|
122
|
+
startAdornment: N,
|
|
123
|
+
endAdornment: v
|
|
123
124
|
} = s;
|
|
124
|
-
return
|
|
125
|
-
root: ["root", l && "disabled",
|
|
125
|
+
return we({
|
|
126
|
+
root: ["root", l && "disabled", d && "error", u && "focused", !!c && "formControl", f && "multiline", !!N && "adornedStart", !!v && "adornedEnd"],
|
|
126
127
|
input: ["input", l && "disabled", f && "multiline"]
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
var
|
|
128
|
+
}, qe(Ne));
|
|
129
|
+
}, se = /* @__PURE__ */ x.forwardRef(function(l, d) {
|
|
130
|
+
var u, c, f;
|
|
130
131
|
const {
|
|
131
|
-
"aria-describedby":
|
|
132
|
-
"aria-label":
|
|
133
|
-
"aria-labelledby":
|
|
134
|
-
autoComplete:
|
|
132
|
+
"aria-describedby": N,
|
|
133
|
+
"aria-label": v,
|
|
134
|
+
"aria-labelledby": P,
|
|
135
|
+
autoComplete: R,
|
|
135
136
|
autoFocus: o,
|
|
136
|
-
className:
|
|
137
|
-
defaultValue:
|
|
138
|
-
disabled:
|
|
139
|
-
endAdornment:
|
|
140
|
-
error:
|
|
141
|
-
id:
|
|
137
|
+
className: E,
|
|
138
|
+
defaultValue: h,
|
|
139
|
+
disabled: g,
|
|
140
|
+
endAdornment: C,
|
|
141
|
+
error: b,
|
|
142
|
+
id: k,
|
|
142
143
|
multiline: m = !1,
|
|
143
|
-
name:
|
|
144
|
-
onClick:
|
|
145
|
-
onChange:
|
|
146
|
-
onKeyDown:
|
|
147
|
-
onKeyUp:
|
|
148
|
-
onFocus:
|
|
149
|
-
onBlur:
|
|
150
|
-
placeholder:
|
|
151
|
-
readOnly:
|
|
152
|
-
required:
|
|
144
|
+
name: S,
|
|
145
|
+
onClick: A,
|
|
146
|
+
onChange: D,
|
|
147
|
+
onKeyDown: w,
|
|
148
|
+
onKeyUp: V,
|
|
149
|
+
onFocus: F,
|
|
150
|
+
onBlur: I,
|
|
151
|
+
placeholder: M,
|
|
152
|
+
readOnly: a,
|
|
153
|
+
required: H,
|
|
153
154
|
startAdornment: $,
|
|
154
|
-
value:
|
|
155
|
-
type:
|
|
155
|
+
value: Y,
|
|
156
|
+
type: K,
|
|
156
157
|
rows: t,
|
|
157
158
|
slotProps: r = {},
|
|
158
159
|
slots: n = {},
|
|
159
|
-
minRows:
|
|
160
|
-
maxRows:
|
|
161
|
-
} = l,
|
|
162
|
-
getRootProps:
|
|
160
|
+
minRows: i,
|
|
161
|
+
maxRows: q
|
|
162
|
+
} = l, L = be(l, Re), {
|
|
163
|
+
getRootProps: _,
|
|
163
164
|
getInputProps: W,
|
|
164
|
-
focused:
|
|
165
|
-
formControlContext:
|
|
166
|
-
error:
|
|
167
|
-
disabled:
|
|
168
|
-
} =
|
|
169
|
-
disabled:
|
|
170
|
-
defaultValue:
|
|
171
|
-
error:
|
|
172
|
-
onBlur:
|
|
173
|
-
onClick:
|
|
174
|
-
onChange:
|
|
175
|
-
onFocus:
|
|
176
|
-
required:
|
|
177
|
-
value:
|
|
178
|
-
}),
|
|
179
|
-
disabled:
|
|
180
|
-
error:
|
|
181
|
-
focused:
|
|
182
|
-
formControlContext:
|
|
165
|
+
focused: z,
|
|
166
|
+
formControlContext: O,
|
|
167
|
+
error: G,
|
|
168
|
+
disabled: B
|
|
169
|
+
} = Pe({
|
|
170
|
+
disabled: g,
|
|
171
|
+
defaultValue: h,
|
|
172
|
+
error: b,
|
|
173
|
+
onBlur: I,
|
|
174
|
+
onClick: A,
|
|
175
|
+
onChange: D,
|
|
176
|
+
onFocus: F,
|
|
177
|
+
required: H,
|
|
178
|
+
value: Y
|
|
179
|
+
}), ee = m ? void 0 : K ?? "text", J = y({}, l, {
|
|
180
|
+
disabled: B,
|
|
181
|
+
error: G,
|
|
182
|
+
focused: z,
|
|
183
|
+
formControlContext: O,
|
|
183
184
|
multiline: m,
|
|
184
|
-
type:
|
|
185
|
-
}),
|
|
186
|
-
"aria-describedby":
|
|
187
|
-
"aria-label":
|
|
188
|
-
"aria-labelledby":
|
|
189
|
-
autoComplete:
|
|
185
|
+
type: ee
|
|
186
|
+
}), te = Ee(J), le = {
|
|
187
|
+
"aria-describedby": N,
|
|
188
|
+
"aria-label": v,
|
|
189
|
+
"aria-labelledby": P,
|
|
190
|
+
autoComplete: R,
|
|
190
191
|
autoFocus: o,
|
|
191
|
-
id:
|
|
192
|
-
onKeyDown:
|
|
193
|
-
onKeyUp:
|
|
194
|
-
name:
|
|
195
|
-
placeholder:
|
|
196
|
-
readOnly:
|
|
197
|
-
type:
|
|
198
|
-
},
|
|
199
|
-
elementType:
|
|
200
|
-
getSlotProps:
|
|
192
|
+
id: k,
|
|
193
|
+
onKeyDown: w,
|
|
194
|
+
onKeyUp: V,
|
|
195
|
+
name: S,
|
|
196
|
+
placeholder: M,
|
|
197
|
+
readOnly: a,
|
|
198
|
+
type: ee
|
|
199
|
+
}, oe = (u = n.root) != null ? u : "div", ue = ne({
|
|
200
|
+
elementType: oe,
|
|
201
|
+
getSlotProps: _,
|
|
201
202
|
externalSlotProps: r.root,
|
|
202
|
-
externalForwardedProps:
|
|
203
|
+
externalForwardedProps: L,
|
|
203
204
|
additionalProps: {
|
|
204
|
-
ref:
|
|
205
|
+
ref: d
|
|
205
206
|
},
|
|
206
|
-
ownerState:
|
|
207
|
-
className: [
|
|
208
|
-
}),
|
|
209
|
-
elementType:
|
|
210
|
-
getSlotProps: (pe) => W(
|
|
207
|
+
ownerState: J,
|
|
208
|
+
className: [te.root, E]
|
|
209
|
+
}), Q = m ? (c = n.textarea) != null ? c : "textarea" : (f = n.input) != null ? f : "input", ie = ne({
|
|
210
|
+
elementType: Q,
|
|
211
|
+
getSlotProps: (pe) => W(y({}, le, pe)),
|
|
211
212
|
externalSlotProps: r.input,
|
|
212
|
-
additionalProps:
|
|
213
|
+
additionalProps: y({
|
|
213
214
|
rows: m ? t : void 0
|
|
214
|
-
}, m && !
|
|
215
|
-
minRows: t ||
|
|
216
|
-
maxRows: t ||
|
|
215
|
+
}, m && !Ce(Q) && {
|
|
216
|
+
minRows: t || i,
|
|
217
|
+
maxRows: t || q
|
|
217
218
|
}),
|
|
218
|
-
ownerState:
|
|
219
|
-
className:
|
|
219
|
+
ownerState: J,
|
|
220
|
+
className: te.input
|
|
220
221
|
});
|
|
221
|
-
return process.env.NODE_ENV !== "production" && m && t && (
|
|
222
|
-
children: [$, /* @__PURE__ */
|
|
222
|
+
return process.env.NODE_ENV !== "production" && m && t && (i || q) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), /* @__PURE__ */ U(oe, y({}, ue, {
|
|
223
|
+
children: [$, /* @__PURE__ */ j(Q, y({}, ie)), C]
|
|
223
224
|
}));
|
|
224
225
|
});
|
|
225
|
-
process.env.NODE_ENV !== "production" && (
|
|
226
|
+
process.env.NODE_ENV !== "production" && (se.propTypes = {
|
|
226
227
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
227
228
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
228
229
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -372,79 +373,80 @@ process.env.NODE_ENV !== "production" && (ae.propTypes = {
|
|
|
372
373
|
*/
|
|
373
374
|
value: e.any
|
|
374
375
|
});
|
|
375
|
-
const
|
|
376
|
-
"u-typography-h1": "_u-typography-
|
|
377
|
-
"u-typography-h2": "_u-typography-
|
|
378
|
-
"u-typography-h3": "_u-typography-
|
|
379
|
-
"u-typography-h4": "_u-typography-
|
|
380
|
-
"u-typography-h5": "_u-typography-
|
|
381
|
-
"u-typography-h6": "_u-typography-
|
|
382
|
-
"u-typography-base": "_u-typography-
|
|
383
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
384
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
385
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
386
|
-
"input__input-el": "_input__input-
|
|
387
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
388
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
389
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
390
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
391
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
392
|
-
input:
|
|
393
|
-
"input__messages-wrapper": "_input__messages-
|
|
394
|
-
input__label:
|
|
395
|
-
"input__input-el-wrapper": "_input__input-el-
|
|
396
|
-
"input__left-icon": "_input__left-
|
|
397
|
-
"input__right-icon": "_input__right-
|
|
398
|
-
"input__info-message": "_input__info-
|
|
399
|
-
"input__error-message": "_input__error-
|
|
400
|
-
"input__chars-counter": "_input__chars-
|
|
401
|
-
"input--disabled": "_input--
|
|
402
|
-
"input--focused": "_input--
|
|
403
|
-
"input--error": "_input--
|
|
404
|
-
},
|
|
376
|
+
const Fe = "_input_101pq_57", Ie = "_input__label_101pq_84", p = {
|
|
377
|
+
"u-typography-h1": "_u-typography-h1_101pq_1",
|
|
378
|
+
"u-typography-h2": "_u-typography-h2_101pq_8",
|
|
379
|
+
"u-typography-h3": "_u-typography-h3_101pq_15",
|
|
380
|
+
"u-typography-h4": "_u-typography-h4_101pq_22",
|
|
381
|
+
"u-typography-h5": "_u-typography-h5_101pq_29",
|
|
382
|
+
"u-typography-h6": "_u-typography-h6_101pq_36",
|
|
383
|
+
"u-typography-base": "_u-typography-base_101pq_43",
|
|
384
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_101pq_49",
|
|
385
|
+
"u-typography-base--xl": "_u-typography-base--xl_101pq_53",
|
|
386
|
+
"u-typography-base--lg": "_u-typography-base--lg_101pq_57",
|
|
387
|
+
"input__input-el": "_input__input-el_101pq_57",
|
|
388
|
+
"u-typography-base--sm": "_u-typography-base--sm_101pq_61",
|
|
389
|
+
"u-typography-base--bold": "_u-typography-base--bold_101pq_65",
|
|
390
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_101pq_68",
|
|
391
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_101pq_71",
|
|
392
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_101pq_74",
|
|
393
|
+
input: Fe,
|
|
394
|
+
"input__messages-wrapper": "_input__messages-wrapper_101pq_81",
|
|
395
|
+
input__label: Ie,
|
|
396
|
+
"input__input-el-wrapper": "_input__input-el-wrapper_101pq_89",
|
|
397
|
+
"input__left-icon": "_input__left-icon_101pq_111",
|
|
398
|
+
"input__right-icon": "_input__right-icon_101pq_111",
|
|
399
|
+
"input__info-message": "_input__info-message_101pq_137",
|
|
400
|
+
"input__error-message": "_input__error-message_101pq_137",
|
|
401
|
+
"input__chars-counter": "_input__chars-counter_101pq_148",
|
|
402
|
+
"input--disabled": "_input--disabled_101pq_153",
|
|
403
|
+
"input--focused": "_input--focused_101pq_159",
|
|
404
|
+
"input--error": "_input--error_101pq_162"
|
|
405
|
+
}, Ue = de(
|
|
405
406
|
({
|
|
406
407
|
label: s,
|
|
407
408
|
infoMessage: l,
|
|
408
|
-
error:
|
|
409
|
-
errorMessage:
|
|
410
|
-
leftIcon:
|
|
409
|
+
error: d,
|
|
410
|
+
errorMessage: u,
|
|
411
|
+
leftIcon: c,
|
|
411
412
|
rightIcon: f,
|
|
412
|
-
id:
|
|
413
|
-
disabled:
|
|
414
|
-
type:
|
|
415
|
-
maxLength:
|
|
413
|
+
id: N,
|
|
414
|
+
disabled: v,
|
|
415
|
+
type: P = "text",
|
|
416
|
+
maxLength: R,
|
|
416
417
|
decimalLength: o = 10,
|
|
417
|
-
hideCharsCounter:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
418
|
+
hideCharsCounter: E = !1,
|
|
419
|
+
required: h,
|
|
420
|
+
onChange: g,
|
|
421
|
+
classNameWrapper: C,
|
|
422
|
+
classNameLabel: b,
|
|
423
|
+
classNameInput: k,
|
|
424
|
+
classNameInfoMessage: m,
|
|
425
|
+
classNameErrorMessage: S,
|
|
426
|
+
classNameCharsCounter: A,
|
|
425
427
|
"data-testid-wrapper": D,
|
|
426
|
-
"data-testid-label":
|
|
427
|
-
"data-testid-input":
|
|
428
|
-
"data-testid-infoMessage":
|
|
428
|
+
"data-testid-label": w,
|
|
429
|
+
"data-testid-input": V,
|
|
430
|
+
"data-testid-infoMessage": F,
|
|
429
431
|
"data-testid-errorMessage": I,
|
|
430
|
-
"data-testid-charsCounter":
|
|
432
|
+
"data-testid-charsCounter": M,
|
|
431
433
|
...a
|
|
432
434
|
}, H) => {
|
|
433
|
-
var
|
|
434
|
-
const [
|
|
435
|
-
((
|
|
436
|
-
),
|
|
437
|
-
Object.assign(a, { "data-testid":
|
|
438
|
-
const
|
|
439
|
-
var
|
|
440
|
-
if (
|
|
441
|
-
let
|
|
442
|
-
const [
|
|
443
|
-
|
|
435
|
+
var q, L;
|
|
436
|
+
const [$, Y] = ce(
|
|
437
|
+
((q = a.value) == null ? void 0 : q.length) || ((L = a.defaultValue) == null ? void 0 : L.length) || 0
|
|
438
|
+
), K = _e(), t = N || `input_${K}`;
|
|
439
|
+
Object.assign(a, { "data-testid": V });
|
|
440
|
+
const r = R && !E, n = (_) => {
|
|
441
|
+
var W, z;
|
|
442
|
+
if (P === "number") {
|
|
443
|
+
let O = String(_.target.value);
|
|
444
|
+
const [G, B] = O.split(".");
|
|
445
|
+
O !== "" && (B != null && B.length ? O = [Number(G), B.slice(0, o)].join(".") : O = String(Number(G))), _.target.value = O;
|
|
444
446
|
}
|
|
445
|
-
|
|
446
|
-
},
|
|
447
|
-
type:
|
|
447
|
+
r && Y((z = (W = _ == null ? void 0 : _.target) == null ? void 0 : W.value) == null ? void 0 : z.length), g && g(_);
|
|
448
|
+
}, i = me(() => a.multiline !== !0 ? {
|
|
449
|
+
type: P,
|
|
448
450
|
multiline: a.multiline
|
|
449
451
|
} : {
|
|
450
452
|
type: void 0,
|
|
@@ -453,66 +455,70 @@ const Ie = "_input_y5x3p_57", Oe = "_input__label_y5x3p_84", d = {
|
|
|
453
455
|
minRows: a == null ? void 0 : a.minRows,
|
|
454
456
|
maxRows: a == null ? void 0 : a.maxRows
|
|
455
457
|
}, [a]);
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
-
s && /* @__PURE__ */
|
|
458
|
-
|
|
458
|
+
return /* @__PURE__ */ U("div", { className: T(p.input, C), "data-testid": D, children: [
|
|
459
|
+
s && /* @__PURE__ */ U(
|
|
460
|
+
X,
|
|
459
461
|
{
|
|
462
|
+
bold: !0,
|
|
460
463
|
element: "label",
|
|
461
|
-
elementProps: { htmlFor:
|
|
462
|
-
className:
|
|
463
|
-
"data-testid":
|
|
464
|
-
children:
|
|
464
|
+
elementProps: { htmlFor: t },
|
|
465
|
+
className: T(p.input__label, b),
|
|
466
|
+
"data-testid": w,
|
|
467
|
+
children: [
|
|
468
|
+
s,
|
|
469
|
+
h && /* @__PURE__ */ j("span", { children: "*" })
|
|
470
|
+
]
|
|
465
471
|
}
|
|
466
472
|
),
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
|
|
473
|
+
/* @__PURE__ */ j(
|
|
474
|
+
se,
|
|
469
475
|
{
|
|
470
|
-
id:
|
|
471
|
-
disabled:
|
|
472
|
-
error: typeof
|
|
476
|
+
id: t,
|
|
477
|
+
disabled: v,
|
|
478
|
+
error: typeof d == "boolean" ? d : !!u,
|
|
473
479
|
"aria-label": s,
|
|
474
480
|
slotProps: {
|
|
475
|
-
root: (
|
|
476
|
-
className:
|
|
477
|
-
[
|
|
478
|
-
[
|
|
479
|
-
[
|
|
481
|
+
root: (_) => ({
|
|
482
|
+
className: T(p["input__input-el-wrapper"], {
|
|
483
|
+
[p["input--disabled"]]: _.disabled,
|
|
484
|
+
[p["input--focused"]]: _.focused,
|
|
485
|
+
[p["input--error"]]: _.error
|
|
480
486
|
})
|
|
481
487
|
}),
|
|
482
488
|
input: {
|
|
483
489
|
ref: H,
|
|
484
|
-
className:
|
|
485
|
-
maxLength:
|
|
486
|
-
onChange:
|
|
490
|
+
className: T(p["input__input-el"], k),
|
|
491
|
+
maxLength: R,
|
|
492
|
+
onChange: n,
|
|
487
493
|
...a
|
|
488
494
|
}
|
|
489
495
|
},
|
|
490
|
-
startAdornment:
|
|
491
|
-
endAdornment: f && /* @__PURE__ */
|
|
492
|
-
...
|
|
496
|
+
startAdornment: c && /* @__PURE__ */ j("span", { className: p["input__left-icon"], children: c }),
|
|
497
|
+
endAdornment: f && /* @__PURE__ */ j("span", { className: p["input__right-icon"], children: f }),
|
|
498
|
+
...i
|
|
493
499
|
}
|
|
494
500
|
),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
(
|
|
497
|
-
|
|
501
|
+
/* @__PURE__ */ U("div", { className: p["input__messages-wrapper"], children: [
|
|
502
|
+
(u || l) && /* @__PURE__ */ U(
|
|
503
|
+
X,
|
|
498
504
|
{
|
|
499
|
-
className:
|
|
500
|
-
"data-testid":
|
|
505
|
+
className: u ? T(p["input__error-message"], S) : T(p["input__info-message"], m),
|
|
506
|
+
"data-testid": u ? I : F,
|
|
501
507
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
508
|
+
/* @__PURE__ */ j(fe, { icon: u ? "circle-exclamation" : "circle-info" }),
|
|
509
|
+
u || l
|
|
504
510
|
]
|
|
505
511
|
}
|
|
506
512
|
),
|
|
507
|
-
|
|
508
|
-
|
|
513
|
+
r && /* @__PURE__ */ U(
|
|
514
|
+
X,
|
|
509
515
|
{
|
|
510
|
-
className:
|
|
511
|
-
"data-testid":
|
|
516
|
+
className: T(p["input__chars-counter"], A),
|
|
517
|
+
"data-testid": M,
|
|
512
518
|
children: [
|
|
513
|
-
|
|
519
|
+
$,
|
|
514
520
|
" / ",
|
|
515
|
-
|
|
521
|
+
R
|
|
516
522
|
]
|
|
517
523
|
}
|
|
518
524
|
)
|
|
@@ -521,5 +527,5 @@ const Ie = "_input_y5x3p_57", Oe = "_input__label_y5x3p_84", d = {
|
|
|
521
527
|
}
|
|
522
528
|
);
|
|
523
529
|
export {
|
|
524
|
-
|
|
530
|
+
Ue as Input
|
|
525
531
|
};
|