@radix-ui/react-aspect-ratio
Advanced tools
Comparing version 0.0.5 to 0.0.6
import { Primitive } from "@radix-ui/react-primitive"; | ||
import * as Polymorphic from "@radix-ui/react-polymorphic"; | ||
import { Merge } from "@radix-ui/utils"; | ||
type AspectRatioOwnProps = Merge<Polymorphic.OwnProps<typeof Primitive>, { | ||
type AspectRatioOwnProps = Polymorphic.Merge<Polymorphic.OwnProps<typeof Primitive>, { | ||
ratio?: number; | ||
@@ -6,0 +5,0 @@ }>; |
@@ -1,2 +0,2 @@ | ||
var e,t,r=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/utils"),n=o.getSelector,i=o.getSelectorObj,c=(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 a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=c.forwardRef((function(e,t){var o=e.selector,l=void 0===o?n("AspectRatio"):o,p=e.ratio,s=void 0===p?1:p,b=e.style,O=f(e,["selector","ratio","style"]);return c.createElement("div",a({style:{position:"relative",width:"100%",paddingBottom:"".concat(100/s,"%")}},l?i(l+"-wrapper"):void 0),c.createElement(r,a({},O,{selector:l,ref:t,style:u(u({},b),{},{position:"absolute",top:0,right:0,bottom:0,left:0})})))}));exports.AspectRatio=s,s.displayName="AspectRatio";var b=s;exports.Root=b; | ||
var e,t,r=require("@radix-ui/react-primitive").Primitive,n=(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 o(){return(o=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 i(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?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(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 u=n.forwardRef((function(e,t){var i=e.ratio,c=void 0===i?1:i,u=e.style,l=p(e,["ratio","style"]);return n.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:"".concat(100/c,"%")},"data-radix-aspect-ratio-wrapper":""},n.createElement(r,o({},l,{ref:t,style:a(a({},u),{},{position:"absolute",top:0,right:0,bottom:0,left:0})})))}));exports.AspectRatio=u,u.displayName="AspectRatio";var l=u;exports.Root=l; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{Primitive as t}from"@radix-ui/react-primitive";import{getSelector as e,getSelectorObj as r}from"@radix-ui/utils";import*as o from"react";function n(){return(n=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 i(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 c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(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 l="AspectRatio";export const AspectRatio=o.forwardRef(((i,a)=>{const{selector:s=e(l),ratio:f=1,style:u}=i,b=p(i,["selector","ratio","style"]);return o.createElement("div",n({style:{position:"relative",width:"100%",paddingBottom:"".concat(100/f,"%")}},s?r(s+"-wrapper"):void 0),o.createElement(t,n({},b,{selector:s,ref:a,style:c(c({},u),{},{position:"absolute",top:0,right:0,bottom:0,left:0})})))}));AspectRatio.displayName=l;export const Root=AspectRatio; | ||
import{Primitive as t}from"@radix-ui/react-primitive";import*as e from"react";function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t}).apply(this,arguments)}export const AspectRatio=e.forwardRef(((r,a)=>{const{ratio:i=1,style:p,...n}=r;return e.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:"".concat(100/i,"%")},"data-radix-aspect-ratio-wrapper":""},e.createElement(t,o({},n,{ref:a,style:{...p,position:"absolute",top:0,right:0,bottom:0,left:0}})))}));AspectRatio.displayName="AspectRatio";export const Root=AspectRatio; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-aspect-ratio", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"license": "MIT", | ||
@@ -19,5 +19,4 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@radix-ui/react-polymorphic": "0.0.5", | ||
"@radix-ui/react-primitive": "0.0.4", | ||
"@radix-ui/utils": "0.0.3" | ||
"@radix-ui/react-polymorphic": "0.0.6", | ||
"@radix-ui/react-primitive": "0.0.5" | ||
}, | ||
@@ -24,0 +23,0 @@ "peerDependencies": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
10976
22
+ Added@radix-ui/react-polymorphic@0.0.6(transitive)
+ Added@radix-ui/react-primitive@0.0.5(transitive)
- Removed@radix-ui/utils@0.0.3
- Removed@radix-ui/react-polymorphic@0.0.5(transitive)
- Removed@radix-ui/react-primitive@0.0.4(transitive)
- Removed@radix-ui/utils@0.0.3(transitive)