@stackshift-ui/image 6.1.0-beta.1 → 6.1.0-beta.3
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/dist/chunk-NQ52GWT6.mjs +13 -0
- package/dist/chunk-YTWR6D52.mjs +1 -0
- package/dist/image.d.ts +2 -1
- package/dist/image.js +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/src/image.tsx +3 -2
- package/dist/chunk-C5WQCYV6.mjs +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/image.tsx
|
|
2
|
+
import { useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var displayName = "Image";
|
|
5
|
+
var Image = ({ children, loading = "lazy", ...props }) => {
|
|
6
|
+
const components = useStackShiftUIComponents();
|
|
7
|
+
const { [displayName]: Component = "img" } = components;
|
|
8
|
+
return /* @__PURE__ */ jsx(Component, { loading, ...props, children });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
Image
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useStackShiftUIComponents as m}from"@stackshift-ui/system";import{jsx as r}from"react/jsx-runtime";var p="Image",c=({children:e,loading:o="lazy",...n})=>{let t=m(),{[p]:a="img"}=t;return r(a,{loading:o,...n,children:e})};export{c as a};
|
package/dist/image.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLProps, ReactNode } from "react";
|
|
2
2
|
export interface ImageProps extends HTMLProps<HTMLImageElement> {
|
|
3
|
+
loading?: "lazy" | "eager" | undefined;
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
}
|
|
5
|
-
export declare const Image: ({ children, ...props }: ImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Image: ({ children, loading, ...props }: ImageProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/image.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var t in e)m(o,t,{get:e[t],enumerable:!0})},i=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!d.call(o,n)&&n!==t&&m(o,n,{get:()=>e[n],enumerable:!(a=s(e,n))||a.enumerable});return o};var l=o=>i(m({},"__esModule",{value:!0}),o);var y={};g(y,{Image:()=>f});module.exports=l(y);var p=require("@stackshift-ui/system"),r=require("react/jsx-runtime"),I="Image",f=({children:o,loading:e="lazy",...t})=>{let a=(0,p.useStackShiftUIComponents)(),{[I]:n="img"}=a;return(0,r.jsx)(n,{loading:e,...t,children:o})};0&&(module.exports={Image});
|
package/dist/image.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-YTWR6D52.mjs";export{a as Image};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var m=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var n in e)m(o,n,{get:e[n],enumerable:!0})},g=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of c(e))!i.call(o,t)&&t!==n&&m(o,t,{get:()=>e[t],enumerable:!(a=s(e,t))||a.enumerable});return o};var l=o=>g(m({},"__esModule",{value:!0}),o);var y={};d(y,{Image:()=>I});module.exports=l(y);var r=require("@stackshift-ui/system"),p=require("react/jsx-runtime"),f="Image",I=({children:o,loading:e="lazy",...n})=>{let a=(0,r.useStackShiftUIComponents)(),{[f]:t="img"}=a;return(0,p.jsx)(t,{loading:e,...n,children:o})};0&&(module.exports={Image});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-YTWR6D52.mjs";export{e as Image};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/image",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@stackshift-ui/eslint-config": "6.0.10"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stackshift-ui/
|
|
35
|
-
"@stackshift-ui/
|
|
34
|
+
"@stackshift-ui/scripts": "6.1.0-beta.2",
|
|
35
|
+
"@stackshift-ui/system": "6.1.0-beta.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@types/react": "16.8 - 19",
|
package/src/image.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
|
2
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
export interface ImageProps extends HTMLProps<HTMLImageElement> {
|
|
5
|
+
loading?: "lazy" | "eager" | undefined;
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
}
|
|
7
8
|
|
|
@@ -16,12 +17,12 @@ export interface ImageProps extends HTMLProps<HTMLImageElement> {
|
|
|
16
17
|
* @source - Source code
|
|
17
18
|
*/
|
|
18
19
|
const displayName = "Image";
|
|
19
|
-
export const Image = ({ children, ...props }: ImageProps) => {
|
|
20
|
+
export const Image = ({ children, loading = "lazy", ...props }: ImageProps) => {
|
|
20
21
|
const components = useStackShiftUIComponents();
|
|
21
22
|
const { [displayName]: Component = "img" } = components;
|
|
22
23
|
|
|
23
24
|
return (
|
|
24
|
-
<Component {...props} data-testid="image">
|
|
25
|
+
<Component loading={loading} {...props} data-testid="image">
|
|
25
26
|
{children}
|
|
26
27
|
</Component>
|
|
27
28
|
);
|
package/dist/chunk-C5WQCYV6.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useStackShiftUIComponents as m}from"@stackshift-ui/system";import{jsx as r}from"react/jsx-runtime";var p="Image",a=({children:e,...o})=>{let t=m(),{[p]:n="img"}=t;return r(n,{...o,children:e})};export{a};
|