lizaui 9.0.3 → 9.0.4

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