@bbl-digital/snorre 4.0.54 → 4.0.55

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- }), _jsx("input", {
72
- id: props.id,
73
- type: type === 'stealth' ? 'number' : type,
74
- ...(type !== 'password' && {
75
- value
76
- }),
77
- placeholder: props.placeholder,
78
- disabled: props.disabled,
79
- autoFocus: props.focus,
80
- onBlur: props.onBlur,
81
- onFocus: props.onFocus,
82
- onChange: onInputChange,
83
- maxLength: maxlength,
84
- ref: ref,
85
- name: props.name,
86
- "aria-describedby": props.invalidMessage ? 'input-error-message' : undefined,
87
- 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)],
88
- children: React.Children.map(props.children, child => {
89
- if (!child) {
90
- return null;
91
- }
92
- return child;
93
- })
94
- }), type === 'search' && _jsx("div", {
95
- className: props.label ? 'searchIconWithLabel' : 'searchIcon',
96
- children: _jsx(IconSearch, {})
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", {