@react-spectrum/view
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-nightly.672
152
dist/main.js
@@ -1,19 +0,24 @@ | ||
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends")); | ||
var _react2 = require("react"); | ||
var _babelRuntimeHelpersObjectWithoutProperties = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _react = $parcel$interopDefault(_react2); | ||
var _temp = require("@react-spectrum/utils"); | ||
var { | ||
forwardRef | ||
} = _react2; | ||
var filterDOMProps = _temp.filterDOMProps; | ||
var useDOMRef = _temp.useDOMRef; | ||
var useSlotProps = _temp.useSlotProps; | ||
var useStyleProps = _temp.useStyleProps; | ||
var viewStyleProps = _temp.viewStyleProps; | ||
var ClearSlots = _temp.ClearSlots; | ||
var { | ||
filterDOMProps | ||
} = require("@react-aria/utils"); | ||
var _react2 = require("react"); | ||
var { | ||
ClearSlots, | ||
useDOMRef, | ||
useSlotProps, | ||
useStyleProps, | ||
viewStyleProps | ||
} = require("@react-spectrum/utils"); | ||
var _react = $parcel$interopDefault(_react2); | ||
var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var forwardRef = _react2.forwardRef; | ||
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends")); | ||
@@ -24,82 +29,95 @@ function $parcel$interopDefault(a) { | ||
function $d32c49000752d7e766aca3dcb18ca2$var$View(props, ref) { | ||
function $cb4e2cb36ae5e3ab01f62ab7d1672c67$var$View(props, ref) { | ||
props = useSlotProps(props); | ||
var _props = props, | ||
_props$elementType = _props.elementType, | ||
ElementType = _props$elementType === void 0 ? 'div' : _props$elementType, | ||
children = _props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(_props, ["elementType", "children"]); | ||
let { | ||
elementType: ElementType = 'div', | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["elementType", "children"]); | ||
var _useStyleProps = useStyleProps(props, viewStyleProps), | ||
styleProps = _useStyleProps.styleProps; | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement(ElementType, _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
let { | ||
styleProps | ||
} = useStyleProps(props, viewStyleProps); | ||
let domRef = useDOMRef(ref); | ||
return /*#__PURE__*/_react.createElement(ElementType, _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* View is a general purpose container with no specific semantics that can be used for custom styling purposes. | ||
* It supports Spectrum style props to ensure consistency with other Spectrum components. | ||
*/ | ||
var View = forwardRef($d32c49000752d7e766aca3dcb18ca2$var$View); | ||
const View = forwardRef($cb4e2cb36ae5e3ab01f62ab7d1672c67$var$View); | ||
exports.View = View; | ||
function $d1fda12a538a885b09e0aa15c973b51$var$Content(props, ref) { | ||
function $b1630a1ad5492629b7ba4ec7eeabf6d2$var$Content(props, ref) { | ||
props = useSlotProps(props, 'content'); | ||
var _props = props, | ||
children = _props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(_props, ["children"]); | ||
let { | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]); | ||
var _useStyleProps = useStyleProps(otherProps), | ||
styleProps = _useStyleProps.styleProps; | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("section", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)) | ||
); | ||
let { | ||
styleProps | ||
} = useStyleProps(otherProps); | ||
let domRef = useDOMRef(ref); | ||
return /*#__PURE__*/_react.createElement("section", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* Content represents the primary content within a Spectrum container. | ||
*/ | ||
var Content = forwardRef($d1fda12a538a885b09e0aa15c973b51$var$Content); | ||
const Content = forwardRef($b1630a1ad5492629b7ba4ec7eeabf6d2$var$Content); | ||
exports.Content = Content; | ||
function $e9f8bc9d3d36c51094e9cf8018cbec$var$Footer(props, ref) { | ||
function $e94eeee6ece39151e8a4902927dc1d5c$var$Footer(props, ref) { | ||
props = useSlotProps(props, 'footer'); | ||
var _props = props, | ||
children = _props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(_props, ["children"]); | ||
let { | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]); | ||
var _useStyleProps = useStyleProps(otherProps), | ||
styleProps = _useStyleProps.styleProps; | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("footer", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
let { | ||
styleProps | ||
} = useStyleProps(otherProps); | ||
let domRef = useDOMRef(ref); | ||
return /*#__PURE__*/_react.createElement("footer", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* Footer represents a footer within a Spectrum container. | ||
*/ | ||
var Footer = forwardRef($e9f8bc9d3d36c51094e9cf8018cbec$var$Footer); | ||
const Footer = forwardRef($e94eeee6ece39151e8a4902927dc1d5c$var$Footer); | ||
exports.Footer = Footer; | ||
function $b8666d2e267ec708a6c2a8024ae4e$var$Header(props, ref) { | ||
function $fd6476b36977b4ef8b9643920fa5b3$var$Header(props, ref) { | ||
props = useSlotProps(props, 'header'); | ||
var _props = props, | ||
children = _props.children, | ||
otherProps = _babelRuntimeHelpersObjectWithoutProperties(_props, ["children"]); | ||
let { | ||
children | ||
} = props, | ||
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children"]); | ||
var _useStyleProps = useStyleProps(otherProps), | ||
styleProps = _useStyleProps.styleProps; | ||
var domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("header", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
let { | ||
styleProps | ||
} = useStyleProps(otherProps); | ||
let domRef = useDOMRef(ref); | ||
return /*#__PURE__*/_react.createElement("header", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
var Header = forwardRef($b8666d2e267ec708a6c2a8024ae4e$var$Header); | ||
exports.Header = Header; | ||
const Header = forwardRef($fd6476b36977b4ef8b9643920fa5b3$var$Header); | ||
exports.Header = Header; | ||
//# sourceMappingURL=main.js.map |
@@ -0,7 +1,8 @@ | ||
import _react, { forwardRef } from "react"; | ||
import { filterDOMProps } from "@react-aria/utils"; | ||
import { ClearSlots, useDOMRef, useSlotProps, useStyleProps, viewStyleProps } from "@react-spectrum/utils"; | ||
import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends"; | ||
import _babelRuntimeHelpersEsmObjectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
import { filterDOMProps, useDOMRef, useSlotProps, useStyleProps, viewStyleProps, ClearSlots } from "@react-spectrum/utils"; | ||
import _react, { forwardRef } from "react"; | ||
function $c66d91ef484a1e068d908a8d$var$View(props, ref) { | ||
function $a9d007fb53ec13c8a292d4821c75$var$View(props, ref) { | ||
props = useSlotProps(props); | ||
@@ -13,3 +14,3 @@ | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["elementType", "children"]); | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["elementType", "children"]); | ||
@@ -20,11 +21,15 @@ let { | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement(ElementType, _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
return /*#__PURE__*/_react.createElement(ElementType, _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* View is a general purpose container with no specific semantics that can be used for custom styling purposes. | ||
* It supports Spectrum style props to ensure consistency with other Spectrum components. | ||
*/ | ||
export const View = forwardRef($c66d91ef484a1e068d908a8d$var$View); | ||
function $dab4ade329b7589c4d81c2dc1b08dc49$var$Content(props, ref) { | ||
export const View = forwardRef($a9d007fb53ec13c8a292d4821c75$var$View); | ||
function $a359aafecbc772ff97d7c424d8abe$var$Content(props, ref) { | ||
props = useSlotProps(props, 'content'); | ||
@@ -35,3 +40,3 @@ | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["children"]); | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]); | ||
@@ -42,11 +47,14 @@ let { | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("section", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)) | ||
); | ||
return /*#__PURE__*/_react.createElement("section", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* Content represents the primary content within a Spectrum container. | ||
*/ | ||
export const Content = forwardRef($dab4ade329b7589c4d81c2dc1b08dc49$var$Content); | ||
function $f8e24f985c1a80022f1a77e7dda020$var$Footer(props, ref) { | ||
export const Content = forwardRef($a359aafecbc772ff97d7c424d8abe$var$Content); | ||
function $e81ef0fe4e9ce0b97df516761bb30903$var$Footer(props, ref) { | ||
props = useSlotProps(props, 'footer'); | ||
@@ -57,3 +65,3 @@ | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["children"]); | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]); | ||
@@ -64,11 +72,14 @@ let { | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("footer", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
return /*#__PURE__*/_react.createElement("footer", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
/** | ||
* Footer represents a footer within a Spectrum container. | ||
*/ | ||
export const Footer = forwardRef($f8e24f985c1a80022f1a77e7dda020$var$Footer); | ||
function $a9f5358902db9c33ab333be39357797$var$Header(props, ref) { | ||
export const Footer = forwardRef($e81ef0fe4e9ce0b97df516761bb30903$var$Footer); | ||
function $eb7af4a99bd7beb05d29c99e5cb82302$var$Header(props, ref) { | ||
props = useSlotProps(props, 'header'); | ||
@@ -79,3 +90,3 @@ | ||
} = props, | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutProperties(props, ["children"]); | ||
otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children"]); | ||
@@ -86,8 +97,8 @@ let { | ||
let domRef = useDOMRef(ref); | ||
return (/*#__PURE__*/_react.createElement("header", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), children) | ||
); | ||
return /*#__PURE__*/_react.createElement("header", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps), styleProps, { | ||
ref: domRef | ||
}), /*#__PURE__*/_react.createElement(ClearSlots, null, children)); | ||
} | ||
export const Header = forwardRef($a9f5358902db9c33ab333be39357797$var$Header); | ||
export const Header = forwardRef($eb7af4a99bd7beb05d29c99e5cb82302$var$Header); | ||
//# sourceMappingURL=module.js.map |
@@ -0,7 +1,21 @@ | ||
import React from "react"; | ||
import { ViewProps, ContentProps, FooterProps, HeaderProps } from "@react-types/view"; | ||
/** | ||
* View is a general purpose container with no specific semantics that can be used for custom styling purposes. | ||
* It supports Spectrum style props to ensure consistency with other Spectrum components. | ||
*/ | ||
export const View: React.ForwardRefExoticComponent<ViewProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>; | ||
/** | ||
* Content represents the primary content within a Spectrum container. | ||
*/ | ||
export const Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>; | ||
/** | ||
* Footer represents a footer within a Spectrum container. | ||
*/ | ||
export const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>; | ||
/** | ||
* Header represents a header within a Spectrum container. | ||
*/ | ||
export const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLElement>>>; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-spectrum/view", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-nightly.672+9853bacb", | ||
"description": "Spectrum UI components in React", | ||
@@ -11,5 +11,8 @@ "license": "Apache-2.0", | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"src" | ||
], | ||
"sideEffects": false, | ||
"sideEffects": [ | ||
"*.css" | ||
], | ||
"targets": { | ||
@@ -29,13 +32,14 @@ "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/i18n": "^3.0.0-rc.2", | ||
"@react-spectrum/utils": "^3.0.0-rc.2", | ||
"@react-types/shared": "^3.0.0-rc.2", | ||
"@react-types/view": "^3.0.0-alpha.1" | ||
"@react-aria/i18n": "3.0.0-nightly.672+9853bacb", | ||
"@react-aria/utils": "3.0.0-nightly.672+9853bacb", | ||
"@react-spectrum/utils": "3.0.0-nightly.672+9853bacb", | ||
"@react-types/shared": "3.0.0-nightly.672+9853bacb", | ||
"@react-types/view": "3.1.1-nightly.2350+9853bacb" | ||
}, | ||
"devDependencies": { | ||
"@adobe/spectrum-css-temp": "^3.0.0-alpha.1" | ||
"@adobe/spectrum-css-temp": "3.0.0-nightly.672+9853bacb" | ||
}, | ||
@@ -49,3 +53,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
"gitHead": "9853bacb98dd37c64faf573e5cb1a6493e2e6f08" | ||
} |
# @react-spectrum/view | ||
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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
46482
14
363
8
2
- Removed@react-types/view@3.4.14(transitive)