main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

13
node_modules/@radix-ui/react-aspect-ratio/README.md generated vendored Normal file
View File

@@ -0,0 +1,13 @@
# `react-aspect-ratio`
## Installation
```sh
$ yarn add @radix-ui/react-aspect-ratio
# or
$ npm install @radix-ui/react-aspect-ratio
```
## Usage
View docs [here](https://radix-ui.com/primitives/docs/utilities/aspect-ratio).

View File

@@ -0,0 +1,11 @@
import * as React from 'react';
import { Primitive } from '@radix-ui/react-primitive';
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
interface AspectRatioProps extends PrimitiveDivProps {
ratio?: number;
}
declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
declare const Root: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
export { AspectRatio, type AspectRatioProps, Root };

View File

@@ -0,0 +1,11 @@
import * as React from 'react';
import { Primitive } from '@radix-ui/react-primitive';
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
interface AspectRatioProps extends PrimitiveDivProps {
ratio?: number;
}
declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
declare const Root: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
export { AspectRatio, type AspectRatioProps, Root };

View File

@@ -0,0 +1,79 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// packages/react/aspect-ratio/src/index.ts
var src_exports = {};
__export(src_exports, {
AspectRatio: () => AspectRatio,
Root: () => Root
});
module.exports = __toCommonJS(src_exports);
// packages/react/aspect-ratio/src/AspectRatio.tsx
var React = __toESM(require("react"));
var import_react_primitive = require("@radix-ui/react-primitive");
var import_jsx_runtime = require("react/jsx-runtime");
var NAME = "AspectRatio";
var AspectRatio = React.forwardRef(
(props, forwardedRef) => {
const { ratio = 1 / 1, style, ...aspectRatioProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"div",
{
style: {
// ensures inner element is contained
position: "relative",
// ensures padding bottom trick maths works
width: "100%",
paddingBottom: `${100 / ratio}%`
},
"data-radix-aspect-ratio-wrapper": "",
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_primitive.Primitive.div,
{
...aspectRatioProps,
ref: forwardedRef,
style: {
...style,
// ensures children expand in ratio
position: "absolute",
top: 0,
right: 0,
bottom: 0,
left: 0
}
}
)
}
);
}
);
AspectRatio.displayName = NAME;
var Root = AspectRatio;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../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\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.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"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,iCAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;",
"names": []
}

View File

@@ -0,0 +1,46 @@
// packages/react/aspect-ratio/src/AspectRatio.tsx
import * as React from "react";
import { Primitive } from "@radix-ui/react-primitive";
import { jsx } from "react/jsx-runtime";
var NAME = "AspectRatio";
var AspectRatio = React.forwardRef(
(props, forwardedRef) => {
const { ratio = 1 / 1, style, ...aspectRatioProps } = props;
return /* @__PURE__ */ jsx(
"div",
{
style: {
// ensures inner element is contained
position: "relative",
// ensures padding bottom trick maths works
width: "100%",
paddingBottom: `${100 / ratio}%`
},
"data-radix-aspect-ratio-wrapper": "",
children: /* @__PURE__ */ jsx(
Primitive.div,
{
...aspectRatioProps,
ref: forwardedRef,
style: {
...style,
// ensures children expand in ratio
position: "absolute",
top: 0,
right: 0,
bottom: 0,
left: 0
}
}
)
}
);
}
);
AspectRatio.displayName = NAME;
var Root = AspectRatio;
export {
AspectRatio,
Root
};
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/AspectRatio.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.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"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,UAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;",
"names": []
}

55
node_modules/@radix-ui/react-aspect-ratio/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "@radix-ui/react-aspect-ratio",
"version": "1.1.0",
"license": "MIT",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"clean": "rm -rf dist",
"version": "yarn version"
},
"dependencies": {
"@radix-ui/react-primitive": "2.0.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"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"
}
}