feat: add Separator Kbd and Chip components
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
/* Base styles */
|
||||
.hv-chip {
|
||||
@apply inline-flex w-fit shrink-0 items-center gap-0.5 rounded-2xl px-2 py-0.5 text-xs leading-5 font-medium;
|
||||
|
||||
/* Default tokens */
|
||||
--chip-bg: var(--default);
|
||||
--chip-fg: currentColor;
|
||||
|
||||
background-color: var(--chip-bg);
|
||||
color: var(--chip-fg);
|
||||
}
|
||||
|
||||
.hv-chip__label {
|
||||
@apply px-0.5;
|
||||
}
|
||||
|
||||
/* Color variants - set foreground color */
|
||||
.hv-chip--accent {
|
||||
--chip-fg: var(--accent-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--danger {
|
||||
--chip-fg: var(--danger-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--default {
|
||||
--chip-fg: var(--default-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--success {
|
||||
--chip-fg: var(--success-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--warning {
|
||||
--chip-fg: var(--warning-soft-foreground);
|
||||
}
|
||||
|
||||
/* Variant styles */
|
||||
.hv-chip--primary {
|
||||
}
|
||||
|
||||
.hv-chip--secondary {
|
||||
/* No additional styles for secondary variant */
|
||||
}
|
||||
|
||||
.hv-chip--tertiary {
|
||||
--chip-bg: transparent;
|
||||
}
|
||||
|
||||
/* Size variants */
|
||||
.hv-chip--sm {
|
||||
@apply px-1 py-0 text-xs;
|
||||
}
|
||||
|
||||
.hv-chip--md {
|
||||
@apply text-xs;
|
||||
}
|
||||
|
||||
.hv-chip--lg {
|
||||
@apply px-3 py-1 text-sm font-medium;
|
||||
}
|
||||
|
||||
/* ====================== */
|
||||
/* = Compound variants = */
|
||||
/* ====================== */
|
||||
|
||||
/* Primary variants - solid backgrounds */
|
||||
.hv-chip--primary.hv-chip--accent {
|
||||
--chip-bg: var(--accent);
|
||||
--chip-fg: var(--accent-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--primary.hv-chip--success {
|
||||
--chip-bg: var(--success);
|
||||
--chip-fg: var(--success-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--primary.hv-chip--warning {
|
||||
--chip-bg: var(--warning);
|
||||
--chip-fg: var(--warning-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--primary.hv-chip--danger {
|
||||
--chip-bg: var(--danger);
|
||||
--chip-fg: var(--danger-foreground);
|
||||
}
|
||||
|
||||
/* Soft variants - muted backgrounds */
|
||||
.hv-chip--accent.hv-chip--soft {
|
||||
--chip-bg: var(--accent-soft);
|
||||
--chip-fg: var(--accent-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--success.hv-chip--soft {
|
||||
--chip-bg: var(--success-soft);
|
||||
--chip-fg: var(--success-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--warning.hv-chip--soft {
|
||||
--chip-bg: var(--warning-soft);
|
||||
--chip-fg: var(--warning-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--danger.hv-chip--soft {
|
||||
--chip-bg: var(--danger-soft);
|
||||
--chip-fg: var(--danger-soft-foreground);
|
||||
}
|
||||
|
||||
.hv-chip--default.hv-chip--soft {
|
||||
--chip-bg: var(--default-soft);
|
||||
--chip-fg: var(--default-soft-foreground);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
/* Base styles */
|
||||
.hv-kbd {
|
||||
@apply inline-flex h-6 items-center space-x-0.5 rounded-lg bg-default px-2 text-center font-sans text-sm font-medium whitespace-nowrap text-muted rtl:space-x-reverse;
|
||||
word-spacing: -0.25rem;
|
||||
}
|
||||
|
||||
/* Key abbreviation styles */
|
||||
.hv-kbd__abbr {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Content wrapper */
|
||||
.hv-kbd__content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Variant styles */
|
||||
.hv-kbd--light {
|
||||
@apply bg-transparent;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
/* Base separator with default horizontal orientation */
|
||||
.hv-separator {
|
||||
@apply shrink-0 rounded-sm border-t-0 border-b-0 bg-separator;
|
||||
|
||||
/* Default size - horizontal orientation */
|
||||
@apply h-px w-full;
|
||||
}
|
||||
|
||||
/* Orientation variants */
|
||||
.hv-separator--horizontal {
|
||||
@apply h-px w-full;
|
||||
}
|
||||
|
||||
.hv-separator--vertical {
|
||||
@apply h-auto min-h-2 w-px self-stretch;
|
||||
}
|
||||
|
||||
/* Color variants */
|
||||
.hv-separator--default {
|
||||
@apply bg-separator;
|
||||
}
|
||||
|
||||
.hv-separator--secondary {
|
||||
@apply bg-separator-secondary;
|
||||
}
|
||||
|
||||
.hv-separator--tertiary {
|
||||
@apply bg-separator-tertiary;
|
||||
}
|
||||
Reference in New Issue
Block a user