@alleninstitute/cortex-ui 0.2.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.
- package/README.md +52 -8
- package/dist/cjs/cortex-ui.cjs.js +3 -3
- package/dist/cjs/cui-divider.cjs.entry.js +49 -0
- package/dist/cjs/cui-icon.cjs.entry.js +100 -0
- package/dist/cjs/cui-progress.cjs.entry.js +4 -4
- package/dist/cjs/cui-tag.cjs.entry.js +4 -4
- package/dist/cjs/index-RBrlguTk.js +1565 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/cui-divider/cui-divider.css +100 -0
- package/dist/collection/components/cui-divider/cui-divider.js +150 -0
- package/dist/collection/components/cui-icon/cui-icon.css +134 -0
- package/dist/collection/components/cui-icon/cui-icon.js +239 -0
- package/dist/collection/components/cui-progress/cui-progress.css +12 -12
- package/dist/collection/components/cui-progress/cui-progress.js +2 -2
- package/dist/collection/components/cui-tag/cui-tag.css +19 -19
- package/dist/collection/components/cui-tag/cui-tag.js +5 -5
- package/dist/components/cui-divider.d.ts +11 -0
- package/dist/components/cui-divider.js +1 -0
- package/dist/components/cui-icon.d.ts +11 -0
- package/dist/components/cui-icon.js +1 -0
- package/dist/components/cui-progress.js +1 -1
- package/dist/components/cui-tag.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/cortex-ui/cortex-ui.css +1 -1
- package/dist/cortex-ui/cortex-ui.esm.js +1 -1
- package/dist/cortex-ui/p-0e66a721.entry.js +1 -0
- package/dist/cortex-ui/p-1af73c5a.entry.js +1 -0
- package/dist/cortex-ui/p-2d2004f0.entry.js +1 -0
- package/dist/cortex-ui/p-8925abbe.entry.js +1 -0
- package/dist/cortex-ui/p-BZmInLSX.js +3 -0
- package/dist/esm/cortex-ui.js +4 -4
- package/dist/esm/cui-divider.entry.js +47 -0
- package/dist/esm/cui-icon.entry.js +98 -0
- package/dist/esm/cui-progress.entry.js +4 -4
- package/dist/esm/cui-tag.entry.js +4 -4
- package/dist/esm/index-BZmInLSX.js +1557 -0
- package/dist/esm/loader.js +3 -3
- package/dist/fonts/AllenInstituteHeadline-Bold.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-BoldItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-Italic.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-Light.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-LightItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-Medium.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-MediumItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-Regular.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-Semibold.woff2 +0 -0
- package/dist/fonts/AllenInstituteHeadline-SemiboldItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Bold.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-BoldItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Italic.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Light.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-LightItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Medium.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-MediumItalic.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Regular.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-Semibold.woff2 +0 -0
- package/dist/fonts/AllenInstituteText-SemiboldItalic.woff2 +0 -0
- package/dist/fonts.css +186 -0
- package/dist/types/components/cui-divider/cui-divider.d.ts +38 -0
- package/dist/types/components/cui-icon/cui-icon.d.ts +76 -0
- package/dist/types/components/cui-tag/cui-tag.d.ts +1 -1
- package/dist/types/components.d.ts +235 -6
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/package.json +31 -22
- package/dist/cjs/index-CJFDVa2g.js +0 -1415
- package/dist/collection/stories/assets/accessibility.svg +0 -1
- package/dist/collection/stories/assets/discord.svg +0 -1
- package/dist/collection/stories/assets/github.svg +0 -1
- package/dist/collection/stories/assets/tutorials.svg +0 -1
- package/dist/collection/stories/assets/youtube.svg +0 -1
- package/dist/cortex-ui/p-371566cd.entry.js +0 -1
- package/dist/cortex-ui/p-60c5b038.entry.js +0 -1
- package/dist/cortex-ui/p-DbXnQj5f.js +0 -2
- package/dist/esm/index-DbXnQj5f.js +0 -1408
|
@@ -6,6 +6,79 @@
|
|
|
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
|
+
}
|
|
9
82
|
/**
|
|
10
83
|
* A Progress component showing how far along a task is, as a bar with an accessible value.
|
|
11
84
|
* @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
|
|
@@ -58,12 +131,50 @@ export namespace Components {
|
|
|
58
131
|
*/
|
|
59
132
|
"size": 'small' | 'medium';
|
|
60
133
|
/**
|
|
61
|
-
* @default '
|
|
134
|
+
* @default 'neutral'
|
|
62
135
|
*/
|
|
63
|
-
"variant": '
|
|
136
|
+
"variant": 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
64
137
|
}
|
|
65
138
|
}
|
|
66
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
|
+
};
|
|
67
178
|
/**
|
|
68
179
|
* A Progress component showing how far along a task is, as a bar with an accessible value.
|
|
69
180
|
* @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
|
|
@@ -88,13 +199,88 @@ declare global {
|
|
|
88
199
|
new (): HTMLCuiTagElement;
|
|
89
200
|
};
|
|
90
201
|
interface HTMLElementTagNameMap {
|
|
202
|
+
"cui-divider": HTMLCuiDividerElement;
|
|
203
|
+
"cui-icon": HTMLCuiIconElement;
|
|
91
204
|
"cui-progress": HTMLCuiProgressElement;
|
|
92
205
|
"cui-tag": HTMLCuiTagElement;
|
|
93
206
|
}
|
|
94
207
|
}
|
|
95
208
|
declare namespace LocalJSX {
|
|
96
|
-
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}`
|
|
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 };
|
|
97
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
|
+
}
|
|
98
284
|
/**
|
|
99
285
|
* A Progress component showing how far along a task is, as a bar with an accessible value.
|
|
100
286
|
* @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
|
|
@@ -147,11 +333,24 @@ declare namespace LocalJSX {
|
|
|
147
333
|
*/
|
|
148
334
|
"size"?: 'small' | 'medium';
|
|
149
335
|
/**
|
|
150
|
-
* @default '
|
|
336
|
+
* @default 'neutral'
|
|
151
337
|
*/
|
|
152
|
-
"variant"?: '
|
|
338
|
+
"variant"?: 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
153
339
|
}
|
|
154
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
|
+
}
|
|
155
354
|
interface CuiProgressAttributes {
|
|
156
355
|
"label": string;
|
|
157
356
|
"value": number;
|
|
@@ -162,11 +361,13 @@ declare namespace LocalJSX {
|
|
|
162
361
|
}
|
|
163
362
|
interface CuiTagAttributes {
|
|
164
363
|
"label": string;
|
|
165
|
-
"variant": '
|
|
364
|
+
"variant": 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
166
365
|
"size": 'small' | 'medium';
|
|
167
366
|
}
|
|
168
367
|
|
|
169
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"]>;
|
|
170
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"]>;
|
|
171
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] };
|
|
172
373
|
}
|
|
@@ -175,6 +376,34 @@ export { LocalJSX as JSX };
|
|
|
175
376
|
declare module "@stencil/core" {
|
|
176
377
|
export namespace JSX {
|
|
177
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>;
|
|
178
407
|
/**
|
|
179
408
|
* A Progress component showing how far along a task is, as a bar with an accessible value.
|
|
180
409
|
* @example <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
|
|
@@ -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.
|
|
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
|
-
"@
|
|
75
|
-
"@stencil/
|
|
76
|
-
"@stencil/
|
|
77
|
-
"@
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/addon-
|
|
82
|
-
"@storybook/
|
|
83
|
-
"@
|
|
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.
|
|
93
|
+
"concurrently": "10.0.5",
|
|
87
94
|
"git-cliff": "2.13.1",
|
|
88
|
-
"happy-dom": "20.
|
|
89
|
-
"lefthook": "2.1.
|
|
90
|
-
"oxfmt": "0.
|
|
91
|
-
"oxlint": "1.
|
|
92
|
-
"playwright": "
|
|
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.
|
|
96
|
-
"storybook": "10.
|
|
97
|
-
"typescript": "
|
|
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.
|
|
100
|
-
"vitest": "4.1.
|
|
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\"",
|