@megha-ui/react 1.3.101 → 1.3.102
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.
|
@@ -7,7 +7,7 @@ const getCurrentDate = () => {
|
|
|
7
7
|
const day = String(today.getDate()).padStart(2, "0");
|
|
8
8
|
return `${year}-${month}-${day}`;
|
|
9
9
|
};
|
|
10
|
-
const DateInput = ({ value = getCurrentDate(), onChange, placeholder, min, max, className, width = "100%", disabled = false, padding = "0.5rem", borderRadius = "0.25rem", fontSize = "1rem", height = "2.5rem", labelFontSize, labelFontWeight, labelMarginBottom, asteriskColor, label, required, isValid, validationErrorColor = "red", validationSuccessColor = "green", border = "1px solid var(--form-border-color, #dbdfe9)", }) => {
|
|
10
|
+
const DateInput = ({ value = "", defaultValue = getCurrentDate(), onChange, placeholder, min, max, className, width = "100%", disabled = false, padding = "0.5rem", borderRadius = "0.25rem", fontSize = "1rem", height = "2.5rem", labelFontSize, labelFontWeight, labelMarginBottom, asteriskColor, label, required, isValid, validationErrorColor = "red", validationSuccessColor = "green", border = "1px solid var(--form-border-color, #dbdfe9)", }) => {
|
|
11
11
|
const dateInputStyle = {
|
|
12
12
|
width,
|
|
13
13
|
height: "100%",
|
|
@@ -55,6 +55,6 @@ const DateInput = ({ value = getCurrentDate(), onChange, placeholder, min, max,
|
|
|
55
55
|
setError(null);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
return (_jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [label && (_jsxs("p", { style: labelStyle, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsx("div", { style: inputWrapperStyle, className: `${className} custom-border`, children: _jsx("input", { type: "date", value: value, onChange: handleDateChange, onBlur: handleBlur, placeholder: placeholder, min: min, max: max, style: dateInputStyle, className: className, disabled: disabled }) })] }));
|
|
58
|
+
return (_jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [label && (_jsxs("p", { style: labelStyle, children: [label, required && _jsx("span", { style: asteriskStyle, children: " *" })] })), _jsx("div", { style: inputWrapperStyle, className: `${className} custom-border`, children: _jsx("input", { type: "date", value: typeof value === "string" && value !== "" ? value : defaultValue, onChange: handleDateChange, onBlur: handleBlur, placeholder: placeholder, min: min, max: max, style: dateInputStyle, className: className, disabled: disabled }) })] }));
|
|
59
59
|
};
|
|
60
60
|
export default DateInput;
|
|
@@ -813,7 +813,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
813
813
|
} }), dropdownVisible === column.key &&
|
|
814
814
|
(column.uniqueDrop ? (_jsx(GridFilterDropdown, { portalTarget: portalTarget, headerDropdownIndex: headerDropdownIndex, position: searchOpsPosition || { top: 0, left: 0 }, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions.filter((item) => item.label === "Group by"
|
|
815
815
|
? !column.isArrayString
|
|
816
|
-
: true), onClose: () => setDropdownVisible(null), column: column }), searchOps: search ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
|
|
816
|
+
: true), onClose: () => setDropdownVisible(null), column: column }), searchOps: search && !columnSearchOutside ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
|
|
817
817
|
marginTop: "0.5rem",
|
|
818
818
|
pointerEvents: search && column.search
|
|
819
819
|
? "auto"
|
|
@@ -901,7 +901,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
901
901
|
}, noLabel: true, wrapperClass: checkboxWrapper }), _jsx("span", { style: {
|
|
902
902
|
marginLeft: "0.5rem",
|
|
903
903
|
}, children: formatValue(item, (_b = column === null || column === void 0 ? void 0 : column.dataType) !== null && _b !== void 0 ? _b : "", locale, formatOptions) })] }, item));
|
|
904
|
-
})] }))] })) : null, columnIndex: colIndex })) : (_jsx(TextFilterDropdown, { columnIndex: colIndex, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions, onClose: () => setDropdownVisible(null), column: column }), searchOps: search ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
|
|
904
|
+
})] }))] })) : null, columnIndex: colIndex })) : (_jsx(TextFilterDropdown, { columnIndex: colIndex, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions, onClose: () => setDropdownVisible(null), column: column }), searchOps: search && !columnSearchOutside ? (_jsxs("div", { style: { position: "relative" }, className: "column-search-outside-wrapper", children: [_jsx("div", { style: {
|
|
905
905
|
marginTop: "0.5rem",
|
|
906
906
|
pointerEvents: search && column.search
|
|
907
907
|
? "auto"
|
package/package.json
CHANGED