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

- 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:
Bryan1029384756
2026-04-14 09:02:14 -05:00
parent 9ef839938e
commit b7a4cf4ce8
376 changed files with 52619 additions and 167641 deletions

View File

@@ -0,0 +1,203 @@
/* ── Link Embed — matches Fluxer's embed card ────────────────────────── */
.embed {
position: relative;
display: inline-grid;
inline-size: fit-content;
max-inline-size: 100%;
max-width: 432px;
box-sizing: border-box;
border-radius: 8px;
background: var(--background-primary);
border: 1px solid var(--background-modifier-accent);
border-left: 4px solid var(--brand-primary);
margin-top: 4px;
}
.grid {
overflow: hidden;
padding: 12px 12px 14px 12px;
display: grid;
grid-template-columns: auto;
grid-template-rows: auto;
}
.embedContent {
min-width: 0;
display: flex;
flex-direction: column;
gap: 8px;
}
.embedContent > *:first-child {
margin-top: 4px;
}
/* Provider (e.g. "YouTube", "GitHub") */
.provider {
font-size: 0.75rem;
line-height: 1rem;
font-weight: 500;
color: var(--text-tertiary);
}
/* Author row */
.author {
display: flex;
align-items: center;
min-width: 0;
}
.authorIcon {
flex-shrink: 0;
margin-right: 8px;
width: 24px;
height: 24px;
object-fit: cover;
border-radius: 50%;
}
.authorName {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Title */
.title {
font-size: 1rem;
font-weight: 600;
display: inline-block;
color: var(--text-link);
text-decoration: none;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title:hover {
text-decoration: underline;
}
/* Description */
.description {
font-size: 0.875rem;
line-height: 1.125rem;
white-space: pre-line;
color: var(--text-primary);
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
/* ── Media (image / video thumbnail) ─────────────────────────────────── */
.mediaContainer {
position: relative;
border-radius: 4px;
overflow: hidden;
margin-top: 4px;
contain: paint;
cursor: pointer;
}
.mediaImage {
display: block;
max-width: 100%;
max-height: 300px;
width: 100%;
border-radius: 4px;
object-fit: cover;
}
/* Dark overlay for video thumbnails */
.mediaOverlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.4);
opacity: 0;
transition: opacity 0.2s ease;
text-decoration: none;
}
.mediaContainer:hover .mediaOverlay {
opacity: 1;
}
.mediaControls {
display: flex;
align-items: center;
gap: 0.75rem;
}
.playButton,
.openButton {
display: flex;
height: 3.5rem;
width: 3.5rem;
align-items: center;
justify-content: center;
border-radius: 50%;
background: rgba(0, 0, 0, 0.75);
cursor: pointer;
transition: background 200ms ease;
color: #fff;
border: none;
padding: 0;
}
.playButton:hover,
.openButton:hover {
background: rgba(0, 0, 0, 0.85);
}
.openButton {
height: 2.75rem;
width: 2.75rem;
}
.directVideoWrapper {
position: relative;
display: inline-block;
}
.directVideo {
max-width: 400px;
max-height: 300px;
border-radius: 8px;
display: block;
}
.directPlayOverlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.35);
border: none;
border-radius: 8px;
cursor: pointer;
color: #fff;
transition: background 0.15s;
}
.directPlayOverlay:hover {
background: rgba(0, 0, 0, 0.5);
}
.directImage {
max-width: 400px;
max-height: 300px;
border-radius: 8px;
display: block;
object-fit: contain;
}