@adia-ai/web-components 0.0.16 → 0.0.18
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/components/drawer/drawer.css +13 -6
- package/components/index.js +1 -0
- package/components/input/input.css +10 -1
- package/components/noodles/noodles.js +19 -5
- package/components/option-card/option-card.css +5 -1
- package/components/segment/segment.css +12 -0
- package/components/select/select.css +6 -2
- package/components/table-toolbar/table-toolbar.a2ui.json +212 -0
- package/components/table-toolbar/table-toolbar.css +269 -0
- package/components/table-toolbar/table-toolbar.js +565 -0
- package/components/table-toolbar/table-toolbar.yaml +160 -0
- package/package.json +1 -1
- package/patterns/app-nav-group/app-nav-group.css +2 -2
- package/patterns/app-shell/css/app-shell.tokens.css +5 -1
- package/patterns/section-nav/section-nav.css +4 -3
- package/styles/colors/semantics.css +3 -3
- package/styles/components.css +1 -0
- package/styles/typography.css +3 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
|
+
name: AdiaTableToolbar
|
|
3
|
+
tag: table-toolbar-ui
|
|
4
|
+
component: TableToolbar
|
|
5
|
+
category: agent
|
|
6
|
+
version: 1
|
|
7
|
+
description: >-
|
|
8
|
+
Header / companion bar for a sibling table-ui. Renders title + count badge,
|
|
9
|
+
filter / sort / columns popovers, and a search input — all wired to the
|
|
10
|
+
target table via an [for] id-ref. Modeled on chart-legend-ui's [for] binding
|
|
11
|
+
pattern. Drop next to (or above) any table-ui to add the standard data-grid
|
|
12
|
+
toolbar without re-implementing search, filter, sort, or column visibility.
|
|
13
|
+
props:
|
|
14
|
+
for:
|
|
15
|
+
description: id-ref of the table-ui to control. Falls back to the first sibling table-ui within the same parent when omitted.
|
|
16
|
+
type: string
|
|
17
|
+
default: ""
|
|
18
|
+
reflect: true
|
|
19
|
+
text:
|
|
20
|
+
description: Title text shown on the left. Alternative to slotted heading content.
|
|
21
|
+
type: string
|
|
22
|
+
default: ""
|
|
23
|
+
count:
|
|
24
|
+
description: Optional count badge value shown next to the title. When unset, falls back to the row count of the bound table.
|
|
25
|
+
type: string
|
|
26
|
+
default: ""
|
|
27
|
+
filterable:
|
|
28
|
+
description: Show the Filter popover button.
|
|
29
|
+
type: boolean
|
|
30
|
+
default: true
|
|
31
|
+
reflect: true
|
|
32
|
+
sortable:
|
|
33
|
+
description: Show the Sort popover button.
|
|
34
|
+
type: boolean
|
|
35
|
+
default: true
|
|
36
|
+
reflect: true
|
|
37
|
+
columns:
|
|
38
|
+
description: Show the Columns visibility popover button.
|
|
39
|
+
type: boolean
|
|
40
|
+
default: true
|
|
41
|
+
reflect: true
|
|
42
|
+
searchable:
|
|
43
|
+
description: Show the search input.
|
|
44
|
+
type: boolean
|
|
45
|
+
default: true
|
|
46
|
+
reflect: true
|
|
47
|
+
placeholder:
|
|
48
|
+
description: Placeholder text for the search input.
|
|
49
|
+
type: string
|
|
50
|
+
default: Search...
|
|
51
|
+
variant:
|
|
52
|
+
description: Toolbar visual variant. `default` renders bare on parent surface; `card` adds the same chrome as a card-ui header.
|
|
53
|
+
type: string
|
|
54
|
+
default: default
|
|
55
|
+
enum:
|
|
56
|
+
- default
|
|
57
|
+
- card
|
|
58
|
+
reflect: true
|
|
59
|
+
events:
|
|
60
|
+
search:
|
|
61
|
+
description: "Debounced search query change. Detail: { value }."
|
|
62
|
+
filter-change:
|
|
63
|
+
description: "Filter set changed. Detail: { filters }."
|
|
64
|
+
sort-change:
|
|
65
|
+
description: "Sort state changed. Detail: { sortState }."
|
|
66
|
+
columns-change:
|
|
67
|
+
description: "Column visibility changed. Detail: { hiddenColumns }."
|
|
68
|
+
slots:
|
|
69
|
+
default:
|
|
70
|
+
description: Optional title content. Used when [text] is empty.
|
|
71
|
+
actions:
|
|
72
|
+
description: Trailing action area — primary buttons (e.g. "New row") rendered after the search input.
|
|
73
|
+
states:
|
|
74
|
+
- name: idle
|
|
75
|
+
description: Default, ready for interaction.
|
|
76
|
+
traits: []
|
|
77
|
+
tokens:
|
|
78
|
+
--table-toolbar-gap:
|
|
79
|
+
description: Gap between toolbar clusters
|
|
80
|
+
--table-toolbar-py:
|
|
81
|
+
description: Vertical padding
|
|
82
|
+
--table-toolbar-px:
|
|
83
|
+
description: Horizontal padding
|
|
84
|
+
--table-toolbar-bg:
|
|
85
|
+
description: Toolbar background (variant=card)
|
|
86
|
+
--table-toolbar-border:
|
|
87
|
+
description: Toolbar border color (variant=card)
|
|
88
|
+
--table-toolbar-radius:
|
|
89
|
+
description: Toolbar corner radius (variant=card)
|
|
90
|
+
--table-toolbar-title-fg:
|
|
91
|
+
description: Title text color
|
|
92
|
+
--table-toolbar-title-size:
|
|
93
|
+
description: Title font size
|
|
94
|
+
--table-toolbar-title-weight:
|
|
95
|
+
description: Title font weight
|
|
96
|
+
--table-toolbar-popover-bg:
|
|
97
|
+
description: Popover background
|
|
98
|
+
--table-toolbar-popover-fg:
|
|
99
|
+
description: Popover text color
|
|
100
|
+
--table-toolbar-popover-border:
|
|
101
|
+
description: Popover border
|
|
102
|
+
--table-toolbar-popover-radius:
|
|
103
|
+
description: Popover radius
|
|
104
|
+
--table-toolbar-popover-shadow:
|
|
105
|
+
description: Popover shadow
|
|
106
|
+
--table-toolbar-popover-pad:
|
|
107
|
+
description: Popover padding
|
|
108
|
+
--table-toolbar-popover-gap:
|
|
109
|
+
description: Popover content gap
|
|
110
|
+
--table-toolbar-popover-min:
|
|
111
|
+
description: Popover minimum width
|
|
112
|
+
a2ui:
|
|
113
|
+
rules: []
|
|
114
|
+
anti_patterns: []
|
|
115
|
+
examples:
|
|
116
|
+
- name: members-toolbar
|
|
117
|
+
description: Members table with filter/sort/columns/search wired to a sibling table-ui.
|
|
118
|
+
a2ui: >-
|
|
119
|
+
[
|
|
120
|
+
{"id": "root", "component": "Column", "gap": "3", "children": ["bar", "card"]},
|
|
121
|
+
{"id": "bar", "component": "TableToolbar", "for": "members", "text": "All Employees", "count": "32"},
|
|
122
|
+
{"id": "card", "component": "Card", "children": ["sec"]},
|
|
123
|
+
{"id": "sec", "component": "Section", "bleed": true, "children": ["tbl"]},
|
|
124
|
+
{"id": "tbl", "component": "Table", "id": "members", "sortable": true, "raw": true}
|
|
125
|
+
]
|
|
126
|
+
keywords:
|
|
127
|
+
- table-toolbar
|
|
128
|
+
- data-grid
|
|
129
|
+
- data-grid-toolbar
|
|
130
|
+
- filter
|
|
131
|
+
- sort
|
|
132
|
+
- columns
|
|
133
|
+
- search
|
|
134
|
+
- directory
|
|
135
|
+
- admin
|
|
136
|
+
- backoffice
|
|
137
|
+
- listing
|
|
138
|
+
- records
|
|
139
|
+
synonyms:
|
|
140
|
+
data-grid:
|
|
141
|
+
- table-toolbar
|
|
142
|
+
- table
|
|
143
|
+
data-grid-toolbar:
|
|
144
|
+
- table-toolbar
|
|
145
|
+
- table
|
|
146
|
+
filter:
|
|
147
|
+
- table-toolbar
|
|
148
|
+
- table
|
|
149
|
+
sort:
|
|
150
|
+
- table-toolbar
|
|
151
|
+
- table
|
|
152
|
+
columns:
|
|
153
|
+
- table-toolbar
|
|
154
|
+
- table
|
|
155
|
+
related:
|
|
156
|
+
- table
|
|
157
|
+
- search
|
|
158
|
+
- button
|
|
159
|
+
- badge
|
|
160
|
+
- popover
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/web-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-utils.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -208,7 +208,7 @@ app-nav-group-ui [slot="popover"] {
|
|
|
208
208
|
margin: 0;
|
|
209
209
|
padding: var(--a-space-1);
|
|
210
210
|
border: 1px solid var(--a-border-subtle);
|
|
211
|
-
border-radius: var(--a-radius
|
|
211
|
+
border-radius: var(--a-radius);
|
|
212
212
|
background: var(--a-bg-subtle);
|
|
213
213
|
box-shadow: var(--a-shadow-lg);
|
|
214
214
|
min-width: 160px;
|
|
@@ -228,7 +228,7 @@ app-nav-group-ui [slot="popover-label"] {
|
|
|
228
228
|
|
|
229
229
|
app-nav-group-ui [slot="popover"] [role="option"] {
|
|
230
230
|
padding: var(--a-space-1) var(--a-space-2);
|
|
231
|
-
border-radius: var(--a-radius
|
|
231
|
+
border-radius: var(--a-radius);
|
|
232
232
|
color: var(--a-fg-subtle);
|
|
233
233
|
cursor: pointer;
|
|
234
234
|
white-space: nowrap;
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
|
|
46
46
|
/* Section labels (e.g. "WORKSPACE") — maps to "kicker" typography role */
|
|
47
47
|
--page-section-gap: var(--a-space-6);
|
|
48
|
+
/* Within-section block rhythm (h2 / [data-note] / code-ui / artifact stack). */
|
|
49
|
+
--page-block-gap: var(--a-space-4);
|
|
50
|
+
/* h2 → immediately-following deck/subtitle pair (auto-stamped <header>). */
|
|
51
|
+
--page-deck-gap: var(--a-space-1);
|
|
48
52
|
--page-section-size: var(--a-kicker-size);
|
|
49
53
|
--page-section-weight: var(--a-kicker-weight);
|
|
50
54
|
--page-section-leading: var(--a-kicker-leading);
|
|
@@ -82,7 +86,7 @@
|
|
|
82
86
|
--nav-easing: var(--a-easing);
|
|
83
87
|
--nav-label-px: var(--a-space-2);
|
|
84
88
|
--nav-label-py: var(--a-space-1);
|
|
85
|
-
--nav-label-font-size: var(--a-
|
|
89
|
+
--nav-label-font-size: var(--a-kicker-sm);
|
|
86
90
|
--nav-label-weight: var(--a-weight-medium);
|
|
87
91
|
--nav-label-fg: var(--a-fg-muted);
|
|
88
92
|
--nav-divider-bg: var(--a-border-subtle);
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
--section-nav-font-size: var(--a-ui-size);
|
|
13
13
|
|
|
14
14
|
--section-nav-heading-fg: var(--a-fg-muted);
|
|
15
|
-
--section-nav-heading-size: var(--a-
|
|
15
|
+
--section-nav-heading-size: var(--a-kicker-sm);
|
|
16
16
|
--section-nav-heading-weight: var(--a-weight-medium);
|
|
17
17
|
--section-nav-heading-pad-x: var(--a-space-2);
|
|
18
|
-
--section-nav-heading-pad-y:
|
|
18
|
+
--section-nav-heading-pad-y: var(--a-space-3) var(--a-space-1);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:scope {
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
:scope[heading]:not([heading=""])::before {
|
|
48
48
|
content: attr(heading);
|
|
49
49
|
display: block;
|
|
50
|
-
padding: var(--section-nav-heading-pad-
|
|
50
|
+
padding-inline: var(--section-nav-heading-pad-x);
|
|
51
|
+
padding-block: var(--section-nav-heading-pad-y);
|
|
51
52
|
font-size: var(--section-nav-heading-size);
|
|
52
53
|
font-weight: var(--section-nav-heading-weight);
|
|
53
54
|
color: var(--section-nav-heading-fg);
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
--a-bg-subtle: var(--a-canvas-1);
|
|
106
106
|
--a-bg-muted: var(--a-canvas-2);
|
|
107
107
|
--a-bg-strong: var(--a-canvas-4);
|
|
108
|
-
--a-bg-hover: var(--a-canvas-
|
|
108
|
+
--a-bg-hover: var(--a-canvas-2);
|
|
109
109
|
--a-bg-active: var(--a-canvas-pressed);
|
|
110
110
|
--a-bg-selected: var(--a-canvas-0-scrim);
|
|
111
111
|
--a-bg-disabled: var(--a-canvas-muted);
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
--a-ui-bg: var(--a-canvas-0-scrim);
|
|
487
487
|
--a-ui-bg-hover: var(--a-canvas-2-scrim);
|
|
488
488
|
--a-ui-bg-active: var(--a-canvas-0);
|
|
489
|
-
--a-ui-bg-selected: var(--a-canvas-
|
|
489
|
+
--a-ui-bg-selected: var(--a-canvas-0-scrim);
|
|
490
490
|
--a-ui-bg-disabled: var(--a-canvas-1);
|
|
491
491
|
--a-ui-bg-invalid: var(--a-danger-muted);
|
|
492
492
|
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
--a-ui-text-hover: var(--a-fg-strong);
|
|
495
495
|
--a-ui-text-active: var(--a-fg-strong);
|
|
496
496
|
--a-ui-text-selected: var(--a-fg-strong);
|
|
497
|
-
--a-ui-text-placeholder: var(--a-fg-
|
|
497
|
+
--a-ui-text-placeholder: var(--a-fg-muted);
|
|
498
498
|
--a-ui-text-subtle: var(--a-fg-subtle);
|
|
499
499
|
--a-ui-text-muted: var(--a-fg-muted);
|
|
500
500
|
--a-ui-text-disabled: var(--a-fg-disabled);
|
package/styles/components.css
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
@import "../components/color-picker/color-picker.css";
|
|
40
40
|
@import "../components/noodles/noodles.css";
|
|
41
41
|
@import "../components/table/table.css";
|
|
42
|
+
@import "../components/table-toolbar/table-toolbar.css";
|
|
42
43
|
@import "../components/timeline/timeline.css";
|
|
43
44
|
@import "../components/upload/upload.css";
|
|
44
45
|
@import "../components/card/card.css";
|
package/styles/typography.css
CHANGED
|
@@ -193,9 +193,9 @@
|
|
|
193
193
|
/* kicker — short label above a title (eyebrow/overline) */
|
|
194
194
|
--a-kicker-family: var(--a-font-family-ui);
|
|
195
195
|
--a-kicker-weight: var(--a-weight-semibold);
|
|
196
|
-
--a-kicker-sm:
|
|
197
|
-
--a-kicker-md:
|
|
198
|
-
--a-kicker-lg:
|
|
196
|
+
--a-kicker-sm: 11px;
|
|
197
|
+
--a-kicker-md: 12px;
|
|
198
|
+
--a-kicker-lg: 13px;
|
|
199
199
|
--a-kicker-size: var(--a-kicker-md);
|
|
200
200
|
--a-kicker-leading: var(--a-font-leading-normal);
|
|
201
201
|
--a-kicker-tracking: var(--a-font-tracking-wider);
|