@adia-ai/web-components 0.0.23 → 0.0.25

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.
Files changed (38) hide show
  1. package/components/app-shell/app-shell.a2ui.json +136 -0
  2. package/components/app-shell/app-shell.css +16 -0
  3. package/components/app-shell/app-shell.js +202 -0
  4. package/components/app-shell/app-shell.yaml +183 -0
  5. package/components/aside/aside.a2ui.json +84 -0
  6. package/components/aside/aside.yaml +100 -0
  7. package/components/button/button.css +7 -5
  8. package/components/check/check.css +24 -27
  9. package/components/drawer/drawer.css +356 -349
  10. package/components/drawer/drawer.js +44 -11
  11. package/components/footer/footer.a2ui.json +1 -1
  12. package/components/footer/footer.yaml +1 -1
  13. package/components/header/header.a2ui.json +2 -2
  14. package/components/header/header.yaml +2 -2
  15. package/components/index.js +2 -0
  16. package/components/input/input.css +13 -11
  17. package/components/kbd/kbd.css +1 -1
  18. package/components/modal/modal.js +12 -11
  19. package/components/option-card/option-card.css +28 -36
  20. package/components/page/page.a2ui.json +107 -0
  21. package/components/page/page.css +68 -0
  22. package/components/page/page.js +88 -0
  23. package/components/page/page.yaml +148 -0
  24. package/components/radio/radio.css +13 -14
  25. package/components/range/range.css +8 -4
  26. package/components/section/section.a2ui.json +1 -1
  27. package/components/section/section.yaml +1 -1
  28. package/components/segment/segment.css +7 -7
  29. package/components/switch/switch.css +13 -11
  30. package/components/textarea/textarea.css +10 -5
  31. package/components/toast/toast.css +27 -26
  32. package/components/toggle-group/toggle-group.css +4 -3
  33. package/components/tree/tree.css +21 -9
  34. package/package.json +1 -1
  35. package/patterns/app-nav-item/app-nav-item.css +24 -24
  36. package/patterns/app-shell/app-shell.css +12 -0
  37. package/patterns/section-nav-item/section-nav-item.css +23 -24
  38. package/styles/components.css +2 -0
@@ -0,0 +1,100 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
3
+ name: AdiaAside
4
+ tag: aside-ui
5
+ component: Aside
6
+ category: container
7
+ version: 1
8
+ description: |
9
+ Side region — styled by closest container parent (AppShell / Drawer / Card).
10
+ Holds nav rails, secondary actions, or supplementary content. CSS-only slot
11
+ stub: no own behavior; the container parent reads `[collapsible]` and
12
+ `[width]` to wire collapse + width. For interactive resize / collapse
13
+ behavior, compose with `<pane-ui>` inside: aside = semantic role,
14
+ pane = resizable / collapsible primitive.
15
+ props:
16
+ collapsible:
17
+ description: |
18
+ Marks the aside as collapsible. The container parent (AppShell, Drawer)
19
+ reads this and wires the toggle affordance + ARIA + state. The aside
20
+ itself ships no collapse logic.
21
+ type: boolean
22
+ default: false
23
+ reflect: true
24
+ width:
25
+ description: |
26
+ Token-bound width hint. The container parent reads this to set the
27
+ aside column width — `rail` (compact icon-only nav), `panel` (full
28
+ nav text), `wide` (workspace pane). Empty string defers to parent default.
29
+ type: string
30
+ default: ""
31
+ enum:
32
+ - ""
33
+ - rail
34
+ - panel
35
+ - wide
36
+ reflect: true
37
+ events: {}
38
+ slots:
39
+ default:
40
+ description: "Default slot — primary child content (typically `<list-ui>`, `<tree-ui>`, or app-nav primitives)."
41
+ states:
42
+ - name: idle
43
+ description: Default, ready for interaction.
44
+ traits: []
45
+ tokens: {}
46
+ a2ui:
47
+ rules: []
48
+ anti_patterns: []
49
+ examples:
50
+ - name: card-with-side-nav
51
+ description: Card laid out as a header / aside / section, with the aside holding a nav list.
52
+ a2ui: >-
53
+ [
54
+ {
55
+ "id": "root",
56
+ "component": "Card",
57
+ "children": ["hdr", "side", "main"]
58
+ },
59
+ {
60
+ "id": "hdr",
61
+ "component": "Header",
62
+ "children": ["title"]
63
+ },
64
+ {
65
+ "id": "title",
66
+ "component": "Text",
67
+ "slot": "heading",
68
+ "textContent": "Settings"
69
+ },
70
+ {
71
+ "id": "side",
72
+ "component": "Aside",
73
+ "width": "rail",
74
+ "children": ["nav"]
75
+ },
76
+ {
77
+ "id": "nav",
78
+ "component": "List",
79
+ "children": []
80
+ },
81
+ {
82
+ "id": "main",
83
+ "component": "Section",
84
+ "children": []
85
+ }
86
+ ]
87
+ keywords:
88
+ - aside
89
+ - sidebar
90
+ - rail
91
+ - panel
92
+ - side-region
93
+ - nav-rail
94
+ synonyms: {}
95
+ related:
96
+ - app-shell
97
+ - drawer
98
+ - pane
99
+ - section
100
+ - header
@@ -1,7 +1,9 @@
1
- /* Safari 17.x bug: `:scope[attr]:hover` inside `@scope` doesn't match the
2
- scope root. Plain selectors outside the @scope work — custom-property
3
- tokens still resolve via inheritance. Specificity (0,1,1 / 0,2,1) is
4
- preserved. See docs/BROWSER-COMPAT.md §3a. */
1
+ /* Safari 17.x bug: `:scope:state` and `:scope[attr]:state` inside `@scope`
2
+ don't match the scope root. Plain selectors outside the @scope work —
3
+ custom-property tokens still resolve via inheritance. Specificity
4
+ (0,1,1 / 0,2,1) is preserved. See docs/BROWSER-COMPAT.md §3a. */
5
+ button-ui:active { transform: scale(0.97); }
6
+
5
7
  button-ui:not([disabled]):hover,
6
8
  button-ui[variant="primary"]:not([disabled]):hover {
7
9
  --button-bg: var(--button-bg-hover);
@@ -118,7 +120,7 @@ button-ui[color="danger"]:not([disabled]):hover {
118
120
  line-height: 1;
119
121
  }
120
122
 
121
- :scope:active { transform: scale(0.97); }
123
+ /* :scope:active moved outside @scope — see Safari 17.x bug note at top. */
122
124
  :scope:focus-visible { outline: none; box-shadow: var(--button-focus-ring); }
123
125
 
124
126
  /* ── Variants (rest state) ── */
@@ -1,7 +1,8 @@
1
- /* Safari 17.x bug: `:scope*:hover` inside `@scope` doesn't match the
2
- scope root. The `:scope:hover [slot="box"]` shape `:hover` on the
3
- scope root, descendant selector is also affected; the entire selector
4
- moves out together. See docs/BROWSER-COMPAT.md §3a. */
1
+ /* Safari 17.x bug: `:scope*:hover` and `:scope[dyn-attr]` inside `@scope`
2
+ don't match (Flavor A) or don't restyle on attribute removal (Flavor B).
3
+ For [checked] / [indeterminate], when JS toggles the attribute off,
4
+ Safari leaves the visual stuck selectors moved out as plain
5
+ `tagname[attr]` rules. See docs/BROWSER-COMPAT.md §3a. */
5
6
  check-ui:not([disabled]):hover [slot="box"] {
6
7
  border-color: var(--check-border-hover);
7
8
  background: var(--check-bg-hover);
@@ -11,6 +12,23 @@ check-ui[indeterminate]:not([disabled]):hover [slot="box"] {
11
12
  background: var(--check-bg-checked-hover);
12
13
  border-color: var(--check-bg-checked-hover);
13
14
  }
15
+ check-ui[checked] [slot="box"],
16
+ check-ui[indeterminate] [slot="box"] {
17
+ background: var(--check-bg-checked);
18
+ border-color: var(--check-border-checked);
19
+ }
20
+ check-ui[checked] {
21
+ --_icon-w: calc(var(--check-size) * 0.3);
22
+ --_icon-h: calc(var(--check-size) * 0.55);
23
+ --_icon-border: solid var(--check-fg-checked);
24
+ --_icon-bw: 0 calc(var(--check-size) * 0.12) calc(var(--check-size) * 0.12) 0;
25
+ --_icon-transform: rotate(45deg) translate(-1px, -1px);
26
+ }
27
+ check-ui[indeterminate] {
28
+ --_dash-bg: var(--check-fg-checked);
29
+ --_icon-w: calc(var(--check-size) * 0.5);
30
+ --_icon-h: calc(var(--check-size) * 0.12);
31
+ }
14
32
 
15
33
  @scope (check-ui) {
16
34
  :where(:scope) {
@@ -97,29 +115,8 @@ check-ui[indeterminate]:not([disabled]):hover [slot="box"] {
97
115
  background: var(--_dash-bg);
98
116
  }
99
117
 
100
- /* hover rules moved outside @scope — see Safari 17.x bug note at top. */
101
-
102
- /* Checked — CSS border checkmark */
103
- :scope[checked] [slot="box"],
104
- :scope[indeterminate] [slot="box"] {
105
- background: var(--check-bg-checked);
106
- border-color: var(--check-border-checked);
107
- }
108
-
109
- :scope[checked] {
110
- --_icon-w: calc(var(--check-size) * 0.3);
111
- --_icon-h: calc(var(--check-size) * 0.55);
112
- --_icon-border: solid var(--check-fg-checked);
113
- --_icon-bw: 0 calc(var(--check-size) * 0.12) calc(var(--check-size) * 0.12) 0;
114
- --_icon-transform: rotate(45deg) translate(-1px, -1px);
115
- }
116
-
117
- /* Indeterminate — horizontal dash */
118
- :scope[indeterminate] {
119
- --_dash-bg: var(--check-fg-checked);
120
- --_icon-w: calc(var(--check-size) * 0.5);
121
- --_icon-h: calc(var(--check-size) * 0.12);
122
- }
118
+ /* hover rules + [checked]/[indeterminate] state rules moved outside @scope —
119
+ see Safari 17.x bug note at top. */
123
120
 
124
121
  /* Label */
125
122
  :scope[label]::after { content: attr(label); }