opus-toolkit-components 0.4.4 → 0.4.5
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.
|
@@ -808,7 +808,13 @@ const Input = /*#__PURE__*/(0,external_react_.forwardRef)((_ref, ref) => {
|
|
|
808
808
|
// Icon position: left or right
|
|
809
809
|
isAnimated = false,
|
|
810
810
|
// Add animation class when focused
|
|
811
|
-
required = false
|
|
811
|
+
required = false,
|
|
812
|
+
// Required field indicator
|
|
813
|
+
shouldRenderCustomComponent,
|
|
814
|
+
// Condition to render custom component
|
|
815
|
+
CustomComponent,
|
|
816
|
+
// Custom component to render
|
|
817
|
+
customComponentProps = {} // Props for the custom component
|
|
812
818
|
} = _ref;
|
|
813
819
|
const inputClasses = `${className} flex items-center rounded-md bg-white border ${isValid ? 'border-greyLight500' : 'border-utilRed1000'} p-2 text-md font-normal text-gray-900`;
|
|
814
820
|
const iconClasses = `h-5 w-5 ${isAnimated ? 'transition-transform duration-200 group-focus-within:scale-125' : ''} text-gray-400`;
|
|
@@ -839,7 +845,9 @@ const Input = /*#__PURE__*/(0,external_react_.forwardRef)((_ref, ref) => {
|
|
|
839
845
|
className: iconClasses
|
|
840
846
|
}))), !isValid && /*#__PURE__*/external_react_default().createElement("span", {
|
|
841
847
|
className: "text-utilRed1000 text-sm"
|
|
842
|
-
}, errorMessage))
|
|
848
|
+
}, errorMessage), shouldRenderCustomComponent && CustomComponent && /*#__PURE__*/external_react_default().createElement(CustomComponent, {
|
|
849
|
+
...customComponentProps
|
|
850
|
+
}));
|
|
843
851
|
});
|
|
844
852
|
/* harmony default export */ const Inputs_Input = (Input);
|
|
845
853
|
;// ./src/components/Forms/Datepickers/DatePicker.js
|
|
@@ -9282,4 +9290,4 @@ function Dropdown(_ref) {
|
|
|
9282
9290
|
/******/ })()
|
|
9283
9291
|
;
|
|
9284
9292
|
});
|
|
9285
|
-
//# sourceMappingURL=main.
|
|
9293
|
+
//# sourceMappingURL=main.f37ded9b2c54e0b6cb90.js.map
|