@interop-ui/react-aspect-ratio
Advanced tools
Comparing version 0.0.1-17 to 0.2.0-rc.1
@@ -1,7 +0,11 @@ | ||
type AspectRatioOwnProps = { | ||
import * as React from "react"; | ||
import * as Radix from "@interop-ui/react-primitive"; | ||
import { Primitive } from "@interop-ui/react-primitive"; | ||
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>; | ||
export interface AspectRatioProps extends PrimitiveDivProps { | ||
ratio?: number; | ||
}; | ||
export const AspectRatio: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", AspectRatioOwnProps>; | ||
export const Root: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", AspectRatioOwnProps>; | ||
} | ||
export const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>; | ||
export const Root: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
var e,t,r=require("@interop-ui/react-polymorphic").forwardRefWithAs,n=require("@interop-ui/utils").getPartDataAttrObj,o=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=r((function(e,t){var r=e.as,c=void 0===r?"div":r,l=e.ratio,p=void 0===l?1:l,f=e.style,s=e.children,b=u(e,["as","ratio","style","children"]);return o.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:"".concat(100/p,"%")}},o.createElement(c,i({},b,n("AspectRatio"),{ref:t,style:a(a({},f),{},{position:"absolute",top:0,right:0,bottom:0,left:0})}),s))}));exports.AspectRatio=p,p.displayName="AspectRatio";var f=p;exports.Root=f; | ||
var e,t,r,i=require("@interop-ui/react-primitive").Primitive,o=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e),a=(r=require("@babel/runtime/helpers/extends"))&&r.__esModule?r.default:r;const n=/*#__PURE__*/o.forwardRef(((e,t)=>{const{ratio:r=1,style:n,...s}=e;/*#__PURE__*/return o.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:100/r+"%"},"data-radix-aspect-ratio-wrapper":""},/*#__PURE__*/o.createElement(i.div,a({},s,{ref:t,style:{...n,position:"absolute",top:0,right:0,bottom:0,left:0}})))}));exports.AspectRatio=n;const s=n;exports.Root=s; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{forwardRefWithAs as t}from"@interop-ui/react-polymorphic";import{getPartDataAttrObj as e}from"@interop-ui/utils";import*as r from"react";function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}).apply(this,arguments)}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t,e){if(null==t)return{};var r,o,n=function(t,e){if(null==t)return{};var r,o,n={},i=Object.keys(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}const a="div";export const AspectRatio=t(((t,n)=>{const{as:c=a,ratio:l=1,style:s,children:u}=t,f=p(t,["as","ratio","style","children"]);return r.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:"".concat(100/l,"%")}},r.createElement(c,o({},f,e("AspectRatio"),{ref:n,style:i(i({},s),{},{position:"absolute",top:0,right:0,bottom:0,left:0})}),u))}));AspectRatio.displayName="AspectRatio";export const Root=AspectRatio; | ||
import{Primitive as t}from"@interop-ui/react-primitive";import*as e from"react";import o from"@babel/runtime/helpers/esm/extends";export const AspectRatio=/*#__PURE__*/e.forwardRef(((r,i)=>{const{ratio:a=1,style:p,...s}=r;/*#__PURE__*/return e.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:100/a+"%"},"data-radix-aspect-ratio-wrapper":""},/*#__PURE__*/e.createElement(t.div,o({},s,{ref:i,style:{...p,position:"absolute",top:0,right:0,bottom:0,left:0}})))}));/*#__PURE__*/export const Root=AspectRatio; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@interop-ui/react-aspect-ratio", | ||
"version": "0.0.1-17", | ||
"version": "0.2.0-rc.1", | ||
"license": "MIT", | ||
@@ -15,17 +15,21 @@ "source": "src/index.ts", | ||
"scripts": { | ||
"build": "parcel build src/index.ts --no-cache", | ||
"clean": "rm -rf dist", | ||
"version": "yarn version", | ||
"prepublish": "yarn clean && yarn build" | ||
"version": "yarn version" | ||
}, | ||
"dependencies": { | ||
"@interop-ui/react-polymorphic": "0.0.1-3", | ||
"@interop-ui/utils": "0.0.1-8" | ||
"@babel/runtime": "^7.13.10", | ||
"@interop-ui/react-primitive": "0.2.0-rc.1" | ||
}, | ||
"devDependencies": { | ||
"parcel": "^2.0.0-beta.1" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8 || ^17.0" | ||
} | ||
}, | ||
"homepage": "https://radix-ui.com/primitives", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/radix-ui/primitives.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
}, | ||
"stableVersion": "0.1.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
1
2
0
9679
18
+ Added@babel/runtime@^7.13.10
+ Added@babel/runtime@7.26.0(transitive)
+ Added@interop-ui/react-compose-refs@0.2.0-rc.1(transitive)
+ Added@interop-ui/react-primitive@0.2.0-rc.1(transitive)
+ Added@interop-ui/react-slot@0.2.0-rc.1(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@interop-ui/utils@0.0.1-8
- Removed@interop-ui/react-polymorphic@0.0.1-3(transitive)
- Removed@interop-ui/utils@0.0.1-8(transitive)