Files
fluxer/fluxer_app/src/components/channel/EmojiPicker.module.css
2026-01-03 06:44:40 +01:00

487 lines
8.2 KiB
CSS

/*
* Copyright (C) 2026 Fluxer Contributors
*
* This file is part of Fluxer.
*
* Fluxer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fluxer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
*/
.container {
position: relative;
height: 100%;
}
.skinToneSelectorContainer {
position: relative;
display: flex;
align-items: center;
}
.skinTonePickerButton {
width: 24px;
height: 24px;
cursor: pointer;
}
.cursorPointer {
cursor: pointer;
}
.cursorText {
cursor: text;
}
.skinTonePickerOptions {
position: absolute;
top: -4px;
right: -4px;
display: flex;
flex-direction: column;
width: auto;
height: 192px;
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-accent);
border-radius: 4px;
z-index: 10;
}
.skinTonePickerItem {
width: 32px;
height: 32px;
padding: 4px;
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
cursor: pointer;
transition: background-color 0.1s ease-in-out;
}
.skinTonePickerItemImage {
width: 24px;
height: 24px;
}
.skinToneNativeEmoji {
font-size: 24px;
line-height: 1;
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.emojiPicker {
position: relative;
display: grid;
grid-template-columns: 46px auto;
grid-template-rows: 1fr auto;
width: auto;
height: 100%;
overflow: hidden;
}
.bodyWrapper {
display: grid;
position: relative;
grid-column: 2 / 3;
grid-row: 1 / 2;
grid-template-rows: 1fr;
}
.emojiPickerListWrapper {
position: relative;
grid-row: 1 / 2;
overflow: visible;
display: flex;
flex-direction: column;
min-height: 0;
background-color: var(--background-tertiary);
}
.listWrapper {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.list {
height: 100%;
padding: var(--spacing-3) var(--spacing-2) 0;
}
.emptyState {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
}
.emptyStateInner {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
color: var(--text-primary-muted);
opacity: 0.7;
}
.emptyIcon {
font-size: 42px;
line-height: 1;
}
.emptyLabel {
font-size: 0.875rem;
}
.header {
display: flex;
align-items: center;
position: relative;
grid-column: 1 / 3;
padding: var(--spacing-3);
z-index: 100;
}
.headerMobile {
grid-column: 1;
}
.searchBar {
display: flex;
flex: 1;
margin-right: var(--spacing-3);
box-sizing: border-box;
border-radius: var(--radius-md);
overflow: hidden;
background-color: var(--background-primary);
}
:global(.theme-light) .searchBar {
background-color: var(--background-secondary);
box-shadow: inset 0 0 0 1px var(--background-modifier-accent);
}
.searchBarInner {
display: flex;
position: relative;
flex: 1 1 auto;
flex-direction: row;
flex-wrap: wrap;
padding: 1px;
box-sizing: border-box;
}
.searchBarInput {
flex: 1;
min-width: 48px;
height: 30px;
margin: 1px;
padding: 0 8px;
box-sizing: border-box;
font-size: 1rem;
line-height: 32px;
background: transparent;
border: none;
resize: none;
appearance: none;
color: var(--text-tertiary);
}
.searchBarInput::placeholder {
color: var(--text-primary-muted);
}
.iconLayout {
display: flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
box-sizing: border-box;
cursor: text;
}
.iconContainer {
position: relative;
width: 20px;
height: 20px;
box-sizing: border-box;
}
.icon {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transform: rotate(90deg);
z-index: 2;
transition:
transform 0.1s ease-out,
opacity 0.1s ease-out;
color: var(--text-tertiary-muted);
}
.icon.visible {
transform: rotate(0);
opacity: 1;
}
.iconSize {
width: 24px;
height: 24px;
}
.categoryIcon {
width: 20px;
height: 20px;
flex-shrink: 0;
}
.headerIcon {
height: 1rem;
width: 1rem;
}
.caretIcon {
height: 0.75rem;
width: 0.75rem;
flex-shrink: 0;
color: var(--text-primary-muted);
transition: transform 0.2s;
}
.inspector {
display: flex;
align-items: center;
position: relative;
grid-column: 2 / 3;
grid-row: 3 / 4;
height: 48px;
padding: 0 var(--spacing-4);
box-sizing: border-box;
background-color: var(--background-primary);
overflow: hidden;
border-top: 1px solid var(--background-modifier-accent);
}
.inspectorEmoji {
width: 32px;
height: 32px;
}
.inspectorEmojiSprite {
width: 32px;
height: 32px;
background-repeat: no-repeat;
}
.inspectorNativeEmoji {
font-size: 32px;
line-height: 1;
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.inspectorText {
margin-left: 8px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 1 auto;
line-height: 1.2;
max-height: 1.2em;
}
.categoryList {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 46px;
padding: var(--spacing-2) 0;
box-sizing: border-box;
overflow: hidden;
background: var(--background-primary);
border-radius: 0 0 0 8px;
box-shadow: inset -1px 0 0 var(--background-modifier-accent);
}
.categoryListScroll {
flex: 1 1 auto;
width: 100%;
min-height: 0;
overflow-y: auto;
padding: 0 var(--spacing-2);
-ms-overflow-style: none;
scrollbar-width: none;
}
.categoryListScroll::-webkit-scrollbar {
width: 0;
height: 0;
}
.listItems {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
width: 100%;
gap: var(--spacing-2);
contain: layout;
}
.categoryListIcon {
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
margin-bottom: 0;
cursor: pointer;
border-radius: 0.375rem;
transition:
background-color 0.2s,
color 0.2s;
}
.categoryListIcon:hover {
background-color: var(--background-modifier-hover);
color: var(--text-primary);
}
.categoryListIconActive {
background-color: var(--background-modifier-hover);
color: var(--text-primary);
}
.textPrimaryMuted {
color: var(--text-primary-muted);
}
.emojiRowContainer {
height: 48px;
display: flex;
align-items: center;
padding: 0 var(--spacing-3);
}
.emojiGrid {
display: grid;
grid-template-columns: repeat(9, minmax(0, 1fr));
justify-items: center;
width: 100%;
}
.emojiGridCategory {
margin-bottom: 16px;
}
.categoryTitle {
margin: 0;
font-size: 0.875rem;
font-weight: bold;
color: var(--text-primary-muted);
line-height: 1.2;
max-height: 1.05rem;
}
.emojiRenderer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
aspect-ratio: 1;
max-width: 48px;
border-radius: 0.375rem;
cursor: pointer;
transition:
background-color 0.2s,
color 0.2s;
background: none;
border: none;
padding: 0;
outline: none;
}
.emojiRenderer:hover,
.emojiRenderer.selectedEmojiRenderer {
background-color: var(--background-modifier-selected) !important;
}
.emojiRenderer:focus {
outline: none;
}
.emojiRenderer:focus-visible {
outline: 2px solid var(--brand-primary-light);
outline-offset: -2px;
}
.focusedEmojiRenderer {
background-color: var(--background-modifier-hover);
outline: 2px solid var(--brand-primary-light);
outline-offset: -2px;
}
.emojiImage {
width: 83.33%;
height: 83.33%;
max-width: 40px;
max-height: 40px;
object-fit: contain;
}
.spriteEmoji {
width: 32px;
height: 32px;
min-width: 32px;
min-height: 32px;
background-repeat: no-repeat;
flex-shrink: 0;
}
.nativeEmoji {
font-size: 32px;
line-height: 1;
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.emojiLocked {
opacity: 0.3;
filter: blur(1px);
}
.iconSmall {
height: 1rem;
width: 1rem;
}
.horizontalCategories {
display: flex;
width: 100%;
justify-content: space-around;
}
.container {
position: relative;
height: 100%;
}