smooth-components 0.0.3 → 0.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.
@@ -0,0 +1 @@
1
+ .poster-container{position:relative;z-index:30;margin-bottom:6rem;border-radius:3px;overflow:hidden;border:25px solid black;background-color:#6b728080;opacity:.8;cursor:pointer;transform:translateY(0) scale(1);transition:all .3s ease-out;box-shadow:0 20px 25px -5px #000000e6,0 8px 10px -6px #0000001a}.poster-container.group{display:none}@media (min-width: 1024px){.poster-container{margin-bottom:0}}.poster-container:hover{transform:scale(1.01) translateY(-.25rem);box-shadow:0 25px 50px -12px #00000040,0 0 20px #ffffff4d}.poster-image{width:100%;height:100%;object-fit:cover;-webkit-user-select:none;user-select:none;pointer-events:none;filter:blur(.4px);transition:all .3s ease-in-out;display:block}.poster-container:hover .poster-image{filter:blur(.2px);transform:scale(1.01)}.poster-image-glint{position:absolute;top:0;left:-100%;width:100%;height:100%;pointer-events:none;z-index:10;background:linear-gradient(to right,transparent,rgba(255,255,255,.4),transparent);transform:skew(-12deg);transition:all .6s ease-in-out}.poster-container:hover .poster-image-glint{left:100%}
@@ -1,6 +1,19 @@
1
1
  import { FC } from 'react';
2
+ import { JSX } from 'react';
2
3
  import { PropsWithChildren } from 'react';
3
4
 
5
+ export declare const Poster: ({ alt, src, styles }: PosterProps) => JSX.Element;
6
+
7
+ declare type PosterProps = {
8
+ alt: string;
9
+ src: string;
10
+ styles?: {
11
+ opacity?: number;
12
+ height?: string;
13
+ width?: string;
14
+ };
15
+ };
16
+
4
17
  export declare const Title: FC<PropsWithChildren>;
5
18
 
6
19
  export { }
@@ -1,5 +1,27 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- const e = ({ children: r }) => /* @__PURE__ */ o("h1", { style: { color: "red" }, children: r });
1
+ import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
+ const p = ({ children: t }) => /* @__PURE__ */ s("h1", { style: { color: "red" }, children: t }), n = 0.91, l = "auto", m = "auto", d = ({ alt: t, src: e, styles: o }) => {
3
+ const {
4
+ opacity: r = n,
5
+ height: c = m,
6
+ width: i = l
7
+ } = o ?? {};
8
+ return /* @__PURE__ */ a(
9
+ "div",
10
+ {
11
+ className: "poster-container",
12
+ style: {
13
+ opacity: r,
14
+ height: c,
15
+ width: i
16
+ },
17
+ children: [
18
+ /* @__PURE__ */ s("img", { alt: t, src: e, className: "poster-image" }),
19
+ /* @__PURE__ */ s("div", { className: "poster-image-glint" })
20
+ ]
21
+ }
22
+ );
23
+ };
3
24
  export {
4
- e as Title
25
+ d as Poster,
26
+ p as Title
5
27
  };
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FaztComponents={},e["react/jsx-runtime"]))})(this,function(e,t){"use strict";const n=({children:i})=>t.jsx("h1",{style:{color:"red"},children:i});e.Title=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FaztComponents={},e["react/jsx-runtime"]))})(this,function(e,t){"use strict";const o=({children:s})=>t.jsx("h1",{style:{color:"red"},children:s}),n="auto",i="auto",r=({alt:s,src:c,styles:a})=>{const{opacity:d=.91,height:u=i,width:l=n}=a??{};return t.jsxs("div",{className:"poster-container",style:{opacity:d,height:u,width:l},children:[t.jsx("img",{alt:s,src:c,className:"poster-image"}),t.jsx("div",{className:"poster-image-glint"})]})};e.Poster=r,e.Title=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smooth-components",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "files": ["dist"],
6
6
  "main": "./dist/smooth-components.umd.cjs",