Add planner-aware memos and unified tool configuration panels
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
acd9b2fe11
commit
808610dcf2
53 changed files with 842 additions and 329 deletions
|
|
@ -1,30 +1,14 @@
|
|||
// Rôle : expose le suivi du guide dans chaque checklist compatible et marque les cartes terminées.
|
||||
import { Icon } from "../../components/Icon.jsx";
|
||||
|
||||
export function GuideChecklistToggle({ checklist, panel, label }) {
|
||||
if (!panel.list) return null;
|
||||
return <button
|
||||
className={`module-guide-button nds-icon-button ${panel.open ? "active" : ""}`}
|
||||
data-size="md"
|
||||
data-linked={checklist.selected?.id === panel.list.id || undefined}
|
||||
type="button"
|
||||
aria-label={`${checklist.content.label} — ${label}`}
|
||||
title={checklist.content.label}
|
||||
aria-expanded={panel.open}
|
||||
aria-pressed={panel.open}
|
||||
aria-controls={panel.id}
|
||||
onClick={panel.toggle}
|
||||
><Icon name="link" /></button>;
|
||||
}
|
||||
|
||||
export function GuideChecklistControls({ checklist, list, id, open }) {
|
||||
if (!list) return null;
|
||||
const { content, selected, hideCompleted } = checklist;
|
||||
const active = selected?.id === list.id;
|
||||
return <div id={id} hidden={!open} className="guide-checklist-controls" data-linked={active || undefined}>
|
||||
<div className="guide-checklist-actions">
|
||||
<button type="button" className="guide-checklist-link nds-button" data-size="sm" data-variant={active ? "primary" : "secondary"} aria-pressed={active} onClick={() => checklist.associate(active ? "" : list.id)}>{active ? content.unlink : content.associate}</button>
|
||||
<button type="button" className="nds-switch" disabled={!active} aria-pressed={active && hideCompleted} onClick={checklist.toggleHidden}><Icon name="hide" /><span>{content.hideCompleted}</span><i aria-hidden="true" /></button>
|
||||
<button type="button" className="guide-checklist-link nds-button" data-size="xs" data-variant={active ? "primary" : "secondary"} aria-pressed={active} onClick={() => checklist.associate(active ? "" : list.id)}>{active ? content.unlink : content.associate}</button>
|
||||
<button type="button" className="nds-switch" data-size="xs" disabled={!active} aria-pressed={active && hideCompleted} onClick={checklist.toggleHidden}><Icon name="hide" /><span>{content.hideCompleted}</span><i aria-hidden="true" /></button>
|
||||
</div>
|
||||
<p>{list.count ? `${list.count} ${content.matches}` : content.noMatches}</p>
|
||||
</div>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue