@adia-ai/web-components 0.0.11 → 0.0.13

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.
@@ -1,5 +1,12 @@
1
1
  /**
2
- * Styles barrel — imports all component CSS + global reset.
2
+ * Components barrel — imports every component's CSS, in stamp order.
3
+ *
4
+ * This file is *only* the `packages/web-components/components/**`
5
+ * stylesheet set. Patterns (adia-chat, adia-editor, app-shell,
6
+ * app-nav, section-nav, gen-ui, etc.) are NOT imported here — each
7
+ * page links its own patterns explicitly. Global resets live in
8
+ * `resets.css` and must be linked separately.
9
+ *
3
10
  * All components use Light DOM — styles target tag names directly.
4
11
  */
5
12
 
@@ -41,6 +48,7 @@
41
48
  @import "../components/kbd/kbd.css";
42
49
  @import "../components/tag/tag.css";
43
50
  @import "../components/col/col.css";
51
+ @import "../components/field/field.css";
44
52
  @import "../components/row/row.css";
45
53
  @import "../components/grid/grid.css";
46
54
  @import "../components/stack/stack.css";
@@ -81,113 +89,3 @@
81
89
  @import "../components/agent-suggestions/agent-suggestions.css";
82
90
  @import "../components/agent-questions/agent-questions.css";
83
91
  @import "../components/agent-artifact/agent-artifact.css";
84
- @import "../patterns/gen-ui/gen-ui.css";
85
-
86
- /* ── Reset ── */
87
- *,
88
- *::before,
89
- *::after {
90
- box-sizing: border-box;
91
- scrollbar-width: none;
92
- }
93
-
94
- *::-webkit-scrollbar {
95
- display: none;
96
- }
97
-
98
- /* Kill default focus outline — components manage their own via --a-focus-ring */
99
- *:focus {
100
- outline: none;
101
- }
102
-
103
- /* Prevent text selection on all interactive components */
104
- :is(button-ui, kbd-ui, tag-ui, input-ui, textarea-ui, select-ui, check-ui, radio-ui, switch-ui,
105
- slider-ui, range-ui, segmented-ui, segment-ui) {
106
- user-select: none;
107
- }
108
-
109
- html {
110
- -webkit-text-size-adjust: 100%;
111
- text-size-adjust: 100%;
112
- hanging-punctuation: first last;
113
- color-scheme: light dark;
114
- }
115
-
116
- body {
117
- text-rendering: optimizeLegibility;
118
- -webkit-font-smoothing: antialiased;
119
-
120
- margin: 0;
121
- font-family: var(--a-font-family);
122
- font-size: var(--a-body-size);
123
- font-style: normal;
124
- font-variation-settings: 'slnt' 0, 'ital' 0;
125
- line-height: 1.5;
126
- color: var(--a-fg);
127
- background: var(--a-bg);
128
- min-block-size: 100dvb;
129
- }
130
-
131
- img,
132
- picture,
133
- svg,
134
- video,
135
- canvas {
136
- display: block;
137
- max-inline-size: 100%;
138
- block-size: auto;
139
- }
140
-
141
- ul[role='list'],
142
- ol[role='list'] {
143
- list-style: none;
144
- padding: 0;
145
- }
146
-
147
- /* ── Size-query provider utility ──────────────────────────────────
148
- Opt any element into being a container-query size provider for
149
- its descendants, without the nesting fragility of applying
150
- container-type to every instance of a primitive. Use sparingly —
151
- on panels, split-panes, cards that actually need responsive
152
- children — and descendants query via bare `@container (width < Xrem)`
153
- (matches nearest) or `@container container (...)` for clarity.
154
-
155
- Why inline-size: block-direction height stays content-driven.
156
- Why an attribute: explicit opt-in; avoids accidental containment
157
- collapse when a primitive is composed inside another flex chain. */
158
- [provide-container-inline-size] {
159
- container-type: inline-size;
160
- container-name: container;
161
- }
162
-
163
-
164
- :focus-visible {
165
- outline: var(--ui-focus-width, 2px) solid var(--ui-focus, Highlight);
166
- outline-offset: 2px;
167
- }
168
-
169
- ::selection {
170
- background: var(--a-selection-bg);
171
- color: var(--a-selection-text);
172
- border-radius: var(--a-selection-radius);
173
- }
174
-
175
- h1,
176
- h2,
177
- h3,
178
- h4,
179
- h5,
180
- h6 {
181
- text-wrap: balance;
182
- line-height: 1.1;
183
- }
184
-
185
- p,
186
- li,
187
- figcaption {
188
- text-wrap: pretty;
189
- }
190
-
191
- a:not([class]) {
192
- text-underline-offset: 0.12em;
193
- }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Global resets — box-sizing, scrollbar hiding, focus management,
3
+ * element defaults, and the size-query provider utility.
4
+ *
5
+ * Imported from styles.css (the barrel). Targets document-level
6
+ * defaults and universal selectors; component-scoped rules live in
7
+ * each component's own CSS under `@scope (component-n)`.
8
+ */
9
+
10
+ *,
11
+ *::before,
12
+ *::after {
13
+ box-sizing: border-box;
14
+ scrollbar-width: none;
15
+ }
16
+
17
+ *::-webkit-scrollbar {
18
+ display: none;
19
+ }
20
+
21
+ /* Kill default focus outline — components manage their own via --a-focus-ring */
22
+ *:focus {
23
+ outline: none;
24
+ }
25
+
26
+ /* Prevent text selection on all interactive components */
27
+ :is(button-ui, kbd-ui, tag-ui, input-ui, textarea-ui, select-ui, check-ui, radio-ui, switch-ui,
28
+ slider-ui, range-ui, segmented-ui, segment-ui) {
29
+ user-select: none;
30
+ }
31
+
32
+ html {
33
+ -webkit-text-size-adjust: 100%;
34
+ text-size-adjust: 100%;
35
+ hanging-punctuation: first last;
36
+ color-scheme: light dark;
37
+ }
38
+
39
+ body {
40
+ text-rendering: optimizeLegibility;
41
+ -webkit-font-smoothing: antialiased;
42
+
43
+ margin: 0;
44
+ font-family: var(--a-font-family);
45
+ font-size: var(--a-body-size);
46
+ font-style: normal;
47
+ font-variation-settings: 'slnt' 0, 'ital' 0;
48
+ line-height: 1.5;
49
+ color: var(--a-fg);
50
+ background: var(--a-bg);
51
+ min-block-size: 100dvb;
52
+ }
53
+
54
+ img,
55
+ picture,
56
+ svg,
57
+ video,
58
+ canvas {
59
+ display: block;
60
+ max-inline-size: 100%;
61
+ block-size: auto;
62
+ }
63
+
64
+ ul[role='list'],
65
+ ol[role='list'] {
66
+ list-style: none;
67
+ padding: 0;
68
+ }
69
+
70
+ /* ── Size-query provider utility ──────────────────────────────────
71
+ Opt any element into being a container-query size provider for
72
+ its descendants, without the nesting fragility of applying
73
+ container-type to every instance of a primitive. Use sparingly —
74
+ on panels, split-panes, cards that actually need responsive
75
+ children — and descendants query via bare `@container (width < Xrem)`
76
+ (matches nearest) or `@container container (...)` for clarity.
77
+
78
+ Why inline-size: block-direction height stays content-driven.
79
+ Why an attribute: explicit opt-in; avoids accidental containment
80
+ collapse when a primitive is composed inside another flex chain. */
81
+ [provide-container-inline-size] {
82
+ container-type: inline-size;
83
+ container-name: container;
84
+ }
85
+
86
+
87
+ :focus-visible {
88
+ outline: var(--ui-focus-width, 2px) solid var(--ui-focus, Highlight);
89
+ outline-offset: 2px;
90
+ }
91
+
92
+ ::selection {
93
+ background: var(--a-selection-bg);
94
+ color: var(--a-selection-text);
95
+ border-radius: var(--a-selection-radius);
96
+ }
97
+
98
+ h1,
99
+ h2,
100
+ h3,
101
+ h4,
102
+ h5,
103
+ h6 {
104
+ text-wrap: balance;
105
+ line-height: 1.1;
106
+ }
107
+
108
+ p,
109
+ li,
110
+ figcaption {
111
+ text-wrap: pretty;
112
+ }
113
+
114
+ a:not([class]) {
115
+ text-underline-offset: 0.12em;
116
+ }
package/styles/tokens.css CHANGED
@@ -16,10 +16,16 @@
16
16
  · Monospace font is the default — data-confident, technical character
17
17
  ═══════════════════════════════════════════════════════════════ */
18
18
 
19
+ /* Color ramps + semantic role aliases + typography scale are
20
+ primitive-layer — every component consumes `--a-fg`, `--a-bg-*`,
21
+ `--a-font-family`, `--a-body-size`, etc. Kept bundled. */
19
22
  @import "./colors/index.css";
20
23
  @import "./typography.css";
21
- @import "./prose.css";
22
- @import "./themes.css";
24
+
25
+ /* NOT imported here:
26
+ - styles/prose.css — opt-in per-page; [prose] attribute only
27
+ - styles/themes.css — opt-in per-page; 8 named themes + schemes
28
+ Link separately from HTML when needed. */
23
29
 
24
30
  /* ═══════════════════════════════════════════════════════════════
25
31
  PARAMETRIC MULTIPLIERS — @property declarations