@galaxy-io/dls 2.13.4 → 2.13.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.
@@ -43,6 +43,11 @@ interface ModalBaseProps extends AriaAttributes {
43
43
  * @default false
44
44
  */
45
45
  isFullscreen?: boolean;
46
+ /**
47
+ * The panel and the body stop clipping, so a popup drawn inside the body hangs past it, over the footer and outside the panel: for third-party embeds that draw their own popups (a payment or address field). The body no longer scrolls while it is on, so turn it on only while the embedded popup is open. It changes only the panel and the body: a fixed height (`X_LARGE`, a `sidebar`) and `isFullscreen` keep theirs, and the sidebar and the `aside` keep their own scrolling.
48
+ * @default false
49
+ */
50
+ isOverflowVisible?: boolean;
46
51
  /**
47
52
  * Escape, a backdrop click and the close button close the dialog. When `false` there is no close button, and only the app (usually a `footer` action) can close it.
48
53
  * @default true
@@ -49,6 +49,14 @@ import { AnimatePresence, motion } from "framer-motion";
49
49
  * Sizes are widths: 400 / 560 / 720 / 960px. `X_LARGE` also holds a fixed height (720px, less
50
50
  * when the viewport is shorter). `isFullscreen` fills the viewport less 32px on each side.
51
51
  *
52
+ * `isOverflowVisible` stops the panel and the body clipping, for a third-party embed that draws its
53
+ * own popup inside its frame (a payment or address field's suggestions), which no portal can lift
54
+ * out: the popup hangs over the footer and past the panel. The body stops scrolling while it is on,
55
+ * so the app turns it on only while that popup is open. Nothing else changes: the panel keeps its
56
+ * size (fixed height and `isFullscreen` included), the sidebar and the aside keep their own
57
+ * scrolling, and the regions that reach the panel's corners (the sidebar, a first-row banner) round
58
+ * themselves, so the panel looks the same either way.
59
+ *
52
60
  * A short yes/no question is `ConfirmDialog`; a panel beside the page is `Drawer`; an anchored
53
61
  * panel is `Popover`.
54
62
  *
@@ -123,6 +131,10 @@ var Root = /*#__PURE__*/ styled("div")({
123
131
  class: "gx-Modal-r1uq3md9",
124
132
  propsAsIs: false
125
133
  });
134
+ /**
135
+ * The panel's inner corner (its radius less the hairline). The regions that reach a corner round
136
+ * themselves to it, so they never rely on the panel's clip, which `isOverflowVisible` turns off.
137
+ */
126
138
  var Panel = /*#__PURE__*/ styled("div")({
127
139
  name: "Panel",
128
140
  class: "gx-Modal-Panel-p1ltfmcj",
@@ -146,7 +158,11 @@ var Sidebar = /*#__PURE__*/ styled("div")({
146
158
  class: "gx-Modal-Sidebar-s1kofw5u",
147
159
  propsAsIs: false
148
160
  });
149
- /** The title row, banner, body and footer, in a column. */
161
+ /**
162
+ * The title row, banner, body and footer, in a column. Its radius draws nothing (no background, no
163
+ * clip): it holds the panel's inner corners this column reaches, for a region to inherit. Beside
164
+ * the sidebar those are the end corners only (the bottom ones below 768px, where it stacks).
165
+ */
150
166
  var Content = /*#__PURE__*/ styled("div")({
151
167
  name: "Content",
152
168
  class: "gx-Modal-Content-curevkp",
@@ -159,31 +175,44 @@ var Body = /*#__PURE__*/ styled("div")({
159
175
  });
160
176
  /** `isFlush`: the body has no inset; the content pads itself. */
161
177
  var FLUSH_BODY_CSS = "gx-Modal-FLUSH_BODY_CSS-f6mxmup";
162
- /** `banner`: a strip pinned between the title row and the body; it never shrinks or scrolls. */
178
+ /**
179
+ * `isOverflowVisible`: the body stops scrolling, so what hangs past it shows, and paints above the
180
+ * footer (its buttons are positioned, and come later).
181
+ */
182
+ var OVERFLOW_VISIBLE_BODY_CSS = "gx-Modal-OVERFLOW_VISIBLE_BODY_CSS-o9gpbdm";
183
+ /**
184
+ * `banner`: a strip pinned between the title row and the body; it never shrinks or scrolls. With no
185
+ * title row it is the column's first region, so it clips its `Alert` to the corners above it.
186
+ */
163
187
  var Banner = /*#__PURE__*/ styled("div")({
164
188
  name: "Banner",
165
- class: "gx-Modal-Banner-b9gpbdm",
189
+ class: "gx-Modal-Banner-bfsn1gx",
166
190
  propsAsIs: false
167
191
  });
168
192
  var Footer = /*#__PURE__*/ styled("div")({
169
193
  name: "Footer",
170
- class: "gx-Modal-Footer-ffsn1gx",
194
+ class: "gx-Modal-Footer-f1jg9rc6",
171
195
  propsAsIs: false
172
196
  });
173
197
  /** Pinned 12px from the panel's top-end corner. */
174
198
  var CloseSlot = /*#__PURE__*/ styled("span")({
175
199
  name: "CloseSlot",
176
- class: "gx-Modal-CloseSlot-c1jg9rc6",
200
+ class: "gx-Modal-CloseSlot-c7k0w0q",
177
201
  propsAsIs: false
178
202
  });
179
203
  /**
204
+ * `isOverflowVisible`: the panel stops clipping (the regions keep its corners themselves). The close
205
+ * button stays above the raised body, which runs under it when there is no title row.
206
+ */
207
+ var OVERFLOW_VISIBLE_PANEL_CSS = "gx-Modal-OVERFLOW_VISIBLE_PANEL_CSS-oddv16";
208
+ /**
180
209
  * The aside's slot: its width runs from 0 to `auto` (the 8px gap plus the aside, measured by
181
210
  * framer), which glides the panel aside as the pair re-centers, while the slot clips the aside so
182
211
  * it slides out from behind the panel's edge. Never shrinks: the panel gives way. Below 768px it
183
212
  * stacks under the panel at full width (the `!important` beats the slide's inline width) and takes
184
213
  * at most 40% of the viewport height.
185
214
  */
186
- var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-a7k0w0q";
215
+ var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-aq20d34";
187
216
  /**
188
217
  * The aside takes its child's width (`flex: none`, so the slide clips it rather than squeezing
189
218
  * it), at most half the viewport less the positioner's 32px inset and the gap: the panel always
@@ -191,7 +220,7 @@ var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-a7k0w0q";
191
220
  */
192
221
  var Aside = /*#__PURE__*/ styled("div")({
193
222
  name: "Aside",
194
- class: "gx-Modal-Aside-addv16",
223
+ class: "gx-Modal-Aside-ausoqzp",
195
224
  propsAsIs: false
196
225
  });
197
226
  /**
@@ -222,7 +251,7 @@ var SLOT_TRANSITION = {
222
251
  };
223
252
  var REDUCED_TRANSITION = { duration: 0 };
224
253
  /** A blocking dialog over a dimmed page: title row, scrolling body, actions row. */
225
- var Modal = forwardRef(function Modal({ children, header, subheader, icon, footer, banner, sidebar, aside, hasDividers = false, isFlush = false, size = "MEDIUM", isFullscreen = false, isDismissable = true, isOpen: isOpenProp, defaultIsOpen = false, onOpenChange, ariaLabel, id, className, style, ...rest }, ref) {
254
+ var Modal = forwardRef(function Modal({ children, header, subheader, icon, footer, banner, sidebar, aside, hasDividers = false, isFlush = false, size = "MEDIUM", isFullscreen = false, isOverflowVisible = false, isDismissable = true, isOpen: isOpenProp, defaultIsOpen = false, onOpenChange, ariaLabel, id, className, style, ...rest }, ref) {
226
255
  const generatedId = useId();
227
256
  const titleId = useId();
228
257
  const subheaderId = useId();
@@ -294,7 +323,7 @@ var Modal = forwardRef(function Modal({ children, header, subheader, icon, foote
294
323
  className,
295
324
  style,
296
325
  children: [/* @__PURE__ */ jsxs(Panel, {
297
- className: isFullscreen ? FULLSCREEN_PANEL_CSS : MODAL_SIZE_TO_CSS_MAP[size],
326
+ className: cx(isFullscreen ? FULLSCREEN_PANEL_CSS : MODAL_SIZE_TO_CSS_MAP[size], isOverflowVisible && OVERFLOW_VISIBLE_PANEL_CSS),
298
327
  children: [
299
328
  /* @__PURE__ */ jsx(AnimatePresence, {
300
329
  initial: false,
@@ -320,7 +349,7 @@ var Modal = forwardRef(function Modal({ children, header, subheader, icon, foote
320
349
  hasDividers && hasHeaderRow && /* @__PURE__ */ jsx(Divider, {}),
321
350
  banner !== void 0 && /* @__PURE__ */ jsx(Banner, { children: banner }),
322
351
  /* @__PURE__ */ jsx(Body, {
323
- className: cx(isFlush && FLUSH_BODY_CSS),
352
+ className: cx(isFlush && FLUSH_BODY_CSS, isOverflowVisible && OVERFLOW_VISIBLE_BODY_CSS),
324
353
  children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx(Text, { children }) : children
325
354
  }),
326
355
  footer !== void 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [hasDividers && /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(Footer, { children: footer })] })