smooth-components 1.1.3 β†’ 1.1.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.
package/README.md CHANGED
@@ -1 +1,76 @@
1
- clean readme
1
+ # πŸ“¦ smooth-components
2
+
3
+ `smooth-components` is a growing collection of elegant, customizable, and accessible React components built to help you quickly craft beautiful web interfaces.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/smooth-components.svg)](https://www.npmjs.com/package/smooth-components)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ---
9
+
10
+ ## πŸš€ Installation
11
+
12
+ Install the package via npm or yarn:
13
+
14
+ ```bash
15
+ npm install smooth-components
16
+ # or
17
+ yarn add smooth-components
18
+ ```
19
+
20
+ ---
21
+
22
+ ## πŸ–ΌοΈ Poster Component
23
+
24
+ The `Poster` component lets you display an image with customizable size, border, opacity, and an optional animated glint overlayβ€”perfect for showcasing posters, artworks, or product previews.
25
+
26
+ ### βœ… Usage
27
+
28
+ ```tsx
29
+ import { Poster } from 'smooth-components'
30
+
31
+ export default function App() {
32
+ return (
33
+ <Poster
34
+ alt="Cyberpunk City"
35
+ src="/images/cyberpunk.jpg"
36
+ styles={{
37
+ width: 240,
38
+ height: 360,
39
+ borderColor: '#555',
40
+ opacity: 0.95,
41
+ }}
42
+ />
43
+ )
44
+ }
45
+ ```
46
+
47
+ ### πŸ”§ Props
48
+
49
+ | Prop | Type | Default | Description |
50
+ | -------------------- | ------------------ | --------- | ------------------------------------------- |
51
+ | `alt` | `string` | β€” | Alternative text for the image. |
52
+ | `src` | `string` | β€” | Image source path or URL. |
53
+ | `styles` | `object` | β€” | Optional inline styles for the container. |
54
+ | `styles.opacity` | `number \| string` | `1` | Opacity of the poster container. |
55
+ | `styles.width` | `number \| string` | `'200px'` | Width of the poster. |
56
+ | `styles.height` | `number \| string` | `'300px'` | Height of the poster. |
57
+ | `styles.borderColor` | `string` | `'#ccc'` | Border color around the poster. |
58
+ | `hasGlintEffect` | `boolean` | `true` | Whether to show the animated glint overlay. |
59
+
60
+ > πŸ’‘ All style values can be in CSS units (`px`, `%`, `em`, etc.) or numbers (interpreted as pixels). The `glint` is a visual shimmer that moves across the image.
61
+
62
+ ---
63
+
64
+ ## πŸ“ License
65
+
66
+ Distributed under the MIT License.
67
+ See [LICENSE](LICENSE) for more information.
68
+
69
+ ---
70
+
71
+ ## πŸ“¬ Contact
72
+
73
+ * 🌐 **Portfolio**: [Visit my website](https://jaime00portfolio.netlify.app/)
74
+ * πŸ’Ό **LinkedIn**: [linkedin.com/in/jaime00](https://www.linkedin.com/in/jaime00)
75
+ * πŸ“§ **Email**: [imjaimetorresv@gmail.com](mailto:imjaimetorresv@gmail.com)
76
+ * πŸ™ **GitHub**: [github.com/jaime00](https://github.com/jaime00)
@@ -1,16 +1,6 @@
1
1
  import { JSX } from 'react';
2
+ import { PosterProps } from '../../types/poster';
2
3
 
3
- export declare const Poster: ({ alt, src, styles }: PosterProps) => JSX.Element;
4
-
5
- declare type PosterProps = {
6
- alt: string;
7
- src: string;
8
- styles?: {
9
- opacity?: number;
10
- height?: string;
11
- width?: string;
12
- borderColor?: string;
13
- };
14
- };
4
+ export declare const Poster: ({ alt, src, styles, hasGlintEffect, }: PosterProps) => JSX.Element;
15
5
 
16
6
  export { }
@@ -1,25 +1,30 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".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;filter:grayscale(.1) contrast(.99) sepia(.05) blur(0px)}.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 #000}.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%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
3
- const l = 0.91, m = "auto", p = "auto", T = "oklch(12.9% 0.042 264.695)", g = ({ alt: t, src: s, styles: e }) => {
2
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
3
+ const m = 0.91, T = "auto", E = "auto", p = "oklch(12.9% 0.042 264.695)", _ = !0, g = ({
4
+ alt: o,
5
+ src: s,
6
+ styles: e,
7
+ hasGlintEffect: r = _
8
+ }) => {
4
9
  const {
5
- opacity: r = l,
6
- height: c = p,
7
- width: a = m,
8
- borderColor: i = T
10
+ opacity: c = m,
11
+ height: a = E,
12
+ width: i = T,
13
+ borderColor: n = p
9
14
  } = e ?? {};
10
- return /* @__PURE__ */ n(
15
+ return /* @__PURE__ */ l(
11
16
  "div",
12
17
  {
13
18
  className: "poster-container",
14
19
  style: {
15
- opacity: r,
16
- height: c,
17
- width: a,
18
- borderColor: i
20
+ opacity: c,
21
+ height: a,
22
+ width: i,
23
+ borderColor: n
19
24
  },
20
25
  children: [
21
- /* @__PURE__ */ o("img", { alt: t, src: s, className: "poster-image" }),
22
- /* @__PURE__ */ o("div", { className: "poster-image-glint" })
26
+ /* @__PURE__ */ t("img", { alt: o, src: s, className: "poster-image" }),
27
+ r && /* @__PURE__ */ t("div", { className: "poster-image-glint" })
23
28
  ]
24
29
  }
25
30
  );
@@ -1,2 +1,2 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".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;filter:grayscale(.1) contrast(.99) sepia(.05) blur(0px)}.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 #000}.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%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (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="auto",s="auto",n="oklch(12.9% 0.042 264.695)",i=({alt:r,src:c,styles:a})=>{const{opacity:d=.91,height:u=s,width:f=o,borderColor:p=n}=a??{};return t.jsxs("div",{className:"poster-container",style:{opacity:d,height:u,width:f,borderColor:p},children:[t.jsx("img",{alt:r,src:c,className:"poster-image"}),t.jsx("div",{className:"poster-image-glint"})]})};e.Poster=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
2
+ (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.SmoothComponents={},e["react/jsx-runtime"]))})(this,function(e,t){"use strict";const o="auto",s="auto",n="oklch(12.9% 0.042 264.695)",i=({alt:r,src:c,styles:d,hasGlintEffect:a=!0})=>{const{opacity:u=.91,height:T=s,width:f=o,borderColor:m=n}=d??{};return t.jsxs("div",{className:"poster-container",style:{opacity:u,height:T,width:f,borderColor:m},children:[t.jsx("img",{alt:r,src:c,className:"poster-image"}),a&&t.jsx("div",{className:"poster-image-glint"})]})};e.Poster=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "smooth-components",
3
- "description": "A collection of smooth and elegant React components for building modern web applications...",
4
- "version": "1.1.3",
3
+ "description": "A collection of smooth and elegant React components for building modern web applications.",
4
+ "version": "1.1.5",
5
5
  "type": "module",
6
+ "author": "Jaime Torres",
7
+ "license": "MIT",
6
8
  "files": [
7
9
  "dist"
8
10
  ],
@@ -17,7 +19,7 @@
17
19
  "./dist/smooth-components.css": "./dist/smooth-components.css"
18
20
  },
19
21
  "scripts": {
20
- "dev": "vite",
22
+ "dev": "vite --port 3000",
21
23
  "build": "tsc -b && vite build",
22
24
  "lint": "eslint .",
23
25
  "preview": "vite preview"
@@ -41,5 +43,17 @@
41
43
  "vite": "^6.3.5",
42
44
  "vite-plugin-css-injected-by-js": "^3.5.2",
43
45
  "vite-plugin-dts": "^4.5.4"
44
- }
46
+ },
47
+ "keywords": [
48
+ "react",
49
+ "components",
50
+ "smooth",
51
+ "elegant",
52
+ "modern",
53
+ "web",
54
+ "application",
55
+ "development",
56
+ "poster",
57
+ "cinema"
58
+ ]
45
59
  }