@trafilea/afrodita-components 5.0.0-beta.90 → 5.0.0-beta.91
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 +5 -1
- package/build/index.esm.js +2 -2
- package/build/index.js +2 -2
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1337,6 +1337,10 @@ interface TimerProps extends TimeProps {
|
|
|
1337
1337
|
declare const Timer: ({ onTimeUp, displayZeroValues, ...rest }: TimerProps) => JSX.Element;
|
|
1338
1338
|
|
|
1339
1339
|
interface BaseInputCommmonProps {
|
|
1340
|
+
id?: string;
|
|
1341
|
+
innerRef?: React.Ref<HTMLInputElement>;
|
|
1342
|
+
onBlur?: () => void;
|
|
1343
|
+
hideClear?: boolean;
|
|
1340
1344
|
defaultValue?: string;
|
|
1341
1345
|
maxLength?: number;
|
|
1342
1346
|
placeholder?: string;
|
|
@@ -1399,7 +1403,7 @@ declare type CustomProps = BaseInputProps & {
|
|
|
1399
1403
|
};
|
|
1400
1404
|
|
|
1401
1405
|
declare const Input: {
|
|
1402
|
-
Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType, ...rest }: BaseInputProps) => JSX.Element;
|
|
1406
|
+
Simple: ({ value, onChange, defaultValue, label, children, required, onValidation, size, placeholder, inlinePlaceholder, hasError, inputType, hideClear, innerRef, ...rest }: BaseInputProps) => JSX.Element;
|
|
1403
1407
|
Custom: ({ onClick, text, variant, ...rest }: CustomProps) => JSX.Element;
|
|
1404
1408
|
SimplePlusButton: ({ onClick, onClickEdit, text, success, editText, successText, ...rest }: BasePlusButtonProps) => JSX.Element;
|
|
1405
1409
|
SimplePlusIcon: ({ Icon, ...rest }: BasePlusIconProps) => JSX.Element;
|
package/build/index.esm.js
CHANGED
|
@@ -11623,7 +11623,7 @@ var templateObject_1$M, templateObject_2$v, templateObject_3$p, templateObject_4
|
|
|
11623
11623
|
|
|
11624
11624
|
var BaseInput = function (_a) {
|
|
11625
11625
|
var _b;
|
|
11626
|
-
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"]);
|
|
11626
|
+
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, hideClear = _a.hideClear, innerRef = _a.innerRef, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType", "hideClear", "innerRef"]);
|
|
11627
11627
|
var theme = useTheme();
|
|
11628
11628
|
var _e = useState((_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : ''), internalValue = _e[0], setInternalValue = _e[1];
|
|
11629
11629
|
var _f = useState(InputValidationType.Empty), status = _f[0], setStatus = _f[1];
|
|
@@ -11685,7 +11685,7 @@ var BaseInput = function (_a) {
|
|
|
11685
11685
|
? theme.colors.shades['700'].color
|
|
11686
11686
|
: status === InputValidationType.Error
|
|
11687
11687
|
? theme.colors.semantic.urgent.color
|
|
11688
|
-
: '', 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 () {
|
|
11688
|
+
: '', 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({ ref: innerRef, "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), !hideClear && !rest.disabled && inlinePlaceholder && internalValue && (jsx$1(ClearInput, __assign$1({ onClick: function () {
|
|
11689
11689
|
if (onChange) {
|
|
11690
11690
|
onChange('');
|
|
11691
11691
|
}
|
package/build/index.js
CHANGED
|
@@ -11649,7 +11649,7 @@ var templateObject_1$M, templateObject_2$v, templateObject_3$p, templateObject_4
|
|
|
11649
11649
|
|
|
11650
11650
|
var BaseInput = function (_a) {
|
|
11651
11651
|
var _b;
|
|
11652
|
-
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"]);
|
|
11652
|
+
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, hideClear = _a.hideClear, innerRef = _a.innerRef, rest = __rest(_a, ["value", "onChange", "defaultValue", "label", "children", "required", "onValidation", "size", "placeholder", "inlinePlaceholder", "hasError", "inputType", "hideClear", "innerRef"]);
|
|
11653
11653
|
var theme = useTheme();
|
|
11654
11654
|
var _e = React$2.useState((_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : ''), internalValue = _e[0], setInternalValue = _e[1];
|
|
11655
11655
|
var _f = React$2.useState(exports.InputValidationType.Empty), status = _f[0], setStatus = _f[1];
|
|
@@ -11711,7 +11711,7 @@ var BaseInput = function (_a) {
|
|
|
11711
11711
|
? theme.colors.shades['700'].color
|
|
11712
11712
|
: status === exports.InputValidationType.Error
|
|
11713
11713
|
? theme.colors.semantic.urgent.color
|
|
11714
|
-
: '', 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 () {
|
|
11714
|
+
: '', 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({ ref: innerRef, "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), !hideClear && !rest.disabled && inlinePlaceholder && internalValue && (jsxRuntime.jsx(ClearInput, __assign$1({ onClick: function () {
|
|
11715
11715
|
if (onChange) {
|
|
11716
11716
|
onChange('');
|
|
11717
11717
|
}
|
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.
|
|
6
|
+
"version": "5.0.0-beta.91",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "build/index.js",
|
|
9
9
|
"style": "build/index.css",
|