@elvia/elvis-chip
Advanced tools
Comparing version 1.0.3 to 1.0.4
# Elvia Chip Changelog | ||
## 1.0.4 (27.10.21) | ||
### New features | ||
- Explicitly set text color in in chip to fix bug in iOS 15. | ||
## 1.0.3 (03.09.21) | ||
@@ -4,0 +10,0 @@ |
@@ -28,85 +28,21 @@ /* | ||
export const ChipComponent = styled.button` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
background: none; | ||
border: none; | ||
background-color: ${props => setBackgroundColor(props.color, props.isSelected, props.type)}; | ||
cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'}; | ||
font-size: 14px; | ||
line-height: 16px; | ||
padding: calc(8px - 1px) calc(16px - 1px); | ||
border-radius: 24px; | ||
&:hover:not(:disabled) { | ||
background-color: ${props => props.type === 'removable' ? colors.elviaCharge : 'transparent'}; | ||
} | ||
`; | ||
export const ChipTitle = styled.div` | ||
font-family: 'Red Hat Display', Verdana, sans-serif; | ||
font-weight: 500; | ||
text-transform: 'unset'; | ||
letter-spacing: 'unset'; | ||
font-style: unset; | ||
&.dot { | ||
::before { | ||
display: inline-block; | ||
content: ''; | ||
height: 10px; | ||
width: 10px; | ||
border-radius: 50%; | ||
background-color: transparent; | ||
margin: 0 8px 0 0; | ||
} | ||
} | ||
&.showDot { | ||
::before { | ||
background-color: ${props => colors[props.color]}; | ||
} | ||
} | ||
&.disabledDot { | ||
::before { | ||
opacity: 0.3; | ||
} | ||
} | ||
`; | ||
const SpanIcon = styled.span` | ||
border: none; | ||
background: transparent; | ||
display: flex; | ||
opacity: ${props => props.disabled ? 0.3 : 1}; | ||
i { | ||
border: none; | ||
border-radius: 50%; | ||
background-size: contain; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
display: inline-block; | ||
} | ||
`; | ||
export const CheckmarkIcon = styled(SpanIcon)` | ||
&.showCheckmarkIcon { | ||
visibility: visible; | ||
} | ||
visibility: hidden; | ||
padding-right: 8px; | ||
i { | ||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' aria-hidden='true' width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M23.468.225c.562.393.699 1.168.305 1.73L9.346 22.566l-.001.002a3.347 3.347 0 01-5.427.09v-.002l-3.67-4.89a1.243 1.243 0 011.99-1.492l3.672 4.895a.86.86 0 001.395-.023l.002-.003L21.737.53a1.243 1.243 0 011.73-.305z' fill='black'/%3e%3c/svg%3e"); | ||
height: 12px; | ||
width: 12px; | ||
} | ||
`; | ||
export const CloseIcon = styled(SpanIcon)` | ||
margin-left: 8px; | ||
background-size: contain; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
display: inline-flex; | ||
align-items: center; | ||
i { | ||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' aria-hidden='true' width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M23.636 2.122A1.243 1.243 0 1021.878.364L12 10.242 2.122.364A1.243 1.243 0 00.364 2.122L10.242 12 .364 21.878a1.243 1.243 0 101.758 1.758L12 13.758l9.878 9.878a1.243 1.243 0 101.758-1.758L13.758 12l9.878-9.878z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3cpath fill='white' d='M0 0h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"); | ||
height: 16px; | ||
width: 8px; | ||
} | ||
`; | ||
export const ChipComponent = styled.button.withConfig({ | ||
displayName: "styledComponents__ChipComponent", | ||
componentId: "sc-9hr7jf-0" | ||
})(["display:flex;flex-direction:row;align-items:center;background:none;border:none;background-color:", ";cursor:", ";font-size:14px;line-height:16px;padding:calc(8px - 1px) calc(16px - 1px);border-radius:24px;&:hover:not(:disabled){background-color:", ";}"], props => setBackgroundColor(props.color, props.isSelected, props.type), props => props.disabled ? 'not-allowed' : 'pointer', props => props.type === 'removable' ? colors.elviaCharge : 'transparent'); | ||
export const ChipTitle = styled.div.withConfig({ | ||
displayName: "styledComponents__ChipTitle", | ||
componentId: "sc-9hr7jf-1" | ||
})(["font-family:'Red Hat Display',Verdana,sans-serif;font-weight:500;text-transform:'unset';letter-spacing:'unset';font-style:unset;color:", ";&.dot{::before{display:inline-block;content:'';height:10px;width:10px;border-radius:50%;background-color:transparent;margin:0 8px 0 0;}}&.showDot{::before{background-color:", ";}}&.disabledDot{::before{opacity:0.3;}}"], colors.elviaOff, props => colors[props.color]); | ||
const SpanIcon = styled.span.withConfig({ | ||
displayName: "styledComponents__SpanIcon", | ||
componentId: "sc-9hr7jf-2" | ||
})(["border:none;background:transparent;display:flex;opacity:", ";i{border:none;border-radius:50%;background-size:contain;background-position:center;background-repeat:no-repeat;display:inline-block;}"], props => props.disabled ? 0.3 : 1); | ||
export const CheckmarkIcon = styled(SpanIcon).withConfig({ | ||
displayName: "styledComponents__CheckmarkIcon", | ||
componentId: "sc-9hr7jf-3" | ||
})(["&.showCheckmarkIcon{visibility:visible;}visibility:hidden;padding-right:8px;i{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 24 24' aria-hidden='true' width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M23.468.225c.562.393.699 1.168.305 1.73L9.346 22.566l-.001.002a3.347 3.347 0 01-5.427.09v-.002l-3.67-4.89a1.243 1.243 0 011.99-1.492l3.672 4.895a.86.86 0 001.395-.023l.002-.003L21.737.53a1.243 1.243 0 011.73-.305z' fill='black'/%3e%3c/svg%3e\");height:12px;width:12px;}"]); | ||
export const CloseIcon = styled(SpanIcon).withConfig({ | ||
displayName: "styledComponents__CloseIcon", | ||
componentId: "sc-9hr7jf-4" | ||
})(["margin-left:8px;background-size:contain;background-position:center;background-repeat:no-repeat;display:inline-flex;align-items:center;i{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 24 24' aria-hidden='true' width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M23.636 2.122A1.243 1.243 0 1021.878.364L12 10.242 2.122.364A1.243 1.243 0 00.364 2.122L10.242 12 .364 21.878a1.243 1.243 0 101.758 1.758L12 13.758l9.878 9.878a1.243 1.243 0 101.758-1.758L13.758 12l9.878-9.878z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3cpath fill='white' d='M0 0h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\");height:16px;width:8px;}"]); |
@@ -19,24 +19,33 @@ /* | ||
"name": "ariaLabel", | ||
"type": "string" | ||
"type": "string", | ||
"propType": "string" | ||
}, { | ||
"name": "color", | ||
"type": "string" | ||
"type": "string", | ||
"propType": "string" | ||
}, { | ||
"name": "disabled", | ||
"type": "boolean" | ||
"type": "boolean", | ||
"propType": "boolean" | ||
}, { | ||
"name": "value", | ||
"type": "string" | ||
"type": "string", | ||
"propType": "string" | ||
}, { | ||
"name": "type", | ||
"type": "string" | ||
"type": "string", | ||
"propType": "string" | ||
}, { | ||
"name": "iconType", | ||
"type": "string" | ||
"type": "string", | ||
"propType": "string" | ||
}, { | ||
"name": "selected", | ||
"type": "boolean" | ||
"type": "boolean", | ||
"propType": "boolean" | ||
}], | ||
"reactName": "Chip", | ||
"slotItems": false | ||
"slotItems": false, | ||
"useWrapper": false, | ||
"reactTypescriptDeclaration": false | ||
}; | ||
@@ -43,0 +52,0 @@ } |
{ | ||
"name": "@elvia/elvis-chip", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -15,2 +15,2 @@ "license": "MIT", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
16759
13
0
471