@radix-ui/react-aspect-ratio 0.1.5-rc.40 → 0.1.5-rc.41
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/index.d.ts.map +1 -1
- package/dist/index.js +4 -22
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +0 -7
- package/dist/index.module.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAYA,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,iCAA2B,SAAQ,iBAAiB;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,OAAA,MAAM,oGA8BL,CAAC;AAMF,OAAA,MAAM,6FAAkB,CAAC","sources":["packages/react/aspect-ratio/src/packages/react/aspect-ratio/src/AspectRatio.tsx","packages/react/aspect-ratio/src/packages/react/aspect-ratio/src/index.ts","packages/react/aspect-ratio/src/index.ts"],"sourcesContent":[null,null,"export
|
|
1
|
+
{"mappings":";;;AAYA,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,iCAA2B,SAAQ,iBAAiB;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,OAAA,MAAM,oGA8BL,CAAC;AAMF,OAAA,MAAM,6FAAkB,CAAC","sources":["packages/react/aspect-ratio/src/packages/react/aspect-ratio/src/AspectRatio.tsx","packages/react/aspect-ratio/src/packages/react/aspect-ratio/src/index.ts","packages/react/aspect-ratio/src/index.ts"],"sourcesContent":[null,null,"export {\n AspectRatio,\n //\n Root,\n} from './AspectRatio';\nexport type { AspectRatioProps } from './AspectRatio';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js
CHANGED
|
@@ -2,32 +2,15 @@ var $frJTO$babelruntimehelpersextends = require("@babel/runtime/helpers/extends"
|
|
|
2
2
|
var $frJTO$react = require("react");
|
|
3
3
|
var $frJTO$radixuireactprimitive = require("@radix-ui/react-primitive");
|
|
4
4
|
|
|
5
|
-
function $parcel$
|
|
6
|
-
Object.
|
|
7
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(dest, key, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function get() {
|
|
14
|
-
return source[key];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
return dest;
|
|
5
|
+
function $parcel$export(e, n, v, s) {
|
|
6
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
20
7
|
}
|
|
21
8
|
function $parcel$interopDefault(a) {
|
|
22
9
|
return a && a.__esModule ? a.default : a;
|
|
23
10
|
}
|
|
24
|
-
function $parcel$export(e, n, v, s) {
|
|
25
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
26
|
-
}
|
|
27
|
-
var $f950105f8166e93b$exports = {};
|
|
28
11
|
|
|
29
|
-
$parcel$export(
|
|
30
|
-
$parcel$export(
|
|
12
|
+
$parcel$export(module.exports, "AspectRatio", () => $f950105f8166e93b$export$e840e8869344ca38);
|
|
13
|
+
$parcel$export(module.exports, "Root", () => $f950105f8166e93b$export$be92b6f5f03c0fe9);
|
|
31
14
|
|
|
32
15
|
|
|
33
16
|
|
|
@@ -64,7 +47,6 @@ const $f950105f8166e93b$export$e840e8869344ca38 = /*#__PURE__*/ $frJTO$react.for
|
|
|
64
47
|
/* -----------------------------------------------------------------------------------------------*/ const $f950105f8166e93b$export$be92b6f5f03c0fe9 = $f950105f8166e93b$export$e840e8869344ca38;
|
|
65
48
|
|
|
66
49
|
|
|
67
|
-
$parcel$exportWildcard(module.exports, $f950105f8166e93b$exports);
|
|
68
50
|
|
|
69
51
|
|
|
70
52
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;A;;;ACKA;;oGAEA,CAEA,MAAMI,0BAAI,GAAG,aAAb,AAAA;AAQA,MAAMJ,yCAAW,GAAA,aAAGE,CAAAA,uBAAA,CAClB,CAACI,KAAD,EAAQC,YAAR,GAAyB;IACvB,MAAM,SAAEC,KAAK,GAAG,CAAV,G,OAAiBC,KAAjB,CAAA,EAAwB,GAAGC,gBAAH,EAAxB,GAAgDJ,KAAtD,AAAM;IACN,OAAA,aACE,CAAA,0BADF,CAAA,KAAA,EAAA;QAEI,KAAK,EAAE;YACL,qCAAA;YACAK,QAAQ,EAAE,UAFL;YAGL,2CAAA;YACAC,KAAK,EAAE,MAJF;YAKLC,aAAa,EAAG,CAAA,EAAE,GAAA,GAAML,KAAM,CAA9BK,CAAAA,CAAAA;SANJ;QAQE,iCAAA,EAAgC,EAAhC;KARF,EAAA,aAUE,CAAA,0BAAA,CAAC,sCAAD,CAAW,GAAX,EAAA,2DAAA,CAAA,EAAA,EACMH,gBADN,EAVF;QAYI,GAAG,EAAEH,YAFP;QAGE,KAAK,EAAE;YACL,GAAGE,KADE;YAEL,mCAAA;YACAE,QAAQ,EAAE,UAHL;YAILG,GAAG,EAAE,CAJA;YAKLC,KAAK,EAAE,CALF;YAMLC,MAAM,EAAE,CANH;YAOLC,IAAI,EAAE,CAANA;SAPK;KAHT,CAAA,CAVF,CADF,CAWI;CAdY,CAApB,AA6BG;AAGH,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMhB,yCAAI,GAAGD,yCAAb,AAAA;;ADrDA","sources":["packages/react/aspect-ratio/src/index.ts","packages/react/aspect-ratio/src/AspectRatio.tsx"],"sourcesContent":["export {\n AspectRatio,\n //\n Root,\n} from './AspectRatio';\nexport type { AspectRatioProps } from './AspectRatio';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef<AspectRatioElement, AspectRatioProps>(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n <div\n style={{\n // ensures inner element is contained\n position: 'relative',\n // ensures padding bottom trick maths works\n width: '100%',\n paddingBottom: `${100 / ratio}%`,\n }}\n data-radix-aspect-ratio-wrapper=\"\"\n >\n <Primitive.div\n {...aspectRatioProps}\n ref={forwardedRef}\n style={{\n ...style,\n // ensures children expand in ratio\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n }}\n />\n </div>\n );\n }\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"],"names":["AspectRatio","Root","React","Primitive","NAME","forwardRef","props","forwardedRef","ratio","style","aspectRatioProps","position","width","paddingBottom","top","right","bottom","left"],"version":3,"file":"index.js.map"}
|
package/dist/index.module.js
CHANGED
|
@@ -2,13 +2,6 @@ import $8D4cD$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/ext
|
|
|
2
2
|
import {forwardRef as $8D4cD$forwardRef, createElement as $8D4cD$createElement} from "react";
|
|
3
3
|
import {Primitive as $8D4cD$Primitive} from "@radix-ui/react-primitive";
|
|
4
4
|
|
|
5
|
-
function $parcel$export(e, n, v, s) {
|
|
6
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
|
-
}
|
|
8
|
-
var $c1b5f66aac50e106$exports = {};
|
|
9
|
-
|
|
10
|
-
$parcel$export($c1b5f66aac50e106$exports, "AspectRatio", () => $c1b5f66aac50e106$export$e840e8869344ca38);
|
|
11
|
-
$parcel$export($c1b5f66aac50e106$exports, "Root", () => $c1b5f66aac50e106$export$be92b6f5f03c0fe9);
|
|
12
5
|
|
|
13
6
|
|
|
14
7
|
|
package/dist/index.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;A;;;ACKA;;oGAEA,CAEA,MAAMI,0BAAI,GAAG,aAAb,AAAA;AAQA,MAAMJ,yCAAW,GAAA,aAAGE,CAAAA,iBAAA,CAClB,CAACI,KAAD,EAAQC,YAAR,GAAyB;IACvB,MAAM,SAAEC,KAAK,GAAG,CAAV,G,OAAiBC,KAAjB,CAAA,EAAwB,GAAGC,gBAAH,EAAxB,GAAgDJ,KAAtD,AAAM;IACN,OAAA,aACE,CAAA,oBADF,CAAA,KAAA,EAAA;QAEI,KAAK,EAAE;YACL,qCAAA;YACAK,QAAQ,EAAE,UAFL;YAGL,2CAAA;YACAC,KAAK,EAAE,MAJF;YAKLC,aAAa,EAAG,CAAA,EAAE,GAAA,GAAML,KAAM,CAA9BK,CAAAA,CAAAA;SANJ;QAQE,iCAAA,EAAgC,EAAhC;KARF,EAAA,aAUE,CAAA,oBAAA,CAAC,gBAAD,CAAW,GAAX,EAAA,oCAAA,CAAA,EAAA,EACMH,gBADN,EAVF;QAYI,GAAG,EAAEH,YAFP;QAGE,KAAK,EAAE;YACL,GAAGE,KADE;YAEL,mCAAA;YACAE,QAAQ,EAAE,UAHL;YAILG,GAAG,EAAE,CAJA;YAKLC,KAAK,EAAE,CALF;YAMLC,MAAM,EAAE,CANH;YAOLC,IAAI,EAAE,CAANA;SAPK;KAHT,CAAA,CAVF,CADF,CAWI;CAdY,CAApB,AA6BG;AAGH,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,0BAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMhB,yCAAI,GAAGD,yCAAb,AAAA;;ADrDA","sources":["packages/react/aspect-ratio/src/index.ts","packages/react/aspect-ratio/src/AspectRatio.tsx"],"sourcesContent":["export {\n AspectRatio,\n //\n Root,\n} from './AspectRatio';\nexport type { AspectRatioProps } from './AspectRatio';\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef<AspectRatioElement, AspectRatioProps>(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n <div\n style={{\n // ensures inner element is contained\n position: 'relative',\n // ensures padding bottom trick maths works\n width: '100%',\n paddingBottom: `${100 / ratio}%`,\n }}\n data-radix-aspect-ratio-wrapper=\"\"\n >\n <Primitive.div\n {...aspectRatioProps}\n ref={forwardedRef}\n style={{\n ...style,\n // ensures children expand in ratio\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n }}\n />\n </div>\n );\n }\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"],"names":["AspectRatio","Root","React","Primitive","NAME","forwardRef","props","forwardedRef","ratio","style","aspectRatioProps","position","width","paddingBottom","top","right","bottom","left"],"version":3,"file":"index.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-aspect-ratio",
|
|
3
|
-
"version": "0.1.5-rc.
|
|
3
|
+
"version": "0.1.5-rc.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/runtime": "^7.13.10",
|
|
20
|
-
"@radix-ui/react-primitive": "0.1.5-rc.
|
|
20
|
+
"@radix-ui/react-primitive": "0.1.5-rc.41"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^16.8 || ^17.0 || ^18.0",
|