feat(ui): add Button, Modal, Spinner, Toast, and Tooltip components with styles
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
- Implemented Button component with various props for customization. - Created Modal component with header, content, and footer subcomponents. - Added Spinner component for loading indicators. - Developed Toast component for displaying notifications. - Introduced Tooltip component for contextual hints with keyboard shortcuts. - Added corresponding CSS modules for styling each component. - Updated index file to export new components. - Configured TypeScript settings for the UI package.
This commit is contained in:
@@ -0,0 +1,323 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* ── Search row ──────────────────────────────────────────────── */
|
||||
|
||||
.searchWrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.searchIcon {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--text-tertiary);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.searchInput {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
padding: 0 14px 0 40px;
|
||||
border: 1px solid var(--background-header-secondary);
|
||||
border-radius: 8px;
|
||||
background: var(--background-tertiary);
|
||||
color: var(--text-primary);
|
||||
font: inherit;
|
||||
font-size: 0.875rem;
|
||||
outline: none;
|
||||
transition: border-color 0.12s;
|
||||
}
|
||||
|
||||
.searchInput:focus {
|
||||
border-color: var(--brand-primary);
|
||||
}
|
||||
|
||||
/* ── Slots card ──────────────────────────────────────────────── */
|
||||
|
||||
.slotsCard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 18px 20px;
|
||||
border: 1px solid var(--background-header-secondary);
|
||||
border-radius: 10px;
|
||||
background: var(--background-secondary);
|
||||
}
|
||||
|
||||
.slotsHeader {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.slotsHeaderLeft {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.slotsTitle {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.slotsCounts {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.slotsCount strong {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.uploadButton {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 16px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: var(--brand-primary, #5865f2);
|
||||
color: #ffffff;
|
||||
font: inherit;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
transition: filter 0.12s;
|
||||
}
|
||||
|
||||
.uploadButton:hover:not(:disabled) {
|
||||
filter: brightness(1.1);
|
||||
}
|
||||
|
||||
.uploadButton:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.slotsDescription {
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
color: var(--text-tertiary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ── Drag and drop zone ──────────────────────────────────────── */
|
||||
|
||||
.dropZone {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding: 40px 20px;
|
||||
border: 1px dashed var(--background-modifier-accent);
|
||||
border-radius: 10px;
|
||||
background: var(--background-secondary);
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.12s, border-color 0.12s, color 0.12s;
|
||||
}
|
||||
|
||||
.dropZone:hover {
|
||||
background: var(--background-modifier-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.dropZoneActive {
|
||||
border-color: var(--brand-primary, #5865f2);
|
||||
background: rgba(88, 101, 242, 0.08);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.dropZoneIcon {
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.dropZoneActive .dropZoneIcon {
|
||||
color: var(--brand-primary, #5865f2);
|
||||
}
|
||||
|
||||
/* ── Emoji sections ──────────────────────────────────────────── */
|
||||
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sectionTitle {
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin: 12px 0 4px;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
display: grid;
|
||||
grid-template-columns: 72px 1fr 1fr 40px;
|
||||
gap: 12px;
|
||||
padding: 8px 14px;
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-tertiary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
border-bottom: 1px solid var(--background-modifier-accent);
|
||||
}
|
||||
|
||||
.tableBody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.emojiRow {
|
||||
display: grid;
|
||||
grid-template-columns: 72px 1fr 1fr 40px;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--background-modifier-accent);
|
||||
transition: background-color 0.1s;
|
||||
}
|
||||
|
||||
.emojiRow:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.emojiRow:hover {
|
||||
background: var(--background-modifier-hover);
|
||||
}
|
||||
|
||||
.emojiCell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emojiImage {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
object-fit: contain;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.nameCell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.nameInput {
|
||||
width: 100%;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
font: inherit;
|
||||
font-size: 0.875rem;
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
outline: none;
|
||||
transition: background-color 0.12s, border-color 0.12s;
|
||||
}
|
||||
|
||||
.nameInput:hover,
|
||||
.nameInput:focus {
|
||||
background: var(--background-tertiary);
|
||||
border-color: var(--background-modifier-accent);
|
||||
}
|
||||
|
||||
.nameInput:focus {
|
||||
border-color: var(--brand-primary);
|
||||
}
|
||||
|
||||
.uploaderCell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.uploaderName {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.deleteCell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.deleteButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: var(--text-tertiary);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.12s, color 0.12s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.emojiRow:hover .deleteButton {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.deleteButton:hover {
|
||||
background: rgba(237, 66, 69, 0.12);
|
||||
color: var(--status-danger, #ed4245);
|
||||
}
|
||||
|
||||
/* ── Empty / status ──────────────────────────────────────────── */
|
||||
|
||||
.emptyState {
|
||||
padding: 24px 20px;
|
||||
text-align: center;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.statusBanner {
|
||||
padding: 10px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.statusOk {
|
||||
background: rgba(59, 165, 93, 0.12);
|
||||
border: 1px solid rgba(59, 165, 93, 0.4);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.statusErr {
|
||||
background: rgba(234, 80, 80, 0.12);
|
||||
border: 1px solid rgba(234, 80, 80, 0.4);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
Reference in New Issue
Block a user