@trafilea/afrodita-components 5.0.0-beta.60 → 5.0.0-beta.61

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/build/index.d.ts CHANGED
@@ -1295,6 +1295,7 @@ interface BaseInputCommmonProps {
1295
1295
  inlinePlaceholder?: boolean;
1296
1296
  hasError?: boolean;
1297
1297
  inputType?: 'text' | 'email' | 'password' | 'url';
1298
+ name?: string;
1298
1299
  }
1299
1300
  interface BaseInputControlled extends BaseInputCommmonProps {
1300
1301
  value: string;
@@ -1343,7 +1344,7 @@ declare type CustomProps = BaseInputProps & {
1343
1344
  };
1344
1345
 
1345
1346
  declare const Input: {
1346
- Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType, ...rest }: BaseInputProps) => JSX.Element;
1347
+ Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType, name, ...rest }: BaseInputProps) => JSX.Element;
1347
1348
  Custom: ({ onClick, text, variant, ...rest }: CustomProps) => JSX.Element;
1348
1349
  SimplePlusButton: ({ onClick, onClickEdit, text, success, editText, successText, ...rest }: BasePlusButtonProps) => JSX.Element;
1349
1350
  SimplePlusIcon: ({ Icon, ...rest }: BasePlusIconProps) => JSX.Element;
@@ -11545,7 +11545,7 @@ var templateObject_1$K, templateObject_2$t, templateObject_3$n, templateObject_4
11545
11545
 
11546
11546
  var BaseInput = function (_a) {
11547
11547
  var _b;
11548
- var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType"]);
11548
+ var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, name = _a.name, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType", "name"]);
11549
11549
  var theme = useTheme();
11550
11550
  var _e = useState((_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : ''), internalValue = _e[0], setInternalValue = _e[1];
11551
11551
  var _f = useState(InputValidationType.Empty), status = _f[0], setStatus = _f[1];
@@ -11606,7 +11606,7 @@ var BaseInput = function (_a) {
11606
11606
  ? theme.colors.shades['700'].color
11607
11607
  : status === InputValidationType.Error
11608
11608
  ? theme.colors.semantic.urgent.color
11609
- : '', hasError: hasError }, { children: [label && (jsx$1(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxs$1(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsx$1(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder }, rest, styling), void 0), inlinePlaceholder && (jsx$1(AnimatedPlaceholder, __assign$1({ "data-testid": "input-placeholder" }, { children: placeholder }), void 0)), children] }), void 0), inlinePlaceholder && internalValue && (jsx$1(ClearInput, __assign$1({ onClick: function () {
11609
+ : '', hasError: hasError }, { children: [label && (jsx$1(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxs$1(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsx$1(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder, name: name }, rest, styling), void 0), inlinePlaceholder && (jsx$1(AnimatedPlaceholder, __assign$1({ "data-testid": "input-placeholder" }, { children: placeholder }), void 0)), children] }), void 0), inlinePlaceholder && internalValue && (jsx$1(ClearInput, __assign$1({ onClick: function () {
11610
11610
  if (onChange) {
11611
11611
  onChange('');
11612
11612
  }
package/build/index.js CHANGED
@@ -11571,7 +11571,7 @@ var templateObject_1$K, templateObject_2$t, templateObject_3$n, templateObject_4
11571
11571
 
11572
11572
  var BaseInput = function (_a) {
11573
11573
  var _b;
11574
- var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType"]);
11574
+ var value = _a.value, onChange = _a.onChange, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, size = _a.size, placeholder = _a.placeholder, inlinePlaceholder = _a.inlinePlaceholder, hasError = _a.hasError, _d = _a.inputType, inputType = _d === void 0 ? 'text' : _d, name = _a.name, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType", "name"]);
11575
11575
  var theme = useTheme();
11576
11576
  var _e = React$2.useState((_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : ''), internalValue = _e[0], setInternalValue = _e[1];
11577
11577
  var _f = React$2.useState(exports.InputValidationType.Empty), status = _f[0], setStatus = _f[1];
@@ -11632,7 +11632,7 @@ var BaseInput = function (_a) {
11632
11632
  ? theme.colors.shades['700'].color
11633
11633
  : status === exports.InputValidationType.Error
11634
11634
  ? theme.colors.semantic.urgent.color
11635
- : '', hasError: hasError }, { children: [label && (jsxRuntime.jsx(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxRuntime.jsxs(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsxRuntime.jsx(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder }, rest, styling), void 0), inlinePlaceholder && (jsxRuntime.jsx(AnimatedPlaceholder, __assign$1({ "data-testid": "input-placeholder" }, { children: placeholder }), void 0)), children] }), void 0), inlinePlaceholder && internalValue && (jsxRuntime.jsx(ClearInput, __assign$1({ onClick: function () {
11635
+ : '', hasError: hasError }, { children: [label && (jsxRuntime.jsx(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxRuntime.jsxs(InputWrapper, __assign$1({ className: "inputWrapper", size: size, inlinePlaceholder: inlinePlaceholder }, { children: [jsxRuntime.jsx(StyledInput, __assign$1({ "data-testid": "base-input", type: inputType, onChange: handleChange, onBlur: validate, required: Boolean(required), value: internalValue, placeholder: inlinePlaceholder ? '' : placeholder, name: name }, rest, styling), void 0), inlinePlaceholder && (jsxRuntime.jsx(AnimatedPlaceholder, __assign$1({ "data-testid": "input-placeholder" }, { children: placeholder }), void 0)), children] }), void 0), inlinePlaceholder && internalValue && (jsxRuntime.jsx(ClearInput, __assign$1({ onClick: function () {
11636
11636
  if (onChange) {
11637
11637
  onChange('');
11638
11638
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "5.0.0-beta.60",
6
+ "version": "5.0.0-beta.61",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",