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

@contentful/f36-pill

Package Overview
Dependencies
Maintainers
104
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-pill - npm Package Compare versions

Comparing version 4.0.1-next-v4-7926.2330 to 4.0.1-next-v4-7936.2331

2

dist/module.js

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

import e from"@babel/runtime/helpers/esm/extends";import{cx as a,css as t}from"emotion";import o from"react";import{CloseIcon as r,DragIcon as n}from"@contentful/f36-icons";import{Button as i}from"@contentful/f36-button";import l from"@contentful/f36-tokens";var s,c,d,u;s={},c="Pill",d=()=>m,Object.defineProperty(s,c,{get:d,set:u,enumerable:!0,configurable:!0});const g=e=>t({display:"inline-flex",fontFamily:l.fontStackPrimary,alignItems:"center",borderRadius:l.borderRadiusSmall,border:"none",padding:0,maxWidth:"100%",...(e=>{switch(e){case"active":return{background:l.gray300};case"deleted":return{background:l.gray200,textDecoration:"line-through",opacity:"0.5"};default:return{background:l.gray200}}})(e)},"");const m=o.forwardRef(((s,c)=>{const{label:d,onClose:u,testId:m="cf-ui-pill",onDrag:f,className:p,dragHandleComponent:b,variant:y="idle",...h}=s,v=function(e){return{closeButton:t({borderLeft:`1px solid ${l.gray400}`,borderTopLeftRadius:0,borderBottomLeftRadius:0,padding:l.spacingXs,minHeight:"auto",transition:`background ${l.transitionDurationShort} ${l.transitionEasingDefault},\n opacity ${l.transitionDurationDefault} ${l.transitionEasingDefault}`,"&:focus":{boxShadow:l.glowMuted,borderLeftColor:l.gray300},"&:hover, &:focus, &:active":{backgroundColor:l.gray300}},""),label:t({color:l.gray700,lineHeight:l.lineHeightM,padding:l.spacingXs,fontSize:l.fontSizeM,flexGrow:2,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},""),icon:t({fill:l.gray600,verticalAlign:"middle",outline:"none"},""),dragIcon:t({padding:l.spacingXs,paddingRight:0,cursor:"move"},""),pill:g(e)}}(y);return o.createElement("div",e({className:a(v.pill,p),"data-test-id":m,onDrag:f,ref:c},h),f&&(b||o.createElement("span",{"aria-label":"Drag handler",className:v.dragIcon},o.createElement(n,{className:v.icon,variant:"muted"}))),o.createElement("span",{title:d,className:v.label},d),u&&o.createElement(i,{type:"button",variant:"transparent",icon:o.createElement(r,{"aria-label":"Close"}),"aria-label":"Close",onClick:u,className:v.closeButton}))}));m.displayName="Pill";export{m as Pill};
import e from"@babel/runtime/helpers/esm/extends";import{cx as a,css as t}from"emotion";import o from"react";import{DragIcon as r,CloseIcon as n}from"@contentful/f36-icons";import{Button as i}from"@contentful/f36-button";import l from"@contentful/f36-tokens";var s,c,d,u;s={},c="Pill",d=()=>m,Object.defineProperty(s,c,{get:d,set:u,enumerable:!0,configurable:!0});const g=e=>t({display:"inline-flex",fontFamily:l.fontStackPrimary,alignItems:"center",borderRadius:l.borderRadiusSmall,border:"none",padding:0,maxWidth:"100%",...(e=>{switch(e){case"active":return{background:l.gray300};case"deleted":return{background:l.gray200,textDecoration:"line-through",opacity:"0.5"};default:return{background:l.gray200}}})(e)},"");const m=o.forwardRef(((s,c)=>{const{label:d,onClose:u,testId:m="cf-ui-pill",onDrag:f,className:p,dragHandleComponent:b,variant:y="idle",...h}=s,v=function(e){return{closeButton:t({borderLeft:`1px solid ${l.gray400}`,borderTopLeftRadius:0,borderBottomLeftRadius:0,padding:l.spacingXs,minHeight:"auto",transition:`background ${l.transitionDurationShort} ${l.transitionEasingDefault},\n opacity ${l.transitionDurationDefault} ${l.transitionEasingDefault}`,"&:focus":{boxShadow:l.glowMuted,borderLeftColor:l.gray300},"&:hover, &:focus, &:active":{backgroundColor:l.gray300}},""),label:t({color:l.gray700,lineHeight:l.lineHeightM,padding:l.spacingXs,fontSize:l.fontSizeM,flexGrow:2,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},""),icon:t({fill:l.gray600,verticalAlign:"middle",outline:"none"},""),dragIcon:t({padding:l.spacingXs,paddingRight:0,cursor:"move"},""),pill:g(e)}}(y);return o.createElement("div",e({className:a(v.pill,p),"data-test-id":m,onDrag:f,ref:c},h),f&&(b||o.createElement("span",{"aria-label":"Drag handler",className:v.dragIcon},o.createElement(r,{className:v.icon,variant:"muted"}))),o.createElement("span",{title:d,className:v.label},d),u&&o.createElement(i,{type:"button",variant:"transparent",icon:o.createElement(n,{"aria-label":"Close"}),"aria-label":"Close",onClick:u,className:v.closeButton}))}));m.displayName="Pill";export{m as Pill};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-pill",
"version": "4.0.1-next-v4-7926.2330+dd855845",
"version": "4.0.1-next-v4-7936.2331+0b72b731",
"description": "Forma 36: Pill component",

@@ -10,6 +10,6 @@ "scripts": {

"@babel/runtime": "^7.6.2",
"@contentful/f36-button": "4.0.1-next-v4-7926.2330+dd855845",
"@contentful/f36-core": "4.0.1-next-v4-7926.2330+dd855845",
"@contentful/f36-icons": "4.0.1-next-v4-7926.2330+dd855845",
"@contentful/f36-tokens": "4.0.1-next-v4-7926.2330+dd855845",
"@contentful/f36-button": "4.0.1-next-v4-7936.2331+0b72b731",
"@contentful/f36-core": "4.0.1-next-v4-7936.2331+0b72b731",
"@contentful/f36-icons": "4.0.1-next-v4-7936.2331+0b72b731",
"@contentful/f36-tokens": "4.0.1-next-v4-7936.2331+0b72b731",
"emotion": "^10.0.17"

@@ -38,3 +38,3 @@ },

},
"gitHead": "dd855845b994b71774b657d781df4749be58b969"
"gitHead": "0b72b731fdca3cf44b4fed083a9aa09b761e33c5"
}
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