New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-spectrum/layout

Package Overview
Dependencies
Maintainers
2
Versions
878
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-spectrum/layout - npm Package Compare versions

Comparing version 3.2.3 to 3.2.4-nightly.3113

182

dist/main.js
require("./main.css");
var $jzyg4$reactspectrumutils = require("@react-spectrum/utils");
var $jzyg4$reactariautils = require("@react-aria/utils");
var $jzyg4$react = require("react");
var $jzyg4$reactariassr = require("@react-aria/ssr");
var $aBO7d$reactspectrumutils = require("@react-spectrum/utils");
var $aBO7d$reactariautils = require("@react-aria/utils");
var $aBO7d$react = require("react");
var $aBO7d$reactariassr = require("@react-aria/ssr");

@@ -29,73 +29,73 @@ function $parcel$exportWildcard(dest, source) {

}
var $0450960891042a15$exports = {};
var $65aafe8662d00781$exports = {};
$parcel$export($0450960891042a15$exports, "repeat", () => $0450960891042a15$export$76d90c956114f2c2);
$parcel$export($0450960891042a15$exports, "minmax", () => $0450960891042a15$export$9c1b655deaca4988);
$parcel$export($0450960891042a15$exports, "fitContent", () => $0450960891042a15$export$2f0b47b0911ce698);
$parcel$export($0450960891042a15$exports, "Grid", () => $0450960891042a15$export$ef2184bd89960b14);
$parcel$export($65aafe8662d00781$exports, "repeat", () => $65aafe8662d00781$export$76d90c956114f2c2);
$parcel$export($65aafe8662d00781$exports, "minmax", () => $65aafe8662d00781$export$9c1b655deaca4988);
$parcel$export($65aafe8662d00781$exports, "fitContent", () => $65aafe8662d00781$export$2f0b47b0911ce698);
$parcel$export($65aafe8662d00781$exports, "Grid", () => $65aafe8662d00781$export$ef2184bd89960b14);
const $0450960891042a15$var$gridStyleProps = {
...$jzyg4$reactspectrumutils.baseStyleProps,
const $65aafe8662d00781$var$gridStyleProps = {
...$aBO7d$reactspectrumutils.baseStyleProps,
autoFlow: [
'gridAutoFlow',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
],
autoColumns: [
'gridAutoColumns',
$0450960891042a15$var$gridDimensionValue
$65aafe8662d00781$var$gridDimensionValue
],
autoRows: [
'gridAutoRows',
$0450960891042a15$var$gridDimensionValue
$65aafe8662d00781$var$gridDimensionValue
],
areas: [
'gridTemplateAreas',
$0450960891042a15$var$gridTemplateAreasValue
$65aafe8662d00781$var$gridTemplateAreasValue
],
columns: [
'gridTemplateColumns',
$0450960891042a15$var$gridTemplateValue
$65aafe8662d00781$var$gridTemplateValue
],
rows: [
'gridTemplateRows',
$0450960891042a15$var$gridTemplateValue
$65aafe8662d00781$var$gridTemplateValue
],
gap: [
'gap',
$jzyg4$reactspectrumutils.dimensionValue
$aBO7d$reactspectrumutils.dimensionValue
],
rowGap: [
'rowGap',
$jzyg4$reactspectrumutils.dimensionValue
$aBO7d$reactspectrumutils.dimensionValue
],
columnGap: [
'columnGap',
$jzyg4$reactspectrumutils.dimensionValue
$aBO7d$reactspectrumutils.dimensionValue
],
justifyItems: [
'justifyItems',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
],
justifyContent: [
'justifyContent',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
],
alignItems: [
'alignItems',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
],
alignContent: [
'alignContent',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
]
};
function $0450960891042a15$var$Grid(props, ref) {
function $65aafe8662d00781$var$Grid(props, ref) {
let { children: children , ...otherProps } = props;
let { styleProps: styleProps } = $jzyg4$reactspectrumutils.useStyleProps(otherProps, $0450960891042a15$var$gridStyleProps);
let { styleProps: styleProps } = $aBO7d$reactspectrumutils.useStyleProps(otherProps, $65aafe8662d00781$var$gridStyleProps);
styleProps.style.display = 'grid'; // inline-grid?
let domRef = $jzyg4$reactspectrumutils.useDOMRef(ref);
return(/*#__PURE__*/ ($parcel$interopDefault($jzyg4$react)).createElement("div", {
...$jzyg4$reactariautils.filterDOMProps(otherProps),
let domRef = $aBO7d$reactspectrumutils.useDOMRef(ref);
return(/*#__PURE__*/ ($parcel$interopDefault($aBO7d$react)).createElement("div", {
...$aBO7d$reactariautils.filterDOMProps(otherProps),
...styleProps,

@@ -105,22 +105,22 @@ ref: domRef

}
function $0450960891042a15$export$76d90c956114f2c2(count, $0450960891042a15$export$76d90c956114f2c2) {
return `repeat(${count}, ${$0450960891042a15$var$gridTemplateValue($0450960891042a15$export$76d90c956114f2c2)})`;
function $65aafe8662d00781$export$76d90c956114f2c2(count, $65aafe8662d00781$export$76d90c956114f2c2) {
return `repeat(${count}, ${$65aafe8662d00781$var$gridTemplateValue($65aafe8662d00781$export$76d90c956114f2c2)})`;
}
function $0450960891042a15$export$9c1b655deaca4988(min, max) {
return `minmax(${$0450960891042a15$var$gridDimensionValue(min)}, ${$0450960891042a15$var$gridDimensionValue(max)})`;
function $65aafe8662d00781$export$9c1b655deaca4988(min, max) {
return `minmax(${$65aafe8662d00781$var$gridDimensionValue(min)}, ${$65aafe8662d00781$var$gridDimensionValue(max)})`;
}
function $0450960891042a15$export$2f0b47b0911ce698(dimension) {
return `fit-content(${$0450960891042a15$var$gridDimensionValue(dimension)})`;
function $65aafe8662d00781$export$2f0b47b0911ce698(dimension) {
return `fit-content(${$65aafe8662d00781$var$gridDimensionValue(dimension)})`;
}
function $0450960891042a15$var$gridTemplateAreasValue(value) {
function $65aafe8662d00781$var$gridTemplateAreasValue(value) {
return value.map((v)=>`"${v}"`
).join('\n');
}
function $0450960891042a15$var$gridDimensionValue(value) {
function $65aafe8662d00781$var$gridDimensionValue(value) {
if (/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(value)) return value;
return $jzyg4$reactspectrumutils.dimensionValue(value);
return $aBO7d$reactspectrumutils.dimensionValue(value);
}
function $0450960891042a15$var$gridTemplateValue(value) {
if (Array.isArray(value)) return value.map($0450960891042a15$var$gridDimensionValue).join(' ');
return $0450960891042a15$var$gridDimensionValue(value);
function $65aafe8662d00781$var$gridTemplateValue(value) {
if (Array.isArray(value)) return value.map($65aafe8662d00781$var$gridDimensionValue).join(' ');
return $65aafe8662d00781$var$gridDimensionValue(value);
}

@@ -130,57 +130,57 @@ /**

* ensure consistent and adaptive sizing and spacing.
*/ const $0450960891042a15$export$ef2184bd89960b14 = /*#__PURE__*/ $jzyg4$react.forwardRef($0450960891042a15$var$Grid);
*/ const $65aafe8662d00781$export$ef2184bd89960b14 = /*#__PURE__*/ $aBO7d$react.forwardRef($65aafe8662d00781$var$Grid);
var $3ae3a86b899a71dc$exports = {};
var $a2ef5497697e8437$exports = {};
$parcel$export($3ae3a86b899a71dc$exports, "Flex", () => $3ae3a86b899a71dc$export$f51f4c4ede09e011);
$parcel$export($a2ef5497697e8437$exports, "Flex", () => $a2ef5497697e8437$export$f51f4c4ede09e011);
var $55d404924f6e8155$exports = {};
var $12be0ef8be5abc46$exports = {};
$parcel$export($55d404924f6e8155$exports, "flex-container", () => $55d404924f6e8155$export$69d7a39fa31a000b, (v) => $55d404924f6e8155$export$69d7a39fa31a000b = v);
$parcel$export($55d404924f6e8155$exports, "flex", () => $55d404924f6e8155$export$97691fbb80847c19, (v) => $55d404924f6e8155$export$97691fbb80847c19 = v);
$parcel$export($55d404924f6e8155$exports, "flex-gap", () => $55d404924f6e8155$export$31a9da8b58047a44, (v) => $55d404924f6e8155$export$31a9da8b58047a44 = v);
var $55d404924f6e8155$export$69d7a39fa31a000b;
var $55d404924f6e8155$export$97691fbb80847c19;
var $55d404924f6e8155$export$31a9da8b58047a44;
$55d404924f6e8155$export$69d7a39fa31a000b = "flex-container_e15493";
$55d404924f6e8155$export$97691fbb80847c19 = "flex_e15493";
$55d404924f6e8155$export$31a9da8b58047a44 = "flex-gap_e15493";
$parcel$export($12be0ef8be5abc46$exports, "flex-container", () => $12be0ef8be5abc46$export$69d7a39fa31a000b, (v) => $12be0ef8be5abc46$export$69d7a39fa31a000b = v);
$parcel$export($12be0ef8be5abc46$exports, "flex", () => $12be0ef8be5abc46$export$97691fbb80847c19, (v) => $12be0ef8be5abc46$export$97691fbb80847c19 = v);
$parcel$export($12be0ef8be5abc46$exports, "flex-gap", () => $12be0ef8be5abc46$export$31a9da8b58047a44, (v) => $12be0ef8be5abc46$export$31a9da8b58047a44 = v);
var $12be0ef8be5abc46$export$69d7a39fa31a000b;
var $12be0ef8be5abc46$export$97691fbb80847c19;
var $12be0ef8be5abc46$export$31a9da8b58047a44;
$12be0ef8be5abc46$export$69d7a39fa31a000b = "flex-container_e15493";
$12be0ef8be5abc46$export$97691fbb80847c19 = "flex_e15493";
$12be0ef8be5abc46$export$31a9da8b58047a44 = "flex-gap_e15493";
const $3ae3a86b899a71dc$var$flexStyleProps = {
const $a2ef5497697e8437$var$flexStyleProps = {
direction: [
'flexDirection',
$jzyg4$reactspectrumutils.passthroughStyle
$aBO7d$reactspectrumutils.passthroughStyle
],
wrap: [
'flexWrap',
$3ae3a86b899a71dc$var$flexWrapValue
$a2ef5497697e8437$var$flexWrapValue
],
justifyContent: [
'justifyContent',
$3ae3a86b899a71dc$var$flexAlignValue
$a2ef5497697e8437$var$flexAlignValue
],
alignItems: [
'alignItems',
$3ae3a86b899a71dc$var$flexAlignValue
$a2ef5497697e8437$var$flexAlignValue
],
alignContent: [
'alignContent',
$3ae3a86b899a71dc$var$flexAlignValue
$a2ef5497697e8437$var$flexAlignValue
]
};
function $3ae3a86b899a71dc$var$Flex(props, ref) {
function $a2ef5497697e8437$var$Flex(props, ref) {
let { children: children , ...otherProps } = props;
let breakpointProvider = $jzyg4$reactspectrumutils.useBreakpoint();
let breakpointProvider = $aBO7d$reactspectrumutils.useBreakpoint();
let matchedBreakpoints = (breakpointProvider === null || breakpointProvider === void 0 ? void 0 : breakpointProvider.matchedBreakpoints) || [
'base'
];
let { styleProps: styleProps } = $jzyg4$reactspectrumutils.useStyleProps(otherProps);
let { styleProps: flexStyle } = $jzyg4$reactspectrumutils.useStyleProps(otherProps, $3ae3a86b899a71dc$var$flexStyleProps);
let domRef = $jzyg4$reactspectrumutils.useDOMRef(ref);
let isSSR = $jzyg4$reactariassr.useIsSSR();
let { styleProps: styleProps } = $aBO7d$reactspectrumutils.useStyleProps(otherProps);
let { styleProps: flexStyle } = $aBO7d$reactspectrumutils.useStyleProps(otherProps, $a2ef5497697e8437$var$flexStyleProps);
let domRef = $aBO7d$reactspectrumutils.useDOMRef(ref);
let isSSR = $aBO7d$reactariassr.useIsSSR();
// If a gap property is specified, and there is no native support or we're in SSR, use a shim.

@@ -192,16 +192,16 @@ // Two divs are required for this: the outer one contains most style properties, and the inner

// override the outer one.
if ((props.gap || props.rowGap || props.columnGap) && (isSSR || !$3ae3a86b899a71dc$var$isFlexGapSupported())) {
if ((props.gap || props.rowGap || props.columnGap) && (isSSR || !$a2ef5497697e8437$var$isFlexGapSupported())) {
let style = {
...flexStyle.style,
'--column-gap': props.columnGap != null ? $jzyg4$reactspectrumutils.responsiveDimensionValue(props.columnGap, matchedBreakpoints) : undefined,
'--row-gap': props.rowGap != null ? $jzyg4$reactspectrumutils.responsiveDimensionValue(props.rowGap, matchedBreakpoints) : undefined,
'--gap': props.gap != null ? $jzyg4$reactspectrumutils.responsiveDimensionValue(props.gap, matchedBreakpoints) : undefined
'--column-gap': props.columnGap != null ? $aBO7d$reactspectrumutils.responsiveDimensionValue(props.columnGap, matchedBreakpoints) : undefined,
'--row-gap': props.rowGap != null ? $aBO7d$reactspectrumutils.responsiveDimensionValue(props.rowGap, matchedBreakpoints) : undefined,
'--gap': props.gap != null ? $aBO7d$reactspectrumutils.responsiveDimensionValue(props.gap, matchedBreakpoints) : undefined
};
return(/*#__PURE__*/ ($parcel$interopDefault($jzyg4$react)).createElement("div", {
...$jzyg4$reactariautils.filterDOMProps(otherProps),
return(/*#__PURE__*/ ($parcel$interopDefault($aBO7d$react)).createElement("div", {
...$aBO7d$reactariautils.filterDOMProps(otherProps),
...styleProps,
className: $jzyg4$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($55d404924f6e8155$exports)), 'flex-container', styleProps.className),
className: $aBO7d$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($12be0ef8be5abc46$exports)), 'flex-container', styleProps.className),
ref: domRef
}, /*#__PURE__*/ ($parcel$interopDefault($jzyg4$react)).createElement("div", {
className: $jzyg4$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($55d404924f6e8155$exports)), 'flex', 'flex-gap'),
}, /*#__PURE__*/ ($parcel$interopDefault($aBO7d$react)).createElement("div", {
className: $aBO7d$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($12be0ef8be5abc46$exports)), 'flex', 'flex-gap'),
style: style

@@ -215,8 +215,8 @@ }, children)));

};
if (props.gap != null) style.gap = $jzyg4$reactspectrumutils.responsiveDimensionValue(props.gap, matchedBreakpoints);
if (props.columnGap != null) style.columnGap = $jzyg4$reactspectrumutils.responsiveDimensionValue(props.columnGap, matchedBreakpoints);
if (props.rowGap != null) style.rowGap = $jzyg4$reactspectrumutils.responsiveDimensionValue(props.rowGap, matchedBreakpoints);
return(/*#__PURE__*/ ($parcel$interopDefault($jzyg4$react)).createElement("div", {
...$jzyg4$reactariautils.filterDOMProps(otherProps),
className: $jzyg4$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($55d404924f6e8155$exports)), 'flex', styleProps.className),
if (props.gap != null) style.gap = $aBO7d$reactspectrumutils.responsiveDimensionValue(props.gap, matchedBreakpoints);
if (props.columnGap != null) style.columnGap = $aBO7d$reactspectrumutils.responsiveDimensionValue(props.columnGap, matchedBreakpoints);
if (props.rowGap != null) style.rowGap = $aBO7d$reactspectrumutils.responsiveDimensionValue(props.rowGap, matchedBreakpoints);
return(/*#__PURE__*/ ($parcel$interopDefault($aBO7d$react)).createElement("div", {
...$aBO7d$reactariautils.filterDOMProps(otherProps),
className: $aBO7d$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($12be0ef8be5abc46$exports)), 'flex', styleProps.className),
style: style,

@@ -229,3 +229,3 @@ ref: domRef

* in flex containers for browser compatibility.
*/ function $3ae3a86b899a71dc$var$flexAlignValue(value) {
*/ function $a2ef5497697e8437$var$flexAlignValue(value) {
if (value === 'start') return 'flex-start';

@@ -237,3 +237,3 @@ if (value === 'end') return 'flex-end';

* Takes a boolean and translates it to flex wrap or nowrap.
*/ function $3ae3a86b899a71dc$var$flexWrapValue(value) {
*/ function $a2ef5497697e8437$var$flexWrapValue(value) {
if (typeof value === 'boolean') return value ? 'wrap' : 'nowrap';

@@ -245,5 +245,5 @@ return value;

// See https://github.com/Modernizr/Modernizr/blob/7efb9d0edd66815fb115fdce95fabaf019ce8db5/feature-detects/css/flexgap.js
let $3ae3a86b899a71dc$var$_isFlexGapSupported = null;
function $3ae3a86b899a71dc$var$isFlexGapSupported() {
if ($3ae3a86b899a71dc$var$_isFlexGapSupported != null) return $3ae3a86b899a71dc$var$_isFlexGapSupported;
let $a2ef5497697e8437$var$_isFlexGapSupported = null;
function $a2ef5497697e8437$var$isFlexGapSupported() {
if ($a2ef5497697e8437$var$_isFlexGapSupported != null) return $a2ef5497697e8437$var$_isFlexGapSupported;
if (typeof document === 'undefined') return false;

@@ -260,5 +260,5 @@ // create flex container with row-gap set

document.body.appendChild(flex);
$3ae3a86b899a71dc$var$_isFlexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap
$a2ef5497697e8437$var$_isFlexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap
flex.parentNode.removeChild(flex);
return $3ae3a86b899a71dc$var$_isFlexGapSupported;
return $a2ef5497697e8437$var$_isFlexGapSupported;
}

@@ -268,9 +268,9 @@ /**

* property to define consistent spacing between items.
*/ const $3ae3a86b899a71dc$export$f51f4c4ede09e011 = /*#__PURE__*/ $jzyg4$react.forwardRef($3ae3a86b899a71dc$var$Flex);
*/ const $a2ef5497697e8437$export$f51f4c4ede09e011 = /*#__PURE__*/ $aBO7d$react.forwardRef($a2ef5497697e8437$var$Flex);
$parcel$exportWildcard(module.exports, $0450960891042a15$exports);
$parcel$exportWildcard(module.exports, $3ae3a86b899a71dc$exports);
$parcel$exportWildcard(module.exports, $65aafe8662d00781$exports);
$parcel$exportWildcard(module.exports, $a2ef5497697e8437$exports);
//# sourceMappingURL=main.js.map
import "./main.css";
import {baseStyleProps as $5XBri$baseStyleProps, passthroughStyle as $5XBri$passthroughStyle, dimensionValue as $5XBri$dimensionValue, useStyleProps as $5XBri$useStyleProps, useDOMRef as $5XBri$useDOMRef, useBreakpoint as $5XBri$useBreakpoint, responsiveDimensionValue as $5XBri$responsiveDimensionValue, classNames as $5XBri$classNames} from "@react-spectrum/utils";
import {filterDOMProps as $5XBri$filterDOMProps} from "@react-aria/utils";
import $5XBri$react, {forwardRef as $5XBri$forwardRef} from "react";
import {useIsSSR as $5XBri$useIsSSR} from "@react-aria/ssr";
import {baseStyleProps as $9LQqs$baseStyleProps, passthroughStyle as $9LQqs$passthroughStyle, dimensionValue as $9LQqs$dimensionValue, useStyleProps as $9LQqs$useStyleProps, useDOMRef as $9LQqs$useDOMRef, useBreakpoint as $9LQqs$useBreakpoint, responsiveDimensionValue as $9LQqs$responsiveDimensionValue, classNames as $9LQqs$classNames} from "@react-spectrum/utils";
import {filterDOMProps as $9LQqs$filterDOMProps} from "@react-aria/utils";
import $9LQqs$react, {forwardRef as $9LQqs$forwardRef} from "react";
import {useIsSSR as $9LQqs$useIsSSR} from "@react-aria/ssr";

@@ -13,73 +13,73 @@ function $parcel$export(e, n, v, s) {

}
var $adc7dbc11bf4e86c$exports = {};
var $994c48bfb00b620b$exports = {};
$parcel$export($adc7dbc11bf4e86c$exports, "repeat", () => $adc7dbc11bf4e86c$export$76d90c956114f2c2);
$parcel$export($adc7dbc11bf4e86c$exports, "minmax", () => $adc7dbc11bf4e86c$export$9c1b655deaca4988);
$parcel$export($adc7dbc11bf4e86c$exports, "fitContent", () => $adc7dbc11bf4e86c$export$2f0b47b0911ce698);
$parcel$export($adc7dbc11bf4e86c$exports, "Grid", () => $adc7dbc11bf4e86c$export$ef2184bd89960b14);
$parcel$export($994c48bfb00b620b$exports, "repeat", () => $994c48bfb00b620b$export$76d90c956114f2c2);
$parcel$export($994c48bfb00b620b$exports, "minmax", () => $994c48bfb00b620b$export$9c1b655deaca4988);
$parcel$export($994c48bfb00b620b$exports, "fitContent", () => $994c48bfb00b620b$export$2f0b47b0911ce698);
$parcel$export($994c48bfb00b620b$exports, "Grid", () => $994c48bfb00b620b$export$ef2184bd89960b14);
const $adc7dbc11bf4e86c$var$gridStyleProps = {
...$5XBri$baseStyleProps,
const $994c48bfb00b620b$var$gridStyleProps = {
...$9LQqs$baseStyleProps,
autoFlow: [
'gridAutoFlow',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
],
autoColumns: [
'gridAutoColumns',
$adc7dbc11bf4e86c$var$gridDimensionValue
$994c48bfb00b620b$var$gridDimensionValue
],
autoRows: [
'gridAutoRows',
$adc7dbc11bf4e86c$var$gridDimensionValue
$994c48bfb00b620b$var$gridDimensionValue
],
areas: [
'gridTemplateAreas',
$adc7dbc11bf4e86c$var$gridTemplateAreasValue
$994c48bfb00b620b$var$gridTemplateAreasValue
],
columns: [
'gridTemplateColumns',
$adc7dbc11bf4e86c$var$gridTemplateValue
$994c48bfb00b620b$var$gridTemplateValue
],
rows: [
'gridTemplateRows',
$adc7dbc11bf4e86c$var$gridTemplateValue
$994c48bfb00b620b$var$gridTemplateValue
],
gap: [
'gap',
$5XBri$dimensionValue
$9LQqs$dimensionValue
],
rowGap: [
'rowGap',
$5XBri$dimensionValue
$9LQqs$dimensionValue
],
columnGap: [
'columnGap',
$5XBri$dimensionValue
$9LQqs$dimensionValue
],
justifyItems: [
'justifyItems',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
],
justifyContent: [
'justifyContent',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
],
alignItems: [
'alignItems',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
],
alignContent: [
'alignContent',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
]
};
function $adc7dbc11bf4e86c$var$Grid(props, ref) {
function $994c48bfb00b620b$var$Grid(props, ref) {
let { children: children , ...otherProps } = props;
let { styleProps: styleProps } = $5XBri$useStyleProps(otherProps, $adc7dbc11bf4e86c$var$gridStyleProps);
let { styleProps: styleProps } = $9LQqs$useStyleProps(otherProps, $994c48bfb00b620b$var$gridStyleProps);
styleProps.style.display = 'grid'; // inline-grid?
let domRef = $5XBri$useDOMRef(ref);
return(/*#__PURE__*/ $5XBri$react.createElement("div", {
...$5XBri$filterDOMProps(otherProps),
let domRef = $9LQqs$useDOMRef(ref);
return(/*#__PURE__*/ $9LQqs$react.createElement("div", {
...$9LQqs$filterDOMProps(otherProps),
...styleProps,

@@ -89,22 +89,22 @@ ref: domRef

}
function $adc7dbc11bf4e86c$export$76d90c956114f2c2(count, $adc7dbc11bf4e86c$export$76d90c956114f2c2) {
return `repeat(${count}, ${$adc7dbc11bf4e86c$var$gridTemplateValue($adc7dbc11bf4e86c$export$76d90c956114f2c2)})`;
function $994c48bfb00b620b$export$76d90c956114f2c2(count, $994c48bfb00b620b$export$76d90c956114f2c2) {
return `repeat(${count}, ${$994c48bfb00b620b$var$gridTemplateValue($994c48bfb00b620b$export$76d90c956114f2c2)})`;
}
function $adc7dbc11bf4e86c$export$9c1b655deaca4988(min, max) {
return `minmax(${$adc7dbc11bf4e86c$var$gridDimensionValue(min)}, ${$adc7dbc11bf4e86c$var$gridDimensionValue(max)})`;
function $994c48bfb00b620b$export$9c1b655deaca4988(min, max) {
return `minmax(${$994c48bfb00b620b$var$gridDimensionValue(min)}, ${$994c48bfb00b620b$var$gridDimensionValue(max)})`;
}
function $adc7dbc11bf4e86c$export$2f0b47b0911ce698(dimension) {
return `fit-content(${$adc7dbc11bf4e86c$var$gridDimensionValue(dimension)})`;
function $994c48bfb00b620b$export$2f0b47b0911ce698(dimension) {
return `fit-content(${$994c48bfb00b620b$var$gridDimensionValue(dimension)})`;
}
function $adc7dbc11bf4e86c$var$gridTemplateAreasValue(value) {
function $994c48bfb00b620b$var$gridTemplateAreasValue(value) {
return value.map((v)=>`"${v}"`
).join('\n');
}
function $adc7dbc11bf4e86c$var$gridDimensionValue(value) {
function $994c48bfb00b620b$var$gridDimensionValue(value) {
if (/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(value)) return value;
return $5XBri$dimensionValue(value);
return $9LQqs$dimensionValue(value);
}
function $adc7dbc11bf4e86c$var$gridTemplateValue(value) {
if (Array.isArray(value)) return value.map($adc7dbc11bf4e86c$var$gridDimensionValue).join(' ');
return $adc7dbc11bf4e86c$var$gridDimensionValue(value);
function $994c48bfb00b620b$var$gridTemplateValue(value) {
if (Array.isArray(value)) return value.map($994c48bfb00b620b$var$gridDimensionValue).join(' ');
return $994c48bfb00b620b$var$gridDimensionValue(value);
}

@@ -114,57 +114,57 @@ /**

* ensure consistent and adaptive sizing and spacing.
*/ const $adc7dbc11bf4e86c$export$ef2184bd89960b14 = /*#__PURE__*/ $5XBri$forwardRef($adc7dbc11bf4e86c$var$Grid);
*/ const $994c48bfb00b620b$export$ef2184bd89960b14 = /*#__PURE__*/ $9LQqs$forwardRef($994c48bfb00b620b$var$Grid);
var $1b39fab7603c3bcf$exports = {};
var $884c64d19340d345$exports = {};
$parcel$export($1b39fab7603c3bcf$exports, "Flex", () => $1b39fab7603c3bcf$export$f51f4c4ede09e011);
$parcel$export($884c64d19340d345$exports, "Flex", () => $884c64d19340d345$export$f51f4c4ede09e011);
var $fbc4eea22f41fc14$exports = {};
var $01dd1839b5376a46$exports = {};
$parcel$export($fbc4eea22f41fc14$exports, "flex-container", () => $fbc4eea22f41fc14$export$69d7a39fa31a000b, (v) => $fbc4eea22f41fc14$export$69d7a39fa31a000b = v);
$parcel$export($fbc4eea22f41fc14$exports, "flex", () => $fbc4eea22f41fc14$export$97691fbb80847c19, (v) => $fbc4eea22f41fc14$export$97691fbb80847c19 = v);
$parcel$export($fbc4eea22f41fc14$exports, "flex-gap", () => $fbc4eea22f41fc14$export$31a9da8b58047a44, (v) => $fbc4eea22f41fc14$export$31a9da8b58047a44 = v);
var $fbc4eea22f41fc14$export$69d7a39fa31a000b;
var $fbc4eea22f41fc14$export$97691fbb80847c19;
var $fbc4eea22f41fc14$export$31a9da8b58047a44;
$fbc4eea22f41fc14$export$69d7a39fa31a000b = "flex-container_e15493";
$fbc4eea22f41fc14$export$97691fbb80847c19 = "flex_e15493";
$fbc4eea22f41fc14$export$31a9da8b58047a44 = "flex-gap_e15493";
$parcel$export($01dd1839b5376a46$exports, "flex-container", () => $01dd1839b5376a46$export$69d7a39fa31a000b, (v) => $01dd1839b5376a46$export$69d7a39fa31a000b = v);
$parcel$export($01dd1839b5376a46$exports, "flex", () => $01dd1839b5376a46$export$97691fbb80847c19, (v) => $01dd1839b5376a46$export$97691fbb80847c19 = v);
$parcel$export($01dd1839b5376a46$exports, "flex-gap", () => $01dd1839b5376a46$export$31a9da8b58047a44, (v) => $01dd1839b5376a46$export$31a9da8b58047a44 = v);
var $01dd1839b5376a46$export$69d7a39fa31a000b;
var $01dd1839b5376a46$export$97691fbb80847c19;
var $01dd1839b5376a46$export$31a9da8b58047a44;
$01dd1839b5376a46$export$69d7a39fa31a000b = "flex-container_e15493";
$01dd1839b5376a46$export$97691fbb80847c19 = "flex_e15493";
$01dd1839b5376a46$export$31a9da8b58047a44 = "flex-gap_e15493";
const $1b39fab7603c3bcf$var$flexStyleProps = {
const $884c64d19340d345$var$flexStyleProps = {
direction: [
'flexDirection',
$5XBri$passthroughStyle
$9LQqs$passthroughStyle
],
wrap: [
'flexWrap',
$1b39fab7603c3bcf$var$flexWrapValue
$884c64d19340d345$var$flexWrapValue
],
justifyContent: [
'justifyContent',
$1b39fab7603c3bcf$var$flexAlignValue
$884c64d19340d345$var$flexAlignValue
],
alignItems: [
'alignItems',
$1b39fab7603c3bcf$var$flexAlignValue
$884c64d19340d345$var$flexAlignValue
],
alignContent: [
'alignContent',
$1b39fab7603c3bcf$var$flexAlignValue
$884c64d19340d345$var$flexAlignValue
]
};
function $1b39fab7603c3bcf$var$Flex(props, ref) {
function $884c64d19340d345$var$Flex(props, ref) {
let { children: children , ...otherProps } = props;
let breakpointProvider = $5XBri$useBreakpoint();
let breakpointProvider = $9LQqs$useBreakpoint();
let matchedBreakpoints = (breakpointProvider === null || breakpointProvider === void 0 ? void 0 : breakpointProvider.matchedBreakpoints) || [
'base'
];
let { styleProps: styleProps } = $5XBri$useStyleProps(otherProps);
let { styleProps: flexStyle } = $5XBri$useStyleProps(otherProps, $1b39fab7603c3bcf$var$flexStyleProps);
let domRef = $5XBri$useDOMRef(ref);
let isSSR = $5XBri$useIsSSR();
let { styleProps: styleProps } = $9LQqs$useStyleProps(otherProps);
let { styleProps: flexStyle } = $9LQqs$useStyleProps(otherProps, $884c64d19340d345$var$flexStyleProps);
let domRef = $9LQqs$useDOMRef(ref);
let isSSR = $9LQqs$useIsSSR();
// If a gap property is specified, and there is no native support or we're in SSR, use a shim.

@@ -176,16 +176,16 @@ // Two divs are required for this: the outer one contains most style properties, and the inner

// override the outer one.
if ((props.gap || props.rowGap || props.columnGap) && (isSSR || !$1b39fab7603c3bcf$var$isFlexGapSupported())) {
if ((props.gap || props.rowGap || props.columnGap) && (isSSR || !$884c64d19340d345$var$isFlexGapSupported())) {
let style = {
...flexStyle.style,
'--column-gap': props.columnGap != null ? $5XBri$responsiveDimensionValue(props.columnGap, matchedBreakpoints) : undefined,
'--row-gap': props.rowGap != null ? $5XBri$responsiveDimensionValue(props.rowGap, matchedBreakpoints) : undefined,
'--gap': props.gap != null ? $5XBri$responsiveDimensionValue(props.gap, matchedBreakpoints) : undefined
'--column-gap': props.columnGap != null ? $9LQqs$responsiveDimensionValue(props.columnGap, matchedBreakpoints) : undefined,
'--row-gap': props.rowGap != null ? $9LQqs$responsiveDimensionValue(props.rowGap, matchedBreakpoints) : undefined,
'--gap': props.gap != null ? $9LQqs$responsiveDimensionValue(props.gap, matchedBreakpoints) : undefined
};
return(/*#__PURE__*/ $5XBri$react.createElement("div", {
...$5XBri$filterDOMProps(otherProps),
return(/*#__PURE__*/ $9LQqs$react.createElement("div", {
...$9LQqs$filterDOMProps(otherProps),
...styleProps,
className: $5XBri$classNames((/*@__PURE__*/$parcel$interopDefault($fbc4eea22f41fc14$exports)), 'flex-container', styleProps.className),
className: $9LQqs$classNames((/*@__PURE__*/$parcel$interopDefault($01dd1839b5376a46$exports)), 'flex-container', styleProps.className),
ref: domRef
}, /*#__PURE__*/ $5XBri$react.createElement("div", {
className: $5XBri$classNames((/*@__PURE__*/$parcel$interopDefault($fbc4eea22f41fc14$exports)), 'flex', 'flex-gap'),
}, /*#__PURE__*/ $9LQqs$react.createElement("div", {
className: $9LQqs$classNames((/*@__PURE__*/$parcel$interopDefault($01dd1839b5376a46$exports)), 'flex', 'flex-gap'),
style: style

@@ -199,8 +199,8 @@ }, children)));

};
if (props.gap != null) style.gap = $5XBri$responsiveDimensionValue(props.gap, matchedBreakpoints);
if (props.columnGap != null) style.columnGap = $5XBri$responsiveDimensionValue(props.columnGap, matchedBreakpoints);
if (props.rowGap != null) style.rowGap = $5XBri$responsiveDimensionValue(props.rowGap, matchedBreakpoints);
return(/*#__PURE__*/ $5XBri$react.createElement("div", {
...$5XBri$filterDOMProps(otherProps),
className: $5XBri$classNames((/*@__PURE__*/$parcel$interopDefault($fbc4eea22f41fc14$exports)), 'flex', styleProps.className),
if (props.gap != null) style.gap = $9LQqs$responsiveDimensionValue(props.gap, matchedBreakpoints);
if (props.columnGap != null) style.columnGap = $9LQqs$responsiveDimensionValue(props.columnGap, matchedBreakpoints);
if (props.rowGap != null) style.rowGap = $9LQqs$responsiveDimensionValue(props.rowGap, matchedBreakpoints);
return(/*#__PURE__*/ $9LQqs$react.createElement("div", {
...$9LQqs$filterDOMProps(otherProps),
className: $9LQqs$classNames((/*@__PURE__*/$parcel$interopDefault($01dd1839b5376a46$exports)), 'flex', styleProps.className),
style: style,

@@ -213,3 +213,3 @@ ref: domRef

* in flex containers for browser compatibility.
*/ function $1b39fab7603c3bcf$var$flexAlignValue(value) {
*/ function $884c64d19340d345$var$flexAlignValue(value) {
if (value === 'start') return 'flex-start';

@@ -221,3 +221,3 @@ if (value === 'end') return 'flex-end';

* Takes a boolean and translates it to flex wrap or nowrap.
*/ function $1b39fab7603c3bcf$var$flexWrapValue(value) {
*/ function $884c64d19340d345$var$flexWrapValue(value) {
if (typeof value === 'boolean') return value ? 'wrap' : 'nowrap';

@@ -229,5 +229,5 @@ return value;

// See https://github.com/Modernizr/Modernizr/blob/7efb9d0edd66815fb115fdce95fabaf019ce8db5/feature-detects/css/flexgap.js
let $1b39fab7603c3bcf$var$_isFlexGapSupported = null;
function $1b39fab7603c3bcf$var$isFlexGapSupported() {
if ($1b39fab7603c3bcf$var$_isFlexGapSupported != null) return $1b39fab7603c3bcf$var$_isFlexGapSupported;
let $884c64d19340d345$var$_isFlexGapSupported = null;
function $884c64d19340d345$var$isFlexGapSupported() {
if ($884c64d19340d345$var$_isFlexGapSupported != null) return $884c64d19340d345$var$_isFlexGapSupported;
if (typeof document === 'undefined') return false;

@@ -244,5 +244,5 @@ // create flex container with row-gap set

document.body.appendChild(flex);
$1b39fab7603c3bcf$var$_isFlexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap
$884c64d19340d345$var$_isFlexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap
flex.parentNode.removeChild(flex);
return $1b39fab7603c3bcf$var$_isFlexGapSupported;
return $884c64d19340d345$var$_isFlexGapSupported;
}

@@ -252,3 +252,3 @@ /**

* property to define consistent spacing between items.
*/ const $1b39fab7603c3bcf$export$f51f4c4ede09e011 = /*#__PURE__*/ $5XBri$forwardRef($1b39fab7603c3bcf$var$Flex);
*/ const $884c64d19340d345$export$f51f4c4ede09e011 = /*#__PURE__*/ $9LQqs$forwardRef($884c64d19340d345$var$Flex);

@@ -258,3 +258,3 @@

export {$adc7dbc11bf4e86c$export$76d90c956114f2c2 as repeat, $adc7dbc11bf4e86c$export$9c1b655deaca4988 as minmax, $adc7dbc11bf4e86c$export$2f0b47b0911ce698 as fitContent, $adc7dbc11bf4e86c$export$ef2184bd89960b14 as Grid, $1b39fab7603c3bcf$export$f51f4c4ede09e011 as 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
{
"name": "@react-spectrum/layout",
"version": "3.2.3",
"version": "3.2.4-nightly.3113+404d41859",
"description": "Spectrum UI components in React",

@@ -35,11 +35,11 @@ "license": "Apache-2.0",

"@babel/runtime": "^7.6.2",
"@react-aria/ssr": "^3.1.2",
"@react-aria/utils": "^3.11.2",
"@react-spectrum/utils": "^3.6.5",
"@react-types/layout": "^3.2.2",
"@react-types/shared": "^3.11.1",
"@react-aria/ssr": "3.1.3-nightly.3113+404d41859",
"@react-aria/utils": "3.0.0-nightly.1417+404d41859",
"@react-spectrum/utils": "3.0.0-nightly.1417+404d41859",
"@react-types/layout": "3.2.3-nightly.3113+404d41859",
"@react-types/shared": "3.0.0-nightly.1417+404d41859",
"clsx": "^1.1.1"
},
"devDependencies": {
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
"@adobe/spectrum-css-temp": "3.0.0-nightly.1417+404d41859"
},

@@ -46,0 +46,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc