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

@spark-ui/slot

Package Overview
Dependencies
Maintainers
7
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spark-ui/slot - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

# [1.2.0](https://github.com/adevinta/spark/compare/@spark-ui/slot@1.1.0...@spark-ui/slot@1.2.0) (2023-03-24)
### Features
- **slot:** update slot component props definition ([0a3e228](https://github.com/adevinta/spark/commit/0a3e2288f77c338220f3420252e6f352a9c89aa6))
# 1.1.0 (2023-03-24)

@@ -8,0 +14,0 @@

2

dist/index.d.ts

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

export { Slot } from './Slot';
export * from './Slot';

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

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");function a(){return a=Object.assign?Object.assign.bind():function(t){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},a.apply(this,arguments)}function m(...t){return l=>t.forEach(e=>function(n,o){typeof n=="function"?n(o):n!=null&&(n.current=o)}(e,l))}const f=r.forwardRef((t,l)=>{const{children:e,...n}=t,o=r.Children.toArray(e),i=o.find(h);if(i){const c=i.props.children,d=o.map(u=>u===i?r.Children.count(c)>1?r.Children.only(null):r.isValidElement(c)?c.props.children:null:u);return r.createElement(s,a({},n,{ref:l}),r.isValidElement(c)?r.cloneElement(c,void 0,d):null)}return r.createElement(s,a({},n,{ref:l}),e)});f.displayName="Slot";const s=r.forwardRef((t,l)=>{const{children:e,...n}=t;return r.isValidElement(e)?r.cloneElement(e,{...y(n,e.props),ref:m(l,e.ref)}):r.Children.count(e)>1?r.Children.only(null):null});s.displayName="SlotClone";const p=({children:t})=>r.createElement(r.Fragment,null,t);function h(t){return r.isValidElement(t)&&t.type===p}function y(t,l){const e={...l};for(const n in l){const o=t[n],i=l[n];/^on[A-Z]/.test(n)?o&&i?e[n]=(...c)=>{i(...c),o(...c)}:o&&(e[n]=o):n==="style"?e[n]={...o,...i}:n==="className"&&(e[n]=[o,i].filter(Boolean).join(" "))}return{...t,...e}}exports.Slot=function(t){return r.createElement(f,{...t})};
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");function s(){return s=Object.assign?Object.assign.bind():function(r){for(var l=1;l<arguments.length;l++){var n=arguments[l];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e])}return r},s.apply(this,arguments)}function m(...r){return l=>r.forEach(n=>function(e,o){typeof e=="function"?e(o):e!=null&&(e.current=o)}(n,l))}const f=t.forwardRef((r,l)=>{const{children:n,...e}=r,o=t.Children.toArray(n),i=o.find(h);if(i){const c=i.props.children,d=o.map(u=>u===i?t.Children.count(c)>1?t.Children.only(null):t.isValidElement(c)?c.props.children:null:u);return t.createElement(a,s({},e,{ref:l}),t.isValidElement(c)?t.cloneElement(c,void 0,d):null)}return t.createElement(a,s({},e,{ref:l}),n)});f.displayName="Slot";const a=t.forwardRef((r,l)=>{const{children:n,...e}=r;return t.isValidElement(n)?t.cloneElement(n,{...y(e,n.props),ref:m(l,n.ref)}):t.Children.count(n)>1?t.Children.only(null):null});a.displayName="SlotClone";const p=({children:r})=>t.createElement(t.Fragment,null,r);function h(r){return t.isValidElement(r)&&r.type===p}function y(r,l){const n={...l};for(const e in l){const o=r[e],i=l[e];/^on[A-Z]/.test(e)?o&&i?n[e]=(...c)=>{i(...c),o(...c)}:o&&(n[e]=o):e==="style"?n[e]={...o,...i}:e==="className"&&(n[e]=[o,i].filter(Boolean).join(" "))}return{...r,...n}}const E=t.forwardRef((r,l)=>t.createElement(f,{ref:l,...r}));exports.Slot=E;
import { PropsWithChildren } from 'react';
export type SlotProps = PropsWithChildren<Omit<React.HTMLProps<HTMLDivElement>, 'ref'>>;
export declare function Slot(props: SlotProps): JSX.Element;
export type SlotProps = PropsWithChildren<React.HTMLAttributes<HTMLElement>>;
export declare const Slot: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLElement> & {
children?: import("react").ReactNode;
} & import("react").RefAttributes<HTMLElement>>;
{
"name": "@spark-ui/slot",
"version": "1.1.0",
"version": "1.2.0",
"description": "Merges its props onto its immediate child",

@@ -17,3 +17,3 @@ "publishConfig": {

},
"gitHead": "e779d5b3c63c8c9f401637526370e262bcc326a4"
"gitHead": "d2c72b9463e333753139f8f509080dd3b522cdf2"
}

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