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

@restart/ui

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/ui - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

cjs/Anchor.js

@@ -45,3 +45,3 @@ "use strict";

if (isTrivialHref(props.href) && !props.role || props.role === 'button') {
if (isTrivialHref(props.href) || props.role === 'button') {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", Object.assign({

@@ -48,0 +48,0 @@ ref: ref

@@ -14,2 +14,3 @@ import * as React from 'react';

tagName?: keyof JSX.IntrinsicElements;
role?: React.AriaRole | undefined;
}

@@ -20,3 +21,3 @@ export declare function isTrivialHref(href?: string): boolean;

disabled: boolean | undefined;
role?: 'button';
role?: React.AriaRole;
tabIndex?: number | undefined;

@@ -33,3 +34,3 @@ href?: string | undefined;

}
export declare function useButtonProps({ tagName, disabled, href, target, rel, onClick, tabIndex, type, }: UseButtonPropsOptions): [AriaButtonProps, UseButtonPropsMetadata];
export declare function useButtonProps({ tagName, disabled, href, target, rel, role, onClick, tabIndex, type, }: UseButtonPropsOptions): [AriaButtonProps, UseButtonPropsMetadata];
export interface BaseButtonProps {

@@ -36,0 +37,0 @@ /**

@@ -30,2 +30,3 @@ "use strict";

rel,
role,
onClick,

@@ -84,3 +85,3 @@ tabIndex = 0,

return [{
role: 'button',
role: role != null ? role : 'button',
// explicitly undefined so that it overrides the props disabled in a spread

@@ -87,0 +88,0 @@ // e.g. <Tag {...props} {...hookProps} />

@@ -34,3 +34,3 @@ const _excluded = ["onKeyDown"];

if (isTrivialHref(props.href) && !props.role || props.role === 'button') {
if (isTrivialHref(props.href) || props.role === 'button') {
return /*#__PURE__*/_jsx("a", Object.assign({

@@ -37,0 +37,0 @@ ref: ref

@@ -14,2 +14,3 @@ import * as React from 'react';

tagName?: keyof JSX.IntrinsicElements;
role?: React.AriaRole | undefined;
}

@@ -20,3 +21,3 @@ export declare function isTrivialHref(href?: string): boolean;

disabled: boolean | undefined;
role?: 'button';
role?: React.AriaRole;
tabIndex?: number | undefined;

@@ -33,3 +34,3 @@ href?: string | undefined;

}
export declare function useButtonProps({ tagName, disabled, href, target, rel, onClick, tabIndex, type, }: UseButtonPropsOptions): [AriaButtonProps, UseButtonPropsMetadata];
export declare function useButtonProps({ tagName, disabled, href, target, rel, role, onClick, tabIndex, type, }: UseButtonPropsOptions): [AriaButtonProps, UseButtonPropsMetadata];
export interface BaseButtonProps {

@@ -36,0 +37,0 @@ /**

@@ -16,2 +16,3 @@ const _excluded = ["as", "disabled"];

rel,
role,
onClick,

@@ -70,3 +71,3 @@ tabIndex = 0,

return [{
role: 'button',
role: role != null ? role : 'button',
// explicitly undefined so that it overrides the props disabled in a spread

@@ -73,0 +74,0 @@ // e.g. <Tag {...props} {...hookProps} />

{
"name": "@restart/ui",
"version": "1.3.0",
"version": "1.3.1",
"description": "Utilities for creating robust overlay components",

@@ -5,0 +5,0 @@ "author": {

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