Mercurial
view design_system/src/styles/components.css @ 261:b401627fc49e
Add JRPG mock flows and interactive previews
Add scripted mock SSE commands, custom event forwarding, animated chat turns, full-height message navigation, and a cyberpunk resume dossier.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 20:38:32 -0700 |
| parents | 60a876c4587a |
| children |
line wrap: on
line source
@import url("./elements.css"); :where( zen-button, zen-card, zen-alert, zen-field, zen-stack, zen-notifications ) { box-sizing: border-box; font-family: var(--zenbu-sys-font-family-ui); color: var(--zenbu-sys-color-text-primary); } zen-button { display: inline-flex; } zen-button:not([appearance="plain"]) > :where(button, a) { --zenbu-button-background: var(--zenbu-sys-color-action-primary-background); --zenbu-button-background-hover: var(--zenbu-sys-color-action-primary-background-hover); --zenbu-button-background-pressed: var(--zenbu-sys-color-action-primary-background-pressed); --zenbu-button-border: var(--zenbu-sys-color-action-primary-border); --zenbu-button-foreground: var(--zenbu-sys-color-action-primary-foreground); appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--zenbu-control-gap); min-height: var(--zenbu-control-height); padding: var(--zenbu-control-padding-block) var(--zenbu-control-padding-inline); border: var(--zenbu-sys-stroke-width) solid var(--zenbu-button-border); border-radius: var(--zenbu-sys-radius-control); box-shadow: var(--zenbu-sys-shadow-subtle); background: var(--zenbu-button-background); color: var(--zenbu-button-foreground); font: var(--zenbu-sys-font-weight-strong) var(--zenbu-control-font-size) / var(--zenbu-control-line-height) var(--zenbu-sys-font-family-ui); text-decoration: none; cursor: pointer; transition: background var(--zenbu-sys-motion-duration-state) var(--zenbu-sys-motion-ease-state), border-color var(--zenbu-sys-motion-duration-state) var(--zenbu-sys-motion-ease-state), box-shadow var(--zenbu-sys-motion-duration-feedback) var(--zenbu-sys-motion-ease-state), transform var(--zenbu-sys-motion-duration-feedback) var(--zenbu-sys-motion-ease-state); } zen-button:not([appearance="plain"]) > :where(button, a):hover:not( :disabled, [aria-disabled="true"] ) { background: var(--zenbu-button-background-hover); transform: translate(-1px, -1px); box-shadow: var(--zenbu-sys-shadow-raised); } zen-button:not([appearance="plain"]) > :where(button, a):active:not( :disabled, [aria-disabled="true"] ) { background: var(--zenbu-button-background-pressed); transform: translate(2px, 2px); box-shadow: none; } zen-button:not([appearance="plain"]) > :where(button, a):focus-visible, zen-alert [data-zen-dismiss]:focus-visible { outline: var(--zenbu-sys-focus-width) solid var(--zenbu-sys-color-focus-outer); outline-offset: var(--zenbu-sys-focus-offset); } zen-field:not([appearance="plain"]) :where( input, select, textarea ):focus-visible { outline: none; } zen-button:not([appearance="plain"])[variant="quiet"] > :where(button, a) { --zenbu-button-background: var(--zenbu-sys-color-action-neutral-background); --zenbu-button-background-hover: var(--zenbu-sys-color-action-neutral-background-hover); --zenbu-button-background-pressed: var(--zenbu-sys-color-action-neutral-background-pressed); --zenbu-button-border: var(--zenbu-sys-color-action-neutral-border); --zenbu-button-foreground: var(--zenbu-sys-color-action-neutral-foreground); } zen-button:not([appearance="plain"])[variant="danger"] > :where(button, a) { --zenbu-button-background: var(--zenbu-sys-color-action-danger-background); --zenbu-button-background-hover: var(--zenbu-sys-color-action-danger-background-hover); --zenbu-button-background-pressed: var(--zenbu-sys-color-action-danger-background-pressed); --zenbu-button-border: var(--zenbu-sys-color-action-danger-border); --zenbu-button-foreground: var(--zenbu-sys-color-action-danger-foreground); } zen-button:not([appearance="plain"])[disabled] > :where(button, a), zen-button:not([appearance="plain"])[loading] > :where(button, a) { opacity: var(--zenbu-sys-opacity-disabled); box-shadow: none; cursor: not-allowed; transform: none; } zen-button:not([appearance="plain"])[loading] > :where(button, a)::before { width: var(--zenbu-control-icon-size); height: var(--zenbu-control-icon-size); border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: zen-spin 700ms linear infinite; } @keyframes zen-spin { to { transform: rotate(1turn); } } zen-card { display: block; } zen-card:not([appearance="plain"]) > :where(article, section) { --zenbu-card-background: var(--zenbu-sys-color-surface-raised); --zenbu-card-border: var(--zenbu-sys-color-border-subtle); --zenbu-card-foreground: var(--zenbu-sys-color-text-primary); height: 100%; padding: var(--zenbu-sys-padding-lg); border: var(--zenbu-sys-stroke-width) solid var(--zenbu-card-border); border-radius: var(--zenbu-sys-radius-container); box-shadow: var(--zenbu-sys-shadow-raised); background: var(--zenbu-card-background); color: var(--zenbu-card-foreground); } zen-card:not([appearance="plain"])[interactive] > :where(article, section) { transition: box-shadow var(--zenbu-sys-motion-duration-state) var(--zenbu-sys-motion-ease-state), transform var(--zenbu-sys-motion-duration-state) var(--zenbu-sys-motion-ease-state); } zen-card:not([appearance="plain"])[interactive] > :where(article, section):hover { transform: translate(-2px, -2px); box-shadow: var(--zenbu-sys-shadow-overlay); } zen-card :where(h2, h3, p) { margin-top: 0; } zen-alert { --zenbu-alert-background: var(--zenbu-sys-color-info-background); --zenbu-alert-border: var(--zenbu-sys-color-info-border); --zenbu-alert-foreground: var(--zenbu-sys-color-info-foreground); display: grid; --zenbu-alert-indicator-width: var(--zenbu-ref-space-1-5); grid-template-columns: var(--zenbu-alert-indicator-width) minmax(0, 1fr) auto; align-items: start; gap: var(--zenbu-sys-space-control); padding: var(--zenbu-sys-padding-md); border: var(--zenbu-sys-stroke-width) solid var(--zenbu-alert-border); border-radius: var(--zenbu-sys-radius-container); background: var(--zenbu-alert-background); color: var(--zenbu-alert-foreground); } zen-alert::before { align-self: stretch; border-radius: var(--zenbu-sys-radius-pill); background: var(--zenbu-alert-border); content: ""; } zen-alert[tone="success"] { --zenbu-alert-background: var(--zenbu-sys-color-success-background); --zenbu-alert-border: var(--zenbu-sys-color-success-border); --zenbu-alert-foreground: var(--zenbu-sys-color-success-foreground); } zen-alert[tone="warning"] { --zenbu-alert-background: var(--zenbu-sys-color-warning-background); --zenbu-alert-border: var(--zenbu-sys-color-warning-border); --zenbu-alert-foreground: var(--zenbu-sys-color-warning-foreground); } zen-alert[tone="danger"] { --zenbu-alert-background: var(--zenbu-sys-color-danger-background); --zenbu-alert-border: var(--zenbu-sys-color-danger-border); --zenbu-alert-foreground: var(--zenbu-sys-color-danger-foreground); } zen-alert > :where(p, div) { margin: 0; } zen-alert [data-zen-dismiss] { min-width: var(--zenbu-sys-control-height-xs); min-height: var(--zenbu-sys-control-height-xs); padding: 0; border: 0; border-radius: var(--zenbu-sys-radius-pill); background: transparent; color: inherit; font: var(--zenbu-sys-font-weight-bold) var(--zenbu-sys-font-size-lg) / 1 var(--zenbu-sys-font-family-ui); cursor: pointer; } zen-field { --zenbu-field-textarea-min-height: calc(var(--zenbu-ref-space-24) + var(--zenbu-ref-space-4)); display: grid; gap: var(--zenbu-sys-space-icon-label); } zen-field[appearance="plain"] { display: contents; } zen-field:not([appearance="plain"]) > label { font-family: var(--zenbu-sys-type-label-family); font-size: var(--zenbu-sys-type-label-size); font-weight: var(--zenbu-sys-type-label-weight); line-height: var(--zenbu-sys-type-label-line-height); } zen-field:not([appearance="plain"]) > :where(input, select, textarea) { width: 100%; min-height: var(--zenbu-control-height); box-sizing: border-box; padding: var(--zenbu-control-padding-block) var(--zenbu-control-padding-inline); border: var(--zenbu-sys-stroke-width) solid var(--zenbu-sys-color-border-default); border-radius: var(--zenbu-sys-radius-control); background: var(--zenbu-sys-color-surface-default); color: var(--zenbu-sys-color-text-primary); font-family: inherit; font-size: var(--zenbu-control-font-size); line-height: var(--zenbu-control-line-height); } zen-field:not([appearance="plain"]) > textarea { min-height: var(--zenbu-field-textarea-min-height); resize: vertical; } zen-field:not([appearance="plain"]) > :where(small, [data-help]) { color: var(--zenbu-sys-color-text-secondary); } zen-field:not([appearance="plain"])[data-invalid] > :where(input, select, textarea) { border-color: var(--zenbu-sys-color-danger-border); } zen-field:not([appearance="plain"])[data-invalid] > :where(small, [data-help]) { color: var(--zenbu-sys-color-danger-foreground); } zen-stack { --zenbu-stack-gap: var(--zenbu-sys-space-group); display: flex; flex-direction: column; gap: var(--zenbu-stack-gap); } zen-stack[direction="row"] { flex-flow: row wrap; align-items: center; } zen-stack[gap="tight"] { --zenbu-stack-gap: var(--zenbu-sys-space-related); } zen-stack[gap="loose"] { --zenbu-stack-gap: var(--zenbu-sys-space-container); } zen-notifications > [data-zen-notification-stack] { --zenbu-notification-z-index: var(--zenbu-sys-z-notification); --zenbu-notification-inset: var(--zenbu-sys-padding-md); --zenbu-notification-bottom-inset: var(--zenbu-sys-padding-md); --zenbu-notification-collapsed-height: 0; --zenbu-notification-expanded-height: 0; position: fixed; z-index: var( --zenbu-notification-z-index, var(--zenbu-sys-z-notification) ); inset-inline-end: var( --zenbu-notification-inset, var(--zenbu-sys-padding-md) ); inset-block-end: var( --zenbu-notification-bottom-inset, var(--zenbu-sys-padding-md) ); inline-size: min(24rem, calc(100vi - 2rem)); height: var(--zenbu-notification-collapsed-height, 0); --zenbu-notification-gap: var(--zenbu-sys-space-control); pointer-events: auto; isolation: isolate; transition: height var(--zenbu-sys-motion-duration-layout) var(--zenbu-sys-motion-ease-layout); } zen-notifications > [data-zen-notification-stack]:is( :hover, :focus-within ) { height: var(--zenbu-notification-expanded-height, 0); } zen-notifications > [data-zen-notification-stack] > article { --zenbu-notification-collapsed-opacity: 1; --zenbu-notification-collapsed-offset: 0; --zenbu-notification-offset: 0; --zenbu-notification-scale: 1; --zenbu-notification-background: var(--zenbu-sys-color-surface-raised); --zenbu-notification-border: var(--zenbu-sys-color-border-subtle); --zenbu-notification-foreground: var(--zenbu-sys-color-text-primary); position: absolute; inset-inline: 0; inset-block-end: 0; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) 2rem; align-items: start; gap: var(--zenbu-sys-space-control); padding: var(--zenbu-sys-padding-md); border: var(--zenbu-sys-stroke-width) solid var(--zenbu-notification-border); border-radius: var(--zenbu-sys-radius-container); box-shadow: var(--zenbu-sys-shadow-overlay); background: var(--zenbu-notification-background); color: var(--zenbu-notification-foreground); opacity: var(--zenbu-notification-collapsed-opacity, 1); pointer-events: none; transform: translate3d( 0, var(--zenbu-notification-collapsed-offset, 0), 0 ) scale(var(--zenbu-notification-scale, 1)); transform-origin: center bottom; transition: opacity var(--zenbu-sys-motion-duration-exit) var(--zenbu-sys-motion-ease-exit), transform var(--zenbu-sys-motion-duration-layout) var(--zenbu-sys-motion-ease-layout); will-change: transform; animation: zen-notification-enter 160ms ease-out; } zen-notifications > [data-zen-notification-stack] > article[data-depth="0"] { pointer-events: auto; } zen-notifications > [data-zen-notification-stack]:is( :hover, :focus-within ) > article { opacity: 1; pointer-events: auto; transform: translate3d( 0, var(--zenbu-notification-offset, 0px), 0 ) scale(1); } zen-notifications > [data-zen-notification-stack] > article[data-removing] { opacity: 0; pointer-events: none; transform: translate3d(110%, 0, 0) scale(0.96); } .zen-notification-tone { --zenbu-notification-tone-background: var(--zenbu-sys-color-info-foreground); --zenbu-notification-tone-foreground: var(--zenbu-sys-color-text-inverse); display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: var(--zenbu-sys-radius-pill); background: var(--zenbu-notification-tone-background); color: var(--zenbu-notification-tone-foreground); font-weight: var(--zenbu-sys-font-weight-bold); } [data-tone="success"] > .zen-notification-tone { --zenbu-notification-tone-background: var(--zenbu-sys-color-success-foreground); } [data-tone="warning"] > .zen-notification-tone { --zenbu-notification-tone-background: var(--zenbu-sys-color-warning-foreground); } [data-tone="error"] > .zen-notification-tone { --zenbu-notification-tone-background: var(--zenbu-sys-color-danger-foreground); } .zen-notification-content { display: grid; gap: var(--zenbu-sys-space-icon-label); } .zen-notification-message, .zen-notification-description { margin: 0; } .zen-notification-message { font-weight: var(--zenbu-sys-font-weight-bold); } .zen-notification-description { color: var(--zenbu-sys-color-text-secondary); font-size: var(--zenbu-sys-font-size-sm); } .zen-notification-action, .zen-notification-dismiss { border: 0; background: transparent; color: inherit; cursor: pointer; } .zen-notification-action { justify-self: start; margin-top: var(--zenbu-sys-space-related); padding: 0; color: var(--zenbu-sys-color-text-link); font-weight: var(--zenbu-sys-font-weight-bold); text-decoration: underline; text-underline-offset: 0.2em; } .zen-notification-dismiss { width: 2rem; height: 2rem; padding: 0; border-radius: var(--zenbu-sys-radius-pill); font-size: var(--zenbu-sys-font-size-xl); } .zen-notification-action:focus-visible, .zen-notification-dismiss:focus-visible { outline: var(--zenbu-sys-focus-width) solid var(--zenbu-sys-color-focus-outer); outline-offset: var(--zenbu-sys-focus-offset); } .zen-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; } @keyframes zen-notification-enter { from { opacity: 0; } } @media (forced-colors: active) { zen-notifications > [data-zen-notification-stack] > article, .zen-notification-tone { border: 1px solid CanvasText; } } @media (prefers-reduced-motion: reduce) { zen-button > :where(button, a), zen-card > :where(article, section) { transition: none; } zen-button[loading] > :where(button, a)::before { animation-duration: 1400ms; } zen-notifications > [data-zen-notification-stack] > article { animation: none; transition: none; } zen-notifications > [data-zen-notification-stack] { transition: none; } }