@elementor/editor-ui 3.35.0-377 → 3.35.0-378

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.mts CHANGED
@@ -96,15 +96,17 @@ type CtaButtonProps = {
96
96
  } & Omit<ButtonProps, 'href' | 'target' | 'startIcon' | 'color' | 'variant'>;
97
97
  declare const CtaButton: ({ href, children, ...props }: CtaButtonProps) => React$1.JSX.Element;
98
98
 
99
- type PromotionInfotipProps = React$1.PropsWithChildren<{
99
+ type InfotipCardProps = {
100
100
  title: string;
101
101
  content: string;
102
102
  assetUrl: string;
103
103
  ctaUrl: string;
104
- open?: boolean;
105
104
  setOpen: (open: boolean) => void;
105
+ };
106
+ type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
107
+ open?: boolean;
106
108
  }>;
107
- declare const PromotionInfotip: ({ children, ...props }: PromotionInfotipProps) => React$1.JSX.Element;
109
+ declare const PromotionInfotip: ({ children, open, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
108
110
 
109
111
  type PopoverBodyProps = PropsWithChildren<{
110
112
  height?: number | 'auto';
package/dist/index.d.ts CHANGED
@@ -96,15 +96,17 @@ type CtaButtonProps = {
96
96
  } & Omit<ButtonProps, 'href' | 'target' | 'startIcon' | 'color' | 'variant'>;
97
97
  declare const CtaButton: ({ href, children, ...props }: CtaButtonProps) => React$1.JSX.Element;
98
98
 
99
- type PromotionInfotipProps = React$1.PropsWithChildren<{
99
+ type InfotipCardProps = {
100
100
  title: string;
101
101
  content: string;
102
102
  assetUrl: string;
103
103
  ctaUrl: string;
104
- open?: boolean;
105
104
  setOpen: (open: boolean) => void;
105
+ };
106
+ type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
107
+ open?: boolean;
106
108
  }>;
107
- declare const PromotionInfotip: ({ children, ...props }: PromotionInfotipProps) => React$1.JSX.Element;
109
+ declare const PromotionInfotip: ({ children, open, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
108
110
 
109
111
  type PopoverBodyProps = PropsWithChildren<{
110
112
  height?: number | 'auto';
package/dist/index.js CHANGED
@@ -445,29 +445,10 @@ var CtaButton = ({ href, children, ...props }) => /* @__PURE__ */ React12.create
445
445
  // src/components/promotion-infotip.tsx
446
446
  var React13 = __toESM(require("react"));
447
447
  var import_ui13 = require("@elementor/ui");
448
- var PromotionInfotip = ({ children, ...props }) => {
449
- return /* @__PURE__ */ React13.createElement(
450
- import_ui13.Infotip,
451
- {
452
- placement: "right",
453
- ...props,
454
- content: /* @__PURE__ */ React13.createElement(
455
- InfotipCard,
456
- {
457
- title: props.title,
458
- content: props.content,
459
- assetUrl: props.assetUrl,
460
- ctaUrl: props.ctaUrl,
461
- setOpen: props.setOpen
462
- }
463
- ),
464
- open: props.open
465
- },
466
- children
467
- );
448
+ var PromotionInfotip = ({ children, open, ...cardProps }) => {
449
+ return /* @__PURE__ */ React13.createElement(import_ui13.Infotip, { placement: "right", content: /* @__PURE__ */ React13.createElement(InfotipCard, { ...cardProps }), open }, children);
468
450
  };
469
- function InfotipCard({ ...props }) {
470
- const { title, content, assetUrl, ctaUrl, setOpen } = props;
451
+ function InfotipCard({ title, content, assetUrl, ctaUrl, setOpen }) {
471
452
  return /* @__PURE__ */ React13.createElement(import_ui13.Card, { elevation: 0, sx: { maxWidth: 296 } }, /* @__PURE__ */ React13.createElement(
472
453
  import_ui13.CardHeader,
473
454
  {
package/dist/index.mjs CHANGED
@@ -403,29 +403,10 @@ var CtaButton = ({ href, children, ...props }) => /* @__PURE__ */ React12.create
403
403
  // src/components/promotion-infotip.tsx
404
404
  import * as React13 from "react";
405
405
  import { Card as Card2, CardActions as CardActions2, CardContent as CardContent2, CardHeader, CardMedia, CloseButton, Infotip as Infotip3, Typography as Typography3 } from "@elementor/ui";
406
- var PromotionInfotip = ({ children, ...props }) => {
407
- return /* @__PURE__ */ React13.createElement(
408
- Infotip3,
409
- {
410
- placement: "right",
411
- ...props,
412
- content: /* @__PURE__ */ React13.createElement(
413
- InfotipCard,
414
- {
415
- title: props.title,
416
- content: props.content,
417
- assetUrl: props.assetUrl,
418
- ctaUrl: props.ctaUrl,
419
- setOpen: props.setOpen
420
- }
421
- ),
422
- open: props.open
423
- },
424
- children
425
- );
406
+ var PromotionInfotip = ({ children, open, ...cardProps }) => {
407
+ return /* @__PURE__ */ React13.createElement(Infotip3, { placement: "right", content: /* @__PURE__ */ React13.createElement(InfotipCard, { ...cardProps }), open }, children);
426
408
  };
427
- function InfotipCard({ ...props }) {
428
- const { title, content, assetUrl, ctaUrl, setOpen } = props;
409
+ function InfotipCard({ title, content, assetUrl, ctaUrl, setOpen }) {
429
410
  return /* @__PURE__ */ React13.createElement(Card2, { elevation: 0, sx: { maxWidth: 296 } }, /* @__PURE__ */ React13.createElement(
430
411
  CardHeader,
431
412
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-ui",
3
3
  "description": "Elementor Editor UI",
4
- "version": "3.35.0-377",
4
+ "version": "3.35.0-378",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -37,7 +37,7 @@
37
37
  "react-dom": "^18.3.1"
38
38
  },
39
39
  "dependencies": {
40
- "@elementor/editor-v1-adapters": "3.35.0-377",
40
+ "@elementor/editor-v1-adapters": "3.35.0-378",
41
41
  "@elementor/icons": "^1.63.0",
42
42
  "@elementor/ui": "1.36.17",
43
43
  "@tanstack/react-virtual": "^3.13.3",
@@ -3,39 +3,29 @@ import { Card, CardActions, CardContent, CardHeader, CardMedia, CloseButton, Inf
3
3
 
4
4
  import { CtaButton } from './cta-button';
5
5
 
6
- type PromotionInfotipProps = React.PropsWithChildren< {
6
+ type InfotipCardProps = {
7
7
  title: string;
8
8
  content: string;
9
9
  assetUrl: string;
10
10
  ctaUrl: string;
11
- open?: boolean;
12
11
  setOpen: ( open: boolean ) => void;
13
- } >;
12
+ };
13
+
14
+ type PromotionInfotipProps = React.PropsWithChildren<
15
+ InfotipCardProps & {
16
+ open?: boolean;
17
+ }
18
+ >;
14
19
 
15
- export const PromotionInfotip = ( { children, ...props }: PromotionInfotipProps ) => {
20
+ export const PromotionInfotip = ( { children, open, ...cardProps }: PromotionInfotipProps ) => {
16
21
  return (
17
- <Infotip
18
- placement="right"
19
- { ...props }
20
- content={
21
- <InfotipCard
22
- title={ props.title }
23
- content={ props.content }
24
- assetUrl={ props.assetUrl }
25
- ctaUrl={ props.ctaUrl }
26
- setOpen={ props.setOpen }
27
- />
28
- }
29
- open={ props.open }
30
- >
22
+ <Infotip placement="right" content={ <InfotipCard { ...cardProps } /> } open={ open }>
31
23
  { children }
32
24
  </Infotip>
33
25
  );
34
26
  };
35
27
 
36
- function InfotipCard( { ...props }: PromotionInfotipProps ) {
37
- const { title, content, assetUrl, ctaUrl, setOpen } = props;
38
-
28
+ function InfotipCard( { title, content, assetUrl, ctaUrl, setOpen }: InfotipCardProps ) {
39
29
  return (
40
30
  <Card elevation={ 0 } sx={ { maxWidth: 296 } }>
41
31
  <CardHeader