@protonradio/proton-ui 0.7.5-beta14 → 0.7.5-beta16

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.
package/dist/index.d.ts CHANGED
@@ -374,31 +374,26 @@ declare interface IconProps {
374
374
  * ImageOverlay component for displaying an image with a blur effect.
375
375
  * @interface ImageBackdropProps
376
376
  */
377
- export declare function ImageBackdrop({ image, imageUrl, onLoad, children, }: ImageBackdropProps): JSX_2.Element;
377
+ export declare function ImageBackdrop({ image, imageUrl, onLoad }: ImageBackdropProps): JSX_2.Element;
378
378
 
379
379
  declare interface ImageBackdropProps {
380
380
  /**
381
- * The image to display in the overlay. Supports server side rendering.
381
+ * Manually display a backdrop image. Useful for server-side rendering.
382
+ * @important When using this prop, you must style your own image component appropriately.
383
+ * The component will be placed directly in the backdrop without additional styling.
382
384
  */
383
385
  image?: React.ReactNode;
384
386
  /**
385
- * The URL of the image to display in the overlay.
386
- * @important Supported in client components only.
387
+ * The URL of the image to display in the backdrop.
388
+ * @important Client-side only. Cannot be used in Server Components.
389
+ * When using this prop, the image will be automatically styled with the backdrop effect.
387
390
  */
388
391
  imageUrl?: string;
389
392
  /**
390
393
  * Callback function to handle the image load event.
391
- * @important Supported in client components only.
394
+ * @important Client-side only. Cannot be used in Server Components.
392
395
  */
393
396
  onLoad?: (image: HTMLImageElement) => void;
394
- /**
395
- * Callback function to handle the background event.
396
- */
397
- onBackgroundEvent?: () => void;
398
- /**
399
- * The children to display in the backdrop.
400
- */
401
- children?: React.ReactNode;
402
397
  }
403
398
 
404
399
  /**
package/dist/index.es.js CHANGED
@@ -8983,8 +8983,8 @@ function Ws({
8983
8983
  "proton-Backdrop__background",
8984
8984
  t ? "proton-Backdrop__fade-in" : "proton-Backdrop__overlay"
8985
8985
  ),
8986
- onClick: (l) => {
8987
- e && l.target === l.currentTarget && (l.stopPropagation(), e());
8986
+ onClick: () => {
8987
+ e && e();
8988
8988
  },
8989
8989
  children: [
8990
8990
  e && /* @__PURE__ */ b.jsx("div", { className: "proton-Backdrop__close-button", "aria-hidden": "true", children: "ESC" }),
@@ -11780,21 +11780,16 @@ const Lh = (t) => {
11780
11780
  }
11781
11781
  return "";
11782
11782
  };
11783
- function f4({
11784
- image: t,
11785
- imageUrl: e = "",
11786
- onLoad: n,
11787
- children: r
11788
- }) {
11789
- const { palette: l } = Ie(), i = Nc(l.BASE_COLOR), o = Lh(i);
11783
+ function f4({ image: t, imageUrl: e = "", onLoad: n }) {
11784
+ const { palette: r } = Ie(), l = Nc(r.BASE_COLOR), i = Lh(l);
11790
11785
  return /* @__PURE__ */ b.jsxs(Ws, { fadeIn: !1, children: [
11791
- t ? /* @__PURE__ */ b.jsx("div", { className: "proton-Backdrop__image", "aria-hidden": "true", children: t }) : /* @__PURE__ */ b.jsx(
11786
+ t ? /* @__PURE__ */ b.jsx("div", { "aria-hidden": "true", children: t }) : /* @__PURE__ */ b.jsx(
11792
11787
  "img",
11793
11788
  {
11794
11789
  alt: "",
11795
11790
  src: e,
11796
11791
  className: "proton-Backdrop__image",
11797
- onLoad: (a) => n == null ? void 0 : n(a.currentTarget),
11792
+ onLoad: (o) => n == null ? void 0 : n(o.currentTarget),
11798
11793
  "aria-hidden": "true"
11799
11794
  }
11800
11795
  ),
@@ -11808,7 +11803,7 @@ function f4({
11808
11803
  WebkitBackdropFilter: "blur(24px) brightness(75%)",
11809
11804
  backdropFilter: "blur(24px) brightness(75%)",
11810
11805
  filter: "brightness(50%)",
11811
- background: o
11806
+ background: i
11812
11807
  }
11813
11808
  }
11814
11809
  )