@radix-ui/react-slot
Advanced tools
Comparing version 0.1.1 to 0.1.2-rc.1
@@ -1,2 +0,2 @@ | ||
var e,r,t,n=require("@radix-ui/react-compose-refs").composeRefs,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),o=(t=require("@babel/runtime/helpers/extends"))&&t.__esModule?t.default:t;const s=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:t,...n}=e,s=l.Children.toArray(t);return s.some(i)?/*#__PURE__*/l.createElement(l.Fragment,null,s.map((e=>i(e)?/*#__PURE__*/l.createElement(c,o({},n,{ref:r}),e.props.children):e))):/*#__PURE__*/l.createElement(c,o({},n,{ref:r}),t)}));exports.Slot=s,s.displayName="Slot";const c=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:t,...o}=e;/*#__PURE__*/return l.isValidElement(t)?/*#__PURE__*/l.cloneElement(t,{...u(o,t.props),ref:n(r,t.ref)}):l.Children.count(t)>1?l.Children.only(null):null}));c.displayName="SlotClone";const a=({children:e})=>/*#__PURE__*/l.createElement(l.Fragment,null,e);function i(e){/*#__PURE__*/return l.isValidElement(e)&&e.type===a}function u(e,r){const t={...r};for(const n in r){const l=e[n],o=r[n];/^on[A-Z]/.test(n)?t[n]=(...e)=>{null==o||o(...e),null==l||l(...e)}:"style"===n?t[n]={...l,...o}:"className"===n&&(t[n]=[l,o].filter(Boolean).join(" "))}return{...e,...t}}exports.Slottable=a;const d=s;exports.Root=d; | ||
var e,r,n,t=require("@radix-ui/react-compose-refs").composeRefs,l=(e={},r=require("react"),Object.keys(r).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[n]}})})),e),o=(n=require("@babel/runtime/helpers/extends"))&&n.__esModule?n.default:n;const s=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:n,...t}=e;return l.Children.toArray(n).some(i)?/*#__PURE__*/l.createElement(l.Fragment,null,l.Children.map(n,(e=>i(e)?/*#__PURE__*/l.createElement(c,o({},t,{ref:r}),e.props.children):e))):/*#__PURE__*/l.createElement(c,o({},t,{ref:r}),n)}));exports.Slot=s,s.displayName="Slot";const c=/*#__PURE__*/l.forwardRef(((e,r)=>{const{children:n,...o}=e;/*#__PURE__*/return l.isValidElement(n)?/*#__PURE__*/l.cloneElement(n,{...u(o,n.props),ref:t(r,n.ref)}):l.Children.count(n)>1?l.Children.only(null):null}));c.displayName="SlotClone";const a=({children:e})=>/*#__PURE__*/l.createElement(l.Fragment,null,e);function i(e){/*#__PURE__*/return l.isValidElement(e)&&e.type===a}function u(e,r){const n={...r};for(const t in r){const l=e[t],o=r[t];/^on[A-Z]/.test(t)?n[t]=(...e)=>{null==o||o(...e),null==l||l(...e)}:"style"===t?n[t]={...l,...o}:"className"===t&&(n[t]=[l,o].filter(Boolean).join(" "))}return{...e,...n}}exports.Slottable=a;const d=s;exports.Root=d; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{composeRefs as e}from"@radix-ui/react-compose-refs";import*as t from"react";import r from"@babel/runtime/helpers/esm/extends";export const Slot=/*#__PURE__*/t.forwardRef(((e,o)=>{const{children:a,...s}=e,c=t.Children.toArray(a);return c.some(l)?/*#__PURE__*/t.createElement(t.Fragment,null,c.map((e=>l(e)?/*#__PURE__*/t.createElement(n,r({},s,{ref:o}),e.props.children):e))):/*#__PURE__*/t.createElement(n,r({},s,{ref:o}),a)}));Slot.displayName="Slot";const n=/*#__PURE__*/t.forwardRef(((r,n)=>{const{children:l,...a}=r;/*#__PURE__*/return t.isValidElement(l)?/*#__PURE__*/t.cloneElement(l,{...o(a,l.props),ref:e(n,l.ref)}):t.Children.count(l)>1?t.Children.only(null):null}));n.displayName="SlotClone";export const Slottable=({children:e})=>/*#__PURE__*/t.createElement(t.Fragment,null,e);function l(e){/*#__PURE__*/return t.isValidElement(e)&&e.type===Slottable}function o(e,t){const r={...t};for(const n in t){const l=e[n],o=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==o||o(...e),null==l||l(...e)}:"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}export const Root=Slot; | ||
import{composeRefs as e}from"@radix-ui/react-compose-refs";import*as t from"react";import r from"@babel/runtime/helpers/esm/extends";export const Slot=/*#__PURE__*/t.forwardRef(((e,o)=>{const{children:a,...s}=e;return t.Children.toArray(a).some(l)?/*#__PURE__*/t.createElement(t.Fragment,null,t.Children.map(a,(e=>l(e)?/*#__PURE__*/t.createElement(n,r({},s,{ref:o}),e.props.children):e))):/*#__PURE__*/t.createElement(n,r({},s,{ref:o}),a)}));Slot.displayName="Slot";const n=/*#__PURE__*/t.forwardRef(((r,n)=>{const{children:l,...a}=r;/*#__PURE__*/return t.isValidElement(l)?/*#__PURE__*/t.cloneElement(l,{...o(a,l.props),ref:e(n,l.ref)}):t.Children.count(l)>1?t.Children.only(null):null}));n.displayName="SlotClone";export const Slottable=({children:e})=>/*#__PURE__*/t.createElement(t.Fragment,null,e);function l(e){/*#__PURE__*/return t.isValidElement(e)&&e.type===Slottable}function o(e,t){const r={...t};for(const n in t){const l=e[n],o=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==o||o(...e),null==l||l(...e)}:"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}export const Root=Slot; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-slot", | ||
"version": "0.1.1", | ||
"version": "0.1.2-rc.1", | ||
"license": "MIT", | ||
@@ -32,3 +32,4 @@ "source": "src/index.ts", | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
} | ||
}, | ||
"stableVersion": "0.1.1" | ||
} |
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
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
16225