@adia-ai/web-components 0.0.29 → 0.0.33
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/accordion/accordion.a2ui.json +1 -1
- package/components/accordion/accordion.js +6 -6
- package/components/accordion/accordion.yaml +1 -1
- package/components/action-list/action-list.a2ui.json +1 -1
- package/components/action-list/action-list.js +6 -6
- package/components/action-list/action-list.yaml +1 -1
- package/components/agent-artifact/agent-artifact.a2ui.json +1 -1
- package/components/agent-artifact/agent-artifact.js +4 -4
- package/components/agent-artifact/agent-artifact.yaml +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.js +4 -4
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +1 -1
- package/components/agent-questions/agent-questions.a2ui.json +1 -1
- package/components/agent-questions/agent-questions.js +4 -4
- package/components/agent-questions/agent-questions.yaml +1 -1
- package/components/agent-reasoning/agent-reasoning.a2ui.json +3 -3
- package/components/agent-reasoning/agent-reasoning.js +4 -4
- package/components/agent-reasoning/agent-reasoning.yaml +3 -3
- package/components/agent-suggestions/agent-suggestions.a2ui.json +1 -1
- package/components/agent-suggestions/agent-suggestions.js +4 -4
- package/components/agent-suggestions/agent-suggestions.yaml +1 -1
- package/components/agent-trace/agent-trace.a2ui.json +1 -1
- package/components/agent-trace/agent-trace.js +4 -4
- package/components/agent-trace/agent-trace.yaml +1 -1
- package/components/alert/alert.a2ui.json +1 -1
- package/components/alert/alert.js +4 -4
- package/components/alert/alert.yaml +1 -1
- package/components/aside/aside.a2ui.json +1 -1
- package/components/aside/aside.yaml +1 -1
- package/components/avatar/avatar.a2ui.json +1 -1
- package/components/avatar/avatar.js +8 -8
- package/components/avatar/avatar.yaml +1 -1
- package/components/badge/badge.a2ui.json +1 -1
- package/components/badge/badge.js +4 -4
- package/components/badge/badge.yaml +1 -1
- package/components/block/block.a2ui.json +1 -1
- package/components/block/block.js +4 -4
- package/components/block/block.yaml +1 -1
- package/components/breadcrumb/breadcrumb.a2ui.json +1 -1
- package/components/breadcrumb/breadcrumb.js +4 -4
- package/components/breadcrumb/breadcrumb.yaml +1 -1
- package/components/button/button.a2ui.json +1 -1
- package/components/button/button.js +4 -4
- package/components/button/button.yaml +1 -1
- package/components/calendar-picker/calendar-picker.a2ui.json +1 -1
- package/components/calendar-picker/calendar-picker.js +6 -6
- package/components/calendar-picker/calendar-picker.yaml +1 -1
- package/components/canvas/canvas.a2ui.json +1 -1
- package/components/canvas/canvas.js +4 -4
- package/components/canvas/canvas.yaml +1 -1
- package/components/card/card.a2ui.json +1 -1
- package/components/card/card.js +4 -4
- package/components/card/card.yaml +1 -1
- package/components/chart/chart.a2ui.json +1 -1
- package/components/chart/chart.js +5 -5
- package/components/chart/chart.yaml +1 -1
- package/components/chart-legend/chart-legend.a2ui.json +1 -1
- package/components/chart-legend/chart-legend.js +7 -7
- package/components/chart-legend/chart-legend.yaml +1 -1
- package/components/{chat → chat-thread}/chat-input.js +5 -5
- package/components/{chat/chat.a2ui.json → chat-thread/chat-thread.a2ui.json} +6 -6
- package/components/{chat/chat.css → chat-thread/chat-thread.css} +2 -2
- package/components/{chat/chat.js → chat-thread/chat-thread.js} +7 -7
- package/components/{chat/chat.yaml → chat-thread/chat-thread.yaml} +4 -4
- package/components/check/check.a2ui.json +1 -1
- package/components/check/check.js +5 -5
- package/components/check/check.yaml +1 -1
- package/components/code/code.a2ui.json +1 -1
- package/components/code/code.js +4 -4
- package/components/code/code.yaml +1 -1
- package/components/col/col.a2ui.json +1 -1
- package/components/col/col.js +4 -4
- package/components/col/col.yaml +1 -1
- package/components/color-picker/color-picker.a2ui.json +1 -1
- package/components/color-picker/color-picker.js +6 -6
- package/components/color-picker/color-picker.yaml +1 -1
- package/components/command/command.a2ui.json +1 -1
- package/components/command/command.js +5 -5
- package/components/command/command.yaml +1 -1
- package/components/description-list/description-list.a2ui.json +1 -1
- package/components/description-list/description-list.js +4 -4
- package/components/description-list/description-list.yaml +1 -1
- package/components/divider/divider.a2ui.json +1 -1
- package/components/divider/divider.js +4 -4
- package/components/divider/divider.yaml +1 -1
- package/components/drawer/drawer.a2ui.json +1 -1
- package/components/drawer/drawer.js +4 -4
- package/components/drawer/drawer.yaml +1 -1
- package/components/embed/embed.a2ui.json +1 -1
- package/components/embed/embed.js +4 -4
- package/components/embed/embed.yaml +1 -1
- package/components/empty-state/empty-state.a2ui.json +1 -1
- package/components/empty-state/empty-state.js +4 -4
- package/components/empty-state/empty-state.yaml +1 -1
- package/components/feed/feed-item.yaml +2 -2
- package/components/feed/feed.a2ui.json +2 -2
- package/components/feed/feed.css +12 -3
- package/components/feed/feed.js +22 -22
- package/components/feed/feed.yaml +2 -2
- package/components/field/field.a2ui.json +1 -1
- package/components/field/field.js +10 -10
- package/components/field/field.yaml +2 -2
- package/components/footer/footer.a2ui.json +1 -1
- package/components/footer/footer.yaml +1 -1
- package/components/grid/grid.a2ui.json +1 -1
- package/components/grid/grid.js +4 -4
- package/components/grid/grid.yaml +1 -1
- package/components/header/header.a2ui.json +1 -1
- package/components/header/header.yaml +1 -1
- package/components/heatmap/heatmap.a2ui.json +1 -1
- package/components/heatmap/heatmap.js +4 -4
- package/components/heatmap/heatmap.yaml +1 -1
- package/components/icon/icon.a2ui.json +1 -1
- package/components/icon/icon.js +4 -4
- package/components/icon/icon.yaml +1 -1
- package/components/image/image.a2ui.json +1 -1
- package/components/image/image.js +4 -4
- package/components/image/image.yaml +1 -1
- package/components/index.js +88 -85
- package/components/input/input.a2ui.json +1 -1
- package/components/input/input.js +7 -7
- package/components/input/input.yaml +1 -1
- package/components/inspector/inspector.a2ui.json +1 -1
- package/components/inspector/inspector.js +4 -4
- package/components/inspector/inspector.yaml +1 -1
- package/components/kbd/kbd.a2ui.json +1 -1
- package/components/kbd/kbd.js +4 -4
- package/components/kbd/kbd.yaml +1 -1
- package/components/list/list.a2ui.json +1 -1
- package/components/list/list.js +6 -6
- package/components/list/list.yaml +1 -1
- package/components/menu/menu.a2ui.json +1 -1
- package/components/menu/menu.js +8 -8
- package/components/menu/menu.yaml +1 -1
- package/components/modal/modal.a2ui.json +1 -1
- package/components/modal/modal.js +4 -4
- package/components/modal/modal.yaml +1 -1
- package/components/nav/nav.a2ui.json +98 -0
- package/components/nav/nav.css +133 -0
- package/components/nav/nav.js +140 -0
- package/components/nav/nav.test.js +428 -0
- package/components/nav/nav.yaml +114 -0
- package/components/nav-group/nav-group.a2ui.json +100 -0
- package/components/nav-group/nav-group.css +317 -0
- package/components/nav-group/nav-group.js +142 -0
- package/components/nav-group/nav-group.yaml +69 -0
- package/components/nav-item/nav-item.a2ui.json +106 -0
- package/components/nav-item/nav-item.css +194 -0
- package/components/nav-item/nav-item.js +76 -0
- package/components/nav-item/nav-item.yaml +73 -0
- package/components/noodles/noodles.a2ui.json +1 -1
- package/components/noodles/noodles.js +4 -4
- package/components/noodles/noodles.yaml +1 -1
- package/components/option-card/option-card.a2ui.json +1 -1
- package/components/option-card/option-card.js +6 -6
- package/components/option-card/option-card.yaml +1 -1
- package/components/otp-input/otp-input.a2ui.json +1 -1
- package/components/otp-input/otp-input.js +5 -5
- package/components/otp-input/otp-input.yaml +1 -1
- package/components/page/page.a2ui.json +3 -3
- package/components/page/page.js +4 -4
- package/components/page/page.yaml +3 -3
- package/components/pagination/pagination.a2ui.json +1 -1
- package/components/pagination/pagination.js +4 -4
- package/components/pagination/pagination.yaml +1 -1
- package/components/pane/pane.a2ui.json +1 -1
- package/components/pane/pane.js +4 -4
- package/components/pane/pane.yaml +1 -1
- package/components/pipeline-status/pipeline-status.a2ui.json +1 -1
- package/components/pipeline-status/pipeline-status.js +4 -4
- package/components/pipeline-status/pipeline-status.yaml +1 -1
- package/components/popover/popover.a2ui.json +1 -1
- package/components/popover/popover.js +4 -4
- package/components/popover/popover.yaml +1 -1
- package/components/progress/progress.a2ui.json +1 -1
- package/components/progress/progress.js +4 -4
- package/components/progress/progress.yaml +1 -1
- package/components/progress-row/progress-row.a2ui.json +1 -1
- package/components/progress-row/progress-row.js +4 -4
- package/components/progress-row/progress-row.yaml +1 -1
- package/components/radio/radio.a2ui.json +1 -1
- package/components/radio/radio.js +5 -5
- package/components/radio/radio.yaml +1 -1
- package/components/range/range.a2ui.json +1 -1
- package/components/range/range.js +7 -7
- package/components/range/range.yaml +1 -1
- package/components/rating/rating.a2ui.json +1 -1
- package/components/rating/rating.js +6 -6
- package/components/rating/rating.yaml +1 -1
- package/components/richtext/richtext.a2ui.json +1 -1
- package/components/richtext/richtext.js +4 -4
- package/components/richtext/richtext.yaml +1 -1
- package/components/row/row.a2ui.json +1 -1
- package/components/row/row.js +4 -4
- package/components/row/row.yaml +1 -1
- package/components/search/search.a2ui.json +1 -1
- package/components/search/search.js +5 -5
- package/components/search/search.yaml +1 -1
- package/components/section/section.a2ui.json +1 -1
- package/components/section/section.yaml +1 -1
- package/components/segment/segment.a2ui.json +1 -1
- package/components/segment/segment.js +4 -4
- package/components/segment/segment.yaml +1 -1
- package/components/segmented/segmented.a2ui.json +1 -1
- package/components/segmented/segmented.css +6 -0
- package/components/segmented/segmented.js +7 -7
- package/components/segmented/segmented.yaml +1 -1
- package/components/select/select.a2ui.json +1 -1
- package/components/select/select.js +5 -5
- package/components/select/select.yaml +1 -1
- package/components/skeleton/skeleton.a2ui.json +1 -1
- package/components/skeleton/skeleton.js +4 -4
- package/components/skeleton/skeleton.yaml +1 -1
- package/components/slider/slider.a2ui.json +1 -1
- package/components/slider/slider.js +7 -7
- package/components/slider/slider.yaml +1 -1
- package/components/stack/stack.a2ui.json +1 -1
- package/components/stack/stack.js +4 -4
- package/components/stack/stack.yaml +1 -1
- package/components/stat/stat.a2ui.json +1 -1
- package/components/stat/stat.js +4 -4
- package/components/stat/stat.yaml +1 -1
- package/components/stepper/stepper.a2ui.json +1 -1
- package/components/stepper/stepper.js +6 -6
- package/components/stepper/stepper.yaml +1 -1
- package/components/stream/stream.a2ui.json +1 -1
- package/components/stream/stream.js +4 -4
- package/components/stream/stream.yaml +1 -1
- package/components/swatch/swatch.a2ui.json +1 -1
- package/components/swatch/swatch.js +4 -4
- package/components/swatch/swatch.yaml +1 -1
- package/components/swiper/swiper.a2ui.json +1 -1
- package/components/swiper/swiper.js +4 -4
- package/components/swiper/swiper.yaml +1 -1
- package/components/switch/switch.a2ui.json +1 -1
- package/components/switch/switch.js +5 -5
- package/components/switch/switch.yaml +1 -1
- package/components/table/table.a2ui.json +1 -1
- package/components/table/table.js +4 -4
- package/components/table/table.yaml +1 -1
- package/components/table-toolbar/table-toolbar.a2ui.json +1 -1
- package/components/table-toolbar/table-toolbar.js +4 -4
- package/components/table-toolbar/table-toolbar.yaml +1 -1
- package/components/tabs/tab.js +4 -4
- package/components/tabs/tabs.a2ui.json +1 -1
- package/components/tabs/tabs.js +5 -5
- package/components/tabs/tabs.yaml +1 -1
- package/components/tag/tag.a2ui.json +1 -1
- package/components/tag/tag.js +4 -4
- package/components/tag/tag.yaml +1 -1
- package/components/text/text.a2ui.json +1 -1
- package/components/text/text.js +4 -4
- package/components/text/text.yaml +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.js +5 -5
- package/components/textarea/textarea.yaml +1 -1
- package/components/timeline/timeline.a2ui.json +1 -1
- package/components/timeline/timeline.js +6 -6
- package/components/timeline/timeline.yaml +1 -1
- package/components/toast/toast.a2ui.json +1 -1
- package/components/toast/toast.js +18 -18
- package/components/toast/toast.yaml +1 -1
- package/components/toggle-group/toggle-group.a2ui.json +1 -1
- package/components/toggle-group/toggle-group.js +6 -6
- package/components/toggle-group/toggle-group.yaml +1 -1
- package/components/toolbar/toolbar.a2ui.json +1 -1
- package/components/toolbar/toolbar.js +6 -6
- package/components/toolbar/toolbar.yaml +1 -1
- package/components/tooltip/tooltip.a2ui.json +1 -1
- package/components/tooltip/tooltip.js +7 -7
- package/components/tooltip/tooltip.yaml +1 -1
- package/components/tree/tree.a2ui.json +1 -1
- package/components/tree/tree.js +6 -6
- package/components/tree/tree.yaml +1 -1
- package/components/upload/upload.a2ui.json +1 -1
- package/components/upload/upload.js +6 -6
- package/components/upload/upload.yaml +1 -1
- package/core/element.js +4 -4
- package/core/element.test.js +18 -18
- package/core/form.js +9 -9
- package/core/index.js +2 -2
- package/core/provider.js +7 -7
- package/core/template.js +1 -1
- package/index.css +1 -1
- package/index.js +10 -8
- package/package.json +1 -1
- package/styles/components.css +10 -6
- package/styles/resets.css +1 -1
- package/traits/define.js +2 -2
- /package/components/{chat → chat-thread}/chat-input.css +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* Safari 17.x bug: `:scope:hover` (Flavor A) and `:scope[selected]`
|
|
2
|
+
(Flavor B — attribute-removal restyle) both fail inside `@scope`.
|
|
3
|
+
Selectors moved out — custom props from `:where(:scope)` are still set
|
|
4
|
+
on the element via inheritance. Specificity (0,1,1 / 0,2,1) preserved.
|
|
5
|
+
Safari < 18 is below the §1 floor (ADR-0007); fix protects opt-in
|
|
6
|
+
consumers extending below the floor and is harmlessly redundant on
|
|
7
|
+
engines without the bug. */
|
|
8
|
+
nav-item-ui:hover {
|
|
9
|
+
background: var(--nav-item-bg-hover);
|
|
10
|
+
color: var(--nav-item-fg-hover);
|
|
11
|
+
}
|
|
12
|
+
nav-item-ui:hover [slot="icon"] {
|
|
13
|
+
color: var(--nav-item-fg-hover);
|
|
14
|
+
}
|
|
15
|
+
nav-item-ui[selected] {
|
|
16
|
+
background: var(--nav-item-bg-selected);
|
|
17
|
+
color: var(--nav-item-fg-selected);
|
|
18
|
+
font-weight: var(--nav-item-selected-weight);
|
|
19
|
+
}
|
|
20
|
+
nav-item-ui[selected] [slot="icon"] {
|
|
21
|
+
color: var(--nav-item-icon-fg-selected);
|
|
22
|
+
}
|
|
23
|
+
nav-item-ui[selected] [slot="icon"]:empty::before {
|
|
24
|
+
content: '';
|
|
25
|
+
width: 2px;
|
|
26
|
+
height: 1em;
|
|
27
|
+
border-radius: 1px;
|
|
28
|
+
background: var(--nav-item-accent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@scope (nav-item-ui) {
|
|
32
|
+
:where(:scope) {
|
|
33
|
+
--nav-item-accent: var(--a-accent);
|
|
34
|
+
--nav-item-row-height: var(--a-size);
|
|
35
|
+
--nav-item-row-height-sm: var(--a-size-sm);
|
|
36
|
+
--nav-item-row-height-lg: var(--a-size-lg);
|
|
37
|
+
--nav-item-row-px: var(--a-ui-px);
|
|
38
|
+
--nav-item-row-gap: var(--a-space-1);
|
|
39
|
+
--nav-item-row-radius: var(--a-radius-md);
|
|
40
|
+
--nav-item-font-size: var(--a-ui-size);
|
|
41
|
+
--nav-item-font-size-sm: var(--a-ui-sm);
|
|
42
|
+
--nav-item-font-size-lg: var(--a-ui-lg);
|
|
43
|
+
--nav-item-fg: var(--a-ui-text-subtle);
|
|
44
|
+
--nav-item-fg-hover: var(--a-ui-text-hover);
|
|
45
|
+
--nav-item-fg-selected: var(--a-ui-text-selected);
|
|
46
|
+
--nav-item-icon-fg: var(--a-ui-text-muted);
|
|
47
|
+
--nav-item-icon-fg-selected: var(--nav-item-accent);
|
|
48
|
+
--nav-item-bg-hover: var(--a-ui-bg-hover);
|
|
49
|
+
--nav-item-bg-selected: var(--a-ui-bg-selected);
|
|
50
|
+
--nav-item-icon-size: calc(var(--nav-item-row-height) - var(--a-space-2));
|
|
51
|
+
--nav-item-badge-size: var(--a-ui-sm);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:scope {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--nav-item-row-gap);
|
|
59
|
+
height: var(--nav-item-row-height);
|
|
60
|
+
padding: 0 var(--nav-item-row-px);
|
|
61
|
+
border-radius: var(--nav-item-row-radius);
|
|
62
|
+
font-size: var(--nav-item-font-size);
|
|
63
|
+
color: var(--nav-item-fg);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
user-select: none;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
transition:
|
|
68
|
+
background var(--nav-duration-fast) var(--nav-easing),
|
|
69
|
+
color var(--nav-duration-fast) var(--nav-easing);
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:scope:focus-visible {
|
|
74
|
+
background: var(--nav-item-bg-hover);
|
|
75
|
+
color: var(--nav-item-fg-hover);
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* :scope[selected] rules moved outside @scope — see Safari 17.x bug note at top. */
|
|
80
|
+
|
|
81
|
+
/* Icon slot — always present, reserves space even when empty */
|
|
82
|
+
[slot="icon"] {
|
|
83
|
+
width: var(--nav-item-icon-size);
|
|
84
|
+
height: var(--nav-item-icon-size);
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
color: var(--nav-item-icon-fg);
|
|
90
|
+
transition: color var(--nav-duration-fast) var(--nav-easing);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[slot="icon"] icon-ui {
|
|
94
|
+
--a-icon-size: calc(var(--nav-item-icon-font-size) + 2px);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Selected accent line on empty icon slot moved outside @scope — see Safari 17.x bug note at top. */
|
|
98
|
+
|
|
99
|
+
[slot="text"] {
|
|
100
|
+
flex: 1;
|
|
101
|
+
min-width: 0;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[slot="badge"] {
|
|
107
|
+
font-size: var(--nav-item-badge-size);
|
|
108
|
+
color: var(--nav-item-badge-fg);
|
|
109
|
+
background: var(--nav-item-badge-bg);
|
|
110
|
+
padding: 1px var(--nav-item-badge-px);
|
|
111
|
+
border-radius: var(--nav-item-badge-radius);
|
|
112
|
+
line-height: 1.4;
|
|
113
|
+
margin-inline-start: auto;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[slot="trailing"] {
|
|
117
|
+
margin-inline-start: auto;
|
|
118
|
+
font-size: var(--nav-item-trailing-font);
|
|
119
|
+
color: var(--nav-item-trailing-fg);
|
|
120
|
+
border: 1px solid var(--nav-item-trailing-border);
|
|
121
|
+
border-radius: var(--nav-item-trailing-radius);
|
|
122
|
+
padding: 0 var(--nav-item-trailing-px);
|
|
123
|
+
line-height: 1.6;
|
|
124
|
+
flex-shrink: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* ── Collapsed nav: hide text, badge, trailing ── */
|
|
128
|
+
nav-ui[collapsed] & [slot="text"],
|
|
129
|
+
nav-ui[collapsed] & [slot="badge"],
|
|
130
|
+
nav-ui[collapsed] & [slot="trailing"] {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
nav-ui[collapsed] & {
|
|
135
|
+
justify-content: center;
|
|
136
|
+
padding: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@container sidebar (max-width: 96px) {
|
|
140
|
+
[slot="text"], [slot="badge"], [slot="trailing"] {
|
|
141
|
+
display: none !important;
|
|
142
|
+
}
|
|
143
|
+
[slot="icon"] icon-ui {
|
|
144
|
+
--a-icon-size: 18px;
|
|
145
|
+
}
|
|
146
|
+
:scope {
|
|
147
|
+
justify-content: center;
|
|
148
|
+
padding: 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* ── Size variants ── */
|
|
153
|
+
:scope[size="sm"] {
|
|
154
|
+
--nav-item-row-height: var(--nav-item-row-height-sm);
|
|
155
|
+
--nav-item-font-size: var(--nav-item-font-size-sm);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:scope[size="lg"] {
|
|
159
|
+
--nav-item-row-height: var(--nav-item-row-height-lg);
|
|
160
|
+
--nav-item-font-size: var(--nav-item-font-size-lg);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* ── Section variant — items render flat (no icon space, no indent) ──
|
|
165
|
+
The prior <section-nav-item-ui> didn't reserve space for an absent icon
|
|
166
|
+
and used a left-edge accent bar for the selected state. Restore that
|
|
167
|
+
shape so subnav rails read as plain links rather than a primary-style
|
|
168
|
+
row with a hidden icon slot.
|
|
169
|
+
|
|
170
|
+
Two ways to enable: either
|
|
171
|
+
(a) `<nav-item-ui variant="section">` directly, or
|
|
172
|
+
(b) `<nav-ui variant="section"> … nav-item-ui` (cascade from parent).
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
nav-item-ui[variant="section"] [slot="icon"]:empty,
|
|
176
|
+
nav-ui[variant="section"] nav-item-ui:not([variant]) [slot="icon"]:empty {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* When an explicit icon IS present, keep it but at a smaller scale. */
|
|
181
|
+
nav-item-ui[variant="section"] [slot="icon"]:not(:empty),
|
|
182
|
+
nav-ui[variant="section"] nav-item-ui:not([variant]) [slot="icon"]:not(:empty) {
|
|
183
|
+
width: 1em;
|
|
184
|
+
height: 1em;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Selected indicator — section variant relies on the row-level
|
|
188
|
+
background fill + text color + medium weight (no left-edge bar,
|
|
189
|
+
no in-icon accent). Suppress the in-icon accent that the primary
|
|
190
|
+
variant paints into the empty icon slot. */
|
|
191
|
+
nav-item-ui[variant="section"][selected] [slot="icon"]:empty::before,
|
|
192
|
+
nav-ui[variant="section"] nav-item-ui:not([variant])[selected] [slot="icon"]:empty::before {
|
|
193
|
+
content: none;
|
|
194
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <nav-item-ui> — Single navigation link inside <nav-ui> (optionally
|
|
3
|
+
* nested under <nav-group-ui>). Consolidates the prior
|
|
4
|
+
* `app-nav-item-ui` + `section-nav-item-ui` per ADR-0015 § Nav consolidation.
|
|
5
|
+
*
|
|
6
|
+
* Supports icon, label, optional badge, selected/disabled state, and
|
|
7
|
+
* keyboard activation (Enter/Space). Selection is managed by the parent
|
|
8
|
+
* <nav-ui>; clicking or keyboard-activating an item calls nav.select(this)
|
|
9
|
+
* and dispatches `nav-select` (bubbles, detail: { item, text, value }).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { UIElement } from '../../core/element.js';
|
|
13
|
+
|
|
14
|
+
class UINavItem extends UIElement {
|
|
15
|
+
static properties = {
|
|
16
|
+
text: { type: String, default: '', reflect: true },
|
|
17
|
+
icon: { type: String, default: '', reflect: true },
|
|
18
|
+
value: { type: String, default: '', reflect: true },
|
|
19
|
+
badge: { type: String, default: '', reflect: true },
|
|
20
|
+
selected: { type: Boolean, default: false, reflect: true },
|
|
21
|
+
disabled: { type: Boolean, default: false, reflect: true },
|
|
22
|
+
variant: { type: String, default: '', reflect: true },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
static template = () => null;
|
|
26
|
+
|
|
27
|
+
#onClick = (e) => {
|
|
28
|
+
if (this.disabled) { e.preventDefault(); return; }
|
|
29
|
+
const parent = this.closest('nav-ui');
|
|
30
|
+
parent?.select?.(this);
|
|
31
|
+
this.dispatchEvent(new CustomEvent('nav-select', {
|
|
32
|
+
bubbles: true,
|
|
33
|
+
detail: { item: this, text: this.text, value: this.value },
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
#onKey = (e) => {
|
|
38
|
+
if (this.disabled) return;
|
|
39
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
this.#onClick(e);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
connected() {
|
|
46
|
+
this.setAttribute('role', 'link');
|
|
47
|
+
this.setAttribute('tabindex', this.disabled ? '-1' : '0');
|
|
48
|
+
|
|
49
|
+
if (!this.querySelector('[slot="text"]')) {
|
|
50
|
+
this.innerHTML = `
|
|
51
|
+
<span slot="icon">${this.icon ? `<icon-ui name="${this.icon}"></icon-ui>` : ''}</span>
|
|
52
|
+
<span slot="text">${this.text}</span>
|
|
53
|
+
${this.badge ? `<span slot="badge">${this.badge}</span>` : ''}
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
this.addEventListener('click', this.#onClick);
|
|
58
|
+
this.addEventListener('keydown', this.#onKey);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
render() {
|
|
62
|
+
const textEl = this.querySelector('[slot="text"]');
|
|
63
|
+
if (textEl) textEl.textContent = this.text;
|
|
64
|
+
this.setAttribute('tabindex', this.disabled ? '-1' : '0');
|
|
65
|
+
if (this.selected) this.setAttribute('aria-current', 'page');
|
|
66
|
+
else this.removeAttribute('aria-current');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
disconnected() {
|
|
70
|
+
this.removeEventListener('click', this.#onClick);
|
|
71
|
+
this.removeEventListener('keydown', this.#onKey);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
customElements.define('nav-item-ui', UINavItem);
|
|
76
|
+
export { UINavItem };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
2
|
+
name: UINavItem
|
|
3
|
+
tag: nav-item-ui
|
|
4
|
+
component: NavItem
|
|
5
|
+
category: layout
|
|
6
|
+
version: 1
|
|
7
|
+
description: |
|
|
8
|
+
Single navigation link inside <nav-ui> (optionally nested under
|
|
9
|
+
<nav-group-ui>). Consolidates the prior `app-nav-item-ui` +
|
|
10
|
+
`section-nav-item-ui` per ADR-0015 § Nav consolidation.
|
|
11
|
+
|
|
12
|
+
Supports icon, label, optional badge, selected/disabled state, and
|
|
13
|
+
keyboard activation (Enter/Space). Selection is managed by the parent
|
|
14
|
+
<nav-ui>; clicking or activating an item calls nav.select(this) and
|
|
15
|
+
bubbles a `nav-select` event.
|
|
16
|
+
|
|
17
|
+
props:
|
|
18
|
+
text:
|
|
19
|
+
type: string
|
|
20
|
+
default: ''
|
|
21
|
+
description: "Visible item label."
|
|
22
|
+
icon:
|
|
23
|
+
type: string
|
|
24
|
+
default: ''
|
|
25
|
+
description: "Optional leading icon name."
|
|
26
|
+
value:
|
|
27
|
+
type: string
|
|
28
|
+
default: ''
|
|
29
|
+
description: "Identifier — typically a route or anchor."
|
|
30
|
+
badge:
|
|
31
|
+
type: string
|
|
32
|
+
default: ''
|
|
33
|
+
description: "Optional trailing badge."
|
|
34
|
+
selected:
|
|
35
|
+
type: boolean
|
|
36
|
+
default: false
|
|
37
|
+
description: "Set by the parent <nav-ui>'s select() method."
|
|
38
|
+
disabled:
|
|
39
|
+
type: boolean
|
|
40
|
+
default: false
|
|
41
|
+
description: "Suppresses click/keyboard activation; greyed visually."
|
|
42
|
+
variant:
|
|
43
|
+
type: string
|
|
44
|
+
default: ''
|
|
45
|
+
enum: ['', section]
|
|
46
|
+
description: "Visual treatment. Default ('') renders as a primary-rail item (reserved icon space, in-icon selected accent). 'section' renders flat — no icon space when absent, left-edge accent bar for selected — matching the prior <section-nav-item-ui>. When the parent <nav-ui> carries variant=\"section\", this item inherits it via CSS cascade unless an explicit variant is set."
|
|
47
|
+
|
|
48
|
+
events:
|
|
49
|
+
nav-select:
|
|
50
|
+
description: "Bubbles when the item is activated. Detail: { item, text, value }."
|
|
51
|
+
|
|
52
|
+
slots:
|
|
53
|
+
default:
|
|
54
|
+
description: "Optional override of the default icon + text + badge stamping."
|
|
55
|
+
|
|
56
|
+
states:
|
|
57
|
+
- name: idle
|
|
58
|
+
description: Default.
|
|
59
|
+
- name: selected
|
|
60
|
+
description: aria-current=page.
|
|
61
|
+
- name: disabled
|
|
62
|
+
description: Suppressed activation.
|
|
63
|
+
|
|
64
|
+
traits: []
|
|
65
|
+
tokens: {}
|
|
66
|
+
a2ui:
|
|
67
|
+
rules: []
|
|
68
|
+
anti_patterns: []
|
|
69
|
+
examples: []
|
|
70
|
+
|
|
71
|
+
keywords: [nav, navigation, item, link, sidebar]
|
|
72
|
+
synonyms: {}
|
|
73
|
+
related: []
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* Supports bezier, step, and straight curve modes.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { UIElement } from '../../core/element.js';
|
|
14
14
|
|
|
15
15
|
let nextId = 0;
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class UINoodles extends UIElement {
|
|
18
18
|
static properties = {
|
|
19
19
|
editable: { type: Boolean, default: false, reflect: true },
|
|
20
20
|
color: { type: String, default: '', reflect: true },
|
|
@@ -496,6 +496,6 @@ class AdiaNoodles extends AdiaElement {
|
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
customElements.define('noodles-ui',
|
|
499
|
+
customElements.define('noodles-ui', UINoodles);
|
|
500
500
|
|
|
501
|
-
export {
|
|
501
|
+
export { UINoodles };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UINoodles
|
|
5
5
|
tag: noodles-ui
|
|
6
6
|
component: Noodles
|
|
7
7
|
category: agent
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
* </option-card-ui>
|
|
28
28
|
*
|
|
29
29
|
* Sibling navigation: arrow keys move focus and selection; Space/Enter
|
|
30
|
-
* select. Form-associated via
|
|
30
|
+
* select. Form-associated via UIFormElement, so `name=value` submits
|
|
31
31
|
* with the parent form when the card is checked.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
import {
|
|
34
|
+
import { UIFormElement } from '../../core/form.js';
|
|
35
35
|
|
|
36
|
-
class
|
|
36
|
+
class UIOptionCard extends UIFormElement {
|
|
37
37
|
static properties = {
|
|
38
|
-
...
|
|
38
|
+
...UIFormElement.properties,
|
|
39
39
|
checked: { type: Boolean, default: false, reflect: true },
|
|
40
40
|
heading: { type: String, default: '', reflect: true },
|
|
41
41
|
description: { type: String, default: '', reflect: true },
|
|
@@ -153,6 +153,6 @@ class AdiaOptionCard extends AdiaFormElement {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
customElements.define('option-card-ui',
|
|
156
|
+
customElements.define('option-card-ui', UIOptionCard);
|
|
157
157
|
|
|
158
|
-
export {
|
|
158
|
+
export { UIOptionCard };
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* Events: 'complete' (detail: {value}), 'input'
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { UIFormElement } from '../../core/form.js';
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class UIOtpInput extends UIFormElement {
|
|
14
14
|
static properties = {
|
|
15
|
-
...
|
|
15
|
+
...UIFormElement.properties,
|
|
16
16
|
length: { type: Number, default: 6, reflect: true },
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -165,6 +165,6 @@ class AdiaOtpInput extends AdiaFormElement {
|
|
|
165
165
|
this.#inputs = [];
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
customElements.define('otp-input-ui',
|
|
168
|
+
customElements.define('otp-input-ui', UIOtpInput);
|
|
169
169
|
|
|
170
|
-
export {
|
|
170
|
+
export { UIOtpInput };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIOtpInput
|
|
5
5
|
tag: otp-input-ui
|
|
6
6
|
component: OtpInput
|
|
7
7
|
category: input
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://adiaui.dev/a2ui/v0_9/components/Page.json",
|
|
4
4
|
"title": "Page",
|
|
5
|
-
"description": "Page container. Holds page-level chrome — header / content / footer —\nand manages max-width clamps, padding scale, optional scroll-container,\nand an optional sticky-header sentinel. Compose with the slot\nprimitives (`<header-ui>`, `<section-ui>`, `<footer-ui>`); the page's\n@scope rules style them. Drop in directly, or nest inside an\n`<
|
|
5
|
+
"description": "Page container. Holds page-level chrome — header / content / footer —\nand manages max-width clamps, padding scale, optional scroll-container,\nand an optional sticky-header sentinel. Compose with the slot\nprimitives (`<header-ui>`, `<section-ui>`, `<footer-ui>`); the page's\n@scope rules style them. Drop in directly, or nest inside an\n`<admin-shell>`'s main column.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"allOf": [
|
|
8
8
|
{
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"default": ""
|
|
35
35
|
},
|
|
36
36
|
"scroll": {
|
|
37
|
-
"description": "Sets the page as a scroll container. `overflow-y: auto`, full\nheight, contained overscroll. Use when the page IS the scroll\nsurface (standalone pages); leave off when nested inside a parent\nthat already manages scroll (e.g. inside an `<
|
|
37
|
+
"description": "Sets the page as a scroll container. `overflow-y: auto`, full\nheight, contained overscroll. Use when the page IS the scroll\nsurface (standalone pages); leave off when nested inside a parent\nthat already manages scroll (e.g. inside an `<admin-shell>`'s\nmain `<section>`).\n",
|
|
38
38
|
"type": "boolean",
|
|
39
39
|
"default": false
|
|
40
40
|
},
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"prose-page",
|
|
76
76
|
"dashboard-page"
|
|
77
77
|
],
|
|
78
|
-
"name": "
|
|
78
|
+
"name": "UIPage",
|
|
79
79
|
"related": [
|
|
80
80
|
"app-shell",
|
|
81
81
|
"card",
|
package/components/page/page.js
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
* ADR: .brain/adrs/0009-promote-app-shell-and-page-to-components.md.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
import {
|
|
28
|
+
import { UIElement } from '../../core/element.js';
|
|
29
29
|
|
|
30
|
-
class
|
|
30
|
+
class UIPage extends UIElement {
|
|
31
31
|
static properties = {
|
|
32
32
|
scroll: { type: Boolean, default: false, reflect: true },
|
|
33
33
|
maxWidth: { type: String, default: '', attribute: 'max-width', reflect: true },
|
|
@@ -83,6 +83,6 @@ class AdiaPage extends AdiaElement {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
customElements.define('page-ui',
|
|
86
|
+
customElements.define('page-ui', UIPage);
|
|
87
87
|
|
|
88
|
-
export {
|
|
88
|
+
export { UIPage };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
2
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
3
|
-
name:
|
|
3
|
+
name: UIPage
|
|
4
4
|
tag: page-ui
|
|
5
5
|
component: Page
|
|
6
6
|
category: container
|
|
@@ -11,14 +11,14 @@ description: |
|
|
|
11
11
|
and an optional sticky-header sentinel. Compose with the slot
|
|
12
12
|
primitives (`<header-ui>`, `<section-ui>`, `<footer-ui>`); the page's
|
|
13
13
|
@scope rules style them. Drop in directly, or nest inside an
|
|
14
|
-
`<
|
|
14
|
+
`<admin-shell>`'s main column.
|
|
15
15
|
props:
|
|
16
16
|
scroll:
|
|
17
17
|
description: |
|
|
18
18
|
Sets the page as a scroll container. `overflow-y: auto`, full
|
|
19
19
|
height, contained overscroll. Use when the page IS the scroll
|
|
20
20
|
surface (standalone pages); leave off when nested inside a parent
|
|
21
|
-
that already manages scroll (e.g. inside an `<
|
|
21
|
+
that already manages scroll (e.g. inside an `<admin-shell>`'s
|
|
22
22
|
main `<section>`).
|
|
23
23
|
type: boolean
|
|
24
24
|
default: false
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* page-change — { detail: { page } }
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { UIElement } from '../../core/element.js';
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class UIPagination extends UIElement {
|
|
14
14
|
static properties = {
|
|
15
15
|
page: { type: Number, default: 1, reflect: true },
|
|
16
16
|
total: { type: Number, default: 1, reflect: true },
|
|
@@ -180,6 +180,6 @@ class AdiaPagination extends AdiaElement {
|
|
|
180
180
|
}));
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
customElements.define('pagination-ui',
|
|
183
|
+
customElements.define('pagination-ui', UIPagination);
|
|
184
184
|
|
|
185
|
-
export {
|
|
185
|
+
export { UIPagination };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIPagination
|
|
5
5
|
tag: pagination-ui
|
|
6
6
|
component: Pagination
|
|
7
7
|
category: navigation
|
package/components/pane/pane.js
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
* pane.toggle()
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
import {
|
|
34
|
+
import { UIElement } from '../../core/element.js';
|
|
35
35
|
|
|
36
|
-
class
|
|
36
|
+
class UIPane extends UIElement {
|
|
37
37
|
static properties = {
|
|
38
38
|
collapsed: { type: Boolean, default: false, reflect: true },
|
|
39
39
|
resizable: { type: Boolean, default: false, reflect: true },
|
|
@@ -147,6 +147,6 @@ class AdiaPane extends AdiaElement {
|
|
|
147
147
|
this.#bound = false;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
customElements.define('pane-ui',
|
|
150
|
+
customElements.define('pane-ui', UIPane);
|
|
151
151
|
|
|
152
|
-
export {
|
|
152
|
+
export { UIPane };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
2
|
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
3
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
-
name:
|
|
4
|
+
name: UIPane
|
|
5
5
|
tag: pane-ui
|
|
6
6
|
component: Pane
|
|
7
7
|
category: layout
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIElement } from '../../core/element.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* <pipeline-status-ui> — Single updating pipeline status indicator.
|
|
@@ -23,7 +23,7 @@ const STAGE_LABELS = {
|
|
|
23
23
|
render: 'Rendering',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class UIPipelineStatus extends UIElement {
|
|
27
27
|
static properties = {
|
|
28
28
|
stage: { type: String, default: '', reflect: true },
|
|
29
29
|
message: { type: String, default: '', reflect: true },
|
|
@@ -175,6 +175,6 @@ class AdiaPipelineStatus extends AdiaElement {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
customElements.define('pipeline-status-ui',
|
|
178
|
+
customElements.define('pipeline-status-ui', UIPipelineStatus);
|
|
179
179
|
|
|
180
|
-
export {
|
|
180
|
+
export { UIPipelineStatus };
|