@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.
- package/README.md +101 -79
- 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 +46 -0
- 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 +4 -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 +102 -0
- package/dist/collection/components/cui-progress/cui-progress.js +187 -0
- 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.d.ts +11 -0
- package/dist/components/cui-progress.js +1 -0
- 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 +44 -0
- 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-progress/cui-progress.d.ts +40 -0
- package/dist/types/components/cui-tag/cui-tag.d.ts +1 -1
- package/dist/types/components.d.ts +343 -5
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/package.json +31 -22
- package/dist/cjs/index-Rxdz0vyq.js +0 -1337
- 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-054ebfa8.entry.js +0 -1
- package/dist/cortex-ui/p-C70YK15K.js +0 -2
- package/dist/esm/index-C70YK15K.js +0 -1330
package/dist/esm/loader.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { g as globalScripts, b as bootstrapLazy } from './index-BZmInLSX.js';
|
|
2
|
+
export { s as setNonce } from './index-BZmInLSX.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["cui-tag",[[1,"cui-tag",{"label":[1],"variant":[1],"size":[1]}]]]], options);
|
|
7
|
+
return bootstrapLazy([["cui-divider",[[1,"cui-divider",{"orientation":[513],"spacing":[513],"variant":[1],"importance":[1]}]]],["cui-icon",[[257,"cui-icon",{"icon":[1],"variant":[1],"importance":[1],"size":[1],"label":[1]},null,{"icon":[{"onIconChange":0}],"label":[{"onLabelChange":0}]}]]],["cui-progress",[[1,"cui-progress",{"label":[1],"value":[2],"max":[2],"indeterminate":[4],"size":[1],"showValue":[4,"show-value"]}]]],["cui-tag",[[1,"cui-tag",{"label":[1],"variant":[1],"size":[1]}]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/fonts.css
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
* Allen Institute web fonts
|
|
3
|
+
* ============================================
|
|
4
|
+
*
|
|
5
|
+
* `@font-face` is document-scoped, so these rules cannot live in `global.scss`:
|
|
6
|
+
* Stencil only ever adopts the global style into a component's shadow root, and font
|
|
7
|
+
* faces declared inside a shadow tree are ignored. Loading this file at the document
|
|
8
|
+
* level registers the faces once for the whole page, shadow DOM included.
|
|
9
|
+
*
|
|
10
|
+
* Consumers import it from the package root:
|
|
11
|
+
*
|
|
12
|
+
* import '@alleninstitute/cortex-ui/fonts.css';
|
|
13
|
+
*
|
|
14
|
+
* The `url()` paths are relative to this file, and the build copies this stylesheet and
|
|
15
|
+
* the `fonts/` directory beside it into `dist/` keeping that layout (see the `copy` tasks
|
|
16
|
+
* in stencil.config.ts), so the same paths resolve in this repo, through a consumer's
|
|
17
|
+
* bundler, and straight from a CDN.
|
|
18
|
+
*
|
|
19
|
+
* Only WOFF2 is shipped: every browser that can run these components supports it, and a
|
|
20
|
+
* WOFF fallback would double the payload for browsers nobody is targeting.
|
|
21
|
+
*
|
|
22
|
+
* The families are exposed as `--cui-font-family-base` (text) and
|
|
23
|
+
* `--cui-font-family-headline`; prefer those tokens over naming a family directly.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* Allen Institute Text */
|
|
27
|
+
@font-face {
|
|
28
|
+
font-family: 'Allen Institute Text';
|
|
29
|
+
src: url('./fonts/AllenInstituteText-Light.woff2') format('woff2');
|
|
30
|
+
font-weight: 300;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: 'Allen Institute Text';
|
|
37
|
+
src: url('./fonts/AllenInstituteText-LightItalic.woff2') format('woff2');
|
|
38
|
+
font-weight: 300;
|
|
39
|
+
font-style: italic;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'Allen Institute Text';
|
|
45
|
+
src: url('./fonts/AllenInstituteText-Regular.woff2') format('woff2');
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-display: swap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@font-face {
|
|
52
|
+
font-family: 'Allen Institute Text';
|
|
53
|
+
src: url('./fonts/AllenInstituteText-Italic.woff2') format('woff2');
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
font-style: italic;
|
|
56
|
+
font-display: swap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@font-face {
|
|
60
|
+
font-family: 'Allen Institute Text';
|
|
61
|
+
src: url('./fonts/AllenInstituteText-Medium.woff2') format('woff2');
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
font-style: normal;
|
|
64
|
+
font-display: swap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@font-face {
|
|
68
|
+
font-family: 'Allen Institute Text';
|
|
69
|
+
src: url('./fonts/AllenInstituteText-MediumItalic.woff2') format('woff2');
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
font-style: italic;
|
|
72
|
+
font-display: swap;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@font-face {
|
|
76
|
+
font-family: 'Allen Institute Text';
|
|
77
|
+
src: url('./fonts/AllenInstituteText-Semibold.woff2') format('woff2');
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
font-style: normal;
|
|
80
|
+
font-display: swap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@font-face {
|
|
84
|
+
font-family: 'Allen Institute Text';
|
|
85
|
+
src: url('./fonts/AllenInstituteText-SemiboldItalic.woff2') format('woff2');
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
font-style: italic;
|
|
88
|
+
font-display: swap;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@font-face {
|
|
92
|
+
font-family: 'Allen Institute Text';
|
|
93
|
+
src: url('./fonts/AllenInstituteText-Bold.woff2') format('woff2');
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
font-style: normal;
|
|
96
|
+
font-display: swap;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@font-face {
|
|
100
|
+
font-family: 'Allen Institute Text';
|
|
101
|
+
src: url('./fonts/AllenInstituteText-BoldItalic.woff2') format('woff2');
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
font-style: italic;
|
|
104
|
+
font-display: swap;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Allen Institute Headline */
|
|
108
|
+
@font-face {
|
|
109
|
+
font-family: 'Allen Institute Headline';
|
|
110
|
+
src: url('./fonts/AllenInstituteHeadline-Light.woff2') format('woff2');
|
|
111
|
+
font-weight: 300;
|
|
112
|
+
font-style: normal;
|
|
113
|
+
font-display: swap;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@font-face {
|
|
117
|
+
font-family: 'Allen Institute Headline';
|
|
118
|
+
src: url('./fonts/AllenInstituteHeadline-LightItalic.woff2') format('woff2');
|
|
119
|
+
font-weight: 300;
|
|
120
|
+
font-style: italic;
|
|
121
|
+
font-display: swap;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@font-face {
|
|
125
|
+
font-family: 'Allen Institute Headline';
|
|
126
|
+
src: url('./fonts/AllenInstituteHeadline-Regular.woff2') format('woff2');
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
font-style: normal;
|
|
129
|
+
font-display: swap;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@font-face {
|
|
133
|
+
font-family: 'Allen Institute Headline';
|
|
134
|
+
src: url('./fonts/AllenInstituteHeadline-Italic.woff2') format('woff2');
|
|
135
|
+
font-weight: 400;
|
|
136
|
+
font-style: italic;
|
|
137
|
+
font-display: swap;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@font-face {
|
|
141
|
+
font-family: 'Allen Institute Headline';
|
|
142
|
+
src: url('./fonts/AllenInstituteHeadline-Medium.woff2') format('woff2');
|
|
143
|
+
font-weight: 500;
|
|
144
|
+
font-style: normal;
|
|
145
|
+
font-display: swap;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@font-face {
|
|
149
|
+
font-family: 'Allen Institute Headline';
|
|
150
|
+
src: url('./fonts/AllenInstituteHeadline-MediumItalic.woff2') format('woff2');
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
font-style: italic;
|
|
153
|
+
font-display: swap;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@font-face {
|
|
157
|
+
font-family: 'Allen Institute Headline';
|
|
158
|
+
src: url('./fonts/AllenInstituteHeadline-Semibold.woff2') format('woff2');
|
|
159
|
+
font-weight: 600;
|
|
160
|
+
font-style: normal;
|
|
161
|
+
font-display: swap;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@font-face {
|
|
165
|
+
font-family: 'Allen Institute Headline';
|
|
166
|
+
src: url('./fonts/AllenInstituteHeadline-SemiboldItalic.woff2') format('woff2');
|
|
167
|
+
font-weight: 600;
|
|
168
|
+
font-style: italic;
|
|
169
|
+
font-display: swap;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@font-face {
|
|
173
|
+
font-family: 'Allen Institute Headline';
|
|
174
|
+
src: url('./fonts/AllenInstituteHeadline-Bold.woff2') format('woff2');
|
|
175
|
+
font-weight: 700;
|
|
176
|
+
font-style: normal;
|
|
177
|
+
font-display: swap;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@font-face {
|
|
181
|
+
font-family: 'Allen Institute Headline';
|
|
182
|
+
src: url('./fonts/AllenInstituteHeadline-BoldItalic.woff2') format('woff2');
|
|
183
|
+
font-weight: 700;
|
|
184
|
+
font-style: italic;
|
|
185
|
+
font-display: swap;
|
|
186
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Divider drawing a rule between sections of content, or between items in a row.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <cui-divider></cui-divider>
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <cui-divider orientation="vertical" spacing="small"></cui-divider>
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <cui-divider variant="accent" importance="secondary"></cui-divider>
|
|
12
|
+
*
|
|
13
|
+
* @part base - The rule itself, for consumer-side style overrides.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CuiDivider {
|
|
16
|
+
/**
|
|
17
|
+
* Which way the rule runs. A vertical divider stretches to the height of the flex row
|
|
18
|
+
* it sits in.
|
|
19
|
+
*/
|
|
20
|
+
orientation: 'horizontal' | 'vertical';
|
|
21
|
+
/** Space reserved on either side of the rule, along the axis it separates. */
|
|
22
|
+
spacing: 'none' | 'small' | 'medium' | 'large';
|
|
23
|
+
/**
|
|
24
|
+
* Which intent's `divider` colour the rule is drawn in. `base` is the intent-free rule for
|
|
25
|
+
* ordinary page chrome; the seven intents tint a divider that sits inside a component
|
|
26
|
+
* already carrying that intent, such as a rule between rows of a negative-intent alert.
|
|
27
|
+
*/
|
|
28
|
+
variant: 'base' | 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
29
|
+
/**
|
|
30
|
+
* Which of the two `divider` importances the rule is drawn from. Match it to the importance of
|
|
31
|
+
* the surface the divider sits on — `secondary` on a quiet tint, `primary` on a saturated fill —
|
|
32
|
+
* rather than treating it as a loudness control: on a secondary surface the primary rule is the
|
|
33
|
+
* *less* perceivable of the two. For `base`, whose surface is the page itself, `primary` is
|
|
34
|
+
* simply the stronger of the two rules.
|
|
35
|
+
*/
|
|
36
|
+
importance: 'primary' | 'secondary';
|
|
37
|
+
render(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An Icon component that renders a Font Awesome glyph with cortex-ui's semantic colours and sizes.
|
|
3
|
+
*
|
|
4
|
+
* Font Awesome itself is **not** bundled — the consuming application loads a Font Awesome
|
|
5
|
+
* stylesheet (the free set, or a licensed pro build) and `icon` takes the raw Font Awesome
|
|
6
|
+
* classes. Any Font Awesome utility class can be passed along in the same string, so
|
|
7
|
+
* `icon="fa-solid fa-spinner fa-spin"` works without this component knowing about `fa-spin`.
|
|
8
|
+
*
|
|
9
|
+
* Loading that stylesheet is the human application owner's responsibility, never an agent's: an AI
|
|
10
|
+
* agent writing `cui-icon` markup must not install a Font Awesome package, add the stylesheet to
|
|
11
|
+
* the page, or invent a Pro Kit URL — it should write the markup and tell the person their page
|
|
12
|
+
* needs Font Awesome. Icons rendering as empty boxes in a page with no Font Awesome is the
|
|
13
|
+
* expected result, not a bug to code around.
|
|
14
|
+
*
|
|
15
|
+
* Icons are decorative by default and hidden from assistive technology. Set `label` only when the
|
|
16
|
+
* icon carries meaning that the surrounding text does not already convey.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <cui-icon icon="fa-solid fa-user"></cui-icon>
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <cui-icon icon="fa-solid fa-triangle-exclamation" variant="warning" size="l"></cui-icon>
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <cui-icon icon="fa-solid fa-trash" label="Delete item"></cui-icon>
|
|
26
|
+
*
|
|
27
|
+
* @slot - The glyph element. This component creates and owns it, so do not place your own
|
|
28
|
+
* content in `cui-icon` — anything else you slot here is hidden.
|
|
29
|
+
* @part base - The root element, for consumer-side style overrides.
|
|
30
|
+
* @cssprop --cui-icon-color - Overrides the colour chosen by `variant` and `importance`. Set it to
|
|
31
|
+
* `currentColor` to make the icon follow the text colour of whatever surrounds it.
|
|
32
|
+
* @cssprop --cui-icon-size - Overrides the size chosen by `size`.
|
|
33
|
+
*/
|
|
34
|
+
export declare class CuiIcon {
|
|
35
|
+
private el;
|
|
36
|
+
/**
|
|
37
|
+
* The Font Awesome classes naming the icon, e.g. `fa-solid fa-user`. The style is part of the
|
|
38
|
+
* string, so `fa-regular`, `fa-brands` and licensed pro styles like `fa-duotone` all work.
|
|
39
|
+
* Required — there is no sensible fallback glyph.
|
|
40
|
+
*/
|
|
41
|
+
icon: string;
|
|
42
|
+
/**
|
|
43
|
+
* Semantic colour set. `base` is the intent-free choice for ordinary content and is correct on
|
|
44
|
+
* a plain page background; the intents are for an icon that sits on that intent's surface.
|
|
45
|
+
* This is styling, not semantics — never let colour be the only thing conveying meaning.
|
|
46
|
+
*/
|
|
47
|
+
variant: 'accent' | 'base' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
48
|
+
/**
|
|
49
|
+
* Which rung of the `text` token family to use. It tracks the surface the icon sits on:
|
|
50
|
+
* `primary` belongs on that variant's primary surface, `secondary` on its secondary surface or
|
|
51
|
+
* on a plain background. Pairing an intent's `primary` text with a plain page background is
|
|
52
|
+
* outside the token system's design and will not be legible.
|
|
53
|
+
*/
|
|
54
|
+
importance: 'primary' | 'secondary';
|
|
55
|
+
/** Size of the glyph, from the font-size token scale. */
|
|
56
|
+
size: 'display-l' | 'display-m' | 'display-s' | 'l' | 'm' | 's' | 'xl' | 'xs' | 'xxl' | 'xxs';
|
|
57
|
+
/**
|
|
58
|
+
* Accessible name, for an icon that carries meaning on its own — an icon-only button, or a
|
|
59
|
+
* status glyph with no adjacent text. Leave it unset for a decorative icon beside text, which
|
|
60
|
+
* is the common case; the icon is then hidden from assistive technology so screen readers do
|
|
61
|
+
* not announce it twice.
|
|
62
|
+
*/
|
|
63
|
+
label?: string;
|
|
64
|
+
connectedCallback(): void;
|
|
65
|
+
onIconChange(): void;
|
|
66
|
+
onLabelChange(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Creates or updates the light-DOM glyph. Queries rather than caching a node reference, so it
|
|
69
|
+
* is idempotent: connectedCallback fires again every time the host is moved in the DOM, and a
|
|
70
|
+
* cached reference can also go stale (see below).
|
|
71
|
+
*/
|
|
72
|
+
private syncGlyph;
|
|
73
|
+
/** An icon is either named or hidden — never both, and never named with an empty string. */
|
|
74
|
+
private syncAria;
|
|
75
|
+
render(): any;
|
|
76
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Progress component showing how far along a task is, as a bar with an accessible value.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <cui-progress label="Uploading files" value="40" show-value="true"></cui-progress>
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <cui-progress label="Loading results" indeterminate="true"></cui-progress>
|
|
9
|
+
*
|
|
10
|
+
* @part base - The root element, for consumer-side style overrides.
|
|
11
|
+
* @part bar - The native progress element: the track, and the fill that grows across it.
|
|
12
|
+
* @part value - The percentage text rendered when `show-value` is set.
|
|
13
|
+
* @cssprop --cui-progress-track-color - Colour of the unfilled track.
|
|
14
|
+
* @cssprop --cui-progress-indicator-color - Colour of the filled portion, for status bars in another intent.
|
|
15
|
+
*/
|
|
16
|
+
export declare class CuiProgress {
|
|
17
|
+
/**
|
|
18
|
+
* Accessible name for the bar, describing what is in progress ("Uploading files").
|
|
19
|
+
* Required — a progress bar with no name fails the accessibility gate.
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
/** How much of the task is done, clamped to the range `0`–`max`. */
|
|
23
|
+
value: number;
|
|
24
|
+
/** The value that counts as complete. */
|
|
25
|
+
max: number;
|
|
26
|
+
/**
|
|
27
|
+
* Animates continuously instead of showing a value. Use it only while the total amount
|
|
28
|
+
* of work is genuinely unknown — prefer a real `value` whenever the work reports one.
|
|
29
|
+
*/
|
|
30
|
+
indeterminate: boolean;
|
|
31
|
+
/** Thickness of the bar. */
|
|
32
|
+
size: 'small' | 'medium' | 'large';
|
|
33
|
+
/** Renders the completed percentage as text beside the bar. Ignored when indeterminate. */
|
|
34
|
+
showValue: boolean;
|
|
35
|
+
/** `max` is only meaningful above zero; anything else falls back to a percentage scale. */
|
|
36
|
+
private get resolvedMax();
|
|
37
|
+
private get clampedValue();
|
|
38
|
+
private get percent();
|
|
39
|
+
render(): any;
|
|
40
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class CuiTag {
|
|
8
8
|
label: string;
|
|
9
|
-
variant: '
|
|
9
|
+
variant: 'accent' | 'highlight' | 'info' | 'negative' | 'neutral' | 'positive' | 'warning';
|
|
10
10
|
size: 'small' | 'medium';
|
|
11
11
|
render(): any;
|
|
12
12
|
}
|