@megha-ui/react 1.3.99 → 1.3.101

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.
@@ -1,6 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- const DateInput = ({ value = "", 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)", }) => {
3
+ const getCurrentDate = () => {
4
+ const today = new Date();
5
+ const year = today.getFullYear();
6
+ const month = String(today.getMonth() + 1).padStart(2, "0");
7
+ const day = String(today.getDate()).padStart(2, "0");
8
+ return `${year}-${month}-${day}`;
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)", }) => {
4
11
  const dateInputStyle = {
5
12
  width,
6
13
  height: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.99",
3
+ "version": "1.3.101",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",