Files
BEYOND/addons/beyond_base/static/src/webclient/beyond_launcher.scss
T
Jorem JuárezandClaude Opus 5 07c4296668 Abre el diálogo QR sobre el lanzador y limita el foco al teclado
El diálogo aparecía sobre la última vista porque el bloque QR cerraba el
menú de apps al tocarlo, no porque navegara: la acción de cliente es una
función simple y nunca monta un controlador. Basta con closingMode "none"
en ese bloque para que el lanzador se quede de fondo; el resto de los
bloques siguen navegando y cerrando como siempre. Cancelar, buscar y abrir
dejan al usuario donde estaba, y con una sola sucursal la pestaña del
kiosco se abre sin mover el webclient.

El anillo de foco pasa a :focus-visible. Con el lanzador ya visible detrás
del diálogo, un :focus normal dejaba contorno alrededor de lo último que
tocó el mouse. El app actual deja de reutilizar el anillo por lo mismo; en
las tarjetas chicas conserva su tinte, que no es un contorno.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 13:23:57 -06:00

274 lines
9.9 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// =============================================================================
// C-005/C-006 · Beyond launcher v2 (ADR-005)
//
// Faithful translation of the signed-off "Lanzador v2" design. Every colour,
// radius, size, gap, duration and font weight below comes from that file; the
// few rules that have no counterpart there are marked ENGINEERING and explain
// what they protect against (an app-less band, a long fallback row, a short
// viewport) — the design only covers the nominal case.
//
// It is still the native apps dropdown, restyled: the popover is forced full
// screen with :has() + !important, which beats the inline positioning the
// popover service writes. :has() is supported by the target browsers
// (BRIEF §8).
//
// Local, on purpose: the orange below is this one block's colour-coding, not a
// brand colour, so it is NOT a token in scss/beyond_variables.scss. The purple
// used to live here too and graduated to $beyond-kiosco once the kiosk page and
// the "Abrir código QR" dialog started using it. See the SCOPE note there.
// =============================================================================
// "Panel General" block
$beyond-launcher-panel: #C55A22;
$beyond-launcher-panel-hover: #B14E1B;
$beyond-launcher-panel-active: #984115;
$beyond-font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
// -----------------------------------------------------------------------------
// Manrope, self-hosted. NOT loaded from Google Fonts on purpose: the branch
// terminals have to keep working with no internet. These are the same variable
// woff2 subsets the design shipped (one file per unicode range, weight axis
// 500–800), so the four weights the design uses all resolve from one file.
// -----------------------------------------------------------------------------
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-cyrillic.woff2') format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-greek.woff2') format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Manrope';
font-style: normal;
font-weight: 500 800;
font-display: swap;
src: url('/beyond_base/static/fonts/manrope-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
// -----------------------------------------------------------------------------
// Full-screen shell
// -----------------------------------------------------------------------------
.o-dropdown--menu:has(.beyond_launcher_band) {
position: fixed !important;
inset: 0 !important;
width: 100% !important;
height: 100% !important;
max-width: none !important;
max-height: none !important;
transform: none !important;
margin: 0 !important;
padding: 0;
border: 0;
border-radius: 0;
display: flex;
flex-direction: column;
background: $beyond-surface;
color: $beyond-ink;
font-family: $beyond-font-family;
-webkit-font-smoothing: antialiased;
// ENGINEERING — the design assumes a viewport tall enough for the whole
// layout, where nothing scrolls. Below that, scrolling the shell beats
// clipping tiles out of reach (see .beyond_launcher_primary).
overflow-x: hidden;
overflow-y: auto;
// The signature strip
.beyond_launcher_brand {
flex: none;
padding: 18px 22px 6px;
span {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.04em;
color: $beyond-ink-muted;
}
}
// ENGINEERING — a band with no apps for this role must not leave a ghost
// strip. :has() rather than :empty so template whitespace cannot fool it.
.beyond_launcher_primary:not(:has(.beyond_block)),
.beyond_launcher_secondary:not(:has(.beyond_tile)) {
display: none;
}
.beyond_launcher_primary {
// Design says `flex: 1; min-height: 0`. `1 0 auto` renders identically
// wherever the layout fits and, when it does not, pushes the shell into
// scrolling instead of squashing the blocks.
flex: 1 0 auto;
display: flex;
gap: 6px;
padding: 8px 6px 0;
}
.beyond_launcher_secondary {
flex: none;
height: 128px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 6px;
// ENGINEERING — the row also catches every unmapped app, so it can grow
// past the viewport. Scrolling sideways keeps them reachable without
// breaking the fixed 128px band. The design's centring is done with
// auto margins rather than justify-content on purpose: centred flex
// content overflows in BOTH directions, pushing the first tiles off
// the left edge where scrolling cannot reach them. Auto margins
// collapse to 0 once there is no free space, so the row simply starts
// at the left and scrolls right.
justify-content: flex-start;
overflow-x: auto;
.beyond_tile:first-child { margin-inline-start: auto; }
.beyond_tile:last-child { margin-inline-end: auto; }
}
// Shared reset: DropdownItem renders an <a.dropdown-item>, so Bootstrap's
// block layout, padding, colour and nowrap have to go before the design's
// own box takes over.
.beyond_block,
.beyond_tile {
box-sizing: border-box;
display: flex !important;
flex-direction: column;
align-items: center;
width: auto;
background: none;
border: 0;
text-align: center;
text-decoration: none;
cursor: pointer;
}
// -------------------------------------------------------------------------
// Main band: three colour-coded blocks sharing the width
// -------------------------------------------------------------------------
.beyond_block {
flex: 1 1 0;
min-width: 0;
justify-content: center;
gap: 34px;
padding: 0;
border-radius: 28px;
transition: flex-grow 220ms ease, background 180ms ease;
&:hover,
&:active {
flex-grow: 1.18;
}
// Keyboard only (18-aug-2026). A plain :focus also fired on click, and
// now that the QR block answers in place the launcher stays up with a
// ring around whatever the pointer last hit. The current app no longer
// reuses this ring either: it would be a contour a mouse user never
// asked for.
&:focus-visible {
outline: 4px solid $beyond-ink;
outline-offset: -6px;
}
}
.beyond_block_name {
font-size: 30px;
font-weight: 800;
letter-spacing: -0.02em;
color: #FFFFFF;
}
.beyond_block_venta {
background: $beyond-primary;
&:hover { background: $beyond-primary-dark; }
&:active { background: $beyond-primary-darker; }
}
.beyond_block_panel {
background: $beyond-launcher-panel;
&:hover { background: $beyond-launcher-panel-hover; }
&:active { background: $beyond-launcher-panel-active; }
}
.beyond_block_qr {
background: $beyond-kiosco;
&:hover { background: $beyond-kiosco-dark; }
&:active { background: $beyond-kiosco-darker; }
}
// -------------------------------------------------------------------------
// Secondary row: small tiles (~132x98, well over the 48px touch floor)
// -------------------------------------------------------------------------
.beyond_tile {
flex: none;
width: 132px;
padding: 14px 0;
gap: 10px;
border-radius: 20px;
transition: background 140ms ease;
// Same rule as the blocks for the contour; the tint stays on the
// current app because a background is not a focus ring.
&:hover,
&:focus-visible,
&.focus {
background: $beyond-surface-hover;
}
}
.beyond_tile_name {
font-size: 13px;
font-weight: 700;
color: $beyond-ink-soft;
// ENGINEERING — fallback app names are arbitrary; clip them rather than
// let a long one wrap and push the tile out of the 128px band.
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Native icon, sized like the designed 42px glyphs it stands in for.
.beyond_tile_icon {
width: 42px;
height: 42px;
object-fit: contain;
}
}