Socket
Socket
Sign inDemoInstall

@radix-ui/react-separator

Package Overview
Dependencies
Maintainers
5
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.5 to 0.0.6

3

dist/index.d.ts
import { Primitive } from "@radix-ui/react-primitive";
import * as Polymorphic from "@radix-ui/react-polymorphic";
import { Merge } from "@radix-ui/utils";
declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
type Orientation = typeof ORIENTATIONS[number];
type SeparatorOwnProps = Merge<Polymorphic.OwnProps<typeof Primitive>, {
type SeparatorOwnProps = Polymorphic.Merge<Polymorphic.OwnProps<typeof Primitive>, {
/**

@@ -8,0 +7,0 @@ * Either `vertical` or `horizontal`. Defaults to `horizontal`.

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

var r,e,t=require("@radix-ui/utils").getSelector,o=require("@radix-ui/react-primitive").Primitive,n=(r={},e=require("react"),Object.keys(e).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})})),r);function i(){return(i=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r}).apply(this,arguments)}function a(r,e){if(null==r)return{};var t,o,n=function(r,e){if(null==r)return{};var t,o,n={},i=Object.keys(r);for(o=0;o<i.length;o++)t=i[o],e.indexOf(t)>=0||(n[t]=r[t]);return n}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)t=i[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}var l=["horizontal","vertical"],c=n.forwardRef((function(r,e){var l=r.selector,c=void 0===l?t("Separator"):l,f=r.decorative,p=r.orientation,v=void 0===p?"horizontal":p,s=a(r,["selector","decorative","orientation"]),d=u(v)?v:"horizontal",y=f?{role:"none"}:{"aria-orientation":"vertical"===d?d:void 0,role:"separator"};return n.createElement(o,i({},y,{"data-orientation":d},s,{selector:c,ref:e}))}));function u(r){return l.includes(r)}exports.Separator=c,c.displayName="Separator",c.propTypes={orientation:function(r,e,t){var o=r[e],n=String(o);return o&&!u(o)?new Error(function(r,e){return"Invalid prop `orientation` of value `".concat(r,"` supplied to `").concat(e,"`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to `").concat("horizontal","`.")}(n,t)):null}};var f=c;exports.Root=f;
var r,e,t=require("@radix-ui/react-primitive").Primitive,n=(r={},e=require("react"),Object.keys(e).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})})),r);function o(){return(o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}function i(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||(o[t]=r[t]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}var a=["horizontal","vertical"],c=n.forwardRef((function(r,e){var a=r.decorative,c=r.orientation,u=void 0===c?"horizontal":c,f=i(r,["decorative","orientation"]),p=l(u)?u:"horizontal",v=a?{role:"none"}:{"aria-orientation":"vertical"===p?p:void 0,role:"separator"};return n.createElement(t,o({},v,{"data-orientation":p},f,{ref:e}))}));function l(r){return a.includes(r)}exports.Separator=c,c.displayName="Separator",c.propTypes={orientation:function(r,e,t){var n=r[e],o=String(n);return n&&!l(n)?new Error(function(r,e){return"Invalid prop `orientation` of value `".concat(r,"` supplied to `").concat(e,"`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to `").concat("horizontal","`.")}(o,t)):null}};var u=c;exports.Root=u;
//# sourceMappingURL=index.js.map

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

import{getSelector as r}from"@radix-ui/utils";import{Primitive as t}from"@radix-ui/react-primitive";import*as e from"react";function o(){return(o=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r}).apply(this,arguments)}function n(r,t){if(null==r)return{};var e,o,n=function(r,t){if(null==r)return{};var e,o,n={},a=Object.keys(r);for(o=0;o<a.length;o++)e=a[o],t.indexOf(e)>=0||(n[e]=r[e]);return n}(r,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(o=0;o<a.length;o++)e=a[o],t.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(n[e]=r[e])}return n}const a="Separator",i="horizontal",c=["horizontal","vertical"];export const Separator=e.forwardRef(((c,p)=>{const{selector:u=r(a),decorative:f,orientation:s=i}=c,v=n(c,["selector","decorative","orientation"]),d=l(s)?s:i,m=f?{role:"none"}:{"aria-orientation":"vertical"===d?d:void 0,role:"separator"};return e.createElement(t,o({},m,{"data-orientation":d},v,{selector:u,ref:p}))}));function l(r){return c.includes(r)}Separator.displayName=a,Separator.propTypes={orientation(r,t,e){const o=r[t],n=String(o);return o&&!l(o)?new Error(function(r,t){return"Invalid prop `orientation` of value `".concat(r,"` supplied to `").concat(t,"`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to `").concat(i,"`.")}(n,e)):null}};export const Root=Separator;
import{Primitive as r}from"@radix-ui/react-primitive";import*as t from"react";function o(){return(o=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])}return r}).apply(this,arguments)}const n="horizontal",e=["horizontal","vertical"];export const Separator=t.forwardRef(((e,i)=>{const{decorative:c,orientation:p=n,...l}=e,u=a(p)?p:n,s=c?{role:"none"}:{"aria-orientation":"vertical"===u?u:void 0,role:"separator"};return t.createElement(r,o({},s,{"data-orientation":u},l,{ref:i}))}));function a(r){return e.includes(r)}Separator.displayName="Separator",Separator.propTypes={orientation(r,t,o){const e=r[t],i=String(e);return e&&!a(e)?new Error(function(r,t){return"Invalid prop `orientation` of value `".concat(r,"` supplied to `").concat(t,"`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to `").concat(n,"`.")}(i,o)):null}};export const Root=Separator;
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-separator",
"version": "0.0.5",
"version": "0.0.6",
"license": "MIT",

@@ -19,5 +19,4 @@ "source": "src/index.ts",

"dependencies": {
"@radix-ui/react-polymorphic": "0.0.5",
"@radix-ui/react-primitive": "0.0.4",
"@radix-ui/utils": "0.0.3"
"@radix-ui/react-polymorphic": "0.0.6",
"@radix-ui/react-primitive": "0.0.5"
},

@@ -24,0 +23,0 @@ "peerDependencies": {

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