@cloudgrid-io/ui 0.3.0 → 0.4.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 +1 -1
- package/dist/blocks/entity-card.d.ts +89 -0
- package/dist/blocks/entity-card.d.ts.map +1 -0
- package/dist/blocks/entity-card.js +35 -0
- package/dist/blocks/entity-card.js.map +1 -0
- package/dist/blocks/entity-identity.d.ts +127 -0
- package/dist/blocks/entity-identity.d.ts.map +1 -0
- package/dist/blocks/entity-identity.js +127 -0
- package/dist/blocks/entity-identity.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The CloudGrid design system: CSS custom properties, a Tailwind v4 theme, self-hosted
|
|
4
4
|
fonts, and the same values as machine-readable JSON.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
46 React components, built on [Base UI](https://base-ui.com), styled only through tokens
|
|
7
7
|
and carrying no hardcoded colour.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The card an entity gets everywhere it is listed: a preview, a name, an
|
|
3
|
+
* address, a line about it, whatever state it is in, and a stat or two.
|
|
4
|
+
*
|
|
5
|
+
* Absorbed out of the console (#117), where the same composition serves the
|
|
6
|
+
* discover list, the discover map, my stuff, home, space pages and the inspired
|
|
7
|
+
* runtimes row. This library previously had `Card`, which is a shell — header,
|
|
8
|
+
* title, description, content, footer — and every CloudGrid-specific thing about
|
|
9
|
+
* an entity card was hand-built downstream and out of the designer's reach.
|
|
10
|
+
*
|
|
11
|
+
* This is the shell, not the console's card. It takes data as props and holds no
|
|
12
|
+
* product rules: it does not build URLs, does not know the wire status
|
|
13
|
+
* vocabulary, does not resolve visibility or permissions, does not fetch, and
|
|
14
|
+
* does not route. All of that stays where it belongs. A design system that
|
|
15
|
+
* learns the product's rules stops being a design system.
|
|
16
|
+
*
|
|
17
|
+
* ## Two tiers of preview, and neither can fail dark
|
|
18
|
+
*
|
|
19
|
+
* `seed` turns the preview region on. With `seed` alone the card shows the
|
|
20
|
+
* generative identity tile (`EntityIdentity`), derived from the id and the title
|
|
21
|
+
* with no network access at all. Add `previewUrl` and a real capture paints over
|
|
22
|
+
* it.
|
|
23
|
+
*
|
|
24
|
+
* The capture is a background image rather than an `<img>`, which is the one
|
|
25
|
+
* deliberate departure from the console's implementation. A background image
|
|
26
|
+
* that 404s paints nothing and the identity underneath simply shows through — so
|
|
27
|
+
* the fallback needs no `onError`, no `useState`, and therefore no client
|
|
28
|
+
* boundary on a card that is otherwise entirely static. The console needs its
|
|
29
|
+
* state only to hide a broken `<img>`.
|
|
30
|
+
*
|
|
31
|
+
* That costs the preview an `alt`. It is the right trade here: the console's own
|
|
32
|
+
* identity card is `aria-hidden` whenever a title sits beside it, because
|
|
33
|
+
* announcing a decorative preview after the title reads the card twice.
|
|
34
|
+
*
|
|
35
|
+
* ## Status is a slot
|
|
36
|
+
*
|
|
37
|
+
* `status` takes a node, not a status name. `EntityStatus` is a separate
|
|
38
|
+
* component with the nine-status CloudGrid vocabulary in it; putting that
|
|
39
|
+
* vocabulary in the card would mean the card knows what an entity can BE, which
|
|
40
|
+
* is product knowledge. The console maps its wire status through its own table
|
|
41
|
+
* and drops the result in here.
|
|
42
|
+
*
|
|
43
|
+
* ## Surfaces
|
|
44
|
+
*
|
|
45
|
+
* The chrome flips: ground, hairlines, title, body text and the stat rule all
|
|
46
|
+
* come from tokens, so `data-cg-surface="panel"` on any ancestor moves them
|
|
47
|
+
* together. The identity tile deliberately does not flip — see its own note; it
|
|
48
|
+
* is a picture, and a picture does not flip.
|
|
49
|
+
*/
|
|
50
|
+
export interface EntityCardStat {
|
|
51
|
+
/**
|
|
52
|
+
* A small decorative glyph, 14 to 16px. `label` is what gets announced, so
|
|
53
|
+
* the glyph itself should carry no accessible name.
|
|
54
|
+
*/
|
|
55
|
+
icon?: React.ReactNode;
|
|
56
|
+
value: React.ReactNode;
|
|
57
|
+
/** Names the stat, e.g. "Views". Rendered for assistive tech. */
|
|
58
|
+
label: string;
|
|
59
|
+
}
|
|
60
|
+
declare function EntityCard({ title, slug, description, titleLines, descriptionLines, status, stats, seed, previewUrl, href, ariaLabel, meta, footer, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "title"> & {
|
|
61
|
+
title: string;
|
|
62
|
+
/** The entity's address, in the mono utility face. */
|
|
63
|
+
slug?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
titleLines?: 1 | 2;
|
|
66
|
+
descriptionLines?: 1 | 2;
|
|
67
|
+
/** Top right of the header row. Drop an `EntityStatus` in. */
|
|
68
|
+
status?: React.ReactNode;
|
|
69
|
+
stats?: EntityCardStat[];
|
|
70
|
+
/**
|
|
71
|
+
* The entity's stable id. Its presence is what turns the preview region on,
|
|
72
|
+
* and its value is what picks the identity look. Pass the id, not the title.
|
|
73
|
+
*/
|
|
74
|
+
seed?: string;
|
|
75
|
+
/** A real capture, painted over the identity tile. A miss falls back to it. */
|
|
76
|
+
previewUrl?: string;
|
|
77
|
+
/** When set, the whole card is the target. A plain anchor: routing is yours. */
|
|
78
|
+
href?: string;
|
|
79
|
+
/** Accessible name for the whole-card link. Defaults to `title`. */
|
|
80
|
+
ariaLabel?: string;
|
|
81
|
+
/** Between the description and the stats. The console puts its residence line here. */
|
|
82
|
+
meta?: React.ReactNode;
|
|
83
|
+
/** Below everything, under no rule of its own. */
|
|
84
|
+
footer?: React.ReactNode;
|
|
85
|
+
/** Replaces the whole body. The preview and the card chrome still render. */
|
|
86
|
+
children?: React.ReactNode;
|
|
87
|
+
}): import("react").JSX.Element;
|
|
88
|
+
export { EntityCard };
|
|
89
|
+
//# sourceMappingURL=entity-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-card.d.ts","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,CAAC,SAAS,CAAA;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,+BAwIA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Card } from "../ui/card.js";
|
|
3
|
+
import { EntityIdentity } from "./entity-identity.js";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
function EntityCard({ title, slug, description, titleLines = 2, descriptionLines = 1, status, stats, seed, previewUrl, href, ariaLabel, meta, footer, className, children, ...props }) {
|
|
6
|
+
const body = children ??
|
|
7
|
+
(_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("span", { dir: "auto", "data-slot": "entity-card-title", title: title, className: cn("block text-body-sm font-medium break-words text-ink", titleLines === 1 ? "truncate" : "line-clamp-2"), children: title }), slug ? (_jsx("span", { dir: "auto", "data-slot": "entity-card-slug", title: slug, className: "mt-0.5 block truncate font-mono text-caption text-faint", children: slug })) : null] }), status ? _jsx("div", { className: "shrink-0", children: status }) : null] }), description ? (_jsx("p", { dir: "auto", "data-slot": "entity-card-description", title: description, className: cn("m-0 text-body-sm text-body", descriptionLines === 1 ? "truncate" : "line-clamp-2"), children: description })) : null, meta, _jsx("div", { "aria-hidden": "true", className: "grow" }), stats && stats.length > 0 ? (_jsx("div", { "data-slot": "entity-card-stats", className: "flex flex-wrap items-center gap-4 border-t border-hairline pt-3 text-caption text-body", children: stats.map((stat) => (_jsxs("span", { className: "inline-flex items-center gap-1.5", children: [stat.icon ? (_jsx("span", { "aria-hidden": "true", className: "inline-flex [&>svg]:size-4", children: stat.icon })) : null, stat.value, _jsx("span", { className: "sr-only", children: stat.label })] }, stat.label))) })) : null, footer] }));
|
|
8
|
+
const card = (_jsxs(Card, { "data-slot": "entity-card",
|
|
9
|
+
// gap-0 py-0: `Card` pads itself for a header/content/footer stack, and
|
|
10
|
+
// this card's preview is full bleed to the top edge. The padding moves
|
|
11
|
+
// inside, onto the body, so the preview can touch the corners.
|
|
12
|
+
// No hover lift, shadow, scale or colour change, even when the whole card
|
|
13
|
+
// is a link. That is the console's founder card spec (2026-08-16) carried
|
|
14
|
+
// across rather than re-decided here, and it matches this system's own
|
|
15
|
+
// canon: containment is a hairline, not elevation.
|
|
16
|
+
// `h-full` only inside the link wrapper, where the card has to fill the
|
|
17
|
+
// anchor. As a direct grid item it must NOT be h-full: a grid area has a
|
|
18
|
+
// definite height, so height:100% pins the card to the tallest card in the
|
|
19
|
+
// row even when the grid was told `items-start`.
|
|
20
|
+
className: cn("gap-0 py-0", href && "h-full", className), ...props, children: [seed ? (_jsxs("div", { "data-slot": "entity-card-preview", className: "relative shrink-0 border-b border-hairline", children: [_jsx(EntityIdentity, { seed: seed, name: title }), previewUrl ? (_jsx("div", { "data-slot": "entity-card-capture", "aria-hidden": "true", className: "absolute inset-0 bg-cover bg-center",
|
|
21
|
+
// A background image, not an <img>: a URL that 404s paints
|
|
22
|
+
// nothing and the identity tile below shows through, with no
|
|
23
|
+
// state and no client boundary. encodeURI escapes the quote that
|
|
24
|
+
// would otherwise break out of url("...").
|
|
25
|
+
style: { backgroundImage: `url("${encodeURI(previewUrl)}")` } })) : null] })) : null, _jsx("div", { className: "flex min-h-0 flex-1 flex-col gap-3 p-(--card-spacing)", children: body })] }));
|
|
26
|
+
if (!href)
|
|
27
|
+
return card;
|
|
28
|
+
return (_jsx("a", { href: href, "aria-label": ariaLabel ?? title,
|
|
29
|
+
// The focus ring is the same token every control uses, so it flips with
|
|
30
|
+
// the surface. A card-sized link with no visible focus state is unusable
|
|
31
|
+
// by keyboard, and that failure never shows up in a screenshot.
|
|
32
|
+
className: "group block rounded-xl no-underline focus-visible:ring-3 focus-visible:ring-ring focus-visible:outline-none", children: card }));
|
|
33
|
+
}
|
|
34
|
+
export { EntityCard };
|
|
35
|
+
//# sourceMappingURL=entity-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-card.js","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AA+DvC,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,GAAG,CAAC,EACd,gBAAgB,GAAG,CAAC,EACpB,MAAM,EACN,KAAK,EACL,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EA4BT;IACC,MAAM,IAAI,GACR,QAAQ;QACR,CACE,8BACE,eAAK,SAAS,EAAC,wCAAwC,aACrD,eAAK,SAAS,EAAC,gBAAgB,aAC7B,eACE,GAAG,EAAC,MAAM,eACA,mBAAmB,EAC7B,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CACX,qDAAqD,EACrD,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAC/C,YAEA,KAAK,GACD,EACN,IAAI,CAAC,CAAC,CAAC,CACN,eACE,GAAG,EAAC,MAAM,eACA,kBAAkB,EAC5B,KAAK,EAAE,IAAI,EACX,SAAS,EAAC,yDAAyD,YAElE,IAAI,GACA,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,UAAU,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACrD,EAEL,WAAW,CAAC,CAAC,CAAC,CACb,YACE,GAAG,EAAC,MAAM,eACA,yBAAyB,EACnC,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,EAAE,KAAK,GAAI,EAC1C,UAAU,CAAC,CAAC,CAAC,CACZ,2BACY,qBAAqB,iBACnB,MAAM,EAClB,SAAS,EAAC,qCAAqC;wBAC/C,2DAA2D;wBAC3D,6DAA6D;wBAC7D,iEAAiE;wBACjE,2CAA2C;wBAC3C,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,GAC7D,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,EAER,cAAK,SAAS,EAAC,uDAAuD,YAAE,IAAI,GAAO,IAC9E,CACR,CAAA;IAED,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,OAAO,CACL,YACE,IAAI,EAAE,IAAI,gBACE,SAAS,IAAI,KAAK;QAC9B,wEAAwE;QACxE,yEAAyE;QACzE,gEAAgE;QAChE,SAAS,EAAC,6GAA6G,YAEtH,IAAI,GACH,CACL,CAAA;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The identity tile: what a CloudGrid entity looks like before it looks like
|
|
3
|
+
* anything. A flat tinted field, the CloudGrid motif as a hairline mesh over it,
|
|
4
|
+
* and a monogram tile carrying the entity's initials.
|
|
5
|
+
*
|
|
6
|
+
* Absorbed out of the console's `GenerativePreview` (#117), where it exists for
|
|
7
|
+
* one reason: an entity's preview slot has to be filled by SOMETHING the moment
|
|
8
|
+
* the entity is created, and a screenshot does not exist yet. Everything here is
|
|
9
|
+
* derived from the two strings the caller already has, so this can never fail to
|
|
10
|
+
* a broken image, a dark rectangle or a spinner.
|
|
11
|
+
*
|
|
12
|
+
* ## The same entity always looks the same
|
|
13
|
+
*
|
|
14
|
+
* `seed` picks the look, through FNV-1a. A grid of these reads as a set of
|
|
15
|
+
* stable identities rather than a set of placeholders, which is the whole point:
|
|
16
|
+
* the tile is doing the job a favicon does. Pass the entity's id, not its title,
|
|
17
|
+
* or a rename changes what the entity looks like.
|
|
18
|
+
*
|
|
19
|
+
* ## It does not flip per surface, deliberately
|
|
20
|
+
*
|
|
21
|
+
* Every other component in this library flips inside `data-cg-surface`. This one
|
|
22
|
+
* does not, and the reason is that it is standing in for a photograph: a real
|
|
23
|
+
* screenshot layered over it would not flip either, so a flipping fallback would
|
|
24
|
+
* make the two tiers of one slot behave differently. Its field is mixed against
|
|
25
|
+
* `--cg-neutral-0` and its ink is `--cg-text-on-primary`, both of which are white
|
|
26
|
+
* in all three scopes.
|
|
27
|
+
*
|
|
28
|
+
* The card AROUND it flips normally. Only the picture holds still.
|
|
29
|
+
*
|
|
30
|
+
* ## No colour was invented
|
|
31
|
+
*
|
|
32
|
+
* The console's version carries ten hand-picked hexes. This library's rule is
|
|
33
|
+
* that a component consumes custom properties and never hardcodes a hex, so the
|
|
34
|
+
* looks below are built from the brand's own four values by mixing. Eight looks
|
|
35
|
+
* out of four hues, at two tint depths.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* THE LOOK TABLE. Edit this to change what the identity tiles look like.
|
|
39
|
+
*
|
|
40
|
+
* Each entry is a hue token and how strongly the field is tinted with it. The
|
|
41
|
+
* monogram tile is the same hue driven toward ink, so it is always a deeper
|
|
42
|
+
* shade of the field it sits on and the white monogram on it always clears AA.
|
|
43
|
+
*
|
|
44
|
+
* Four hues, because the brand has four: the purple, the lime, the cyan and the
|
|
45
|
+
* ink. Two depths, because eight identities across a listing repeat noticeably
|
|
46
|
+
* less than four and cost nothing. Adding a fifth hue is one row here; nothing
|
|
47
|
+
* else in this file knows how many there are.
|
|
48
|
+
*
|
|
49
|
+
* The `tile` percentages are measured rather than eyeballed. White on the mixed
|
|
50
|
+
* tile: purple 7.99:1, lime 5.08:1, cyan 4.93:1, ink 15.9:1 — all clear AA for
|
|
51
|
+
* normal text, which is more than the monogram needs (it is decorative and set
|
|
52
|
+
* at a large-text size), and leaves room for a designer to lighten a tile
|
|
53
|
+
* without immediately going under.
|
|
54
|
+
*/
|
|
55
|
+
export declare const ENTITY_IDENTITY_LOOKS: readonly [{
|
|
56
|
+
readonly name: "brand-soft";
|
|
57
|
+
readonly hue: "--cg-primary";
|
|
58
|
+
readonly field: "12%";
|
|
59
|
+
readonly tile: "72%";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "lime-soft";
|
|
62
|
+
readonly hue: "--cg-secondary";
|
|
63
|
+
readonly field: "16%";
|
|
64
|
+
readonly tile: "44%";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "cyan-soft";
|
|
67
|
+
readonly hue: "--cg-tertiary";
|
|
68
|
+
readonly field: "16%";
|
|
69
|
+
readonly tile: "44%";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "ink-soft";
|
|
72
|
+
readonly hue: "--cg-ink";
|
|
73
|
+
readonly field: "8%";
|
|
74
|
+
readonly tile: "84%";
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "brand-deep";
|
|
77
|
+
readonly hue: "--cg-primary";
|
|
78
|
+
readonly field: "22%";
|
|
79
|
+
readonly tile: "72%";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "lime-deep";
|
|
82
|
+
readonly hue: "--cg-secondary";
|
|
83
|
+
readonly field: "30%";
|
|
84
|
+
readonly tile: "44%";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "cyan-deep";
|
|
87
|
+
readonly hue: "--cg-tertiary";
|
|
88
|
+
readonly field: "30%";
|
|
89
|
+
readonly tile: "44%";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "ink-deep";
|
|
92
|
+
readonly hue: "--cg-ink";
|
|
93
|
+
readonly field: "16%";
|
|
94
|
+
readonly tile: "84%";
|
|
95
|
+
}];
|
|
96
|
+
export type EntityIdentityLook = (typeof ENTITY_IDENTITY_LOOKS)[number];
|
|
97
|
+
/**
|
|
98
|
+
* FNV-1a over the seed. Deterministic, stable across sessions and across
|
|
99
|
+
* machines, and cheap enough to run for every card in a listing.
|
|
100
|
+
*
|
|
101
|
+
* Taken from the console unchanged, deliberately: an entity that has been the
|
|
102
|
+
* teal one for six months should not become the purple one because the library
|
|
103
|
+
* picked a different hash.
|
|
104
|
+
*/
|
|
105
|
+
export declare function entityIdentitySeed(seed: string): number;
|
|
106
|
+
/** The look a seed maps to. Same seed, same look, forever. */
|
|
107
|
+
export declare function entityIdentityLook(seed: string): EntityIdentityLook;
|
|
108
|
+
/**
|
|
109
|
+
* A name to its monogram: the initials of the first two words, or the first two
|
|
110
|
+
* letters of a single word. Punctuation and symbols are dropped first, so
|
|
111
|
+
* "@cloudgrid/cli" reads CL rather than @C.
|
|
112
|
+
*
|
|
113
|
+
* An empty or symbol-only name gives "?" rather than an empty tile, because an
|
|
114
|
+
* empty tile looks like a rendering failure and a question mark looks like an
|
|
115
|
+
* unnamed thing, which is what it is.
|
|
116
|
+
*/
|
|
117
|
+
export declare function entityMonogram(name: string): string;
|
|
118
|
+
declare function EntityIdentity({ seed, name, monogram, className, style, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
119
|
+
/** The entity's stable id. Picks the look; never pass the title. */
|
|
120
|
+
seed: string;
|
|
121
|
+
/** The entity's name. Only used for the monogram. */
|
|
122
|
+
name?: string;
|
|
123
|
+
/** Overrides the derived monogram, for a name the initials read badly from. */
|
|
124
|
+
monogram?: string;
|
|
125
|
+
}): import("react").JSX.Element;
|
|
126
|
+
export { EntityIdentity };
|
|
127
|
+
//# sourceMappingURL=entity-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-identity.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-identity.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASxB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQnD;AAED,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjD,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,+BAuDA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
3
|
+
/**
|
|
4
|
+
* The identity tile: what a CloudGrid entity looks like before it looks like
|
|
5
|
+
* anything. A flat tinted field, the CloudGrid motif as a hairline mesh over it,
|
|
6
|
+
* and a monogram tile carrying the entity's initials.
|
|
7
|
+
*
|
|
8
|
+
* Absorbed out of the console's `GenerativePreview` (#117), where it exists for
|
|
9
|
+
* one reason: an entity's preview slot has to be filled by SOMETHING the moment
|
|
10
|
+
* the entity is created, and a screenshot does not exist yet. Everything here is
|
|
11
|
+
* derived from the two strings the caller already has, so this can never fail to
|
|
12
|
+
* a broken image, a dark rectangle or a spinner.
|
|
13
|
+
*
|
|
14
|
+
* ## The same entity always looks the same
|
|
15
|
+
*
|
|
16
|
+
* `seed` picks the look, through FNV-1a. A grid of these reads as a set of
|
|
17
|
+
* stable identities rather than a set of placeholders, which is the whole point:
|
|
18
|
+
* the tile is doing the job a favicon does. Pass the entity's id, not its title,
|
|
19
|
+
* or a rename changes what the entity looks like.
|
|
20
|
+
*
|
|
21
|
+
* ## It does not flip per surface, deliberately
|
|
22
|
+
*
|
|
23
|
+
* Every other component in this library flips inside `data-cg-surface`. This one
|
|
24
|
+
* does not, and the reason is that it is standing in for a photograph: a real
|
|
25
|
+
* screenshot layered over it would not flip either, so a flipping fallback would
|
|
26
|
+
* make the two tiers of one slot behave differently. Its field is mixed against
|
|
27
|
+
* `--cg-neutral-0` and its ink is `--cg-text-on-primary`, both of which are white
|
|
28
|
+
* in all three scopes.
|
|
29
|
+
*
|
|
30
|
+
* The card AROUND it flips normally. Only the picture holds still.
|
|
31
|
+
*
|
|
32
|
+
* ## No colour was invented
|
|
33
|
+
*
|
|
34
|
+
* The console's version carries ten hand-picked hexes. This library's rule is
|
|
35
|
+
* that a component consumes custom properties and never hardcodes a hex, so the
|
|
36
|
+
* looks below are built from the brand's own four values by mixing. Eight looks
|
|
37
|
+
* out of four hues, at two tint depths.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* THE LOOK TABLE. Edit this to change what the identity tiles look like.
|
|
41
|
+
*
|
|
42
|
+
* Each entry is a hue token and how strongly the field is tinted with it. The
|
|
43
|
+
* monogram tile is the same hue driven toward ink, so it is always a deeper
|
|
44
|
+
* shade of the field it sits on and the white monogram on it always clears AA.
|
|
45
|
+
*
|
|
46
|
+
* Four hues, because the brand has four: the purple, the lime, the cyan and the
|
|
47
|
+
* ink. Two depths, because eight identities across a listing repeat noticeably
|
|
48
|
+
* less than four and cost nothing. Adding a fifth hue is one row here; nothing
|
|
49
|
+
* else in this file knows how many there are.
|
|
50
|
+
*
|
|
51
|
+
* The `tile` percentages are measured rather than eyeballed. White on the mixed
|
|
52
|
+
* tile: purple 7.99:1, lime 5.08:1, cyan 4.93:1, ink 15.9:1 — all clear AA for
|
|
53
|
+
* normal text, which is more than the monogram needs (it is decorative and set
|
|
54
|
+
* at a large-text size), and leaves room for a designer to lighten a tile
|
|
55
|
+
* without immediately going under.
|
|
56
|
+
*/
|
|
57
|
+
export const ENTITY_IDENTITY_LOOKS = [
|
|
58
|
+
{ name: "brand-soft", hue: "--cg-primary", field: "12%", tile: "72%" },
|
|
59
|
+
{ name: "lime-soft", hue: "--cg-secondary", field: "16%", tile: "44%" },
|
|
60
|
+
{ name: "cyan-soft", hue: "--cg-tertiary", field: "16%", tile: "44%" },
|
|
61
|
+
{ name: "ink-soft", hue: "--cg-ink", field: "8%", tile: "84%" },
|
|
62
|
+
{ name: "brand-deep", hue: "--cg-primary", field: "22%", tile: "72%" },
|
|
63
|
+
{ name: "lime-deep", hue: "--cg-secondary", field: "30%", tile: "44%" },
|
|
64
|
+
{ name: "cyan-deep", hue: "--cg-tertiary", field: "30%", tile: "44%" },
|
|
65
|
+
{ name: "ink-deep", hue: "--cg-ink", field: "16%", tile: "84%" },
|
|
66
|
+
];
|
|
67
|
+
/**
|
|
68
|
+
* FNV-1a over the seed. Deterministic, stable across sessions and across
|
|
69
|
+
* machines, and cheap enough to run for every card in a listing.
|
|
70
|
+
*
|
|
71
|
+
* Taken from the console unchanged, deliberately: an entity that has been the
|
|
72
|
+
* teal one for six months should not become the purple one because the library
|
|
73
|
+
* picked a different hash.
|
|
74
|
+
*/
|
|
75
|
+
export function entityIdentitySeed(seed) {
|
|
76
|
+
let h = 0x811c9dc5;
|
|
77
|
+
for (let i = 0; i < seed.length; i++) {
|
|
78
|
+
h ^= seed.charCodeAt(i);
|
|
79
|
+
h = Math.imul(h, 0x01000193);
|
|
80
|
+
}
|
|
81
|
+
return h >>> 0;
|
|
82
|
+
}
|
|
83
|
+
/** The look a seed maps to. Same seed, same look, forever. */
|
|
84
|
+
export function entityIdentityLook(seed) {
|
|
85
|
+
return ENTITY_IDENTITY_LOOKS[entityIdentitySeed(seed) % ENTITY_IDENTITY_LOOKS.length];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A name to its monogram: the initials of the first two words, or the first two
|
|
89
|
+
* letters of a single word. Punctuation and symbols are dropped first, so
|
|
90
|
+
* "@cloudgrid/cli" reads CL rather than @C.
|
|
91
|
+
*
|
|
92
|
+
* An empty or symbol-only name gives "?" rather than an empty tile, because an
|
|
93
|
+
* empty tile looks like a rendering failure and a question mark looks like an
|
|
94
|
+
* unnamed thing, which is what it is.
|
|
95
|
+
*/
|
|
96
|
+
export function entityMonogram(name) {
|
|
97
|
+
const words = name
|
|
98
|
+
.replace(/[^\p{L}\p{N} ]/gu, " ")
|
|
99
|
+
.split(/\s+/)
|
|
100
|
+
.filter(Boolean);
|
|
101
|
+
const first = words[0]?.[0] ?? "?";
|
|
102
|
+
const second = words[1]?.[0] ?? words[0]?.[1] ?? "";
|
|
103
|
+
return (first + second).toUpperCase();
|
|
104
|
+
}
|
|
105
|
+
function EntityIdentity({ seed, name, monogram, className, style, ...props }) {
|
|
106
|
+
const look = entityIdentityLook(seed);
|
|
107
|
+
const letters = monogram ?? entityMonogram(name ?? "");
|
|
108
|
+
return (_jsxs("div", { "data-slot": "entity-identity", "data-look": look.name, "aria-hidden": "true", className: cn("relative isolate aspect-[1200/630] w-full select-none overflow-hidden", className), style: {
|
|
109
|
+
// Mixed against --cg-neutral-0 rather than --cg-surface-card: the card
|
|
110
|
+
// ground is `transparent` inside a purple panel, and mixing a hue into
|
|
111
|
+
// transparent gives a half-transparent hue rather than a tint. White is
|
|
112
|
+
// white in all three scopes, which is what "it does not flip" means.
|
|
113
|
+
background: `color-mix(in srgb, var(${look.hue}) ${look.field}, var(--cg-neutral-0))`,
|
|
114
|
+
...style,
|
|
115
|
+
}, ...props, children: [_jsx("div", { "aria-hidden": "true", "data-slot": "entity-identity-mesh", className: "absolute inset-0", style: {
|
|
116
|
+
backgroundImage: "linear-gradient(to right, var(--cg-identity-mesh) 1px, transparent 1px)," +
|
|
117
|
+
" linear-gradient(to bottom, var(--cg-identity-mesh) 1px, transparent 1px)",
|
|
118
|
+
backgroundSize: "22px 22px",
|
|
119
|
+
backgroundPosition: "-1px -1px",
|
|
120
|
+
"--cg-identity-mesh": "color-mix(in srgb, var(--cg-ink) 8%, transparent)",
|
|
121
|
+
} }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: _jsx("span", { "data-slot": "entity-identity-monogram", className: "flex size-[46px] items-center justify-center rounded-md text-heading-md font-bold", style: {
|
|
122
|
+
background: `color-mix(in srgb, var(${look.hue}) ${look.tile}, var(--cg-ink))`,
|
|
123
|
+
color: "var(--cg-text-on-primary)",
|
|
124
|
+
}, children: letters }) })] }));
|
|
125
|
+
}
|
|
126
|
+
export { EntityIdentity };
|
|
127
|
+
//# sourceMappingURL=entity-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-identity.js","sourceRoot":"","sources":["../../src/blocks/entity-identity.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;IACtE,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;IACvE,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;IACtE,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,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,kBAAkB;wBAC9E,KAAK,EAAE,2BAA2B;qBACnC,YAEA,OAAO,GACH,GACH,IACF,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export * from "./blocks/compare-table.js";
|
|
|
27
27
|
export * from "./blocks/creation-tile.js";
|
|
28
28
|
export * from "./blocks/cta-banner.js";
|
|
29
29
|
export * from "./blocks/drop-zone.js";
|
|
30
|
+
export * from "./blocks/entity-card.js";
|
|
31
|
+
export * from "./blocks/entity-identity.js";
|
|
30
32
|
export * from "./blocks/entity-status.js";
|
|
31
33
|
export * from "./blocks/feature-cells.js";
|
|
32
34
|
export * from "./blocks/hub-index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,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,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAG/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,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G/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AAGtC,cAAc,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// The public surface of @cloudgrid-io/ui.
|
|
2
2
|
//
|
|
3
3
|
// GENERATED shape, hand-committed: one `export *` per component module. Flat is
|
|
4
|
-
// safe here — the exported names across all
|
|
4
|
+
// safe here — the exported names across all 46 components collide zero times,
|
|
5
5
|
// asserted by a test so a future addition cannot break it silently.
|
|
6
6
|
//
|
|
7
7
|
// Per-module re-exports rather than a bundle, deliberately. 20 of these carry a
|
|
8
8
|
// "use client" directive, and the client boundary is a property of the MODULE.
|
|
9
9
|
// tsc emits file-per-file and preserves the directive, so a React Server
|
|
10
10
|
// Component consumer keeps exactly the boundaries the source declares. Bundling
|
|
11
|
-
// them into one file would collapse
|
|
11
|
+
// them into one file would collapse 46 modules into a single client island.
|
|
12
12
|
//
|
|
13
13
|
// The CSS is NOT imported here. It ships as separate entry points
|
|
14
14
|
// (@cloudgrid-io/ui/tokens.css and friends) so a consumer with no React — the
|
|
@@ -44,6 +44,8 @@ export * from "./blocks/compare-table.js";
|
|
|
44
44
|
export * from "./blocks/creation-tile.js";
|
|
45
45
|
export * from "./blocks/cta-banner.js";
|
|
46
46
|
export * from "./blocks/drop-zone.js";
|
|
47
|
+
export * from "./blocks/entity-card.js";
|
|
48
|
+
export * from "./blocks/entity-identity.js";
|
|
47
49
|
export * from "./blocks/entity-status.js";
|
|
48
50
|
export * from "./blocks/feature-cells.js";
|
|
49
51
|
export * from "./blocks/hub-index.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,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,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,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,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBA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