UNPKG

@penaprieto/design-system

Version:

Multi-brand React design system with design tokens from Figma

111 lines (93 loc) 2.65 kB
/* Base Pill */ .ds-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--br-full, 9999px); font-family: var(--body-regular-fontFamily, var(--font-family, 'Satoshi', sans-serif)); font-size: var(--body-regular-fontSize, 16px); font-weight: var(--body-regular-fontWeight, 400); line-height: var(--body-regular-lineHeight, 150%); transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94); cursor: pointer; user-select: none; border: none; padding: var(--size1, 4px) var(--size2, 8px); min-width: var(--size6, 32px); background-color: var(--pill-unselected-bg-default); color: var(--semantic-text-indigo-primary); position: relative; -webkit-font-smoothing: antialiased; } .ds-pill--selected { background-color: var(--pill-selected-bg-default); color: var(--semantic-text-white-primary); } .ds-pill--selected:hover:not(:disabled) { background-color: var(--pill-selected-bg-hover); } .ds-pill--selected:active:not(:disabled) { background-color: var(--pill-selected-bg-active); } .ds-pill--unselected:hover:not(:disabled) { background-color: var(--pill-unselected-bg-hover); } .ds-pill--unselected:active:not(:disabled) { background-color: var(--pill-unselected-bg-active); } .ds-pill:disabled { cursor: not-allowed; opacity: 0.7; } .ds-pill--selected:disabled { background-color: var(--pill-selected-bg-disabled); } .ds-pill--unselected:disabled { background-color: var(--pill-unselected-bg-disabled); } .ds-pill:focus-visible { outline: none; box-shadow: var(--semantic-focus-indigo); } .ds-pill__content { display: flex; align-items: center; gap: var(--size1, 4px); } .ds-pill__icon { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; } .ds-pill__icon img, .ds-pill__icon svg { width: 100%; height: 100%; display: block; } .ds-pill__icon svg { fill: currentColor; } .ds-pill__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--body-regular-fontFamily, var(--font-family, 'Satoshi', sans-serif)); font-size: var(--body-regular-fontSize, 16px); font-weight: var(--body-regular-fontWeight, 400); line-height: var(--body-regular-lineHeight, 150%); padding: 0 var(--size1, 4px); } .ds-pill--selected .ds-pill__icon svg { color: var(--semantic-icon-inverse-bold); } .ds-pill--unselected .ds-pill__icon svg { color: var(--semantic-icon-brand-default); } .ds-pill--selected:disabled .ds-pill__icon svg, .ds-pill--unselected:disabled .ds-pill__icon svg { color: var(--semantic-icon-brand-disabled); }