@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,a)=>{const{videoID:n,description:o,aspectRatio:i=16/9,...s}=t;if(""===n)return null;const c=new URLSearchParams;return c.append("modestbranding","1"),c.append("rel","0"),c.append("enablejsapi","1"),e.jsx(r.AspectRatio,{ref:a,ratio:i,...s,children:e.jsx("iframe",{title:o,src:`https://www.youtube.com/embed/${n}?${c.toString()}`,style:{border:"none"},allowFullScreen:!0,frameBorder:"0"})})}));t.displayName="YouTube Embed",exports.YouTubeEmbed=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,YAA2B,CAACC,EAAOC,KAChE,MAAMC,QAAEA,EAAOC,YAAEA,EAAWC,YAAEA,EAAc,GAAK,KAAMC,GAASL,EAEhE,GAAgB,KAAZE,EACF,OAAO,KAGT,MAAMI,EAAS,IAAIC,gBAKnB,OAJAD,EAAOE,OAAO,iBAAkB,KAChCF,EAAOE,OAAO,MAAO,KACrBF,EAAOE,OAAO,cAAe,KAG3BC,EAAAA,IAACC,EAAAA,YAAW,CAACT,IAAKA,EAAKU,MAAOP,KAAiBC,WAC7CI,EAAAA,IACE,SAAA,CAAAG,MAAOT,EACPU,IAAK,iCAAiCX,KAAWI,EAAOQ,aACxDC,MAAO,CAAEC,OAAQ,QACjBC,iBACA,EAAAC,YAAY,OAEF,IAIlBpB,EAAaqB,YAAc"}
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 t}from"@chakra-ui/react";const a=r(((r,a)=>{const{videoID:o,description:n,aspectRatio:i=16/9,...p}=r;if(""===o)return null;const c=new URLSearchParams;return c.append("modestbranding","1"),c.append("rel","0"),c.append("enablejsapi","1"),e(t,{ref:a,ratio:i,...p,children:e("iframe",{title:n,src:`https://www.youtube.com/embed/${o}?${c.toString()}`,style:{border:"none"},allowFullScreen:!0,frameBorder:"0"})})}));a.displayName="YouTube Embed";export{a as YouTubeEmbed};
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,GAAqC,CAACC,EAAOC,KAChE,MAAMC,QAAEA,EAAOC,YAAEA,EAAWC,YAAEA,EAAc,GAAK,KAAMC,GAASL,EAEhE,GAAgB,KAAZE,EACF,OAAO,KAGT,MAAMI,EAAS,IAAIC,gBAKnB,OAJAD,EAAOE,OAAO,iBAAkB,KAChCF,EAAOE,OAAO,MAAO,KACrBF,EAAOE,OAAO,cAAe,KAG3BC,EAACC,EAAW,CAACT,IAAKA,EAAKU,MAAOP,KAAiBC,WAC7CI,EACE,SAAA,CAAAG,MAAOT,EACPU,IAAK,iCAAiCX,KAAWI,EAAOQ,aACxDC,MAAO,CAAEC,OAAQ,QACjBC,iBACA,EAAAC,YAAY,OAEF,IAIlBpB,EAAaqB,YAAc"}
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
- type YouTubeEmbedProps = ChakraProps & {
537
+ declare const YouTubeEmbed: _chakra_ui_react.ComponentWithAs<"div", ChakraProps & {
538
538
  videoID: string;
539
539
  description: string;
540
540
  aspectRatio?: number;
541
- };
542
- declare const YouTubeEmbed: _chakra_ui_react.ComponentWithAs<"div", YouTubeEmbedProps>;
541
+ } & {
542
+ privacyMode?: boolean;
543
+ }>;
543
544
 
544
545
  declare const Divider: _chakra_ui_react.ComponentWithAs<"div", DividerProps>;
545
546
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruk/chakra-components",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Chakra UI v2 based components for CRUK applications",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,