Máscara de progreso de recordatorio de cuidados
Completa una superposición de progreso en un escenario de recordatorio de cuidados: incluye contenido real, controles interactivos, retroalimentación de estado clara y diseño adaptable a distintos tamaños.
Tras activar JavaScript, puedes editar, ejecutar y guardar este ejemplo. El código fuente fijado es el siguiente:
<!doctype html>
<html lang="es" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Máscara de progreso de recordatorio de cuidados</title>
<style>
:root { --ink:#18332f; --paper:#f4efe4; --accent:#d45f3e; --secondary:#8fc4ad; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
* { box-sizing:border-box; }
html { min-width:320px; background:var(--paper); }
body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:"Kaiti SC",STKaiti,"Songti SC",serif; background:radial-gradient(circle at 12% 18%,color-mix(in srgb,var(--accent) 12%,transparent) 0 1px,transparent 2px),var(--paper);background-size:19px 19px; }
button,input,select,textarea { color:inherit; font:inherit; }
button,[role="button"],input,select,textarea { accent-color:var(--accent); }
button { cursor:pointer; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
[hidden] { display:none !important; }
@media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
.page{width:min(980px,calc(100% - 32px));margin:auto;padding:72px 0 92px}.mast{display:grid;grid-template-columns:1fr auto;transform:rotate(-.25deg);gap:32px;align-items:center;margin-bottom:46px}.mast h1{font-family:"Kaiti SC",STKaiti,serif;font-weight:700;font-size:clamp(40px,8vw,84px);letter-spacing:.02em;margin:0;line-height:1.12}.intro{max-width:650px;margin-top:18px;line-height:2}.scenario{padding:12px;border:2px solid var(--accent);color:var(--accent);transform:rotate(3deg)}.eyebrow{display:block;margin-bottom:9px;color:var(--accent);letter-spacing:.18em}.demo{border-radius:2px;transform:rotate(.12deg);box-shadow:0 30px 70px color-mix(in srgb,var(--ink) 18%,transparent);position:relative;min-height:430px;overflow:hidden;padding:clamp(28px,6vw,66px);background:color-mix(in srgb,var(--paper) 92%,#fff)}@media(max-width:700px){.page{width:calc(100% - 20px);padding:28px 0}.mast{grid-template-columns:1fr}.scenario{justify-self:start}.demo{padding:20px}}
.panel{padding:18px;border:3px solid var(--ink);background:var(--paper);box-shadow:8px 8px 0 var(--ink)}.stack{display:grid;gap:12px}.row{display:flex;flex-wrap:wrap;gap:8px}.action{min-height:42px;padding:8px 13px;border:3px solid var(--ink);background:var(--paper);font-weight:900}.action.primary,.action.is-active{color:var(--paper);background:var(--ink)}.status{min-height:24px;padding:8px;color:var(--paper);background:var(--ink);font-weight:900}.metric{font-size:clamp(34px,8vw,76px);font-weight:900;letter-spacing:-.08em}.muted{font-weight:600}.chip{padding:5px 8px;border:2px solid var(--ink);font-weight:900}.meter{height:14px;border:3px solid var(--ink)}.meter>i{display:block;height:100%;background:var(--ink)}
.composition-studio{display:grid;gap:14px}.studio-ruler{display:flex;justify-content:space-between;padding:0 4px;color:color-mix(in srgb,var(--ink) 55%,transparent);font:700 11px/1 ui-monospace,monospace;letter-spacing:.14em}.studio-ruler::before{content:"01 / WORKING PROTOTYPE"}.studio-ruler::after{content:"360 · 768 · 1440"}.composition-studio .demo::after{content:"";position:absolute;right:18px;bottom:18px;width:24px;height:24px;border-right:2px solid var(--accent);border-bottom:2px solid var(--accent);pointer-events:none}
.blocker-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.65fr);gap:18px;align-items:center;min-height:390px;padding:clamp(24px,6vw,64px);border:1px solid var(--line);border-radius:30px;background:var(--paper)}.blocker-stage h2{grid-column:1;margin:.2em 0;font-size:clamp(34px,7vw,74px)}.blocker-stage p,.blocker-stage>.action{grid-column:1}.blocker-stage>.action{justify-self:start}.blocker-stage ul{grid-column:2;grid-row:1/5;display:grid;gap:8px;margin:0;padding:0;list-style:none}.blocker-stage li{display:flex;justify-content:space-between;gap:12px;padding:15px;border:1px solid var(--line);border-radius:12px}.blocker-stage li span{opacity:.55}.progress-blocker-demo dialog{width:min(470px,calc(100% - 28px));padding:36px;border:0;border-radius:28px;color:var(--ink);background:var(--paper);box-shadow:0 30px 100px #0008;text-align:center}.progress-blocker-demo dialog::backdrop{background:#07110dc7;backdrop-filter:blur(7px)}.blocker-spinner{display:grid;width:92px;aspect-ratio:1;place-items:center;margin:0 auto 20px;border:2px solid var(--line);border-radius:50%}.blocker-spinner i{width:54px;aspect-ratio:1;border:7px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:blockerSpin .8s linear infinite}.progress-blocker-demo dialog h2{margin:.25em 0}.blocker-progress{height:12px;overflow:hidden;border-radius:999px;background:var(--line)}.blocker-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--accent),var(--secondary));transition:width .18s}.progress-blocker-demo dialog output{display:block;margin:12px;font-size:28px;font-weight:900}.progress-blocker-demo dialog button{padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:transparent}@keyframes blockerSpin{to{transform:rotate(1turn)}}@media(max-width:650px){.blocker-stage{grid-template-columns:1fr}.blocker-stage h2,.blocker-stage p,.blocker-stage>.action,.blocker-stage ul{grid-column:auto;grid-row:auto}}.workflow-guide{display:grid;grid-template-columns:190px minmax(0,1fr);grid-template-areas:"rail core" "rail evidence";gap:14px 18px}.guide-rail{grid-area:rail;display:grid;align-content:start;gap:15px;padding:18px;border-right:1px solid var(--line)}.guide-rail ol{display:grid;gap:8px;padding:0;margin:0;list-style:none}.guide-rail li{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center;padding:9px;opacity:.5}.guide-rail li[aria-current="step"]{opacity:1;color:var(--paper);background:var(--ink)}.guide-rail li.is-complete{opacity:1;color:var(--accent)}.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.guide-actions .action{padding-inline:8px}#workflowGuideProgress{height:6px;background:var(--line)}#workflowGuideProgress i{display:block;width:0;height:100%;background:var(--accent)}.guide-core{grid-area:core;min-width:0;padding:16px;border:1px solid var(--line)}.guide-core>p{margin:0 0 14px;padding:10px;border-left:4px solid var(--accent);background:color-mix(in srgb,var(--secondary) 12%,transparent)}.guide-core[data-guide-step="1"]{border-radius:28px}.guide-core[data-guide-step="2"]{box-shadow:inset 0 0 0 4px color-mix(in srgb,var(--accent) 35%,transparent)}.guide-evidence{grid-area:evidence;display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:start}.guide-evidence details,.guide-evidence form{padding:12px;border:1px solid var(--line)}.guide-evidence label{display:grid;gap:7px}.guide-evidence textarea{width:100%;padding:9px;border:1px solid var(--line);background:var(--paper)}@media(max-width:900px){.workflow-guide{grid-template-columns:1fr;grid-template-areas:"core" "rail" "evidence"}.guide-rail{border-right:0;border-bottom:1px solid var(--line)}.guide-rail ol{grid-template-columns:repeat(3,1fr)}.guide-evidence{grid-template-columns:1fr}}
</style>
</head>
<body data-aesthetic="paper" data-composition="studio">
<main class="page">
<header class="mast"><div><span class="eyebrow">paper / máscara de progreso / BEGINNER</span><h1>Máscara de progreso de recordatorio de cuidados</h1><p class="intro">Completa una superposición de progreso en un escenario de recordatorio de cuidados: incluye contenido real, controles interactivos, retroalimentación de estado clara y diseño adaptable a distintos tamaños.</p></div><span class="scenario">Recordatorio de cuidado</span></header>
<div class="composition-studio"><div class="studio-ruler" aria-hidden="true"></div><section class="demo" aria-label="Área interactiva de la máscara de progreso de recordatorio de cuidados"><div class="workflow-guide"><nav class="guide-rail" aria-label="Guía de recordatorio de cuidados"><span class="eyebrow">recordatorio de cuidados GUIDE</span><ol><li data-workflow-guide-step="0" aria-current="step"><b>1</b><span>Panel abierto de recordatorio de cuidados</span></li><li data-workflow-guide-step="1"><b>2</b><span>Procesando el aviso de cuidados</span></li><li data-workflow-guide-step="2"><b>3</b><span>Comentarios de finalización del recordatorio de atención</span></li></ol><div class="guide-actions"><button id="workflowGuideBack" class="action" type="button" disabled>Paso anterior</button><button id="workflowGuideNext" class="action primary" type="button">Completar este paso</button></div><div id="workflowGuideProgress" role="progressbar" aria-label="Progreso del recordatorio de atención" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><i></i></div></nav><section id="workflowCore" class="workflow-core guide-core" data-guide-step="0" aria-describedby="workflowGuideInstruction"><p id="workflowGuideInstruction">Completa las acciones relacionadas con “Abrir panel de recordatorio de cuidados” en el caso principal.</p><!-- 11DZ_CORE_START:overlays-feedback-progress-blocker --><section class="progress-blocker-demo"><div class="blocker-stage"><span class="eyebrow">PROGRESS BLOCKER</span><h2>Gestionar tareas de recordatorio de cuidados</h2><p>El progreso modal solo se muestra tras una activación explícita; el usuario puede cancelarlo en cualquier momento.</p><button id="blockerStart" class="action primary" type="button" data-core-bridge="overlays-feedback-progress-blocker">Empezar a procesar</button><ul><li>Resumen de recordatorios de cuidados<span>Esperando</span></li><li>Plan de recordatorios de cuidados<span>Esperando</span></li><li>Inspiración para el recordatorio de cuidados<span>Esperando</span></li></ul></div><dialog id="progressBlocker" aria-labelledby="blockerTitle"><div class="blocker-spinner" aria-hidden="true"><i></i></div><span class="eyebrow">PROCESSING</span><h2 id="blockerTitle">Procesando localmente</h2><p id="blockerMessage">Preparando datos…</p><div class="blocker-progress" role="progressbar" aria-label="Progreso de procesamiento" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><i id="blockerMeter"></i></div><output id="blockerValue">0%</output><button id="blockerCancel" type="button">Cancelar procesamiento</button></dialog></section><!-- 11DZ_CORE_END --></section><aside class="guide-evidence"><details id="workflowGuideDetails"><summary>Ver los requisitos de aceptación</summary><ul><li>Recordatorio de cuidados: abrir el panel requiere un cambio de estado visible</li><li>El procesamiento del recordatorio asistencial necesita un cambio de estado visible</li><li>La retroalimentación de finalización del aviso de cuidados necesita un cambio de estado visible una vez</li></ul></details><form id="workflowGuideEvidenceForm"><label>Evidencia de esta etapa<textarea id="workflowGuideEvidence" rows="3" placeholder="Registrar el estado observado"></textarea></label><input class="action" type="submit" value="Guardar evidencia"></form><output id="workflowGuideSummary">0 / 3 pasos completados</output></aside></div><p id="status" class="status" role="status" aria-live="polite"></p></section></div>
</main>
<script>
'use strict';
const statusOutput = document.querySelector('#status');
const announce = message => { statusOutput.textContent = message; };
/* 11DZ_CORE_SCRIPT_START:overlays-feedback-progress-blocker */
const progressBlocker=document.querySelector('#progressBlocker');const blockerProgress=progressBlocker.querySelector('[role="progressbar"]');const blockerMeter=document.querySelector('#blockerMeter');const blockerValue=document.querySelector('#blockerValue');const blockerMessage=document.querySelector('#blockerMessage');let blockerTimer=0;let blockerCloseTimer=0;let blockerAmount=0;function cancelBlocker(message){clearInterval(blockerTimer);clearTimeout(blockerCloseTimer);blockerTimer=0;blockerCloseTimer=0;if(progressBlocker.open)progressBlocker.close();announce(message);}document.querySelector('#blockerStart').addEventListener('click',()=>{blockerAmount=0;blockerMeter.style.width='0%';blockerValue.textContent='0%';blockerProgress.setAttribute('aria-valuenow','0');blockerMessage.textContent='Preparando datos…';progressBlocker.showModal();blockerTimer=setInterval(()=>{blockerAmount=Math.min(100,blockerAmount+10);blockerMeter.style.width=blockerAmount+'%';blockerValue.textContent=blockerAmount+'%';blockerProgress.setAttribute('aria-valuenow',String(blockerAmount));blockerMessage.textContent=blockerAmount<40?'Preparando datos…':blockerAmount<80?'Configuración de la app…':'Comprobación completada…';if(blockerAmount===100){clearInterval(blockerTimer);blockerTimer=0;blockerCloseTimer=setTimeout(()=>cancelBlocker('El procesamiento local ha finalizado'),350);}},160);});document.querySelector('#blockerCancel').addEventListener('click',()=>cancelBlocker('Procesamiento cancelado'));progressBlocker.addEventListener('cancel',event=>{event.preventDefault();cancelBlocker('Procesamiento cancelado');});
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"overlays-feedback-progress-blocker","selector":"[data-core-bridge=\"overlays-feedback-progress-blocker\"]","mode":"click","key":"Enter"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · versión principal '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.addEventListener("click",workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();workflowBridgeControl.click();const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowGuideCore=document.querySelector('#workflowCore');const workflowGuideStages=["Panel abierto de recordatorio de cuidados","Procesando el aviso de cuidados","Comentarios de finalización del recordatorio de atención"];const workflowGuideState={step:0,completed:new Set(),evidence:new Map(),consumedVersion:0};function workflowGuideDrive(){const step=workflowGuideState.step;workflowGuideCore.dataset.guideStep=String(step);document.querySelector('#workflowGuideInstruction').textContent='Por favor, completa “'+workflowGuideStages[step]+'acciones relacionadas con «».';document.querySelectorAll('[data-workflow-guide-step]').forEach((item,index)=>{item.classList.toggle('is-complete',workflowGuideState.completed.has(index));if(index===step)item.setAttribute('aria-current','step');else item.removeAttribute('aria-current');});document.querySelector('#workflowGuideBack').disabled=step===0;document.querySelector('#workflowGuideNext').textContent=step===workflowGuideStages.length-1?'Proceso completado':'Completar este paso';const percent=Math.round(workflowGuideState.completed.size/workflowGuideStages.length*100);const progress=document.querySelector('#workflowGuideProgress');progress.setAttribute('aria-valuenow',String(percent));progress.querySelector('i').style.width=percent+'%';document.querySelector('#workflowGuideSummary').textContent=workflowGuideState.completed.size+' / '+workflowGuideStages.length+' Paso completado · '+workflowBridgeSummary();announce('Paso actual del aviso de cuidados:'+workflowGuideStages[step]);}function workflowGuideAdvance(direction){if(direction>0){const bridge=workflowBridgeActivate();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('Primero completa el cambio visible de estado del caso principal');return;}workflowGuideState.consumedVersion=version;workflowGuideState.completed.add(workflowGuideState.step);announce('Caso principal actualizado · '+bridge.summary);}workflowGuideState.step=Math.max(0,Math.min(workflowGuideStages.length-1,workflowGuideState.step+direction));workflowGuideDrive();}document.querySelector('#workflowGuideBack').addEventListener('click',()=>workflowGuideAdvance(-1));document.querySelector('#workflowGuideNext').addEventListener('click',()=>workflowGuideAdvance(1));document.querySelector('#workflowGuideEvidenceForm').addEventListener('submit',event=>{event.preventDefault();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('La prueba no se ha guardado: el caso principal aún no tiene nuevos cambios');return;}const text=document.querySelector('#workflowGuideEvidence').value.trim();workflowGuideState.evidence.set(workflowGuideState.step,text||'Comprobación de estado visible completada');workflowGuideState.completed.add(workflowGuideState.step);workflowGuideState.consumedVersion=version;workflowGuideDrive();announce('La evidencia de este paso se ha guardado · '+workflowBridgeSummary());});document.querySelector('#workflowGuideDetails').addEventListener('toggle',event=>announce(event.currentTarget.open?'Requisitos de aceptación desplegados':'Requisitos de aceptación contraídos'));workflowGuideDrive();
workflowBridgeReset();
</script>
</body>
</html>