From 034f3bfbb53c874da9f18c99d0ebcd36dd792319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Fri, 13 Nov 2026 15:31:38 -0300 Subject: [PATCH] feat: new layout phase A, Phosphor icons and shared pieces Roadmap Novo Layout, phase A: every icon (IC, the stage marks, the rail and the inline icons in kanban.html, the theme toggle and the select chevrons) is Phosphor regular, filled at 256. Shared pieces from the canvas for the next phases: switch, tag, data table, dialog scoping, two- and three-column grids, tab counts in the lighter grey, and 44 px controls on the phone. Built by Prensa. Co-Authored-By: Claude Opus 5.5 (1M context) --- web/kanban-users.js | 4 +- web/kanban.css | 41 ++++++++++++++---- web/kanban.html | 58 ++++++++++++------------- web/kanban.js | 103 ++++++++++++++++++++++---------------------- 4 files changed, 115 insertions(+), 91 deletions(-) diff --git a/web/kanban-users.js b/web/kanban-users.js index fa8bf6f..79c8839 100644 --- a/web/kanban-users.js +++ b/web/kanban-users.js @@ -624,8 +624,8 @@ function accountForm(){ $('my-password').onclick=()=>{$('account-menu').hidden=true;accountForm();}; // Dark or light, per browser (web/theme.js): the rail's button and the account // menu name the one a click gives. -const ICON_SUN='M6.75 10a3.25 3.25 0 1 0 6.5 0a3.25 3.25 0 1 0 -6.5 0 M10 2v1.75 M10 16.25V18 M2 10h1.75 M16.25 10H18 M4.35 4.35l1.24 1.24 M14.41 14.41l1.24 1.24 M4.35 15.65l1.24-1.24 M14.41 5.59l1.24-1.24'; -const ICON_MOON='M16.25 12.25A6.75 6.75 0 0 1 7.75 3.75a6.75 6.75 0 1 0 8.5 8.5z'; +const ICON_SUN='M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z'; +const ICON_MOON='M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z'; function paintThemeToggle(){ const light=kanbanTheme.get()==='light', label=light?'Mudar para o modo escuro':'Mudar para o modo claro'; $('theme-rail').querySelector('path').setAttribute('d',light?ICON_MOON:ICON_SUN); diff --git a/web/kanban.css b/web/kanban.css index 85a0a05..b9d6ee3 100644 --- a/web/kanban.css +++ b/web/kanban.css @@ -99,9 +99,9 @@ input:focus,textarea:focus{border-color:var(--acc)} bar with the page's name, the search, the machine and the refresh. */ #app:not([hidden]){display:flex;min-height:100vh} .shell{flex:1;min-width:0;display:flex;flex-direction:column} -.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;flex:none;display:block} -.i.m{width:16px;height:16px;stroke-width:1.6} -.i.s{width:14px;height:14px;stroke-width:1.7} +.i{width:20px;height:20px;fill:currentColor;flex:none;display:block} +.i.m{width:16px;height:16px} +.i.s{width:14px;height:14px} .rail{width:84px;flex:none;background:var(--rail);border-right:1px solid var(--railln);display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0 16px;position:sticky;top:0;height:100vh;z-index:6} .rail .mark{width:38px;height:38px;margin-bottom:22px;flex:none;color:var(--railon)} .rail .mark .cut{stroke:var(--rail)} @@ -203,7 +203,7 @@ main{padding:0} .tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 20px 0} .seg{display:flex;padding:3px;gap:2px;border-radius:10px;background:var(--sf3)} .seg button{height:30px;padding:0 13px;border:0;border-radius:7px;background:transparent;color:var(--tx2);font-size:13px;font-weight:550;display:flex;align-items:center;gap:7px;white-space:nowrap} -.seg button .n{font-size:12px;color:var(--tx3);font-weight:500} +.seg button .n{font-size:12px;color:var(--tx2);font-weight:500} .seg button:hover{color:var(--tx)} .seg button.on{background:var(--sf);color:var(--tx);box-shadow:0 1px 2px rgba(0,0,0,.14),0 0 0 1px var(--ln)} .filterwrap{position:relative} @@ -249,7 +249,7 @@ main{padding:0} .colm{font-size:12px;color:var(--tx3);white-space:nowrap} .colbtn{width:28px;height:28px;flex:none;border:0;border-radius:7px;background:transparent;color:var(--tx2);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px var(--ln2)} .colbtn:hover{background:var(--sf3);color:var(--tx)} -.sg{width:18px;height:18px;flex:none;color:var(--tx2);fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:square;stroke-linejoin:miter} +.sg{width:18px;height:18px;flex:none;color:var(--tx2);fill:currentColor} .sg.cor{color:var(--bad)} .lanehead{display:flex;align-items:center;gap:7px;padding:6px 6px 0;font-size:12.5px;color:var(--tx2)} .lanehead b{font-weight:650;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} @@ -497,7 +497,14 @@ main{padding:0} .contrrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap} .contrrow>.lbl{min-width:150px} -/* Dialogs: over the page, or over the order. */ +/* Dialogs: over the page, or over the order. The canvas' .dlg/.dhead/.dbody + are scoped under .dlg: .dhead/.dbody already belong to the order drawer. */ +.dlg{width:640px;background:var(--sf);border-radius:16px;box-shadow:var(--pop);display:flex;flex-direction:column} +.dlg .dhead{display:flex;align-items:flex-start;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--ln)} +.dlg .dhead h2{margin:0;font-size:20px;font-weight:650} +.dlg .dhead p{margin:4px 0 0;font-size:13.5px;color:var(--tx2)} +.dlg .dbody{padding:20px 24px;display:flex;flex-direction:column;gap:18px} +.dlg .dfoot{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid var(--ln)} .scrim.hi{position:fixed;inset:0;z-index:23;background:var(--scrim);-webkit-backdrop-filter:blur(3px) saturate(.6);backdrop-filter:blur(3px) saturate(.6);animation:fade .2s ease both} .modal{position:fixed;left:50%;top:50%;z-index:24;width:580px;max-width:calc(100% - 32px);max-height:calc(100vh - 32px);overflow:auto;transform:translate(-50%,-50%);background:var(--sf);border-radius:16px;box-shadow:var(--pop);padding:28px;display:flex;flex-direction:column;gap:18px;animation:pop .45s cubic-bezier(.16,1,.3,1) both} .modal>*{flex-shrink:0} @@ -512,7 +519,7 @@ main{padding:0} .fld input:focus,.fld select:focus,.fld textarea:focus,.fact select:focus,.decide input:focus,.inp:focus{border-color:var(--acc);box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 18%,transparent)} .fld small{font-size:12.5px;font-weight:500;color:var(--tx3)} .fld select,.fact select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer; - background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238A8A93' stroke-width='1.6'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px} + background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238A8A93' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px} .fld option,.fact option{background:var(--sf);color:var(--tx)} .frow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px} .dfoot{display:flex;align-items:center;gap:8px;padding-top:6px} @@ -693,9 +700,25 @@ label.fopt{cursor:pointer;user-select:none} .pfilters{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap} .inp.sm{height:34px;width:auto;font-size:13px} .inp.num{width:110px} -select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238A8A93' stroke-width='1.6'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:15px} +select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238A8A93' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:15px} .nowrap{white-space:nowrap}.strong{font-weight:600}.muted{color:var(--tx2)} .table td.muted{color:var(--tx2)} +/* Shared pieces from the new layout canvas (phase A). */ +.dtable{width:100%;border-collapse:collapse} +.dtable th{text-align:left;font-size:12.5px;font-weight:500;color:var(--tx3);padding:12px 18px;border-bottom:1px solid var(--ln);white-space:nowrap} +.dtable td{padding:0 18px;height:58px;border-bottom:1px solid var(--ln);white-space:nowrap} +.dtable tr:last-child td{border-bottom:0} +.dtable .r{text-align:right} +.tag{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;background:var(--sf3);font-size:12px;font-weight:550;color:var(--tx2)} +.sw{display:inline-flex;align-items:center;gap:10px;border:0;background:transparent;padding:0;font-size:13.5px;color:var(--tx2)} +.sw .t{width:36px;height:20px;border-radius:10px;background:var(--ln3);position:relative;flex:none} +.sw .t::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff} +.sw.on{color:var(--tx)} +.sw.on .t{background:var(--tx)} +.sw.on .t::after{background:var(--sf)} +.sw.on .t::after{left:19px} +.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px} +.g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px} .table tr.off td{opacity:.55} .table tr.total td{font-weight:650} .table .w50{width:50%} @@ -944,6 +967,8 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background at a time, sheets from the bottom, the order and a quote as pages. */ .phone,.mtabs,.msum,.mdl,.mbtns,.mhead.phone,.mlist.phone,.mscrim,.msheet{display:none} @media (max-width:700px){ + /* Touch targets: buttons, chips and inputs at least 44 px tall. */ + .btn,.chip,.inp,.mic,.mtab,#quote-filters button,.pagetools .seg button,input:not([type=checkbox]):not([type=radio]):not(.vh),select,textarea{min-height:44px} .phone{display:flex} .mlist.phone{display:flex} #app:not([hidden]){display:block} diff --git a/web/kanban.html b/web/kanban.html index a28eb44..c1674e9 100644 --- a/web/kanban.html +++ b/web/kanban.html @@ -36,40 +36,40 @@