chore(release): refresh private package staging
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import ComponentBaseStyles from "../styles/ComponentBaseStyles.wrn"
|
||||
|
||||
component Badge {
|
||||
outputs {
|
||||
dismiss(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object })
|
||||
@@ -48,7 +50,7 @@ component Badge {
|
||||
view {
|
||||
<span
|
||||
{...attrs}
|
||||
class="wire-next wire-next--badge-root {anchorLabel || anchorIcon ? 'wire-next--badge-anchored' : ''} {class}"
|
||||
class="wire-component wire-next--badge-root {anchorLabel || anchorIcon ? 'wire-next--badge-anchored' : ''} {class}"
|
||||
data-wrn-badge
|
||||
data-placement="{placement}"
|
||||
data-show="visible"
|
||||
@@ -99,5 +101,254 @@ component Badge {
|
||||
{/if}
|
||||
</span>
|
||||
</span>
|
||||
<ComponentBaseStyles hidden />
|
||||
}
|
||||
|
||||
style {
|
||||
@keyframes wire-badge-ping {
|
||||
75%,
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(1.45);
|
||||
}
|
||||
}
|
||||
|
||||
/* --- Badge --------------------------------------------------------------- */
|
||||
.wire-next--badge-root {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wire-next__badge {
|
||||
--wire-badge-color: var(--wire-color-primary);
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
display: inline-flex;
|
||||
min-width: 0;
|
||||
min-height: 1.65rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.35rem;
|
||||
max-width: var(--wire-badge-max-width);
|
||||
padding: 0.25rem 0.6rem;
|
||||
color: white;
|
||||
border: 1px solid var(--wire-badge-color);
|
||||
border-radius: 999px;
|
||||
background: var(--wire-badge-color);
|
||||
box-shadow: 0 4px 12px color-mix(in srgb, var(--wire-badge-color) 18%, transparent);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 750;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-size="xs"] {
|
||||
min-height: 1.25rem;
|
||||
padding: 0.15rem 0.4rem;
|
||||
font-size: 0.625rem;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-size="sm"] {
|
||||
min-height: 1.45rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-size="lg"] {
|
||||
min-height: 2rem;
|
||||
padding: 0.35rem 0.75rem;
|
||||
font-size: 0.825rem;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="secondary"] {
|
||||
--wire-badge-color: #737373;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="success"] {
|
||||
--wire-badge-color: #0f9f8f;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="info"] {
|
||||
--wire-badge-color: #2563eb;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="danger"] {
|
||||
--wire-badge-color: #ef3340;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="warning"] {
|
||||
--wire-badge-color: #eab308;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="dark"] {
|
||||
--wire-badge-color: #27272a;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="light"] {
|
||||
--wire-badge-color: #f4f4f5;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-color="warning"][data-variant="solid"],
|
||||
.wire-next__badge[data-color="light"][data-variant="solid"] {
|
||||
color: #18181b;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-variant="soft"] {
|
||||
color: var(--wire-badge-color);
|
||||
border-color: transparent;
|
||||
background: color-mix(in srgb, var(--wire-badge-color) 15%, var(--wire-color-surface));
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-variant="outline"] {
|
||||
color: var(--wire-badge-color);
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-variant="white"] {
|
||||
color: var(--wire-color-text);
|
||||
border-color: var(--wire-color-border);
|
||||
background: var(--wire-color-surface);
|
||||
box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
|
||||
}
|
||||
|
||||
.wire-next__badge[data-shape="rounded"] {
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
|
||||
.wire-next__badge[data-shape="square"] {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.wire-next__badge-label {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wire-next__badge-label--truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wire-next__badge-dot {
|
||||
width: 0.42rem;
|
||||
height: 0.42rem;
|
||||
flex: none;
|
||||
border-radius: 999px;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.wire-next__badge:has(.wire-next__badge-dot):not(:has(.wire-next__badge-label)) {
|
||||
width: 0.7rem;
|
||||
min-width: 0.7rem;
|
||||
height: 0.7rem;
|
||||
min-height: 0.7rem;
|
||||
padding: 0;
|
||||
border: 2px solid var(--wire-color-bg);
|
||||
}
|
||||
|
||||
.wire-next__badge:has(.wire-next__badge-dot):not(:has(.wire-next__badge-label))
|
||||
.wire-next__badge-dot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wire-next__badge-icon {
|
||||
width: 0.9rem;
|
||||
height: 0.9rem;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.wire-next__badge-avatar {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-left: -0.35rem;
|
||||
object-fit: cover;
|
||||
border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.wire-next__badge-dismiss {
|
||||
display: grid;
|
||||
width: 1.15rem;
|
||||
height: 1.15rem;
|
||||
margin-right: -0.3rem;
|
||||
padding: 0;
|
||||
place-items: center;
|
||||
color: currentColor;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, currentColor 12%, transparent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wire-next__badge-dismiss:hover {
|
||||
background: color-mix(in srgb, currentColor 22%, transparent);
|
||||
}
|
||||
|
||||
.wire-next__badge-dismiss:focus-visible {
|
||||
outline: 2px solid currentColor;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.wire-next__badge-dismiss span {
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
}
|
||||
|
||||
.wire-next__badge-anchor {
|
||||
display: inline-flex;
|
||||
min-height: 2.75rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.65rem 0.9rem;
|
||||
color: var(--wire-color-text);
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 0.5rem;
|
||||
background: var(--wire-color-surface);
|
||||
font: inherit;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.wire-next__badge-anchor > [class*="icon-"] {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.wire-next--badge-anchored[data-placement="inline"] {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wire-next--badge-anchored[data-placement="inline"] .wire-next__badge {
|
||||
margin-left: -0.55rem;
|
||||
}
|
||||
|
||||
.wire-next--badge-anchored[data-placement="top-right"] .wire-next__badge {
|
||||
position: absolute;
|
||||
top: -0.55rem;
|
||||
right: -0.75rem;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.wire-next__badge-ping {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
inset: -0.25rem;
|
||||
border-radius: inherit;
|
||||
background: var(--wire-badge-color);
|
||||
opacity: 0.5;
|
||||
animation: wire-badge-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.wire-next__badge-ping {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user