@bbl-digital/snorre 4.0.54 → 4.0.56
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +46 -45
- package/esm/core/Input/index.js +26 -26
- package/esm/core/Input/styles.js +20 -19
- package/lib/core/Input/index.d.ts.map +1 -1
- package/lib/core/Input/index.js +26 -26
- package/lib/core/Input/styles.d.ts +1 -0
- package/lib/core/Input/styles.d.ts.map +1 -1
- package/lib/core/Input/styles.js +20 -19
- package/package.json +1 -1
package/esm/core/Input/index.js
CHANGED
@@ -68,32 +68,32 @@ const Input = /*#__PURE__*/React.forwardRef(({
|
|
68
68
|
children: [props.label && _jsx("span", {
|
69
69
|
css: info && styles.pr4,
|
70
70
|
children: props.label
|
71
|
-
}),
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
71
|
+
}), _jsxs("div", {
|
72
|
+
css: theme => [styles.inputWrapper(theme)],
|
73
|
+
children: [_jsx("input", {
|
74
|
+
id: props.id,
|
75
|
+
type: type === 'stealth' ? 'number' : type,
|
76
|
+
...(type !== 'password' && {
|
77
|
+
value
|
78
|
+
}),
|
79
|
+
placeholder: props.placeholder,
|
80
|
+
disabled: props.disabled,
|
81
|
+
autoFocus: props.focus,
|
82
|
+
onBlur: props.onBlur,
|
83
|
+
onFocus: props.onFocus,
|
84
|
+
onChange: onInputChange,
|
85
|
+
maxLength: maxlength,
|
86
|
+
ref: ref,
|
87
|
+
name: props.name,
|
88
|
+
"aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
|
89
|
+
css: theme => [type === 'text' && styles.text(theme), type === 'search' && styles.search(theme), type === 'password' && styles.password(theme), type === 'number' && styles.number(theme), type === 'stealth' && styles.stealth(theme), props.disabled && styles.disabled(theme), cardInput && styles.cardInput(theme)],
|
90
|
+
children: React.Children.map(props.children, child => {
|
91
|
+
if (!child) {
|
92
|
+
return null;
|
93
|
+
}
|
94
|
+
return child;
|
95
|
+
})
|
96
|
+
}), type === 'search' && _jsx(IconSearch, {})]
|
97
97
|
}), props.invalidMessage && _jsx(IconErrorOutline, {
|
98
98
|
size: "16px"
|
99
99
|
}), props.invalidMessage && _jsx("span", {
|