@cloudgrid-io/ui 0.22.0 → 0.24.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/entity-card.d.ts +189 -71
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +284 -86
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/entity-status.d.ts +32 -1
- package/dist/blocks/entity-status.d.ts.map +1 -1
- package/dist/blocks/entity-status.js +35 -1
- package/dist/blocks/entity-status.js.map +1 -1
- package/dist/blocks/icons.d.ts +58 -29
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +58 -29
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/phosphor-marks.d.ts +10 -10
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +15 -15
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/theme.css +16 -0
- package/dist/tokens/base.json +70 -6
- package/dist/tokens.css +62 -6
- package/dist/tokens.json +11 -5
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* The card an entity gets everywhere it is listed: a preview, a name, an
|
|
3
4
|
* address, a line about it, whatever state it is in, and a stat or two.
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
* **One recommended grid track per size**, because a card sized for a track it
|
|
32
33
|
* is not in is the failure this axis exists to prevent:
|
|
33
34
|
*
|
|
34
|
-
* default the
|
|
35
|
+
* default the 159/92 media card this file already was, at the draft's own
|
|
36
|
+
* ratio (#196; it was 1200/630). Track:
|
|
35
37
|
* `repeat(auto-fill, minmax(320px, 1fr))`, which is the 360px the
|
|
36
38
|
* console's Discover grid renders today.
|
|
37
39
|
* compact the same card at the console's 260 and 280 tracks. Track:
|
|
@@ -45,12 +47,12 @@
|
|
|
45
47
|
* between 420 and 640 the description is truncated to a few words.
|
|
46
48
|
* Under 640, `compact` is the right form — not a narrower row.
|
|
47
49
|
*
|
|
48
|
-
* **Rest and
|
|
49
|
-
*
|
|
50
|
-
*
|
|
50
|
+
* **Rest and open are identical on `default` and `compact`.** The panel, the
|
|
51
|
+
* white ground it lays down and the tap-target rule below all carry across
|
|
52
|
+
* unchanged. Compact reduces the type and the padding and nothing else.
|
|
51
53
|
*
|
|
52
|
-
* Two things compact does drop, and both are about height rather than taste.
|
|
53
|
-
*
|
|
54
|
+
* Two things compact does drop, and both are about height rather than taste. Its
|
|
55
|
+
* panel clamps the description to one line, and on a card with no panel the
|
|
54
56
|
* stats collapse to the first: at 260px a second stat wraps, which takes that
|
|
55
57
|
* card a line taller than the ones beside it and breaks the row it sits in.
|
|
56
58
|
*
|
|
@@ -67,17 +69,19 @@
|
|
|
67
69
|
* rendered, on the creator's line, because the console's residence line is one
|
|
68
70
|
* line and belongs next to who made the thing.
|
|
69
71
|
*
|
|
70
|
-
* ##
|
|
72
|
+
* ## THE OPEN MODE IS THE PANEL
|
|
71
73
|
*
|
|
72
|
-
* #182
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* ahead of them is a second thing to unpick rather than a head start.
|
|
74
|
+
* #182 named a second axis and left it unbuilt, because the frames had not been
|
|
75
|
+
* drawn. They were, on 2026-09-09, and the founder's ruling with them: the panel
|
|
76
|
+
* IS the open state. There is no `mode` prop and there is nothing left parked —
|
|
77
|
+
* a card is at rest or it is open, and open is what hover and focus bring.
|
|
77
78
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
79
|
+
* What that costs the rest state is the point rather than the price. At rest a
|
|
80
|
+
* media card is a picture, a name and a 10px dot: no line about the thing, no
|
|
81
|
+
* creator, no stats, no chip, no controls. All of it is in the panel, one hover
|
|
82
|
+
* away, and a grid of these reads as a wall of work rather than a wall of text.
|
|
83
|
+
* `minimal` below is where that is decided, and it is tied to whether a panel
|
|
84
|
+
* exists — so a card that cannot open keeps every field it ever had.
|
|
81
85
|
*
|
|
82
86
|
* ## Two tiers of preview, and neither can fail dark
|
|
83
87
|
*
|
|
@@ -99,11 +103,13 @@
|
|
|
99
103
|
*
|
|
100
104
|
* ## The kind badge says WHAT the thing is
|
|
101
105
|
*
|
|
102
|
-
* `kind` is agent, inspiration or app, and it paints a
|
|
106
|
+
* `kind` is agent, inspiration or app, and it paints a 20px badge at the
|
|
103
107
|
* preview's top-right corner — and beside the title when there is no preview to
|
|
104
108
|
* put it on. Founder request 2026-09-08 (#165): the console once carried it, a
|
|
105
109
|
* build dropped it, and every thumbnail had been showing the same badge
|
|
106
|
-
* regardless of what the entity was.
|
|
110
|
+
* regardless of what the entity was. Redrawn to the founder's 2026-09-09 draft
|
|
111
|
+
* (#196): a tinted square with a 6px corner in place of a neutral disc, and
|
|
112
|
+
* three new marks.
|
|
107
113
|
*
|
|
108
114
|
* Three deliberate choices in it.
|
|
109
115
|
*
|
|
@@ -114,26 +120,33 @@
|
|
|
114
120
|
* for its ten statuses.
|
|
115
121
|
*
|
|
116
122
|
* The badge does NOT flip per surface, which is the identity tile's rule applied
|
|
117
|
-
* to a mark. Its ground is `--cg-
|
|
118
|
-
* `--cg-text-on-accent`,
|
|
119
|
-
* ink glyph is what renders on white, on the purple panel and on ink
|
|
120
|
-
* alternative — a badge painted with `--cg-surface-card` and
|
|
121
|
-
* — inverts to white-on-white the moment the card sits
|
|
122
|
-
* `data-cg-surface="ink"`, because half of what it reads flips and the
|
|
123
|
-
* under it does not.
|
|
124
|
-
*
|
|
125
|
-
*
|
|
123
|
+
* to a mark. Its ground is a `--cg-kind-*` tint and its glyph is
|
|
124
|
+
* `--cg-text-on-accent`, all four declared at `:root` only, so a tinted square
|
|
125
|
+
* with an ink glyph is what renders on white, on the purple panel and on ink
|
|
126
|
+
* alike. The alternative — a badge painted with `--cg-surface-card` and
|
|
127
|
+
* `--cg-text-primary` — inverts to white-on-white the moment the card sits
|
|
128
|
+
* inside `data-cg-surface="ink"`, because half of what it reads flips and the
|
|
129
|
+
* picture under it does not. The old mixed hairline is gone with the neutral
|
|
130
|
+
* disc: an edge existed to separate white from a light screenshot, and a tint
|
|
131
|
+
* over `--cg-shadow-mark` does that without drawing a line.
|
|
126
132
|
*
|
|
127
133
|
* The kind is announced. The glyph is `aria-hidden` and the word rides along in
|
|
128
134
|
* an `sr-only` span, because "agent" is information and a decorative mark is not
|
|
129
135
|
* a way to convey it.
|
|
130
136
|
*
|
|
131
|
-
* ## The
|
|
137
|
+
* ## The panel, and the rule it supersedes
|
|
132
138
|
*
|
|
133
|
-
* `reveal` puts a panel over the
|
|
134
|
-
*
|
|
135
|
-
* It shows on hover and on `:focus-within`,
|
|
136
|
-
* `prefers-reduced-motion` by arriving without the fade rather
|
|
139
|
+
* `reveal` puts a WHITE panel over the bottom of the card carrying the title,
|
|
140
|
+
* the state dot, two real links (Open and Dashboard), the description, the
|
|
141
|
+
* creator and the card's own controls. It shows on hover and on `:focus-within`,
|
|
142
|
+
* and it respects `prefers-reduced-motion` by arriving without the fade rather
|
|
143
|
+
* than not at all.
|
|
144
|
+
*
|
|
145
|
+
* It is white and not a scrim as of #196, and the dark treatment is retired for
|
|
146
|
+
* this card. A wash over a screenshot made the picture a texture behind grey
|
|
147
|
+
* text and every card looked like every other one; on white the panel is paper
|
|
148
|
+
* laid over the lower half of the picture, the type is the page's own ink, and
|
|
149
|
+
* the picture above it stays a picture.
|
|
137
150
|
*
|
|
138
151
|
* **The second action is Dashboard, and it is not a gear.** Founder direction
|
|
139
152
|
* 2026-09-08 (#182). The door it opens is the entity's page in the console,
|
|
@@ -141,13 +154,29 @@
|
|
|
141
154
|
* "look inside", and a gear promises "change how this is configured". Those are
|
|
142
155
|
* different pages and a reader who takes one for the other has been misled by
|
|
143
156
|
* the icon rather than by the label. The mark is `EntityDashboardIcon`
|
|
144
|
-
* (Phosphor `
|
|
157
|
+
* (Phosphor `engine` since #200, `gauge` before it — a dial reads as a speed,
|
|
158
|
+
* not as machinery); `SettingsIcon` is still exported for the surfaces that
|
|
145
159
|
* really are settings.
|
|
146
160
|
*
|
|
147
161
|
* The prop is `dashboardHref`. `settingsHref` is kept as a deprecated alias for
|
|
148
162
|
* this minor and maps straight to it, so no caller breaks on the rename — see
|
|
149
163
|
* the note on the prop.
|
|
150
164
|
*
|
|
165
|
+
* **Open opens a new tab; Dashboard does not.** Founder ruling 2026-09-10
|
|
166
|
+
* (#200), and it is a default in the library rather than a prop, because the two
|
|
167
|
+
* actions go to two different KINDS of place: Open leaves for the live entity,
|
|
168
|
+
* which is a tenant's own application, and Dashboard goes further into the
|
|
169
|
+
* console the reader is already standing in. Navigating a working surface away
|
|
170
|
+
* to look at one card costs the list, the filters and the scroll position that
|
|
171
|
+
* got someone there, and a back button restores none of that in a virtual grid.
|
|
172
|
+
*
|
|
173
|
+
* So Open carries `target="_blank" rel="noopener noreferrer"` at every size, and
|
|
174
|
+
* the `rel` is load-bearing rather than boilerplate: without `noopener` the
|
|
175
|
+
* tenant's app holds a live handle back into the console's window, and without
|
|
176
|
+
* `noreferrer` the console URL — grid and entity in the path — is sent to it as
|
|
177
|
+
* a Referer. The disabled, href-less Open takes neither: there is no navigation
|
|
178
|
+
* to describe.
|
|
179
|
+
*
|
|
151
180
|
* ## The reveal never depends on data
|
|
152
181
|
*
|
|
153
182
|
* Founder direction, via #193 and cloudgrid-console#657: *a card whose entity
|
|
@@ -218,26 +247,39 @@
|
|
|
218
247
|
* overlay is untouched, so a tap anywhere on the thumbnail — the second pill
|
|
219
248
|
* included — opens the entity, and the touch fallback is exactly as it was.
|
|
220
249
|
*
|
|
221
|
-
* **It
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
250
|
+
* **It declares the DEFAULT surface, and that is not tidiness.** The panel is
|
|
251
|
+
* `--cg-surface-card` with the page's ink and secondary rungs on it, 15.91:1 and
|
|
252
|
+
* 7:1. But `--cg-surface-card` is `transparent` inside a purple panel and a 4%
|
|
253
|
+
* wash on ink — right for a card, fatal for something that has to cover a
|
|
254
|
+
* screenshot — so the panel carries `data-theme="default"`, which tokens.css
|
|
255
|
+
* declares alongside `:root`. Every token inside it resolves to its default
|
|
256
|
+
* value, on every surface: paper stays paper.
|
|
226
257
|
*
|
|
227
|
-
* **The radii cannot disagree.** The
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* trusting that.
|
|
258
|
+
* **The radii cannot disagree.** The card rounds to `--cg-radius-md` and carries
|
|
259
|
+
* a 1px pad; the preview and the panel both round to that value less one pixel,
|
|
260
|
+
* written as the arithmetic rather than as a second token. An e2e assertion
|
|
261
|
+
* compares the computed radii rather than trusting that.
|
|
232
262
|
*
|
|
233
|
-
* ## Status is a slot
|
|
263
|
+
* ## Status is a slot, and on a media card it is a dot
|
|
234
264
|
*
|
|
235
265
|
* `status` takes a node, not a status name. `EntityStatus` is a separate
|
|
236
|
-
* component with the
|
|
266
|
+
* component with the ten-status CloudGrid vocabulary in it; putting that
|
|
237
267
|
* vocabulary in the card would mean the card knows what an entity can BE, which
|
|
238
268
|
* is product knowledge. The console maps its wire status through its own table
|
|
239
269
|
* and drops the result in here.
|
|
240
270
|
*
|
|
271
|
+
* A card that opens shows the state as a 10px dot instead of a chip, at the end
|
|
272
|
+
* of the name row and again on the panel's title row (#196). Which dot is
|
|
273
|
+
* `statusDot`'s answer, and usually nobody passes it: `statusDotFrom` below
|
|
274
|
+
* recognises the library's OWN chip and takes the state off it, so a caller
|
|
275
|
+
* already passing `<EntityStatus status="live" />` gets the new card with no
|
|
276
|
+
* edit. Anything else the card cannot read — a console chip, a string — falls
|
|
277
|
+
* back to rendering the node in the panel, because a state the card silently
|
|
278
|
+
* dropped is worse than a chip in the wrong shape.
|
|
279
|
+
*
|
|
280
|
+
* The dot is supplementary and never the only carrier: `EntityStateDot` puts the
|
|
281
|
+
* word inside it as `sr-only`, so the state is announced wherever it is drawn.
|
|
282
|
+
*
|
|
241
283
|
* ## `headerActions` is the OTHER slot, and the difference is where it renders
|
|
242
284
|
*
|
|
243
285
|
* `status` is one node rendered in TWO places: the header row and the reveal
|
|
@@ -255,18 +297,22 @@
|
|
|
255
297
|
* below where the design puts them for a library reason rather than a design
|
|
256
298
|
* one.
|
|
257
299
|
*
|
|
258
|
-
* `headerActions` is that slot. It renders **once
|
|
259
|
-
*
|
|
260
|
-
*
|
|
300
|
+
* `headerActions` is that slot. It renders **once** — and #196 moved WHERE.
|
|
301
|
+
*
|
|
302
|
+
* On a card that opens, the controls are at the end of the panel's creator line,
|
|
303
|
+
* because the rest state no longer has a header row to put them in. On a text
|
|
304
|
+
* card and on a row they are where they always were, at the right of the header.
|
|
305
|
+
* One copy either way, which is the whole of #176's rule; the placement is the
|
|
306
|
+
* founder's, from the 2026-09-09 draft.
|
|
261
307
|
*
|
|
262
308
|
* Three things about it:
|
|
263
309
|
*
|
|
264
|
-
* **
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
310
|
+
* **In the panel they carry Dashboard's gating, and for #171's reason.** They
|
|
311
|
+
* are lifted above Open's stretched layer with `relative z-10` so a tap on the
|
|
312
|
+
* pin toggle reaches the toggle, and they are `pointer-events-none` until the
|
|
313
|
+
* panel is revealed — invisible at rest means inert at rest, or the card has a
|
|
314
|
+
* region that behaves differently from every pixel around it with nothing to
|
|
315
|
+
* see.
|
|
270
316
|
*
|
|
271
317
|
* **Interactive controls inside a whole-card link are the caller's problem, and
|
|
272
318
|
* they are a real one.** With `href` set and `reveal` off, this card is wrapped
|
|
@@ -285,10 +331,10 @@
|
|
|
285
331
|
*
|
|
286
332
|
* ## Surfaces
|
|
287
333
|
*
|
|
288
|
-
* The chrome flips: ground, hairlines, title, body text
|
|
289
|
-
* come from tokens, so `data-cg-surface="panel"` on any ancestor moves
|
|
290
|
-
* together. The identity tile and the kind badge deliberately do not flip —
|
|
291
|
-
* their notes; they are pictures, and a picture does not flip.
|
|
334
|
+
* The chrome flips: ground, hairlines, title, body text, the stat rule and the
|
|
335
|
+
* panel all come from tokens, so `data-cg-surface="panel"` on any ancestor moves
|
|
336
|
+
* them together. The identity tile and the kind badge deliberately do not flip —
|
|
337
|
+
* see their notes; they are pictures, and a picture does not flip.
|
|
292
338
|
*/
|
|
293
339
|
export interface EntityCardStat {
|
|
294
340
|
/**
|
|
@@ -326,6 +372,25 @@ export declare const ENTITY_KIND_ICON: Record<EntityKind, React.ComponentType<{
|
|
|
326
372
|
* Plain nouns, no adjective: this names a thing, it does not sell it.
|
|
327
373
|
*/
|
|
328
374
|
export declare const ENTITY_KIND_LABEL: Record<EntityKind, string>;
|
|
375
|
+
/**
|
|
376
|
+
* THE TINTS. What a kind's badge sits on.
|
|
377
|
+
*
|
|
378
|
+
* A third table beside the marks and the words, added with the founder's
|
|
379
|
+
* 2026-09-09 draft (#196): the badge used to be one neutral disc for all three
|
|
380
|
+
* kinds, so the mark was the only thing telling them apart and it is 16px wide.
|
|
381
|
+
* A tint is legible from across a listing; a glyph is not.
|
|
382
|
+
*
|
|
383
|
+
* Every entry is a utility over a `--cg-kind-*` token, and those three are
|
|
384
|
+
* declared at `:root` ONLY. That is the identity tile's rule applied to a mark:
|
|
385
|
+
* the badge sits on a screenshot, and a picture does not flip. The glyph stays
|
|
386
|
+
* `--cg-text-on-accent`, which is ink at every scope, and it measures 12.74:1,
|
|
387
|
+
* 14.65:1 and 10.24:1 on the three grounds.
|
|
388
|
+
*
|
|
389
|
+
* `agent` is a PROPOSAL. The draft never draws an agent badge; #d1c9ff is its
|
|
390
|
+
* own "Secondary2 30" style, which is the nearest thing in the same set to the
|
|
391
|
+
* two it does draw. Founder may veto, and a veto is one value in tokens.
|
|
392
|
+
*/
|
|
393
|
+
export declare const ENTITY_KIND_TINT: Record<EntityKind, string>;
|
|
329
394
|
/**
|
|
330
395
|
* The sizes, in the order they get smaller. Read from the console census
|
|
331
396
|
* (2026-09-08) rather than invented: `default` is the 360px track, `compact`
|
|
@@ -342,21 +407,44 @@ export type EntityCardSize = (typeof ENTITY_CARD_SIZE_ORDER)[number];
|
|
|
342
407
|
* The kind badge on its own, exported because a listing header, a detail page or
|
|
343
408
|
* a row may want the same mark without a card around it.
|
|
344
409
|
*
|
|
345
|
-
*
|
|
346
|
-
* `
|
|
347
|
-
*
|
|
410
|
+
* 20 x 20 at a 6px corner with a 16px glyph, tinted per kind, lifted off the
|
|
411
|
+
* picture by `shadow-mark` — the founder's 2026-09-09 draft (#196). It was a
|
|
412
|
+
* 28px neutral disc with a mixed hairline; what changed is that the ground now
|
|
413
|
+
* says which kind it is and the mark is small enough to stop competing with the
|
|
414
|
+
* thumbnail it sits on.
|
|
415
|
+
*
|
|
416
|
+
* `size` is the only variant: `md` is the badge that sits on a preview, `sm` the
|
|
417
|
+
* 16px one that sits beside a title, where a 20px disc leads the line rather
|
|
418
|
+
* than following it.
|
|
419
|
+
*
|
|
420
|
+
* The badge does NOT flip per surface, and that is the identity tile's rule
|
|
421
|
+
* applied to a mark. Its ground is a `--cg-kind-*` tint and its glyph is
|
|
422
|
+
* `--cg-text-on-accent`, all four declared at `:root` only, so a tinted square
|
|
423
|
+
* with an ink glyph is what renders on white, on the purple panel and on ink
|
|
424
|
+
* alike. The alternative — a badge painted with `--cg-surface-card` and
|
|
425
|
+
* `--cg-text-primary` — inverts to white-on-white the moment the card sits
|
|
426
|
+
* inside `data-cg-surface="ink"`, because half of what it reads flips and the
|
|
427
|
+
* picture under it does not.
|
|
428
|
+
*
|
|
429
|
+
* The hairline is gone with the neutral disc: an edge existed to separate a
|
|
430
|
+
* white disc from a light screenshot, and a tint plus a drop shadow does that
|
|
431
|
+
* job without drawing a line the draft does not have.
|
|
432
|
+
*
|
|
433
|
+
* The kind is announced. The glyph is `aria-hidden` and the word rides along in
|
|
434
|
+
* an `sr-only` span, because "agent" is information and a decorative mark is not
|
|
435
|
+
* a way to convey it.
|
|
348
436
|
*/
|
|
349
437
|
declare function EntityKindBadge({ kind, size, className, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
350
438
|
kind: EntityKind;
|
|
351
439
|
size?: "sm" | "md";
|
|
352
|
-
}):
|
|
353
|
-
declare function EntityCard({ title, slug, description, size, titleLines, descriptionLines, status, headerActions, stats, seed, previewUrl, kind, reveal, openDisabledReason, dashboardHref, settingsHref, creator, href, ariaLabel, meta, footer, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "title"> & {
|
|
440
|
+
}): React.JSX.Element;
|
|
441
|
+
declare function EntityCard({ title, slug, description, size, titleLines, descriptionLines, status, statusDot, headerActions, stats, seed, previewUrl, kind, reveal, openDisabledReason, dashboardHref, settingsHref, creator, href, ariaLabel, meta, footer, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "title"> & {
|
|
354
442
|
title: string;
|
|
355
443
|
/** The entity's address, in the mono utility face. */
|
|
356
444
|
slug?: string;
|
|
357
445
|
description?: string;
|
|
358
446
|
/**
|
|
359
|
-
* How big, and which way up. `default` is the
|
|
447
|
+
* How big, and which way up. `default` is the 159/92 media card, `compact`
|
|
360
448
|
* the same card at the console's 260 and 280 tracks, `row` the horizontal
|
|
361
449
|
* list form. See the note at the top of this file for the grid track each one
|
|
362
450
|
* is meant for, and for what `row` deliberately does differently.
|
|
@@ -370,15 +458,40 @@ declare function EntityCard({ title, slug, description, size, titleLines, descri
|
|
|
370
458
|
*/
|
|
371
459
|
descriptionLines?: 1 | 2;
|
|
372
460
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
461
|
+
* What the entity currently IS, as a node. Drop an `EntityStatus` in.
|
|
462
|
+
*
|
|
463
|
+
* Where it renders depends on the form the card takes. On a `row`, and on a
|
|
464
|
+
* card with no reveal panel, it is the chip it always was, at the right of the
|
|
465
|
+
* header row. On a card that HAS a panel it becomes a dot (#196) — see
|
|
466
|
+
* `statusDot`, which is what the dot is read from.
|
|
376
467
|
*/
|
|
377
468
|
status?: React.ReactNode;
|
|
378
469
|
/**
|
|
379
|
-
* The
|
|
380
|
-
*
|
|
381
|
-
*
|
|
470
|
+
* The state as a 10px dot, for the two places the founder's card shows one:
|
|
471
|
+
* the name row at rest and the panel's title row (#196).
|
|
472
|
+
*
|
|
473
|
+
* Usually you do not pass this. If `status` is an `EntityStatus`, the card
|
|
474
|
+
* derives the dot from it, so a caller who already passes the library's chip
|
|
475
|
+
* gets the new card with no edit. Pass it explicitly when your state chip is
|
|
476
|
+
* your own — `EntityStateDot` is exported for exactly that — or when the card
|
|
477
|
+
* should show a dot and no chip anywhere.
|
|
478
|
+
*
|
|
479
|
+
* With neither a dot nor a derivable one, a panel falls back to rendering the
|
|
480
|
+
* `status` node itself, and the rest row shows nothing rather than a chip.
|
|
481
|
+
*/
|
|
482
|
+
statusDot?: React.ReactNode;
|
|
483
|
+
/**
|
|
484
|
+
* The card's own controls — a pin toggle, an overflow menu.
|
|
485
|
+
*
|
|
486
|
+
* "Pin", not "save", since #200: the founder's ruling is that the gesture is
|
|
487
|
+
* pinning, and `SaveIcon` draws `push-pin` accordingly. The PROP name and the
|
|
488
|
+
* icon export names did not move, because renaming a prop breaks every caller
|
|
489
|
+
* for a word; the console's own labels are its sibling issue.
|
|
490
|
+
*
|
|
491
|
+
* They render **once**, and where depends on the form again: in the header row
|
|
492
|
+
* on a text card and on a row, and INSIDE the panel, at the end of the
|
|
493
|
+
* creator's line, on a card that reveals (#196, superseding #176's placement
|
|
494
|
+
* while keeping its rule — one copy, never two).
|
|
382
495
|
*
|
|
383
496
|
* Read the note above before passing an interactive control together with
|
|
384
497
|
* `href`: this card wraps itself in an anchor, and it cannot intercept the
|
|
@@ -432,7 +545,12 @@ declare function EntityCard({ title, slug, description, size, titleLines, descri
|
|
|
432
545
|
openDisabledReason?: React.ReactNode;
|
|
433
546
|
/**
|
|
434
547
|
* The Dashboard action's target: the entity's page in the console, where the
|
|
435
|
-
* analytics and what runs under the hood live.
|
|
548
|
+
* analytics and what runs under the hood live.
|
|
549
|
+
*
|
|
550
|
+
* Read wherever the action pair renders — the panel on a stacked card, the end
|
|
551
|
+
* of the cluster on a `row` (#182). It is load-bearing rather than decorative
|
|
552
|
+
* when there is no `href`: it is then the card's only door, and the one that
|
|
553
|
+
* takes the stretched hit area (#193).
|
|
436
554
|
*/
|
|
437
555
|
dashboardHref?: string;
|
|
438
556
|
/**
|
|
@@ -467,6 +585,6 @@ declare function EntityCard({ title, slug, description, size, titleLines, descri
|
|
|
467
585
|
footer?: React.ReactNode;
|
|
468
586
|
/** Replaces the whole body. The preview and the card chrome still render. */
|
|
469
587
|
children?: React.ReactNode;
|
|
470
|
-
}):
|
|
588
|
+
}): React.JSX.Element;
|
|
471
589
|
export { EntityCard, EntityKindBadge };
|
|
472
590
|
//# sourceMappingURL=entity-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-card.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity-card.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgVG;AAEH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,EAAE,KAAK,CAA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