Socket
Socket
Sign inDemoInstall

@entur/chip

Package Overview
Dependencies
Maintainers
13
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/chip - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

6

CHANGELOG.md

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

## [0.2.6](https://bitbucket.org/enturas/design-system/compare/@entur/chip@0.2.5...@entur/chip@0.2.6) (2020-01-08)
### Bug Fixes
- warn in development if the developer have forgotten the CSS ([e5c30fc](https://bitbucket.org/enturas/design-system/commits/e5c30fc08624ef22c02773892778abd92205c6b0))
## [0.2.5](https://bitbucket.org/enturas/design-system/compare/@entur/chip@0.2.4...@entur/chip@0.2.5) (2020-01-06)

@@ -8,0 +14,0 @@

3

dist/chip.cjs.development.js

@@ -5,2 +5,3 @@ 'use strict';

var utils = require('@entur/utils');
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));

@@ -108,2 +109,4 @@ var React = _interopDefault(require('react'));

utils.warnAboutMissingStyles('chip', 'form');
exports.ActionChip = ActionChip;

@@ -110,0 +113,0 @@ exports.ChoiceChip = ChoiceChip;

2

dist/chip.cjs.production.min.js

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=e(require("@babel/runtime/helpers/objectWithoutProperties")),t=e(require("react")),r=e(require("classnames")),i=require("@entur/form"),a=t.createContext(null),c=a.Provider,s=t.forwardRef((function(e,i){var c=e.className,s=e.children,o=e.value,l=e.disabled,h=void 0!==l&&l,u=e.style,d=n(e,["className","children","value","disabled","style"]),p=t.Children.toArray(s),m=r(c,"eds-chip",{"eds-chip--disabled":h,"eds-chip--leading-icon":p.length>1&&"string"!=typeof p[0],"eds-chip--trailing-icon":p.length>1&&"string"!=typeof p[p.length-1]}),g=function(){var e=t.useContext(a);if(!e)throw new Error("You need to wrap your ChoiceChips in a ChoiceChipGroup-component");return e}();return t.createElement("label",{className:"eds-choice-chip",style:u},t.createElement("input",Object.assign({className:"eds-choice-chip__input",type:"radio",name:g.name,ref:i,value:o,disabled:h,checked:g.value===o,onChange:g.onChange},d)),t.createElement("div",{className:m},s))}));exports.ActionChip=t.forwardRef((function(e,i){var a=e.children,c=e.className,s=n(e,["children","className"]),o=t.Children.toArray(a);return t.createElement("button",Object.assign({className:r("eds-chip","eds-action-chip",{"eds-chip--leading-icon":o.length>1&&"string"!=typeof o[0],"eds-chip--trailing-icon":o.length>1&&"string"!=typeof o[o.length-1]},c),ref:i,type:"button"},s),a)})),exports.ChoiceChip=s,exports.ChoiceChipGroup=function(e){var r=e.name,a=e.value,s=e.children,o=e.onChange,l=n(e,["name","value","children","onChange"]),h=t.useMemo((function(){return{name:r,value:a,onChange:o}}),[r,a,o]);return t.createElement(c,{value:h},t.createElement(i.Fieldset,Object.assign({className:"eds-choice-chips-group"},l),s))};
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=require("@entur/utils"),t=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=e(require("react")),i=e(require("classnames")),a=require("@entur/form"),c=r.createContext(null),s=c.Provider,o=r.forwardRef((function(e,n){var a=e.className,s=e.children,o=e.value,l=e.disabled,h=void 0!==l&&l,u=e.style,d=t(e,["className","children","value","disabled","style"]),p=r.Children.toArray(s),m=i(a,"eds-chip",{"eds-chip--disabled":h,"eds-chip--leading-icon":p.length>1&&"string"!=typeof p[0],"eds-chip--trailing-icon":p.length>1&&"string"!=typeof p[p.length-1]}),g=function(){var e=r.useContext(c);if(!e)throw new Error("You need to wrap your ChoiceChips in a ChoiceChipGroup-component");return e}();return r.createElement("label",{className:"eds-choice-chip",style:u},r.createElement("input",Object.assign({className:"eds-choice-chip__input",type:"radio",name:g.name,ref:n,value:o,disabled:h,checked:g.value===o,onChange:g.onChange},d)),r.createElement("div",{className:m},s))})),l=r.forwardRef((function(e,n){var a=e.children,c=e.className,s=t(e,["children","className"]),o=r.Children.toArray(a);return r.createElement("button",Object.assign({className:i("eds-chip","eds-action-chip",{"eds-chip--leading-icon":o.length>1&&"string"!=typeof o[0],"eds-chip--trailing-icon":o.length>1&&"string"!=typeof o[o.length-1]},c),ref:n,type:"button"},s),a)}));n.warnAboutMissingStyles("chip","form"),exports.ActionChip=l,exports.ChoiceChip=o,exports.ChoiceChipGroup=function(e){var n=e.name,i=e.value,c=e.children,o=e.onChange,l=t(e,["name","value","children","onChange"]),h=r.useMemo((function(){return{name:n,value:i,onChange:o}}),[n,i,o]);return r.createElement(s,{value:h},r.createElement(a.Fieldset,Object.assign({className:"eds-choice-chips-group"},l),c))};
//# sourceMappingURL=chip.cjs.production.min.js.map

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

import { warnAboutMissingStyles } from '@entur/utils';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';

@@ -103,3 +104,5 @@ import React from 'react';

warnAboutMissingStyles('chip', 'form');
export { ActionChip, ChoiceChip, ChoiceChipGroup };
//# sourceMappingURL=chip.esm.js.map
{
"name": "@entur/chip",
"version": "0.2.5",
"version": "0.2.6",
"license": "EUPL-1.2",

@@ -30,7 +30,8 @@ "main": "dist/index.js",

"dependencies": {
"@entur/form": "^2.1.0",
"@entur/form": "^2.1.1",
"@entur/tokens": "^1.1.1",
"@entur/utils": "^0.2.0",
"classnames": "^2.2.6"
},
"gitHead": "1755d311b4cb5121c90a6abf85c17a9dfc530abe"
"gitHead": "a3e6403fb40b6400fe24cf22b47c00495740a940"
}

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