feat: add token-backed component primitives

This commit is contained in:
thePR0M3TH3AN committed 2025-10-09 21:09:31 -04:00
1 parent 002790a01d
commit a30e42fcc6
5 files changed
+630 -341

No files matched your search

+137 -198
View File
@@ -147,17 +147,19 @@ header img {
}
}
/* Video Cards */
/* --------------------------------------------------------------------------
Legacy component compatibility shims
--------------------------------------------------------------------------
These selectors bridge existing markup to the token-backed primitives while
templates migrate to the new utility classes. Remove once all views are
updated.
--------------------------------------------------------------------------- */
.video-card {
background-color: var(--color-card);
border-radius: 0.75rem;
overflow: visible;
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: var(--shadow-md);
@apply card overflow-visible;
}
.video-card.video-card--owner-private {
background-color: var(--color-card-private) !important;
@apply bg-card-private;
box-shadow:
0 0 0 0.125rem rgba(168, 85, 247, 0.55),
var(--shadow-md);
@@ -169,72 +171,12 @@ header img {
var(--shadow-lg);
}
.video-visibility-toggle {
display: inline-flex;
align-items: center;
gap: 0.35rem;
border-radius: 9999px;
border: 1px solid rgba(30, 41, 59, 0.7);
background-color: rgba(15, 23, 42, 0.55);
padding: 0.35rem;
}
.video-visibility-toggle__option {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 9999px;
border: 1px solid transparent;
background-color: rgba(15, 23, 42, 0.6);
color: rgba(203, 213, 225, 0.78);
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.08em;
min-width: 5.5rem;
padding: 0.4rem 0.95rem;
text-transform: uppercase;
cursor: pointer;
transition:
background-color 0.18s ease,
color 0.18s ease,
border-color 0.18s ease,
box-shadow 0.18s ease,
opacity 0.18s ease;
}
.video-visibility-toggle__option:not(.is-disabled):hover {
background-color: rgba(148, 163, 184, 0.16);
color: rgba(226, 232, 240, 0.88);
}
.video-visibility-toggle__option[data-active="true"] {
background: linear-gradient(
135deg,
rgba(129, 140, 248, 0.4),
rgba(192, 132, 252, 0.32)
);
color: var(--color-text);
border-color: rgba(129, 140, 248, 0.6);
box-shadow:
0 0 0 1px rgba(129, 140, 248, 0.4) inset,
0 6px 14px -6px rgba(129, 140, 248, 0.55);
}
.video-visibility-toggle__option.is-disabled {
opacity: 0.45;
cursor: not-allowed;
}
.video-visibility-toggle__option.is-disabled[data-active="true"] {
opacity: 0.65;
}
.video-card[data-owner-is-viewer="false"][data-url-health-state="offline"][data-stream-health-state="unhealthy"] {
display: none;
}
.video-card[data-owner-is-viewer="true"][data-url-health-state="offline"][data-stream-health-state="unhealthy"] {
background-color: var(--color-card-critical);
@apply border border-critical border-opacity-40 bg-card-critical;
box-shadow:
0 0 0 0.0625rem rgba(239, 68, 68, 0.35),
var(--shadow-md);
@@ -251,6 +193,129 @@ header img {
animation: video-card-fade-in 220ms ease-out forwards;
}
.video-visibility-toggle {
@apply inline-flex items-center gap-1 rounded-full border border-border bg-panel px-1 py-1;
}
.video-visibility-toggle__option {
@apply inline-flex items-center justify-center rounded-full border border-transparent bg-panel px-3 py-2 text-xs font-semibold uppercase text-muted transition duration-base ease-in-out;
min-width: 5.5rem;
letter-spacing: 0.08em;
}
.video-visibility-toggle__option:not(.is-disabled):hover {
@apply bg-panel-hover text-text;
}
.video-visibility-toggle__option[data-active="true"] {
background: linear-gradient(
135deg,
rgba(129, 140, 248, 0.4),
rgba(192, 132, 252, 0.32)
);
@apply border border-info border-opacity-60 text-text shadow-lg;
}
.video-visibility-toggle__option.is-disabled {
@apply cursor-not-allowed opacity-45;
}
.video-visibility-toggle__option.is-disabled[data-active="true"] {
opacity: 0.65;
}
#profileModal .profile-switcher {
@apply card flex flex-col gap-lg;
padding: clamp(1.25rem, 2vw, 1.5rem);
background: linear-gradient(
145deg,
rgba(15, 23, 42, 0.94),
rgba(15, 23, 42, 0.72)
);
box-shadow: 0 1.75rem 3.5rem rgba(8, 11, 30, 0.45);
border-radius: 1.25rem;
}
#profileModal .profile-switcher__badge {
@apply badge;
font-size: 0.625rem;
letter-spacing: 0.18em;
border: 0.0625rem solid rgba(96, 165, 250, 0.25);
background: rgba(59, 130, 246, 0.18);
color: rgba(191, 219, 254, 0.95);
align-self: flex-start;
}
#profileModal .profile-card {
@apply card flex flex-col gap-3 p-4 text-text;
border: 0.0625rem solid rgba(148, 163, 184, 0.24);
background: rgba(15, 23, 42, 0.72);
box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
position: relative;
cursor: pointer;
outline: none;
border-radius: 1rem;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease;
}
#profileModal .profile-card:hover {
border-color: rgba(148, 163, 184, 0.45);
}
#profileModal .profile-card:focus-visible {
border-color: rgba(96, 165, 250, 0.6);
box-shadow: 0 0 0 0.1875rem rgba(37, 99, 235, 0.25);
}
#profileModal .profile-card--active {
border-color: rgba(59, 130, 246, 0.55);
background: linear-gradient(
160deg,
rgba(37, 99, 235, 0.22),
rgba(15, 23, 42, 0.78)
);
box-shadow: 0 1.35rem 2.8rem rgba(37, 99, 235, 0.22);
}
#profileModal .profile-switcher__add {
@apply card flex items-center gap-4 text-left text-muted;
border: 0.125rem dashed rgba(148, 163, 184, 0.35);
background: rgba(15, 23, 42, 0.55);
border-radius: 1rem;
cursor: pointer;
transition:
border-color 0.2s ease,
background 0.2s ease,
color 0.2s ease;
}
#profileModal .profile-switcher__add:hover,
#profileModal .profile-switcher__add:focus-visible {
border-color: rgba(96, 165, 250, 0.65);
background: rgba(59, 130, 246, 0.18);
color: var(--color-white);
outline: none;
}
#profileModal .profile-card__action {
@apply btn-ghost px-3 py-2 text-xs;
border: 0.0625rem solid rgba(59, 130, 246, 0.4);
background: rgba(59, 130, 246, 0.14);
color: rgba(191, 219, 254, 0.95);
letter-spacing: 0.18em;
text-decoration: none;
}
#profileModal .profile-card__action:hover,
#profileModal .profile-card__action:focus-visible {
background: rgba(59, 130, 246, 0.24);
border-color: rgba(59, 130, 246, 0.6);
color: var(--color-white);
}
/* Watch history cards */
.watch-history-card {
display: flex;
@@ -703,21 +768,6 @@ header img {
display: none;
}
#profileModal .profile-switcher {
display: flex;
flex-direction: column;
gap: 1.5rem;
padding: clamp(1.25rem, 2vw, 1.5rem);
border-radius: 1.25rem;
border: 0.0625rem solid rgba(148, 163, 184, 0.28);
background: linear-gradient(
145deg,
rgba(15, 23, 42, 0.94),
rgba(15, 23, 42, 0.72)
);
box-shadow: 0 1.75rem 3.5rem rgba(8, 11, 30, 0.45);
}
#profileModal .profile-switcher__header {
display: flex;
flex-direction: column;
@@ -743,60 +793,6 @@ header img {
color: var(--color-muted);
}
#profileModal .profile-switcher__badge {
align-self: flex-start;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.35rem 0.85rem;
font-size: 0.625rem;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
border-radius: 9999px;
background: rgba(59, 130, 246, 0.18);
color: rgba(191, 219, 254, 0.95);
border: 0.0625rem solid rgba(96, 165, 250, 0.25);
}
#profileModal .profile-card {
position: relative;
display: flex;
flex-direction: column;
gap: 0.85rem;
padding: 1rem;
border-radius: 1rem;
border: 0.0625rem solid rgba(148, 163, 184, 0.24);
background: rgba(15, 23, 42, 0.72);
box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
color: var(--color-text);
cursor: pointer;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease;
outline: none;
}
#profileModal .profile-card:hover {
border-color: rgba(148, 163, 184, 0.45);
}
#profileModal .profile-card:focus-visible {
border-color: rgba(96, 165, 250, 0.6);
box-shadow: 0 0 0 0.1875rem rgba(37, 99, 235, 0.25);
}
#profileModal .profile-card--active {
border-color: rgba(59, 130, 246, 0.55);
background: linear-gradient(
160deg,
rgba(37, 99, 235, 0.22),
rgba(15, 23, 42, 0.78)
);
box-shadow: 0 1.35rem 2.8rem rgba(37, 99, 235, 0.22);
}
#profileModal .profile-card__avatar {
flex: 0 0 auto;
width: 3rem;
@@ -844,33 +840,6 @@ header img {
color: rgba(191, 219, 254, 0.9);
}
#profileModal .profile-card__action {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.3rem 0.8rem;
border-radius: 9999px;
border: 0.0625rem solid rgba(59, 130, 246, 0.4);
background: rgba(59, 130, 246, 0.14);
color: rgba(191, 219, 254, 0.95);
font-size: 0.65rem;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
text-decoration: none;
transition:
background 0.2s ease,
border-color 0.2s ease,
color 0.2s ease;
}
#profileModal .profile-card__action:hover,
#profileModal .profile-card__action:focus-visible {
background: rgba(59, 130, 246, 0.24);
border-color: rgba(59, 130, 246, 0.6);
color: var(--color-white);
}
#profileModal .profile-card__name {
font-size: 0.95rem;
font-weight: 600;
@@ -895,31 +864,6 @@ header img {
gap: 1rem;
}
#profileModal .profile-switcher__add {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
border-radius: 1rem;
border: 0.125rem dashed rgba(148, 163, 184, 0.35);
background: rgba(15, 23, 42, 0.55);
color: rgba(226, 232, 240, 0.85);
text-align: left;
cursor: pointer;
transition:
border-color 0.2s ease,
background 0.2s ease,
color 0.2s ease;
}
#profileModal .profile-switcher__add:hover,
#profileModal .profile-switcher__add:focus-visible {
border-color: rgba(96, 165, 250, 0.65);
background: rgba(59, 130, 246, 0.18);
color: var(--color-white);
outline: none;
}
#profileModal .profile-switcher__addAvatar {
flex: 0 0 auto;
width: 3rem;
@@ -1106,11 +1050,10 @@ body.modal-open #sidebarOverlay {
/* Modal Content Container */
.modal-content {
width: 100%;
@apply bv-modal__panel;
height: 100%;
display: flex;
flex-direction: column;
background-color: var(--color-surface);
animation: fadeIn var(--modal-motion-duration) ease-out;
}
@@ -1166,20 +1109,16 @@ body.modal-open #sidebarOverlay {
}
.modal-nav .icon-button {
background-color: rgba(30, 41, 59, 0.85);
border: 0.0625rem solid rgba(148, 163, 184, 0.4);
color: var(--color-text);
@apply btn-ghost text-text;
box-shadow: none;
}
.modal-nav .icon-button:hover {
background-color: rgba(51, 65, 85, 0.95);
border-color: rgba(148, 163, 184, 0.55);
@apply border-border bg-panel-hover;
}
.modal-nav .icon-button:focus-visible {
outline: none;
box-shadow: 0 0 0 0.1875rem rgba(148, 163, 184, 0.45);
@apply outline-none focus-visible:ring-2 focus-visible:ring-info focus-visible:ring-opacity-60 focus-visible:ring-offset-2 focus-visible:ring-offset-surface;
}
#modalNav {
+1 -1
View File
@@ -1,3 +1,3 @@
:root{--color-page:#fff;--color-page-alt:#f9fafb;--color-surface:#0f172a;--color-surface-alt:#111827;--color-bg:var(--color-surface);--color-card:#1e293b;--color-card-private:#3b1d74;--color-card-critical:#3f0b13;--color-panel:#1f2937;--color-panel-hover:#334155;--color-border:#374151;--color-border-subtle:#d1d5db;--color-primary:#fe0032;--color-secondary:#ff93a5;--color-info:#60a5fa;--color-info-strong:#2563eb;--color-info-pressed:#1d4ed8;--color-muted-strong:#6b7280;--color-text:#f8fafc;--color-text-strong:#0f172a;--color-muted:#94a3b8;--color-muted-alt:#9ca3af;--color-subtle-text:#e2e8f0;--color-subtle:#e5e7eb;--color-critical:#7f1d1d;--color-critical-strong:#991b1b;--color-neutral-700:#3f3f46;--color-neutral-600:#52525b;--color-white:#fff;--color-black:#000;--color-overlay:#1a2234;--space-2xs:0.25rem;--space-xs:0.5rem;--space-sm:0.75rem;--space-md:1rem;--space-lg:1.5rem;--space-xl:2rem;--space-2xl:3rem;--radius-sm:0.25rem;--radius-md:0.5rem;--radius-lg:0.75rem;--radius-xl:1rem;--radius-full:9999px;--shadow-sm:0 0.0625rem 0.125rem 0 rgb(0 0 0/5%);--shadow-md:0 0.25rem 0.375rem -0.0625rem rgba(0,0,0,.1);--shadow-lg:0 0.625rem 0.9375rem -0.1875rem rgba(0,0,0,.1);--shadow-modal:0 1.25rem 2.5rem -0.375rem rgba(15,23,42,.55);--font-family-sans:"Inter","Segoe UI",system-ui,-apple-system,sans-serif;--font-family-mono:"Fira Code","SFMono-Regular",ui-monospace,monospace;--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-base:1rem;--font-size-lg:1.125rem;--font-size-xl:1.5rem;--font-size-2xl:2rem;--line-height-tight:1.1;--line-height-snug:1.25;--line-height-base:1.5;--line-height-relaxed:1.75;--motion-duration-fast:120ms;--motion-duration-base:160ms;--motion-duration-slow:280ms;--motion-ease-out:cubic-bezier(0.16,1,0.3,1);--motion-ease-in-out:cubic-bezier(0.4,0,0.2,1);--modal-motion-duration:var(--motion-duration-base)}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-family-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-12{top:3rem}.top-14{top:3.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[60\]{z-index:60}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-2{margin-left:-.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.box-border{box-sizing:border-box}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-video{aspect-ratio:16/9}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-4{height:1rem}.h-48{height:12rem}Line truncated
/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--font-family-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.btn{outline:2px solid transparent;outline-offset:2px}.btn:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:var(--color-info);--tw-ring-opacity:0.7;--tw-ring-offset-width:2px;--tw-ring-offset-color:var(--color-surface);transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:var(--motion-duration-fast);transition-timing-function:cubic-bezier(0,0,.2,1)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:var(--radius-lg);border-width:1px;border-color:transparent;background-color:var(--color-primary);padding:.5rem 1rem;font-size:var(--font-size-sm);line-height:var(--line-height-snug);font-weight:600;text-transform:uppercase;letter-spacing:.025em;color:var(--color-white);--tw-shadow:var(--shadow-md);--tw-shadow-colored:var(--shadow-md);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-duration:var(--motion-duration-base);transition-timing-function:cubic-bezier(.4,0,.2,1)}.btn,.btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.btn:hover{background-color:var(--color-info-strong);--tw-shadow:var(--shadow-lg);--tw-shadow-colored:var(--shadow-lg)}.btn:focus-visible{background-color:var(--color-info-pressed)}.btn:disabled{pointer-events:none;cursor:not-allowed;opacity:.6;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\!badge,.badge{display:inline-flex;align-items:center;gap:.25rem;border-radius:var(--radius-full);background-color:var(--color-panel);padding:.25rem .75rem;font-size:var(--font-sLine truncated
+122
View File
@@ -3,3 +3,125 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.focus-ring {
@apply outline-none focus-visible:ring-2 focus-visible:ring-info focus-visible:ring-opacity-70 focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:transition-shadow focus-visible:duration-fast focus-visible:ease-out;
}
.btn {
@apply focus-ring inline-flex items-center justify-center gap-2 rounded-lg border border-transparent bg-primary px-4 py-2 text-sm font-semibold uppercase tracking-wide text-white shadow-md transition duration-base ease-in-out;
}
.btn:hover {
@apply bg-info-strong shadow-lg;
}
.btn:focus-visible {
@apply bg-info-pressed;
}
.btn:disabled {
@apply pointer-events-none cursor-not-allowed opacity-60 shadow-none;
}
.btn-ghost {
@apply btn border border-border border-opacity-60 bg-transparent text-white shadow-none;
}
.btn-ghost:hover {
@apply bg-panel-hover text-text;
}
.btn-ghost:focus-visible {
@apply bg-panel-hover;
}
.btn-ghost:disabled {
@apply pointer-events-none opacity-50 shadow-none;
}
.badge {
@apply inline-flex items-center gap-1 rounded-full bg-panel px-3 py-1 text-xs font-semibold uppercase tracking-wide text-muted-strong;
}
.badge[data-variant="critical"] {
@apply bg-critical bg-opacity-20 text-critical-strong;
}
.badge[data-variant="info"] {
@apply bg-info bg-opacity-20 text-info-strong;
}
.badge[data-variant="neutral"] {
@apply bg-border bg-opacity-40 text-muted-strong;
}
.card {
@apply focus-ring relative rounded-lg border border-transparent bg-card text-text shadow-md transition duration-base ease-in-out;
}
.card:hover {
@apply shadow-lg;
}
.card:focus-visible {
@apply border-info border-opacity-40 shadow-lg;
}
.card[data-state="critical"] {
@apply border border-critical border-opacity-40 bg-card-critical;
}
.card[data-state="private"] {
@apply bg-card-private shadow-lg;
}
.card[data-state="disabled"] {
@apply opacity-60 shadow-none;
}
.input {
@apply focus-ring block w-full rounded-md border border-border-subtle bg-surface-alt px-3 py-2 text-sm text-text shadow-sm transition duration-base ease-in-out placeholder:text-muted;
}
.input:hover {
@apply border-border;
}
.input:focus-visible {
@apply border-info-strong;
}
.input:disabled {
@apply cursor-not-allowed bg-surface text-muted opacity-60;
}
.bv-modal {
@apply fixed inset-0 z-[var(--z-modal-root)] flex items-center justify-center p-4 sm:p-6;
}
.bv-modal__panel {
@apply focus-ring relative z-[var(--z-modal-content)] w-full max-w-3xl rounded-xl border border-border border-opacity-40 bg-surface px-6 py-8 text-left text-white shadow-modal transition duration-base ease-out;
}
.bv-modal__panel:focus-visible {
@apply border-info border-opacity-50;
}
.bv-modal-backdrop {
@apply absolute inset-0 z-[var(--z-modal-overlay)] bg-overlay bg-opacity-80 backdrop-blur;
}
.grid-stack {
@apply grid gap-lg;
}
.grid-stack[data-variant="cards"] {
@apply grid-cols-1 sm:grid-cols-2 xl:grid-cols-3;
}
.grid-stack[data-orientation="vertical"] {
@apply flex flex-col gap-md;
}
}
+92
View File
@@ -0,0 +1,92 @@
# Bitvid Design System Primitives
Bitvid's visual language is now powered by Tailwind utilities backed by our design tokens. This document lists the primitives available via `css/tailwind.source.css`, how they behave across states, and when to mix them with Tailwind utilities.
## Focus Handling
All interactive primitives mix in the shared `.focus-ring` helper. It removes default outlines and applies a branded ring using `focus-visible` only. When building bespoke components, add `.focus-ring` to your root interactive element or replicate its rules:
```html
<button class="focus-ring inline-flex items-center gap-2 ...">Label</button>
```
The helper includes:
- `focus-visible:ring-2` with `ring-info` and `ring-opacity-70`
- `focus-visible:ring-offset-2` with an offset on `bg-surface`
- `focus-visible:transition-shadow` using the tokenized `duration-fast` easing curve
Never hide focus styles without providing an accessible alternative.
## Component Primitives
### Buttons
| Class | Description |
| --- | --- |
| `.btn` | Primary action button (`bg-primary`, white text). Hover lifts to `bg-info-strong`, focus pushes to `bg-info-pressed`, disabled reduces opacity. |
| `.btn-ghost` | Framed secondary action. Transparent by default with subtle border, fills with `bg-panel-hover` on hover/focus. |
Both buttons:
- Use `.focus-ring` internally
- Include pointer-blocking and opacity changes on `:disabled`
- Are uppercase with wide tracking to match our existing CTA styling
Mix in Tailwind utilities for icon spacing (`gap-3`), sizing (`px-lg`, `py-sm`), or layout (`w-full`). Avoid overriding colors unless introducing a new semantic variant.
### Badges
`.badge` renders an inline pill (`bg-panel`, uppercase text). Opt into semantic variants with `data-variant="info"`, `data-variant="critical"`, or `data-variant="neutral"`. Layer on utilities for icon alignment or truncation.
### Cards
`.card` is the base surface for grid items and panels:
- Rounded corners (`rounded-lg`) and `bg-card`
- Token shadows on hover
- Focus states reuse `.focus-ring`
- Accepts `data-state="private" | "critical" | "disabled"` for special treatments
Combine with padding utilities per layout. Interactive cards should maintain `cursor-pointer` manually (see legacy shim example below) until templates adopt dedicated controller classes.
### Form Inputs
`.input` styles text fields and textareas. Hovering deepens the border, focus highlights with `border-info-strong` and the shared focus ring. Disabled inputs dim their background and block pointer events.
Add sizing utilities (`h-12`, `text-lg`) or adornments (e.g., `pl-10`) as required. Keep placeholder contrast by relying on the built-in `placeholder:text-muted` rule.
### Modal Surface
- `.bv-modal` anchors fixed overlays (full-viewport flexbox centered layout).
- `.bv-modal-backdrop` applies the tokenized overlay color with blur.
- `.bv-modal__panel` hosts modal content (`bg-surface`, `shadow-modal`, focus ring).
Compose them together when mounting new modal portals. If you need a drawer or sheet, start from these primitives and adjust spacing/positioning via utilities.
### Grid Stack
`.grid-stack` offers gap tokens for dense layouts. Add `data-variant="cards"` for responsive card grids (`grid-cols-1` → `sm:grid-cols-2` → `xl:grid-cols-3`). Switch to `data-orientation="vertical"` for stacked flex columns that reuse the same spacing tokens.
## Legacy Compatibility Shims
During migration we keep existing selectors alive by layering `@apply` calls in `css/style.css`. Notable shims:
- `.video-card` → `.card`
- `.modal-content` → `.bv-modal__panel`
- `#profileModal .profile-switcher*` → `.card`, `.badge`, `.btn-ghost`
These shims live under the "Legacy component compatibility" section and will be removed once templates switch to the new primitives.
**Target removal:** Audit usage after the Q1 2025 UI refresh and delete remaining shims no later than April 2025.
## When to Mix Utilities
Use the primitives for foundation and lean on Tailwind utilities for:
- Layout (`flex`, `grid`, `gap-*`, `justify-*`)
- Sizing (`w-*`, `h-*`, `min-w-*`)
- Typography tweaks (`text-left`, `font-light`)
- State variations not yet encoded as tokens (e.g., success/neutral buttons)
Avoid re-declaring token values manually. If a new pattern repeats, promote it into a primitive or request new tokens to keep styling consistent.
+278 -142
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bitvid Tailwind Kitchen Sink</title>
<title>Bitvid Design System Kitchen Sink</title>
<link rel="stylesheet" href="../css/tailwind.generated.css" />
</head>
<body class="bg-page font-sans text-text-strong">
@@ -13,163 +13,299 @@
class="mx-auto flex max-w-6xl items-center justify-between px-md py-sm"
>
<h1 class="text-2xl font-semibold">Bitvid UI Kitchen Sink</h1>
<button
class="rounded-lg bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
>
Primary Action
</button>
<button class="btn">Primary Action</button>
</div>
</header>
<main class="mx-auto flex max-w-6xl flex-col gap-lg px-md py-lg">
<main class="mx-auto max-w-6xl space-y-xl px-md py-xl">
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Buttons</h2>
<div class="flex flex-wrap gap-sm">
<button
class="rounded-md bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary"
>
Primary
</button>
<button
class="rounded-md bg-info px-sm py-2 text-surface shadow-sm transition duration-fast ease-out hover:bg-info-strong"
>
Informational
</button>
<button
class="rounded-md bg-critical px-sm py-2 text-white shadow-sm transition duration-fast ease-out hover:bg-critical-strong"
>
Destructive
</button>
<button
class="rounded-md border border-border-subtle px-sm py-2 text-text-muted shadow-none transition duration-fast ease-out hover:bg-panel-hover hover:text-text"
>
Ghost
</button>
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">Buttons</h2>
<p class="text-sm text-muted">
Each block shows the default, simulated hover, focus, and disabled
states.
</p>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Cards</h2>
<div class="grid gap-md md:grid-cols-3">
<article class="rounded-lg bg-card p-md text-text shadow-lg">
<h3 class="text-lg font-semibold">Default Card</h3>
<p class="mt-xs text-text-muted">
Uses
<code class="font-mono text-sm text-info">bg-card</code> and
tokenized shadows.
</p>
<button
class="mt-sm rounded-md bg-info px-sm py-2 text-surface shadow-sm transition duration-base ease-in-out hover:bg-info-strong"
>
Watch Now
</button>
</article>
<article
class="rounded-lg bg-card-private p-md text-text shadow-lg"
>
<h3 class="text-lg font-semibold">Private Card</h3>
<p class="mt-xs text-text-muted">
Emphasizes restricted content with
<code class="font-mono text-sm text-info">bg-card-private</code
>.
</p>
</article>
<article
class="rounded-lg bg-card-critical p-md text-text shadow-lg"
>
<h3 class="text-lg font-semibold">Critical Card</h3>
<p class="mt-xs text-text-muted">
Use for outage or abuse states.
</p>
</article>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Form Inputs</h2>
<form class="grid gap-md md:grid-cols-2">
<label class="flex flex-col gap-xs">
<span class="text-sm font-medium text-text-muted"
>Display Name</span
>
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
type="text"
placeholder="Satoshi Stack"
/>
</label>
<label class="flex flex-col gap-xs">
<span class="text-sm font-medium text-text-muted">Video URL</span>
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
type="url"
placeholder="https://example.com/video.mp4"
/>
</label>
<label class="flex flex-col gap-xs md:col-span-2">
<span class="text-sm font-medium text-text-muted"
>Description</span
>
<textarea
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong shadow-sm focus:border-info focus:ring-2 focus:ring-info-strong"
rows="3"
placeholder="Describe what viewers should expect..."
></textarea>
</label>
</form>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">Modal Preview</h2>
<div
class="relative overflow-hidden rounded-xl bg-overlay p-lg text-text shadow-modal"
>
<div class="grid gap-lg lg:grid-cols-2">
<div class="space-y-sm">
<h3 class="text-lg font-semibold">Upload Video</h3>
<p class="text-text-muted">
Motion tokens control the fade via
<code class="font-mono text-sm text-info">duration-base</code>
and
<code class="font-mono text-sm text-info">ease-out</code>
utilities.
</p>
<h3 class="text-lg font-semibold">Primary (.btn)</h3>
<div class="grid gap-sm sm:grid-cols-2 xl:grid-cols-4">
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Default</p>
<button class="btn">Default</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Hover (simulated)</p>
<button class="btn bg-info-strong shadow-lg">Hover</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Focus (simulated)</p>
<button
class="btn bg-info-pressed ring-2 ring-info ring-opacity-70 ring-offset-2 ring-offset-surface"
>
Focus
</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Disabled</p>
<button class="btn" disabled>Disabled</button>
</div>
</div>
</div>
<div class="mt-md flex flex-col gap-sm">
<input
class="rounded-md border border-border-subtle bg-white px-sm py-xs text-text-strong focus:border-info focus:ring-2 focus:ring-info"
type="text"
placeholder="Magnet URI"
/>
<div class="flex justify-end gap-sm">
<button
class="rounded-md border border-border px-sm py-2 text-text-muted transition duration-fast ease-out hover:text-text"
>
Cancel
</button>
<button
class="rounded-md bg-primary px-sm py-2 text-white shadow-md transition duration-fast ease-out hover:bg-secondary"
>
Publish
</button>
<div class="space-y-sm">
<h3 class="text-lg font-semibold">Ghost (.btn-ghost)</h3>
<div class="grid gap-sm sm:grid-cols-2 xl:grid-cols-4">
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Default</p>
<button class="btn-ghost">Default</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Hover (simulated)</p>
<button class="btn-ghost bg-panel-hover text-text">
Hover
</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Focus (simulated)</p>
<button
class="btn-ghost bg-panel-hover ring-2 ring-info ring-opacity-70 ring-offset-2 ring-offset-surface"
>
Focus
</button>
</div>
<div class="space-y-xs">
<p class="text-xs uppercase text-muted">Disabled</p>
<button class="btn-ghost" disabled>Disabled</button>
</div>
</div>
</div>
</div>
</section>
<section class="space-y-md">
<h2 class="text-xl font-semibold text-text-strong">
Typography Scale
</h2>
<div class="space-y-xs">
<p class="text-2xl font-semibold">Display / 2xl</p>
<p class="text-xl font-semibold">Headline / xl</p>
<p class="text-lg font-medium">Title / lg</p>
<p class="text-base">Body / base</p>
<p class="text-sm text-text-muted">Caption / sm</p>
<p class="text-xs uppercase tracking-wide text-text-muted">
Meta / xs
<h2 class="text-xl font-semibold text-text-strong">Badges</h2>
<p class="text-sm text-muted">
Use `data-variant` for semantic colorways.
</p>
</div>
<div class="flex flex-wrap items-center gap-sm">
<span class="badge">Default</span>
<span class="badge" data-variant="info">Info</span>
<span class="badge" data-variant="critical">Critical</span>
<span class="badge" data-variant="neutral">Neutral</span>
</div>
</section>
<section class="space-y-md">
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">Cards</h2>
<p class="text-sm text-muted">
Cards inherit focus-ring behaviour and support semantic states.
</p>
</div>
<div class="grid-stack" data-variant="cards">
<article class="card p-md">
<h3 class="text-lg font-semibold">Default Card</h3>
<p class="mt-xs text-muted">
Combine with layout utilities like `p-md` or `gap-sm` for
content spacing.
</p>
<button class="btn mt-sm">Watch</button>
</article>
<article
class="card -translate-y-1 bg-card p-md shadow-lg transition-none"
>
<h3 class="text-lg font-semibold">Hover (simulated)</h3>
<p class="mt-xs text-muted">Applies the hover shadow and lift.</p>
</article>
<article
class="card bg-card p-md ring-2 ring-info ring-opacity-70 ring-offset-2 ring-offset-surface"
>
<h3 class="text-lg font-semibold">Focus (simulated)</h3>
<p class="mt-xs text-muted">Rings appear on `focus-visible`.</p>
</article>
<article class="card p-md" data-state="disabled">
<h3 class="text-lg font-semibold">Disabled</h3>
<p class="mt-xs text-muted">
Opacity drops and the shadow is removed.
</p>
</article>
</div>
</section>
<section class="space-y-md">
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">Form Inputs</h2>
<p class="text-sm text-muted">
`.input` works for both `&lt;input&gt;` and `&lt;textarea&gt;`
elements.
</p>
</div>
<div class="grid gap-md md:grid-cols-2">
<div class="space-y-xs">
<label
class="text-sm font-medium text-muted"
for="demo-input-default"
>Default</label
>
<input
id="demo-input-default"
class="input"
type="text"
placeholder="Display name"
/>
</div>
<div class="space-y-xs">
<label
class="text-sm font-medium text-muted"
for="demo-input-hover"
>Hover (simulated)</label
>
<input
id="demo-input-hover"
class="input border-border"
type="text"
value="Hovering"
/>
</div>
<div class="space-y-xs">
<label
class="text-sm font-medium text-muted"
for="demo-input-focus"
>Focus (simulated)</label
>
<input
id="demo-input-focus"
class="input border-info-strong ring-2 ring-info ring-opacity-70 ring-offset-2 ring-offset-surface"
type="text"
value="In focus"
/>
</div>
<div class="space-y-xs">
<label
class="text-sm font-medium text-muted"
for="demo-input-disabled"
>Disabled</label
>
<input
id="demo-input-disabled"
class="input"
type="text"
value="Read only"
disabled
/>
</div>
<div class="space-y-xs md:col-span-2">
<label class="text-sm font-medium text-muted" for="demo-textarea"
>Textarea</label
>
<textarea
id="demo-textarea"
class="input"
rows="3"
placeholder="Describe the video..."
></textarea>
</div>
</div>
</section>
<section class="space-y-md">
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">
Focus Ring Helper
</h2>
<p class="text-sm text-muted">
Add `.focus-ring` to custom interactives when you opt out of
`.btn` or other primitives.
</p>
</div>
<div class="flex flex-wrap gap-sm">
<a
href="#"
class="focus-ring inline-flex items-center gap-xs rounded-md border border-border bg-panel px-sm py-xs text-text no-underline"
>
Focusable Link
</a>
<button
class="focus-ring inline-flex items-center gap-xs rounded-md border border-border px-sm py-xs"
>
Plain Button
</button>
</div>
</section>
<section class="space-y-md">
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">
Modal Surface
</h2>
<p class="text-sm text-muted">
`.bv-modal` anchors the overlay, `.bv-modal-backdrop` dims the
page, and `.bv-modal__panel` styles content.
</p>
</div>
<div
class="relative isolate overflow-hidden rounded-xl bg-surface-alt p-lg text-text shadow-inner"
>
<div class="absolute inset-0" style="position: relative">
<div class="bv-modal" style="position: absolute; inset: 0">
<div class="bv-modal-backdrop"></div>
<div class="bv-modal__panel space-y-sm">
<h3 class="text-lg font-semibold">Upload Video</h3>
<p class="text-muted">
Use `.input` and `.btn` primitives inside panels for
consistency.
</p>
<input class="input" type="text" placeholder="Magnet URI" />
<div class="flex justify-end gap-sm">
<button class="btn-ghost">Cancel</button>
<button class="btn">Publish</button>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="space-y-md">
<div class="space-y-xs">
<h2 class="text-xl font-semibold text-text-strong">Grid Stack</h2>
<p class="text-sm text-muted">
Use `data-variant="cards"` for responsive columns or
`data-orientation="vertical"` for flex stacks.
</p>
</div>
<div class="grid gap-lg lg:grid-cols-2">
<div class="space-y-sm">
<h3 class="text-lg font-semibold">Card Grid</h3>
<div class="grid-stack" data-variant="cards">
<div class="card p-md">
<p class="text-sm text-muted">Card A</p>
</div>
<div class="card p-md">
<p class="text-sm text-muted">Card B</p>
</div>
<div class="card p-md">
<p class="text-sm text-muted">Card C</p>
</div>
</div>
</div>
<div class="space-y-sm">
<h3 class="text-lg font-semibold">Vertical Stack</h3>
<div class="grid-stack" data-orientation="vertical">
<div class="card p-sm">
<p class="text-sm text-muted">Row 1</p>
</div>
<div class="card p-sm">
<p class="text-sm text-muted">Row 2</p>
</div>
<div class="card p-sm" data-state="disabled">
<p class="text-sm text-muted">Row 3 (disabled)</p>
</div>
</div>
</div>
</div>
</section>
</main>
</div>