lizaui 9.0.3 → 9.0.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.
- package/dist/calendar/index.cjs.js +16 -5
- package/dist/calendar/index.cjs.js.map +1 -1
- package/dist/calendar/index.es.js +16 -5
- package/dist/calendar/index.es.js.map +1 -1
- package/dist/components/calendar/date-picker/date-picker.d.ts +1 -1
- package/dist/components/calendar/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/calendar/date-picker/date-picker.style.d.ts +1 -0
- package/dist/components/calendar/date-picker/date-picker.style.d.ts.map +1 -1
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts +1 -0
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -390,7 +390,15 @@ const CalendarStyle = dt.div`
|
|
|
390
390
|
|
|
391
391
|
/* =========================== estilos para react-calendar ================== */
|
|
392
392
|
.react-calendar {
|
|
393
|
-
|
|
393
|
+
${({ showdoubleview, widthcalendar }) => {
|
|
394
|
+
if (showdoubleview === "true") {
|
|
395
|
+
return lt``;
|
|
396
|
+
} else {
|
|
397
|
+
return lt`
|
|
398
|
+
width: ${`${widthcalendar}px`};
|
|
399
|
+
`;
|
|
400
|
+
}
|
|
401
|
+
}}
|
|
394
402
|
border: none;
|
|
395
403
|
padding: 12px;
|
|
396
404
|
font-family: var(--font-family-base);
|
|
@@ -633,7 +641,7 @@ const CalendarStyle = dt.div`
|
|
|
633
641
|
const CalendarPicker = ({
|
|
634
642
|
id,
|
|
635
643
|
value,
|
|
636
|
-
showDoubleView,
|
|
644
|
+
showDoubleView = false,
|
|
637
645
|
classNameContainer,
|
|
638
646
|
className,
|
|
639
647
|
color = "primary",
|
|
@@ -660,7 +668,8 @@ const CalendarPicker = ({
|
|
|
660
668
|
onBlur,
|
|
661
669
|
type = "date-picker",
|
|
662
670
|
size = "md",
|
|
663
|
-
tileContent = null
|
|
671
|
+
tileContent = null,
|
|
672
|
+
showActionButtons = true
|
|
664
673
|
}) => {
|
|
665
674
|
const [show, setShow] = useState(showCalendar);
|
|
666
675
|
const inputRef = useRef(0);
|
|
@@ -670,7 +679,7 @@ const CalendarPicker = ({
|
|
|
670
679
|
const isInvalid = !disabled && !!error && touched;
|
|
671
680
|
useEffect(() => {
|
|
672
681
|
const element = document.getElementById(uui);
|
|
673
|
-
if (element) {
|
|
682
|
+
if (element && !showDoubleView) {
|
|
674
683
|
if (widthCalendar) inputRef.current = widthCalendar;
|
|
675
684
|
else inputRef.current = element.clientWidth;
|
|
676
685
|
}
|
|
@@ -717,6 +726,7 @@ const CalendarPicker = ({
|
|
|
717
726
|
color,
|
|
718
727
|
showcalendar: show.toString(),
|
|
719
728
|
widthcalendar: inputRef.current,
|
|
729
|
+
showdoubleview: showDoubleView.toString(),
|
|
720
730
|
className: "shadow-medium bg-content1 rounded-md",
|
|
721
731
|
children: [
|
|
722
732
|
loading ? (
|
|
@@ -742,7 +752,7 @@ const CalendarPicker = ({
|
|
|
742
752
|
tileContent
|
|
743
753
|
}
|
|
744
754
|
),
|
|
745
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
|
|
755
|
+
showActionButtons && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
|
|
746
756
|
/* @__PURE__ */ jsx(Button, { onClick: handleChangeToDay, color, className: "flex-1", children: "Hoy" }),
|
|
747
757
|
/* @__PURE__ */ jsx(Button, { color: "default", variant: "bordered", className: "flex-1", onClick: () => setShow(false), children: "Cerrar" })
|
|
748
758
|
] })
|
|
@@ -763,6 +773,7 @@ const CalendarPicker = ({
|
|
|
763
773
|
showcalendar: show.toString(),
|
|
764
774
|
id: uui,
|
|
765
775
|
widthcalendar: inputRef.current,
|
|
776
|
+
showdoubleview: showDoubleView.toString(),
|
|
766
777
|
error,
|
|
767
778
|
size,
|
|
768
779
|
children: [
|