hplx-react-elements-dev 1.0.97 → 1.0.99
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/esm/index.js +56 -12
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -18564,27 +18564,37 @@ var CalendarView = function CalendarView(_a) {
|
|
|
18564
18564
|
|
|
18565
18565
|
var _b = useState(true),
|
|
18566
18566
|
autoFocus1 = _b[0],
|
|
18567
|
-
|
|
18567
|
+
setAutoFocus1 = _b[1];
|
|
18568
18568
|
|
|
18569
18569
|
var _c = useState(false),
|
|
18570
18570
|
autoFocus2 = _c[0],
|
|
18571
|
-
|
|
18571
|
+
setAutoFocus2 = _c[1]; // const [showCalender1, setShowCalender1] = useState(true);
|
|
18572
18572
|
// const [showCalender2, setShowCalender2] = useState(false);
|
|
18573
18573
|
// const [showCalender2, setShowCalender2] = useState(false);
|
|
18574
18574
|
|
|
18575
18575
|
|
|
18576
18576
|
var handleSelect1 = function handleSelect1(selectedValue) {
|
|
18577
|
-
|
|
18578
|
-
|
|
18577
|
+
setAutoFocus2(true);
|
|
18578
|
+
setAutoFocus1(false);
|
|
18579
18579
|
handleDate1(selectedValue);
|
|
18580
18580
|
};
|
|
18581
18581
|
|
|
18582
18582
|
var handleSelect2 = function handleSelect2(selectedValue) {
|
|
18583
|
-
|
|
18584
|
-
|
|
18583
|
+
setAutoFocus1(true);
|
|
18584
|
+
setAutoFocus2(false);
|
|
18585
18585
|
handleDate2(selectedValue);
|
|
18586
18586
|
};
|
|
18587
18587
|
|
|
18588
|
+
var handleFocus1 = function handleFocus1() {
|
|
18589
|
+
setAutoFocus2(false);
|
|
18590
|
+
setAutoFocus1(true);
|
|
18591
|
+
};
|
|
18592
|
+
|
|
18593
|
+
var handleFocus2 = function handleFocus2() {
|
|
18594
|
+
setAutoFocus2(true);
|
|
18595
|
+
setAutoFocus1(false);
|
|
18596
|
+
};
|
|
18597
|
+
|
|
18588
18598
|
return jsxRuntime.exports.jsxs("div", {
|
|
18589
18599
|
children: [jsxRuntime.exports.jsxs("div", __assign({
|
|
18590
18600
|
className: " hplxt-flex hplxt-flex-col hplxt-box-border hplxt-w-[330px] hplxt-h-[450px] hplxt-border-1 hplxt-border-Blue_gray-200 hplxt-rounded-t-md hplxt-bg-Blue_gray-25 hplxt-z-30"
|
|
@@ -18592,23 +18602,53 @@ var CalendarView = function CalendarView(_a) {
|
|
|
18592
18602
|
children: [jsxRuntime.exports.jsxs("div", __assign({
|
|
18593
18603
|
className: "hplxt-z-10 hplxt-flex hplxt-mt-1 hplxt-items-center hplxt-justify-center"
|
|
18594
18604
|
}, {
|
|
18595
|
-
children: [jsxRuntime.exports.jsx(InputField, {
|
|
18605
|
+
children: [!date1 ? jsxRuntime.exports.jsx(InputField, {
|
|
18596
18606
|
className: "hplxt-text-Gray-400 ".concat(autoFocus1 ? "hplxt-border-Primary-700" : "", " hplxt-border-1 hplxt-rounded-md"),
|
|
18597
18607
|
inputProps: {
|
|
18598
18608
|
placeholder: "Start From",
|
|
18609
|
+
autoFocus: autoFocus1,
|
|
18610
|
+
onFocus: function onFocus() {
|
|
18611
|
+
return handleFocus1();
|
|
18612
|
+
},
|
|
18613
|
+
readOnly: true
|
|
18614
|
+
},
|
|
18615
|
+
isborderRequired: false,
|
|
18616
|
+
width: "130px"
|
|
18617
|
+
}) : jsxRuntime.exports.jsx(InputField, {
|
|
18618
|
+
className: "hplxt-text-Gray-400 ".concat(autoFocus1 ? "hplxt-border-Primary-700" : "", " hplxt-border-1 hplxt-rounded-md"),
|
|
18619
|
+
inputProps: {
|
|
18599
18620
|
value: dayjs(date1).format("DD-MMM-YYYY"),
|
|
18600
|
-
autoFocus: autoFocus1
|
|
18621
|
+
autoFocus: autoFocus1,
|
|
18622
|
+
onFocus: function onFocus() {
|
|
18623
|
+
return handleFocus1();
|
|
18624
|
+
}
|
|
18601
18625
|
},
|
|
18602
18626
|
isborderRequired: false,
|
|
18603
18627
|
width: "130px"
|
|
18604
18628
|
}), jsxRuntime.exports.jsx("div", {
|
|
18605
18629
|
className: "hplxt-border hplxt-w-3 hplxt-border-Blue_gray-200"
|
|
18606
|
-
}), jsxRuntime.exports.jsx(InputField, {
|
|
18630
|
+
}), !date2 ? jsxRuntime.exports.jsx(InputField, {
|
|
18631
|
+
isborderRequired: false,
|
|
18632
|
+
className: "hplxt-text-Gray-400 ".concat(autoFocus2 ? "hplxt-border-Primary-700" : "", " hplxt-border-1 hplxt-rounded-md"),
|
|
18633
|
+
inputProps: {
|
|
18634
|
+
placeholder: "To Day",
|
|
18635
|
+
autoFocus: autoFocus2,
|
|
18636
|
+
onFocus: function onFocus() {
|
|
18637
|
+
return handleFocus2();
|
|
18638
|
+
},
|
|
18639
|
+
readOnly: true
|
|
18640
|
+
},
|
|
18641
|
+
width: "130px"
|
|
18642
|
+
}) : jsxRuntime.exports.jsx(InputField, {
|
|
18643
|
+
isborderRequired: false,
|
|
18607
18644
|
className: "hplxt-text-Gray-400 ".concat(autoFocus2 ? "hplxt-border-Primary-700" : "", " hplxt-border-1 hplxt-rounded-md"),
|
|
18608
18645
|
inputProps: {
|
|
18609
18646
|
placeholder: "To Day",
|
|
18610
18647
|
value: dayjs(date2).format("DD-MMM-YYYY"),
|
|
18611
|
-
autoFocus: autoFocus2
|
|
18648
|
+
autoFocus: autoFocus2,
|
|
18649
|
+
onFocus: function onFocus() {
|
|
18650
|
+
return handleFocus2();
|
|
18651
|
+
}
|
|
18612
18652
|
},
|
|
18613
18653
|
width: "130px"
|
|
18614
18654
|
})]
|
|
@@ -18617,14 +18657,18 @@ var CalendarView = function CalendarView(_a) {
|
|
|
18617
18657
|
}, {
|
|
18618
18658
|
children: jsxRuntime.exports.jsx(dist.Calendar, {
|
|
18619
18659
|
date: dayjs(date1).isValid() ? date1 : new Date(),
|
|
18620
|
-
onChange: handleSelect1
|
|
18660
|
+
onChange: handleSelect1,
|
|
18661
|
+
// disabledDates={disabledDates}
|
|
18662
|
+
minDate: new Date()
|
|
18621
18663
|
})
|
|
18622
18664
|
})), autoFocus2 && jsxRuntime.exports.jsx("div", __assign({
|
|
18623
18665
|
className: "hplxt-flex"
|
|
18624
18666
|
}, {
|
|
18625
18667
|
children: jsxRuntime.exports.jsx(dist.Calendar, {
|
|
18626
18668
|
date: dayjs(date2).isValid() ? date2 : new Date(),
|
|
18627
|
-
onChange: handleSelect2
|
|
18669
|
+
onChange: handleSelect2,
|
|
18670
|
+
// disabledDates={disabledDates}
|
|
18671
|
+
minDate: date1
|
|
18628
18672
|
})
|
|
18629
18673
|
}))]
|
|
18630
18674
|
})), jsxRuntime.exports.jsxs("div", __assign({
|