Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-slot

Package Overview
Dependencies
Maintainers
8
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-slot - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

dist/index.js

@@ -1,2 +0,2 @@

var e,r,t,n=require("@radix-ui/react-compose-refs").composeRefs,o=require("@radix-ui/primitive").composeEventHandlers,l=(e={},r=require("react"),Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),e),i=(t=require("@babel/runtime/helpers/extends"))&&t.__esModule?t.default:t;const s=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:t,...n}=e;return 1===l.Children.count(t)?/*#__PURE__*/l.createElement(c,i({},n,{ref:r}),t):/*#__PURE__*/l.createElement(l.Fragment,null,l.Children.map(t,(e=>/*#__PURE__*/l.isValidElement(e)&&e.type===a?/*#__PURE__*/l.createElement(c,i({},n,{ref:r}),e.props.children):e)))}));exports.Slot=s,s.displayName="Slot";const c=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:t,...o}=e,i=l.Children.only(t);/*#__PURE__*/return l.isValidElement(i)?/*#__PURE__*/l.cloneElement(i,{...d(o,i.props),ref:n(r,i.ref)}):null}));c.displayName="SlotClone";const a=({children:e})=>e;function d(e,r){const t={...r};for(const n in r){const l=e[n],i=r[n];/^on[A-Z]/.test(n)&&(t[n]=o(i,l))}return{...e,...t}}exports.Slottable=a;const u=s;exports.Root=u;
var e,t,n,r=require("@radix-ui/react-compose-refs").composeRefs,l=(e={},t=require("react"),Object.keys(t).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),e),o=(n=require("@babel/runtime/helpers/extends"))&&n.__esModule?n.default:n;const c=/*#__PURE__*/l.forwardRef(((e,t)=>{const{children:n,...r}=e;return 1===l.Children.count(n)?/*#__PURE__*/l.createElement(s,o({},r,{ref:t}),n):/*#__PURE__*/l.createElement(l.Fragment,null,l.Children.map(n,(e=>/*#__PURE__*/l.isValidElement(e)&&e.type===i?/*#__PURE__*/l.createElement(s,o({},r,{ref:t}),e.props.children):e)))}));exports.Slot=c,c.displayName="Slot";const s=/*#__PURE__*/l.forwardRef(((e,t)=>{const{children:n,...o}=e,c=l.Children.only(n);/*#__PURE__*/return l.isValidElement(c)?/*#__PURE__*/l.cloneElement(c,{...u(o,c.props),ref:r(t,c.ref)}):null}));s.displayName="SlotClone";const i=({children:e})=>e;function u(e,t){const n={...t};for(const r in t){const l=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=a(o,l):"style"===r&&(n[r]={...l,...o})}return{...e,...n}}function a(e,t){return function(...n){null==e||e(...n);n[0]instanceof Event&&n[0].defaultPrevented||null==t||t(...n)}}exports.Slottable=i;const d=c;exports.Root=d;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{composeRefs as e}from"@radix-ui/react-compose-refs";import{composeEventHandlers as t}from"@radix-ui/primitive";import*as r from"react";import o from"@babel/runtime/helpers/esm/extends";export const Slot=/*#__PURE__*/r.forwardRef(((e,t)=>{const{children:l,...i}=e;return 1===r.Children.count(l)?/*#__PURE__*/r.createElement(n,o({},i,{ref:t}),l):/*#__PURE__*/r.createElement(r.Fragment,null,r.Children.map(l,(e=>/*#__PURE__*/r.isValidElement(e)&&e.type===Slottable?/*#__PURE__*/r.createElement(n,o({},i,{ref:t}),e.props.children):e)))}));Slot.displayName="Slot";const n=/*#__PURE__*/r.forwardRef(((t,o)=>{const{children:n,...i}=t,c=r.Children.only(n);/*#__PURE__*/return r.isValidElement(c)?/*#__PURE__*/r.cloneElement(c,{...l(i,c.props),ref:e(o,c.ref)}):null}));n.displayName="SlotClone";export const Slottable=({children:e})=>e;function l(e,r){const o={...r};for(const n in r){const l=e[n],i=r[n];/^on[A-Z]/.test(n)&&(o[n]=t(i,l))}return{...e,...o}}export const Root=Slot;
import{composeRefs as e}from"@radix-ui/react-compose-refs";import*as t from"react";import n from"@babel/runtime/helpers/esm/extends";export const Slot=/*#__PURE__*/t.forwardRef(((e,o)=>{const{children:l,...c}=e;return 1===t.Children.count(l)?/*#__PURE__*/t.createElement(r,n({},c,{ref:o}),l):/*#__PURE__*/t.createElement(t.Fragment,null,t.Children.map(l,(e=>/*#__PURE__*/t.isValidElement(e)&&e.type===Slottable?/*#__PURE__*/t.createElement(r,n({},c,{ref:o}),e.props.children):e)))}));Slot.displayName="Slot";const r=/*#__PURE__*/t.forwardRef(((n,r)=>{const{children:l,...c}=n,i=t.Children.only(l);/*#__PURE__*/return t.isValidElement(i)?/*#__PURE__*/t.cloneElement(i,{...o(c,i.props),ref:e(r,i.ref)}):null}));r.displayName="SlotClone";export const Slottable=({children:e})=>e;function o(e,t){const n={...t};for(const r in t){const o=e[r],c=t[r];/^on[A-Z]/.test(r)?n[r]=l(c,o):"style"===r&&(n[r]={...o,...c})}return{...e,...n}}function l(e,t){return function(...n){null==e||e(...n);n[0]instanceof Event&&n[0].defaultPrevented||null==t||t(...n)}}export const Root=Slot;
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-slot",
"version": "0.0.10",
"version": "0.0.11",
"license": "MIT",

@@ -21,3 +21,2 @@ "source": "src/index.ts",

"@babel/runtime": "^7.13.10",
"@radix-ui/primitive": "0.0.5",
"@radix-ui/react-compose-refs": "0.0.5"

@@ -24,0 +23,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

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