feat: sync showcase with WRNexusJS 0.8.7
This commit is contained in:
+524
-46
@@ -1,7 +1,7 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "@iconify/tailwind4";
|
||||
@source "../**/*.wrn";
|
||||
@source "../../node_modules/@wrnexus/ui/components/*.wrn";
|
||||
@source "../../../packages/ui/components/*.wrn";
|
||||
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
@@ -986,10 +986,6 @@ html[data-design-panel-open] .design-panel {
|
||||
}
|
||||
|
||||
.docs-directory-group > div > a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
overflow: hidden;
|
||||
padding: 0.42rem 0.55rem;
|
||||
border-radius: 0.45rem;
|
||||
@@ -1001,34 +997,6 @@ html[data-design-panel-open] .design-panel {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.docs-directory-group > div > a > [data-docs-component-name] {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.docs-directory-group [data-component-status] {
|
||||
flex: 0 0 auto;
|
||||
padding: 0.08rem 0.32rem;
|
||||
border: 1px solid currentColor;
|
||||
border-radius: 999px;
|
||||
font-size: 0.5rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.03em;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.docs-directory-group [data-component-status="complete"] {
|
||||
color: var(--wire-color-success);
|
||||
}
|
||||
|
||||
.docs-directory-group [data-component-status="pending"] {
|
||||
color: var(--wire-color-muted);
|
||||
}
|
||||
|
||||
.docs-directory-group [data-component-status="working"] {
|
||||
color: var(--wire-color-warning);
|
||||
}
|
||||
|
||||
.docs-directory-group > div > a:hover,
|
||||
.docs-directory-group > div > a[aria-current="page"] {
|
||||
color: var(--wire-color-text);
|
||||
@@ -2319,19 +2287,6 @@ body {
|
||||
color: var(--wire-color-primary);
|
||||
}
|
||||
|
||||
.detail-toc-group {
|
||||
margin-top: 0.35rem;
|
||||
color: var(--wire-color-text);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.detail-toc-group + a,
|
||||
.detail-toc-group + a + a,
|
||||
.detail-toc-group + a + a + a {
|
||||
padding-inline-start: 0.75rem;
|
||||
}
|
||||
|
||||
.docs-table-wrap {
|
||||
overflow: auto;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
@@ -2510,3 +2465,526 @@ body {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Component-specific showcase stages generated from showcase-profiles.mjs. */
|
||||
.showcase-visual-panel,
|
||||
.showcase-shell-preview,
|
||||
.showcase-content-block,
|
||||
.showcase-overlay-content,
|
||||
.showcase-status-panel,
|
||||
.showcase-context-target {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 1.25rem;
|
||||
background: color-mix(in srgb, var(--wire-color-surface-raised) 92%, transparent);
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.showcase-visual-panel {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
gap: 0.75rem;
|
||||
min-height: 18rem;
|
||||
padding: clamp(1.5rem, 4vw, 3rem);
|
||||
text-align: center;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 80% 10%,
|
||||
color-mix(in srgb, var(--wire-color-primary) 22%, transparent),
|
||||
transparent 38%
|
||||
),
|
||||
color-mix(in srgb, var(--wire-color-surface-raised) 94%, transparent);
|
||||
}
|
||||
|
||||
.showcase-visual-panel > span {
|
||||
color: var(--wire-color-primary);
|
||||
}
|
||||
|
||||
.showcase-visual-panel strong {
|
||||
font-size: clamp(1.1rem, 2vw, 1.45rem);
|
||||
}
|
||||
|
||||
.showcase-visual-panel p,
|
||||
.showcase-card-copy,
|
||||
.showcase-content-block p,
|
||||
.showcase-overlay-content p,
|
||||
.showcase-status-panel p {
|
||||
margin: 0;
|
||||
color: var(--wire-color-muted);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.showcase-shell-preview {
|
||||
display: grid;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.showcase-shell-preview > * {
|
||||
padding: 1rem 1.25rem;
|
||||
}
|
||||
|
||||
.showcase-shell-preview header,
|
||||
.showcase-shell-preview footer {
|
||||
background: color-mix(in srgb, var(--wire-color-primary) 10%, transparent);
|
||||
}
|
||||
|
||||
.showcase-shell-preview main {
|
||||
min-height: 9rem;
|
||||
}
|
||||
|
||||
.showcase-inline-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.showcase-action {
|
||||
display: inline-flex;
|
||||
min-height: 2.75rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.7rem 1rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 0.8rem;
|
||||
color: var(--wire-color-text);
|
||||
background: color-mix(in srgb, var(--wire-color-surface-raised) 88%, transparent);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 650;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.showcase-action--primary {
|
||||
border-color: color-mix(in srgb, var(--wire-color-primary) 72%, transparent);
|
||||
background: var(--wire-color-primary);
|
||||
color: var(--wire-color-primary-contrast);
|
||||
}
|
||||
|
||||
.showcase-content-block,
|
||||
.showcase-overlay-content,
|
||||
.showcase-status-panel,
|
||||
.showcase-context-target {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.showcase-grid-items {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
|
||||
gap: 0.75rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.showcase-grid-items > * {
|
||||
min-width: 0;
|
||||
padding: 1rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 0.85rem;
|
||||
background: var(--wire-color-surface-raised);
|
||||
}
|
||||
|
||||
.showcase-footer-banner,
|
||||
.showcase-footer-legal {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
padding: 1rem clamp(1rem, 3vw, 2rem);
|
||||
}
|
||||
|
||||
.showcase-footer-banner {
|
||||
background: color-mix(in srgb, var(--wire-color-primary) 12%, var(--wire-color-surface));
|
||||
}
|
||||
|
||||
.showcase-footer-legal {
|
||||
color: var(--wire-color-muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.showcase-card-value {
|
||||
display: block;
|
||||
color: var(--wire-color-primary);
|
||||
font-size: clamp(2rem, 5vw, 3.25rem);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.showcase-typography {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.showcase-typography :where(h2, h3, p, ul) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.showcase-typography ul {
|
||||
padding-inline-start: 1.25rem;
|
||||
}
|
||||
|
||||
.playground-event-log {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
margin: 0 1.25rem 1.25rem;
|
||||
padding: 0.9rem 1rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 0.9rem;
|
||||
background: color-mix(in srgb, var(--wire-color-surface-raised) 88%, transparent);
|
||||
color: var(--wire-color-muted);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.playground-event-log strong {
|
||||
color: var(--wire-color-text);
|
||||
}
|
||||
|
||||
.playground-event-log pre {
|
||||
overflow: auto;
|
||||
max-height: 12rem;
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
color: var(--wire-color-primary);
|
||||
}
|
||||
|
||||
.detail-event-examples {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Full-width components must use the complete preview stage rather than the
|
||||
generic compact component cap. This also prevents narrow MetricGrid cards. */
|
||||
:is(.demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="PublicPageShell"],
|
||||
[data-ui-component="AnnouncementBar"],
|
||||
[data-ui-component="PageHeader"],
|
||||
[data-ui-component="Hero"],
|
||||
[data-ui-component="SplitHero"],
|
||||
[data-ui-component="Section"],
|
||||
[data-ui-component="FeatureGrid"],
|
||||
[data-ui-component="MetricGrid"],
|
||||
[data-ui-component="StatsBar"],
|
||||
[data-ui-component="CTASection"],
|
||||
[data-ui-component="Footer"]
|
||||
) {
|
||||
place-items: stretch;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
:is(.demo-render, .playground-preview-source)
|
||||
> *:has(
|
||||
[data-ui-component="PublicPageShell"],
|
||||
[data-ui-component="AnnouncementBar"],
|
||||
[data-ui-component="PageHeader"],
|
||||
[data-ui-component="Hero"],
|
||||
[data-ui-component="SplitHero"],
|
||||
[data-ui-component="Section"],
|
||||
[data-ui-component="FeatureGrid"],
|
||||
[data-ui-component="MetricGrid"],
|
||||
[data-ui-component="StatsBar"],
|
||||
[data-ui-component="CTASection"],
|
||||
[data-ui-component="Footer"]
|
||||
),
|
||||
:is(.demo-render, .playground-preview-source)
|
||||
> :is(
|
||||
[data-ui-component="PublicPageShell"],
|
||||
[data-ui-component="AnnouncementBar"],
|
||||
[data-ui-component="PageHeader"],
|
||||
[data-ui-component="Hero"],
|
||||
[data-ui-component="SplitHero"],
|
||||
[data-ui-component="Section"],
|
||||
[data-ui-component="FeatureGrid"],
|
||||
[data-ui-component="MetricGrid"],
|
||||
[data-ui-component="StatsBar"],
|
||||
[data-ui-component="CTASection"],
|
||||
[data-ui-component="Footer"]
|
||||
) {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:is(.demo-render, .playground-preview-source)
|
||||
:is(
|
||||
[data-ui-component="FeatureGrid"],
|
||||
[data-ui-component="MetricGrid"],
|
||||
[data-ui-component="StatsBar"]
|
||||
) {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
:is(.demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="ContextMenu"],
|
||||
[data-ui-component="Dropdown"],
|
||||
[data-ui-component="Popover"],
|
||||
[data-ui-component="Tooltip"]
|
||||
) {
|
||||
min-height: 24rem;
|
||||
place-items: center;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
:is(.demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="Drawer"],
|
||||
[data-ui-component="Modal"]
|
||||
) {
|
||||
min-height: 30rem;
|
||||
place-items: stretch;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.showcase-inline-actions,
|
||||
.showcase-footer-banner,
|
||||
.showcase-footer-legal {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.showcase-action {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Interactive overlay previews -------------------------------------------------
|
||||
Overlay components must begin closed and remain usable inside catalog cards,
|
||||
detail demos, and the live playground. */
|
||||
.catalog-card[data-interactive-preview="true"] {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.catalog-card[data-interactive-preview="true"]:hover {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.catalog-card[data-interactive-preview="true"] .catalog-card-preview {
|
||||
overflow: visible;
|
||||
min-height: 22rem;
|
||||
border-radius: 1.4rem 1.4rem 0 0;
|
||||
}
|
||||
|
||||
.catalog-card[data-interactive-preview="true"] .catalog-card-stage {
|
||||
display: grid;
|
||||
width: min(100%, 34rem);
|
||||
justify-items: center;
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.catalog-interaction-hint,
|
||||
.demo-interaction-hint {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
gap: 0.45rem;
|
||||
margin: 0;
|
||||
padding: 0.42rem 0.65rem;
|
||||
color: var(--wire-color-muted);
|
||||
background: color-mix(in srgb, var(--wire-color-surface) 88%, transparent);
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 999px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.demo-interaction-hint {
|
||||
margin: 1rem auto 0;
|
||||
}
|
||||
|
||||
/* Keep full-screen overlays inside their showcase canvas instead of covering
|
||||
the complete documentation application. */
|
||||
:is(.catalog-card-preview, .demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="Drawer"],
|
||||
[data-ui-component="Modal"]
|
||||
) {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
:is(.catalog-card-preview, .demo-render, .playground-preview-source)
|
||||
[data-ui-component="Drawer"]
|
||||
.wire-drawer__layer,
|
||||
:is(.catalog-card-preview, .demo-render, .playground-preview-source)
|
||||
[data-ui-component="Modal"]
|
||||
.wire-modal__layer {
|
||||
position: absolute !important;
|
||||
inset: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
:is(.catalog-card-preview, .demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="Drawer"],
|
||||
[data-ui-component="Modal"]
|
||||
)
|
||||
.catalog-card-stage {
|
||||
position: static;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.catalog-card[data-interactive-preview="true"] .catalog-card-preview {
|
||||
min-height: 18rem;
|
||||
}
|
||||
|
||||
.catalog-interaction-hint,
|
||||
.demo-interaction-hint {
|
||||
border-radius: 0.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Toaster demo controls. The Toaster is a host with no visible surface of its
|
||||
* own, so its showcase demo is a row of buttons that raise real toasts through
|
||||
* the runtime `toast()` global.
|
||||
*/
|
||||
.showcase-toast-demo {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.showcase-toast-demo button {
|
||||
appearance: none;
|
||||
padding: 0.45rem 0.75rem;
|
||||
color: var(--wire-color-text);
|
||||
background: var(--wire-color-surface-raised);
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: 0.6rem;
|
||||
font: inherit;
|
||||
font-size: 0.8rem;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 150ms ease,
|
||||
background 150ms ease;
|
||||
}
|
||||
|
||||
.showcase-toast-demo button:hover {
|
||||
border-color: color-mix(in srgb, var(--wire-color-primary) 45%, var(--wire-color-border));
|
||||
background: var(--wire-color-surface-soft);
|
||||
}
|
||||
|
||||
/*
|
||||
* The contained overlay above resolves `inset: 0` against its nearest
|
||||
* positioned ancestor. That was the component root itself (position: relative,
|
||||
* display: inline-flex), so a Drawer/Modal preview collapsed to the size of
|
||||
* its own trigger button -- about 198x41 -- instead of filling the canvas.
|
||||
* Making the root static hands the containing block back to the canvas, and
|
||||
* the canvas gets enough height for the panel to be worth looking at.
|
||||
*/
|
||||
:is(.catalog-card-preview, .demo-render, .playground-preview-source)
|
||||
:is([data-ui-component="Drawer"], [data-ui-component="Modal"]) {
|
||||
position: static;
|
||||
}
|
||||
|
||||
:is(.demo-render, .playground-preview-source):has(
|
||||
[data-ui-component="Drawer"],
|
||||
[data-ui-component="Modal"]
|
||||
) {
|
||||
min-height: 22rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Anchored overlays must not be clipped by the demo canvas.
|
||||
*
|
||||
* .demo-canvas scrolls (overflow: auto) so tall demos stay contained, but that
|
||||
* also makes it a clipping context -- and a tooltip or popover that opens
|
||||
* ABOVE its trigger was simply cut off at the canvas edge. Full-screen
|
||||
* overlays (Modal, Drawer) still get clipped on purpose, by the rule further
|
||||
* up: they are meant to stay inside their preview instead of covering the
|
||||
* whole documentation app. Anchored ones are small and belong outside it.
|
||||
*/
|
||||
:is(
|
||||
.demo-case,
|
||||
.demo-workbench,
|
||||
.demo-canvas,
|
||||
.playground-workbench,
|
||||
.playground-preview,
|
||||
.playground-preview-source
|
||||
):has(
|
||||
[data-ui-component="Tooltip"],
|
||||
[data-ui-component="Popover"],
|
||||
[data-ui-component="Dropdown"],
|
||||
[data-ui-component="ContextMenu"],
|
||||
[data-ui-component="MegaMenu"]
|
||||
) {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* Room above the trigger so a top-placed overlay has somewhere to go. */
|
||||
.demo-canvas:has([data-ui-component="Tooltip"], [data-ui-component="Popover"]) .demo-render {
|
||||
padding-block: 5rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scrollspy demo sections.
|
||||
*
|
||||
* Real page-flow content on purpose: the runtime observes sections against the
|
||||
* viewport, so a table of contents inside a small scrolling box would have
|
||||
* nothing to react to and the demo could not be tested at all.
|
||||
*/
|
||||
.showcase-spy-doc {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.showcase-spy-section {
|
||||
min-height: 42vh;
|
||||
padding: 1rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: var(--wire-radius-md);
|
||||
background: var(--wire-color-surface-soft);
|
||||
scroll-margin-top: 5rem;
|
||||
}
|
||||
|
||||
.showcase-spy-section h3 {
|
||||
margin: 0 0 0.4rem;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.showcase-spy-section p {
|
||||
margin: 0;
|
||||
color: var(--wire-color-text-muted);
|
||||
font-size: 0.86rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/*
|
||||
* CustomScrollbar demo content. A scrolling region shows nothing at all unless
|
||||
* its content overflows, so the demo has to supply enough of it.
|
||||
*/
|
||||
.showcase-scroll-demo {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.showcase-scroll-demo p {
|
||||
margin: 0;
|
||||
color: var(--wire-color-text-muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.showcase-scroll-demo--wide {
|
||||
grid-auto-flow: column;
|
||||
grid-auto-columns: 9rem;
|
||||
}
|
||||
|
||||
.showcase-scroll-demo--wide span {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--wire-color-border);
|
||||
border-radius: var(--wire-radius-sm);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user