@radix-ui/react-separator
Advanced tools
Comparing version 1.1.0-rc.3 to 1.1.0-rc.4
import * as React from 'react'; | ||
import * as Radix from '@radix-ui/react-primitive'; | ||
import { Primitive } from '@radix-ui/react-primitive'; | ||
declare const ORIENTATIONS: readonly ["horizontal", "vertical"]; | ||
declare type Orientation = typeof ORIENTATIONS[number]; | ||
declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>; | ||
type Orientation = (typeof ORIENTATIONS)[number]; | ||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>; | ||
interface SeparatorProps extends PrimitiveDivProps { | ||
@@ -9,0 +8,0 @@ /** |
@@ -61,19 +61,2 @@ "use strict"; | ||
Separator.displayName = NAME; | ||
Separator.propTypes = { | ||
orientation(props, propName, componentName) { | ||
const propValue = props[propName]; | ||
const strVal = String(propValue); | ||
if (propValue && !isValidOrientation(propValue)) { | ||
return new Error(getInvalidOrientationError(strVal, componentName)); | ||
} | ||
return null; | ||
} | ||
}; | ||
function getInvalidOrientationError(value, componentName) { | ||
return `Invalid prop \`orientation\` of value \`${value}\` supplied to \`${componentName}\`, expected one of: | ||
- horizontal | ||
- vertical | ||
Defaulting to \`${DEFAULT_ORIENTATION}\`.`; | ||
} | ||
function isValidOrientation(orientation) { | ||
@@ -80,0 +63,0 @@ return ORIENTATIONS.includes(orientation); |
{ | ||
"name": "@radix-ui/react-separator", | ||
"version": "1.1.0-rc.3", | ||
"version": "1.1.0-rc.4", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "exports": { | ||
"dependencies": { | ||
"@radix-ui/react-primitive": "1.1.0-rc.3" | ||
"@radix-ui/react-primitive": "2.0.0-rc.1" | ||
}, | ||
@@ -37,4 +37,4 @@ "peerDependencies": { | ||
"@types/react-dom": "*", | ||
"react": "^16.8 || ^17.0 || ^18.0", | ||
"react-dom": "^16.8 || ^17.0 || ^18.0" | ||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0", | ||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "peerDependenciesMeta": { |
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
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
13149
114
+ Added@radix-ui/react-compose-refs@1.1.0-rc.4(transitive)
+ Added@radix-ui/react-primitive@2.0.0-rc.1(transitive)
+ Added@radix-ui/react-slot@1.1.0-rc.4(transitive)
- Removed@radix-ui/react-compose-refs@1.1.0-rc.3(transitive)
- Removed@radix-ui/react-primitive@1.1.0-rc.3(transitive)
- Removed@radix-ui/react-slot@1.1.0-rc.3(transitive)