@alleninstitute/cortex-ui 0.1.0 → 0.3.0

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 (76) hide show
  1. package/README.md +101 -79
  2. package/dist/cjs/cortex-ui.cjs.js +3 -3
  3. package/dist/cjs/cui-divider.cjs.entry.js +49 -0
  4. package/dist/cjs/cui-icon.cjs.entry.js +100 -0
  5. package/dist/cjs/cui-progress.cjs.entry.js +46 -0
  6. package/dist/cjs/cui-tag.cjs.entry.js +4 -4
  7. package/dist/cjs/index-RBrlguTk.js +1565 -0
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/collection/collection-manifest.json +4 -1
  10. package/dist/collection/components/cui-divider/cui-divider.css +100 -0
  11. package/dist/collection/components/cui-divider/cui-divider.js +150 -0
  12. package/dist/collection/components/cui-icon/cui-icon.css +134 -0
  13. package/dist/collection/components/cui-icon/cui-icon.js +239 -0
  14. package/dist/collection/components/cui-progress/cui-progress.css +102 -0
  15. package/dist/collection/components/cui-progress/cui-progress.js +187 -0
  16. package/dist/collection/components/cui-tag/cui-tag.css +19 -19
  17. package/dist/collection/components/cui-tag/cui-tag.js +5 -5
  18. package/dist/components/cui-divider.d.ts +11 -0
  19. package/dist/components/cui-divider.js +1 -0
  20. package/dist/components/cui-icon.d.ts +11 -0
  21. package/dist/components/cui-icon.js +1 -0
  22. package/dist/components/cui-progress.d.ts +11 -0
  23. package/dist/components/cui-progress.js +1 -0
  24. package/dist/components/cui-tag.js +1 -1
  25. package/dist/components/index.js +1 -1
  26. package/dist/cortex-ui/cortex-ui.css +1 -1
  27. package/dist/cortex-ui/cortex-ui.esm.js +1 -1
  28. package/dist/cortex-ui/p-0e66a721.entry.js +1 -0
  29. package/dist/cortex-ui/p-1af73c5a.entry.js +1 -0
  30. package/dist/cortex-ui/p-2d2004f0.entry.js +1 -0
  31. package/dist/cortex-ui/p-8925abbe.entry.js +1 -0
  32. package/dist/cortex-ui/p-BZmInLSX.js +3 -0
  33. package/dist/esm/cortex-ui.js +4 -4
  34. package/dist/esm/cui-divider.entry.js +47 -0
  35. package/dist/esm/cui-icon.entry.js +98 -0
  36. package/dist/esm/cui-progress.entry.js +44 -0
  37. package/dist/esm/cui-tag.entry.js +4 -4
  38. package/dist/esm/index-BZmInLSX.js +1557 -0
  39. package/dist/esm/loader.js +3 -3
  40. package/dist/fonts/AllenInstituteHeadline-Bold.woff2 +0 -0
  41. package/dist/fonts/AllenInstituteHeadline-BoldItalic.woff2 +0 -0
  42. package/dist/fonts/AllenInstituteHeadline-Italic.woff2 +0 -0
  43. package/dist/fonts/AllenInstituteHeadline-Light.woff2 +0 -0
  44. package/dist/fonts/AllenInstituteHeadline-LightItalic.woff2 +0 -0
  45. package/dist/fonts/AllenInstituteHeadline-Medium.woff2 +0 -0
  46. package/dist/fonts/AllenInstituteHeadline-MediumItalic.woff2 +0 -0
  47. package/dist/fonts/AllenInstituteHeadline-Regular.woff2 +0 -0
  48. package/dist/fonts/AllenInstituteHeadline-Semibold.woff2 +0 -0
  49. package/dist/fonts/AllenInstituteHeadline-SemiboldItalic.woff2 +0 -0
  50. package/dist/fonts/AllenInstituteText-Bold.woff2 +0 -0
  51. package/dist/fonts/AllenInstituteText-BoldItalic.woff2 +0 -0
  52. package/dist/fonts/AllenInstituteText-Italic.woff2 +0 -0
  53. package/dist/fonts/AllenInstituteText-Light.woff2 +0 -0
  54. package/dist/fonts/AllenInstituteText-LightItalic.woff2 +0 -0
  55. package/dist/fonts/AllenInstituteText-Medium.woff2 +0 -0
  56. package/dist/fonts/AllenInstituteText-MediumItalic.woff2 +0 -0
  57. package/dist/fonts/AllenInstituteText-Regular.woff2 +0 -0
  58. package/dist/fonts/AllenInstituteText-Semibold.woff2 +0 -0
  59. package/dist/fonts/AllenInstituteText-SemiboldItalic.woff2 +0 -0
  60. package/dist/fonts.css +186 -0
  61. package/dist/types/components/cui-divider/cui-divider.d.ts +38 -0
  62. package/dist/types/components/cui-icon/cui-icon.d.ts +76 -0
  63. package/dist/types/components/cui-progress/cui-progress.d.ts +40 -0
  64. package/dist/types/components/cui-tag/cui-tag.d.ts +1 -1
  65. package/dist/types/components.d.ts +343 -5
  66. package/dist/types/stencil-public-runtime.d.ts +11 -0
  67. package/package.json +31 -22
  68. package/dist/cjs/index-Rxdz0vyq.js +0 -1337
  69. package/dist/collection/stories/assets/accessibility.svg +0 -1
  70. package/dist/collection/stories/assets/discord.svg +0 -1
  71. package/dist/collection/stories/assets/github.svg +0 -1
  72. package/dist/collection/stories/assets/tutorials.svg +0 -1
  73. package/dist/collection/stories/assets/youtube.svg +0 -1
  74. package/dist/cortex-ui/p-054ebfa8.entry.js +0 -1
  75. package/dist/cortex-ui/p-C70YK15K.js +0 -2
  76. package/dist/esm/index-C70YK15K.js +0 -1330
@@ -6,6 +6,117 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
+ /**
10
+ * A Divider drawing a rule between sections of content, or between items in a row.
11
+ * @example <cui-divider></cui-divider>
12
+ * @example <cui-divider orientation="vertical" spacing="small"></cui-divider>
13
+ * @example <cui-divider variant="accent" importance="secondary"></cui-divider>
14
+ */
15
+ interface CuiDivider {
16
+ /**
17
+ * Which of the two `divider` importances the rule is drawn from. Match it to the importance of the surface the divider sits on — `secondary` on a quiet tint, `primary` on a saturated fill — rather than treating it as a loudness control: on a secondary surface the primary rule is the *less* perceivable of the two. For `base`, whose surface is the page itself, `primary` is simply the stronger of the two rules.
18
+ * @default 'primary'
19
+ */
20
+ "importance": 'primary' | 'secondary';
21
+ /**
22
+ * Which way the rule runs. A vertical divider stretches to the height of the flex row it sits in.
23
+ * @default 'horizontal'
24
+ */
25
+ "orientation": 'horizontal' | 'vertical';
26
+ /**
27
+ * Space reserved on either side of the rule, along the axis it separates.
28
+ * @default 'medium'
29
+ */
30
+ "spacing": 'none' | 'small' | 'medium' | 'large';
31
+ /**
32
+ * Which intent's `divider` colour the rule is drawn in. `base` is the intent-free rule for ordinary page chrome; the seven intents tint a divider that sits inside a component already carrying that intent, such as a rule between rows of a negative-intent alert.
33
+ * @default 'base'
34
+ */
35
+ "variant": 'base' | 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
36
+ }
37
+ /**
38
+ * An Icon component that renders a Font Awesome glyph with cortex-ui's semantic colours and sizes.
39
+ * Font Awesome itself is **not** bundled — the consuming application loads a Font Awesome
40
+ * stylesheet (the free set, or a licensed pro build) and `icon` takes the raw Font Awesome
41
+ * classes. Any Font Awesome utility class can be passed along in the same string, so
42
+ * `icon="fa-solid fa-spinner fa-spin"` works without this component knowing about `fa-spin`.
43
+ * Loading that stylesheet is the human application owner's responsibility, never an agent's: an AI
44
+ * agent writing `cui-icon` markup must not install a Font Awesome package, add the stylesheet to
45
+ * the page, or invent a Pro Kit URL — it should write the markup and tell the person their page
46
+ * needs Font Awesome. Icons rendering as empty boxes in a page with no Font Awesome is the
47
+ * expected result, not a bug to code around.
48
+ * Icons are decorative by default and hidden from assistive technology. Set `label` only when the
49
+ * icon carries meaning that the surrounding text does not already convey.
50
+ * @example <cui-icon icon="fa-solid fa-user"></cui-icon>
51
+ * @example <cui-icon icon="fa-solid fa-triangle-exclamation" variant="warning" size="l"></cui-icon>
52
+ * @example <cui-icon icon="fa-solid fa-trash" label="Delete item"></cui-icon>
53
+ * @cssprop --cui-icon-color - Overrides the colour chosen by `variant` and `importance`. Set it to
54
+ * `currentColor` to make the icon follow the text colour of whatever surrounds it.
55
+ * @cssprop --cui-icon-size - Overrides the size chosen by `size`.
56
+ */
57
+ interface CuiIcon {
58
+ /**
59
+ * The Font Awesome classes naming the icon, e.g. `fa-solid fa-user`. The style is part of the string, so `fa-regular`, `fa-brands` and licensed pro styles like `fa-duotone` all work. Required — there is no sensible fallback glyph.
60
+ */
61
+ "icon": string;
62
+ /**
63
+ * Which rung of the `text` token family to use. It tracks the surface the icon sits on: `primary` belongs on that variant's primary surface, `secondary` on its secondary surface or on a plain background. Pairing an intent's `primary` text with a plain page background is outside the token system's design and will not be legible.
64
+ * @default 'secondary'
65
+ */
66
+ "importance": 'primary' | 'secondary';
67
+ /**
68
+ * Accessible name, for an icon that carries meaning on its own — an icon-only button, or a status glyph with no adjacent text. Leave it unset for a decorative icon beside text, which is the common case; the icon is then hidden from assistive technology so screen readers do not announce it twice.
69
+ */
70
+ "label"?: string;
71
+ /**
72
+ * Size of the glyph, from the font-size token scale.
73
+ * @default 'm'
74
+ */
75
+ "size": 'display-l' | 'display-m' | 'display-s' | 'l' | 'm' | 's' | 'xl' | 'xs' | 'xxl' | 'xxs';
76
+ /**
77
+ * Semantic colour set. `base` is the intent-free choice for ordinary content and is correct on a plain page background; the intents are for an icon that sits on that intent's surface. This is styling, not semantics — never let colour be the only thing conveying meaning.
78
+ * @default 'base'
79
+ */
80
+ "variant": 'accent' | 'base' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
81
+ }
82
+ /**
83
+ * A Progress component showing how far along a task is, as a bar with an accessible value.
84
+ * @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
85
+ * @example <cui-progress label="Loading results" indeterminate="true"></cui-progress>
86
+ * @cssprop --cui-progress-track-color - Colour of the unfilled track.
87
+ * @cssprop --cui-progress-indicator-color - Colour of the filled portion, for status bars in another intent.
88
+ */
89
+ interface CuiProgress {
90
+ /**
91
+ * Animates continuously instead of showing a value. Use it only while the total amount of work is genuinely unknown — prefer a real `value` whenever the work reports one.
92
+ * @default false
93
+ */
94
+ "indeterminate": boolean;
95
+ /**
96
+ * Accessible name for the bar, describing what is in progress ("Uploading files"). Required — a progress bar with no name fails the accessibility gate.
97
+ */
98
+ "label": string;
99
+ /**
100
+ * The value that counts as complete.
101
+ * @default 100
102
+ */
103
+ "max": number;
104
+ /**
105
+ * Renders the completed percentage as text beside the bar. Ignored when indeterminate.
106
+ * @default false
107
+ */
108
+ "showValue": boolean;
109
+ /**
110
+ * Thickness of the bar.
111
+ * @default 'medium'
112
+ */
113
+ "size": 'small' | 'medium' | 'large';
114
+ /**
115
+ * How much of the task is done, clamped to the range `0`–`max`.
116
+ * @default 0
117
+ */
118
+ "value": number;
119
+ }
9
120
  /**
10
121
  * A Tag component for displaying status labels or counts.
11
122
  * @example <cui-tag variant="positive" label="Active"></cui-tag>
@@ -20,12 +131,63 @@ export namespace Components {
20
131
  */
21
132
  "size": 'small' | 'medium';
22
133
  /**
23
- * @default 'default'
134
+ * @default 'neutral'
24
135
  */
25
- "variant": 'default' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
136
+ "variant": 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
26
137
  }
27
138
  }
28
139
  declare global {
140
+ /**
141
+ * A Divider drawing a rule between sections of content, or between items in a row.
142
+ * @example <cui-divider></cui-divider>
143
+ * @example <cui-divider orientation="vertical" spacing="small"></cui-divider>
144
+ * @example <cui-divider variant="accent" importance="secondary"></cui-divider>
145
+ */
146
+ interface HTMLCuiDividerElement extends Components.CuiDivider, HTMLStencilElement {
147
+ }
148
+ var HTMLCuiDividerElement: {
149
+ prototype: HTMLCuiDividerElement;
150
+ new (): HTMLCuiDividerElement;
151
+ };
152
+ /**
153
+ * An Icon component that renders a Font Awesome glyph with cortex-ui's semantic colours and sizes.
154
+ * Font Awesome itself is **not** bundled — the consuming application loads a Font Awesome
155
+ * stylesheet (the free set, or a licensed pro build) and `icon` takes the raw Font Awesome
156
+ * classes. Any Font Awesome utility class can be passed along in the same string, so
157
+ * `icon="fa-solid fa-spinner fa-spin"` works without this component knowing about `fa-spin`.
158
+ * Loading that stylesheet is the human application owner's responsibility, never an agent's: an AI
159
+ * agent writing `cui-icon` markup must not install a Font Awesome package, add the stylesheet to
160
+ * the page, or invent a Pro Kit URL — it should write the markup and tell the person their page
161
+ * needs Font Awesome. Icons rendering as empty boxes in a page with no Font Awesome is the
162
+ * expected result, not a bug to code around.
163
+ * Icons are decorative by default and hidden from assistive technology. Set `label` only when the
164
+ * icon carries meaning that the surrounding text does not already convey.
165
+ * @example <cui-icon icon="fa-solid fa-user"></cui-icon>
166
+ * @example <cui-icon icon="fa-solid fa-triangle-exclamation" variant="warning" size="l"></cui-icon>
167
+ * @example <cui-icon icon="fa-solid fa-trash" label="Delete item"></cui-icon>
168
+ * @cssprop --cui-icon-color - Overrides the colour chosen by `variant` and `importance`. Set it to
169
+ * `currentColor` to make the icon follow the text colour of whatever surrounds it.
170
+ * @cssprop --cui-icon-size - Overrides the size chosen by `size`.
171
+ */
172
+ interface HTMLCuiIconElement extends Components.CuiIcon, HTMLStencilElement {
173
+ }
174
+ var HTMLCuiIconElement: {
175
+ prototype: HTMLCuiIconElement;
176
+ new (): HTMLCuiIconElement;
177
+ };
178
+ /**
179
+ * A Progress component showing how far along a task is, as a bar with an accessible value.
180
+ * @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
181
+ * @example <cui-progress label="Loading results" indeterminate="true"></cui-progress>
182
+ * @cssprop --cui-progress-track-color - Colour of the unfilled track.
183
+ * @cssprop --cui-progress-indicator-color - Colour of the filled portion, for status bars in another intent.
184
+ */
185
+ interface HTMLCuiProgressElement extends Components.CuiProgress, HTMLStencilElement {
186
+ }
187
+ var HTMLCuiProgressElement: {
188
+ prototype: HTMLCuiProgressElement;
189
+ new (): HTMLCuiProgressElement;
190
+ };
29
191
  /**
30
192
  * A Tag component for displaying status labels or counts.
31
193
  * @example <cui-tag variant="positive" label="Active"></cui-tag>
@@ -37,10 +199,126 @@ declare global {
37
199
  new (): HTMLCuiTagElement;
38
200
  };
39
201
  interface HTMLElementTagNameMap {
202
+ "cui-divider": HTMLCuiDividerElement;
203
+ "cui-icon": HTMLCuiIconElement;
204
+ "cui-progress": HTMLCuiProgressElement;
40
205
  "cui-tag": HTMLCuiTagElement;
41
206
  }
42
207
  }
43
208
  declare namespace LocalJSX {
209
+ type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K]?: never };
210
+
211
+ /**
212
+ * A Divider drawing a rule between sections of content, or between items in a row.
213
+ * @example <cui-divider></cui-divider>
214
+ * @example <cui-divider orientation="vertical" spacing="small"></cui-divider>
215
+ * @example <cui-divider variant="accent" importance="secondary"></cui-divider>
216
+ */
217
+ interface CuiDivider {
218
+ /**
219
+ * Which of the two `divider` importances the rule is drawn from. Match it to the importance of the surface the divider sits on — `secondary` on a quiet tint, `primary` on a saturated fill — rather than treating it as a loudness control: on a secondary surface the primary rule is the *less* perceivable of the two. For `base`, whose surface is the page itself, `primary` is simply the stronger of the two rules.
220
+ * @default 'primary'
221
+ */
222
+ "importance"?: 'primary' | 'secondary';
223
+ /**
224
+ * Which way the rule runs. A vertical divider stretches to the height of the flex row it sits in.
225
+ * @default 'horizontal'
226
+ */
227
+ "orientation"?: 'horizontal' | 'vertical';
228
+ /**
229
+ * Space reserved on either side of the rule, along the axis it separates.
230
+ * @default 'medium'
231
+ */
232
+ "spacing"?: 'none' | 'small' | 'medium' | 'large';
233
+ /**
234
+ * Which intent's `divider` colour the rule is drawn in. `base` is the intent-free rule for ordinary page chrome; the seven intents tint a divider that sits inside a component already carrying that intent, such as a rule between rows of a negative-intent alert.
235
+ * @default 'base'
236
+ */
237
+ "variant"?: 'base' | 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
238
+ }
239
+ /**
240
+ * An Icon component that renders a Font Awesome glyph with cortex-ui's semantic colours and sizes.
241
+ * Font Awesome itself is **not** bundled — the consuming application loads a Font Awesome
242
+ * stylesheet (the free set, or a licensed pro build) and `icon` takes the raw Font Awesome
243
+ * classes. Any Font Awesome utility class can be passed along in the same string, so
244
+ * `icon="fa-solid fa-spinner fa-spin"` works without this component knowing about `fa-spin`.
245
+ * Loading that stylesheet is the human application owner's responsibility, never an agent's: an AI
246
+ * agent writing `cui-icon` markup must not install a Font Awesome package, add the stylesheet to
247
+ * the page, or invent a Pro Kit URL — it should write the markup and tell the person their page
248
+ * needs Font Awesome. Icons rendering as empty boxes in a page with no Font Awesome is the
249
+ * expected result, not a bug to code around.
250
+ * Icons are decorative by default and hidden from assistive technology. Set `label` only when the
251
+ * icon carries meaning that the surrounding text does not already convey.
252
+ * @example <cui-icon icon="fa-solid fa-user"></cui-icon>
253
+ * @example <cui-icon icon="fa-solid fa-triangle-exclamation" variant="warning" size="l"></cui-icon>
254
+ * @example <cui-icon icon="fa-solid fa-trash" label="Delete item"></cui-icon>
255
+ * @cssprop --cui-icon-color - Overrides the colour chosen by `variant` and `importance`. Set it to
256
+ * `currentColor` to make the icon follow the text colour of whatever surrounds it.
257
+ * @cssprop --cui-icon-size - Overrides the size chosen by `size`.
258
+ */
259
+ interface CuiIcon {
260
+ /**
261
+ * The Font Awesome classes naming the icon, e.g. `fa-solid fa-user`. The style is part of the string, so `fa-regular`, `fa-brands` and licensed pro styles like `fa-duotone` all work. Required — there is no sensible fallback glyph.
262
+ */
263
+ "icon": string;
264
+ /**
265
+ * Which rung of the `text` token family to use. It tracks the surface the icon sits on: `primary` belongs on that variant's primary surface, `secondary` on its secondary surface or on a plain background. Pairing an intent's `primary` text with a plain page background is outside the token system's design and will not be legible.
266
+ * @default 'secondary'
267
+ */
268
+ "importance"?: 'primary' | 'secondary';
269
+ /**
270
+ * Accessible name, for an icon that carries meaning on its own — an icon-only button, or a status glyph with no adjacent text. Leave it unset for a decorative icon beside text, which is the common case; the icon is then hidden from assistive technology so screen readers do not announce it twice.
271
+ */
272
+ "label"?: string;
273
+ /**
274
+ * Size of the glyph, from the font-size token scale.
275
+ * @default 'm'
276
+ */
277
+ "size"?: 'display-l' | 'display-m' | 'display-s' | 'l' | 'm' | 's' | 'xl' | 'xs' | 'xxl' | 'xxs';
278
+ /**
279
+ * Semantic colour set. `base` is the intent-free choice for ordinary content and is correct on a plain page background; the intents are for an icon that sits on that intent's surface. This is styling, not semantics — never let colour be the only thing conveying meaning.
280
+ * @default 'base'
281
+ */
282
+ "variant"?: 'accent' | 'base' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
283
+ }
284
+ /**
285
+ * A Progress component showing how far along a task is, as a bar with an accessible value.
286
+ * @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
287
+ * @example <cui-progress label="Loading results" indeterminate="true"></cui-progress>
288
+ * @cssprop --cui-progress-track-color - Colour of the unfilled track.
289
+ * @cssprop --cui-progress-indicator-color - Colour of the filled portion, for status bars in another intent.
290
+ */
291
+ interface CuiProgress {
292
+ /**
293
+ * Animates continuously instead of showing a value. Use it only while the total amount of work is genuinely unknown — prefer a real `value` whenever the work reports one.
294
+ * @default false
295
+ */
296
+ "indeterminate"?: boolean;
297
+ /**
298
+ * Accessible name for the bar, describing what is in progress ("Uploading files"). Required — a progress bar with no name fails the accessibility gate.
299
+ */
300
+ "label": string;
301
+ /**
302
+ * The value that counts as complete.
303
+ * @default 100
304
+ */
305
+ "max"?: number;
306
+ /**
307
+ * Renders the completed percentage as text beside the bar. Ignored when indeterminate.
308
+ * @default false
309
+ */
310
+ "showValue"?: boolean;
311
+ /**
312
+ * Thickness of the bar.
313
+ * @default 'medium'
314
+ */
315
+ "size"?: 'small' | 'medium' | 'large';
316
+ /**
317
+ * How much of the task is done, clamped to the range `0`–`max`.
318
+ * @default 0
319
+ */
320
+ "value"?: number;
321
+ }
44
322
  /**
45
323
  * A Tag component for displaying status labels or counts.
46
324
  * @example <cui-tag variant="positive" label="Active"></cui-tag>
@@ -55,18 +333,42 @@ declare namespace LocalJSX {
55
333
  */
56
334
  "size"?: 'small' | 'medium';
57
335
  /**
58
- * @default 'default'
336
+ * @default 'neutral'
59
337
  */
60
- "variant"?: 'default' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
338
+ "variant"?: 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
61
339
  }
62
340
 
341
+ interface CuiDividerAttributes {
342
+ "orientation": 'horizontal' | 'vertical';
343
+ "spacing": 'none' | 'small' | 'medium' | 'large';
344
+ "variant": 'base' | 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
345
+ "importance": 'primary' | 'secondary';
346
+ }
347
+ interface CuiIconAttributes {
348
+ "icon": string;
349
+ "variant": 'accent' | 'base' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
350
+ "importance": 'primary' | 'secondary';
351
+ "size": 'display-l' | 'display-m' | 'display-s' | 'l' | 'm' | 's' | 'xl' | 'xs' | 'xxl' | 'xxs';
352
+ "label": string;
353
+ }
354
+ interface CuiProgressAttributes {
355
+ "label": string;
356
+ "value": number;
357
+ "max": number;
358
+ "indeterminate": boolean;
359
+ "size": 'small' | 'medium' | 'large';
360
+ "showValue": boolean;
361
+ }
63
362
  interface CuiTagAttributes {
64
363
  "label": string;
65
- "variant": 'default' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
364
+ "variant": 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
66
365
  "size": 'small' | 'medium';
67
366
  }
68
367
 
69
368
  interface IntrinsicElements {
369
+ "cui-divider": Omit<CuiDivider, keyof CuiDividerAttributes> & { [K in keyof CuiDivider & keyof CuiDividerAttributes]?: CuiDivider[K] } & { [K in keyof CuiDivider & keyof CuiDividerAttributes as `attr:${K}`]?: CuiDividerAttributes[K] } & { [K in keyof CuiDivider & keyof CuiDividerAttributes as `prop:${K}`]?: CuiDivider[K] };
370
+ "cui-icon": Omit<CuiIcon, keyof CuiIconAttributes> & { [K in keyof CuiIcon & keyof CuiIconAttributes]?: CuiIcon[K] } & { [K in keyof CuiIcon & keyof CuiIconAttributes as `attr:${K}`]?: CuiIconAttributes[K] } & { [K in keyof CuiIcon & keyof CuiIconAttributes as `prop:${K}`]?: CuiIcon[K] } & OneOf<"icon", CuiIcon["icon"], CuiIconAttributes["icon"]>;
371
+ "cui-progress": Omit<CuiProgress, keyof CuiProgressAttributes> & { [K in keyof CuiProgress & keyof CuiProgressAttributes]?: CuiProgress[K] } & { [K in keyof CuiProgress & keyof CuiProgressAttributes as `attr:${K}`]?: CuiProgressAttributes[K] } & { [K in keyof CuiProgress & keyof CuiProgressAttributes as `prop:${K}`]?: CuiProgress[K] } & OneOf<"label", CuiProgress["label"], CuiProgressAttributes["label"]>;
70
372
  "cui-tag": Omit<CuiTag, keyof CuiTagAttributes> & { [K in keyof CuiTag & keyof CuiTagAttributes]?: CuiTag[K] } & { [K in keyof CuiTag & keyof CuiTagAttributes as `attr:${K}`]?: CuiTagAttributes[K] } & { [K in keyof CuiTag & keyof CuiTagAttributes as `prop:${K}`]?: CuiTag[K] };
71
373
  }
72
374
  }
@@ -74,6 +376,42 @@ export { LocalJSX as JSX };
74
376
  declare module "@stencil/core" {
75
377
  export namespace JSX {
76
378
  interface IntrinsicElements {
379
+ /**
380
+ * A Divider drawing a rule between sections of content, or between items in a row.
381
+ * @example <cui-divider></cui-divider>
382
+ * @example <cui-divider orientation="vertical" spacing="small"></cui-divider>
383
+ * @example <cui-divider variant="accent" importance="secondary"></cui-divider>
384
+ */
385
+ "cui-divider": LocalJSX.IntrinsicElements["cui-divider"] & JSXBase.HTMLAttributes<HTMLCuiDividerElement>;
386
+ /**
387
+ * An Icon component that renders a Font Awesome glyph with cortex-ui's semantic colours and sizes.
388
+ * Font Awesome itself is **not** bundled — the consuming application loads a Font Awesome
389
+ * stylesheet (the free set, or a licensed pro build) and `icon` takes the raw Font Awesome
390
+ * classes. Any Font Awesome utility class can be passed along in the same string, so
391
+ * `icon="fa-solid fa-spinner fa-spin"` works without this component knowing about `fa-spin`.
392
+ * Loading that stylesheet is the human application owner's responsibility, never an agent's: an AI
393
+ * agent writing `cui-icon` markup must not install a Font Awesome package, add the stylesheet to
394
+ * the page, or invent a Pro Kit URL — it should write the markup and tell the person their page
395
+ * needs Font Awesome. Icons rendering as empty boxes in a page with no Font Awesome is the
396
+ * expected result, not a bug to code around.
397
+ * Icons are decorative by default and hidden from assistive technology. Set `label` only when the
398
+ * icon carries meaning that the surrounding text does not already convey.
399
+ * @example <cui-icon icon="fa-solid fa-user"></cui-icon>
400
+ * @example <cui-icon icon="fa-solid fa-triangle-exclamation" variant="warning" size="l"></cui-icon>
401
+ * @example <cui-icon icon="fa-solid fa-trash" label="Delete item"></cui-icon>
402
+ * @cssprop --cui-icon-color - Overrides the colour chosen by `variant` and `importance`. Set it to
403
+ * `currentColor` to make the icon follow the text colour of whatever surrounds it.
404
+ * @cssprop --cui-icon-size - Overrides the size chosen by `size`.
405
+ */
406
+ "cui-icon": LocalJSX.IntrinsicElements["cui-icon"] & JSXBase.HTMLAttributes<HTMLCuiIconElement>;
407
+ /**
408
+ * A Progress component showing how far along a task is, as a bar with an accessible value.
409
+ * @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
410
+ * @example <cui-progress label="Loading results" indeterminate="true"></cui-progress>
411
+ * @cssprop --cui-progress-track-color - Colour of the unfilled track.
412
+ * @cssprop --cui-progress-indicator-color - Colour of the filled portion, for status bars in another intent.
413
+ */
414
+ "cui-progress": LocalJSX.IntrinsicElements["cui-progress"] & JSXBase.HTMLAttributes<HTMLCuiProgressElement>;
77
415
  /**
78
416
  * A Tag component for displaying status labels or counts.
79
417
  * @example <cui-tag variant="positive" label="Active"></cui-tag>
@@ -1008,6 +1008,7 @@ export declare namespace JSXBase {
1008
1008
  onClose?: (event: Event) => void;
1009
1009
  open?: boolean;
1010
1010
  returnValue?: string;
1011
+ closedby?: 'any' | 'closerequest' | 'none';
1011
1012
  }
1012
1013
  interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
1013
1014
  height?: number | string;
@@ -1045,6 +1046,8 @@ export declare namespace JSXBase {
1045
1046
  allowtransparency?: string | boolean;
1046
1047
  frameBorder?: number | string;
1047
1048
  frameborder?: number | string;
1049
+ fetchPriority?: 'high' | 'low' | 'auto';
1050
+ fetchpriority?: 'high' | 'low' | 'auto';
1048
1051
  importance?: 'low' | 'auto' | 'high';
1049
1052
  height?: number | string;
1050
1053
  loading?: 'lazy' | 'auto' | 'eager';
@@ -1067,6 +1070,8 @@ export declare namespace JSXBase {
1067
1070
  crossOrigin?: string;
1068
1071
  crossorigin?: string;
1069
1072
  decoding?: 'async' | 'auto' | 'sync';
1073
+ fetchPriority?: 'high' | 'low' | 'auto';
1074
+ fetchpriority?: 'high' | 'low' | 'auto';
1070
1075
  importance?: 'low' | 'auto' | 'high';
1071
1076
  height?: number | string;
1072
1077
  loading?: 'lazy' | 'auto' | 'eager';
@@ -1166,6 +1171,8 @@ export declare namespace JSXBase {
1166
1171
  }
1167
1172
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
1168
1173
  as?: string;
1174
+ fetchPriority?: 'high' | 'low' | 'auto';
1175
+ fetchpriority?: 'high' | 'low' | 'auto';
1169
1176
  href?: string;
1170
1177
  hrefLang?: string;
1171
1178
  hreflang?: string;
@@ -1289,6 +1296,8 @@ export declare namespace JSXBase {
1289
1296
  crossOrigin?: string;
1290
1297
  crossorigin?: string;
1291
1298
  defer?: boolean;
1299
+ fetchPriority?: 'high' | 'low' | 'auto';
1300
+ fetchpriority?: 'high' | 'low' | 'auto';
1292
1301
  importance?: 'low' | 'auto' | 'high';
1293
1302
  integrity?: string;
1294
1303
  nonce?: string;
@@ -1404,7 +1413,9 @@ export declare namespace JSXBase {
1404
1413
  tabIndex?: number;
1405
1414
  tabindex?: number | string;
1406
1415
  title?: string;
1416
+ translate?: 'yes' | 'no' | (string & {});
1407
1417
  popover?: string | null;
1418
+ focusgroup?: string;
1408
1419
  inputMode?: string;
1409
1420
  inputmode?: string;
1410
1421
  enterKeyHint?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alleninstitute/cortex-ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "A web components UI library for Allen Institute projects, built with Stencil.js.",
5
5
  "contributors": [
6
6
  {
@@ -10,6 +10,10 @@
10
10
  {
11
11
  "name": "Su Li",
12
12
  "email": "su.li@alleninstitute.org"
13
+ },
14
+ {
15
+ "name": "Joel Arbuckle",
16
+ "email": "joel.arbuckle@alleninstitute.org"
13
17
  }
14
18
  ],
15
19
  "es2017": "dist/esm/index.js",
@@ -40,6 +44,8 @@
40
44
  "module": "dist/index.js",
41
45
  "types": "dist/types/index.d.ts",
42
46
  "exports": {
47
+ "./fonts.css": "./dist/fonts.css",
48
+ "./fonts/*": "./dist/fonts/*",
43
49
  ".": {
44
50
  "types": "./dist/types/index.d.ts",
45
51
  "import": "./dist/index.js",
@@ -71,33 +77,34 @@
71
77
  "access": "public"
72
78
  },
73
79
  "devDependencies": {
74
- "@stencil/core": "4.43.5",
75
- "@stencil/react-output-target": "1.5.3",
76
- "@stencil/sass": "3.3.2",
77
- "@storybook/addon-a11y": "10.4.2",
78
- "@storybook/addon-docs": "10.4.2",
79
- "@storybook/addon-links": "10.4.2",
80
- "@storybook/addon-mcp": "^0.6.0",
81
- "@storybook/addon-vitest": "10.4.2",
82
- "@storybook/web-components-vite": "10.4.2",
83
- "@types/react": "19.2.17",
80
+ "@fortawesome/fontawesome-free": "7.3.1",
81
+ "@stencil/core": "4.44.0",
82
+ "@stencil/react-output-target": "1.6.2",
83
+ "@stencil/sass": "3.3.3",
84
+ "@storybook/addon-a11y": "10.5.8",
85
+ "@storybook/addon-docs": "10.5.8",
86
+ "@storybook/addon-links": "10.5.8",
87
+ "@storybook/addon-mcp": "0.7.0",
88
+ "@storybook/addon-vitest": "10.5.8",
89
+ "@storybook/web-components-vite": "10.5.8",
90
+ "@types/react": "19.2.18",
84
91
  "@vitest/browser-playwright": "4.1.10",
85
92
  "@vitest/coverage-v8": "4.1.10",
86
- "concurrently": "10.0.3",
93
+ "concurrently": "10.0.5",
87
94
  "git-cliff": "2.13.1",
88
- "happy-dom": "20.10.6",
89
- "lefthook": "2.1.9",
90
- "oxfmt": "0.53.0",
91
- "oxlint": "1.68.0",
92
- "playwright": "^1.61.1",
95
+ "happy-dom": "20.11.2",
96
+ "lefthook": "2.1.10",
97
+ "oxfmt": "0.65.0",
98
+ "oxlint": "1.80.0",
99
+ "playwright": "1.62.1",
93
100
  "react": "19.2.8",
94
101
  "react-dom": "19.2.8",
95
- "sass-embedded": "1.100.0",
96
- "storybook": "10.4.6",
97
- "typescript": "6.0.3",
102
+ "sass-embedded": "1.103.1",
103
+ "storybook": "10.5.8",
104
+ "typescript": "7.0.2",
98
105
  "unplugin-stencil": "0.4.1",
99
- "vite": "8.1.5",
100
- "vitest": "4.1.9",
106
+ "vite": "8.2.2",
107
+ "vitest": "4.1.10",
101
108
  "node": "runtime:24.15.0"
102
109
  },
103
110
  "scripts": {
@@ -118,6 +125,8 @@
118
125
  "fmt": "oxfmt .",
119
126
  "fmt:check": "oxfmt --check .",
120
127
  "test": "stencil build && vitest run",
128
+ "test:stories": "stencil build && vitest run --project storybook-light --project storybook-dark",
129
+ "test:visual:update": "pnpm run test:stories --update",
121
130
  "test:docs": "node --test \"scripts/**/*.test.mjs\"",
122
131
  "test:mcp": "pnpm run build:mcp && pnpm --filter @alleninstitute/cortex-ui-mcp run test",
123
132
  "test:watch": "stencil build && concurrently -c blue,magenta \"stencil build --watch\" \"vitest\"",