@cloudgrid-io/ui 0.31.4 → 0.31.5
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 +32 -0
- package/dist/badge/brand.d.ts +8 -0
- package/dist/badge/brand.d.ts.map +1 -0
- package/dist/badge/brand.js +22 -0
- package/dist/badge/brand.js.map +1 -0
- package/dist/badge/css-base.d.ts +25 -0
- package/dist/badge/css-base.d.ts.map +1 -0
- package/dist/badge/css-base.js +103 -0
- package/dist/badge/css-base.js.map +1 -0
- package/dist/badge/css-owner.d.ts +7 -0
- package/dist/badge/css-owner.d.ts.map +1 -0
- package/dist/badge/css-owner.js +128 -0
- package/dist/badge/css-owner.js.map +1 -0
- package/dist/badge/css-visitor.d.ts +7 -0
- package/dist/badge/css-visitor.d.ts.map +1 -0
- package/dist/badge/css-visitor.js +75 -0
- package/dist/badge/css-visitor.js.map +1 -0
- package/dist/badge/html.d.ts +26 -0
- package/dist/badge/html.d.ts.map +1 -0
- package/dist/badge/html.js +55 -0
- package/dist/badge/html.js.map +1 -0
- package/dist/badge/index.d.ts +43 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +46 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/marks.d.ts +45 -0
- package/dist/badge/marks.d.ts.map +1 -0
- package/dist/badge/marks.js +126 -0
- package/dist/badge/marks.js.map +1 -0
- package/dist/badge/owner.d.ts +213 -0
- package/dist/badge/owner.d.ts.map +1 -0
- package/dist/badge/owner.js +309 -0
- package/dist/badge/owner.js.map +1 -0
- package/dist/badge/palette.d.ts +23 -0
- package/dist/badge/palette.d.ts.map +1 -0
- package/dist/badge/palette.js +86 -0
- package/dist/badge/palette.js.map +1 -0
- package/dist/badge/root.d.ts +24 -0
- package/dist/badge/root.d.ts.map +1 -0
- package/dist/badge/root.js +11 -0
- package/dist/badge/root.js.map +1 -0
- package/dist/badge/shared.d.ts +56 -0
- package/dist/badge/shared.d.ts.map +1 -0
- package/dist/badge/shared.js +53 -0
- package/dist/badge/shared.js.map +1 -0
- package/dist/badge/visitor.d.ts +96 -0
- package/dist/badge/visitor.d.ts.map +1 -0
- package/dist/badge/visitor.js +119 -0
- package/dist/badge/visitor.js.map +1 -0
- package/dist/blocks/entity-status.d.ts +44 -1
- package/dist/blocks/entity-status.d.ts.map +1 -1
- package/dist/blocks/entity-status.js +26 -1
- package/dist/blocks/entity-status.js.map +1 -1
- package/dist/blocks/expiry-notice.d.ts +86 -0
- package/dist/blocks/expiry-notice.d.ts.map +1 -0
- package/dist/blocks/expiry-notice.js +81 -0
- package/dist/blocks/expiry-notice.js.map +1 -0
- package/dist/blocks/icons.d.ts +22 -0
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +22 -0
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/notification-row.d.ts +88 -0
- package/dist/blocks/notification-row.d.ts.map +1 -0
- package/dist/blocks/notification-row.js +32 -0
- package/dist/blocks/notification-row.js.map +1 -0
- package/dist/blocks/phosphor-marks.d.ts +10 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +15 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/brand/badge/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/brand/badge/space-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/brand/email/headline-activity.png +0 -0
- package/dist/brand/email/headline-expired.png +0 -0
- package/dist/brand/email/headline-expires-tomorrow.png +0 -0
- package/dist/brand/email/headline-expiring-soon.png +0 -0
- package/dist/brand/email/headline-invited.png +0 -0
- package/dist/brand/email/headline-sign-in-code.png +0 -0
- package/dist/brand/email/mesh.png +0 -0
- package/dist/brand/email/wordmark.png +0 -0
- package/dist/email/assets.d.ts +50 -0
- package/dist/email/assets.d.ts.map +1 -0
- package/dist/email/assets.js +16 -0
- package/dist/email/assets.js.map +1 -0
- package/dist/email/index.d.ts +204 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +429 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/palette.d.ts +40 -0
- package/dist/email/palette.d.ts.map +1 -0
- package/dist/email/palette.js +44 -0
- package/dist/email/palette.js.map +1 -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/ui/dropdown-menu.d.ts +8 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +9 -2
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/package.json +17 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/badge/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAiBhD;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,EAAE,UAAU,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,EAAgB;IACnG,OAAO,CACL,oDAAoD,GAAG,CAAC,KAAK,CAAC,gBAAgB,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG;QACjH,yBAAyB,QAAQ,EAAE,8EAA8E,GAAG,CAAC,UAAU,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB;QAC9J,IAAI;QACJ,QAAQ,CACT,CAAA;AACH,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,KAAK,GAAG,GAAW,EAAE,CAAC,sEAAsE,CAAA;AAoBzG;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,EAAE,KAAK,EAAE,OA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,KAAK;IAC7F,OAAO,wEAAwE,OAAO,kBAAkB,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,CAAA;AAC7K,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,OAAgB,EAAE,MAAc,EAAE,GAAG,GAAG,EAAE;IACjF,OAAO,2BAA2B,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,GAAG,CAAC,KAAK,CAAC,UAAU,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,CAAA;AACtI,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The visitor's half of the badge: the feedback bubble and the feedback panel,
|
|
3
|
+
* with its sign-in step. Markup only; the badge wires the behaviour.
|
|
4
|
+
*
|
|
5
|
+
* Import from `@cloudgrid-io/ui/badge/visitor` in the badge's main file. The
|
|
6
|
+
* stylesheet for this half is `BADGE_BASE_CSS + BADGE_VISITOR_CSS`.
|
|
7
|
+
*
|
|
8
|
+
* Copy follows the spec of 2026-10-12. The word "React" is never used: the
|
|
9
|
+
* bubble's name is "Leave feedback on this app".
|
|
10
|
+
*/
|
|
11
|
+
import { type SelectOption } from "./shared.js";
|
|
12
|
+
export { BADGE_BASE_CSS } from "./css-base.js";
|
|
13
|
+
export { BADGE_VISITOR_CSS } from "./css-visitor.js";
|
|
14
|
+
export { panel, scrim, select, switchControl, toggleRow } from "./shared.js";
|
|
15
|
+
export type { BadgeSide, PanelOptions, SelectOption, SelectOptions } from "./shared.js";
|
|
16
|
+
export { esc, href, glyph, wordmark, sign } from "./html.js";
|
|
17
|
+
export { badgeRoot, type BadgeRootOptions } from "./root.js";
|
|
18
|
+
export interface BubbleOptions {
|
|
19
|
+
/** The bubble's accessible name. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** The close x's accessible name. The bubble comes back on reload. */
|
|
22
|
+
closeLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The feedback bubble: a white speech bubble with a tail and no text, three
|
|
26
|
+
* icons (thumbs-up purple, wrench blue, chat green), drifting gently unless the
|
|
27
|
+
* viewer asks for reduced motion. A small x hides it until reload; it shows on
|
|
28
|
+
* hover, and always on a touch screen.
|
|
29
|
+
*
|
|
30
|
+
* Actions: `open-feedback` on the bubble, `hide-bubble` on the x.
|
|
31
|
+
*/
|
|
32
|
+
export declare function bubble({ label, closeLabel, }?: BubbleOptions): string;
|
|
33
|
+
/** The five reaction kinds, as the API stores them. */
|
|
34
|
+
export type ReactionKind = "like" | "dislike" | "idea" | "ship" | "broken";
|
|
35
|
+
/** Each kind's glyph and its name, which is the button's accessible name and tooltip. */
|
|
36
|
+
export declare const REACTIONS: ReadonlyArray<{
|
|
37
|
+
kind: ReactionKind;
|
|
38
|
+
label: string;
|
|
39
|
+
paths: readonly string[];
|
|
40
|
+
}>;
|
|
41
|
+
/** Like and Dislike exclude each other: picking one clears the other. The rest combine freely. */
|
|
42
|
+
export declare function toggleReaction(pressed: readonly ReactionKind[], kind: ReactionKind): ReactionKind[];
|
|
43
|
+
/** The note's categories, as today's badge sends them. Other is the default. */
|
|
44
|
+
export declare const NOTE_CATEGORIES: readonly SelectOption[];
|
|
45
|
+
export interface VisitorPanelOptions {
|
|
46
|
+
/** The app's name. */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Counts per kind. Each renders above zero, on all five reactions. */
|
|
49
|
+
counts?: Partial<Record<ReactionKind, number>>;
|
|
50
|
+
/** The kinds this visitor has already picked. */
|
|
51
|
+
pressed?: readonly ReactionKind[];
|
|
52
|
+
/** The note's category. Default `other`. */
|
|
53
|
+
category?: string;
|
|
54
|
+
/** Render the category menu open. */
|
|
55
|
+
categoryOpen?: boolean;
|
|
56
|
+
/** The note's text, when re-rendering. */
|
|
57
|
+
message?: string;
|
|
58
|
+
/** "Signed in as dana@atomiclabs.io". Absent: no hint. */
|
|
59
|
+
signedInAs?: string;
|
|
60
|
+
/** After Send: the note section is replaced by the sent line. */
|
|
61
|
+
sent?: boolean;
|
|
62
|
+
/** "This page is live on the grid. Learn more" points here. */
|
|
63
|
+
learnMoreUrl?: string;
|
|
64
|
+
/** `corner` (default) above the bubble. A phone shows a bottom sheet whatever this says. */
|
|
65
|
+
side?: "corner" | "right" | "left";
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The feedback panel: the question, five reactions, and "Leave a note" under a
|
|
69
|
+
* divider. Actions: `reaction` (with `data-value` = the kind) on each reaction,
|
|
70
|
+
* `category` and `category-pick` on the menu, `send` on Send, `close`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function visitorPanel({ name, counts, pressed, category, categoryOpen, message, signedInAs, sent, learnMoreUrl, side, }: VisitorPanelOptions): string;
|
|
73
|
+
export interface VisitorSignInOptions {
|
|
74
|
+
name: string;
|
|
75
|
+
/** The line above the methods. Default "Sign in to leave feedback." */
|
|
76
|
+
line?: string;
|
|
77
|
+
/** Offer "Continue with Google" (`login-google`). Default true. */
|
|
78
|
+
google?: boolean;
|
|
79
|
+
/** The email field's value, when re-rendering. */
|
|
80
|
+
email?: string;
|
|
81
|
+
/** The status line beside Send sign-in link: "Check your inbox for the link." */
|
|
82
|
+
status?: string;
|
|
83
|
+
/** "Sign in on CloudGrid", the fallback that leaves the page. */
|
|
84
|
+
signInUrl: string;
|
|
85
|
+
learnMoreUrl?: string;
|
|
86
|
+
side?: "corner" | "right" | "left";
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The sign-in step, today's badge restyled: on an app that requires sign-in, a
|
|
90
|
+
* signed-out visitor's panel opens here, then shows the reactions. Google,
|
|
91
|
+
* then an email link, then the CloudGrid sign-in page as the fallback.
|
|
92
|
+
*
|
|
93
|
+
* Actions: `login-google`, `login-email` (read `#cgb-email`), `signin` (a link).
|
|
94
|
+
*/
|
|
95
|
+
export declare function visitorSignIn({ name, line, google, email, status, signInUrl, learnMoreUrl, side, }: VisitorSignInOptions): string;
|
|
96
|
+
//# sourceMappingURL=visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../src/badge/visitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5E,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACvF,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAI5D,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAoC,EACpC,UAA6C,GAC9C,GAAE,aAAkB,GAAG,MAAM,CAW7B;AAID,uDAAuD;AACvD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE1E,yFAAyF;AACzF,eAAO,MAAM,SAAS,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,E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IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,IAAmC,EACnC,MAAa,EACb,KAAU,EACV,MAAW,EACX,SAAS,EACT,YAAyB,EACzB,IAAe,GAChB,EAAE,oBAAoB,GAAG,MAAM,CAgB/B"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The visitor's half of the badge: the feedback bubble and the feedback panel,
|
|
3
|
+
* with its sign-in step. Markup only; the badge wires the behaviour.
|
|
4
|
+
*
|
|
5
|
+
* Import from `@cloudgrid-io/ui/badge/visitor` in the badge's main file. The
|
|
6
|
+
* stylesheet for this half is `BADGE_BASE_CSS + BADGE_VISITOR_CSS`.
|
|
7
|
+
*
|
|
8
|
+
* Copy follows the spec of 2026-10-12. The word "React" is never used: the
|
|
9
|
+
* bubble's name is "Leave feedback on this app".
|
|
10
|
+
*/
|
|
11
|
+
import { BUG, CHAT_CIRCLE, CHECK_CIRCLE, GOOGLE_LOGO, LIGHTBULB_FILAMENT, ROCKET_LAUNCH, THUMBS_DOWN, THUMBS_UP, WRENCH, X } from "./marks.js";
|
|
12
|
+
import { esc, glyph, href } from "./html.js";
|
|
13
|
+
import { panel, select } from "./shared.js";
|
|
14
|
+
export { BADGE_BASE_CSS } from "./css-base.js";
|
|
15
|
+
export { BADGE_VISITOR_CSS } from "./css-visitor.js";
|
|
16
|
+
export { panel, scrim, select, switchControl, toggleRow } from "./shared.js";
|
|
17
|
+
export { esc, href, glyph, wordmark, sign } from "./html.js";
|
|
18
|
+
export { badgeRoot } from "./root.js";
|
|
19
|
+
/**
|
|
20
|
+
* The feedback bubble: a white speech bubble with a tail and no text, three
|
|
21
|
+
* icons (thumbs-up purple, wrench blue, chat green), drifting gently unless the
|
|
22
|
+
* viewer asks for reduced motion. A small x hides it until reload; it shows on
|
|
23
|
+
* hover, and always on a touch screen.
|
|
24
|
+
*
|
|
25
|
+
* Actions: `open-feedback` on the bubble, `hide-bubble` on the x.
|
|
26
|
+
*/
|
|
27
|
+
export function bubble({ label = "Leave feedback on this app", closeLabel = "Hide feedback until you reload", } = {}) {
|
|
28
|
+
return (`<div class="cgb-bubble-wrap">` +
|
|
29
|
+
`<button class="cgb-bubble" type="button" data-action="open-feedback" aria-label="${esc(label)}" aria-haspopup="dialog">` +
|
|
30
|
+
`<span class="cgb-bubble-ic" data-tone="like">${glyph(THUMBS_UP)}</span>` +
|
|
31
|
+
`<span class="cgb-bubble-ic" data-tone="fix">${glyph(WRENCH)}</span>` +
|
|
32
|
+
`<span class="cgb-bubble-ic" data-tone="talk">${glyph(CHAT_CIRCLE)}</span>` +
|
|
33
|
+
`</button>` +
|
|
34
|
+
`<button class="cgb-bubble-x" type="button" data-action="hide-bubble" aria-label="${esc(closeLabel)}">${glyph(X)}</button>` +
|
|
35
|
+
`</div>`);
|
|
36
|
+
}
|
|
37
|
+
/** Each kind's glyph and its name, which is the button's accessible name and tooltip. */
|
|
38
|
+
export const REACTIONS = [
|
|
39
|
+
{ kind: "like", label: "Like", paths: THUMBS_UP },
|
|
40
|
+
{ kind: "dislike", label: "Dislike", paths: THUMBS_DOWN },
|
|
41
|
+
{ kind: "idea", label: "Clever idea", paths: LIGHTBULB_FILAMENT },
|
|
42
|
+
{ kind: "ship", label: "Ship it", paths: ROCKET_LAUNCH },
|
|
43
|
+
{ kind: "broken", label: "Something’s broken", paths: BUG },
|
|
44
|
+
];
|
|
45
|
+
/** Like and Dislike exclude each other: picking one clears the other. The rest combine freely. */
|
|
46
|
+
export function toggleReaction(pressed, kind) {
|
|
47
|
+
if (pressed.includes(kind))
|
|
48
|
+
return pressed.filter((k) => k !== kind);
|
|
49
|
+
const rival = kind === "like" ? "dislike" : kind === "dislike" ? "like" : null;
|
|
50
|
+
return [...pressed.filter((k) => k !== rival), kind];
|
|
51
|
+
}
|
|
52
|
+
// ---- the note ------------------------------------------------------------------
|
|
53
|
+
/** The note's categories, as today's badge sends them. Other is the default. */
|
|
54
|
+
export const NOTE_CATEGORIES = [
|
|
55
|
+
{ value: "bug", label: "Bug" },
|
|
56
|
+
{ value: "idea", label: "Idea" },
|
|
57
|
+
{ value: "praise", label: "Praise" },
|
|
58
|
+
{ value: "question", label: "Question" },
|
|
59
|
+
{ value: "other", label: "Other" },
|
|
60
|
+
];
|
|
61
|
+
const LEARN_MORE = "https://cloudgrid.io";
|
|
62
|
+
const footer = (url) => `<a class="cgb-made" href="${href(url)}" target="_blank" rel="noopener">This page is live on the grid. Learn more</a>`;
|
|
63
|
+
const title = (name) => `<h2 class="cgb-title">What do you think of ${esc(name)}?</h2>`;
|
|
64
|
+
/**
|
|
65
|
+
* The feedback panel: the question, five reactions, and "Leave a note" under a
|
|
66
|
+
* divider. Actions: `reaction` (with `data-value` = the kind) on each reaction,
|
|
67
|
+
* `category` and `category-pick` on the menu, `send` on Send, `close`.
|
|
68
|
+
*/
|
|
69
|
+
export function visitorPanel({ name, counts = {}, pressed = [], category = "other", categoryOpen = false, message = "", signedInAs, sent = false, learnMoreUrl = LEARN_MORE, side = "corner", }) {
|
|
70
|
+
const reactions = REACTIONS.map(({ kind, label, paths }) => {
|
|
71
|
+
// Every kind shows its count to visitors, Dislike and Something's broken
|
|
72
|
+
// included (founder, 2026-10-12, reversing the positive-only rule).
|
|
73
|
+
const n = counts[kind];
|
|
74
|
+
const count = typeof n === "number" && n > 0 ? `<span class="cgb-rxc">${esc(n)}</span>` : "";
|
|
75
|
+
return (`<button class="cgb-rxb" type="button" data-action="reaction" data-value="${kind}" aria-pressed="${pressed.includes(kind)}" aria-label="${esc(label)}" title="${esc(label)}">` +
|
|
76
|
+
glyph(paths) +
|
|
77
|
+
count +
|
|
78
|
+
`</button>`);
|
|
79
|
+
}).join("");
|
|
80
|
+
const note = sent
|
|
81
|
+
? `<p class="cgb-sent" role="status">${glyph(CHECK_CIRCLE)}Sent. The maker sees it on their Feedback page.</p>`
|
|
82
|
+
: `<div class="cgb-note">` +
|
|
83
|
+
`<div class="cgb-note-head"><label class="cgb-note-label" for="cgb-msg">Leave a note</label>` +
|
|
84
|
+
select({ label: "Category", options: NOTE_CATEGORIES, value: category, action: "category", open: categoryOpen }) +
|
|
85
|
+
`</div>` +
|
|
86
|
+
`<textarea class="cgb-textarea" id="cgb-msg" rows="3" placeholder="Optional. Tell the maker what you noticed.">${esc(message)}</textarea>` +
|
|
87
|
+
`<div class="cgb-note-actions"><span class="cgb-hint">${signedInAs ? `Signed in as ${esc(signedInAs)}` : ""}</span>` +
|
|
88
|
+
`<button class="cgb-btn" type="button" data-action="send">Send</button></div>` +
|
|
89
|
+
`</div>`;
|
|
90
|
+
return panel({
|
|
91
|
+
label: `Send feedback on ${name}`,
|
|
92
|
+
side,
|
|
93
|
+
body: title(name) + `<div class="cgb-rx" role="group" aria-label="Reactions">${reactions}</div>` + note + footer(learnMoreUrl),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The sign-in step, today's badge restyled: on an app that requires sign-in, a
|
|
98
|
+
* signed-out visitor's panel opens here, then shows the reactions. Google,
|
|
99
|
+
* then an email link, then the CloudGrid sign-in page as the fallback.
|
|
100
|
+
*
|
|
101
|
+
* Actions: `login-google`, `login-email` (read `#cgb-email`), `signin` (a link).
|
|
102
|
+
*/
|
|
103
|
+
export function visitorSignIn({ name, line = "Sign in to leave feedback.", google = true, email = "", status = "", signInUrl, learnMoreUrl = LEARN_MORE, side = "corner", }) {
|
|
104
|
+
const body = title(name) +
|
|
105
|
+
`<p class="cgb-desc">${esc(line)}</p>` +
|
|
106
|
+
`<div class="cgb-signin">` +
|
|
107
|
+
(google
|
|
108
|
+
? `<button class="cgb-method" type="button" data-action="login-google">${glyph(GOOGLE_LOGO)}Continue with Google</button><div class="cgb-or" aria-hidden="true">OR</div>`
|
|
109
|
+
: "") +
|
|
110
|
+
`<label class="cgb-field-label" for="cgb-email">Email</label>` +
|
|
111
|
+
`<input class="cgb-input" id="cgb-email" type="email" autocomplete="email" placeholder="you@example.com" value="${esc(email)}">` +
|
|
112
|
+
`<div class="cgb-note-actions"><span class="cgb-hint" role="status">${esc(status)}</span>` +
|
|
113
|
+
`<button class="cgb-btn" type="button" data-action="login-email">Send sign-in link</button></div>` +
|
|
114
|
+
`<a class="cgb-link" href="${href(signInUrl)}" target="_top" data-action="signin">Sign in on CloudGrid</a>` +
|
|
115
|
+
`</div>` +
|
|
116
|
+
footer(learnMoreUrl);
|
|
117
|
+
return panel({ label: `Send feedback on ${name}`, side, body });
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=visitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitor.js","sourceRoot":"","sources":["../../src/badge/visitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAC9I,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAA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MAAM,CAAC,YAAY,CAAC;KAC/H,CAAC,CAAA;AACJ,CAAC;AAkBD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,IAAI,GAAG,4BAA4B,EACnC,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,EACX,SAAS,EACT,YAAY,GAAG,UAAU,EACzB,IAAI,GAAG,QAAQ,GACM;IACrB,MAAM,IAAI,GACR,KAAK,CAAC,IAAI,CAAC;QACX,uBAAuB,GAAG,CAAC,IAAI,CAAC,MAAM;QACtC,0BAA0B;QAC1B,CAAC,MAAM;YACL,CAAC,CAAC,uEAAuE,KAAK,CAAC,WAAW,CAAC,8EAA8E;YACzK,CAAC,CAAC,EAAE,CAAC;QACP,8DAA8D;QAC9D,kHAAkH,GAAG,CAAC,KAAK,CAAC,IAAI;QAChI,sEAAsE,GAAG,CAAC,MAAM,CAAC,SAAS;QAC1F,kGAAkG;QAClG,6BAA6B,IAAI,CAAC,SAAS,CAAC,+DAA+D;QAC3G,QAAQ;QACR,MAAM,CAAC,YAAY,CAAC,CAAA;IACtB,OAAO,KAAK,CAAC,EAAE,KAAK,EAAE,oBAAoB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;AACjE,CAAC"}
|
|
@@ -132,5 +132,48 @@ declare function EntityStateDot({ status, label, className, ...props }: Omit<Rea
|
|
|
132
132
|
/** Overrides the announced word. There is no visible word to override. */
|
|
133
133
|
label?: React.ReactNode;
|
|
134
134
|
}): import("react").JSX.Element;
|
|
135
|
-
|
|
135
|
+
/**
|
|
136
|
+
* HOW SOON SOMETHING EXPIRES. The tag a card and the page header show from five
|
|
137
|
+
* days before expiry (ui#295, spec "Expiry warning and Keep", 2026-10-11).
|
|
138
|
+
*
|
|
139
|
+
* Not a status. "Expires in 5 days" is not something an entity IS: the
|
|
140
|
+
* platform's status for the same page is still `live`, or `charged` for an app
|
|
141
|
+
* that was never published. So it is its own component beside `EntityStatus`
|
|
142
|
+
* rather than an eleventh row in the status table, and the ten statuses above
|
|
143
|
+
* are unchanged. A surface shows this INSTEAD of the status chip while
|
|
144
|
+
* something is about to expire, which is the spec's rule for the card.
|
|
145
|
+
*
|
|
146
|
+
* ## Two tones, from the number
|
|
147
|
+
*
|
|
148
|
+
* More than one day left is the amber of `expired` (`soon`). One day left, or
|
|
149
|
+
* less, is the red of `error` (`urgent`): the spec's "urgent on the last day".
|
|
150
|
+
* The caller passes the whole days left and nothing else, so no surface can
|
|
151
|
+
* paint "Expires tomorrow" amber.
|
|
152
|
+
*
|
|
153
|
+
* ## The word is coloured here, unlike `EntityStatus`
|
|
154
|
+
*
|
|
155
|
+
* The founder-approved mock draws the word in the state colour with a border,
|
|
156
|
+
* and the tokens for it exist: `--cg-expired-strong` and `--cg-danger-strong`
|
|
157
|
+
* are the TEXT tones of those states (7.63:1 and 5.02:1 on their fills, per their
|
|
158
|
+
* notes in tokens.css), not the indicator tones `EntityStatus` refuses to put
|
|
159
|
+
* on a word. On the purple and ink surfaces both strong tokens resolve to the
|
|
160
|
+
* surface's own text colour and the fill to a translucent wash, so the chip
|
|
161
|
+
* flips with no help. The dot stays, and the word always renders, so the tone
|
|
162
|
+
* is never colour alone: the urgent chip SAYS "tomorrow".
|
|
163
|
+
*/
|
|
164
|
+
export type EntityExpiryTone = "soon" | "urgent";
|
|
165
|
+
/** `urgent` on the last day (one day left or fewer), `soon` before it. */
|
|
166
|
+
export declare function entityExpiryTone(daysLeft: number): EntityExpiryTone;
|
|
167
|
+
/**
|
|
168
|
+
* The words, from whole days left. "Expires in 5 days", "Expires tomorrow",
|
|
169
|
+
* "Expires today". The number is always the real one.
|
|
170
|
+
*/
|
|
171
|
+
export declare function entityExpiryLabel(daysLeft: number): string;
|
|
172
|
+
declare function EntityExpiryStatus({ daysLeft, label, className, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
173
|
+
/** Whole days until expiry. 1 is tomorrow, 0 is today. */
|
|
174
|
+
daysLeft: number;
|
|
175
|
+
/** Overrides the default words. The tone still follows `daysLeft`. */
|
|
176
|
+
label?: React.ReactNode;
|
|
177
|
+
}): import("react").JSX.Element;
|
|
178
|
+
export { EntityStatus, EntityStateDot, EntityExpiryStatus };
|
|
136
179
|
//# sourceMappingURL=entity-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-status.d.ts","sourceRoot":"","sources":["../../src/blocks/entity-status.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,qHAWtB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnE,kEAAkE;AAClE,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAWzE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAehE,CAAA;AAmBD,iBAAS,YAAY,CAAC,EACpB,MAAM,EACN,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,MAAM,EAAE,gBAAgB,CAAA;IACxB,sFAAsF;IACtF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,+BAqCA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,cAAc,CAAC,EACtB,MAAM,EACN,KAAK,EACL,SAAS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B,MAAM,EACN,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,MAAM,EAAE,gBAAgB,CAAA;IACxB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,+BAwBA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEhD,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAEnE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK1D;AAOD,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAClD,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAA;IAChB,sEAAsE;IACtE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,+BAwBA;AAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -192,5 +192,30 @@ function EntityStateDot({ status, label, className, ...props }) {
|
|
|
192
192
|
// consumer's repo and a rule in our stylesheet does not.
|
|
193
193
|
status === "building" && "motion-safe:animate-pulse", className), ...props, children: _jsx("span", { className: "sr-only", children: label ?? ENTITY_STATUS_LABEL[status] }) }));
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
/** `urgent` on the last day (one day left or fewer), `soon` before it. */
|
|
196
|
+
export function entityExpiryTone(daysLeft) {
|
|
197
|
+
return daysLeft <= 1 ? "urgent" : "soon";
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* The words, from whole days left. "Expires in 5 days", "Expires tomorrow",
|
|
201
|
+
* "Expires today". The number is always the real one.
|
|
202
|
+
*/
|
|
203
|
+
export function entityExpiryLabel(daysLeft) {
|
|
204
|
+
const days = Math.max(0, Math.floor(daysLeft));
|
|
205
|
+
if (days === 0)
|
|
206
|
+
return "Expires today";
|
|
207
|
+
if (days === 1)
|
|
208
|
+
return "Expires tomorrow";
|
|
209
|
+
return `Expires in ${days} days`;
|
|
210
|
+
}
|
|
211
|
+
const EXPIRY_STYLE = {
|
|
212
|
+
soon: { chip: "border-expired-border bg-expired-fill text-expired-strong", dot: "bg-expired" },
|
|
213
|
+
urgent: { chip: "border-danger-border bg-danger-fill text-danger-strong", dot: "bg-danger" },
|
|
214
|
+
};
|
|
215
|
+
function EntityExpiryStatus({ daysLeft, label, className, ...props }) {
|
|
216
|
+
const tone = entityExpiryTone(daysLeft);
|
|
217
|
+
const style = EXPIRY_STYLE[tone];
|
|
218
|
+
return (_jsxs("span", { "data-slot": "entity-expiry-status", "data-tone": tone, "data-days-left": Math.max(0, Math.floor(daysLeft)), className: cn("inline-flex w-fit shrink-0 items-center gap-1.5 rounded-pill border px-2.5 py-0.5 text-caption font-medium whitespace-nowrap", style.chip, className), ...props, children: [_jsx("span", { "aria-hidden": "true", "data-slot": "entity-expiry-status-dot", className: cn("size-1.5 shrink-0 rounded-pill", style.dot) }), label ?? entityExpiryLabel(daysLeft)] }));
|
|
219
|
+
}
|
|
220
|
+
export { EntityStatus, EntityStateDot, EntityExpiryStatus };
|
|
196
221
|
//# sourceMappingURL=entity-status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-status.js","sourceRoot":"","sources":["../../src/blocks/entity-status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;;;GA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AAI,mBAAmB,CAAC,MAAM,CAAC,GAAQ,GAClE,CACR,CAAA;AACH,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"entity-status.js","sourceRoot":"","sources":["../../src/blocks/entity-status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM;IACN,WAAW;IACX,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,SAAS;IACT,OAAO;CACC,CAAA;AAaV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA+C;IAC5E,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,QAAQ;CAChB,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,IAAI,EAAE,MAAM;IACZ,yEAAyE;IACzE,4EAA4E;IAC5E,yEAAyE;IACzE,kBAAkB;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACf,CAAA;AAED;;;;;;GAMG;AACH,MAA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G,YAAY,CAAC,IAAI,CAAC,CAAA;IAEhC,OAAO,CACL,6BACY,sBAAsB,eACrB,IAAI,oBACC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EACjD,SAAS,EAAE,EAAE,CACX,8HAA8H,EAC9H,KAAK,CAAC,IAAI,EACV,SAAS,CACV,KACG,KAAK,aAET,8BACc,MAAM,eACR,0BAA0B,EACpC,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,KAAK,CAAC,GAAG,CAAC,GAC1D,EACD,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,IAChC,CACR,CAAA;AACH,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* THE EXPIRY NOTICE. The row an item's page shows while it is about to expire,
|
|
4
|
+
* or after it has (ui#295, spec "Expiry warning and Keep", 2026-10-11).
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* This page expires in 5 days. [ Keep ]
|
|
8
|
+
* Nobody has opened it in 25 days. Keep it and it won't expire.
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* It is the Console's app-page status row (`AppStateBanner`, the row that says
|
|
12
|
+
* Paused, Building and the rest) with a ground: one sentence, one reason, at
|
|
13
|
+
* most one action, the action under the sentence on a phone. The type matches
|
|
14
|
+
* that row: the sentence 16px semibold, the reason a step down in the secondary
|
|
15
|
+
* tone. The founder-approved mock tints it so it reads as a warning rather than
|
|
16
|
+
* a resting state.
|
|
17
|
+
*
|
|
18
|
+
* ## Variants
|
|
19
|
+
*
|
|
20
|
+
* - `soon`: five days to one day before. The amber of the expired state.
|
|
21
|
+
* - `urgent`: the last day. The danger fill.
|
|
22
|
+
* - `from-email`: the reader arrived from the warning email's Keep link. The
|
|
23
|
+
* brand tint with a 2px brand outline, and the Console passes `focusAction` so
|
|
24
|
+
* Keep has focus and is one press away. The link never keeps by itself, since
|
|
25
|
+
* email scanners open every link; this is the click that does.
|
|
26
|
+
* - `expired`: after expiry, before the Shelf. The same amber as `soon`; the
|
|
27
|
+
* words are what differ ("This page expired.").
|
|
28
|
+
*
|
|
29
|
+
* No action is a variant of its own in effect, not a value: leave `action` out
|
|
30
|
+
* for a member who is not the owner or a grid admin and cannot keep it. The
|
|
31
|
+
* row still says what is happening and the reason line says who can act.
|
|
32
|
+
*
|
|
33
|
+
* ## Accessibility
|
|
34
|
+
*
|
|
35
|
+
* `role="status"`, like the Console row it matches: a polite region, so a
|
|
36
|
+
* notice that appears while the reader is on the page is announced without
|
|
37
|
+
* taking focus. Not `alert`: nothing here is an error and nothing interrupts.
|
|
38
|
+
* The region is named (`label`, "Expiry" by default) so a reader moving by
|
|
39
|
+
* region hears what it is about.
|
|
40
|
+
*
|
|
41
|
+
* The action is a real `<button>`, described by the sentence
|
|
42
|
+
* (`aria-describedby`), so a screen reader that lands on "Keep" hears what it
|
|
43
|
+
* keeps and when it expires. The tone is never colour alone: the sentence
|
|
44
|
+
* carries it ("expires tomorrow", "expired"), and the from-email outline is a
|
|
45
|
+
* shape as well as a colour.
|
|
46
|
+
*
|
|
47
|
+
* ## Surfaces
|
|
48
|
+
*
|
|
49
|
+
* `soon`, `urgent` and `expired` are tokens all the way down: on the purple
|
|
50
|
+
* panel and on ink the fills resolve to a translucent wash and the words to the
|
|
51
|
+
* surface's text, with no help. `from-email` is a self-contained light card on
|
|
52
|
+
* every surface (`data-theme="default"`, the base scope tokens.css declares
|
|
53
|
+
* beside `:root`), the arrangement `EntityCard`'s panel and `ShowcaseScroll`
|
|
54
|
+
* use: `--cg-primary-tint` does not flip, so ink-on-tint has to be kept inside
|
|
55
|
+
* it rather than inherited as white-on-tint.
|
|
56
|
+
*/
|
|
57
|
+
export declare const EXPIRY_NOTICE_VARIANTS: readonly ["soon", "urgent", "from-email", "expired"];
|
|
58
|
+
export type ExpiryNoticeVariant = (typeof EXPIRY_NOTICE_VARIANTS)[number];
|
|
59
|
+
export interface ExpiryNoticeAction {
|
|
60
|
+
/** The word on the button. "Keep" in every spec'd case. */
|
|
61
|
+
label: string;
|
|
62
|
+
onClick: () => void;
|
|
63
|
+
/** While the request is in flight: the button is disabled and says `pendingLabel`. */
|
|
64
|
+
pending?: boolean;
|
|
65
|
+
/** Defaults to "Keeping…". */
|
|
66
|
+
pendingLabel?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface ExpiryNoticeProps extends Omit<React.ComponentProps<"section">, "title" | "children"> {
|
|
69
|
+
variant: ExpiryNoticeVariant;
|
|
70
|
+
/** The sentence. "This page expires in 5 days." */
|
|
71
|
+
title: React.ReactNode;
|
|
72
|
+
/** The reason, or who can act. "Nobody has opened it in 25 days. Keep it and it won't expire." */
|
|
73
|
+
reason?: React.ReactNode;
|
|
74
|
+
/** Leave out for a reader who cannot keep it. */
|
|
75
|
+
action?: ExpiryNoticeAction;
|
|
76
|
+
/**
|
|
77
|
+
* Focus the action when the notice mounts. For the arrival from the email
|
|
78
|
+
* (`from-email`); ignored when there is no action.
|
|
79
|
+
*/
|
|
80
|
+
focusAction?: boolean;
|
|
81
|
+
/** The region's name. Defaults to "Expiry". */
|
|
82
|
+
label?: string;
|
|
83
|
+
}
|
|
84
|
+
declare function ExpiryNotice({ variant, title, reason, action, focusAction, label, className, ...props }: ExpiryNoticeProps): React.JSX.Element;
|
|
85
|
+
export { ExpiryNotice };
|
|
86
|
+
//# sourceMappingURL=expiry-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expiry-notice.d.ts","sourceRoot":"","sources":["../../src/blocks/expiry-notice.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,eAAO,MAAM,sBAAsB,sDAAuD,CAAA;AAE1F,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnE,OAAO,EAAE,mBAAmB,CAAA;IAC5B,mDAAmD;IACnD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,kGAAkG;IAClG,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,iDAAiD;IACjD,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AASD,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,WAAmB,EACnB,KAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA6DnB;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
import { Button } from "../ui/button.js";
|
|
6
|
+
/**
|
|
7
|
+
* THE EXPIRY NOTICE. The row an item's page shows while it is about to expire,
|
|
8
|
+
* or after it has (ui#295, spec "Expiry warning and Keep", 2026-10-11).
|
|
9
|
+
*
|
|
10
|
+
* ```
|
|
11
|
+
* This page expires in 5 days. [ Keep ]
|
|
12
|
+
* Nobody has opened it in 25 days. Keep it and it won't expire.
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* It is the Console's app-page status row (`AppStateBanner`, the row that says
|
|
16
|
+
* Paused, Building and the rest) with a ground: one sentence, one reason, at
|
|
17
|
+
* most one action, the action under the sentence on a phone. The type matches
|
|
18
|
+
* that row: the sentence 16px semibold, the reason a step down in the secondary
|
|
19
|
+
* tone. The founder-approved mock tints it so it reads as a warning rather than
|
|
20
|
+
* a resting state.
|
|
21
|
+
*
|
|
22
|
+
* ## Variants
|
|
23
|
+
*
|
|
24
|
+
* - `soon`: five days to one day before. The amber of the expired state.
|
|
25
|
+
* - `urgent`: the last day. The danger fill.
|
|
26
|
+
* - `from-email`: the reader arrived from the warning email's Keep link. The
|
|
27
|
+
* brand tint with a 2px brand outline, and the Console passes `focusAction` so
|
|
28
|
+
* Keep has focus and is one press away. The link never keeps by itself, since
|
|
29
|
+
* email scanners open every link; this is the click that does.
|
|
30
|
+
* - `expired`: after expiry, before the Shelf. The same amber as `soon`; the
|
|
31
|
+
* words are what differ ("This page expired.").
|
|
32
|
+
*
|
|
33
|
+
* No action is a variant of its own in effect, not a value: leave `action` out
|
|
34
|
+
* for a member who is not the owner or a grid admin and cannot keep it. The
|
|
35
|
+
* row still says what is happening and the reason line says who can act.
|
|
36
|
+
*
|
|
37
|
+
* ## Accessibility
|
|
38
|
+
*
|
|
39
|
+
* `role="status"`, like the Console row it matches: a polite region, so a
|
|
40
|
+
* notice that appears while the reader is on the page is announced without
|
|
41
|
+
* taking focus. Not `alert`: nothing here is an error and nothing interrupts.
|
|
42
|
+
* The region is named (`label`, "Expiry" by default) so a reader moving by
|
|
43
|
+
* region hears what it is about.
|
|
44
|
+
*
|
|
45
|
+
* The action is a real `<button>`, described by the sentence
|
|
46
|
+
* (`aria-describedby`), so a screen reader that lands on "Keep" hears what it
|
|
47
|
+
* keeps and when it expires. The tone is never colour alone: the sentence
|
|
48
|
+
* carries it ("expires tomorrow", "expired"), and the from-email outline is a
|
|
49
|
+
* shape as well as a colour.
|
|
50
|
+
*
|
|
51
|
+
* ## Surfaces
|
|
52
|
+
*
|
|
53
|
+
* `soon`, `urgent` and `expired` are tokens all the way down: on the purple
|
|
54
|
+
* panel and on ink the fills resolve to a translucent wash and the words to the
|
|
55
|
+
* surface's text, with no help. `from-email` is a self-contained light card on
|
|
56
|
+
* every surface (`data-theme="default"`, the base scope tokens.css declares
|
|
57
|
+
* beside `:root`), the arrangement `EntityCard`'s panel and `ShowcaseScroll`
|
|
58
|
+
* use: `--cg-primary-tint` does not flip, so ink-on-tint has to be kept inside
|
|
59
|
+
* it rather than inherited as white-on-tint.
|
|
60
|
+
*/
|
|
61
|
+
export const EXPIRY_NOTICE_VARIANTS = ["soon", "urgent", "from-email", "expired"];
|
|
62
|
+
const VARIANT_STYLE = {
|
|
63
|
+
soon: "bg-expired-fill",
|
|
64
|
+
urgent: "bg-danger-fill",
|
|
65
|
+
"from-email": "bg-brand-tint inset-ring-2 inset-ring-brand",
|
|
66
|
+
expired: "bg-expired-fill",
|
|
67
|
+
};
|
|
68
|
+
function ExpiryNotice({ variant, title, reason, action, focusAction = false, label = "Expiry", className, ...props }) {
|
|
69
|
+
const titleId = React.useId();
|
|
70
|
+
const buttonRef = React.useRef(null);
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
// On arrival, and again only if the prop itself turns on. Not on every
|
|
73
|
+
// render: that would steal focus back from a reader who has moved on.
|
|
74
|
+
if (focusAction)
|
|
75
|
+
buttonRef.current?.focus();
|
|
76
|
+
}, [focusAction]);
|
|
77
|
+
const pending = action?.pending ?? false;
|
|
78
|
+
return (_jsxs("section", { role: "status", "aria-label": label, "data-slot": "expiry-notice", "data-variant": variant, ...(variant === "from-email" ? { "data-theme": "default" } : {}), className: cn("flex flex-wrap items-center justify-between gap-4 rounded-xl p-5 text-ink", "max-md:flex-col max-md:items-stretch", VARIANT_STYLE[variant], className), ...props, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { id: titleId, "data-slot": "expiry-notice-title", className: "m-0 text-body-md font-semibold text-ink", children: title }), reason ? (_jsx("p", { "data-slot": "expiry-notice-reason", className: "m-0 mt-1 text-body-sm text-body", children: reason })) : null] }), action ? (_jsx(Button, { ref: buttonRef, type: "button", variant: "cta", "data-slot": "expiry-notice-action", "aria-describedby": titleId, disabled: pending, onClick: action.onClick, className: "shrink-0 rounded-pill px-3.5 max-md:w-full", children: pending ? (action.pendingLabel ?? "Keeping…") : action.label })) : null] }));
|
|
79
|
+
}
|
|
80
|
+
export { ExpiryNotice };
|
|
81
|
+
//# sourceMappingURL=expiry-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expiry-notice.js","sourceRoot":"","sources":["../../src/blocks/expiry-notice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAU,CAAA;AAgC1F,MAAM,aAAa,GAAwC;IACzD,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,6CAA6C;IAC3D,OAAO,EAAE,iBAAiB;CAC3B,CAAA;AAED,SAAS,YAAY,CAAC,EACpB,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,QAAQ,EAChB,SAAS,EACT,GAAG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CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,GACtD,CACV,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/blocks/icons.d.ts
CHANGED
|
@@ -371,6 +371,28 @@ export { TerminalWindowMark as TerminalIcon, ChatCircleMark as ChatAppIcon, Gith
|
|
|
371
371
|
export { ArchiveMark as JunkyardIcon, } from "./phosphor-marks.js";
|
|
372
372
|
/** Reactions: what a person can say about an entity without writing anything. */
|
|
373
373
|
export { FireMark as ReactionResonatedIcon, HeartMark as ReactionLoveIcon, WrenchMark as ReactionUsefulIcon, SquaresFourMark as ReactionBuildOnIcon, StarMark as ReactionImpressiveIcon, } from "./phosphor-marks.js";
|
|
374
|
+
/**
|
|
375
|
+
* The badge's reaction set (#299, founder spec 2026-10-12): Like, Dislike,
|
|
376
|
+
* Clever idea, Ship it, Something's broken. It supersedes the Decision 034 set
|
|
377
|
+
* above on the badge and in the console's Feedback page; those five names stay
|
|
378
|
+
* exported because retired kinds are still read in history.
|
|
379
|
+
*
|
|
380
|
+
* `ReactionLikeIcon` is `thumbs-up`, the same artwork as `ReactionsIcon`, and
|
|
381
|
+
* `ReactionIdeaIcon` is `lightbulb-filament`, the same as `KindInspirationIcon`.
|
|
382
|
+
* Second role names, not renames: a count of all reactions and one reaction
|
|
383
|
+
* kind are two ideas, and so are an entity kind and a reaction. The
|
|
384
|
+
* `SpaceIcon` / `OverviewIcon` precedent (#225).
|
|
385
|
+
*/
|
|
386
|
+
export { ThumbsUpMark as ReactionLikeIcon, ThumbsDownMark as ReactionDislikeIcon, LightbulbFilamentMark as ReactionIdeaIcon, RocketLaunchMark as ReactionShipItIcon, BugMark as ReactionBrokenIcon, } from "./phosphor-marks.js";
|
|
387
|
+
/**
|
|
388
|
+
* Sharing a link, and what nobody but you can see (#299).
|
|
389
|
+
*
|
|
390
|
+
* `HiddenIcon` is `eye-slash`: something nobody but you can see. It is NOT
|
|
391
|
+
* `PrivateIcon` (`lock-simple`), which says who can OPEN a thing; this says who
|
|
392
|
+
* can SEE it. Generated for the badge's owner panel; the founder then set that
|
|
393
|
+
* line as plain text (2026-10-12) and kept the mark.
|
|
394
|
+
*/
|
|
395
|
+
export { ShareNetworkMark as ShareIcon, EyeSlashMark as HiddenIcon, } from "./phosphor-marks.js";
|
|
374
396
|
/** The weight departures, each replacing a numeric prop lucide used to carry. */
|
|
375
397
|
export { PulseBoldMark as ActivityBoldIcon, CompassBoldMark as DiscoverBoldIcon, StackBoldMark as LayersBoldIcon, UserBoldMark as PersonBoldIcon, HouseSimpleBoldMark as HomeBoldIcon, GridFourBoldMark as SpaceBoldIcon, PushPinFillMark as SaveFilledIcon, } from "./phosphor-marks.js";
|
|
376
398
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/blocks/icons.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkVG;AAEH,OAAO,EACL,QAAQ,IAAI,aAAa,EACzB,qBAAqB,IAAI,mBAAmB,EAC5C,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,YAAY,EAChC,eAAe,IAAI,mBAAmB,EACtC,uBAAuB,IAAI,iBAAiB,EAC5C,WAAW,IAAI,YAAY,EAC3B,OAAO,IAAI,SAAS,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AI,gBAAgB,EACzC,gBAAgB,IAAI,kBAAkB,EACtC,OAAO,IAAI,kBAAkB,GAC9B,MAAM,8BAA8B,CAAA;AAErC;;;;;;;GAOG;AACH,OAAO,EACL,gBAAgB,IAAI,SAAS,EAC7B,YAAY,IAAI,UAAU,GAC3B,MAAM,8BAA8B,CAAA;AAErC,iFAAiF;AACjF,OAAO,EACL,aAAa,IAAI,gBAAgB,EACjC,eAAe,IAAI,gBAAgB,EACnC,aAAa,IAAI,cAAc,EAC/B,YAAY,IAAI,cAAc,EAC9B,mBAAmB,IAAI,YAAY,EACnC,gBAAgB,IAAI,aAAa,EACjC,eAAe,IAAI,cAAc,GAClC,MAAM,8BAA8B,CAAA;AAErC;;;;;;GAMG;AACH,YAAY,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAA"}
|
package/dist/blocks/icons.js
CHANGED
|
@@ -383,6 +383,28 @@ export { TerminalWindowMark as TerminalIcon, ChatCircleMark as ChatAppIcon, Gith
|
|
|
383
383
|
export { ArchiveMark as JunkyardIcon, } from "./phosphor-marks.js";
|
|
384
384
|
/** Reactions: what a person can say about an entity without writing anything. */
|
|
385
385
|
export { FireMark as ReactionResonatedIcon, HeartMark as ReactionLoveIcon, WrenchMark as ReactionUsefulIcon, SquaresFourMark as ReactionBuildOnIcon, StarMark as ReactionImpressiveIcon, } from "./phosphor-marks.js";
|
|
386
|
+
/**
|
|
387
|
+
* The badge's reaction set (#299, founder spec 2026-10-12): Like, Dislike,
|
|
388
|
+
* Clever idea, Ship it, Something's broken. It supersedes the Decision 034 set
|
|
389
|
+
* above on the badge and in the console's Feedback page; those five names stay
|
|
390
|
+
* exported because retired kinds are still read in history.
|
|
391
|
+
*
|
|
392
|
+
* `ReactionLikeIcon` is `thumbs-up`, the same artwork as `ReactionsIcon`, and
|
|
393
|
+
* `ReactionIdeaIcon` is `lightbulb-filament`, the same as `KindInspirationIcon`.
|
|
394
|
+
* Second role names, not renames: a count of all reactions and one reaction
|
|
395
|
+
* kind are two ideas, and so are an entity kind and a reaction. The
|
|
396
|
+
* `SpaceIcon` / `OverviewIcon` precedent (#225).
|
|
397
|
+
*/
|
|
398
|
+
export { ThumbsUpMark as ReactionLikeIcon, ThumbsDownMark as ReactionDislikeIcon, LightbulbFilamentMark as ReactionIdeaIcon, RocketLaunchMark as ReactionShipItIcon, BugMark as ReactionBrokenIcon, } from "./phosphor-marks.js";
|
|
399
|
+
/**
|
|
400
|
+
* Sharing a link, and what nobody but you can see (#299).
|
|
401
|
+
*
|
|
402
|
+
* `HiddenIcon` is `eye-slash`: something nobody but you can see. It is NOT
|
|
403
|
+
* `PrivateIcon` (`lock-simple`), which says who can OPEN a thing; this says who
|
|
404
|
+
* can SEE it. Generated for the badge's owner panel; the founder then set that
|
|
405
|
+
* line as plain text (2026-10-12) and kept the mark.
|
|
406
|
+
*/
|
|
407
|
+
export { ShareNetworkMark as ShareIcon, EyeSlashMark as HiddenIcon, } from "./phosphor-marks.js";
|
|
386
408
|
/** The weight departures, each replacing a numeric prop lucide used to carry. */
|
|
387
409
|
export { PulseBoldMark as ActivityBoldIcon, CompassBoldMark as DiscoverBoldIcon, StackBoldMark as LayersBoldIcon, UserBoldMark as PersonBoldIcon, HouseSimpleBoldMark as HomeBoldIcon, GridFourBoldMark as SpaceBoldIcon, PushPinFillMark as SaveFilledIcon, } from "./phosphor-marks.js";
|
|
388
410
|
//# sourceMappingURL=icons.js.map
|