dhre-component-lib 0.5.0 → 0.5.2
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/index.js
CHANGED
|
@@ -183,7 +183,7 @@ const Typography = ({ variant = 'B1', weight = 'MEDIUM', children, className, ..
|
|
|
183
183
|
var css$h = ".label {\n position: absolute;\n z-index: 1;\n top: -10px;\n left: 11px;\n background: #ffffff;\n padding: 0 6px;\n transition: all 0.3s ease-out;\n}\n\n.inputContainer {\n position: relative;\n}\n\n.inputError:focus-visible {\n outline: 1px solid #eb0542 !important;\n}\n\n.inputContainer::placeholder {\n color: #686868;\n font-size: 16px;\n font-family: \"Meraas Aktiv\", sans-serif;\n font-weight: 400;\n line-height: 22.4px;\n}\n\n.astreik {\n color: #eb0542;\n}";
|
|
184
184
|
n(css$h,{});
|
|
185
185
|
|
|
186
|
-
const CustomInputField = ({ label, value = "", type = INPUT_TYPES.TEXT, placeholder = "", onChange, className = "", inputClassName = "", labelClassName = "", error, errorClassName = "", maxLength = 0, minLength = 0, checkValidation, name, min, ...rest }) => {
|
|
186
|
+
const CustomInputField = ({ label, value = "", type = INPUT_TYPES.TEXT, placeholder = "", onChange, className = "", inputClassName = "", labelClassName = "", error, errorClassName = "", maxLength = 0, minLength = 0, checkValidation, name, min, disabled = false, ...rest }) => {
|
|
187
187
|
const [showLabelOnBorder, setShowLabelOnBorder] = React.useState(false);
|
|
188
188
|
const handleInputValues = (e) => {
|
|
189
189
|
onChange?.(e);
|
|
@@ -208,7 +208,7 @@ const CustomInputField = ({ label, value = "", type = INPUT_TYPES.TEXT, placehol
|
|
|
208
208
|
placeholder.includes("*") && React__namespace.default.createElement("label", { className: 'astreik' }, "*")),
|
|
209
209
|
React__namespace.default.createElement("input", { type: type, value: value, name: name, placeholder: showLabelOnBorder ? "" : placeholder, onChange: handleInputValues, onFocus: () => setShowLabelOnBorder(true), onBlur: checkFieldValue,
|
|
210
210
|
// className={inputClassName}
|
|
211
|
-
className: `${inputClassName} ${error ? "inputError" : ''}`, maxLength: maxLength, minLength: minLength, min: min, ...rest }),
|
|
211
|
+
className: `${inputClassName} ${error ? "inputError" : ''}`, maxLength: maxLength, minLength: minLength, min: min, disabled: disabled, ...rest }),
|
|
212
212
|
error && (React__namespace.default.createElement(Typography, { variant: "L1", weight: "SEMI_BOLD", className: errorClassName }, error))));
|
|
213
213
|
};
|
|
214
214
|
|
|
@@ -9622,6 +9622,11 @@ function Dropdown(props) {
|
|
|
9622
9622
|
getSelectedValue(value);
|
|
9623
9623
|
setOpenDropdown(!openDropdown);
|
|
9624
9624
|
};
|
|
9625
|
+
React.useEffect(() => {
|
|
9626
|
+
if (!value) {
|
|
9627
|
+
setSelectedValue(undefined);
|
|
9628
|
+
}
|
|
9629
|
+
}, [value]);
|
|
9625
9630
|
return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
|
|
9626
9631
|
openDropdown && (React__namespace.default.createElement("div", { onClick: () => setOpenDropdown(!openDropdown), className: "backdropDropdown" })),
|
|
9627
9632
|
React__namespace.default.createElement("div", { className: "dropPosition" },
|