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

@arterial/chips

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arterial/chips - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.js

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

import e from"react";import t from"prop-types";import c from"classnames";function r(e,t){if(null==e)return{};var c,r,n=function(e,t){if(null==e)return{};var c,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)c=i[r],t.indexOf(c)>=0||(n[c]=e[c]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)c=i[r],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(n[c]=e[c])}return n}function n(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function i(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,r)}return c}function o(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?i(Object(c),!0).forEach((function(t){n(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):i(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var a=e.forwardRef((function(t,r){var n=t.className,i=t.icon,a=function(e,t){if(null==e)return{};var c,r,n=function(e,t){if(null==e)return{};var c,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)c=i[r],t.indexOf(c)>=0||(n[c]=e[c]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)c=i[r],t.indexOf(c)>=0||Object.prototype.propertyIsEnumerable.call(e,c)&&(n[c]=e[c])}return n}(t,["className","icon"]);if("string"==typeof i){var l=c("art-icon","material-icons",n);return e.createElement("i",Object.assign({className:l,ref:r},a),i)}var s=i.props.className&&!i.props.className.includes("art-icon"),p=c({"art-icon":s},i.props.className,n),m=o(o(o({},a),i.props),{},{className:p,ref:r});return e.cloneElement(i,m)}));function l(t){var n=t.children,i=t.className,o=t.choice,a=t.filter,l=t.input,s=t.tag,p=void 0===s?"div":s,m=r(t,["children","className","choice","filter","input","tag"]),d=c("mdc-chip-set",i,{"mdc-chip-set--choice":o,"mdc-chip-set--filter":a,"mdc-chip-set--input":l}),f=p;return e.createElement(f,Object.assign({className:d,role:"grid"},m),n)}function s(t){var n=t.checkmark,i=t.className,o=t.icon,l=t.id,s=t.onSelect,p=t.onTrailingIconSelect,m=t.ripple,d=void 0===m||m,f=t.selected,u=t.text,b=t.trailingIcon,g=t.tag,h=void 0===g?"div":g,y=r(t,["checkmark","className","icon","id","onSelect","onTrailingIconSelect","ripple","selected","text","trailingIcon","tag"]),O=c("mdc-chip",i,{"mdc-chip--selected":f}),v=c("mdc-chip__icon","mdc-chip__icon--leading",{"mdc-chip__icon--leading-hidden":n&&f}),k=c("mdc-chip__icon","mdc-chip__icon--trailing"),N=h;function j(e){var t="click"===e.type,c="Enter"===e.key||13===e.keyCode,r="Spacebar"===e.key||32===e.keyCode;return t||c||r}function _(e){p&&j(e)&&p(l)}function E(e){s&&j(e)&&s()}return e.createElement(N,Object.assign({className:O,id:l,onClick:E,onKeyDown:E,role:"row"},y),d&&e.createElement("div",{className:"mdc-chip__ripple"}),o&&e.createElement(a,{className:v,icon:o}),n&&e.createElement("span",{className:"mdc-chip__checkmark"},e.createElement("svg",{className:"mdc-chip__checkmark-svg",viewBox:"-2 -3 30 30"},e.createElement("path",{className:"mdc-chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}))),u&&e.createElement("span",{role:"gridcell"},e.createElement("span",{className:"mdc-chip__primary-action",role:"button",tabIndex:"0"},e.createElement("span",{className:"mdc-chip__text"},u))),b&&e.createElement(a,{className:k,icon:b,role:"button",tabIndex:p?0:-1,onKeyDown:_,onClick:_}))}a.propTypes={className:t.string,icon:t.node.isRequired},l.propTypes={children:t.node,className:t.string,choice:t.bool,filter:t.bool,input:t.bool,tag:t.element},s.propTypes={checkmark:t.bool,className:t.string,icon:t.node,id:t.string,onSelect:t.func,onTrailingIconSelect:t.func,ripple:t.bool,selected:t.bool,text:t.string,trailingIcon:t.node,tag:t.element};export{s as Chip,l as ChipSet};
import e from"react";import c from"prop-types";import t from"classnames";function r(e,c,t){return c in e?Object.defineProperty(e,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[c]=t,e}function n(e,c){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);c&&(r=r.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var c=1;c<arguments.length;c++){var t=null!=arguments[c]?arguments[c]:{};c%2?n(Object(t),!0).forEach((function(c){r(e,c,t[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(t,c))}))}return e}function o(e,c){if(null==e)return{};var t,r,n=function(e,c){if(null==e)return{};var t,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],c.indexOf(t)>=0||(n[t]=e[t]);return n}(e,c);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],c.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var a=e.forwardRef((function(c,r){var n=c.className,a=c.icon,l=o(c,["className","icon"]);if("string"==typeof a){var s=t("art-icon","material-icons",n);return e.createElement("i",Object.assign({className:s,ref:r},l),a)}var p=a.props.className&&!a.props.className.includes("art-icon"),m=t({"art-icon":p},a.props.className,n),d=i(i(i({},l),a.props),{},{className:m,ref:r});return e.cloneElement(a,d)}));function l(c){var r=c.children,n=c.className,i=c.choice,a=c.filter,l=c.input,s=c.tag,p=void 0===s?"div":s,m=o(c,["children","className","choice","filter","input","tag"]),d=t("mdc-chip-set",n,{"mdc-chip-set--choice":i,"mdc-chip-set--filter":a,"mdc-chip-set--input":l}),f=p;return e.createElement(f,Object.assign({className:d,role:"grid"},m),r)}function s(c){var r=c.checkmark,n=c.className,i=c.icon,l=c.id,s=c.onSelect,p=c.onTrailingIconSelect,m=c.ripple,d=void 0===m||m,f=c.selected,u=c.text,b=c.trailingIcon,g=c.tag,h=void 0===g?"div":g,y=o(c,["checkmark","className","icon","id","onSelect","onTrailingIconSelect","ripple","selected","text","trailingIcon","tag"]),O=t("mdc-chip",n,{"mdc-chip--selected":f}),v=t("mdc-chip__icon","mdc-chip__icon--leading",{"mdc-chip__icon--leading-hidden":r&&f}),N=t("mdc-chip__icon","mdc-chip__icon--trailing"),k=h;function _(e){var c="click"===e.type,t="Enter"===e.key||13===e.keyCode,r="Spacebar"===e.key||32===e.keyCode;return c||t||r}function j(e){p&&_(e)&&p(l)}function E(e){s&&_(e)&&s()}return e.createElement(k,Object.assign({className:O,id:l,onClick:E,onKeyDown:E,role:"row"},y),d&&e.createElement("div",{className:"mdc-chip__ripple"}),i&&e.createElement(a,{className:v,icon:i}),r&&e.createElement("span",{className:"mdc-chip__checkmark"},e.createElement("svg",{className:"mdc-chip__checkmark-svg",viewBox:"-2 -3 30 30"},e.createElement("path",{className:"mdc-chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}))),u&&e.createElement("span",{role:"gridcell"},e.createElement("span",{className:"mdc-chip__primary-action",role:"button",tabIndex:"0"},e.createElement("span",{className:"mdc-chip__text"},u))),b&&e.createElement(a,{className:N,icon:b,role:"button",tabIndex:p?0:-1,onKeyDown:j,onClick:j}))}a.propTypes={className:c.string,icon:c.node.isRequired},l.propTypes={children:c.node,className:c.string,choice:c.bool,filter:c.bool,input:c.bool,tag:c.element},s.propTypes={checkmark:c.bool,className:c.string,icon:c.node,id:c.string,onSelect:c.func,onTrailingIconSelect:c.func,ripple:c.bool,selected:c.bool,text:c.string,trailingIcon:c.node,tag:c.element};export{s as Chip,l as ChipSet};
{
"name": "@arterial/chips",
"version": "1.0.1",
"version": "1.0.2",
"description": "Another React Material Chips",

@@ -26,5 +26,5 @@ "author": "jdc2000",

"dependencies": {
"@arterial/icon": "^1.0.1"
"@arterial/icon": "^1.0.2"
},
"gitHead": "579426a673307c339215bf1c3a3ebc90d192ac0c"
"gitHead": "bb85e37dfa1618c7e06acf1c1b35d12eed5ffae7"
}
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