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

@react-md/button

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-md/button - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

11

es/Button.js

@@ -17,6 +17,9 @@ var __assign = (this && this.__assign) || function () {

if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
/* eslint-disable react/button-has-type */
import React, { forwardRef } from "react";

@@ -27,2 +30,3 @@ import { useInteractionStates, } from "@react-md/states";

var _a = providedProps, theme = _a.theme, themeType = _a.themeType, buttonType = _a.buttonType, children = _a.children, forwardedRef = _a.forwardedRef, disableRipple = _a.disableRipple, disableProgrammaticRipple = _a.disableProgrammaticRipple, rippleTimeout = _a.rippleTimeout, rippleClassNames = _a.rippleClassNames, rippleClassName = _a.rippleClassName, rippleContainerClassName = _a.rippleContainerClassName, propEnablePressedAndRipple = _a.enablePressedAndRipple, props = __rest(_a, ["theme", "themeType", "buttonType", "children", "forwardedRef", "disableRipple", "disableProgrammaticRipple", "rippleTimeout", "rippleClassNames", "rippleClassName", "rippleContainerClassName", "enablePressedAndRipple"]);
var disabled = props.disabled;
var enablePressedAndRipple = typeof propEnablePressedAndRipple === "boolean"

@@ -34,3 +38,3 @@ ? propEnablePressedAndRipple

className: buttonThemeClassNames(providedProps),
disabled: props.disabled,
disabled: disabled,
disableRipple: disableRipple,

@@ -65,2 +69,3 @@ disableProgrammaticRipple: disableProgrammaticRipple,

Button.propTypes = {
type: PropTypes.oneOf(["button", "reset", "submit"]),
className: PropTypes.string,

@@ -67,0 +72,0 @@ theme: PropTypes.oneOf([

import cn from "classnames";
import { bem } from "@react-md/theme";
import { bem } from "@react-md/utils";
var block = bem("rmd-button");

@@ -14,3 +14,3 @@ /**

var _a;
var _b = props.buttonType, buttonType = _b === void 0 ? "text" : _b, _c = props.themeType, themeType = _c === void 0 ? "flat" : _c, _d = props.theme, theme = _d === void 0 ? "clear" : _d, disabled = props.disabled, className = props.className;
var _b = props.theme, theme = _b === void 0 ? "clear" : _b, _c = props.themeType, themeType = _c === void 0 ? "flat" : _c, _d = props.buttonType, buttonType = _d === void 0 ? "text" : _d, disabled = props.disabled, className = props.className;
var text = buttonType === "text";

@@ -17,0 +17,0 @@ var icon = buttonType === "icon";

@@ -18,4 +18,6 @@ "use strict";

if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;

@@ -34,2 +36,3 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable react/button-has-type */
var react_1 = __importStar(require("react"));

@@ -40,2 +43,3 @@ var states_1 = require("@react-md/states");

var _a = providedProps, theme = _a.theme, themeType = _a.themeType, buttonType = _a.buttonType, children = _a.children, forwardedRef = _a.forwardedRef, disableRipple = _a.disableRipple, disableProgrammaticRipple = _a.disableProgrammaticRipple, rippleTimeout = _a.rippleTimeout, rippleClassNames = _a.rippleClassNames, rippleClassName = _a.rippleClassName, rippleContainerClassName = _a.rippleContainerClassName, propEnablePressedAndRipple = _a.enablePressedAndRipple, props = __rest(_a, ["theme", "themeType", "buttonType", "children", "forwardedRef", "disableRipple", "disableProgrammaticRipple", "rippleTimeout", "rippleClassNames", "rippleClassName", "rippleContainerClassName", "enablePressedAndRipple"]);
var disabled = props.disabled;
var enablePressedAndRipple = typeof propEnablePressedAndRipple === "boolean"

@@ -47,3 +51,3 @@ ? propEnablePressedAndRipple

className: buttonThemeClassNames_1.default(providedProps),
disabled: props.disabled,
disabled: disabled,
disableRipple: disableRipple,

@@ -78,2 +82,3 @@ disableProgrammaticRipple: disableProgrammaticRipple,

Button.propTypes = {
type: PropTypes.oneOf(["button", "reset", "submit"]),
className: PropTypes.string,

@@ -80,0 +85,0 @@ theme: PropTypes.oneOf([

@@ -7,4 +7,4 @@ "use strict";

var classnames_1 = __importDefault(require("classnames"));
var theme_1 = require("@react-md/theme");
var block = theme_1.bem("rmd-button");
var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-button");
/**

@@ -20,3 +20,3 @@ * Creates a button theme based on the button theming props. This is really just used so that

var _a;
var _b = props.buttonType, buttonType = _b === void 0 ? "text" : _b, _c = props.themeType, themeType = _c === void 0 ? "flat" : _c, _d = props.theme, theme = _d === void 0 ? "clear" : _d, disabled = props.disabled, className = props.className;
var _b = props.theme, theme = _b === void 0 ? "clear" : _b, _c = props.themeType, themeType = _c === void 0 ? "flat" : _c, _d = props.buttonType, buttonType = _d === void 0 ? "text" : _d, disabled = props.disabled, className = props.className;
var text = buttonType === "text";

@@ -23,0 +23,0 @@ var icon = buttonType === "icon";

{
"name": "@react-md/button",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "This package is used to create buttons with the material design spec. There is built-in support to be able to render accessible clickable divs that look like buttons, or even apply button styles to any element.",

@@ -40,8 +40,8 @@ "scripts": {

"dependencies": {
"@react-md/elevation": "^2.0.0-alpha.5",
"@react-md/icon": "^2.0.0-alpha.5",
"@react-md/states": "^2.0.0-alpha.5",
"@react-md/theme": "^2.0.0-alpha.5",
"@react-md/typography": "^2.0.0-alpha.5",
"@react-md/utils": "^2.0.0-alpha.5",
"@react-md/elevation": "^2.0.0-alpha.6",
"@react-md/icon": "^2.0.0-alpha.6",
"@react-md/states": "^2.0.0-alpha.6",
"@react-md/theme": "^2.0.0-alpha.6",
"@react-md/typography": "^2.0.0-alpha.6",
"@react-md/utils": "^2.0.0-alpha.6",
"classnames": "^2.2.6"

@@ -58,3 +58,3 @@ },

},
"gitHead": "3210cd3047162980716f1eb07cb25b364a241a70"
"gitHead": "e3db6427d83e1a66980662f3656557cc07dfabcc"
}
import cn from "classnames";
import { bem } from "@react-md/theme";
import { bem } from "@react-md/utils";

@@ -79,5 +79,5 @@ /**

const {
theme = "clear",
themeType = "flat",
buttonType = "text",
themeType = "flat",
theme = "clear",
disabled,

@@ -84,0 +84,0 @@ className,

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

import React, { ReactNode, HTMLAttributes } from "react";
import React, { ButtonHTMLAttributes, ReactNode } from "react";
import { InteractionStatesOptions } from "@react-md/states";

@@ -10,3 +10,3 @@ import { Omit } from "@react-md/utils";

*/
export interface ButtonProps extends ButtonThemeProps, HTMLAttributes<HTMLButtonElement>, Omit<InteractionStatesOptions<HTMLButtonElement>, "disableSpacebarClick"> {
export interface ButtonProps extends ButtonThemeProps, ButtonHTMLAttributes<HTMLButtonElement>, Omit<InteractionStatesOptions<HTMLButtonElement>, "disableSpacebarClick"> {
/**

@@ -13,0 +13,0 @@ * The button's type attribute. This is set to "button" by default so that forms are not

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

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

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

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

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