@cloudgrid-io/ui 0.51.1 → 0.52.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/dist/blocks/avatar.d.ts +1 -1
- package/dist/blocks/avatar.d.ts.map +1 -1
- package/dist/blocks/avatar.js +13 -5
- package/dist/blocks/avatar.js.map +1 -1
- package/dist/blocks/filter-tabs.d.ts +17 -1
- package/dist/blocks/filter-tabs.d.ts.map +1 -1
- package/dist/blocks/filter-tabs.js +20 -4
- package/dist/blocks/filter-tabs.js.map +1 -1
- package/dist/blocks/header-menu.d.ts +9 -1
- package/dist/blocks/header-menu.d.ts.map +1 -1
- package/dist/blocks/header-menu.js +12 -2
- package/dist/blocks/header-menu.js.map +1 -1
- package/dist/blocks/ranked-list.d.ts +15 -1
- package/dist/blocks/ranked-list.d.ts.map +1 -1
- package/dist/blocks/ranked-list.js +6 -2
- package/dist/blocks/ranked-list.js.map +1 -1
- package/dist/blocks/scatter.d.ts +17 -2
- package/dist/blocks/scatter.d.ts.map +1 -1
- package/dist/blocks/scatter.js +3 -2
- package/dist/blocks/scatter.js.map +1 -1
- package/dist/blocks/side-nav.d.ts +8 -1
- package/dist/blocks/side-nav.d.ts.map +1 -1
- package/dist/blocks/side-nav.js +47 -22
- package/dist/blocks/side-nav.js.map +1 -1
- package/dist/console.css +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/cloudgrid-cn.d.ts +1 -1
- package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
- package/dist/lib/cloudgrid-cn.js +2 -0
- package/dist/lib/cloudgrid-cn.js.map +1 -1
- package/dist/theme.css +10 -0
- package/dist/tokens/base.json +50 -1
- package/dist/tokens/surface-ink.json +9 -0
- package/dist/tokens/surface-panel.json +9 -0
- package/dist/tokens.css +52 -1
- package/dist/tokens.json +8 -1
- package/dist/ui/count-bubble.d.ts +68 -0
- package/dist/ui/count-bubble.d.ts.map +1 -0
- package/dist/ui/count-bubble.js +89 -0
- package/dist/ui/count-bubble.js.map +1 -0
- package/dist/ui/kbd.d.ts +38 -0
- package/dist/ui/kbd.d.ts.map +1 -0
- package/dist/ui/kbd.js +45 -0
- package/dist/ui/kbd.js.map +1 -0
- package/package.json +1 -1
package/dist/blocks/side-nav.js
CHANGED
|
@@ -28,8 +28,9 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
28
28
|
* `SideNav` the `<nav>` landmark, the context slot, and the keyboard.
|
|
29
29
|
* `SideNavGroup` an eyebrow-labelled run of rows (APP, MANAGE), or a
|
|
30
30
|
* collapsible one with a header of its own (Build & run).
|
|
31
|
-
* `SideNavItem` one row: a glyph, a label, an optional
|
|
32
|
-
* it is the page
|
|
31
|
+
* `SideNavItem` one row: a glyph, a label, an optional caption line under
|
|
32
|
+
* it (ui#476), an optional count, and whether it is the page
|
|
33
|
+
* you are on.
|
|
33
34
|
*
|
|
34
35
|
* ## The keyboard
|
|
35
36
|
*
|
|
@@ -57,24 +58,25 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
57
58
|
* ## The active row does not flip, and that is the decision
|
|
58
59
|
*
|
|
59
60
|
* The active row is a lavender chip, `--cg-primary-20` (Figma "Primary 20",
|
|
60
|
-
* #DEDAFC), with the label and the FILLED glyph both in `--cg-primary`
|
|
61
|
-
* the
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
61
|
+
* #DEDAFC), with the label and the FILLED glyph both in `--cg-primary-press`
|
|
62
|
+
* (#4B39DB, ui#477), the colour the selected `Badge` already puts on the same
|
|
63
|
+
* fill (ui#454). From #436 until ui#477 they were `--cg-primary`; before #436
|
|
64
|
+
* the chip was `--cg-primary-tint` with an ink label (#377), and before that
|
|
65
|
+
* the label was purple too. The ground and the purple are both declared at
|
|
66
|
+
* `:root` only, so the row paints the same two values on the page, on the
|
|
65
67
|
* purple panel and on ink — and that is the point rather than an oversight.
|
|
66
68
|
*
|
|
67
69
|
* It is the kind badge's rule (#196) applied to a row: the chip brings its own
|
|
68
70
|
* ground, so it does not need the surface's answer for one.
|
|
69
71
|
*
|
|
70
|
-
* CONTRAST
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* against the
|
|
76
|
-
* `packages/ui/test/contrast-guardrail.test.mjs`
|
|
77
|
-
*
|
|
72
|
+
* CONTRAST (ui#477). Primary press on Primary 20 measures 5.34:1, over the
|
|
73
|
+
* 4.5:1 AA floor for the 15px label, on every surface, since neither value
|
|
74
|
+
* flips. Primary there, as #436 had it, measures 4.32:1, under the floor; that
|
|
75
|
+
* is the gap ui#477 closed, with fill, weight and layout unchanged. The glyph
|
|
76
|
+
* is non-text and clears 3:1 at the same 5.34. The chip measures 1.35:1
|
|
77
|
+
* against the white card, 1.20:1 on the page ground, 4.32:1 against the panel
|
|
78
|
+
* and 11.77:1 on ink. `packages/ui/test/contrast-guardrail.test.mjs` measures
|
|
79
|
+
* the pair in every scope, so a retune under the floor goes red.
|
|
78
80
|
*
|
|
79
81
|
* The state is said three ways: the chip, the glyph's SHAPE (filled, when the
|
|
80
82
|
* caller hands `activeIcon`), and `aria-current`. An inactive row's glyph is
|
|
@@ -201,7 +203,25 @@ function SideNavGroup({ label, icon, collapsible, open, defaultOpen = false, onO
|
|
|
201
203
|
// is continuous with the panel opening under it.
|
|
202
204
|
className: cn("size-4 shrink-0 transition-transform duration-[var(--cg-duration)] ease-out", isOpen ? "rotate-0" : "-rotate-90") })] }), _jsx("div", { id: panelId, hidden: !isOpen, className: isOpen ? "pl-3" : undefined, children: rows })] }));
|
|
203
205
|
}
|
|
204
|
-
|
|
206
|
+
/**
|
|
207
|
+
* The label with its caption under it (ui#476): one column, so the caption
|
|
208
|
+
* wraps under the label rather than beside it. Only drawn when there is a
|
|
209
|
+
* caption; a row without one keeps the single label span it always had.
|
|
210
|
+
*
|
|
211
|
+
* The caption is the caption role (`text-caption`, 13/1.46) at regular weight,
|
|
212
|
+
* and it WRAPS: the Console's admin rail writes one sentence per row and a
|
|
213
|
+
* reader gets all of it. The label above stays truncated on its 20px line box.
|
|
214
|
+
*
|
|
215
|
+
* Its colour follows the row. An inactive row's caption is `faint-strong`, the
|
|
216
|
+
* muted rung that clears 4.5:1 on all four grounds (#232, ui#444) and flips
|
|
217
|
+
* with the surface. The active chip does not flip, so on it the caption takes
|
|
218
|
+
* the chip's own Primary press (5.34:1 on Primary 20, ui#477); a flipping muted
|
|
219
|
+
* rung there would be near-white on lavender inside the panel.
|
|
220
|
+
*/
|
|
221
|
+
function SideNavItemText({ label, caption, active, }) {
|
|
222
|
+
return (_jsxs("span", { "data-slot": "side-nav-text", className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("span", { className: "min-w-0 truncate leading-5", children: label }), _jsx("span", { "data-slot": "side-nav-caption", className: cn("text-caption font-normal", active ? "text-brand-press" : "text-faint-strong"), children: caption })] }));
|
|
223
|
+
}
|
|
224
|
+
function SideNavItem({ label, caption, icon, activeIcon, count, active, render, className, onKeyDown, ...props }) {
|
|
205
225
|
function handleKeyDown(event) {
|
|
206
226
|
onKeyDown?.(event);
|
|
207
227
|
if (event.defaultPrevented)
|
|
@@ -217,6 +237,7 @@ function SideNavItem({ label, icon, activeIcon, count, active, render, className
|
|
|
217
237
|
el.click();
|
|
218
238
|
}
|
|
219
239
|
const glyph = active && activeIcon ? activeIcon : icon;
|
|
240
|
+
const hasCaption = caption !== undefined && caption !== null && caption !== false && caption !== "";
|
|
220
241
|
return useRender({
|
|
221
242
|
render,
|
|
222
243
|
defaultTagName: "button",
|
|
@@ -233,18 +254,22 @@ function SideNavItem({ label, icon, activeIcon, count, active, render, className
|
|
|
233
254
|
className: cn(ROW, active
|
|
234
255
|
? // The self-contained chip. See the module note for the numbers and
|
|
235
256
|
// for why it is the same two values on all three surfaces. Primary
|
|
236
|
-
// 20 under Primary (#
|
|
237
|
-
// inside a panel.
|
|
238
|
-
"bg-brand-20 text-brand"
|
|
239
|
-
: "text-ink hover:bg-(--cg-hover)",
|
|
257
|
+
// 20 (#436) under Primary press (ui#477, 5.34:1); both are
|
|
258
|
+
// :root-only, so neither flips inside a panel.
|
|
259
|
+
"bg-brand-20 text-brand-press"
|
|
260
|
+
: "text-ink hover:bg-(--cg-hover)",
|
|
261
|
+
// With a caption the text is two or more lines, and the glyph and the
|
|
262
|
+
// count line up with the label's line rather than centring on the
|
|
263
|
+
// block. The label's line box and the glyph are both 20px.
|
|
264
|
+
hasCaption && "items-start", className),
|
|
240
265
|
// The row's content is composed from the three slots rather than taken as
|
|
241
266
|
// `children`, which is why `children` is omitted from the props type: a
|
|
242
267
|
// caller who could pass both would have two ways to fill one row and no
|
|
243
268
|
// rule about which wins.
|
|
244
269
|
children: (_jsxs(_Fragment, { children: [glyph ? (_jsx("span", { "data-slot": "side-nav-icon", className: cn(GLYPH, active
|
|
245
|
-
? "text-brand"
|
|
270
|
+
? "text-brand-press"
|
|
246
271
|
: // N3, and the surface's own muted text where N3 vanishes.
|
|
247
|
-
"text-steel in-data-[cg-surface=panel]:text-faint in-data-[cg-surface=ink]:text-faint"), children: glyph })) : null, _jsx("span", { className: "min-w-0 flex-1 truncate leading-5", children: label }), count === undefined ? null : (_jsx("span", { "data-slot": "side-nav-count",
|
|
272
|
+
"text-steel in-data-[cg-surface=panel]:text-faint in-data-[cg-surface=ink]:text-faint"), children: glyph })) : null, hasCaption ? (_jsx(SideNavItemText, { label: label, caption: caption, active: active })) : (_jsx("span", { className: "min-w-0 flex-1 truncate leading-5", children: label })), count === undefined ? null : (_jsx("span", { "data-slot": "side-nav-count",
|
|
248
273
|
// The wash again, for the reason the hover uses it: a pale grey
|
|
249
274
|
// pill named `bg-raised` is neutral-50 at :root only, so it would
|
|
250
275
|
// be a near-white pill on the purple panel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-nav.js","sourceRoot":"","sources":["../../src/blocks/side-nav.tsx"],"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-preset.test.mjs pins it. The two sizes sit on the same three
|
|
112
112
|
selectors, so any surface that ever re-declares a size is overridden too.
|
|
113
113
|
|
|
114
|
+
[data-theme='default'] IS THE FOURTH, AND IT IS NOT OPTIONAL (#482).
|
|
115
|
+
tokens.css declares its defaults on `:root, [data-theme='default']`, so an
|
|
116
|
+
element carrying that attribute re-declares every type token at the library
|
|
117
|
+
default for everything inside it. Library pieces use it to lay white paper
|
|
118
|
+
over a picture or a purple panel: EntityCard's hover panel, OnboardWidget,
|
|
119
|
+
RequestCard, Notice, ExpiryNotice (from an email), CompareTable,
|
|
120
|
+
FeatureCells, ShowcaseScroll and Logo. Without this selector the preset
|
|
121
|
+
stopped at that edge: the hover panel's title measured 15px in the Console,
|
|
122
|
+
next to 14px card text. test/type-roles-482.test.mjs reads tokens.css and
|
|
123
|
+
requires this file to cover every selector that declares one of its tokens.
|
|
124
|
+
|
|
114
125
|
WHO IMPORTS IT. The Console first. Any product whose body type is the UI face
|
|
115
126
|
imports the same file; nothing here is named for the Console except this
|
|
116
127
|
sentence.
|
|
117
128
|
*/
|
|
118
129
|
|
|
119
130
|
:root,
|
|
131
|
+
[data-theme='default'],
|
|
120
132
|
[data-cg-surface='panel'],
|
|
121
133
|
[data-cg-surface='ink'] {
|
|
122
134
|
--cg-font-body: var(--cg-font-ui);
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ export * from "./ui/carousel.js";
|
|
|
6
6
|
export * from "./ui/checkbox.js";
|
|
7
7
|
export * from "./ui/code-block.js";
|
|
8
8
|
export * from "./ui/combobox.js";
|
|
9
|
+
export * from "./ui/count-bubble.js";
|
|
9
10
|
export * from "./ui/dialog.js";
|
|
10
11
|
export * from "./ui/drawer.js";
|
|
11
12
|
export * from "./ui/dropdown-menu.js";
|
|
12
13
|
export * from "./ui/input-group.js";
|
|
13
14
|
export * from "./ui/input.js";
|
|
15
|
+
export * from "./ui/kbd.js";
|
|
14
16
|
export * from "./ui/number-field.js";
|
|
15
17
|
export * from "./ui/panel.js";
|
|
16
18
|
export * from "./ui/popover.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2BA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAG/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,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AAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AAGjC,cAAc,uBAAuB,CAAA;AAGrC,cAAc,yBAAyB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -32,11 +32,13 @@ export * from "./ui/carousel.js";
|
|
|
32
32
|
export * from "./ui/checkbox.js";
|
|
33
33
|
export * from "./ui/code-block.js";
|
|
34
34
|
export * from "./ui/combobox.js";
|
|
35
|
+
export * from "./ui/count-bubble.js";
|
|
35
36
|
export * from "./ui/dialog.js";
|
|
36
37
|
export * from "./ui/drawer.js";
|
|
37
38
|
export * from "./ui/dropdown-menu.js";
|
|
38
39
|
export * from "./ui/input-group.js";
|
|
39
40
|
export * from "./ui/input.js";
|
|
41
|
+
export * from "./ui/kbd.js";
|
|
40
42
|
export * from "./ui/number-field.js";
|
|
41
43
|
export * from "./ui/panel.js";
|
|
42
44
|
export * from "./ui/popover.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,yEAAyE;AACzE,gFAAgF;AAChF,4EAA4E;AAC5E,EAAE;AACF,qEAAqE;AACrE,iFAAiF;AACjF,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iEAAiE;AACjE,6BAA6B;AAC7B,EAAE;AACF,kEAAkE;AAClE,8EAA8E;AAC9E,uEAAuE;AAEvE,cAAc;AACd,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oB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AAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AAEjC,0EAA0E;AAC1E,cAAc,uBAAuB,CAAA;AAErC,4EAA4E;AAC5E,cAAc,yBAAyB,CAAA"}
|
|
@@ -60,7 +60,7 @@ import { type ClassValue } from "clsx";
|
|
|
60
60
|
* to write `font-regular` rediscovers this.
|
|
61
61
|
*/
|
|
62
62
|
export declare const BRAND_FONT_WEIGHTS: readonly ["heavy", "regular"];
|
|
63
|
-
export declare const BRAND_FONT_SIZES: readonly ["display-3xl", "display-2xl", "display-xl", "display-48", "display-lg", "display-md", "display-sm", "title-lg", "title-36", "title-32", "title-md", "title-24", "title-sm", "heading-28", "heading-lg", "heading-md", "heading-sm", "body-xl", "body-lg", "body-18", "body-md", "body-sm", "caption", "mono", "label", "eyebrow", "stat"];
|
|
63
|
+
export declare const BRAND_FONT_SIZES: readonly ["display-3xl", "display-2xl", "display-xl", "display-48", "display-lg", "display-md", "display-sm", "title-lg", "title-36", "title-32", "title-md", "title-24", "title-sm", "heading-28", "heading-lg", "heading-md", "heading-sm", "body-xl", "body-lg", "body-18", "body-md", "body-sm", "caption", "mono", "label", "eyebrow", "stat", "micro"];
|
|
64
64
|
/**
|
|
65
65
|
* Brand radius names that are not t-shirt shaped (#376).
|
|
66
66
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudgrid-cn.d.ts","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,+BAAgC,CAAA;AAE/D,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"cloudgrid-cn.d.ts","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,+BAAgC,CAAA;AAE/D,eAAO,MAAM,gBAAgB,8VAmCnB,CAAA;AAEV;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,gCAAiC,CAAA;AAkBzD,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/lib/cloudgrid-cn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudgrid-cn.js","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAA;AAE/D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,YAAY;IACZ,yEAAyE;IACzE,0EAA0E;IAC1E,4EAA4E;IAC5E,8DAA8D;IAC9D,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,sDAAsD;IACtD,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;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CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAAC;YAClD,wEAAwE;YACxE,oEAAoE;YACpE,6DAA6D;YAC7D,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;SAClD;KACF;CACF,CAAC,CAAA;AAEF,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
|
package/dist/theme.css
CHANGED
|
@@ -90,6 +90,9 @@
|
|
|
90
90
|
--color-on-primary: var(--cg-text-on-primary);
|
|
91
91
|
--color-on-accent: var(--cg-text-on-accent);
|
|
92
92
|
--color-on-code: var(--cg-text-on-code);
|
|
93
|
+
/* The word on a danger fill (ui#478): white at the root, ink on the panel and
|
|
94
|
+
on ink, where --cg-danger is a pale red. */
|
|
95
|
+
--color-on-danger: var(--cg-text-on-danger);
|
|
93
96
|
|
|
94
97
|
/* ---- brand ---- */
|
|
95
98
|
--color-brand: var(--cg-primary);
|
|
@@ -406,6 +409,13 @@
|
|
|
406
409
|
--text-stat: var(--cg-stat-size);
|
|
407
410
|
--text-stat--line-height: var(--cg-stat-line);
|
|
408
411
|
--text-stat--font-weight: var(--cg-stat-weight);
|
|
412
|
+
/* The smallest rung, 10px at leading 1 (ui#478): a count in a CountBubble, a
|
|
413
|
+
key on a Kbd. A box role, not a reading one: the box fixes the height and
|
|
414
|
+
the text fits inside it, which 13px caption does not in a 16px bubble. No
|
|
415
|
+
weight companion: the bell's count is medium and the vault's is bold, and a
|
|
416
|
+
companion would force one on the other. */
|
|
417
|
+
--text-micro: var(--cg-micro-size);
|
|
418
|
+
--text-micro--line-height: var(--cg-micro-line);
|
|
409
419
|
|
|
410
420
|
/* ---- weights ----
|
|
411
421
|
`--font-weight-display` is unreachable and kept only for completeness. Both
|
package/dist/tokens/base.json
CHANGED
|
@@ -790,6 +790,15 @@
|
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
},
|
|
793
|
+
"text-on-danger": {
|
|
794
|
+
"$value": "{neutrals.neutral-0}",
|
|
795
|
+
"$description": "The word on a --cg-danger fill: a count in a danger CountBubble (ui#478).\n\nWhite at the root, as the Console drew it: 4.23:1 on #E53935, the 3:1 UI bar and\nunder 4.5:1, the same number --cg-danger's own note records and leaves to a brand\npass. It flips to ink on the panel and on ink, because --cg-danger flips to a pale red\nthere and white would vanish on it.",
|
|
796
|
+
"$extensions": {
|
|
797
|
+
"io.cloudgrid": {
|
|
798
|
+
"css": "--cg-text-on-danger"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
},
|
|
793
802
|
"text-on-code": {
|
|
794
803
|
"$value": "#e7e7e7",
|
|
795
804
|
"$type": "color",
|
|
@@ -1254,6 +1263,26 @@
|
|
|
1254
1263
|
}
|
|
1255
1264
|
}
|
|
1256
1265
|
},
|
|
1266
|
+
"micro-size": {
|
|
1267
|
+
"$value": "10px",
|
|
1268
|
+
"$type": "dimension",
|
|
1269
|
+
"$description": "The smallest rung: a few characters in a fixed small box, never running text (ui#478).\n\nSOURCE: the Console's two counts, both hand-set at 10px before this rung existed: the\nnotifications bell's 16px bubble (NotificationsBell, medium) and the vault's 18px\npending-requests bubble (VaultGrantsBadge, bold, \"9+\"). --cg-caption, 13px, is the\nsmallest text rung and overflows a 16px bubble carrying two characters.\n\nA BOX ROLE, NOT A READING ROLE. Nothing a person reads as a sentence is set at 10px;\nthe rung exists for a count in a bubble and a key on a key cap (ui#482), where the\nbox fixes the height and the text has to fit inside it. A paragraph at this size is a\nmisuse, and caption is the floor for it.\n\nNOT in the Console preset: a count is 10px in every product.",
|
|
1270
|
+
"$extensions": {
|
|
1271
|
+
"io.cloudgrid": {
|
|
1272
|
+
"css": "--cg-micro-size"
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
"micro-line": {
|
|
1277
|
+
"$value": "1",
|
|
1278
|
+
"$type": "number",
|
|
1279
|
+
"$description": "leading-none. The text sits centred in a box a few pixels taller than itself; at\n--cg-body-line's 1.46 the line box would be 14.6px inside a 16px bubble. Spelled as a\nnumber, as --cg-stat-line is, rather than aliased onto the display leading, so a\ndisplay retune cannot move it.",
|
|
1280
|
+
"$extensions": {
|
|
1281
|
+
"io.cloudgrid": {
|
|
1282
|
+
"css": "--cg-micro-line"
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1257
1286
|
"body-line": {
|
|
1258
1287
|
"$value": "1.46",
|
|
1259
1288
|
"$type": "number",
|
|
@@ -2086,7 +2115,7 @@
|
|
|
2086
2115
|
}
|
|
2087
2116
|
},
|
|
2088
2117
|
"avatar": {
|
|
2089
|
-
"$description": "The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces.",
|
|
2118
|
+
"$description": "The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. The two ratios after them size the Avatar's letters (ui#482); a size has no reason to flip either.",
|
|
2090
2119
|
"avatar-pastel-1": {
|
|
2091
2120
|
"$value": "#dce4bc",
|
|
2092
2121
|
"$type": "color",
|
|
@@ -2113,6 +2142,26 @@
|
|
|
2113
2142
|
"css": "--cg-avatar-pastel-3"
|
|
2114
2143
|
}
|
|
2115
2144
|
}
|
|
2145
|
+
},
|
|
2146
|
+
"avatar-initials-ratio": {
|
|
2147
|
+
"$value": "0.44",
|
|
2148
|
+
"$type": "number",
|
|
2149
|
+
"$description": "The Avatar's two initials as a fraction of its diameter (ui#482): 10.56px at 24, 14.08px at 32.\n\nA ratio and not a rung of the type ramp, because the letters sit in a fixed circle and\nnot in running text: the ramp bottoms out at --cg-caption, 13px, which overflows an\n18px circle carrying two letters, and a future type change must resize the letters\nwith the circle rather than break it. Named so the size is the library's: the Console\nmeasured these as hand-set sizes (10.6px at 24) because nothing named them.\n\n0.44 puts 24 where the Console's own 24px avatar sat.",
|
|
2150
|
+
"$extensions": {
|
|
2151
|
+
"io.cloudgrid": {
|
|
2152
|
+
"css": "--cg-avatar-initials-ratio"
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
},
|
|
2156
|
+
"avatar-letter-ratio": {
|
|
2157
|
+
"$value": "0.46875",
|
|
2158
|
+
"$type": "number",
|
|
2159
|
+
"$description": "The grid avatar's one letter (the pastel look) as a fraction of its box (ui#482): 15/32,\nso 15px at 32, as the 2026 header frames draw it. Same reasoning as\n--cg-avatar-initials-ratio.",
|
|
2160
|
+
"$extensions": {
|
|
2161
|
+
"io.cloudgrid": {
|
|
2162
|
+
"css": "--cg-avatar-letter-ratio"
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2116
2165
|
}
|
|
2117
2166
|
}
|
|
2118
2167
|
}
|
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
"css": "--cg-text-accent"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
},
|
|
48
|
+
"text-on-danger": {
|
|
49
|
+
"$value": "{brand.ink}",
|
|
50
|
+
"$description": "Ink on this surface's pale danger fill (#FF8A80: 6.97:1). White, the root's word, would vanish on it (ui#478).",
|
|
51
|
+
"$extensions": {
|
|
52
|
+
"io.cloudgrid": {
|
|
53
|
+
"css": "--cg-text-on-danger"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
},
|
|
49
58
|
"semantic-surfaces": {
|
|
@@ -45,6 +45,15 @@
|
|
|
45
45
|
"css": "--cg-text-accent"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
},
|
|
49
|
+
"text-on-danger": {
|
|
50
|
+
"$value": "{brand.ink}",
|
|
51
|
+
"$description": "Ink on this surface's pale danger fill (#FFDAD6: 12.31:1). White, the root's word, would vanish on it (ui#478).",
|
|
52
|
+
"$extensions": {
|
|
53
|
+
"io.cloudgrid": {
|
|
54
|
+
"css": "--cg-text-on-danger"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
}
|
|
49
58
|
},
|
|
50
59
|
"semantic-lines": {
|
package/dist/tokens.css
CHANGED
|
@@ -752,6 +752,14 @@
|
|
|
752
752
|
--cg-text-inverse: var(--cg-neutral-0);
|
|
753
753
|
--cg-text-on-primary: var(--cg-neutral-0);
|
|
754
754
|
--cg-text-on-accent: var(--cg-ink);
|
|
755
|
+
/*
|
|
756
|
+
The word on a --cg-danger fill: a count in a danger CountBubble (ui#478).
|
|
757
|
+
|
|
758
|
+
White at the root, as the Console drew it: 4.23:1 on #E53935, the 3:1 UI bar and
|
|
759
|
+
under 4.5:1, the same number --cg-danger's own note records and leaves to a brand
|
|
760
|
+
pass. It flips to ink on the panel and on ink, because --cg-danger flips to a pale red
|
|
761
|
+
there and white would vanish on it. */
|
|
762
|
+
--cg-text-on-danger: var(--cg-neutral-0);
|
|
755
763
|
--cg-text-on-code: #e7e7e7;
|
|
756
764
|
|
|
757
765
|
/* ---- semantic-lines ---- */
|
|
@@ -1228,6 +1236,27 @@
|
|
|
1228
1236
|
--cg-body-14: 14px;
|
|
1229
1237
|
/* SOURCE: footer, helper */
|
|
1230
1238
|
--cg-caption: 13px;
|
|
1239
|
+
/*
|
|
1240
|
+
The smallest rung: a few characters in a fixed small box, never running text (ui#478).
|
|
1241
|
+
|
|
1242
|
+
SOURCE: the Console's two counts, both hand-set at 10px before this rung existed: the
|
|
1243
|
+
notifications bell's 16px bubble (NotificationsBell, medium) and the vault's 18px
|
|
1244
|
+
pending-requests bubble (VaultGrantsBadge, bold, "9+"). --cg-caption, 13px, is the
|
|
1245
|
+
smallest text rung and overflows a 16px bubble carrying two characters.
|
|
1246
|
+
|
|
1247
|
+
A BOX ROLE, NOT A READING ROLE. Nothing a person reads as a sentence is set at 10px;
|
|
1248
|
+
the rung exists for a count in a bubble and a key on a key cap (ui#482), where the
|
|
1249
|
+
box fixes the height and the text has to fit inside it. A paragraph at this size is a
|
|
1250
|
+
misuse, and caption is the floor for it.
|
|
1251
|
+
|
|
1252
|
+
NOT in the Console preset: a count is 10px in every product. */
|
|
1253
|
+
--cg-micro-size: 10px;
|
|
1254
|
+
/*
|
|
1255
|
+
leading-none. The text sits centred in a box a few pixels taller than itself; at
|
|
1256
|
+
--cg-body-line's 1.46 the line box would be 14.6px inside a 16px bubble. Spelled as a
|
|
1257
|
+
number, as --cg-stat-line is, rather than aliased onto the display leading, so a
|
|
1258
|
+
display retune cannot move it. */
|
|
1259
|
+
--cg-micro-line: 1;
|
|
1231
1260
|
/*
|
|
1232
1261
|
SOURCE: the draft's "Body Bold" and "Small" both carry 1.46 (#197). Was 1.5.
|
|
1233
1262
|
|
|
@@ -1680,10 +1709,26 @@
|
|
|
1680
1709
|
--cg-data-cyan: #0a959b;
|
|
1681
1710
|
|
|
1682
1711
|
/* ---- avatar ----
|
|
1683
|
-
The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. */
|
|
1712
|
+
The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. The two ratios after them size the Avatar's letters (ui#482); a size has no reason to flip either. */
|
|
1684
1713
|
--cg-avatar-pastel-1: #dce4bc;
|
|
1685
1714
|
--cg-avatar-pastel-2: #bcd9e4;
|
|
1686
1715
|
--cg-avatar-pastel-3: #bce4ca;
|
|
1716
|
+
/*
|
|
1717
|
+
The Avatar's two initials as a fraction of its diameter (ui#482): 10.56px at 24, 14.08px at 32.
|
|
1718
|
+
|
|
1719
|
+
A ratio and not a rung of the type ramp, because the letters sit in a fixed circle and
|
|
1720
|
+
not in running text: the ramp bottoms out at --cg-caption, 13px, which overflows an
|
|
1721
|
+
18px circle carrying two letters, and a future type change must resize the letters
|
|
1722
|
+
with the circle rather than break it. Named so the size is the library's: the Console
|
|
1723
|
+
measured these as hand-set sizes (10.6px at 24) because nothing named them.
|
|
1724
|
+
|
|
1725
|
+
0.44 puts 24 where the Console's own 24px avatar sat. */
|
|
1726
|
+
--cg-avatar-initials-ratio: 0.44;
|
|
1727
|
+
/*
|
|
1728
|
+
The grid avatar's one letter (the pastel look) as a fraction of its box (ui#482): 15/32,
|
|
1729
|
+
so 15px at 32, as the 2026 header frames draw it. Same reasoning as
|
|
1730
|
+
--cg-avatar-initials-ratio. */
|
|
1731
|
+
--cg-avatar-letter-ratio: 0.46875;
|
|
1687
1732
|
}
|
|
1688
1733
|
|
|
1689
1734
|
[data-cg-surface='panel'] {
|
|
@@ -1698,6 +1743,9 @@
|
|
|
1698
1743
|
would have to move to change that, not this value. */
|
|
1699
1744
|
--cg-text-muted-strong: rgba(255, 255, 255, 0.86);
|
|
1700
1745
|
--cg-text-accent: #ffffff;
|
|
1746
|
+
/*
|
|
1747
|
+
Ink on this surface's pale danger fill (#FFDAD6: 12.31:1). White, the root's word, would vanish on it (ui#478). */
|
|
1748
|
+
--cg-text-on-danger: var(--cg-ink);
|
|
1701
1749
|
|
|
1702
1750
|
/* ---- semantic-lines ---- */
|
|
1703
1751
|
--cg-border-control: rgba(255, 255, 255, 0.62);
|
|
@@ -1824,6 +1872,9 @@
|
|
|
1824
1872
|
failure. It sits between the ink scope's muted (0.56) and its secondary (0.78). */
|
|
1825
1873
|
--cg-text-muted-strong: rgba(255, 255, 255, 0.68);
|
|
1826
1874
|
--cg-text-accent: var(--cg-secondary);
|
|
1875
|
+
/*
|
|
1876
|
+
Ink on this surface's pale danger fill (#FF8A80: 6.97:1). White, the root's word, would vanish on it (ui#478). */
|
|
1877
|
+
--cg-text-on-danger: var(--cg-ink);
|
|
1827
1878
|
|
|
1828
1879
|
/* ---- semantic-surfaces ---- */
|
|
1829
1880
|
--cg-surface-card: rgba(255, 255, 255, 0.04);
|
package/dist/tokens.json
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"--cg-text-inverse": "var(--cg-neutral-0)",
|
|
86
86
|
"--cg-text-on-primary": "var(--cg-neutral-0)",
|
|
87
87
|
"--cg-text-on-accent": "var(--cg-ink)",
|
|
88
|
+
"--cg-text-on-danger": "var(--cg-neutral-0)",
|
|
88
89
|
"--cg-text-on-code": "#e7e7e7",
|
|
89
90
|
"--cg-border-hairline": "var(--cg-neutral-100)",
|
|
90
91
|
"--cg-border-control": "var(--cg-neutral-200)",
|
|
@@ -132,6 +133,8 @@
|
|
|
132
133
|
"--cg-body-sm": "15px",
|
|
133
134
|
"--cg-body-14": "14px",
|
|
134
135
|
"--cg-caption": "13px",
|
|
136
|
+
"--cg-micro-size": "10px",
|
|
137
|
+
"--cg-micro-line": "1",
|
|
135
138
|
"--cg-body-line": "1.46",
|
|
136
139
|
"--cg-body-tracking": "0em",
|
|
137
140
|
"--cg-mono-size": "14px",
|
|
@@ -220,7 +223,9 @@
|
|
|
220
223
|
"--cg-data-cyan": "#0a959b",
|
|
221
224
|
"--cg-avatar-pastel-1": "#dce4bc",
|
|
222
225
|
"--cg-avatar-pastel-2": "#bcd9e4",
|
|
223
|
-
"--cg-avatar-pastel-3": "#bce4ca"
|
|
226
|
+
"--cg-avatar-pastel-3": "#bce4ca",
|
|
227
|
+
"--cg-avatar-initials-ratio": "0.44",
|
|
228
|
+
"--cg-avatar-letter-ratio": "0.46875"
|
|
224
229
|
},
|
|
225
230
|
"panel": {
|
|
226
231
|
"--cg-text-primary": "#ffffff",
|
|
@@ -228,6 +233,7 @@
|
|
|
228
233
|
"--cg-text-muted": "rgba(255, 255, 255, 0.66)",
|
|
229
234
|
"--cg-text-muted-strong": "rgba(255, 255, 255, 0.86)",
|
|
230
235
|
"--cg-text-accent": "#ffffff",
|
|
236
|
+
"--cg-text-on-danger": "var(--cg-ink)",
|
|
231
237
|
"--cg-border-control": "rgba(255, 255, 255, 0.62)",
|
|
232
238
|
"--cg-border-hairline": "rgba(255, 255, 255, 0.24)",
|
|
233
239
|
"--cg-border-strong": "#ffffff",
|
|
@@ -267,6 +273,7 @@
|
|
|
267
273
|
"--cg-text-muted": "rgba(255, 255, 255, 0.56)",
|
|
268
274
|
"--cg-text-muted-strong": "rgba(255, 255, 255, 0.68)",
|
|
269
275
|
"--cg-text-accent": "var(--cg-secondary)",
|
|
276
|
+
"--cg-text-on-danger": "var(--cg-ink)",
|
|
270
277
|
"--cg-surface-card": "rgba(255, 255, 255, 0.04)",
|
|
271
278
|
"--cg-surface-page-alt": "rgba(255, 255, 255, 0.06)",
|
|
272
279
|
"--cg-border-control": "rgba(255, 255, 255, 0.4)",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
/**
|
|
3
|
+
* A small count in a pill: on an icon (the notifications bell) or inline
|
|
4
|
+
* beside a row (pending vault grant requests). ui#478.
|
|
5
|
+
*
|
|
6
|
+
* ## What it replaces, copied as drawn
|
|
7
|
+
*
|
|
8
|
+
* The Console drew both of these itself, each with a hand-set 10px, because no
|
|
9
|
+
* library piece or type role could draw a count this small: `text-caption`,
|
|
10
|
+
* 13px, overflows a 16px bubble carrying two characters.
|
|
11
|
+
*
|
|
12
|
+
* the bell 16px tall, 16 at least wide, 4px aside, medium, the CTA teal
|
|
13
|
+
* with its ink word, on the glyph's top right
|
|
14
|
+
* the vault 18px tall, 18 at least wide, 6px aside, bold, danger with a
|
|
15
|
+
* white word, capped at "9+"
|
|
16
|
+
*
|
|
17
|
+
* Both are here as they were. The size is the `micro` role (`--cg-micro-size`,
|
|
18
|
+
* 10px at leading 1), so the number is the library's and not the caller's.
|
|
19
|
+
* The weight goes with the size rather than with the role, because the two
|
|
20
|
+
* bubbles disagree on it and each was drawn on purpose.
|
|
21
|
+
*
|
|
22
|
+
* ## The tone
|
|
23
|
+
*
|
|
24
|
+
* `cta` is the teal of the Console's New button, its default: an access request
|
|
25
|
+
* is somebody asking politely, and red would file it as an incident. `danger`
|
|
26
|
+
* is for counts that need action. Both come from tokens, and the danger word
|
|
27
|
+
* flips to ink on the panel and on ink, where `--cg-danger` is a pale red.
|
|
28
|
+
*
|
|
29
|
+
* ## What a screen reader hears
|
|
30
|
+
*
|
|
31
|
+
* The caller's `label`, never the bare digits: "9+" means nothing read aloud,
|
|
32
|
+
* and the number alone does not say what is counted. The digits are
|
|
33
|
+
* `aria-hidden`; the label sits beside them in an `sr-only` span. Inside a
|
|
34
|
+
* control that carries its own `aria-label` (the bell's trigger) that name
|
|
35
|
+
* wins and the bubble is silent, which is what the trigger wants.
|
|
36
|
+
*
|
|
37
|
+
* ## No count, no bubble
|
|
38
|
+
*
|
|
39
|
+
* Zero, a negative number or `NaN` renders nothing, as both Console bubbles did.
|
|
40
|
+
*
|
|
41
|
+
* ## As a button
|
|
42
|
+
*
|
|
43
|
+
* `render={<button type="button" onClick={...} />}` makes it the control (the
|
|
44
|
+
* vault's top-nav count). It then takes the label as its name and the library's
|
|
45
|
+
* Tab-only frame (`focus-line`, ui#441).
|
|
46
|
+
*/
|
|
47
|
+
export declare const COUNT_BUBBLE_SIZES: readonly [16, 18];
|
|
48
|
+
/** 16 (the bell) or 18 (the vault's pending requests) tall. */
|
|
49
|
+
export type CountBubbleSize = (typeof COUNT_BUBBLE_SIZES)[number];
|
|
50
|
+
export type CountBubbleTone = "cta" | "danger";
|
|
51
|
+
/** `inline` beside text, or `corner`: on an icon's top right, inside a positioned target. */
|
|
52
|
+
export type CountBubblePlacement = "inline" | "corner";
|
|
53
|
+
declare function CountBubble({ count, label, max, size, tone, placement, className, render, ...props }: Omit<useRender.ComponentProps<"span">, "children"> & {
|
|
54
|
+
/** The number. Zero or less draws nothing. */
|
|
55
|
+
count: number;
|
|
56
|
+
/** What a screen reader hears instead of the digits, e.g. "3 pending vault grant requests". */
|
|
57
|
+
label: string;
|
|
58
|
+
/** Above this the bubble reads `max+`. Defaults to 9, so ten is "9+". */
|
|
59
|
+
max?: number;
|
|
60
|
+
/** 16 (the default, the bell) or 18 (the vault). */
|
|
61
|
+
size?: CountBubbleSize;
|
|
62
|
+
/** `cta` (the default, the teal) or `danger`. */
|
|
63
|
+
tone?: CountBubbleTone;
|
|
64
|
+
/** `inline` (the default) or `corner`, on an icon's top right. */
|
|
65
|
+
placement?: CountBubblePlacement;
|
|
66
|
+
}): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
67
|
+
export { CountBubble };
|
|
68
|
+
//# sourceMappingURL=count-bubble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count-bubble.d.ts","sourceRoot":"","sources":["../../src/ui/count-bubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAIrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,eAAO,MAAM,kBAAkB,mBAAoB,CAAA;AAEnD,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AACjE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC9C,6FAA6F;AAC7F,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAsBtD,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,GAAO,EACP,IAAS,EACT,IAAY,EACZ,SAAoB,EACpB,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACtD,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,iDAAiD;IACjD,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,kEAAkE;IAClE,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,qGAiCA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|