pankosmia-rcl 0.8.20 → 0.8.21

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.
@@ -11521,29 +11521,35 @@ function Ac({
11521
11521
  closeFn: r,
11522
11522
  children: n,
11523
11523
  actionsButtonArray: o,
11524
- requiredFieldsLabel: s = !1
11524
+ requiredFieldsLabel: s = !1,
11525
+ header: a = null,
11526
+ // fixed content between the title and the scrolling content
11527
+ fullHeight: c = !1
11528
+ // on desktop, always use the max height instead of fitting the content
11525
11529
  }) {
11526
- const a = Kt(), c = nr(a.breakpoints.down("sm")), { i18nRef: l } = ie(Te);
11530
+ const l = Kt(), f = nr(l.breakpoints.down("sm")), { i18nRef: d } = ie(Te);
11527
11531
  return /* @__PURE__ */ i.jsxs(
11528
11532
  Hn,
11529
11533
  {
11530
- fullScreen: c,
11534
+ fullScreen: f,
11531
11535
  open: t,
11532
11536
  sx: { overflow: "hidden" },
11533
- onKeyDown: (f) => {
11534
- var m, y;
11535
- if (f.key !== "Enter") return;
11536
- const d = o == null ? void 0 : o[1];
11537
- (m = d == null ? void 0 : d.props) != null && m.actionFn && !((y = d.props) != null && y.isDisabled) && (f.preventDefault(), d.props.actionFn());
11537
+ onKeyDown: (m) => {
11538
+ var h, b;
11539
+ if (m.key !== "Enter") return;
11540
+ const y = o == null ? void 0 : o[1];
11541
+ (h = y == null ? void 0 : y.props) != null && h.actionFn && !((b = y.props) != null && b.isDisabled) && (m.preventDefault(), y.props.actionFn());
11538
11542
  },
11539
11543
  slotProps: {
11540
- sx: {
11541
- overflow: "hidden !important",
11542
- display: "flex",
11543
- flexDirection: "column"
11544
- },
11545
11544
  paper: {
11546
- component: "form"
11545
+ component: "form",
11546
+ sx: {
11547
+ display: "flex",
11548
+ flexDirection: "column",
11549
+ overflow: "hidden",
11550
+ // MUI's own default max-height for a non-fullscreen dialog
11551
+ ...c && !f && { height: "calc(100% - 64px)" }
11552
+ }
11547
11553
  }
11548
11554
  },
11549
11555
  maxWidth: "sm",
@@ -11553,16 +11559,16 @@ function Ac({
11553
11559
  os,
11554
11560
  {
11555
11561
  sx: {
11556
- backgroundColor: a.palette.primary.main,
11562
+ backgroundColor: l.palette.primary.main,
11557
11563
  display: "flex",
11558
11564
  flexDirection: "row",
11559
11565
  alignItems: "center"
11560
11566
  },
11561
11567
  children: [
11562
- c && /* @__PURE__ */ i.jsx(
11568
+ f && /* @__PURE__ */ i.jsx(
11563
11569
  at,
11564
11570
  {
11565
- sx: { color: a.palette.primary.contrastText },
11571
+ sx: { color: l.palette.primary.contrastText },
11566
11572
  onClick: () => {
11567
11573
  r();
11568
11574
  },
@@ -11573,42 +11579,52 @@ function Ac({
11573
11579
  ue,
11574
11580
  {
11575
11581
  variant: "h6",
11576
- sx: { color: a.palette.primary.contrastText },
11582
+ sx: { color: l.palette.primary.contrastText },
11577
11583
  component: "div",
11578
11584
  children: e
11579
11585
  }
11580
11586
  ),
11581
- o && c && o[1] && Jr.cloneElement(o[1], {
11587
+ o && f && o[1] && Jr.cloneElement(o[1], {
11582
11588
  sx: {
11583
11589
  ...o[1].props.sx,
11584
11590
  marginInlineStart: "auto",
11585
- color: `${a.palette.primary.contrastText} !important`
11591
+ color: `${l.palette.primary.contrastText} !important`
11586
11592
  }
11587
11593
  })
11588
11594
  ]
11589
11595
  }
11590
11596
  ),
11591
- s && /* @__PURE__ */ i.jsx(
11597
+ (a || s) && /* @__PURE__ */ i.jsxs(
11592
11598
  ee,
11593
11599
  {
11594
11600
  sx: {
11595
- paddingTop: 2,
11596
- px: 3
11601
+ py: 2,
11602
+ px: 3,
11603
+ flexShrink: 0,
11604
+ display: "flex",
11605
+ flexDirection: "column",
11606
+ gap: 2
11597
11607
  },
11598
- children: /* @__PURE__ */ i.jsx(ue, { variant: "subtitle2", children: z("library:pankosmia-rcl:required_field", l.current) })
11608
+ children: [
11609
+ s && /* @__PURE__ */ i.jsx(ue, { variant: "subtitle2", children: z("library:pankosmia-rcl:required_field", d.current) }),
11610
+ a
11611
+ ]
11599
11612
  }
11600
11613
  ),
11601
11614
  /* @__PURE__ */ i.jsx(
11602
11615
  ss,
11603
11616
  {
11604
11617
  sx: {
11605
- py: "16px !important"
11618
+ pb: "16px !important",
11619
+ pt: a || s ? "0px" : "16px !important",
11620
+ flex: 1,
11621
+ minHeight: 0
11606
11622
  },
11607
11623
  children: n
11608
11624
  }
11609
11625
  ),
11610
- !c && /* @__PURE__ */ i.jsx(Pn, {}),
11611
- !c && /* @__PURE__ */ i.jsx(Qr, { children: o && o.map((f) => f) })
11626
+ !f && /* @__PURE__ */ i.jsx(Pn, {}),
11627
+ !f && /* @__PURE__ */ i.jsx(Qr, { children: o && o.map((m) => m) })
11612
11628
  ]
11613
11629
  }
11614
11630
  );