@cruk/chakra-components 3.0.4 → 3.0.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@chakra-ui/react");const t=r.forwardRef(((t,
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@chakra-ui/react");const t=r.forwardRef(((t,o)=>{const{videoID:a,description:n,aspectRatio:i=16/9,privacyMode:s=!1,...c}=t;if(""===a)return null;const d=new URLSearchParams;d.append("modestbranding","1"),d.append("rel","0"),d.append("enablejsapi","1");const u=s?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/";return e.jsx(r.AspectRatio,{ref:o,ratio:i,...c,children:e.jsx("iframe",{title:n,src:`${u}${a}?${d.toString()}`,style:{border:"none"},allowFullScreen:!0,frameBorder:"0"})})}));t.displayName="YouTube Embed",exports.YouTubeEmbed=t;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/YouTubeEmbed/index.tsx"],"sourcesContent":[null],"names":["YouTubeEmbed","forwardRef","props","ref","videoID","description","aspectRatio","rest","params","URLSearchParams","append","_jsx","AspectRatio","ratio","title","src","toString","style","border","allowFullScreen","frameBorder","displayName"],"mappings":"8EAQM,MAAAA,EAAeC,EAAUA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/YouTubeEmbed/index.tsx"],"sourcesContent":[null],"names":["YouTubeEmbed","forwardRef","props","ref","videoID","description","aspectRatio","privacyMode","rest","params","URLSearchParams","append","baseUrl","_jsx","AspectRatio","ratio","children","title","src","toString","style","border","allowFullScreen","frameBorder","displayName"],"mappings":"8EAQM,MAAAA,EAAeC,EAAUA,YAG7B,CAACC,EAAOC,KACR,MAAMC,QACJA,EAAOC,YACPA,EAAWC,YACXA,EAAc,GAAK,EAACC,YACpBA,GAAc,KACXC,GACDN,EAEJ,GAAgB,KAAZE,EACF,OAAO,KAGT,MAAMK,EAAS,IAAIC,gBACnBD,EAAOE,OAAO,iBAAkB,KAChCF,EAAOE,OAAO,MAAO,KACrBF,EAAOE,OAAO,cAAe,KAE7B,MAAMC,EAAUL,EACZ,0CACA,iCAEJ,OACEM,EAAAA,IAACC,EAAAA,YAAW,CAACX,IAAKA,EAAKY,MAAOT,KAAiBE,EAAIQ,SACjDH,gBACEI,MAAOZ,EACPa,IAAK,GAAGN,IAAUR,KAAWK,EAAOU,aACpCC,MAAO,CAAEC,OAAQ,QACjBC,iBACA,EAAAC,YAAY,OAEF,IAIlBvB,EAAawB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as r,AspectRatio as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as r,AspectRatio as o}from"@chakra-ui/react";const t=r(((r,t)=>{const{videoID:a,description:n,aspectRatio:i=16/9,privacyMode:c=!1,...p}=r;if(""===a)return null;const d=new URLSearchParams;d.append("modestbranding","1"),d.append("rel","0"),d.append("enablejsapi","1");return e(o,{ref:t,ratio:i,...p,children:e("iframe",{title:n,src:`${c?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/"}${a}?${d.toString()}`,style:{border:"none"},allowFullScreen:!0,frameBorder:"0"})})}));t.displayName="YouTube Embed";export{t as YouTubeEmbed};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/YouTubeEmbed/index.tsx"],"sourcesContent":[null],"names":["YouTubeEmbed","forwardRef","props","ref","videoID","description","aspectRatio","rest","params","URLSearchParams","append","_jsx","AspectRatio","ratio","title","src","toString","style","border","allowFullScreen","frameBorder","displayName"],"mappings":"uGAQM,MAAAA,EAAeC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/YouTubeEmbed/index.tsx"],"sourcesContent":[null],"names":["YouTubeEmbed","forwardRef","props","ref","videoID","description","aspectRatio","privacyMode","rest","params","URLSearchParams","append","_jsx","AspectRatio","ratio","children","title","src","toString","style","border","allowFullScreen","frameBorder","displayName"],"mappings":"uGAQM,MAAAA,EAAeC,GAGnB,CAACC,EAAOC,KACR,MAAMC,QACJA,EAAOC,YACPA,EAAWC,YACXA,EAAc,GAAK,EAACC,YACpBA,GAAc,KACXC,GACDN,EAEJ,GAAgB,KAAZE,EACF,OAAO,KAGT,MAAMK,EAAS,IAAIC,gBACnBD,EAAOE,OAAO,iBAAkB,KAChCF,EAAOE,OAAO,MAAO,KACrBF,EAAOE,OAAO,cAAe,KAM7B,OACEC,EAACC,EAAW,CAACV,IAAKA,EAAKW,MAAOR,KAAiBE,EAAIO,SACjDH,YACEI,MAAOX,EACPY,IAAK,GARKV,EACZ,0CACA,mCAMoBH,KAAWK,EAAOS,aACpCC,MAAO,CAAEC,OAAQ,QACjBC,iBACA,EAAAC,YAAY,OAEF,IAIlBtB,EAAauB,YAAc"}
|
package/dist/index.d.ts
CHANGED
|
@@ -534,12 +534,13 @@ type VimeoEmbedProps = ChakraProps & {
|
|
|
534
534
|
};
|
|
535
535
|
declare const VimeoEmbed: _chakra_ui_react.ComponentWithAs<"div", VimeoEmbedProps>;
|
|
536
536
|
|
|
537
|
-
|
|
537
|
+
declare const YouTubeEmbed: _chakra_ui_react.ComponentWithAs<"div", ChakraProps & {
|
|
538
538
|
videoID: string;
|
|
539
539
|
description: string;
|
|
540
540
|
aspectRatio?: number;
|
|
541
|
-
}
|
|
542
|
-
|
|
541
|
+
} & {
|
|
542
|
+
privacyMode?: boolean;
|
|
543
|
+
}>;
|
|
543
544
|
|
|
544
545
|
declare const Divider: _chakra_ui_react.ComponentWithAs<"div", DividerProps>;
|
|
545
546
|
|