New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

boundless-button

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boundless-button - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

build/index.js

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

module.exports=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([function(e,n){e.exports=require("boundless-utils-omit-keys")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function s(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var p=t(2),i=t.n(p),u=t(1),a=t.n(u),c=t(0),l=t.n(c),f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),d=function(e){function n(){var e,t,s,p;r(this,n);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return t=s=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),s.handleClick=function(e){s.props.disabled||(s.props.onClick(e),s.fireStatefulCallback(e))},s.handleKeyDown=function(e){if(!s.props.disabled)switch(s.props.onKeyDown(e),e.key){case"Enter":case"Space":e.preventDefault(),s.fireStatefulCallback(e)}},p=t,o(s,p)}return s(n,e),y(n,[{key:"fireStatefulCallback",value:function(e){this.props[this.props.pressed?"onUnpressed":"onPressed"](e)}},{key:"render",value:function(){return i.a.createElement(this.props.component,f({},l()(this.props,n.internalKeys),{className:a()("b-button",this.props.className,{"b-button-pressable":void 0!==this.props.pressed,"b-button-pressed":this.props.pressed}),"aria-pressed":this.props.pressed,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleClick}),this.props.children)}}]),n}(i.a.PureComponent);d.propTypes={"*":p.PropTypes.any,component:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.func]),onPressed:p.PropTypes.func,onUnpressed:p.PropTypes.func,pressed:p.PropTypes.bool},d.defaultProps={component:"button",onClick:function(){},onKeyDown:function(){},onPressed:function(){},onUnpressed:function(){},pressed:void 0},d.internalKeys=Object.keys(d.defaultProps),n.default=d}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDZmZTg3MTNiODQzYWNhOTNkMjE3Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy11dGlscy1vbWl0LWtleXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY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kNsaWNrKGV2ZW50KTtcbiAgICAgICAgdGhpcy5maXJlU3RhdGVmdWxDYWxsYmFjayhldmVudCk7XG4gICAgfVxuXG4gICAgaGFuZGxlS2V5RG93biA9IChldmVudCkgPT4ge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5kaXNhYmxlZCkgeyByZXR1cm47IH1cblxuICAgICAgICB0aGlzLnByb3BzLm9uS2V5RG93bihldmVudCk7XG5cbiAgICAgICAgc3dpdGNoIChldmVudC5rZXkpIHtcbiAgICAgICAgY2FzZSAnRW50ZXInOlxuICAgICAgICBjYXNlICdTcGFjZSc6XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgdGhpcy5maXJlU3RhdGVmdWxDYWxsYmFjayhldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBCdXR0b24uaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWJ1dHRvbicsIHRoaXMucHJvcHMuY2xhc3NOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICdiLWJ1dHRvbi1wcmVzc2FibGUnOiB0aGlzLnByb3BzLnByZXNzZWQgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgJ2ItYnV0dG9uLXByZXNzZWQnOiB0aGlzLnByb3BzLnByZXNzZWQsXG4gICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgICAgYXJpYS1wcmVzc2VkPXt0aGlzLnByb3BzLnByZXNzZWR9XG4gICAgICAgICAgICAgICAgcm9sZT0nYnV0dG9uJ1xuICAgICAgICAgICAgICAgIG9uS2V5RG93bj17dGhpcy5oYW5kbGVLZXlEb3dufVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e3RoaXMuaGFuZGxlQ2xpY2t9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgICAgICAgPC90aGlzLnByb3BzLmNvbXBvbmVudD5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtYnV0dG9uL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ==
module.exports=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([function(e,n){e.exports=require("boundless-utils-omit-keys")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function s(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var p=t(2),i=(t.n(p),t(1)),u=t.n(i),c=t(0),a=t.n(c),l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),y=function(e){function n(){var e,t,s,p;r(this,n);for(var i=arguments.length,u=Array(i),c=0;c<i;c++)u[c]=arguments[c];return t=s=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),s.handleClick=function(e){s.props.disabled||(s.props.onClick(e),s.fireStatefulCallback(e))},s.handleKeyDown=function(e){if(!s.props.disabled)switch(s.props.onKeyDown(e),e.key){case"Enter":case"Space":e.preventDefault(),s.fireStatefulCallback(e)}},p=t,o(s,p)}return s(n,e),f(n,[{key:"fireStatefulCallback",value:function(e){this.props[this.props.pressed?"onUnpressed":"onPressed"](e)}},{key:"render",value:function(){return t.i(p.createElement)(this.props.component,l({},a()(this.props,n.internalKeys),{className:u()("b-button",this.props.className,{"b-button-pressable":void 0!==this.props.pressed,"b-button-pressed":this.props.pressed}),"aria-pressed":this.props.pressed,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleClick}),this.props.children)}}]),n}(p.PureComponent);y.propTypes={"*":p.PropTypes.any,component:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.func]),onPressed:p.PropTypes.func,onUnpressed:p.PropTypes.func,pressed:p.PropTypes.bool},y.defaultProps={component:"button",onClick:function(){},onKeyDown:function(){},onPressed:function(){},onUnpressed:function(){},pressed:void 0},y.internalKeys=Object.keys(y.defaultProps),n.default=y}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDNjZDI5ODZkYTRmOTEyNWJjZWEyIiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzc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GljayhldmVudCk7XG4gICAgICAgIHRoaXMuZmlyZVN0YXRlZnVsQ2FsbGJhY2soZXZlbnQpO1xuICAgIH1cblxuICAgIGhhbmRsZUtleURvd24gPSAoZXZlbnQpID0+IHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMuZGlzYWJsZWQpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgdGhpcy5wcm9wcy5vbktleURvd24oZXZlbnQpO1xuXG4gICAgICAgIHN3aXRjaCAoZXZlbnQua2V5KSB7XG4gICAgICAgIGNhc2UgJ0VudGVyJzpcbiAgICAgICAgY2FzZSAnU3BhY2UnOlxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuZmlyZVN0YXRlZnVsQ2FsbGJhY2soZXZlbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgQnV0dG9uLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1idXR0b24nLCB0aGlzLnByb3BzLmNsYXNzTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAnYi1idXR0b24tcHJlc3NhYmxlJzogdGhpcy5wcm9wcy5wcmVzc2VkICE9PSB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgICdiLWJ1dHRvbi1wcmVzc2VkJzogdGhpcy5wcm9wcy5wcmVzc2VkLFxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIGFyaWEtcHJlc3NlZD17dGhpcy5wcm9wcy5wcmVzc2VkfVxuICAgICAgICAgICAgICAgIHJvbGU9J2J1dHRvbidcbiAgICAgICAgICAgICAgICBvbktleURvd249e3RoaXMuaGFuZGxlS2V5RG93bn1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXt0aGlzLmhhbmRsZUNsaWNrfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgICAgIDwvdGhpcy5wcm9wcy5jb21wb25lbnQ+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWJ1dHRvbi9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0=

@@ -1,5 +0,5 @@

import React from 'react';
import Button from '../index';
import {createElement, PureComponent} from 'react';
import Button from '../';
export default class ButtonDemo extends React.PureComponent {
export default class ButtonDemo extends PureComponent {
state = {

@@ -6,0 +6,0 @@ pressed: false,

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

import React, {PropTypes} from 'react';
import {createElement, PropTypes, PureComponent} from 'react';
import cx from 'classnames';

@@ -7,30 +7,31 @@

/**
__A control with "pressed" state support.__
Button has two modes of operation:
1. stateless (like a normal `<button>`)
```jsx
<Button onPressed={doSomething}>foo</Button>
```
> Note that instead of `onClick`, Button uses `onPressed`. This is because the component also listens for keyboard <kbd>Enter</kbd> events, so `onClick` only tells half the story. You can still bind to that particular React event though if there's a need to tell the difference between clicks and Enter presses.
2. stateful (like a toggle, e.g. bold-mode in a rich text editor)
"stateful" mode is triggered by passing a boolean to `props.pressed`. This enables the button to act like a controlled component. The `onUnpressed` event callback will also now be fired when appropriate.
```jsx
<Button
pressed={true}
onPressed={doSomething}
onUnpressed={doSomethingElse}>
foo
</Button>
```
* Button has two modes of operation:
*
* 1. stateless (like a normal `<button>`)
* ```jsx
* <Button onPressed={doSomething}>foo</Button>
* ```
*
* > Note that instead of `onClick`, Button uses `onPressed`. This is because the component also listens for keyboard
* <kbd>Enter</kbd> events, so `onClick` only tells half the story. You can still bind to that particular React event
* though if there's a need to tell the difference between clicks and Enter presses.
*
* 2. stateful (like a toggle, e.g. bold-mode in a rich text editor)
* "stateful" mode is triggered by passing a boolean to `props.pressed`. This enables the button to act like a
* controlled component. The `onUnpressed` event callback will also now be fired when appropriate.
*
* ```jsx
* <Button
* pressed={true}
* onPressed={doSomething}
* onUnpressed={doSomethingElse}>
* foo
* </Button>
* ```
*/
export default class Button extends React.PureComponent {
export default class Button extends PureComponent {
static propTypes = {
/**
* any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes)
* any [React-supported attribute]
* (https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes)
*/

@@ -37,0 +38,0 @@ '*': PropTypes.any,

/* eslint no-unused-expressions:0 */
import React from 'react';
import {createElement} from 'react';
import ReactDOM from 'react-dom';

@@ -5,0 +5,0 @@ import {Simulate} from 'react-addons-test-utils';

{
"name": "boundless-button",
"version": "1.0.3",
"version": "1.0.4",
"description": "A control with \"pressed\" state support.",

@@ -19,3 +19,3 @@ "main": "build/index.js",

"contributors": [
"Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com)",
"Evan Scott <probablyup@gmail.com> (http://yaycmyk.com)",
"Abe Rubenstein <abe.rubenstein@enigma.io>",

@@ -28,6 +28,6 @@ "Jenn Creighton <jenn.creighton@enigma.io>"

},
"homepage": "http://boundless.js.org/Button",
"homepage": "https://boundless.js.org/Button",
"dependencies": {
"classnames": "^2.1.5",
"boundless-utils-omit-keys": "^1.0.3"
"boundless-utils-omit-keys": "^1.0.4"
},

@@ -34,0 +34,0 @@ "peerDependencies": {

@@ -6,4 +6,2 @@ <!---

__A control with "pressed" state support.__
Button has two modes of operation:

@@ -16,8 +14,10 @@

> Note that instead of `onClick`, Button uses `onPressed`. This is because the component also listens for keyboard <kbd>Enter</kbd> events, so `onClick` only tells half the story. You can still bind to that particular React event though if there's a need to tell the difference between clicks and Enter presses.
> Note that instead of `onClick`, Button uses `onPressed`. This is because the component also listens for keyboard
<kbd>Enter</kbd> events, so `onClick` only tells half the story. You can still bind to that particular React event
though if there's a need to tell the difference between clicks and Enter presses.
2. stateful (like a toggle, e.g. bold-mode in a rich text editor)
"stateful" mode is triggered by passing a boolean to `props.pressed`. This enables the button to act like a
controlled component. The `onUnpressed` event callback will also now be fired when appropriate.
"stateful" mode is triggered by passing a boolean to `props.pressed`. This enables the button to act like a controlled component. The `onUnpressed` event callback will also now be fired when appropriate.
```jsx

@@ -42,6 +42,8 @@ <Button

```jsx
import React from 'react';
/** @jsx createElement */
import {createElement, PureComponent} from 'react';
import Button from 'boundless-button';
export default class ButtonDemo extends React.PureComponent {
export default class ButtonDemo extends PureComponent {
state = {

@@ -107,3 +109,3 @@ pressed: false,

> Note: only top-level props are in the README, for the full list check out the [website](http://boundless.js.org/Button).
> Note: only top-level props are in the README, for the full list check out the [website](https://boundless.js.org/Button).

@@ -117,9 +119,10 @@ ### Required Props

- __`*`__ ・ any [React-supported attribute](https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes)
- __`*`__ &middot; any [React-supported attribute]
(https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes)
Expects | Default Value
- | -
--- | ---
`any` | `n/a`
- __`component`__ ・ any valid HTML tag name or a ReactComponent, anything that can be passed as the
- __`component`__ &middot; any valid HTML tag name or a ReactComponent, anything that can be passed as the
first argument to `React.createElement`; note that this component sets the `role` and `aria-checked`

@@ -129,21 +132,21 @@ attributes so non-`<button>` elements will still behave like a button for screen readers

Expects | Default Value
- | -
--- | ---
`string or function` | `'button'`
- __`onPressed`__ ・ use this callback instead of `onClick` (it's `onClick` + `onKeyDown:Enter`); fires for both button modes
- __`onPressed`__ &middot; use this callback instead of `onClick` (it's `onClick` + `onKeyDown:Enter`); fires for both button modes
Expects | Default Value
- | -
--- | ---
`function` | `() => {}`
- __`onUnpressed`__ ・ called when the element becomes "unpressed"; only fires when the Button is in stateful mode
- __`onUnpressed`__ &middot; called when the element becomes "unpressed"; only fires when the Button is in stateful mode
Expects | Default Value
- | -
--- | ---
`function` | `() => {}`
- __`pressed`__ ・ passthrough to `aria-pressed`; using this prop turns on the `onUnpressed` callback when applicable
- __`pressed`__ &middot; passthrough to `aria-pressed`; using this prop turns on the `onUnpressed` callback when applicable
Expects | Default Value
- | -
--- | ---
`bool` | `undefined`

@@ -154,7 +157,6 @@

### Stylus
You can see what variables are available to override in [variables.styl](https://github.com/enigma-io/boundless/blob/master/variables.styl).
```stylus
// Bring in Boundless's base Stylus variables
@require "node_modules/boundless-button/variables"
// Redefine any variables as desired, e.g.
// Redefine any variables as desired, e.g:
color-accent = royalblue

@@ -161,0 +163,0 @@

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