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