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