@radix-ui/react-scroll-area
Advanced tools
Comparing version 1.2.0 to 1.2.1-rc.1
@@ -139,3 +139,3 @@ "use strict"; | ||
(props, forwardedRef) => { | ||
const { __scopeScrollArea, children, asChild, nonce, ...viewportProps } = props; | ||
const { __scopeScrollArea, children, nonce, ...viewportProps } = props; | ||
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea); | ||
@@ -149,20 +149,3 @@ const ref = React2.useRef(null); | ||
dangerouslySetInnerHTML: { | ||
__html: ` | ||
[data-radix-scroll-area-viewport] { | ||
scrollbar-width: none; | ||
-ms-overflow-style: none; | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
[data-radix-scroll-area-viewport]::-webkit-scrollbar { | ||
display: none; | ||
} | ||
:where([data-radix-scroll-area-viewport]) { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: stretch; | ||
} | ||
:where([data-radix-scroll-area-content]) { | ||
flex-grow: 1; | ||
} | ||
` | ||
__html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}` | ||
}, | ||
@@ -177,3 +160,2 @@ nonce | ||
...viewportProps, | ||
asChild, | ||
ref: composedRefs, | ||
@@ -196,11 +178,3 @@ style: { | ||
}, | ||
children: getSubtree({ asChild, children }, (children2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
"div", | ||
{ | ||
"data-radix-scroll-area-content": "", | ||
ref: context.onContentChange, | ||
style: { minWidth: context.scrollbarXEnabled ? "fit-content" : void 0 }, | ||
children: children2 | ||
} | ||
)) | ||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children }) | ||
} | ||
@@ -796,10 +770,2 @@ ) | ||
} | ||
function getSubtree(options, content) { | ||
const { asChild, children } = options; | ||
if (!asChild) return typeof content === "function" ? content(children) : content; | ||
const firstChild = React2.Children.only(children); | ||
return React2.cloneElement(firstChild, { | ||
children: typeof content === "function" ? content(firstChild.props.children) : content | ||
}); | ||
} | ||
var Root = ScrollArea; | ||
@@ -806,0 +772,0 @@ var Viewport = ScrollAreaViewport; |
{ | ||
"name": "@radix-ui/react-scroll-area", | ||
"version": "1.2.0", | ||
"version": "1.2.1-rc.1", | ||
"license": "MIT", | ||
@@ -65,3 +65,4 @@ "exports": { | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
} | ||
}, | ||
"stableVersion": "1.2.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance 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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
196402
1637
1