@vite-mf-monorepo/ui 0.4.19 → 0.4.21
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 client";import{Fragment as r,jsx as e,jsxs as n}from"react/jsx-runtime";import{Skeleton as a}from"../../Skeleton";import{NextImage as
|
|
1
|
+
"use client";import{Fragment as r,jsx as e,jsxs as n}from"react/jsx-runtime";import{Skeleton as a}from"../../Skeleton";import{NextImage as u}from"../Image";function o({backdropPath:i,title:l}){const t=i?`https://image.tmdb.org/t/p/original${i}`:void 0;return n(r,{children:[t?e(u,{src:t,alt:l??"Unknown",fill:!0,preload:!0,sizes:"100vw",className:"ui:relative ui:h-full ui:w-full ui:z-0",imageClassName:"ui:h-auto! ui:w-full",fallback:e(a,{"data-testid":"hero-image-skeleton",variant:"rectangle",width:"ui:relative ui:w-full ui:h-full ui:aspect-[21/9] ui:lg:max-h-[440px] ui:z-0",aspectRatio:"21/9",rounded:!1})}):e(a,{"data-testid":"hero-image-skeleton",variant:"rectangle",width:"ui:relative ui:w-full ui:h-auto ui:aspect-[21/9] ui:lg:max-h-[440px] ui:z-0",aspectRatio:"21/9",rounded:!1}),e("div",{className:"ui:absolute ui:inset-0 ui:bg-gradient-to-t ui:from-black/80 ui:via-black/40 ui:to-transparent ui:z-1 ui:top-0 ui:left-0 ui:right-0 ui:bottom-0"})]})}var m=o;export{m as default};
|
|
2
2
|
//# sourceMappingURL=HeroImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/next/HeroImage/HeroImage.tsx"],"sourcesContent":["'use client'\n\nimport { Skeleton } from '../../Skeleton'\nimport { NextImage } from '../Image'\n\nexport interface NextHeroImageProps {\n /** Backdrop path from TMDB API (e.g. \"/abc123.jpg\") */\n backdropPath?: string | null\n /** Alt text for the image */\n title?: string | null\n}\n\nfunction HeroImage({ backdropPath, title }: Readonly<NextHeroImageProps>) {\n const src = backdropPath\n ? `https://image.tmdb.org/t/p/original${backdropPath}`\n : undefined\n\n return (\n <>\n {src ? (\n <NextImage\n src={src}\n alt={title ?? 'Unknown'}\n fill\n preload\n sizes=\"100vw\"\n className=\"ui:relative ui:h-full ui:w-full ui:z-0\"\n imageClassName=\"ui:
|
|
1
|
+
{"version":3,"sources":["../../../src/next/HeroImage/HeroImage.tsx"],"sourcesContent":["'use client'\n\nimport { Skeleton } from '../../Skeleton'\nimport { NextImage } from '../Image'\n\nexport interface NextHeroImageProps {\n /** Backdrop path from TMDB API (e.g. \"/abc123.jpg\") */\n backdropPath?: string | null\n /** Alt text for the image */\n title?: string | null\n}\n\nfunction HeroImage({ backdropPath, title }: Readonly<NextHeroImageProps>) {\n const src = backdropPath\n ? `https://image.tmdb.org/t/p/original${backdropPath}`\n : undefined\n\n return (\n <>\n {src ? (\n <NextImage\n src={src}\n alt={title ?? 'Unknown'}\n fill\n preload\n sizes=\"100vw\"\n className=\"ui:relative ui:h-full ui:w-full ui:z-0\"\n imageClassName=\"ui:h-auto! ui:w-full\"\n fallback={\n <Skeleton\n data-testid=\"hero-image-skeleton\"\n variant=\"rectangle\"\n width=\"ui:relative ui:w-full ui:h-full ui:aspect-[21/9] ui:lg:max-h-[440px] ui:z-0\"\n aspectRatio=\"21/9\"\n rounded={false}\n />\n }\n />\n ) : (\n <Skeleton\n data-testid=\"hero-image-skeleton\"\n variant=\"rectangle\"\n width=\"ui:relative ui:w-full ui:h-auto ui:aspect-[21/9] ui:lg:max-h-[440px] ui:z-0\"\n aspectRatio=\"21/9\"\n rounded={false}\n />\n )}\n {/* Gradient Overlay */}\n <div className=\"ui:absolute ui:inset-0 ui:bg-gradient-to-t ui:from-black/80 ui:via-black/40 ui:to-transparent ui:z-1 ui:top-0 ui:left-0 ui:right-0 ui:bottom-0\" />\n </>\n )\n}\n\nexport default HeroImage\n"],"mappings":"aAkBI,mBAAAA,EAWQ,OAAAC,EAXR,QAAAC,MAAA,oBAhBJ,OAAS,YAAAC,MAAgB,iBACzB,OAAS,aAAAC,MAAiB,WAS1B,SAASC,EAAU,CAAE,aAAAC,EAAc,MAAAC,CAAM,EAAiC,CACxE,MAAMC,EAAMF,EACR,sCAAsCA,CAAY,GAClD,OAEJ,OACEJ,EAAAF,EAAA,CACG,UAAAQ,EACCP,EAACG,EAAA,CACC,IAAKI,EACL,IAAKD,GAAS,UACd,KAAI,GACJ,QAAO,GACP,MAAM,QACN,UAAU,yCACV,eAAe,uBACf,SACEN,EAACE,EAAA,CACC,cAAY,sBACZ,QAAQ,YACR,MAAM,8EACN,YAAY,OACZ,QAAS,GACX,EAEJ,EAEAF,EAACE,EAAA,CACC,cAAY,sBACZ,QAAQ,YACR,MAAM,8EACN,YAAY,OACZ,QAAS,GACX,EAGFF,EAAC,OAAI,UAAU,iJAAiJ,GAClK,CAEJ,CAEA,IAAOQ,EAAQJ","names":["Fragment","jsx","jsxs","Skeleton","NextImage","HeroImage","backdropPath","title","src","HeroImage_default"]}
|