@adia-ai/web-components 0.8.22 → 0.8.24
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 +59 -0
- package/MIGRATION.md +9 -0
- package/components/agent-questions/agent-questions.yaml +0 -2
- package/components/agent-trace/agent-trace.js +4 -1
- package/components/alert/alert.a2ui.json +1 -1
- package/components/alert/alert.class.js +5 -0
- package/components/alert/alert.css +44 -5
- package/components/alert/alert.yaml +10 -4
- package/components/calendar-grid/calendar-grid.yaml +3 -0
- package/components/canvas/canvas.js +4 -1
- package/components/card/card.css +12 -0
- package/components/chat-thread/chat-input.js +4 -1
- package/components/code/code.css +29 -26
- package/components/combobox/combobox.class.js +1 -1
- package/components/combobox/combobox.yaml +0 -1
- package/components/date-range-picker/date-range-picker.class.js +1 -1
- package/components/date-range-picker/date-range-picker.yaml +0 -1
- package/components/datetime-picker/datetime-picker.class.js +1 -1
- package/components/datetime-picker/datetime-picker.yaml +0 -1
- package/components/description-list/description-list.css +9 -0
- package/components/drawer/drawer.class.js +5 -0
- package/components/drawer/drawer.css +16 -0
- package/components/drawer/drawer.yaml +2 -0
- package/components/feed/feed.class.js +5 -0
- package/components/feed/feed.yaml +2 -0
- package/components/field/field.css +4 -1
- package/components/input/input.class.js +5 -0
- package/components/input/input.yaml +3 -0
- package/components/list/list.css +25 -5
- package/components/modal/modal.class.js +5 -0
- package/components/modal/modal.yaml +2 -0
- package/components/nav-group/nav-group.class.js +50 -2
- package/components/nav-group/nav-group.css +11 -2
- package/components/nav-group/nav-group.yaml +2 -0
- package/components/pagination/pagination.yaml +3 -0
- package/components/progress-row/progress-row.class.js +10 -2
- package/components/richtext/richtext.css +7 -0
- package/components/select/select.a2ui.json +5 -0
- package/components/select/select.class.js +27 -8
- package/components/select/select.yaml +13 -1
- package/components/stat/stat.js +4 -1
- package/components/stepper/stepper.css +25 -20
- package/components/swiper/swiper.class.js +5 -0
- package/components/swiper/swiper.yaml +3 -0
- package/components/table/table.a2ui.json +15 -1
- package/components/table/table.class.js +14 -1
- package/components/table/table.css +68 -3
- package/components/table/table.d.ts +5 -1
- package/components/table/table.yaml +34 -1
- package/components/tabs/tab.js +4 -1
- package/components/tag/tag.css +15 -9
- package/components/toolbar/toolbar.class.js +20 -0
- package/components/toolbar/toolbar.yaml +2 -0
- package/core/provider.js +5 -1
- package/dist/host.min.css +1 -1
- package/dist/host.sheet.js +1 -1
- package/dist/scale.min.css +1 -1
- package/dist/scale.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 +93 -93
- package/dist/web-components.sheet.js +1 -1
- package/package.json +1 -1
- package/patterns/access-requests/access-requests.examples.html +12 -3
- package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +23 -8
- package/patterns/agent-cost/agent-cost.examples.html +12 -3
- package/patterns/agent-memory/agent-memory.examples.html +12 -3
- package/patterns/agent-prompt-library/agent-prompt-library.examples.html +12 -3
- package/patterns/agent-tool-call/agent-tool-call.examples.html +16 -4
- package/patterns/alert-dialog/alert-dialog.examples.html +12 -3
- package/patterns/app-nav/app-nav.examples.html +36 -9
- package/patterns/approvals/approvals.examples.html +14 -10
- package/patterns/audit-log/audit-log.examples.html +5 -2
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +210 -32
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.js +83 -4
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.html +68 -0
- package/patterns/changelog-feed/changelog-feed.examples.html +7 -4
- package/patterns/chart-in-card/chart-in-card.examples.html +28 -7
- package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +24 -9
- package/patterns/conversion-funnel/conversion-funnel.examples.html +24 -15
- package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +17 -8
- package/patterns/diff-review/diff-review.examples.html +12 -3
- package/patterns/export-flow/export-flow.examples.html +12 -3
- package/patterns/filter-bar/filter-bar.examples.html +13 -4
- package/patterns/form-drawer/form-drawer.examples.html +15 -6
- package/patterns/form-system/form-system.examples.html +4 -1
- package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html +12 -3
- package/patterns/inline-dialog/inline-dialog.examples.html +12 -3
- package/patterns/kanban-board/kanban-board.examples.html +4 -1
- package/patterns/marketing-engagement/marketing-engagement.examples.html +32 -14
- package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +13 -4
- package/patterns/permissions-matrix/permissions-matrix.examples.html +9 -3
- package/patterns/permissions-role-picker/permissions-role-picker.examples.html +8 -2
- package/patterns/permissions-sharing/permissions-sharing.examples.html +12 -3
- package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +18 -6
- package/patterns/record-detail-drawer/record-detail-drawer.examples.html +10 -4
- package/patterns/retention-cohort/retention-cohort.examples.html +15 -6
- package/patterns/search-discovery/search-discovery.examples.html +16 -4
- package/patterns/system-banners/system-banners.examples.html +54 -48
- package/patterns/timezone-selector/timezone-selector.examples.html +8 -2
- package/patterns/timezone-selector/timezone-selector.examples.js +3 -1
- package/patterns/wizard-drawer/wizard-drawer.examples.html +25 -23
- package/patterns/wizard-drawer/wizard-drawer.examples.js +12 -1
- package/styles/foundation/radius.css +2 -2
- package/styles/scale.css +2 -2
- package/styles/type/scale.css +6 -6
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
<p data-note>KPI + trend shape. Used in overview rows to show 4–6 metrics side-by-side.</p>
|
|
23
23
|
<div data-artifact-container>
|
|
24
24
|
<div data-artifact-item data-artifact-label="sparkline tile">
|
|
25
|
-
<card-ui data-chunk="chart-in-card-sparkline-tile"
|
|
25
|
+
<card-ui data-chunk="chart-in-card-sparkline-tile" data-chunk-kind="block"
|
|
26
|
+
data-chunk-domain="dashboard"
|
|
27
|
+
data-chunk-description="Sparkline metric tile — compact card with metric name, big current value (Page Views 84,232), and an edge-to-edge sparkline chart bleeding below."
|
|
28
|
+
data-chunk-keywords="sparkline tile metric card page-views value chart compact dashboard kpi trend mini analytics" style="max-width:320px;">
|
|
26
29
|
<header>
|
|
27
30
|
<span slot="heading"><h2>Page Views</h2></span>
|
|
28
31
|
<text-ui slot="description" variant="title">84,232</text-ui>
|
|
@@ -40,7 +43,10 @@
|
|
|
40
43
|
<p data-note>Chart as primary content. Header names the metric; footer adds a supporting action.</p>
|
|
41
44
|
<div data-artifact-container>
|
|
42
45
|
<div data-artifact-item data-artifact-label="full chart">
|
|
43
|
-
<card-ui data-chunk="chart-in-card-full-chart"
|
|
46
|
+
<card-ui data-chunk="chart-in-card-full-chart" data-chunk-kind="block"
|
|
47
|
+
data-chunk-domain="dashboard"
|
|
48
|
+
data-chunk-description="Full chart card — Revenue bar chart over the last 12 months with title and range description in the header and a stretch View-report footer button."
|
|
49
|
+
data-chunk-keywords="chart card bar revenue months report full analytics dashboard footer button range" style="max-width:520px;">
|
|
44
50
|
<header>
|
|
45
51
|
<span slot="heading"><h3>Revenue</h3></span>
|
|
46
52
|
<text-ui slot="description" color="subtle">Last 12 months</text-ui>
|
|
@@ -61,7 +67,10 @@
|
|
|
61
67
|
<p data-note>Stat in header pairs with the chart so the current value is legible before the chart renders.</p>
|
|
62
68
|
<div data-artifact-container>
|
|
63
69
|
<div data-artifact-item data-artifact-label="chart plus stat">
|
|
64
|
-
<card-ui data-chunk="chart-in-card-chart-plus-stat"
|
|
70
|
+
<card-ui data-chunk="chart-in-card-chart-plus-stat" data-chunk-kind="block"
|
|
71
|
+
data-chunk-domain="dashboard"
|
|
72
|
+
data-chunk-description="Stat-headed chart card — an MRR stat with change delta and trend arrow as the card header, over a smooth line chart of the metric's history."
|
|
73
|
+
data-chunk-keywords="chart stat card mrr line smooth trend delta header metric history dashboard analytics revenue" style="max-width:520px;">
|
|
65
74
|
<header>
|
|
66
75
|
<span slot="heading">
|
|
67
76
|
<stat-ui label="MRR" value="$48,290" change="+12.4%" trend="up"></stat-ui>
|
|
@@ -80,7 +89,10 @@
|
|
|
80
89
|
<p data-note>Chart shows aggregate; breakdown beneath gives the composition. Most SaaS "Overview" tiles follow this shape.</p>
|
|
81
90
|
<div data-artifact-container>
|
|
82
91
|
<div data-artifact-item data-artifact-label="chart plus breakdown">
|
|
83
|
-
<card-ui data-chunk="chart-in-card-chart-plus-breakdown"
|
|
92
|
+
<card-ui data-chunk="chart-in-card-chart-plus-breakdown" data-chunk-kind="block"
|
|
93
|
+
data-chunk-domain="dashboard"
|
|
94
|
+
data-chunk-description="Chart with breakdown card — Sessions bar chart for the week over a 3-up grid of stat tiles decomposing the total by segment (Desktop / Mobile / Tablet)."
|
|
95
|
+
data-chunk-keywords="chart breakdown card sessions bar stats grid desktop mobile tablet segments decomposition dashboard analytics" style="max-width:520px;">
|
|
84
96
|
<header>
|
|
85
97
|
<span slot="heading"><h3>Sessions</h3></span>
|
|
86
98
|
<text-ui slot="description" color="subtle">This week</text-ui>
|
|
@@ -105,7 +117,10 @@
|
|
|
105
117
|
<p data-note>Footer carries trend narrative + period caption using the new footer <code>heading</code> / <code>description</code> slot routing (symmetric with header). Shadcn-style revenue card translated to AdiaUI primitives.</p>
|
|
106
118
|
<div data-artifact-container>
|
|
107
119
|
<div data-artifact-item data-artifact-label="area chart + trend footer">
|
|
108
|
-
<card-ui data-chunk="chart-in-card-trend-footer"
|
|
120
|
+
<card-ui data-chunk="chart-in-card-trend-footer" data-chunk-kind="block"
|
|
121
|
+
data-chunk-domain="dashboard"
|
|
122
|
+
data-chunk-description="Area chart card with trend footer — Revenue area chart for a date range, footer states the takeaway ('Trending up by 5.2% this month') with a data-scope caption."
|
|
123
|
+
data-chunk-keywords="chart area card trend footer takeaway revenue range summary insight dashboard analytics" style="max-width:520px;">
|
|
109
124
|
<header>
|
|
110
125
|
<span slot="heading"><h3>Revenue</h3></span>
|
|
111
126
|
<text-ui slot="description" color="subtle">January – March 2024</text-ui>
|
|
@@ -127,7 +142,10 @@
|
|
|
127
142
|
<p data-note>Stat-ui's <code>chart</code> slot positions a sparkline to the right of the hero number — KPI and its trajectory as one visual unit.</p>
|
|
128
143
|
<div data-artifact-container>
|
|
129
144
|
<div data-artifact-item data-artifact-label="stat with sparkline slot">
|
|
130
|
-
<card-ui data-chunk="chart-in-card-stat-with-sparkline"
|
|
145
|
+
<card-ui data-chunk="chart-in-card-stat-with-sparkline" data-chunk-kind="block"
|
|
146
|
+
data-chunk-domain="dashboard"
|
|
147
|
+
data-chunk-description="Stat with inline sparkline — a single stat (Revenue $48.2k, +12.5% up) carrying a sparkline in its chart slot; the smallest chart-bearing KPI tile."
|
|
148
|
+
data-chunk-keywords="stat sparkline kpi tile revenue change trend inline chart slot compact dashboard metric" style="max-width:320px;">
|
|
131
149
|
<section>
|
|
132
150
|
<stat-ui label="Revenue" value="$48.2k" change="+12.5%" trend="up">
|
|
133
151
|
<chart-ui id="pat-stat-spark" slot="chart" type="sparkline" x="month" y="value"></chart-ui>
|
|
@@ -143,7 +161,10 @@
|
|
|
143
161
|
<p data-note>A <code>segmented-ui</code> in the header's <code>action</code> slot drives a time-range selection. Wire its <code>value</code> to refetch / slice the chart's <code>.data</code> via a controller.</p>
|
|
144
162
|
<div data-artifact-container>
|
|
145
163
|
<div data-artifact-item data-artifact-label="chart with 1w / 2w / 1m / 3m pills">
|
|
146
|
-
<card-ui data-chunk="chart-in-card-chart-with-filter-pills"
|
|
164
|
+
<card-ui data-chunk="chart-in-card-chart-with-filter-pills" data-chunk-kind="block"
|
|
165
|
+
data-chunk-domain="dashboard"
|
|
166
|
+
data-chunk-description="Chart card with range picker — Sessions chart whose header action is a segmented control of time ranges (1w / 2w / 1m / 3m) that filters the plotted window."
|
|
167
|
+
data-chunk-keywords="chart card segmented range picker filter pills time window sessions week month dashboard analytics toggle" style="max-width:520px;">
|
|
147
168
|
<header>
|
|
148
169
|
<span slot="heading"><h3>Sessions</h3></span>
|
|
149
170
|
<segmented-ui slot="action" value="1m">
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
<p data-note>A vertical stack of comments anchored to a parent object. Each row carries author avatar + name + timestamp + body + reactions strip + reply action. Threaded replies indent one level — deeper nesting collapses to "X replies" by default.</p>
|
|
25
25
|
<div data-artifact-container>
|
|
26
26
|
<div data-artifact-item data-artifact-label="comment thread">
|
|
27
|
-
<card-ui data-chunk="comments-thread"
|
|
27
|
+
<card-ui data-chunk="comments-thread" data-chunk-kind="block"
|
|
28
|
+
data-chunk-domain="content"
|
|
29
|
+
data-chunk-description="Comment thread card — 'Discussion' with comment count and participants, avatar-led comment rows with author, timestamp and body, and a Resolve header action."
|
|
30
|
+
data-chunk-keywords="comments thread discussion collaboration avatar author timestamp reply resolve participants conversation review feedback" style="max-width: 640px;">
|
|
28
31
|
<header>
|
|
29
32
|
<span slot="heading" variant="section">Discussion</span>
|
|
30
33
|
<text-ui slot="description" color="subtle">3 comments · 2 participants</text-ui>
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
<text-ui strong>Avery Chen</text-ui>
|
|
40
43
|
<text-ui color="subtle" size="sm">2 hours ago</text-ui>
|
|
41
44
|
</row-ui>
|
|
42
|
-
<text-ui>Should the OKLCH ramp here use the chrome or the data scale? <text-ui color="
|
|
45
|
+
<text-ui>Should the OKLCH ramp here use the chrome or the data scale? <text-ui color="accent">@Kim</text-ui> what's the convention?</text-ui>
|
|
43
46
|
<row-ui gap="1">
|
|
44
47
|
<tag-ui size="sm" icon-leading="thumbs-up">2</tag-ui>
|
|
45
48
|
<tag-ui size="sm" icon-leading="eyes">1</tag-ui>
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
<text-ui strong>Kim Granlund</text-ui>
|
|
55
58
|
<text-ui color="subtle" size="sm">1 hour ago</text-ui>
|
|
56
59
|
</row-ui>
|
|
57
|
-
<text-ui>Chrome — the data scale is reserved for visualization series. Spec at <text-ui color="
|
|
60
|
+
<text-ui>Chrome — the data scale is reserved for visualization series. Spec at <text-ui color="accent">.claude/docs/specs/component-token-contract.md</text-ui>.</text-ui>
|
|
58
61
|
<row-ui gap="1">
|
|
59
62
|
<tag-ui size="sm" icon-leading="thumbs-up">3</tag-ui>
|
|
60
63
|
<button-ui text="Reply" variant="ghost" size="sm"></button-ui>
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
<text-ui strong>Jordan Lee</text-ui>
|
|
69
72
|
<text-ui color="subtle" size="sm">12 minutes ago</text-ui>
|
|
70
73
|
</row-ui>
|
|
71
|
-
<text-ui>Filed a follow-up — adding a lint rule so this doesn't happen again. <text-ui color="
|
|
74
|
+
<text-ui>Filed a follow-up — adding a lint rule so this doesn't happen again. <text-ui color="accent">#linter</text-ui></text-ui>
|
|
72
75
|
<row-ui gap="1">
|
|
73
76
|
<button-ui text="Reply" variant="ghost" size="sm"></button-ui>
|
|
74
77
|
</row-ui>
|
|
@@ -86,7 +89,10 @@
|
|
|
86
89
|
<p data-note>The input field below a thread. Multiline, with attach + mention + emoji affordances inline, and Send / Cancel actions. Submits on Cmd/Ctrl+Enter; Enter inserts a newline.</p>
|
|
87
90
|
<div data-artifact-container>
|
|
88
91
|
<div data-artifact-item data-artifact-label="comment composer">
|
|
89
|
-
<card-ui data-chunk="comments-composer"
|
|
92
|
+
<card-ui data-chunk="comments-composer" data-chunk-kind="block"
|
|
93
|
+
data-chunk-domain="content"
|
|
94
|
+
data-chunk-description="Comment composer — avatar beside a write-a-comment textarea with attach / mention / emoji ghost buttons, a Cmd+Enter-to-send hint, and a primary Comment button."
|
|
95
|
+
data-chunk-keywords="comment composer write textarea mention attach emoji send cmd-enter reply input collaboration post" style="max-width: 640px;">
|
|
90
96
|
<section>
|
|
91
97
|
<row-ui gap="3" align="start">
|
|
92
98
|
<avatar-ui size="sm" text="You"></avatar-ui>
|
|
@@ -114,7 +120,10 @@
|
|
|
114
120
|
<p data-note>Popover that opens after the user types <code>@</code>. Shows team members + recently-mentioned at top, fuzzy-filtered by query. Each row carries avatar + name + handle + role tag. Arrow keys navigate; Enter inserts; Esc closes without inserting.</p>
|
|
115
121
|
<div data-artifact-container>
|
|
116
122
|
<div data-artifact-item data-artifact-label="mention picker menu">
|
|
117
|
-
<card-ui data-chunk="comments-mention-menu"
|
|
123
|
+
<card-ui data-chunk="comments-mention-menu" data-chunk-kind="block"
|
|
124
|
+
data-chunk-domain="content"
|
|
125
|
+
data-chunk-description="@-mention picker popover — 'Mention' list of people rows with avatar, name, handle and role, filtered as the user types after @ in a composer."
|
|
126
|
+
data-chunk-keywords="mention picker popover at-mention people avatar handle role autocomplete suggest composer collaboration tag-user" raw style="max-width: 320px;" data-shape="popover">
|
|
118
127
|
<section>
|
|
119
128
|
<col-ui gap="2">
|
|
120
129
|
<text-ui strong size="sm" color="subtle">Mention</text-ui>
|
|
@@ -161,9 +170,12 @@
|
|
|
161
170
|
<p data-note>The strip of reaction tags under a comment or message. Each tag shows emoji + count; the user's own reaction is highlighted. A trailing "+" opens the picker. Click a count to toggle the user's own reaction; long-press shows who reacted.</p>
|
|
162
171
|
<div data-artifact-container>
|
|
163
172
|
<div data-artifact-item data-artifact-label="reactions bar">
|
|
164
|
-
<row-ui data-chunk="reactions-bar"
|
|
173
|
+
<row-ui data-chunk="reactions-bar" data-chunk-kind="block"
|
|
174
|
+
data-chunk-domain="content"
|
|
175
|
+
data-chunk-description="Reactions bar — emoji reaction tags with counts (thumbs-up 4, party 2, eyes 1, rocket 1; own reaction highlighted) plus an add-reaction button. Rides under a comment or message."
|
|
176
|
+
data-chunk-keywords="reactions emoji bar counts thumbs-up party add react message comment collaboration engagement" gap="1">
|
|
165
177
|
<tag-ui size="sm">👍 4</tag-ui>
|
|
166
|
-
<tag-ui size="sm" variant="
|
|
178
|
+
<tag-ui size="sm" variant="accent">🎉 2</tag-ui>
|
|
167
179
|
<tag-ui size="sm">👀 1</tag-ui>
|
|
168
180
|
<tag-ui size="sm">🚀 1</tag-ui>
|
|
169
181
|
<button-ui icon="plus" variant="ghost" size="sm" aria-label="Add reaction"></button-ui>
|
|
@@ -177,7 +189,10 @@
|
|
|
177
189
|
<p data-note>The emoji-grid popover that opens from the "+" button. Recent + frequent emojis at top; full categorical grid below; search input above. Arrow + Enter for keyboard; click for pointer.</p>
|
|
178
190
|
<div data-artifact-container>
|
|
179
191
|
<div data-artifact-item data-artifact-label="reactions picker">
|
|
180
|
-
<card-ui data-chunk="reactions-picker"
|
|
192
|
+
<card-ui data-chunk="reactions-picker" data-chunk-kind="block"
|
|
193
|
+
data-chunk-domain="content"
|
|
194
|
+
data-chunk-description="Emoji reaction picker — search-emoji input over a 'Frequently used' wrap of emoji buttons for adding a reaction to a message or comment."
|
|
195
|
+
data-chunk-keywords="reactions picker emoji search frequently-used popover add react message comment collaboration" style="max-width: 360px;">
|
|
181
196
|
<section>
|
|
182
197
|
<col-ui gap="2">
|
|
183
198
|
<field-ui>
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
<p data-note>Top step is an explicit 100% baseline (no progress bar — it's the anchor). Subsequent steps use <code>progress-row-ui</code> with the count + percentage in the meta slot.</p>
|
|
25
25
|
<div data-artifact-container>
|
|
26
26
|
<div data-artifact-item data-artifact-label="conversion funnel">
|
|
27
|
-
<card-ui data-chunk="conversion-funnel-4-step-funnel"
|
|
27
|
+
<card-ui data-chunk="conversion-funnel-4-step-funnel" data-chunk-kind="block"
|
|
28
|
+
data-chunk-domain="dashboard"
|
|
29
|
+
data-chunk-description="4-step conversion funnel card — Visit → Sign up → Activate → Convert as rows with step name, visitor count, progress bar, and step-over-step percentage."
|
|
30
|
+
data-chunk-keywords="conversion funnel steps visit signup activate convert progress percentage drop-off analytics marketing pipeline" style="max-width: 560px;">
|
|
28
31
|
<header>
|
|
29
32
|
<h3>Conversion funnel</h3>
|
|
30
33
|
<text-ui slot="description" color="subtle">Visit → Sign up → Activate → Convert</text-ui>
|
|
@@ -53,7 +56,10 @@
|
|
|
53
56
|
<p data-note>Pair the funnel card with a segmented control in <code>slot="action"</code> so users can switch between cohorts (e.g. new-vs-returning, mobile-vs-desktop). Swap the <code>value</code> + <code>meta</code> attributes in setup.js on segment change.</p>
|
|
54
57
|
<div data-artifact-container>
|
|
55
58
|
<div data-artifact-item data-artifact-label="funnel with cohort toggle">
|
|
56
|
-
<card-ui data-chunk="conversion-funnel-with-segment-compare"
|
|
59
|
+
<card-ui data-chunk="conversion-funnel-with-segment-compare" data-chunk-kind="block"
|
|
60
|
+
data-chunk-domain="dashboard"
|
|
61
|
+
data-chunk-description="Checkout funnel with segment compare — funnel step rows plus a header segmented toggle (New / Returning) that switches which cohort's numbers are shown."
|
|
62
|
+
data-chunk-keywords="conversion funnel checkout segment compare new returning cohort toggle segmented analytics drop-off" style="max-width: 560px;">
|
|
57
63
|
<header>
|
|
58
64
|
<h3>Checkout funnel</h3>
|
|
59
65
|
<text-ui slot="description" color="subtle">Last 30 days · by first-time vs returning</text-ui>
|
|
@@ -94,7 +100,10 @@
|
|
|
94
100
|
<p data-note>For board reporting, combine the funnel with a step-over-step delta column so stakeholders can see exactly where the biggest drop-off happens. Delta is a <code>badge-ui</code> colored by severity.</p>
|
|
95
101
|
<div data-artifact-container>
|
|
96
102
|
<div data-artifact-item data-artifact-label="funnel with step-over-step">
|
|
97
|
-
<card-ui data-chunk="conversion-funnel-wide-summary"
|
|
103
|
+
<card-ui data-chunk="conversion-funnel-wide-summary" data-chunk-kind="block"
|
|
104
|
+
data-chunk-domain="dashboard"
|
|
105
|
+
data-chunk-description="Signup funnel with summary stats — step rows with counts and conversion bars, closed by a stat band summarizing overall conversion and biggest drop-off."
|
|
106
|
+
data-chunk-keywords="conversion funnel signup summary stats overall drop-off steps bars analytics wide report" style="max-width: 640px;">
|
|
98
107
|
<header>
|
|
99
108
|
<h3>Signup funnel</h3>
|
|
100
109
|
<text-ui slot="description" color="subtle">Step-over-step conversion, last 7 days</text-ui>
|
|
@@ -108,18 +117,18 @@
|
|
|
108
117
|
</col-ui>
|
|
109
118
|
<text-ui strong>100%</text-ui>
|
|
110
119
|
</row-ui>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<badge-ui text="−59%" variant="danger"></badge-ui>
|
|
122
|
-
</row-ui>
|
|
120
|
+
<!-- Delta badge rides INSIDE the meta slot (gh#502): authored
|
|
121
|
+
[slot="meta"] keeps text + badge on the meta text line,
|
|
122
|
+
instead of a sibling column centered against the whole row. -->
|
|
123
|
+
<progress-row-ui label="Email verified" value="68">
|
|
124
|
+
<span slot="meta">5,726 · 68% <badge-ui text="−32%" variant="warning"></badge-ui></span>
|
|
125
|
+
</progress-row-ui>
|
|
126
|
+
<progress-row-ui label="Workspace created" value="54">
|
|
127
|
+
<span slot="meta">4,547 · 54% <badge-ui text="−21%" variant="muted"></badge-ui></span>
|
|
128
|
+
</progress-row-ui>
|
|
129
|
+
<progress-row-ui label="Invited a teammate" value="22">
|
|
130
|
+
<span slot="meta">1,852 · 22% <badge-ui text="−59%" variant="danger"></badge-ui></span>
|
|
131
|
+
</progress-row-ui>
|
|
123
132
|
</col-ui>
|
|
124
133
|
</section>
|
|
125
134
|
</card-ui>
|
package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html
CHANGED
|
@@ -26,17 +26,20 @@
|
|
|
26
26
|
<p data-note>The most common shape: a normal table where one row at a time enters edit mode (double-click or pencil button). Cells become `<input-ui>` / `<select-ui>` / etc.; Save / Cancel actions appear in the row's trailing column.</p>
|
|
27
27
|
<div data-artifact-container>
|
|
28
28
|
<div data-artifact-item data-artifact-label="single editing row">
|
|
29
|
-
<card-ui data-chunk="table-inline-edit-row"
|
|
29
|
+
<card-ui data-chunk="table-inline-edit-row" data-chunk-kind="block"
|
|
30
|
+
data-chunk-domain="data"
|
|
31
|
+
data-chunk-description="Table with inline row editing — pricing matrix where the editing row swaps its cells for inputs with save/cancel, unsaved count in the header, plus an Add-row action."
|
|
32
|
+
data-chunk-keywords="table inline edit row editing pricing inputs save cancel unsaved add-row data grid">
|
|
30
33
|
<header>
|
|
31
34
|
<span slot="heading" variant="section">Pricing matrix</span>
|
|
32
35
|
<text-ui slot="description" color="subtle">12 rows · 1 unsaved</text-ui>
|
|
33
36
|
<button-ui slot="action" text="Add row" variant="ghost" size="sm" icon-leading="plus"></button-ui>
|
|
34
37
|
</header>
|
|
35
38
|
<section bleed>
|
|
36
|
-
<!-- A real <table> in <table-ui raw> (consumer-owns-body mode) gives
|
|
39
|
+
<!-- A real <table> in <table-ui frameless raw> (consumer-owns-body mode) gives
|
|
37
40
|
true column alignment; the editing row (Pro) swaps its Price/Limits
|
|
38
41
|
cells for <input-ui> and its action cell for Save/Cancel. -->
|
|
39
|
-
<table-ui raw>
|
|
42
|
+
<table-ui frameless raw>
|
|
40
43
|
<table>
|
|
41
44
|
<thead>
|
|
42
45
|
<tr><th>Plan</th><th>Price</th><th>Limits</th><th></th></tr>
|
|
@@ -79,7 +82,10 @@
|
|
|
79
82
|
<p data-note>The full Excel-style shape: every cell renders an `<input-ui>` (or typed equivalent — number, select, date). Tab moves to the next cell, Enter commits + moves down. Saves are auto-debounced; the dirty state surfaces as a per-row tag.</p>
|
|
80
83
|
<div data-artifact-container>
|
|
81
84
|
<div data-artifact-item data-artifact-label="spreadsheet cells">
|
|
82
|
-
<card-ui data-chunk="table-spreadsheet-cells"
|
|
85
|
+
<card-ui data-chunk="table-spreadsheet-cells" data-chunk-kind="block"
|
|
86
|
+
data-chunk-domain="data"
|
|
87
|
+
data-chunk-description="Spreadsheet-style editable table — per-cell editing with dirty-cell highlighting, auto-saving status in the header, and Undo / Save-now actions."
|
|
88
|
+
data-chunk-keywords="table spreadsheet cells editable dirty auto-save undo save forecast inventory grid excel">
|
|
83
89
|
<header>
|
|
84
90
|
<span slot="heading" variant="section">Inventory — Q4 forecast</span>
|
|
85
91
|
<text-ui slot="description" color="subtle">Auto-saving · 3 cells dirty</text-ui>
|
|
@@ -92,7 +98,7 @@
|
|
|
92
98
|
<!-- Every cell is an <input-ui>; a real <table> gives the Excel-style
|
|
93
99
|
column alignment the list-item flex layout couldn't. The per-row
|
|
94
100
|
dirty/clean state sits in its own Status column. -->
|
|
95
|
-
<table-ui raw>
|
|
101
|
+
<table-ui frameless raw>
|
|
96
102
|
<table>
|
|
97
103
|
<thead>
|
|
98
104
|
<tr><th>Item</th><th>Oct</th><th>Nov</th><th>Dec</th><th>Status</th></tr>
|
|
@@ -103,7 +109,7 @@
|
|
|
103
109
|
<td><input-ui type="number" value="124" size="sm"></input-ui></td>
|
|
104
110
|
<td><input-ui type="number" value="98" size="sm"></input-ui></td>
|
|
105
111
|
<td><input-ui type="number" value="156" size="sm"></input-ui></td>
|
|
106
|
-
<td><tag-ui size="sm" variant="
|
|
112
|
+
<td><tag-ui size="sm" variant="default">clean</tag-ui></td>
|
|
107
113
|
</tr>
|
|
108
114
|
<tr>
|
|
109
115
|
<td><text-ui strong>Widget B</text-ui></td>
|
|
@@ -124,7 +130,7 @@
|
|
|
124
130
|
<td><input-ui type="number" value="200" size="sm"></input-ui></td>
|
|
125
131
|
<td><input-ui type="number" value="245" size="sm"></input-ui></td>
|
|
126
132
|
<td><input-ui type="number" value="280" size="sm"></input-ui></td>
|
|
127
|
-
<td><tag-ui size="sm" variant="
|
|
133
|
+
<td><tag-ui size="sm" variant="default">clean</tag-ui></td>
|
|
128
134
|
</tr>
|
|
129
135
|
</tbody>
|
|
130
136
|
</table>
|
|
@@ -140,7 +146,10 @@
|
|
|
140
146
|
<p data-note>Use <code><tree-ui></code> for the recursion. Each <code><tree-item-ui></code> renders the chevron + indent automatically; nested items go inside the parent's default slot. Common in budgets, org charts, file browsers.</p>
|
|
141
147
|
<div data-artifact-container>
|
|
142
148
|
<div data-artifact-item data-artifact-label="tree table">
|
|
143
|
-
<card-ui data-chunk="tree-table-basic"
|
|
149
|
+
<card-ui data-chunk="tree-table-basic" data-chunk-kind="block"
|
|
150
|
+
data-chunk-domain="data"
|
|
151
|
+
data-chunk-description="Tree table card — hierarchical budget rollup (departments expand into categories, each row carrying its amount) with the grand total in the header."
|
|
152
|
+
data-chunk-keywords="tree table hierarchy budget departments categories expand collapse rollup total nested amounts">
|
|
144
153
|
<header>
|
|
145
154
|
<span slot="heading" variant="section">Q4 budget — by department</span>
|
|
146
155
|
<text-ui slot="description" color="subtle">Total: $1.24M · 4 departments · 12 categories</text-ui>
|
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
<p data-note>Two-column view with the old version on the left and the new on the right. Removed lines tinted danger; added lines tinted success. Compose two <code>code-ui line-numbers</code> blocks side-by-side; per-line tint comes from a <code>data-line-states</code> CSV (one entry per line: <code>unchanged</code>, <code>added</code>, or <code>removed</code>).</p>
|
|
26
26
|
<div data-artifact-container>
|
|
27
27
|
<div data-artifact-item data-artifact-label="side-by-side diff">
|
|
28
|
-
<card-ui data-chunk="diff-side-by-side"
|
|
28
|
+
<card-ui data-chunk="diff-side-by-side" data-chunk-kind="block"
|
|
29
|
+
data-chunk-domain="data"
|
|
30
|
+
data-chunk-description="Side-by-side diff card — filename header with +3 −2 change stats and an Inline / Side-by-side view toggle, over a two-column before/after code comparison."
|
|
31
|
+
data-chunk-keywords="diff side-by-side code review compare before after columns changes additions deletions toggle file" >
|
|
29
32
|
<header>
|
|
30
33
|
<span slot="heading" variant="section">tokens.css</span>
|
|
31
34
|
<text-ui slot="description" color="subtle">+3 −2 · 5 lines changed</text-ui>
|
|
@@ -63,7 +66,10 @@
|
|
|
63
66
|
<p data-note>Single-column view with `+` and `−` line markers. Better for narrow columns and quick scan-reading. Compose <code>code-ui language="diff" line-numbers</code>; the `+`/`−`/space prefix on each line auto-resolves to <code>added</code> / <code>removed</code> / <code>unchanged</code> tint.</p>
|
|
64
67
|
<div data-artifact-container>
|
|
65
68
|
<div data-artifact-item data-artifact-label="inline unified diff">
|
|
66
|
-
<card-ui data-chunk="diff-inline"
|
|
69
|
+
<card-ui data-chunk="diff-inline" data-chunk-kind="block"
|
|
70
|
+
data-chunk-domain="data"
|
|
71
|
+
data-chunk-description="Inline diff card — filename header with change stats over a unified diff code block with line numbers, minus/plus lines marked."
|
|
72
|
+
data-chunk-keywords="diff inline unified code review changes line-numbers additions deletions patch file" style="max-width: 640px;">
|
|
67
73
|
<header>
|
|
68
74
|
<span slot="heading" variant="section">tokens.css — inline diff</span>
|
|
69
75
|
<text-ui slot="description" color="subtle">+3 −2</text-ui>
|
|
@@ -90,7 +96,10 @@
|
|
|
90
96
|
<p data-note>For settings or records where the underlying shape is a key-value object, not lines of text. Each row shows the field name + old → new value pair. <code>description-list-ui</code> for layout; <code>tag-ui</code> with diff variants for the value pair.</p>
|
|
91
97
|
<div data-artifact-container>
|
|
92
98
|
<div data-artifact-item data-artifact-label="structured field diff">
|
|
93
|
-
<card-ui data-chunk="diff-structured"
|
|
99
|
+
<card-ui data-chunk="diff-structured" data-chunk-kind="block"
|
|
100
|
+
data-chunk-domain="data"
|
|
101
|
+
data-chunk-description="Structured field diff card — settings change preview as a description list where each changed field shows a danger old-value tag and a success new-value tag."
|
|
102
|
+
data-chunk-keywords="diff structured fields change preview settings old new values tags before after review confirm" style="max-width: 640px;">
|
|
94
103
|
<header>
|
|
95
104
|
<span slot="heading" variant="section">Workspace settings — change preview</span>
|
|
96
105
|
<text-ui slot="description" color="subtle">3 fields changed</text-ui>
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
<p data-note>Small datasets (< 10 k rows). User picks format, browser downloads on click. Submit button copy = the verb ("Download CSV"); format-picker change updates the button label.</p>
|
|
19
19
|
<div data-artifact-container>
|
|
20
20
|
<div data-artifact-item data-artifact-label="download now">
|
|
21
|
-
<card-ui data-chunk="export-flow-sync"
|
|
21
|
+
<card-ui data-chunk="export-flow-sync" data-chunk-kind="block"
|
|
22
|
+
data-chunk-domain="data-management"
|
|
23
|
+
data-chunk-description="Synchronous export card — 'Export users' with row count and applied-filter note, format select (CSV / JSON), column scope options, and an immediate Download button."
|
|
24
|
+
data-chunk-keywords="export sync download users csv json format columns filter rows immediate file data" style="max-width: 480px;">
|
|
22
25
|
<header>
|
|
23
26
|
<span slot="heading" variant="section">Export users</span>
|
|
24
27
|
<text-ui slot="description" color="subtle">428 rows · current filter applied</text-ui>
|
|
@@ -54,7 +57,10 @@
|
|
|
54
57
|
<p data-note>Large datasets (≥ 10 k rows / known-slow exports). Submit queues a job; the user gets an email with a download link when the archive is ready. The form acknowledges the latency up front in an info alert + uses the verb "Request" instead of "Download".</p>
|
|
55
58
|
<div data-artifact-container>
|
|
56
59
|
<div data-artifact-item data-artifact-label="request email export">
|
|
57
|
-
<card-ui data-chunk="export-flow-async"
|
|
60
|
+
<card-ui data-chunk="export-flow-async" data-chunk-kind="block"
|
|
61
|
+
data-chunk-domain="data-management"
|
|
62
|
+
data-chunk-description="Async export card — large dataset export (~1.4M events) with date-range and format selects and an email-when-ready flow instead of a blocking download."
|
|
63
|
+
data-chunk-keywords="export async large dataset events date-range format email notify background job analytics queue" style="max-width: 480px;">
|
|
58
64
|
<header>
|
|
59
65
|
<span slot="heading" variant="section">Export analytics</span>
|
|
60
66
|
<text-ui slot="description" color="subtle">~1.4M events · last 90 days</text-ui>
|
|
@@ -101,7 +107,10 @@
|
|
|
101
107
|
<p data-note>When both make sense (medium datasets, user preference matters). Radio choice up top toggles which submit verb fires; email field hides when "download" is selected.</p>
|
|
102
108
|
<div data-artifact-container>
|
|
103
109
|
<div data-artifact-item data-artifact-label="delivery picker">
|
|
104
|
-
<card-ui data-chunk="export-flow-delivery"
|
|
110
|
+
<card-ui data-chunk="export-flow-delivery" data-chunk-kind="block"
|
|
111
|
+
data-chunk-domain="data-management"
|
|
112
|
+
data-chunk-description="Export with delivery options card — invoice export offering format (PDF bundle / ZIP) and delivery destination choices (download, email, cloud storage)."
|
|
113
|
+
data-chunk-keywords="export delivery invoices pdf zip email cloud storage destination format fiscal download options" style="max-width: 480px;">
|
|
105
114
|
<header>
|
|
106
115
|
<span slot="heading" variant="section">Export invoices</span>
|
|
107
116
|
<text-ui slot="description" color="subtle">2024 fiscal year · 1,247 invoices</text-ui>
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
</p>
|
|
19
19
|
</section>
|
|
20
20
|
|
|
21
|
-
<section data-section data-property="active-filters" data-chunk="filter-bar-active-filters"
|
|
21
|
+
<section data-section data-property="active-filters" data-chunk="filter-bar-active-filters" data-chunk-kind="block"
|
|
22
|
+
data-chunk-domain="data"
|
|
23
|
+
data-chunk-description="Active-filters bar — removable chips for each applied filter (Status: Active, Owner, Updated range) with a trailing + Add filter button opening a facet popover."
|
|
24
|
+
data-chunk-keywords="filters active chips removable add-filter facets popover status owner updated bar refine query tags">
|
|
22
25
|
<h2 variant="section">Active filters + Add filter</h2>
|
|
23
26
|
<p data-note>Chips show each active filter. The trailing button opens a popover of available facets.</p>
|
|
24
27
|
<card-ui>
|
|
@@ -45,7 +48,10 @@
|
|
|
45
48
|
</card-ui>
|
|
46
49
|
</section>
|
|
47
50
|
|
|
48
|
-
<section data-section data-property="filter-bar-with-table" data-chunk="filter-bar-filter-bar-with-table"
|
|
51
|
+
<section data-section data-property="filter-bar-with-table" data-chunk="filter-bar-filter-bar-with-table" data-chunk-kind="block"
|
|
52
|
+
data-chunk-domain="data"
|
|
53
|
+
data-chunk-description="Filter bar over a table — removable filter chips and an Add-filter button in a toolbar directly above the table inside one card, so filters read as modifying the rows below."
|
|
54
|
+
data-chunk-keywords="filter bar table chips toolbar card rows data refine composition list results query">
|
|
49
55
|
<h2 variant="section">Filter bar + table</h2>
|
|
50
56
|
<p data-note>The common composition: filters sit above the table inside one card surface so they read as modifying the same data.</p>
|
|
51
57
|
<card-ui>
|
|
@@ -58,12 +64,15 @@
|
|
|
58
64
|
</row-ui>
|
|
59
65
|
<search-ui placeholder="Search…" size="sm"></search-ui>
|
|
60
66
|
</toolbar-ui>
|
|
61
|
-
<table-ui id="pat-filter-table" sortable striped></table-ui>
|
|
67
|
+
<table-ui frameless id="pat-filter-table" sortable striped></table-ui>
|
|
62
68
|
</section>
|
|
63
69
|
</card-ui>
|
|
64
70
|
</section>
|
|
65
71
|
|
|
66
|
-
<section data-section data-property="saved-views" data-chunk="filter-bar-saved-views"
|
|
72
|
+
<section data-section data-property="saved-views" data-chunk="filter-bar-saved-views" data-chunk-kind="block"
|
|
73
|
+
data-chunk-domain="data"
|
|
74
|
+
data-chunk-description="Saved views bar — segmented control of named filter combinations (All / My open / Team / Archived) replacing chip-by-chip filtering with one-tap views."
|
|
75
|
+
data-chunk-keywords="saved views segmented filters named all my-open team archived presets quick-switch bar data">
|
|
67
76
|
<h2 variant="section">Saved views</h2>
|
|
68
77
|
<p data-note>Named combinations of filters. Segmented control replaces the active-filter chips while a view is applied.</p>
|
|
69
78
|
<card-ui>
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
<p data-note>3–5 fields with primary + cancel actions. The default shape for "+ New X" triggers.</p>
|
|
23
23
|
<div data-artifact-container>
|
|
24
24
|
<div data-artifact-item data-artifact-label="create form">
|
|
25
|
-
<button-ui
|
|
26
|
-
<drawer-ui
|
|
25
|
+
<button-ui text="+ New project" variant="primary" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
26
|
+
<drawer-ui data-chunk="form-drawer-simple-form" data-chunk-kind="block"
|
|
27
|
+
data-chunk-domain="forms"
|
|
28
|
+
data-chunk-description="Create-form drawer — 'New project' right-side drawer with name input, description textarea, and visibility select in the body, and Cancel / Create footer actions."
|
|
29
|
+
data-chunk-keywords="drawer form create new project name description visibility right-side panel cancel save quick-create" text="New project" side="right" size="md">
|
|
27
30
|
<section slot="body">
|
|
28
31
|
<col-ui gap="3">
|
|
29
32
|
<field-ui label="Name">
|
|
@@ -57,8 +60,11 @@
|
|
|
57
60
|
<p data-note>Edit drawers pair a primary action with a destructive one in the footer. Delete sits on the left, Save on the right — separated by the spacer.</p>
|
|
58
61
|
<div data-artifact-container>
|
|
59
62
|
<div data-artifact-item data-artifact-label="edit form">
|
|
60
|
-
<button-ui
|
|
61
|
-
<drawer-ui
|
|
63
|
+
<button-ui text="Edit project" icon="pencil" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
64
|
+
<drawer-ui data-chunk="form-drawer-edit-form" data-chunk-kind="block"
|
|
65
|
+
data-chunk-domain="forms"
|
|
66
|
+
data-chunk-description="Edit-form drawer — right-side drawer pre-filled with the record's current values (name, description, status) for quick edits without leaving the page."
|
|
67
|
+
data-chunk-keywords="drawer form edit prefilled record name description status update quick-edit panel inspector save" text="Edit project" side="right" size="md">
|
|
62
68
|
<section slot="body">
|
|
63
69
|
<col-ui gap="3">
|
|
64
70
|
<field-ui label="Name">
|
|
@@ -97,8 +103,11 @@
|
|
|
97
103
|
<p data-note>The footer stays visible even when the form body overflows. This is why the sticky-footer pattern matters — users shouldn't have to scroll to find "Save".</p>
|
|
98
104
|
<div data-artifact-container>
|
|
99
105
|
<div data-artifact-item data-artifact-label="long form">
|
|
100
|
-
<button-ui
|
|
101
|
-
<drawer-ui
|
|
106
|
+
<button-ui text="Advanced settings" icon="gear" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
107
|
+
<drawer-ui data-chunk="form-drawer-tall-form" data-chunk-kind="block"
|
|
108
|
+
data-chunk-domain="forms"
|
|
109
|
+
data-chunk-description="Tall sectioned form drawer — large right-side drawer whose body groups fields under headings (General, then advanced sections) with a scrolling body and pinned footer."
|
|
110
|
+
data-chunk-keywords="drawer form tall sections advanced settings general slug headings scroll long panel grouped fields" text="Advanced settings" side="right" size="lg">
|
|
102
111
|
<section slot="body">
|
|
103
112
|
<col-ui gap="4">
|
|
104
113
|
<col-ui gap="3">
|
|
@@ -307,7 +307,10 @@ emailField.syncValue('new@example.com');</code-ui>
|
|
|
307
307
|
<p>Try submitting the form below without filling in the fields to see auto-validation in action:</p>
|
|
308
308
|
<div data-artifact-container>
|
|
309
309
|
<div data-artifact-item data-artifact-label="form">
|
|
310
|
-
<form data-chunk="form-system-live-demo"
|
|
310
|
+
<form data-chunk="form-system-live-demo" data-chunk-kind="block"
|
|
311
|
+
data-chunk-domain="forms"
|
|
312
|
+
data-chunk-description="Validated form — full name and email fields with required / minlength / pattern rules and custom per-rule error messages, submitted with native constraint validation."
|
|
313
|
+
data-chunk-keywords="form validation required pattern minlength error messages name email constraint submit live inline" style="display:flex; flex-direction:column; gap:var(--a-space-3); max-width:400px;" onsubmit="event.preventDefault();">
|
|
311
314
|
<field-ui label="Full Name">
|
|
312
315
|
<input-ui name="fullname" required minlength="2" data-msg-required="Please enter your name" data-msg-minlength="Name must be at least 2 characters">
|
|
313
316
|
</input-ui>
|
package/patterns/forms-conditional-and-autocomplete/forms-conditional-and-autocomplete.examples.html
CHANGED
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
<p data-note>A select or radio determines which sub-fields render. Hidden fields are not just `display: none` — they're removed from the form so they don't submit. When revealed, they animate in and the form's height grows; focus moves to the first revealed field.</p>
|
|
25
25
|
<div data-artifact-container>
|
|
26
26
|
<div data-artifact-item data-artifact-label="conditional fields">
|
|
27
|
-
<card-ui data-chunk="forms-conditional-reveal"
|
|
27
|
+
<card-ui data-chunk="forms-conditional-reveal" data-chunk-kind="block"
|
|
28
|
+
data-chunk-domain="forms"
|
|
29
|
+
data-chunk-description="Conditional-reveal form card — an account-type select (Personal / Business) that reveals the business-only fields (company name, VAT id) when Business is chosen."
|
|
30
|
+
data-chunk-keywords="form conditional reveal account type personal business company vat dependent fields show hide branch dynamic" style="max-width: 560px;">
|
|
28
31
|
<header>
|
|
29
32
|
<span slot="heading" variant="section">Account type</span>
|
|
30
33
|
<text-ui slot="description" color="subtle">We'll show the fields you need based on this</text-ui>
|
|
@@ -68,7 +71,10 @@
|
|
|
68
71
|
<p data-note>Single input that opens a `menu-ui` of suggestions as the user types. Each suggestion shows the formatted address with the matched portion highlighted. Selecting a suggestion fills the structured fields below; clicking "Enter manually" reveals the structured fields directly.</p>
|
|
69
72
|
<div data-artifact-container>
|
|
70
73
|
<div data-artifact-item data-artifact-label="address autocomplete">
|
|
71
|
-
<card-ui data-chunk="forms-address-autocomplete"
|
|
74
|
+
<card-ui data-chunk="forms-address-autocomplete" data-chunk-kind="block"
|
|
75
|
+
data-chunk-domain="forms"
|
|
76
|
+
data-chunk-description="Address autocomplete card — search-address input with map-pin icon and a suggestions dropdown of matching addresses, plus an enter-manually escape hatch."
|
|
77
|
+
data-chunk-keywords="address autocomplete search suggestions dropdown billing street map-pin manual lookup typeahead form" style="max-width: 560px;">
|
|
72
78
|
<header>
|
|
73
79
|
<span slot="heading" variant="section">Billing address</span>
|
|
74
80
|
</header>
|
|
@@ -121,7 +127,10 @@
|
|
|
121
127
|
<p data-note>After a suggestion is picked (or the user chose "Enter manually"), the structured fields appear, prefilled. The user can correct any line. Country drives the field set — US postal codes are different shape from CA, UK, etc.</p>
|
|
122
128
|
<div data-artifact-container>
|
|
123
129
|
<div data-artifact-item data-artifact-label="resolved address fields">
|
|
124
|
-
<card-ui data-chunk="forms-address-fields"
|
|
130
|
+
<card-ui data-chunk="forms-address-fields" data-chunk-kind="block"
|
|
131
|
+
data-chunk-domain="forms"
|
|
132
|
+
data-chunk-description="Expanded address fields card — street, apt/suite, city, state and ZIP in a proper field layout after autocomplete, with a Search-again header action."
|
|
133
|
+
data-chunk-keywords="address fields street apt suite city state zip postal form expanded manual billing shipping layout" style="max-width: 560px;">
|
|
125
134
|
<header>
|
|
126
135
|
<span slot="heading" variant="section">Address details</span>
|
|
127
136
|
<button-ui slot="action" text="Search again" variant="ghost" size="sm" icon-leading="arrow-counter-clockwise"></button-ui>
|
|
@@ -21,7 +21,10 @@
|
|
|
21
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
22
|
<icon-ui name="file-text" size="sm"></icon-ui>
|
|
23
23
|
<text-ui strong style="flex: 1;">Q4-budget-draft.xlsx</text-ui>
|
|
24
|
-
<popover-ui data-chunk="inline-dialog-rename"
|
|
24
|
+
<popover-ui data-chunk="inline-dialog-rename" data-chunk-kind="block"
|
|
25
|
+
data-chunk-domain="overlay"
|
|
26
|
+
data-chunk-description="Inline rename popover — a Rename trigger opens an anchored mini-dialog card with a new-name input and Cancel / Save actions; no modal needed for a one-field edit."
|
|
27
|
+
data-chunk-keywords="inline dialog rename popover anchored file name input save cancel mini one-field edit quick" placement="bottom-start">
|
|
25
28
|
<button-ui slot="trigger" text="Rename" variant="ghost" size="sm" icon-leading="pencil-simple"></button-ui>
|
|
26
29
|
<card-ui slot="content" style="min-width: 320px;">
|
|
27
30
|
<header>
|
|
@@ -50,7 +53,10 @@
|
|
|
50
53
|
<div data-artifact-item data-artifact-label="status picker dialog">
|
|
51
54
|
<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
55
|
<text-ui strong style="flex: 1;">PR #3247 — Add cursor pagination</text-ui>
|
|
53
|
-
<popover-ui data-chunk="inline-dialog-status"
|
|
56
|
+
<popover-ui data-chunk="inline-dialog-status" data-chunk-kind="block"
|
|
57
|
+
data-chunk-domain="overlay"
|
|
58
|
+
data-chunk-description="Status-change popover — the current status tag is the trigger; the anchored card offers the status options with descriptions and an optional note field."
|
|
59
|
+
data-chunk-keywords="inline dialog status change popover anchored tag trigger options workflow state transition note quick" placement="bottom-start">
|
|
54
60
|
<button-ui slot="trigger" variant="outline" size="sm">
|
|
55
61
|
<tag-ui slot="leading" size="sm" variant="warning">In review</tag-ui>
|
|
56
62
|
<icon-ui slot="trailing" name="caret-down" size="sm"></icon-ui>
|
|
@@ -92,7 +98,10 @@
|
|
|
92
98
|
<div data-artifact-item data-artifact-label="schedule send dialog">
|
|
93
99
|
<row-ui gap="0" align="center" style="padding: var(--a-space-4); background: var(--md-sys-color-neutral-background);">
|
|
94
100
|
<button-ui text="Send now" variant="primary" size="sm"></button-ui>
|
|
95
|
-
<popover-ui data-chunk="inline-dialog-schedule"
|
|
101
|
+
<popover-ui data-chunk="inline-dialog-schedule" data-chunk-kind="block"
|
|
102
|
+
data-chunk-domain="overlay"
|
|
103
|
+
data-chunk-description="Schedule-send popover — split-button caret opens an anchored card with date and time fields (timezone-aware hint) and a Schedule action."
|
|
104
|
+
data-chunk-keywords="inline dialog schedule send popover date time timezone split-button email later anchored quick" placement="bottom-start">
|
|
96
105
|
<button-ui slot="trigger" icon="caret-down" variant="primary" size="sm" aria-label="More send options"></button-ui>
|
|
97
106
|
<card-ui slot="content" style="min-width: 320px;">
|
|
98
107
|
<header>
|
|
@@ -24,7 +24,10 @@
|
|
|
24
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
25
|
<div data-artifact-container>
|
|
26
26
|
<div data-artifact-item data-artifact-label="sortable list">
|
|
27
|
-
<card-ui data-chunk="sortable-list"
|
|
27
|
+
<card-ui data-chunk="sortable-list" data-chunk-kind="block"
|
|
28
|
+
data-chunk-domain="data"
|
|
29
|
+
data-chunk-description="Sortable priority list card — 'Sprint priority' rows with drag handles, rank numbers, task titles and tags; drag to reorder."
|
|
30
|
+
data-chunk-keywords="sortable list drag reorder priority sprint rank handle tasks order manual arrange backlog" style="max-width: 560px;">
|
|
28
31
|
<header>
|
|
29
32
|
<span slot="heading" variant="section">Sprint priority</span>
|
|
30
33
|
<text-ui slot="description" color="subtle">Drag to reorder · 4 items</text-ui>
|