@adia-ai/web-components 0.8.6 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +3 -3
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/theme-provider.min.js +2 -2
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +1 -1
- package/dist/web-components.sheet.js +1 -1
- package/package.json +2 -1
- package/patterns/access-requests/access-requests.examples.html +132 -0
- package/patterns/access-requests/access-requests.html +60 -0
- package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +236 -0
- package/patterns/admin-keys-and-export/admin-keys-and-export.html +64 -0
- package/patterns/admin-shell/admin-shell.examples.html +327 -0
- package/patterns/admin-shell/admin-shell.html +44 -0
- package/patterns/agent-cost/agent-cost.examples.html +111 -0
- package/patterns/agent-cost/agent-cost.html +62 -0
- package/patterns/agent-memory/agent-memory.examples.html +155 -0
- package/patterns/agent-memory/agent-memory.html +64 -0
- package/patterns/agent-prompt-library/agent-prompt-library.examples.html +181 -0
- package/patterns/agent-prompt-library/agent-prompt-library.html +64 -0
- package/patterns/agent-tool-call/agent-tool-call.examples.html +123 -0
- package/patterns/agent-tool-call/agent-tool-call.html +60 -0
- package/patterns/alert-dialog/alert-dialog.examples.html +105 -0
- package/patterns/alert-dialog/alert-dialog.html +57 -0
- package/patterns/app-nav/app-nav.examples.html +421 -0
- package/patterns/app-nav/app-nav.html +50 -0
- package/patterns/approvals/approvals.examples.html +131 -0
- package/patterns/approvals/approvals.html +58 -0
- package/patterns/audit-log/audit-log.examples.html +74 -0
- package/patterns/audit-log/audit-log.examples.js +60 -0
- package/patterns/audit-log/audit-log.html +63 -0
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +89 -0
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.js +69 -0
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.html +62 -0
- package/patterns/changelog-feed/changelog-feed.examples.html +151 -0
- package/patterns/changelog-feed/changelog-feed.html +57 -0
- package/patterns/chart-in-card/chart-in-card.examples.html +193 -0
- package/patterns/chart-in-card/chart-in-card.examples.js +46 -0
- package/patterns/chart-in-card/chart-in-card.html +66 -0
- package/patterns/chat-shell/chat-shell.examples.html +129 -0
- package/patterns/chat-shell/chat-shell.html +46 -0
- package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +241 -0
- package/patterns/comments-and-collaboration/comments-and-collaboration.html +66 -0
- package/patterns/component-tokens/component-tokens.examples.html +483 -0
- package/patterns/component-tokens/component-tokens.html +42 -0
- package/patterns/conversion-funnel/conversion-funnel.examples.html +158 -0
- package/patterns/conversion-funnel/conversion-funnel.examples.js +4 -0
- package/patterns/conversion-funnel/conversion-funnel.html +64 -0
- package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +196 -0
- package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.html +58 -0
- package/patterns/diff-review/diff-review.examples.html +147 -0
- package/patterns/diff-review/diff-review.html +56 -0
- package/patterns/editor-shell/editor-shell.examples.html +139 -0
- package/patterns/editor-shell/editor-shell.html +62 -0
- package/patterns/export-flow/export-flow.examples.html +152 -0
- package/patterns/export-flow/export-flow.examples.js +37 -0
- package/patterns/export-flow/export-flow.html +65 -0
- package/patterns/filter-bar/filter-bar.examples.html +116 -0
- package/patterns/filter-bar/filter-bar.examples.js +23 -0
- package/patterns/filter-bar/filter-bar.html +70 -0
- package/patterns/form-drawer/form-drawer.examples.html +210 -0
- package/patterns/form-drawer/form-drawer.html +64 -0
- package/patterns/form-system/form-system.examples.html +383 -0
- package/patterns/form-system/form-system.html +48 -0
- package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html +189 -0
- package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.html +64 -0
- package/patterns/inline-dialog/inline-dialog.examples.html +143 -0
- package/patterns/inline-dialog/inline-dialog.html +59 -0
- package/patterns/kanban-board/kanban-board.examples.html +224 -0
- package/patterns/kanban-board/kanban-board.html +58 -0
- package/patterns/layout/layout.examples.html +365 -0
- package/patterns/layout/layout.html +54 -0
- package/patterns/marketing-engagement/marketing-engagement.examples.html +280 -0
- package/patterns/marketing-engagement/marketing-engagement.html +64 -0
- package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +213 -0
- package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.html +58 -0
- package/patterns/overview/overview.examples.html +119 -0
- package/patterns/overview/overview.html +42 -0
- package/patterns/permissions-matrix/permissions-matrix.examples.html +91 -0
- package/patterns/permissions-matrix/permissions-matrix.examples.js +28 -0
- package/patterns/permissions-matrix/permissions-matrix.html +56 -0
- package/patterns/permissions-role-picker/permissions-role-picker.examples.html +81 -0
- package/patterns/permissions-role-picker/permissions-role-picker.html +56 -0
- package/patterns/permissions-sharing/permissions-sharing.examples.html +175 -0
- package/patterns/permissions-sharing/permissions-sharing.html +66 -0
- package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +227 -0
- package/patterns/profile-public-and-verification/profile-public-and-verification.html +70 -0
- package/patterns/record-detail-drawer/record-detail-drawer.examples.html +164 -0
- package/patterns/record-detail-drawer/record-detail-drawer.html +64 -0
- package/patterns/responsive-shell-sidebar/README.md +37 -0
- package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.css +39 -0
- package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.examples.html +208 -0
- package/patterns/responsive-shell-sidebar/responsive-shell-sidebar.html +47 -0
- package/patterns/retention-cohort/retention-cohort.examples.html +149 -0
- package/patterns/retention-cohort/retention-cohort.examples.js +37 -0
- package/patterns/retention-cohort/retention-cohort.html +62 -0
- package/patterns/search-discovery/search-discovery.examples.html +263 -0
- package/patterns/search-discovery/search-discovery.html +58 -0
- package/patterns/system-banners/system-banners.examples.html +150 -0
- package/patterns/system-banners/system-banners.html +52 -0
- package/patterns/timezone-selector/timezone-selector.examples.html +82 -0
- package/patterns/timezone-selector/timezone-selector.examples.js +72 -0
- package/patterns/timezone-selector/timezone-selector.html +57 -0
- package/patterns/wizard-drawer/wizard-drawer.examples.html +144 -0
- package/patterns/wizard-drawer/wizard-drawer.examples.js +33 -0
- package/patterns/wizard-drawer/wizard-drawer.html +72 -0
- package/styles/type/roles.css +8 -8
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" theme="auto">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Conditional fields & address autocomplete (pattern) — AdiaUI</title>
|
|
7
|
+
|
|
8
|
+
<!-- Token base -->
|
|
9
|
+
<link rel="stylesheet" href="../../styles/resets.css">
|
|
10
|
+
<link rel="stylesheet" href="../../styles/tokens.css">
|
|
11
|
+
|
|
12
|
+
<!-- Component CSS — primitives this pattern composes -->
|
|
13
|
+
<link rel="stylesheet" href="../../components/button/button.css">
|
|
14
|
+
<link rel="stylesheet" href="../../components/card/card.css">
|
|
15
|
+
<link rel="stylesheet" href="../../components/col/col.css">
|
|
16
|
+
<link rel="stylesheet" href="../../components/divider/divider.css">
|
|
17
|
+
<link rel="stylesheet" href="../../components/field/field.css">
|
|
18
|
+
<link rel="stylesheet" href="../../components/grid/grid.css">
|
|
19
|
+
<link rel="stylesheet" href="../../components/icon/icon.css">
|
|
20
|
+
<link rel="stylesheet" href="../../components/input/input.css">
|
|
21
|
+
<link rel="stylesheet" href="../../components/row/row.css">
|
|
22
|
+
<link rel="stylesheet" href="../../components/select/select.css">
|
|
23
|
+
<link rel="stylesheet" href="../../components/tag/tag.css">
|
|
24
|
+
<link rel="stylesheet" href="../../components/text/text.css">
|
|
25
|
+
|
|
26
|
+
<!-- Component JS -->
|
|
27
|
+
<script type="module" src="../../components/button/button.js"></script>
|
|
28
|
+
<script type="module" src="../../components/card/card.js"></script>
|
|
29
|
+
<script type="module" src="../../components/col/col.js"></script>
|
|
30
|
+
<script type="module" src="../../components/divider/divider.js"></script>
|
|
31
|
+
<script type="module" src="../../components/field/field.js"></script>
|
|
32
|
+
<script type="module" src="../../components/grid/grid.js"></script>
|
|
33
|
+
<script type="module" src="../../components/icon/icon.js"></script>
|
|
34
|
+
<script type="module" src="../../components/input/input.js"></script>
|
|
35
|
+
<script type="module" src="../../components/row/row.js"></script>
|
|
36
|
+
<script type="module" src="../../components/select/select.js"></script>
|
|
37
|
+
<script type="module" src="../../components/tag/tag.js"></script>
|
|
38
|
+
<script type="module" src="../../components/text/text.js"></script>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
:where(html, body) { margin: 0; min-height: 100vh; background: var(--md-sys-color-neutral-background); color: var(--md-sys-color-neutral-on-surface); font-family: var(--a-font-family); }
|
|
42
|
+
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
43
|
+
</style>
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
<main id="demo-root">
|
|
48
|
+
<p>Loading examples…</p>
|
|
49
|
+
</main>
|
|
50
|
+
|
|
51
|
+
<script type="module">
|
|
52
|
+
const root = document.getElementById('demo-root');
|
|
53
|
+
try {
|
|
54
|
+
const res = await fetch('./forms-conditional-and-autocomplete.examples.html');
|
|
55
|
+
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
56
|
+
root.innerHTML = await res.text();
|
|
57
|
+
} catch (err) {
|
|
58
|
+
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load forms-conditional-and-autocomplete.examples.html — ${err.message}</p>`;
|
|
59
|
+
console.error('[forms-conditional-and-autocomplete.html]', err);
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<header>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>Inline dialog</h1>
|
|
4
|
+
<div data-actions>
|
|
5
|
+
<tag-ui size="sm">popover-ui</tag-ui> <tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">field-ui</tag-ui> <tag-ui size="sm">button-ui</tag-ui>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<p>Anchored, non-modal dialog — popover-ui content given dialog semantics (heading + body + actions). Atlassian-style affordance for in-context decisions that don't warrant blocking the page. Distinct from <a href="/site/components/modal">modal-ui</a> (page-blocking, focus-trapped, role=dialog) and <a href="/site/components/popover">popover-ui</a> bare (general anchored surface).</p>
|
|
9
|
+
</header>
|
|
10
|
+
|
|
11
|
+
<section data-section data-property="when-to-use">
|
|
12
|
+
<h2 variant="section">When to use</h2>
|
|
13
|
+
<p data-note>Confirm-in-context micro-decisions: rename a row, set a status, pick a label, schedule a thing. The decision belongs <em>here</em> (anchored to the trigger), not <em>over there</em> (centered modal). Three signals it's the right pattern: the action is reversible, the user must still see the surrounding context, and the form is one to three fields. Anything bigger goes in a drawer or modal; anything smaller is a menu-ui or inline edit.</p>
|
|
14
|
+
</section>
|
|
15
|
+
|
|
16
|
+
<section data-section data-property="rename">
|
|
17
|
+
<h2 variant="section">Rename in context</h2>
|
|
18
|
+
<p data-note>Click "Rename" → popover-ui opens anchored to the trigger, carrying a card-ui with a heading, single input, and Cancel + Save actions. The rest of the page stays interactive (no backdrop, no focus trap). Click outside or press Escape to dismiss.</p>
|
|
19
|
+
<div data-artifact-container>
|
|
20
|
+
<div data-artifact-item data-artifact-label="rename row dialog">
|
|
21
|
+
<row-ui gap="3" align="center" style="padding: var(--a-space-4); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-md); background: var(--md-sys-color-neutral-background);">
|
|
22
|
+
<icon-ui name="file-text" size="sm"></icon-ui>
|
|
23
|
+
<text-ui strong style="flex: 1;">Q4-budget-draft.xlsx</text-ui>
|
|
24
|
+
<popover-ui data-chunk="inline-dialog-rename" placement="bottom-start">
|
|
25
|
+
<button-ui slot="trigger" text="Rename" variant="ghost" size="sm" icon-leading="pencil-simple"></button-ui>
|
|
26
|
+
<card-ui slot="content" style="min-width: 320px;">
|
|
27
|
+
<header>
|
|
28
|
+
<span slot="heading" variant="section">Rename file</span>
|
|
29
|
+
</header>
|
|
30
|
+
<section>
|
|
31
|
+
<field-ui label="New name">
|
|
32
|
+
<input-ui name="filename" value="Q4-budget-draft.xlsx"></input-ui>
|
|
33
|
+
</field-ui>
|
|
34
|
+
</section>
|
|
35
|
+
<footer divider>
|
|
36
|
+
<button-ui slot="action" text="Cancel" variant="ghost" data-popover-close></button-ui>
|
|
37
|
+
<button-ui slot="action" text="Save" variant="primary"></button-ui>
|
|
38
|
+
</footer>
|
|
39
|
+
</card-ui>
|
|
40
|
+
</popover-ui>
|
|
41
|
+
</row-ui>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
|
|
46
|
+
<section data-section data-property="status">
|
|
47
|
+
<h2 variant="section">Set status</h2>
|
|
48
|
+
<p data-note>Status-picker pattern: trigger shows the current state, popover carries a select + a short note field. Closes on save; the trigger updates to reflect the new state.</p>
|
|
49
|
+
<div data-artifact-container>
|
|
50
|
+
<div data-artifact-item data-artifact-label="status picker dialog">
|
|
51
|
+
<row-ui gap="3" align="center" style="padding: var(--a-space-4); border: 1px solid var(--md-sys-color-neutral-outline); border-radius: var(--a-radius-md); background: var(--md-sys-color-neutral-background);">
|
|
52
|
+
<text-ui strong style="flex: 1;">PR #3247 — Add cursor pagination</text-ui>
|
|
53
|
+
<popover-ui data-chunk="inline-dialog-status" placement="bottom-start">
|
|
54
|
+
<button-ui slot="trigger" variant="outline" size="sm">
|
|
55
|
+
<tag-ui slot="leading" size="sm" variant="warning">In review</tag-ui>
|
|
56
|
+
<icon-ui slot="trailing" name="caret-down" size="sm"></icon-ui>
|
|
57
|
+
</button-ui>
|
|
58
|
+
<card-ui slot="content" style="min-width: 320px;">
|
|
59
|
+
<header>
|
|
60
|
+
<span slot="heading" variant="section">Change status</span>
|
|
61
|
+
</header>
|
|
62
|
+
<section>
|
|
63
|
+
<col-ui gap="3">
|
|
64
|
+
<field-ui label="Status">
|
|
65
|
+
<select-ui name="status">
|
|
66
|
+
<option value="open">Open</option>
|
|
67
|
+
<option value="review" selected>In review</option>
|
|
68
|
+
<option value="approved">Approved</option>
|
|
69
|
+
<option value="merged">Merged</option>
|
|
70
|
+
</select-ui>
|
|
71
|
+
</field-ui>
|
|
72
|
+
<field-ui label="Note (optional)">
|
|
73
|
+
<input-ui name="note" placeholder="Why the change?"></input-ui>
|
|
74
|
+
</field-ui>
|
|
75
|
+
</col-ui>
|
|
76
|
+
</section>
|
|
77
|
+
<footer divider>
|
|
78
|
+
<button-ui slot="action" text="Cancel" variant="ghost" data-popover-close></button-ui>
|
|
79
|
+
<button-ui slot="action" text="Update" variant="primary"></button-ui>
|
|
80
|
+
</footer>
|
|
81
|
+
</card-ui>
|
|
82
|
+
</popover-ui>
|
|
83
|
+
</row-ui>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
87
|
+
|
|
88
|
+
<section data-section data-property="schedule">
|
|
89
|
+
<h2 variant="section">Schedule send</h2>
|
|
90
|
+
<p data-note>Two-field scheduling popover anchored to a split-button (primary action + caret for alternatives). Date + time pickers fit in the popover; the primary send button stays interactive while the user is choosing.</p>
|
|
91
|
+
<div data-artifact-container>
|
|
92
|
+
<div data-artifact-item data-artifact-label="schedule send dialog">
|
|
93
|
+
<row-ui gap="0" align="center" style="padding: var(--a-space-4); background: var(--md-sys-color-neutral-background);">
|
|
94
|
+
<button-ui text="Send now" variant="primary" size="sm"></button-ui>
|
|
95
|
+
<popover-ui data-chunk="inline-dialog-schedule" placement="bottom-start">
|
|
96
|
+
<button-ui slot="trigger" icon="caret-down" variant="primary" size="sm" aria-label="More send options"></button-ui>
|
|
97
|
+
<card-ui slot="content" style="min-width: 320px;">
|
|
98
|
+
<header>
|
|
99
|
+
<span slot="heading" variant="section">Schedule send</span>
|
|
100
|
+
<text-ui slot="description" color="subtle">Picks the next available slot in your timezone</text-ui>
|
|
101
|
+
</header>
|
|
102
|
+
<section>
|
|
103
|
+
<col-ui gap="3">
|
|
104
|
+
<field-ui label="Date">
|
|
105
|
+
<input-ui type="date" name="date" value="2026-03-15"></input-ui>
|
|
106
|
+
</field-ui>
|
|
107
|
+
<field-ui label="Time">
|
|
108
|
+
<input-ui type="time" name="time" value="09:00"></input-ui>
|
|
109
|
+
</field-ui>
|
|
110
|
+
</col-ui>
|
|
111
|
+
</section>
|
|
112
|
+
<footer divider>
|
|
113
|
+
<button-ui slot="action" text="Cancel" variant="ghost" data-popover-close></button-ui>
|
|
114
|
+
<button-ui slot="action" text="Schedule" variant="primary" icon-leading="clock"></button-ui>
|
|
115
|
+
</footer>
|
|
116
|
+
</card-ui>
|
|
117
|
+
</popover-ui>
|
|
118
|
+
</row-ui>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</section>
|
|
122
|
+
|
|
123
|
+
<section data-section data-property="composition">
|
|
124
|
+
<h2 variant="section">Composition rules</h2>
|
|
125
|
+
<ul>
|
|
126
|
+
<li><strong>popover-ui carries the anchor + dismiss</strong> — Popover API handles outside-click + Escape; you don't wire it. Default <code>placement="bottom-start"</code> orients the dialog LtR (popover's left edge anchored to the trigger's left edge, growing rightward); the browser's <code>position-try-fallbacks</code> auto-flips to <code>bottom-end</code> when the popover would overflow the viewport.</li>
|
|
127
|
+
<li><strong>card-ui inside the content slot</strong> — gives you the heading + body + footer structure for free. Keep <code>min-width</code> ≥ 280 px so the form fits without wrap; cap at ~480 px.</li>
|
|
128
|
+
<li><strong>Cancel button gets <code>data-popover-close</code></strong> — the popover's built-in dismiss handler closes on click without further wiring.</li>
|
|
129
|
+
<li><strong>Non-modal means non-blocking</strong> — no backdrop, no focus trap, no aria-modal. Page interaction continues; the user can scroll, hover other rows, even open another popover.</li>
|
|
130
|
+
<li><strong>One to three fields max</strong> — if the form grows beyond three fields, the popover-as-dialog stops working (vertical overflow, ambiguous "where am I?"). Promote to <code>drawer-ui</code> or <code>modal-ui</code>.</li>
|
|
131
|
+
<li><strong>Primary action is the form verb</strong> — "Rename", "Save", "Schedule" — never "OK". The pattern's whole point is to make the decision tangible in context.</li>
|
|
132
|
+
</ul>
|
|
133
|
+
</section>
|
|
134
|
+
|
|
135
|
+
<section data-section data-property="cross-references">
|
|
136
|
+
<h2 variant="section">Cross-references</h2>
|
|
137
|
+
<ul>
|
|
138
|
+
<li><a href="/site/components/popover">popover-ui</a> · <a href="/site/components/card">card-ui</a> · <a href="/site/components/field">field-ui</a> — primitives composed here.</li>
|
|
139
|
+
<li><a href="/site/components/modal">modal-ui</a> — page-blocking dialog alternative (use when the decision is irreversible or affects unrelated context).</li>
|
|
140
|
+
<li><a href="/site/components/drawer">drawer-ui</a> — edge-anchored multi-field form alternative (use when the form has > 3 fields).</li>
|
|
141
|
+
<li><a href="/site/components/menu">menu-ui</a> — popover-ui specialization for action lists (use instead when content is a list of items, not a form).</li>
|
|
142
|
+
</ul>
|
|
143
|
+
</section>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" theme="auto">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Inline dialog (pattern) — AdiaUI</title>
|
|
7
|
+
|
|
8
|
+
<link rel="stylesheet" href="../../styles/resets.css">
|
|
9
|
+
<link rel="stylesheet" href="../../styles/tokens.css">
|
|
10
|
+
|
|
11
|
+
<link rel="stylesheet" href="../../components/button/button.css">
|
|
12
|
+
<link rel="stylesheet" href="../../components/card/card.css">
|
|
13
|
+
<link rel="stylesheet" href="../../components/col/col.css">
|
|
14
|
+
<link rel="stylesheet" href="../../components/field/field.css">
|
|
15
|
+
<link rel="stylesheet" href="../../components/icon/icon.css">
|
|
16
|
+
<link rel="stylesheet" href="../../components/input/input.css">
|
|
17
|
+
<link rel="stylesheet" href="../../components/popover/popover.css">
|
|
18
|
+
<link rel="stylesheet" href="../../components/row/row.css">
|
|
19
|
+
<link rel="stylesheet" href="../../components/select/select.css">
|
|
20
|
+
<link rel="stylesheet" href="../../components/tag/tag.css">
|
|
21
|
+
<link rel="stylesheet" href="../../components/text/text.css">
|
|
22
|
+
|
|
23
|
+
<script type="module" src="../../components/button/button.js"></script>
|
|
24
|
+
<script type="module" src="../../components/card/card.js"></script>
|
|
25
|
+
<script type="module" src="../../components/col/col.js"></script>
|
|
26
|
+
<script type="module" src="../../components/field/field.js"></script>
|
|
27
|
+
<script type="module" src="../../components/icon/icon.js"></script>
|
|
28
|
+
<script type="module" src="../../components/input/input.js"></script>
|
|
29
|
+
<script type="module" src="../../components/popover/popover.js"></script>
|
|
30
|
+
<script type="module" src="../../components/row/row.js"></script>
|
|
31
|
+
<script type="module" src="../../components/select/select.js"></script>
|
|
32
|
+
<script type="module" src="../../components/tag/tag.js"></script>
|
|
33
|
+
<script type="module" src="../../components/text/text.js"></script>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
:where(html, body) { margin: 0; min-height: 100vh; background: var(--md-sys-color-neutral-background); color: var(--md-sys-color-neutral-on-surface); font-family: var(--a-font-family); }
|
|
37
|
+
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
38
|
+
</style>
|
|
39
|
+
</head>
|
|
40
|
+
<body>
|
|
41
|
+
|
|
42
|
+
<main id="demo-root">
|
|
43
|
+
<p>Loading examples…</p>
|
|
44
|
+
</main>
|
|
45
|
+
|
|
46
|
+
<script type="module">
|
|
47
|
+
const root = document.getElementById('demo-root');
|
|
48
|
+
try {
|
|
49
|
+
const res = await fetch('./inline-dialog.examples.html');
|
|
50
|
+
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
51
|
+
root.innerHTML = await res.text();
|
|
52
|
+
} catch (err) {
|
|
53
|
+
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load inline-dialog.examples.html — ${err.message}</p>`;
|
|
54
|
+
console.error('[inline-dialog.html]', err);
|
|
55
|
+
}
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<header>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>Kanban board & sortable lists</h1>
|
|
4
|
+
<div data-actions>
|
|
5
|
+
<tag-ui size="sm">card-ui</tag-ui> <tag-ui size="sm">grid-ui</tag-ui> <tag-ui size="sm">list-ui</tag-ui> <tag-ui size="sm">tag-ui</tag-ui> <tag-ui size="sm">avatar-ui</tag-ui>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<p>The drag-to-reorder + drag-between-columns surface. Two patterns share the same primitives: a single sortable list (priority queue, playlist) and a multi-column kanban (status swimlanes, sprint board, pipeline). Both compose <code>card-ui</code>s in containers with HTML5 drag-and-drop wiring.</p>
|
|
9
|
+
</header>
|
|
10
|
+
|
|
11
|
+
<section data-section data-property="when-to-use">
|
|
12
|
+
<h2 variant="section">When to use</h2>
|
|
13
|
+
<p data-note>
|
|
14
|
+
When the order or column-membership of items is itself the
|
|
15
|
+
state. A sorted list communicates priority; a kanban
|
|
16
|
+
communicates which stage of a workflow each card is in.
|
|
17
|
+
Reach for these when status is <em>visible</em> on the surface,
|
|
18
|
+
not buried in a column of a table.
|
|
19
|
+
</p>
|
|
20
|
+
</section>
|
|
21
|
+
|
|
22
|
+
<section data-section data-property="sortable-list">
|
|
23
|
+
<h2 variant="section">Sortable list — drag handle to reorder</h2>
|
|
24
|
+
<p data-note>Single-column list where the row order is the data. Each row carries a leading drag handle (`dots-six-vertical`), the body content, and trailing meta. Hover reveals the handle; drag picks up the row with a shadow + ghost.</p>
|
|
25
|
+
<div data-artifact-container>
|
|
26
|
+
<div data-artifact-item data-artifact-label="sortable list">
|
|
27
|
+
<card-ui data-chunk="sortable-list" style="max-width: 560px;">
|
|
28
|
+
<header>
|
|
29
|
+
<span slot="heading" variant="section">Sprint priority</span>
|
|
30
|
+
<text-ui slot="description" color="subtle">Drag to reorder · 4 items</text-ui>
|
|
31
|
+
</header>
|
|
32
|
+
<section bleed>
|
|
33
|
+
<list-ui divider contained>
|
|
34
|
+
<list-item-ui>
|
|
35
|
+
<row-ui gap="2" align="center">
|
|
36
|
+
<button-ui icon="dots-six-vertical" variant="ghost" size="sm" aria-label="Drag to reorder"></button-ui>
|
|
37
|
+
<col-ui gap="0" grow>
|
|
38
|
+
<text-ui strong>Ship the new auth flow</text-ui>
|
|
39
|
+
<text-ui color="subtle" size="sm">Owner: Jordan · Due Friday</text-ui>
|
|
40
|
+
</col-ui>
|
|
41
|
+
<tag-ui size="sm" variant="warning">P0</tag-ui>
|
|
42
|
+
</row-ui>
|
|
43
|
+
</list-item-ui>
|
|
44
|
+
<list-item-ui>
|
|
45
|
+
<row-ui gap="2" align="center">
|
|
46
|
+
<button-ui icon="dots-six-vertical" variant="ghost" size="sm" aria-label="Drag to reorder"></button-ui>
|
|
47
|
+
<col-ui gap="0" grow>
|
|
48
|
+
<text-ui strong>Migrate dashboard tokens</text-ui>
|
|
49
|
+
<text-ui color="subtle" size="sm">Owner: Avery · Due next week</text-ui>
|
|
50
|
+
</col-ui>
|
|
51
|
+
<tag-ui size="sm">P1</tag-ui>
|
|
52
|
+
</row-ui>
|
|
53
|
+
</list-item-ui>
|
|
54
|
+
<list-item-ui>
|
|
55
|
+
<row-ui gap="2" align="center">
|
|
56
|
+
<button-ui icon="dots-six-vertical" variant="ghost" size="sm" aria-label="Drag to reorder"></button-ui>
|
|
57
|
+
<col-ui gap="0" grow>
|
|
58
|
+
<text-ui strong>Add Storybook coverage for primitives</text-ui>
|
|
59
|
+
<text-ui color="subtle" size="sm">Owner: Sam · No due date</text-ui>
|
|
60
|
+
</col-ui>
|
|
61
|
+
<tag-ui size="sm">P2</tag-ui>
|
|
62
|
+
</row-ui>
|
|
63
|
+
</list-item-ui>
|
|
64
|
+
<list-item-ui>
|
|
65
|
+
<row-ui gap="2" align="center">
|
|
66
|
+
<button-ui icon="dots-six-vertical" variant="ghost" size="sm" aria-label="Drag to reorder"></button-ui>
|
|
67
|
+
<col-ui gap="0" grow>
|
|
68
|
+
<text-ui strong>Investigate slow startup</text-ui>
|
|
69
|
+
<text-ui color="subtle" size="sm">Owner: Riley · Backlog</text-ui>
|
|
70
|
+
</col-ui>
|
|
71
|
+
<tag-ui size="sm">P2</tag-ui>
|
|
72
|
+
</row-ui>
|
|
73
|
+
</list-item-ui>
|
|
74
|
+
</list-ui>
|
|
75
|
+
</section>
|
|
76
|
+
</card-ui>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</section>
|
|
80
|
+
|
|
81
|
+
<section data-section data-property="kanban">
|
|
82
|
+
<h2 variant="section">Kanban board — columns by status</h2>
|
|
83
|
+
<p data-note>Multi-column grid where each column is a status (To do · In progress · In review · Done). Cards drag horizontally between columns + vertically within. Column header shows count + collapse; per-card chrome shows the assignee avatar + tags.</p>
|
|
84
|
+
<div data-artifact-container>
|
|
85
|
+
<div data-artifact-item data-artifact-label="kanban board">
|
|
86
|
+
<grid-ui data-chunk="kanban-board" columns="4" gap="3">
|
|
87
|
+
<card-ui>
|
|
88
|
+
<header>
|
|
89
|
+
<span slot="heading">To do</span>
|
|
90
|
+
<text-ui slot="description" color="subtle">3</text-ui>
|
|
91
|
+
</header>
|
|
92
|
+
<section bleed>
|
|
93
|
+
<col-ui gap="2" padding="2">
|
|
94
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
95
|
+
<section>
|
|
96
|
+
<text-ui strong>Audit kanban accessibility</text-ui>
|
|
97
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
98
|
+
<avatar-ui size="xs" text="Sam Park"></avatar-ui>
|
|
99
|
+
<tag-ui size="sm">P1</tag-ui>
|
|
100
|
+
</row-ui>
|
|
101
|
+
</section>
|
|
102
|
+
</card-ui>
|
|
103
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
104
|
+
<section>
|
|
105
|
+
<text-ui strong>Drag handle hit-target</text-ui>
|
|
106
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
107
|
+
<avatar-ui size="xs" text="Avery Chen"></avatar-ui>
|
|
108
|
+
<tag-ui size="sm">P2</tag-ui>
|
|
109
|
+
</row-ui>
|
|
110
|
+
</section>
|
|
111
|
+
</card-ui>
|
|
112
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
113
|
+
<section>
|
|
114
|
+
<text-ui strong>Empty-column copy</text-ui>
|
|
115
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
116
|
+
<avatar-ui size="xs" text="Jordan Lee"></avatar-ui>
|
|
117
|
+
<tag-ui size="sm">P2</tag-ui>
|
|
118
|
+
</row-ui>
|
|
119
|
+
</section>
|
|
120
|
+
</card-ui>
|
|
121
|
+
</col-ui>
|
|
122
|
+
</section>
|
|
123
|
+
</card-ui>
|
|
124
|
+
<card-ui>
|
|
125
|
+
<header>
|
|
126
|
+
<span slot="heading">In progress</span>
|
|
127
|
+
<text-ui slot="description" color="subtle">2</text-ui>
|
|
128
|
+
</header>
|
|
129
|
+
<section bleed>
|
|
130
|
+
<col-ui gap="2" padding="2">
|
|
131
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
132
|
+
<section>
|
|
133
|
+
<text-ui strong>Auth flow rebuild</text-ui>
|
|
134
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
135
|
+
<avatar-ui size="xs" text="Jordan Lee"></avatar-ui>
|
|
136
|
+
<tag-ui size="sm" variant="warning">P0</tag-ui>
|
|
137
|
+
</row-ui>
|
|
138
|
+
</section>
|
|
139
|
+
</card-ui>
|
|
140
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
141
|
+
<section>
|
|
142
|
+
<text-ui strong>OKLCH ramp lint rule</text-ui>
|
|
143
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
144
|
+
<avatar-ui size="xs" text="Kim Granlund"></avatar-ui>
|
|
145
|
+
<tag-ui size="sm">P1</tag-ui>
|
|
146
|
+
</row-ui>
|
|
147
|
+
</section>
|
|
148
|
+
</card-ui>
|
|
149
|
+
</col-ui>
|
|
150
|
+
</section>
|
|
151
|
+
</card-ui>
|
|
152
|
+
<card-ui>
|
|
153
|
+
<header>
|
|
154
|
+
<span slot="heading">In review</span>
|
|
155
|
+
<text-ui slot="description" color="subtle">1</text-ui>
|
|
156
|
+
</header>
|
|
157
|
+
<section bleed>
|
|
158
|
+
<col-ui gap="2" padding="2">
|
|
159
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
160
|
+
<section>
|
|
161
|
+
<text-ui strong>v0.0.27 release notes</text-ui>
|
|
162
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
163
|
+
<avatar-ui size="xs" text="Riley Tan"></avatar-ui>
|
|
164
|
+
<tag-ui size="sm">P1</tag-ui>
|
|
165
|
+
</row-ui>
|
|
166
|
+
</section>
|
|
167
|
+
</card-ui>
|
|
168
|
+
</col-ui>
|
|
169
|
+
</section>
|
|
170
|
+
</card-ui>
|
|
171
|
+
<card-ui>
|
|
172
|
+
<header>
|
|
173
|
+
<span slot="heading">Done</span>
|
|
174
|
+
<text-ui slot="description" color="subtle">8</text-ui>
|
|
175
|
+
</header>
|
|
176
|
+
<section bleed>
|
|
177
|
+
<col-ui gap="2" padding="2">
|
|
178
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
179
|
+
<section>
|
|
180
|
+
<text-ui strong color="subtle"><s>Safari @scope sweep</s></text-ui>
|
|
181
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
182
|
+
<avatar-ui size="xs" text="Kim Granlund"></avatar-ui>
|
|
183
|
+
<tag-ui size="sm" variant="success">Done</tag-ui>
|
|
184
|
+
</row-ui>
|
|
185
|
+
</section>
|
|
186
|
+
</card-ui>
|
|
187
|
+
<card-ui raw style="padding: 0.75rem;">
|
|
188
|
+
<section>
|
|
189
|
+
<text-ui strong color="subtle"><s>Toast top-layer channel</s></text-ui>
|
|
190
|
+
<row-ui gap="2" align="center" style="margin-top: 0.5rem;">
|
|
191
|
+
<avatar-ui size="xs" text="Sam Park"></avatar-ui>
|
|
192
|
+
<tag-ui size="sm" variant="success">Done</tag-ui>
|
|
193
|
+
</row-ui>
|
|
194
|
+
</section>
|
|
195
|
+
</card-ui>
|
|
196
|
+
</col-ui>
|
|
197
|
+
</section>
|
|
198
|
+
</card-ui>
|
|
199
|
+
</grid-ui>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</section>
|
|
203
|
+
|
|
204
|
+
<section data-section data-property="composition">
|
|
205
|
+
<h2 variant="section">Composition rules</h2>
|
|
206
|
+
<ul>
|
|
207
|
+
<li><strong>Drag handle is keyboard-accessible</strong> — focus the handle, then arrow-up/down to move within a column, arrow-left/right to move between columns. Without keyboard reorder, the surface is not usable.</li>
|
|
208
|
+
<li><strong>Column count is bounded</strong> — kanban breaks down past ~6 columns; horizontal scroll is a smell, not a fix. Collapse or paginate columns past the limit.</li>
|
|
209
|
+
<li><strong>WIP limits live in the column header</strong> — if a stage has a max ("In progress · 5 of 8"), surface the threshold; over-limit columns get a warning tint on the count.</li>
|
|
210
|
+
<li><strong>Done columns scroll, not grow</strong> — completed work piles up. Cap the visible Done column with "Show 14 more"; full archive lives elsewhere.</li>
|
|
211
|
+
<li><strong>Empty columns need copy, not a void</strong> — "Drop cards here" or the column's purpose ("Items waiting on a reviewer") makes a fresh board legible. Empty grids look broken.</li>
|
|
212
|
+
<li><strong>Persist optimistically, reconcile on conflict</strong> — drag should land instantly; on server reject (concurrent move), animate back with a toast. No spinner during the drag.</li>
|
|
213
|
+
</ul>
|
|
214
|
+
</section>
|
|
215
|
+
|
|
216
|
+
<section data-section data-property="cross-references">
|
|
217
|
+
<h2 variant="section">See also</h2>
|
|
218
|
+
<ul>
|
|
219
|
+
<li><a href="/site/components/grid">grid-ui</a> · <a href="/site/components/card">card-ui</a> — layout primitives.</li>
|
|
220
|
+
<li><a href="/site/components/list">list-ui</a> · <a href="/site/components/list-item">list-item-ui</a> — sortable-list anatomy.</li>
|
|
221
|
+
<li><a href="/site/patterns/filter-bar">filter-bar</a> — frequent companion (filter the cards before reordering).</li>
|
|
222
|
+
<li><a href="/site/patterns/bulk-action-toolbar">bulk-action-toolbar</a> — sibling for status-change without drag (multi-select then update).</li>
|
|
223
|
+
</ul>
|
|
224
|
+
</section>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" theme="auto">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Kanban board & sortable lists (pattern) — AdiaUI</title>
|
|
7
|
+
|
|
8
|
+
<!-- Token base -->
|
|
9
|
+
<link rel="stylesheet" href="../../styles/resets.css">
|
|
10
|
+
<link rel="stylesheet" href="../../styles/tokens.css">
|
|
11
|
+
|
|
12
|
+
<!-- Component CSS — primitives this pattern composes -->
|
|
13
|
+
<link rel="stylesheet" href="../../components/avatar/avatar.css">
|
|
14
|
+
<link rel="stylesheet" href="../../components/button/button.css">
|
|
15
|
+
<link rel="stylesheet" href="../../components/card/card.css">
|
|
16
|
+
<link rel="stylesheet" href="../../components/col/col.css">
|
|
17
|
+
<link rel="stylesheet" href="../../components/grid/grid.css">
|
|
18
|
+
<link rel="stylesheet" href="../../components/list/list.css">
|
|
19
|
+
<link rel="stylesheet" href="../../components/row/row.css">
|
|
20
|
+
<link rel="stylesheet" href="../../components/tag/tag.css">
|
|
21
|
+
<link rel="stylesheet" href="../../components/text/text.css">
|
|
22
|
+
|
|
23
|
+
<!-- Component JS -->
|
|
24
|
+
<script type="module" src="../../components/avatar/avatar.js"></script>
|
|
25
|
+
<script type="module" src="../../components/button/button.js"></script>
|
|
26
|
+
<script type="module" src="../../components/card/card.js"></script>
|
|
27
|
+
<script type="module" src="../../components/col/col.js"></script>
|
|
28
|
+
<script type="module" src="../../components/grid/grid.js"></script>
|
|
29
|
+
<script type="module" src="../../components/list/list.js"></script>
|
|
30
|
+
<script type="module" src="../../components/row/row.js"></script>
|
|
31
|
+
<script type="module" src="../../components/tag/tag.js"></script>
|
|
32
|
+
<script type="module" src="../../components/text/text.js"></script>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
:where(html, body) { margin: 0; min-height: 100vh; background: var(--md-sys-color-neutral-background); color: var(--md-sys-color-neutral-on-surface); font-family: var(--a-font-family); }
|
|
36
|
+
main { max-width: 960px; margin-inline: auto; padding: var(--a-space-6) var(--a-space-5); }
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
|
|
41
|
+
<main id="demo-root">
|
|
42
|
+
<p>Loading examples…</p>
|
|
43
|
+
</main>
|
|
44
|
+
|
|
45
|
+
<script type="module">
|
|
46
|
+
const root = document.getElementById('demo-root');
|
|
47
|
+
try {
|
|
48
|
+
const res = await fetch('./kanban-board.examples.html');
|
|
49
|
+
if (!res.ok) throw new Error(`fetch failed (${res.status})`);
|
|
50
|
+
root.innerHTML = await res.text();
|
|
51
|
+
} catch (err) {
|
|
52
|
+
root.innerHTML = `<p style="color:var(--a-danger-strong);">Failed to load kanban-board.examples.html — ${err.message}</p>`;
|
|
53
|
+
console.error('[kanban-board.html]', err);
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
</body>
|
|
58
|
+
</html>
|