@react-spectrum/layout
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-641446f65-240905
@@ -1,59 +0,29 @@ | ||
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends")); | ||
var $65aafe8662d00781$exports = require("./Grid.main.js"); | ||
var $a2ef5497697e8437$exports = require("./Flex.main.js"); | ||
var _babelRuntimeHelpersObjectWithoutProperties = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _temp = require("@react-spectrum/utils"); | ||
var filterDOMProps = _temp.filterDOMProps; | ||
var gridStyleProps = _temp.gridStyleProps; | ||
var useDOMRef = _temp.useDOMRef; | ||
var useStyleProps = _temp.useStyleProps; | ||
var flexStyleProps = _temp.flexStyleProps; | ||
var _react2 = require("react"); | ||
var _react = $parcel$interopDefault(_react2); | ||
var forwardRef = _react2.forwardRef; | ||
function $parcel$interopDefault(a) { | ||
return a && a.__esModule ? a.default : a; | ||
function $parcel$export(e, n, v, s) { | ||
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); | ||
} | ||
function $bd62d28075b6b841c88fe57de44bdc3$var$Grid(props, ref) { | ||
var children = props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(props, ["children"]); | ||
$parcel$export(module.exports, "repeat", () => $65aafe8662d00781$exports.repeat); | ||
$parcel$export(module.exports, "minmax", () => $65aafe8662d00781$exports.minmax); | ||
$parcel$export(module.exports, "fitContent", () => $65aafe8662d00781$exports.fitContent); | ||
$parcel$export(module.exports, "Grid", () => $65aafe8662d00781$exports.Grid); | ||
$parcel$export(module.exports, "Flex", () => $a2ef5497697e8437$exports.Flex); | ||
/* | ||
* Copyright 2020 Adobe. All rights reserved. | ||
* This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. You may obtain a copy | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
* OF ANY KIND, either express or implied. See the License for the specific language | ||
* governing permissions and limitations under the License. | ||
*/ /// <reference types="css-module-types" /> | ||
var _useStyleProps = useStyleProps(otherProps, gridStyleProps), | ||
styleProps = _useStyleProps.styleProps; | ||
styleProps.style.display = 'grid'; // inline-grid? | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
} | ||
var Grid = forwardRef($bd62d28075b6b841c88fe57de44bdc3$var$Grid); | ||
exports.Grid = Grid; | ||
function $ead627e26ff771b74d9888896ccfad$var$Flex(props, ref) { | ||
var children = props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(props, ["children"]); | ||
var _useStyleProps = useStyleProps(otherProps, flexStyleProps), | ||
styleProps = _useStyleProps.styleProps; | ||
styleProps.style.display = 'flex'; // inline-flex? | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
} | ||
var Flex = forwardRef($ead627e26ff771b74d9888896ccfad$var$Flex); | ||
exports.Flex = Flex; | ||
//# sourceMappingURL=main.js.map |
@@ -1,44 +0,20 @@ | ||
import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends"; | ||
import _babelRuntimeHelpersEsmObjectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
import { filterDOMProps, gridStyleProps, useDOMRef, useStyleProps, flexStyleProps } from "@react-spectrum/utils"; | ||
import _react, { forwardRef } from "react"; | ||
import {fitContent as $994c48bfb00b620b$export$2f0b47b0911ce698, Grid as $994c48bfb00b620b$export$ef2184bd89960b14, minmax as $994c48bfb00b620b$export$9c1b655deaca4988, repeat as $994c48bfb00b620b$export$76d90c956114f2c2} from "./Grid.module.js"; | ||
import {Flex as $884c64d19340d345$export$f51f4c4ede09e011} from "./Flex.module.js"; | ||
function $d99f94699068126d2406add01649cb90$var$Grid(props, ref) { | ||
let { | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["children"]); | ||
/* | ||
* Copyright 2020 Adobe. All rights reserved. | ||
* This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. You may obtain a copy | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
* OF ANY KIND, either express or implied. See the License for the specific language | ||
* governing permissions and limitations under the License. | ||
*/ /// <reference types="css-module-types" /> | ||
let { | ||
styleProps | ||
} = useStyleProps(otherProps, gridStyleProps); | ||
styleProps.style.display = 'grid'; // inline-grid? | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
} | ||
export const Grid = forwardRef($d99f94699068126d2406add01649cb90$var$Grid); | ||
function $d35d5a99ecac3fe7880f5be28ee4e7$var$Flex(props, ref) { | ||
let { | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["children"]); | ||
let { | ||
styleProps | ||
} = useStyleProps(otherProps, flexStyleProps); | ||
styleProps.style.display = 'flex'; // inline-flex? | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
} | ||
export const Flex = forwardRef($d35d5a99ecac3fe7880f5be28ee4e7$var$Flex); | ||
export {$994c48bfb00b620b$export$76d90c956114f2c2 as repeat, $994c48bfb00b620b$export$9c1b655deaca4988 as minmax, $994c48bfb00b620b$export$2f0b47b0911ce698 as fitContent, $994c48bfb00b620b$export$ef2184bd89960b14 as Grid, $884c64d19340d345$export$f51f4c4ede09e011 as Flex}; | ||
//# sourceMappingURL=module.js.map |
@@ -0,5 +1,37 @@ | ||
import { DimensionValue, DOMRefValue } from "@react-types/shared"; | ||
import { GridProps, FlexProps } from "@react-types/layout"; | ||
export const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>; | ||
export const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>; | ||
import React from "react"; | ||
/** | ||
* Can be used to make a repeating fragment of the columns or rows list. | ||
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/repeat). | ||
* @param count - The number of times to repeat the fragment. | ||
* @param repeat - The fragment to repeat. | ||
*/ | ||
export function repeat(count: number | 'auto-fill' | 'auto-fit', repeat: DimensionValue | DimensionValue[]): string; | ||
/** | ||
* Defines a size range greater than or equal to min and less than or equal to max. | ||
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/minmax). | ||
* @param min - The minimum size. | ||
* @param max - The maximum size. | ||
*/ | ||
export function minmax(min: DimensionValue, max: DimensionValue): string; | ||
/** | ||
* Clamps a given size to an available size. | ||
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content). | ||
* @param dimension - The size to clamp. | ||
*/ | ||
export function fitContent(dimension: DimensionValue): string; | ||
/** | ||
* A layout container using CSS grid. Supports Spectrum dimensions as values to | ||
* ensure consistent and adaptive sizing and spacing. | ||
*/ | ||
export const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>; | ||
/** | ||
* A layout container using flexbox. Provides Spectrum dimension values, and supports the gap | ||
* property to define consistent spacing between items. | ||
*/ | ||
export const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>; | ||
export type { DimensionValue } from '@react-types/shared'; | ||
export type { FlexProps, GridProps } from '@react-types/layout'; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-spectrum/layout", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-nightly-641446f65-240905", | ||
"description": "Spectrum UI components in React", | ||
@@ -8,8 +8,16 @@ "license": "Apache-2.0", | ||
"module": "dist/module.js", | ||
"exports": { | ||
"types": "./dist/types.d.ts", | ||
"import": "./dist/import.mjs", | ||
"require": "./dist/main.js" | ||
}, | ||
"types": "dist/types.d.ts", | ||
"source": "src/index.ts", | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"src" | ||
], | ||
"sideEffects": false, | ||
"sideEffects": [ | ||
"*.css" | ||
], | ||
"targets": { | ||
@@ -29,17 +37,17 @@ "main": { | ||
"type": "git", | ||
"url": "https://github.com/adobe-private/react-spectrum-v3" | ||
"url": "https://github.com/adobe/react-spectrum" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/utils": "^3.0.0-rc.2", | ||
"@react-spectrum/utils": "^3.0.0-rc.2", | ||
"@react-types/layout": "^3.0.0-alpha.1", | ||
"classnames": "^2.2.6" | ||
"@react-aria/utils": "^3.0.0-nightly-641446f65-240905", | ||
"@react-spectrum/utils": "^3.0.0-nightly-641446f65-240905", | ||
"@react-types/layout": "^3.0.0-nightly-641446f65-240905", | ||
"@react-types/shared": "^3.0.0-nightly-641446f65-240905", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"devDependencies": { | ||
"@adobe/spectrum-css-temp": "^3.0.0-alpha.1" | ||
"@adobe/spectrum-css-temp": "3.0.0-alpha.1" | ||
}, | ||
"peerDependencies": { | ||
"@react-spectrum/provider": "^3.0.0-rc.1", | ||
"react": "^16.8.0" | ||
"@react-spectrum/provider": "^3.0.0-nightly-641446f65-240905", | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
}, | ||
@@ -49,3 +57,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
} | ||
"stableVersion": "3.6.8" | ||
} |
# @react-spectrum/layout | ||
This package is part of [react-spectrum](https://github.com/adobe-private/react-spectrum-v3). See the repo for more details. | ||
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 6 instances 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
75175
17502
30
966
6
60
1
237
+ Added@swc/helpers@^0.5.0
- Removed@babel/runtime@^7.6.2
- Removedclassnames@^2.2.6
- Removed@babel/runtime@7.26.0(transitive)
- Removedclassnames@2.5.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updated@react-spectrum/utils@^3.0.0-nightly-641446f65-240905