@interop-ui/react-aspect-ratio
Advanced tools
Comparing version 0.0.1-9 to 0.0.1-10
@@ -1,2 +0,2 @@ | ||
var t,e,r=require("@interop-ui/react-utils"),n=r.forwardRef,o=r.createStyleObj,i=require("@interop-ui/utils"),a=i.cssReset,c=i.interopDataAttr,l=(t={},e=require("react"),Object.keys(e).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),t);function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var d=c("AspectRatio.Inner"),O=n((function(t,e){var r=t.as,n=void 0===r?"div":r,o=t.ratio,i=void 0===o?1:o,a=t.style,c=t.children,u=b(t,["as","ratio","style","children"]),s=100/i,O=y({},d,"");return l.createElement(n,f({},u,w("root"),{ref:e,style:p(p({},a),{},y({},"--paddingBottom","".concat(s,"%")))}),l.createElement("div",O,c))}));exports.AspectRatio=O,O.displayName="AspectRatio";var v,h,g=o("AspectRatio",{root:p(p({},a("div")),{},y({paddingBottom:"var(--paddingBottom)",position:"relative",width:"100%"},"& > [".concat(d,"]"),p(p({},a("div")),{},{position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"})))}),j=(h=2,function(t){if(Array.isArray(t))return t}(v=g)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}}(v,h)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(v,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=j[0],w=j[1];exports.styles=m; | ||
var t,e,r=require("@interop-ui/react-utils"),n=r.forwardRef,o=r.createStyleObj,i=require("@interop-ui/utils"),a=i.cssReset,c=i.interopDataAttr,l=(t={},e=require("react"),Object.keys(e).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),t);function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var d=c("AspectRatio.Inner"),O=n((function(t,e){var r=t.as,n=void 0===r?"div":r,o=t.ratio,i=void 0===o?1:o,a=t.style,c=t.children,u=b(t,["as","ratio","style","children"]),p=100/i,O=y({},d,"");return l.createElement(n,f({},u,w("root"),{ref:e,style:s(s({},a),{},y({},"--interop-aspect-ratio-padding-bottom","".concat(p,"%")))}),l.createElement("div",O,c))}));exports.AspectRatio=O,O.displayName="AspectRatio";var v,h,g=o("AspectRatio",{root:s(s({},a("div")),{},y({paddingBottom:"var(--interop-aspect-ratio-padding-bottom)",position:"relative",width:"100%"},"& > [".concat(d,"]"),s(s({},a("div")),{},{position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"})))}),j=(h=2,function(t){if(Array.isArray(t))return t}(v=g)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}}(v,h)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(v,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=j[0],w=j[1];exports.styles=m; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{forwardRef as t,createStyleObj as e}from"@interop-ui/react-utils";import{cssReset as r,interopDataAttr as o}from"@interop-ui/utils";import*as n from"react";function i(){return(i=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 c(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 a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(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 s="div",u=o("AspectRatio.Inner");export const AspectRatio=t((function(t,e){const{as:r=s,ratio:o=1,style:c,children:p}=t,f=l(t,["as","ratio","style","children"]),b=100/o,y={[u]:""};return n.createElement(r,i({},f,O("root"),{ref:e,style:a(a({},c),{},{"--paddingBottom":"".concat(b,"%")})}),n.createElement("div",y,p))}));AspectRatio.displayName="AspectRatio";const[f,O]=e("AspectRatio",{root:a(a({},r(s)),{},{paddingBottom:"var(--paddingBottom)",position:"relative",width:"100%",["& > [".concat(u,"]")]:a(a({},r("div")),{},{position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"})})});export{f as styles}; | ||
import{forwardRef as t,createStyleObj as e}from"@interop-ui/react-utils";import{cssReset as r,interopDataAttr as o}from"@interop-ui/utils";import*as n from"react";function i(){return(i=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 c(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 a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(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="div",u=o("AspectRatio.Inner");export const AspectRatio=t((function(t,e){const{as:r=l,ratio:o=1,style:c,children:p}=t,f=s(t,["as","ratio","style","children"]),O=100/o,y={[u]:""};return n.createElement(r,i({},f,b("root"),{ref:e,style:a(a({},c),{},{"--interop-aspect-ratio-padding-bottom":"".concat(O,"%")})}),n.createElement("div",y,p))}));AspectRatio.displayName="AspectRatio";const[f,b]=e("AspectRatio",{root:a(a({},r(l)),{},{paddingBottom:"var(--interop-aspect-ratio-padding-bottom)",position:"relative",width:"100%",["& > [".concat(u,"]")]:a(a({},r("div")),{},{position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"})})});export{f as styles}; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@interop-ui/react-aspect-ratio", | ||
"version": "0.0.1-9", | ||
"version": "0.0.1-10", | ||
"license": "MIT", | ||
@@ -21,3 +21,3 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@interop-ui/react-utils": "0.0.1-9", | ||
"@interop-ui/react-utils": "0.0.1-10", | ||
"@interop-ui/utils": "0.0.1-3" | ||
@@ -24,0 +24,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
16822
37
+ Added@interop-ui/react-utils@0.0.1-10(transitive)
- Removed@interop-ui/react-utils@0.0.1-9(transitive)