Skip to content

Commit

Permalink
Add chip and avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Oct 9, 2024
1 parent 42dafed commit 76f9894
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
50 changes: 50 additions & 0 deletions assets/styles/presets/aura/avatar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.p-avatar {
@apply inline-flex items-center justify-center
w-8 h-8 text-base rounded-md
bg-surface-200 dark:bg-surface-700
}

.p-avatar-image {
@apply bg-transparent
}

.p-avatar-circle,
.p-avatar-circle img {
@apply rounded-full
}

.p-avatar-icon {
@apply text-base
}

.p-avatar img {
@apply w-full h-full
}

.p-avatar-lg {
@apply w-12 h-12 text-2xl
}

.p-avatar-lg .p-avatar-icon {
@apply text-2xl
}

.p-avatar-xl {
@apply w-16 h-16 text-[2rem]
}

.p-avatar-xl .p-avatar-icon {
@apply text-[2rem]
}

.p-avatar-group {
@apply flex items-center
}

.p-avatar-group .p-avatar + .p-avatar {
@apply -ml-4
}

.p-avatar-group .p-avatar {
@apply border-2 border-surface-200 dark:border-surface-700
}
27 changes: 27 additions & 0 deletions assets/styles/presets/aura/chip.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.p-chip {
@apply inline-flex items-center rounded-2xl gap-2 px-3 py-2
bg-surface-100 dark:bg-surface-800
text-surface-800 dark:text-surface-0
}

.p-chip-icon {
@apply text-surface-800 dark:bg-surface-0 text-base w-4 h-4
}

.p-chip-image {
@apply rounded-full w-8 h-8 -ml-2
}

.p-chip:has(.p-chip-remove-icon) {
@apply pr-2
}

.p-chip:has(.p-chip-image) {
@apply pt-1 pb-1
}

.p-chip-remove-icon {
@apply cursor-pointer text-base w-4 h-4 rounded-full
text-surface-800 dark:text-surface-0
focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-primary
}
4 changes: 4 additions & 0 deletions assets/styles/presets/aura/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
@import './scrollpanel';
@import './splitter';
@import './toolbar';

/* Misc */
@import './avatar';
@import './chip';

0 comments on commit 76f9894

Please sign in to comment.