@adia-ai/web-components 0.8.36 → 0.8.38
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 +29 -0
- package/MIGRATION.md +248 -45
- package/README.md +3 -3
- package/bin/doc.mjs +27 -5
- package/components/card/card.css +1 -1
- package/components/drilldown/drilldown.a2ui.json +242 -0
- package/components/drilldown/drilldown.class.js +542 -0
- package/components/drilldown/drilldown.css +305 -0
- package/components/drilldown/drilldown.d.ts +68 -0
- package/components/drilldown/drilldown.examples.md +20 -0
- package/components/drilldown/drilldown.js +17 -0
- package/components/drilldown/drilldown.yaml +271 -0
- package/components/index.js +1 -0
- package/components/inspector/inspector.class.js +1 -1
- package/components/nav/nav.class.js +11 -8
- package/components/nav-item/nav-item.class.js +9 -6
- package/components/page/page.a2ui.json +13 -1
- package/components/page/page.css +113 -0
- package/components/page/page.yaml +30 -3
- package/components/table-toolbar/table-toolbar.examples.md +3 -3
- package/core/streams-bridge.d.ts +2 -2
- package/core/streams-bridge.js +1 -1
- package/custom-elements.json +183 -26
- package/dist/theme-provider.min.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +103 -84
- package/dist/web-components.sheet.js +1 -1
- package/package.json +3 -3
- package/patterns/admin-keys-and-export/admin-keys-and-export.examples.html +8 -8
- package/patterns/agent-cost/agent-cost.examples.html +3 -3
- package/patterns/agent-memory/agent-memory.examples.html +4 -4
- package/patterns/agent-prompt-library/agent-prompt-library.examples.html +8 -8
- package/patterns/approvals/approvals.examples.html +2 -2
- package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +1 -1
- package/patterns/changelog-feed/changelog-feed.examples.html +1 -1
- package/patterns/comments-and-collaboration/comments-and-collaboration.examples.html +7 -7
- package/patterns/data-tables-inline-edit-and-tree/data-tables-inline-edit-and-tree.examples.html +4 -4
- package/patterns/diff-review/diff-review.examples.html +6 -6
- package/patterns/filter-bar/filter-bar.examples.html +5 -5
- package/patterns/inline-dialog/inline-dialog.examples.html +1 -1
- package/patterns/kanban-board/kanban-board.examples.html +12 -12
- package/patterns/layout/layout.examples.html +3 -3
- package/patterns/marketing-engagement/marketing-engagement.examples.html +13 -13
- package/patterns/notifications-bell-and-digest/notifications-bell-and-digest.examples.html +1 -1
- package/patterns/permissions-matrix/permissions-matrix.examples.html +1 -1
- package/patterns/permissions-role-picker/permissions-role-picker.examples.html +1 -1
- package/patterns/permissions-sharing/permissions-sharing.examples.html +3 -3
- package/patterns/profile-public-and-verification/profile-public-and-verification.examples.html +2 -2
- package/patterns/search-discovery/search-discovery.examples.html +15 -15
- package/styles/components.css +1 -0
- package/styles/type/scale.css +2 -1
- package/traits/view-transition/view-transition.js +7 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Drilldown.json",
|
|
4
|
+
"title": "Drilldown",
|
|
5
|
+
"description": "Single-panel, multi-level drill-in menu. One list panel slides between\nlevels (a level header with back navigation replaces stacking a column\nper level) — for hierarchical data where miller columns don't fit the\nviewport (>2 levels, >12 top-level entries, or narrow layouts). Rows\ncompose a leading dot/icon, primary label, optional meta line, and\ntrailing row-native count chips (not full <badge-ui>, which reads\noversized at row density) — plus a drill-in chevron on branch items.\nSet `.items` to a tree of `{value, label, meta?, dot?, counts?, children?}`\nnodes; `children` may be an array (sync) or a function returning an\narray/Promise (lazy, fetched on drill-in — a loading level is shown via\n<skeleton-ui> while it resolves). Distinct from <tree-ui> (inline\nexpand/collapse — right for file-tree shapes, wrong for wide/deep data\nwhere the expanded tree becomes a wall of rows), <nav-ui> (flat app\nnavigation, not hierarchical drill-in), and <context-menu> (transient\npopover submenus, not a persistent content panel).\n",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"items": {
|
|
17
|
+
"description": "Root-level array of node objects: {value, label, meta?, dot?, counts?, children?, leaf?}. `value` is the stable id used in `path` and event details. `dot` names a semantic tone (info, success, warning, danger, primary, neutral) rendered as a small leading color swatch. `counts` is an array of {variant?, value} rendered as compact trailing chips. `children` is either an array of child nodes (resolved synchronously) or a function `(item) => array | Promise<array>` for lazy per-level fetch — a loading level renders while the promise is pending. `leaf: true` forces no drill chevron even when `children` is present (rare — normally omit `children` instead).",
|
|
18
|
+
"$ref": "common_types.json#/$defs/DynamicObjectList"
|
|
19
|
+
},
|
|
20
|
+
"component": {
|
|
21
|
+
"const": "Drilldown"
|
|
22
|
+
},
|
|
23
|
+
"filterable": {
|
|
24
|
+
"description": "Show a filter input pinned above the list, filtering the current level's rows by label/meta.",
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"default": false
|
|
27
|
+
},
|
|
28
|
+
"path": {
|
|
29
|
+
"description": "Current drilled-in level, as an array of ancestor item `value`s (root = `[]`). Setting `.path` restores directly to that nested level without animating through every intermediate level — the deep-link/URL-restore path. Hand-managed (not the generic `reflect:` mechanism, which can't JSON-encode arrays) — it still genuinely reflects to a JSON-encoded `path` attribute both ways (property → attribute and attribute → property), unlike most array props on this kit.",
|
|
30
|
+
"$ref": "common_types.json#/$defs/DynamicStringList"
|
|
31
|
+
},
|
|
32
|
+
"placeholder": {
|
|
33
|
+
"description": "Placeholder text for the filter input (only rendered when `[filterable]`).",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "Filter…"
|
|
36
|
+
},
|
|
37
|
+
"rootLabel": {
|
|
38
|
+
"description": "Level-header title shown at the root level (depth 0). Empty by default (no title row).",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"default": ""
|
|
41
|
+
},
|
|
42
|
+
"selectOnDrill": {
|
|
43
|
+
"description": "When true, clicking/activating a branch item (one with children) BOTH fires `select` and drills into it — the Schema Manager shape, where picking a namespace is both a selection and a navigation. Default false: branch activation only drills in; only leaf activation fires `select`.",
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
"static": {
|
|
48
|
+
"description": "Suppress the horizontal slide transition between levels — instant swap. Also honored automatically under `prefers-reduced-motion: reduce`.",
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": false
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"component"
|
|
55
|
+
],
|
|
56
|
+
"unevaluatedProperties": false,
|
|
57
|
+
"x-adiaui": {
|
|
58
|
+
"anti_patterns": [],
|
|
59
|
+
"category": "navigation",
|
|
60
|
+
"composes": [
|
|
61
|
+
"icon-ui",
|
|
62
|
+
"skeleton-ui",
|
|
63
|
+
"empty-state-ui"
|
|
64
|
+
],
|
|
65
|
+
"events": {
|
|
66
|
+
"navigate": {
|
|
67
|
+
"description": "Fired whenever the shown level changes — drill-in, back, breadcrumb jump, or a programmatic `.path` assignment. detail: { path }. Hosts mirror this to the URL instead of listening to `select`.\n",
|
|
68
|
+
"detail": {
|
|
69
|
+
"path": {
|
|
70
|
+
"description": "The newly-shown level's ancestor value chain.",
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"select": {
|
|
79
|
+
"description": "Fired when a leaf item is activated (click/Enter), or when a branch item is activated with `[select-on-drill]` set. detail: { path, item }. `path` is the drilled-in level the item lives at (the current `.path` at the time of activation); `item` is the raw node object.\n",
|
|
80
|
+
"detail": {
|
|
81
|
+
"item": {
|
|
82
|
+
"description": "The activated node object.",
|
|
83
|
+
"type": "object"
|
|
84
|
+
},
|
|
85
|
+
"path": {
|
|
86
|
+
"description": "Ancestor value chain the selected item lives at.",
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"examples": [
|
|
96
|
+
{
|
|
97
|
+
"description": "Basic Drilldown usage",
|
|
98
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"Drilldown\"\n }\n]",
|
|
99
|
+
"name": "basic-drilldown"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"keywords": [
|
|
103
|
+
"drilldown",
|
|
104
|
+
"drill-down",
|
|
105
|
+
"miller",
|
|
106
|
+
"miller-columns",
|
|
107
|
+
"namespace",
|
|
108
|
+
"hierarchy",
|
|
109
|
+
"navigator",
|
|
110
|
+
"catalog-browser"
|
|
111
|
+
],
|
|
112
|
+
"name": "UIDrilldown",
|
|
113
|
+
"related": [
|
|
114
|
+
"Tree",
|
|
115
|
+
"List",
|
|
116
|
+
"Nav",
|
|
117
|
+
"Breadcrumb",
|
|
118
|
+
"Menu"
|
|
119
|
+
],
|
|
120
|
+
"slots": {
|
|
121
|
+
"title": {
|
|
122
|
+
"description": "Auto-stamped title cluster (current-level label + item count) inside the header."
|
|
123
|
+
},
|
|
124
|
+
"back": {
|
|
125
|
+
"description": "Auto-stamped back-affordance <button> (chevron + parent-level label). Hidden at the root level."
|
|
126
|
+
},
|
|
127
|
+
"breadcrumb": {
|
|
128
|
+
"description": "Optional slot for a consumer-supplied <breadcrumb-ui> in the level header, for deep hierarchies. Not managed by drilldown-ui — the consumer wires jump clicks to `.path = [...]` itself."
|
|
129
|
+
},
|
|
130
|
+
"counts": {
|
|
131
|
+
"description": "Auto-stamped per-row trailing count-chip cluster, rendered when the row's data item declares `counts`."
|
|
132
|
+
},
|
|
133
|
+
"dot": {
|
|
134
|
+
"description": "Auto-stamped per-row leading color swatch, rendered when the row's data item declares a `dot` tone."
|
|
135
|
+
},
|
|
136
|
+
"filter": {
|
|
137
|
+
"description": "Auto-stamped filter-input row, shown only when `[filterable]` is set."
|
|
138
|
+
},
|
|
139
|
+
"header": {
|
|
140
|
+
"description": "Auto-stamped level-header container (back affordance + breadcrumb + title/count). Structural — not consumer-overridable."
|
|
141
|
+
},
|
|
142
|
+
"main": {
|
|
143
|
+
"description": "Auto-stamped per-row content column (label + optional meta line)."
|
|
144
|
+
},
|
|
145
|
+
"meta": {
|
|
146
|
+
"description": "Auto-stamped per-row secondary meta line, rendered when the row's data item declares `meta`."
|
|
147
|
+
},
|
|
148
|
+
"viewport": {
|
|
149
|
+
"description": "Auto-stamped clipping container for the current level's panel (hosts the slide-transition overflow clip)."
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"states": [
|
|
153
|
+
{
|
|
154
|
+
"description": "Default, ready for interaction.",
|
|
155
|
+
"name": "idle"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"description": "A lazy level's children are being resolved (async `children` function pending).",
|
|
159
|
+
"name": "loading"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"description": "The current level has no items.",
|
|
163
|
+
"name": "empty"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"status": "beta",
|
|
167
|
+
"synonyms": {
|
|
168
|
+
"hierarchy": [
|
|
169
|
+
"tree",
|
|
170
|
+
"nav",
|
|
171
|
+
"drilldown"
|
|
172
|
+
],
|
|
173
|
+
"miller": [
|
|
174
|
+
"drilldown",
|
|
175
|
+
"tree",
|
|
176
|
+
"column"
|
|
177
|
+
],
|
|
178
|
+
"navigator": [
|
|
179
|
+
"tree",
|
|
180
|
+
"nav",
|
|
181
|
+
"drilldown",
|
|
182
|
+
"sidebar"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"tag": "drilldown-ui",
|
|
186
|
+
"tokens": {
|
|
187
|
+
"--drilldown-bg-active": {
|
|
188
|
+
"description": "Row background when focused/active (roving tabindex)."
|
|
189
|
+
},
|
|
190
|
+
"--drilldown-bg-hover": {
|
|
191
|
+
"description": "Row background on hover."
|
|
192
|
+
},
|
|
193
|
+
"--drilldown-count-chip-font-size": {
|
|
194
|
+
"description": "Font size of a trailing count chip."
|
|
195
|
+
},
|
|
196
|
+
"--drilldown-count-chip-px": {
|
|
197
|
+
"description": "Inline padding of a trailing count chip."
|
|
198
|
+
},
|
|
199
|
+
"--drilldown-count-chip-radius": {
|
|
200
|
+
"description": "Border radius of a trailing count chip."
|
|
201
|
+
},
|
|
202
|
+
"--drilldown-dot-size": {
|
|
203
|
+
"description": "Diameter of the leading color dot."
|
|
204
|
+
},
|
|
205
|
+
"--drilldown-duration": {
|
|
206
|
+
"description": "Slide-transition duration."
|
|
207
|
+
},
|
|
208
|
+
"--drilldown-easing": {
|
|
209
|
+
"description": "Slide-transition easing function."
|
|
210
|
+
},
|
|
211
|
+
"--drilldown-fg": {
|
|
212
|
+
"description": "Primary row text color."
|
|
213
|
+
},
|
|
214
|
+
"--drilldown-fg-muted": {
|
|
215
|
+
"description": "Muted text color (meta line, chevron, back affordance)."
|
|
216
|
+
},
|
|
217
|
+
"--drilldown-focus-ring": {
|
|
218
|
+
"description": "Focus ring box-shadow for rows and the back button."
|
|
219
|
+
},
|
|
220
|
+
"--drilldown-header-px": {
|
|
221
|
+
"description": "Inline padding of the level header."
|
|
222
|
+
},
|
|
223
|
+
"--drilldown-header-py": {
|
|
224
|
+
"description": "Block padding of the level header."
|
|
225
|
+
},
|
|
226
|
+
"--drilldown-row-gap": {
|
|
227
|
+
"description": "Gap between row elements (dot / main / counts / chevron)."
|
|
228
|
+
},
|
|
229
|
+
"--drilldown-row-height": {
|
|
230
|
+
"description": "Height of each row."
|
|
231
|
+
},
|
|
232
|
+
"--drilldown-row-px": {
|
|
233
|
+
"description": "Inline padding of each row."
|
|
234
|
+
},
|
|
235
|
+
"--drilldown-row-radius": {
|
|
236
|
+
"description": "Border radius of each row."
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"traits": [],
|
|
240
|
+
"version": 1
|
|
241
|
+
}
|
|
242
|
+
}
|