Socket
Socket
Sign inDemoInstall

@chakra-ui/button

Package Overview
Dependencies
Maintainers
4
Versions
456
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/button - npm Package Compare versions

Comparing version 1.0.0-rc.0 to 1.0.0-rc.1

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [1.0.0-rc.1](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/button@1.0.0-rc.0...@chakra-ui/button@1.0.0-rc.1) (2020-08-06)
### Bug Fixes
- **button:** issue where spinner is not centered on lg button
([4245722](https://github.com/chakra-ui/chakra-ui/commit/4245722f560334dc24d714ba36daf49f78de9486))
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.0.0-rc.0](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/button@1.0.0-next.7...@chakra-ui/button@1.0.0-rc.0) (2020-07-26)

@@ -8,0 +20,0 @@

4

dist/cjs/button-group.js

@@ -28,4 +28,3 @@ "use strict";

exports.useButtonGroup = useButtonGroup;
var ButtonGroup = /*#__PURE__*/_react["default"].forwardRef(function ButtonGroup(props, ref) {
var ButtonGroup = /*#__PURE__*/(0, _system.forwardRef)(function ButtonGroup(props, ref) {
var size = props.size,

@@ -84,3 +83,2 @@ colorScheme = props.colorScheme,

});
exports.ButtonGroup = ButtonGroup;

@@ -87,0 +85,0 @@

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

function ButtonIcon(props) {
var ButtonIcon = function ButtonIcon(props) {
var children = props.children,

@@ -127,3 +127,3 @@ className = props.className,

}));
}
};

@@ -134,3 +134,3 @@ if (_utils.__DEV__) {

function ButtonSpinner(props) {
var ButtonSpinner = function ButtonSpinner(props) {
var label = props.label,

@@ -145,10 +145,14 @@ spacing = props.spacing,

className = props.className,
rest = _objectWithoutPropertiesLoose(props, ["label", "spacing", "children", "className"]);
__css = props.__css,
rest = _objectWithoutPropertiesLoose(props, ["label", "spacing", "children", "className", "__css"]);
var _className = (0, _utils.cx)("chakra-button__spinner", className);
var spinnerStyles = {
var spinnerStyles = _extends({
display: "flex",
alignItems: "center",
position: label ? "relative" : "absolute",
mr: label ? spacing : 0
};
}, __css);
return /*#__PURE__*/_react["default"].createElement(_system.chakra.div, _extends({

@@ -160,3 +164,3 @@ className: _className

}));
}
};

@@ -163,0 +167,0 @@ if (_utils.__DEV__) {

@@ -5,3 +5,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import { chakra } from "@chakra-ui/system";
import { chakra, forwardRef } from "@chakra-ui/system";
import { createContext, cx, __DEV__ } from "@chakra-ui/utils";

@@ -14,3 +14,3 @@ import React, { useMemo } from "react";

export { useButtonGroup };
export var ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(props, ref) {
export var ButtonGroup = /*#__PURE__*/forwardRef(function ButtonGroup(props, ref) {
var {

@@ -17,0 +17,0 @@ size,

@@ -94,3 +94,3 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function ButtonIcon(props) {
var ButtonIcon = props => {
var {

@@ -113,3 +113,3 @@ children,

}));
}
};

@@ -120,3 +120,3 @@ if (__DEV__) {

function ButtonSpinner(props) {
var ButtonSpinner = props => {
var {

@@ -130,12 +130,16 @@ label,

}),
className
className,
__css
} = props,
rest = _objectWithoutPropertiesLoose(props, ["label", "spacing", "children", "className"]);
rest = _objectWithoutPropertiesLoose(props, ["label", "spacing", "children", "className", "__css"]);
var _className = cx("chakra-button__spinner", className);
var spinnerStyles = {
var spinnerStyles = _extends({
display: "flex",
alignItems: "center",
position: label ? "relative" : "absolute",
mr: label ? spacing : 0
};
}, __css);
return /*#__PURE__*/React.createElement(chakra.div, _extends({

@@ -147,3 +151,3 @@ className: _className

}));
}
};

@@ -150,0 +154,0 @@ if (__DEV__) {

@@ -1,4 +0,3 @@

import { chakra, PropsOf, SystemProps, ThemingProps } from "@chakra-ui/system";
import React from "react";
export declare type ButtonGroupProps = PropsOf<typeof chakra.div> & ThemingProps & {
import { chakra, SystemProps, ThemingProps, GetProps } from "@chakra-ui/system";
export interface ButtonGroupProps extends GetProps<typeof chakra.div>, ThemingProps {
/**

@@ -18,8 +17,8 @@ * If `true`, the borderRadius of button that are direct children will be altered

spacing?: SystemProps["marginRight"];
};
declare type ButtonGroupContext = ThemingProps & {
}
interface ButtonGroupContext extends ThemingProps {
isDisabled?: boolean;
};
}
declare const useButtonGroup: () => ButtonGroupContext;
export { useButtonGroup };
export declare const ButtonGroup: React.ForwardRefExoticComponent<Pick<ButtonGroupProps, "p" | "slot" | "style" | "title" | "size" | "className" | "color" | "height" | "id" | "lang" | "width" | "role" | "tabIndex" | "cursor" | "d" | "display" | "fill" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "opacity" | "order" | "orientation" | "overflow" | "pointerEvents" | "spacing" | "stroke" | "textDecoration" | "transform" | "visibility" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "key" | "sx" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "left" | "right" | "top" | "bottom" | "as" | "_hover" | "_active" | "_focus" | "_highlighted" | "_focusWithin" | "_focusVisible" | "_disabled" | "_readOnly" | "_before" | "_after" | "_empty" | "_expanded" | "_checked" | "_grabbed" | "_pressed" | "_invalid" | "_valid" | "_loading" | "_selected" | "_hidden" | "_autofill" | "_even" | "_odd" | "_first" | "_last" | "_notFirst" | "_notLast" | "_visited" | "_activeLink" | "_indeterminate" | "_groupHover" | "_groupFocus" | "_groupActive" | "_groupDisabled" | "_groupInvalid" | "_groupChecked" | "_placeholder" | "_fullScreen" | "_selection" | "layerStyle" | "textStyle" | "apply" | "isTruncated" | "noOfLines" | "__css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "textColor" | "transition" | "transitionProperty" | "transitionTimingFunction" | "transitionDuration" | "lineHeight" | "textAlign" | "wordBreak" | "overflowWrap" | "textOverflow" | "textTransform" | "whiteSpace" | "textDecor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexBasis" | "flexDirection" | "flexDir" | "flex" | "justifySelf" | "alignSelf" | "flexGrow" | "flexShrink" | "transformOrigin" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "placeItems" | "w" | "boxSize" | "maxWidth" | "maxW" | "minWidth" | "minW" | "h" | "maxHeight" | "maxH" | "minHeight" | "minH" | "verticalAlign" | "overflowX" | "overflowY" | "boxSizing" | "border" | "borderWidth" | "borderStyle" | "borderColor" | "borderRadius" | "rounded" | "borderTop" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRight" | "borderBottom" | "borderLeft" | "borderTopRadius" | "roundedTop" | "borderRightRadius" | "roundedRight" | "borderBottomRadius" | "roundedBottom" | "borderLeftRadius" | "roundedLeft" | "borderTopLeftRadius" | "roundedTopLeft" | "borderTopRightRadius" | "roundedTopRight" | "borderBottomLeftRadius" | "roundedBottomLeft" | "borderBottomRightRadius" | "roundedBottomRight" | "borderX" | "borderY" | "boxShadow" | "shadow" | "textShadow" | "bg" | "background" | "bgColor" | "backgroundColor" | "backgroundImage" | "backgroundBlendMode" | "bgBlendMode" | "backgroundSize" | "bgPos" | "backgroundPosition" | "bgImage" | "bgImg" | "bgRepeat" | "backgroundRepeat" | "bgSize" | "bgAttachment" | "backgroundAttachment" | "bgPosition" | "listStyleType" | "listStylePosition" | "listStylePos" | "listStyleImage" | "listStyleImg" | "zIndex" | "inset" | "insetX" | "insetY" | "pos" | "position" | "outline" | "outlineOffset" | "outlineColor" | "animation" | "appearance" | "userSelect" | "resize" | "objectFit" | "objectPosition" | "float" | "willChange" | "htmlWidth" | "htmlHeight" | "htmlSize" | "variant" | "colorScheme" | "isAttached" | "isDisabled"> & React.RefAttributes<any>>;
export declare const ButtonGroup: import("@chakra-ui/system").ComponentWithAs<"div", ButtonGroupProps>;

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

import { chakra, PropsOf, SystemProps, ThemingProps } from "@chakra-ui/system";
import { chakra, GetProps, SystemProps, ThemingProps } from "@chakra-ui/system";
import { ReactElement } from "react";

@@ -46,3 +46,4 @@ export interface ButtonOptions {

}
export declare type ButtonProps = PropsOf<typeof chakra.button> & ButtonOptions & ThemingProps;
export declare const Button: import("@chakra-ui/system").ForwardRefComponent<ButtonProps>;
export interface ButtonProps extends GetProps<typeof chakra.button>, ButtonOptions, ThemingProps {
}
export declare const Button: import("@chakra-ui/system").ComponentWithAs<"button", ButtonProps>;

@@ -5,8 +5,8 @@ import { ReactElement } from "react";

declare type BaseButtonProps = Omit<ButtonProps, Omitted>;
export declare type IconButtonProps = BaseButtonProps & {
export interface IconButtonProps extends BaseButtonProps {
icon?: ReactElement;
isRound?: boolean;
"aria-label": string;
};
export declare const IconButton: import("@chakra-ui/system").ForwardRefComponent<IconButtonProps>;
}
export declare const IconButton: import("@chakra-ui/system").ComponentWithAs<"button", IconButtonProps>;
export {};
{
"name": "@chakra-ui/button",
"version": "1.0.0-rc.0",
"version": "1.0.0-rc.1",
"description": "A React component that is a base button.",

@@ -50,7 +50,7 @@ "keywords": [

"devDependencies": {
"@chakra-ui/system": "1.0.0-rc.0"
"@chakra-ui/system": "1.0.0-rc.1"
},
"dependencies": {
"@chakra-ui/spinner": "1.0.0-rc.0",
"@chakra-ui/utils": "1.0.0-rc.0"
"@chakra-ui/spinner": "1.0.0-rc.1",
"@chakra-ui/utils": "1.0.0-rc.1"
},

@@ -61,3 +61,3 @@ "peerDependencies": {

},
"gitHead": "60392008d42867da38211687e2491f02da9975a9"
"gitHead": "e0470c73a9f6be24525dc5458d6fb157096b5ae3"
}

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