@cloudgrid-io/ui 0.64.0 → 0.66.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.
Files changed (167) hide show
  1. package/README.md +1 -1
  2. package/dist/blocks/add-tile.d.ts +16 -1
  3. package/dist/blocks/add-tile.d.ts.map +1 -1
  4. package/dist/blocks/add-tile.js +20 -3
  5. package/dist/blocks/add-tile.js.map +1 -1
  6. package/dist/blocks/avatar-picker.d.ts +50 -4
  7. package/dist/blocks/avatar-picker.d.ts.map +1 -1
  8. package/dist/blocks/avatar-picker.js +56 -10
  9. package/dist/blocks/avatar-picker.js.map +1 -1
  10. package/dist/blocks/bento-card-hint.d.ts +16 -0
  11. package/dist/blocks/bento-card-hint.d.ts.map +1 -0
  12. package/dist/blocks/bento-card-hint.js +23 -0
  13. package/dist/blocks/bento-card-hint.js.map +1 -0
  14. package/dist/blocks/bento-card.d.ts +59 -0
  15. package/dist/blocks/bento-card.d.ts.map +1 -0
  16. package/dist/blocks/bento-card.js +59 -0
  17. package/dist/blocks/bento-card.js.map +1 -0
  18. package/dist/blocks/coming-soon-hint.d.ts.map +1 -1
  19. package/dist/blocks/coming-soon-hint.js +110 -7
  20. package/dist/blocks/coming-soon-hint.js.map +1 -1
  21. package/dist/blocks/creation-search.d.ts +147 -0
  22. package/dist/blocks/creation-search.d.ts.map +1 -0
  23. package/dist/blocks/creation-search.js +239 -0
  24. package/dist/blocks/creation-search.js.map +1 -0
  25. package/dist/blocks/entity-card.d.ts +82 -2
  26. package/dist/blocks/entity-card.d.ts.map +1 -1
  27. package/dist/blocks/entity-card.js +176 -17
  28. package/dist/blocks/entity-card.js.map +1 -1
  29. package/dist/blocks/from-your-grid.d.ts +66 -0
  30. package/dist/blocks/from-your-grid.d.ts.map +1 -0
  31. package/dist/blocks/from-your-grid.js +63 -0
  32. package/dist/blocks/from-your-grid.js.map +1 -0
  33. package/dist/blocks/grid-profile.d.ts +25 -4
  34. package/dist/blocks/grid-profile.d.ts.map +1 -1
  35. package/dist/blocks/grid-profile.js +69 -7
  36. package/dist/blocks/grid-profile.js.map +1 -1
  37. package/dist/blocks/help-menu.d.ts +58 -0
  38. package/dist/blocks/help-menu.d.ts.map +1 -0
  39. package/dist/blocks/help-menu.js +64 -0
  40. package/dist/blocks/help-menu.js.map +1 -0
  41. package/dist/blocks/home-bento.d.ts +86 -0
  42. package/dist/blocks/home-bento.d.ts.map +1 -0
  43. package/dist/blocks/home-bento.js +87 -0
  44. package/dist/blocks/home-bento.js.map +1 -0
  45. package/dist/blocks/home-empty-illustrations.d.ts +37 -0
  46. package/dist/blocks/home-empty-illustrations.d.ts.map +1 -0
  47. package/dist/blocks/home-empty-illustrations.js +47 -0
  48. package/dist/blocks/home-empty-illustrations.js.map +1 -0
  49. package/dist/blocks/home-pinned.d.ts +168 -0
  50. package/dist/blocks/home-pinned.d.ts.map +1 -0
  51. package/dist/blocks/home-pinned.js +100 -0
  52. package/dist/blocks/home-pinned.js.map +1 -0
  53. package/dist/blocks/icons.d.ts +46 -0
  54. package/dist/blocks/icons.d.ts.map +1 -1
  55. package/dist/blocks/icons.js +46 -0
  56. package/dist/blocks/icons.js.map +1 -1
  57. package/dist/blocks/image-adjust-dialog.d.ts +68 -11
  58. package/dist/blocks/image-adjust-dialog.d.ts.map +1 -1
  59. package/dist/blocks/image-adjust-dialog.js +68 -16
  60. package/dist/blocks/image-adjust-dialog.js.map +1 -1
  61. package/dist/blocks/inspiration-cards.d.ts +241 -0
  62. package/dist/blocks/inspiration-cards.d.ts.map +1 -0
  63. package/dist/blocks/inspiration-cards.js +234 -0
  64. package/dist/blocks/inspiration-cards.js.map +1 -0
  65. package/dist/blocks/invite-popup.d.ts +63 -5
  66. package/dist/blocks/invite-popup.d.ts.map +1 -1
  67. package/dist/blocks/invite-popup.js +60 -20
  68. package/dist/blocks/invite-popup.js.map +1 -1
  69. package/dist/blocks/liquid-glass.d.ts +106 -0
  70. package/dist/blocks/liquid-glass.d.ts.map +1 -0
  71. package/dist/blocks/liquid-glass.js +283 -0
  72. package/dist/blocks/liquid-glass.js.map +1 -0
  73. package/dist/blocks/meter.d.ts +5 -2
  74. package/dist/blocks/meter.d.ts.map +1 -1
  75. package/dist/blocks/meter.js +4 -0
  76. package/dist/blocks/meter.js.map +1 -1
  77. package/dist/blocks/motion.d.ts +48 -0
  78. package/dist/blocks/motion.d.ts.map +1 -0
  79. package/dist/blocks/motion.js +148 -0
  80. package/dist/blocks/motion.js.map +1 -0
  81. package/dist/blocks/need-help-line.d.ts +21 -0
  82. package/dist/blocks/need-help-line.d.ts.map +1 -0
  83. package/dist/blocks/need-help-line.js +24 -0
  84. package/dist/blocks/need-help-line.js.map +1 -0
  85. package/dist/blocks/needs-attention.d.ts +89 -0
  86. package/dist/blocks/needs-attention.d.ts.map +1 -0
  87. package/dist/blocks/needs-attention.js +32 -0
  88. package/dist/blocks/needs-attention.js.map +1 -0
  89. package/dist/blocks/phosphor-marks.d.ts +16 -0
  90. package/dist/blocks/phosphor-marks.d.ts.map +1 -1
  91. package/dist/blocks/phosphor-marks.js +24 -0
  92. package/dist/blocks/phosphor-marks.js.map +1 -1
  93. package/dist/blocks/picture-menu.d.ts +26 -0
  94. package/dist/blocks/picture-menu.d.ts.map +1 -0
  95. package/dist/blocks/picture-menu.js +22 -0
  96. package/dist/blocks/picture-menu.js.map +1 -0
  97. package/dist/blocks/ranked-list.d.ts +7 -1
  98. package/dist/blocks/ranked-list.d.ts.map +1 -1
  99. package/dist/blocks/ranked-list.js +8 -6
  100. package/dist/blocks/ranked-list.js.map +1 -1
  101. package/dist/blocks/recent-plugs.d.ts +74 -0
  102. package/dist/blocks/recent-plugs.d.ts.map +1 -0
  103. package/dist/blocks/recent-plugs.js +20 -0
  104. package/dist/blocks/recent-plugs.js.map +1 -0
  105. package/dist/blocks/shared-grid-illustration.d.ts +55 -0
  106. package/dist/blocks/shared-grid-illustration.d.ts.map +1 -0
  107. package/dist/blocks/shared-grid-illustration.js +81 -0
  108. package/dist/blocks/shared-grid-illustration.js.map +1 -0
  109. package/dist/blocks/shelf-strip.d.ts +36 -0
  110. package/dist/blocks/shelf-strip.d.ts.map +1 -0
  111. package/dist/blocks/shelf-strip.js +32 -0
  112. package/dist/blocks/shelf-strip.js.map +1 -0
  113. package/dist/blocks/stat-tile.d.ts +17 -1
  114. package/dist/blocks/stat-tile.d.ts.map +1 -1
  115. package/dist/blocks/stat-tile.js +4 -1
  116. package/dist/blocks/stat-tile.js.map +1 -1
  117. package/dist/blocks/top-creations.d.ts +76 -0
  118. package/dist/blocks/top-creations.d.ts.map +1 -0
  119. package/dist/blocks/top-creations.js +54 -0
  120. package/dist/blocks/top-creations.js.map +1 -0
  121. package/dist/brand/email/headline-1-invitation-left.png +0 -0
  122. package/dist/brand/email/headline-2-invitations-left.png +0 -0
  123. package/dist/brand/email/headline-3-invitations-left.png +0 -0
  124. package/dist/brand/email/headline-4-invitations-left.png +0 -0
  125. package/dist/brand/email/headline-5-invitations-left.png +0 -0
  126. package/dist/brand/email/headline-6-invitations-left.png +0 -0
  127. package/dist/brand/email/headline-7-invitations-left.png +0 -0
  128. package/dist/brand/email/headline-8-invitations-left.png +0 -0
  129. package/dist/brand/email/headline-9-invitations-left.png +0 -0
  130. package/dist/brand/email/headline-you-have-1-invitation.png +0 -0
  131. package/dist/brand/email/headline-you-have-2-invitations.png +0 -0
  132. package/dist/brand/email/headline-you-have-3-invitations.png +0 -0
  133. package/dist/brand/email/headline-you-have-4-invitations.png +0 -0
  134. package/dist/brand/email/headline-you-have-5-invitations.png +0 -0
  135. package/dist/brand/email/headline-you-have-6-invitations.png +0 -0
  136. package/dist/brand/email/headline-you-have-7-invitations.png +0 -0
  137. package/dist/brand/email/headline-you-have-8-invitations.png +0 -0
  138. package/dist/brand/email/headline-you-have-9-invitations.png +0 -0
  139. package/dist/email/assets.d.ts +108 -0
  140. package/dist/email/assets.d.ts.map +1 -1
  141. package/dist/email/assets.js +18 -0
  142. package/dist/email/assets.js.map +1 -1
  143. package/dist/email/index.d.ts +71 -0
  144. package/dist/email/index.d.ts.map +1 -1
  145. package/dist/email/index.js +110 -5
  146. package/dist/email/index.js.map +1 -1
  147. package/dist/index.d.ts +20 -0
  148. package/dist/index.d.ts.map +1 -1
  149. package/dist/index.js +23 -0
  150. package/dist/index.js.map +1 -1
  151. package/dist/lib/fit.d.ts +39 -0
  152. package/dist/lib/fit.d.ts.map +1 -0
  153. package/dist/lib/fit.js +92 -0
  154. package/dist/lib/fit.js.map +1 -0
  155. package/dist/lib/motion.d.ts +165 -0
  156. package/dist/lib/motion.d.ts.map +1 -0
  157. package/dist/lib/motion.js +196 -0
  158. package/dist/lib/motion.js.map +1 -0
  159. package/dist/lib/touch-hover.d.ts +63 -0
  160. package/dist/lib/touch-hover.d.ts.map +1 -0
  161. package/dist/lib/touch-hover.js +164 -0
  162. package/dist/lib/touch-hover.js.map +1 -0
  163. package/dist/ui/dialog.d.ts +7 -1
  164. package/dist/ui/dialog.d.ts.map +1 -1
  165. package/dist/ui/dialog.js +2 -2
  166. package/dist/ui/dialog.js.map +1 -1
  167. package/package.json +2 -1
@@ -0,0 +1,234 @@
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 { useBand, useFits } from "../lib/fit.js";
6
+ import { Badge } from "../ui/badge.js";
7
+ import { Button } from "../ui/button.js";
8
+ import { CopyButton } from "./copy-button.js";
9
+ import { CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon } from "./icons.js";
10
+ import { GeminiColorMark } from "./onboard-widget.js";
11
+ import { ONBOARD_WIDGET_SLOTS, bindLogoCycle, createLogoCycle, } from "./onboard-widget-content.js";
12
+ import { ToolLogo } from "./tool-logo.js";
13
+ import { TOOL_MARKS } from "./tool-marks.js";
14
+ /** The tags: the word and the tint, per category. */
15
+ export const INSPIRATION_CATEGORIES = Object.freeze({
16
+ work: Object.freeze({ label: "For work", className: "bg-lime-tint" }),
17
+ everyday: Object.freeze({ label: "Everyday", className: "bg-brand-100" }),
18
+ fun: Object.freeze({ label: "Just for fun", className: "bg-cyan-tint" }),
19
+ });
20
+ /** The words around the ideas. */
21
+ export const INSPIRATION_COPY = Object.freeze({
22
+ title: "Your grid starts with your creations.",
23
+ subtitle: "Need inspiration? Pick an idea and make it yours.",
24
+ copy: "Copy prompt",
25
+ copied: "Copied",
26
+ blocked: "Couldn't copy",
27
+ announceCopied: "Prompt copied. Paste it into your AI coding tool.",
28
+ pasteIn: "Paste in",
29
+ /** Read after "Paste in" by a screen reader only: the mark beside it is hidden. */
30
+ pasteInEnd: "your AI coding tool",
31
+ previous: "Previous page",
32
+ next: "Next page",
33
+ });
34
+ /** The agent marks the Paste in slot shows: the pill's, slot by slot, A then B. */
35
+ export const PASTE_IN_MARKS = Object.freeze(ONBOARD_WIDGET_SLOTS.flatMap((s) => [s.a, s.b]));
36
+ const REST_MARK = ONBOARD_WIDGET_SLOTS[0].a;
37
+ /**
38
+ * The mark the Paste in slot shows after the pill's cycle moves from `prev` to
39
+ * `next`: the mark the first slot that crossed turned to. With nothing crossed,
40
+ * the rest mark, slot 1's A.
41
+ */
42
+ export function pasteInMark(prev, next) {
43
+ const i = next.findIndex((set, j) => set !== prev[j]);
44
+ if (i === -1)
45
+ return REST_MARK;
46
+ const slot = ONBOARD_WIDGET_SLOTS[i];
47
+ return next[i] === "a" ? slot.a : slot.b;
48
+ }
49
+ /** The mark shown now, turned by the pill's cycle unless held still. */
50
+ function useAgentMark(still) {
51
+ const [mark, setMark] = React.useState(REST_MARK);
52
+ React.useEffect(() => {
53
+ if (still || typeof window === "undefined" || typeof window.matchMedia !== "function")
54
+ return;
55
+ const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
56
+ let prev = ONBOARD_WIDGET_SLOTS.map(() => "a");
57
+ const cycle = createLogoCycle({
58
+ onChange: (next) => {
59
+ // Reduced motion switched on mid-loop: `bindLogoCycle` stops the cycle
60
+ // and resets it to every slot's A, which is the rest mark, whichever
61
+ // slot that reset happened to move.
62
+ const reset = reducedMotion.matches && next.every((set) => set === "a");
63
+ setMark(reset ? REST_MARK : pasteInMark(prev, next));
64
+ prev = [...next];
65
+ },
66
+ });
67
+ return bindLogoCycle(cycle, { document, reducedMotion });
68
+ }, [still]);
69
+ return still ? REST_MARK : mark;
70
+ }
71
+ /** One 20px place, every mark stacked, the shown one at full opacity. */
72
+ function AgentMark({ still }) {
73
+ const shown = useAgentMark(still);
74
+ return (_jsx("span", { "data-slot": "inspiration-card-agent", "data-agent-shown": shown, "aria-hidden": "true", className: "relative size-5 shrink-0", children: PASTE_IN_MARKS.map((name) => {
75
+ const { Mark, hex } = TOOL_MARKS[name];
76
+ const colour = ONBOARD_WIDGET_SLOTS.some((s) => s.a === name && s.aColour);
77
+ return (_jsx("span", { "data-agent": name, className: cn(
78
+ // The pill's crossfade: CSS's own ease-in-out over 600ms.
79
+ "absolute inset-0 flex transition-opacity duration-600 ease-[ease-in-out] motion-reduce:transition-none", shown === name ? "opacity-100" : "opacity-0"), children: colour ? _jsx(ToolLogo, { name: name, mark: _jsx(GeminiColorMark, {}) }) : _jsx(ToolLogo, { name: name, mark: _jsx(Mark, {}), hex: hex }) }, name));
80
+ }) }));
81
+ }
82
+ /** The button's three faces in one cell: the shown one visible, the others keep the width. */
83
+ function Face({ face, shown, children }) {
84
+ const on = face === shown;
85
+ return (_jsx("span", { "data-face": face, "aria-hidden": on ? undefined : true, className: cn("col-start-1 row-start-1 inline-flex items-center justify-center gap-1.5", on ? "visible" : "invisible"), children: children }));
86
+ }
87
+ /**
88
+ * Paper on every surface. `data-theme="default"` puts every --cg- token back to
89
+ * its default inside, but the shadcn bridge's names are declared per surface and
90
+ * arrive already resolved, so the ground reads `--cg-surface-card` directly
91
+ * (not `bg-card`) and `--ring`, which `focus-line` draws in, is declared again
92
+ * here from the reset --cg-text-accent: Primary on this white, where the
93
+ * panel's white line or ink's lime would not show.
94
+ */
95
+ const LIGHT_SCOPE = "[--ring:var(--cg-text-accent)]";
96
+ const COPY_BUTTON_CLASS =
97
+ // The design's compact filled button: 34 tall, 10 aside, 6 between the word
98
+ // and the 18px icon, radius 8. The family's type, at the caption's size.
99
+ "h-8.5 gap-1.5 rounded-xs px-2.5 text-caption font-bold";
100
+ const SPECIMEN_CLASS = {
101
+ hover: "bg-cyan-press",
102
+ // focus-line's look, drawn without the focus.
103
+ focus: "outline-1 outline-solid outline-offset-2 outline-(--ring)",
104
+ };
105
+ function InspirationCard({ image, category, title, description, prompt, specimen, className, }) {
106
+ const titleId = React.useId();
107
+ const tag = INSPIRATION_CATEGORIES[category];
108
+ const [state, setState] = React.useState("idle");
109
+ const face = specimen === "copied" ? "copied" : specimen === "blocked" ? "blocked" : state;
110
+ return (_jsxs("article", { "data-slot": "inspiration-card", "data-theme": "default", className: cn("flex h-full min-w-0 flex-col gap-2.5 rounded-md border border-hairline bg-(--cg-surface-card) p-2.75 font-ui text-ink", LIGHT_SCOPE, className), children: [_jsx("img", { "data-slot": "inspiration-card-picture", src: image, alt: "", loading: "lazy", decoding: "async", className: "block aspect-[26/15] w-full rounded-xs bg-page object-cover" }), _jsx(Badge, { "data-slot": "inspiration-card-tag", "data-category": category, className: cn("h-5.5 rounded-full px-2.5 py-0 text-caption font-bold leading-none text-ink", tag.className), children: tag.label }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [_jsx("h3", { id: titleId, "data-slot": "inspiration-card-title", className: "m-0 text-body-sm font-bold text-ink", children: title }), _jsx("p", { "data-slot": "inspiration-card-description", className: "m-0 min-h-[2lh] text-caption text-ink", children: description })] }), _jsxs("div", { "data-slot": "inspiration-card-actions", className: "mt-auto flex flex-wrap items-center justify-between gap-x-1 gap-y-2", children: [_jsx(CopyButton, { value: prompt, copiedLabel: INSPIRATION_COPY.copied, blockedLabel: INSPIRATION_COPY.blocked, announceCopied: INSPIRATION_COPY.announceCopied, onStateChange: setState, render: _jsx(Button, { "data-slot": "inspiration-card-copy", "data-face": face, "aria-describedby": titleId, size: "sm", className: cn(COPY_BUTTON_CLASS, specimen && SPECIMEN_CLASS[specimen]) }), children: () => (_jsxs("span", { className: "inline-grid", children: [_jsxs(Face, { face: "idle", shown: face, children: [INSPIRATION_COPY.copy, _jsx("span", { "data-slot": "inspiration-card-copy-icon", className: "inline-flex size-4.5", children: _jsx(CopyIcon, { className: "size-full" }) })] }), _jsxs(Face, { face: "copied", shown: face, children: [INSPIRATION_COPY.copied, _jsx("span", { "data-slot": "inspiration-card-check", className: "inline-flex size-4.5", children: _jsx(CheckIcon, { className: "size-full" }) })] }), _jsx(Face, { face: "blocked", shown: face, children: INSPIRATION_COPY.blocked })] })) }), _jsxs("span", { "data-slot": "inspiration-card-paste-in", className: "ml-auto inline-flex shrink-0 items-center gap-1.25 text-caption text-faint-strong", children: [_jsxs("span", { children: [INSPIRATION_COPY.pasteIn, _jsxs("span", { className: "sr-only", children: [" ", INSPIRATION_COPY.pasteInEnd] })] }), _jsx(AgentMark, { still: specimen !== undefined })] })] })] }));
111
+ }
112
+ /**
113
+ * The rows, in CSS, so the server's page is the hydrated one (nothing moves
114
+ * when the script arrives). The card's inside is its outer width less the
115
+ * 24 padding, so `INSPIRATION_COLUMNS`' outer 516 and 776 are 468 and 728
116
+ * here. One to a row, 16 apart, under 468; two, 12 apart, from 468, the
117
+ * third idea of a server's page of three hidden (the script then pages two
118
+ * at a time, so the same two are in view); three, 16 apart, from 728.
119
+ */
120
+ const PAGE_COLUMNS = "m-0 grid list-none grid-cols-1 gap-4 p-0 @min-[468px]/inspiration-cards:grid-cols-2 @min-[468px]/inspiration-cards:gap-3 @min-[728px]/inspiration-cards:grid-cols-3 @min-[728px]/inspiration-cards:gap-4 @min-[468px]/inspiration-cards:@max-[728px]/inspiration-cards:[&>li:nth-child(n+3)]:hidden";
121
+ /**
122
+ * Two to a row is 20 inside, not 24, and a card cannot set its own padding
123
+ * from its own size: its rows come 4 out on every side instead.
124
+ */
125
+ const TWO_INSET = "@min-[468px]/inspiration-cards:@max-[728px]/inspiration-cards:*:-mx-1 @min-[468px]/inspiration-cards:@max-[728px]/inspiration-cards:*:first:-mt-1 @min-[468px]/inspiration-cards:@max-[728px]/inspiration-cards:*:last:-mb-1";
126
+ /**
127
+ * Where the card puts its ideas two to a row (ui#546, Asaf's option A): under
128
+ * 40rem inside three do not fit, and stacked one under another the card is
129
+ * very tall on a narrow laptop. Two to a row is tighter (Asaf, 2026-11-20):
130
+ * 12 between the idea cards and 20 inside the card, against 16 and 24.
131
+ *
132
+ * The widths are the card's OUTER width, so the band does not move when two
133
+ * to a row changes the padding. An idea card's action row is Copy prompt
134
+ * (126.4) + 4 + Paste in with its mark (72.5) = 202.9 here; CI's Linux
135
+ * Chromium sets it 3.1 wider, 206.0. An idea card adds 12 each side (11
136
+ * padding, the 1px edge).
137
+ *
138
+ * - `twoMin` 516: two idea cards each fit their row on one line on Linux too,
139
+ * with the same 2 to spare: 206.0 + 24 + 2 = 232; two, 12 apart, 20 inside
140
+ * each side = 516 (the bare Linux minimum is 512). The Home at 1024 is 519.
141
+ * Under it, a phone, one to a row as before.
142
+ * - `threeMin` 776: three idea cards each fit their row on one line on Linux
143
+ * too, with 2 to spare: 206.0 + 24 + 2 = 232, the design's own card; three,
144
+ * 16 apart, 24 inside each side = 776, the card on the Home at 1440. Under
145
+ * it a card is too narrow for three (at 40rem inside, the old rule, Paste
146
+ * in wrapped at 1366), so it shows two.
147
+ */
148
+ export const INSPIRATION_COLUMNS = Object.freeze({ twoMin: 516, threeMin: 776, padding: 24, gap: 16, twoPadding: 20, twoGap: 12 });
149
+ /** How many ideas a row holds at the card's outer width: 1, 2 from `twoMin`, 3 from `threeMin`. */
150
+ export function inspirationColumns(width) {
151
+ const c = INSPIRATION_COLUMNS;
152
+ if (width >= c.threeMin)
153
+ return 3;
154
+ if (width >= c.twoMin)
155
+ return 2;
156
+ return 1;
157
+ }
158
+ /**
159
+ * Ideas per page: `pageSize` (3) three to a row and on a phone; two thirds of
160
+ * it (2) two to a row; twice that (4) two to a row with room for a second row.
161
+ */
162
+ export function inspirationPerPage({ pageSize, columns, secondRow }) {
163
+ const size = Math.max(1, Math.floor(pageSize));
164
+ if (columns !== 2)
165
+ return size;
166
+ const row = Math.max(1, Math.round((size * 2) / 3));
167
+ return secondRow ? row * 2 : row;
168
+ }
169
+ /** The page, from 0, that holds idea `first` when pages hold `perPage`. */
170
+ export function inspirationPageOf(first, perPage) {
171
+ return Math.floor(Math.max(0, first) / Math.max(1, perPage));
172
+ }
173
+ /** The pager's arrow: a 28 by 30 ghost button, an 18px chevron, dimmed at the end. */
174
+ const ARROW_CLASS = "h-7.5 w-7 text-ink hover:bg-(--cg-hover) hover:text-ink aria-disabled:cursor-default aria-disabled:opacity-30 aria-disabled:hover:bg-transparent [&_svg]:size-4.5";
175
+ function InspirationCards({ ideas, title = INSPIRATION_COPY.title, subtitle = INSPIRATION_COPY.subtitle, pageSize = 3, layout = "paged", page: pageProp, defaultPage = 0, onPageChange, specimen, className, ...props }) {
176
+ const headingId = React.useId();
177
+ const size = Math.max(1, Math.floor(pageSize));
178
+ // Two to a row only once measured: the server and the first render are the
179
+ // card as it always was, three to a row from 40rem and stacked under it.
180
+ const section = React.useRef(null);
181
+ const columns = useBand(section, inspirationColumns) ?? 3;
182
+ const two = columns === 2;
183
+ const rowSize = inspirationPerPage({ pageSize: size, columns, secondRow: false });
184
+ const rowPages = Math.max(1, Math.ceil(ideas.length / rowSize));
185
+ // Fill, three to a row: every page at once. Fill, two to a row: a second row
186
+ // of two on each page. Both only in the room a stretch gives.
187
+ const fillAll = layout === "fill" && !two && rowPages > 1;
188
+ const fillTwo = layout === "fill" && two && rowPages > 1;
189
+ const more = React.useRef(null);
190
+ const rows = React.useRef(null);
191
+ const viewport = React.useRef(null);
192
+ const allShown = useFits(more, rows, fillAll);
193
+ // The second row is as tall as the first, so the first row measures it,
194
+ // with the 12 above it: the room never depends on what is shown in it.
195
+ const secondRow = useFits(more, viewport, fillTwo, INSPIRATION_COLUMNS.twoGap);
196
+ const perPage = inspirationPerPage({ pageSize: size, columns, secondRow });
197
+ const pages = Math.max(1, Math.ceil(ideas.length / perPage));
198
+ // The card keeps its place as the first idea in view, so a change of
199
+ // columns or of rows shows the page that holds it.
200
+ const [anchor, setAnchor] = React.useState(Math.max(0, defaultPage) * size);
201
+ // Every page shown at once starts at page 1, so when the room goes the card
202
+ // is back on page 1, the row that was at the top (the card's own place only;
203
+ // a caller driving `page` keeps it).
204
+ const [wasAllShown, setWasAllShown] = React.useState(allShown);
205
+ if (wasAllShown !== allShown) {
206
+ setWasAllShown(allShown);
207
+ if (allShown)
208
+ setAnchor(0);
209
+ }
210
+ const page = Math.min(Math.max(0, pageProp ?? inspirationPageOf(anchor, perPage)), pages - 1);
211
+ const start = allShown ? 0 : page * perPage;
212
+ const shown = ideas.slice(start, start + rowSize);
213
+ const paged = pages > 1 && !allShown;
214
+ const go = (next) => {
215
+ if (next < 0 || next >= pages || next === page)
216
+ return;
217
+ if (pageProp === undefined)
218
+ setAnchor(next * perPage);
219
+ onPageChange?.(next);
220
+ };
221
+ const onKeyDown = (event) => {
222
+ if (event.key === "ArrowLeft") {
223
+ event.preventDefault();
224
+ go(page - 1);
225
+ }
226
+ else if (event.key === "ArrowRight") {
227
+ event.preventDefault();
228
+ go(page + 1);
229
+ }
230
+ };
231
+ return (_jsxs("section", { ref: section, "data-slot": "inspiration-cards", "data-theme": "default", ...(layout === "fill" ? { "data-layout": "fill", "data-all-shown": allShown } : {}), ...(two ? { "data-columns": "2" } : {}), ...(fillTwo ? { "data-second-row": secondRow } : {}), "aria-labelledby": headingId, ...(paged ? { "aria-roledescription": "carousel" } : {}), className: cn("@container/inspiration-cards flex w-full min-w-0 flex-col gap-5 rounded-md bg-(--cg-surface-card) p-6 font-ui text-ink", TWO_INSET, LIGHT_SCOPE, className), ...props, children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-3", children: [_jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [_jsx("h2", { id: headingId, "data-slot": "inspiration-cards-title", className: "m-0 text-body-xl font-bold text-ink", children: title }), _jsx("p", { "data-slot": "inspiration-cards-subtitle", className: "m-0 text-caption text-ink", children: subtitle })] }), paged ? (_jsxs("div", { "data-slot": "inspiration-cards-pager", className: "ml-auto flex shrink-0 items-center gap-2", children: [_jsx(Button, { "data-slot": "inspiration-cards-previous", variant: "ghost", size: "icon-sm", "aria-label": INSPIRATION_COPY.previous, "aria-disabled": page === 0 || undefined, onClick: () => go(page - 1), onKeyDown: onKeyDown, className: ARROW_CLASS, children: _jsx(ChevronLeftIcon, {}) }), _jsxs("span", { "data-slot": "inspiration-cards-position", "aria-hidden": "true", className: "text-caption font-bold text-ink tabular-nums", children: [page + 1, " / ", pages] }), _jsx(Button, { "data-slot": "inspiration-cards-next", variant: "ghost", size: "icon-sm", "aria-label": INSPIRATION_COPY.next, "aria-disabled": page === pages - 1 || undefined, onClick: () => go(page + 1), onKeyDown: onKeyDown, className: ARROW_CLASS, children: _jsx(ChevronRightIcon, {}) })] })) : null] }), _jsx("div", { ref: viewport, "data-slot": "inspiration-cards-viewport", "aria-live": "polite", className: "min-w-0", children: _jsx("ul", { "data-slot": "inspiration-cards-page", ...(paged ? { "aria-roledescription": "slide", "aria-label": `Page ${page + 1} of ${pages}` } : {}), className: PAGE_COLUMNS, children: shown.map((idea, i) => (_jsx("li", { className: "min-w-0", children: _jsx(InspirationCard, { ...idea, specimen: specimen }) }, `${page}-${i}`))) }, page) }), fillAll || fillTwo ? (_jsx("div", { ref: more, "data-slot": "inspiration-cards-more", className: "-mt-5 min-h-0 flex-[1_1_0] overflow-hidden", children: fillTwo ? (_jsx("ul", { "data-slot": "inspiration-cards-second-row", className: cn(PAGE_COLUMNS, "pt-3 transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none", secondRow ? "visible opacity-100" : "invisible opacity-0"), children: ideas.slice(page * perPage + rowSize, page * perPage + 2 * rowSize).map((idea, i) => (_jsx("li", { className: "min-w-0", children: _jsx(InspirationCard, { ...idea, specimen: specimen }) }, `${page}-${i}`))) })) : (_jsx("div", { ref: rows, "data-slot": "inspiration-cards-more-rows", className: cn("grid gap-4 pt-4 transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none", allShown ? "visible opacity-100" : "invisible opacity-0"), children: Array.from({ length: pages - 1 }, (_, p) => (_jsx("ul", { "data-slot": "inspiration-cards-row", "data-page": p + 1, className: PAGE_COLUMNS, children: ideas.slice((p + 1) * size, (p + 2) * size).map((idea, i) => (_jsx("li", { className: "min-w-0", children: _jsx(InspirationCard, { ...idea, specimen: specimen }) }, i))) }, p + 1))) })) })) : null] }));
232
+ }
233
+ export { InspirationCard, InspirationCards };
234
+ //# sourceMappingURL=inspiration-cards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspiration-cards.js","sourceRoot":"","sources":["../../src/blocks/inspiration-cards.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAkB,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,eAAe,GAEhB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAqB,MAAM,0BAA0B,C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AAI,IACA,CACX,CAAA;AACH,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
@@ -38,7 +38,7 @@ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
38
38
  * Opening moves focus to the dialog itself, not to Copy (founder, 2026-10-21:
39
39
  * no ring on Copy when the card appears). Base UI's popup is already
40
40
  * `tabindex="-1"` and labelled by the title, so a screen reader announces "Know
41
- * someone who'd use CloudGrid?, dialog" and the next Tab reaches the x, then
41
+ * someone who would use CloudGrid?, dialog" and the next Tab reaches the x, then
42
42
  * Copy, where `:focus-visible` draws the ring for a keyboard user only. The
43
43
  * popup's own outline is off: it is a container, and the card's edge already
44
44
  * shows where focus is. `initialFocus={false}` leaves focus where it was, which
@@ -89,11 +89,28 @@ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
89
89
  * the page's in the same pixels. The field is `--cg-surface-raised` on white,
90
90
  * as drawn, and `--cg-hover` inside a panel or ink scope, because raised is
91
91
  * declared at `:root` only and would be a pale slab with white text on it.
92
+ *
93
+ * ## Invitations left (ui#517, cloudgrid#6645)
94
+ *
95
+ * Refer a friend gives each person a number of invitations, and the popup says
96
+ * how many are left: `invitationsLeft={3}` draws a row between the line and the
97
+ * field, the count in the library's `tag` badge and "invitations left" beside
98
+ * it ("1 invitation left" for one, `invitationsLeftLabel` for other words).
99
+ * Without the prop nothing is drawn and the popup is byte for byte what it was,
100
+ * except the title, now "Know someone who would use CloudGrid?" (Asaf, 2026-11-22)
101
+ * (registry/e2e/refer-a-friend-517.spec.ts pins it against 0.65.0). WHEN to
102
+ * show the count, and hiding every surface at 0, are the Console's (#6645, "At
103
+ * 0"): the library draws the number it is given.
104
+ *
105
+ * `ReferFriendBlock` is the same offer on the Profile page: a section with
106
+ * "Refer a friend", the same count row, one line, and the same field and Copy,
107
+ * so Copied and Blocked behave as they do here. Who joined is not shown
108
+ * (#6645 §3).
92
109
  */
93
110
  type InviteLayout = "auto" | "card" | "sheet";
94
111
  type InviteCopyState = "idle" | "copied" | "blocked";
95
112
  declare const INVITE_DEFAULTS: {
96
- readonly title: "Know someone who'd use CloudGrid?";
113
+ readonly title: "Know someone who would use CloudGrid?";
97
114
  readonly description: "Send them this link to start their own grid.";
98
115
  readonly copyLabel: "Copy";
99
116
  readonly copiedLabel: "Copied";
@@ -101,6 +118,10 @@ declare const INVITE_DEFAULTS: {
101
118
  readonly copyAriaLabel: "Copy the invite link";
102
119
  readonly closeLabel: "Close";
103
120
  readonly pillLabel: "Invite people";
121
+ /** The words after the count: "1 invitation left", "3 invitations left". */
122
+ readonly invitationsLeft: (count: number) => "invitation left" | "invitations left";
123
+ readonly referTitle: "Refer a friend";
124
+ readonly referDescription: "CloudGrid is invite-only during the launch. Send your link to someone who would use it. An invitation is used when they create an account.";
104
125
  };
105
126
  /**
106
127
  * The collapsed invite: a 44px pill with the UserPlus mark and "Invite people".
@@ -148,9 +169,46 @@ type InvitePopupProps = {
148
169
  /** The x's accessible name. */
149
170
  closeLabel?: string;
150
171
  pillLabel?: string;
172
+ /**
173
+ * How many invitations the person has left. Draws the row "3 invitations
174
+ * left" between the line and the field. Leave it out and there is no row.
175
+ */
176
+ invitationsLeft?: number;
177
+ /** The words after the count. Default: "invitation left" for 1, else "invitations left". */
178
+ invitationsLeftLabel?: (count: number) => string;
151
179
  className?: string;
152
180
  };
153
- declare function InvitePopup({ link, open, onOpenChange, onCopy, pill, layout, copyState, initialFocus, container, title, description, copyLabel, copiedLabel, blockedLabel, copyAriaLabel, closeLabel, pillLabel, className, }: InvitePopupProps): React.JSX.Element;
154
- export { InvitePill, InvitePopup, INVITE_DEFAULTS };
155
- export type { InviteCopyState, InviteLayout, InvitePopupProps };
181
+ declare function InvitePopup({ link, open, onOpenChange, onCopy, pill, layout, copyState, initialFocus, container, title, description, copyLabel, copiedLabel, blockedLabel, copyAriaLabel, closeLabel, pillLabel, invitationsLeft, invitationsLeftLabel, className, }: InvitePopupProps): React.JSX.Element;
182
+ type ReferFriendBlockProps = {
183
+ /** The invite link. Shown without its scheme, written to the clipboard verbatim. */
184
+ link: string;
185
+ /** How many invitations are left. The Console hides the block at 0 (#6645). */
186
+ invitationsLeft: number;
187
+ /** Called after the link reached the clipboard. Not called when the browser refused. */
188
+ onCopy?: (link: string) => void;
189
+ /** Pin the copy control's label, for previews. Leave it out for the real cycle. */
190
+ copyState?: InviteCopyState;
191
+ /** The heading. Default "Refer a friend". */
192
+ title?: string;
193
+ /** The one line under the heading. */
194
+ description?: string;
195
+ /** The words after the count. Default: "invitation left" for 1, else "invitations left". */
196
+ invitationsLeftLabel?: (count: number) => string;
197
+ copyLabel?: string;
198
+ copiedLabel?: string;
199
+ /** The label when the browser refuses the clipboard write. */
200
+ blockedLabel?: string;
201
+ /** Copy's accessible name, which stays put while the visible label flips. */
202
+ copyAriaLabel?: string;
203
+ className?: string;
204
+ };
205
+ /**
206
+ * The Profile page's "Refer a friend" block (ui#517, cloudgrid#6645 §3): a
207
+ * section named by its heading, the count at the heading's right, one line,
208
+ * and the popup's own link field and Copy. On a phone the count wraps under
209
+ * the heading when the two do not fit on one line.
210
+ */
211
+ declare function ReferFriendBlock({ link, invitationsLeft, onCopy, copyState, title, description, invitationsLeftLabel, copyLabel, copiedLabel, blockedLabel, copyAriaLabel, className, }: ReferFriendBlockProps): React.JSX.Element;
212
+ export { InvitePill, InvitePopup, INVITE_DEFAULTS, ReferFriendBlock };
213
+ export type { InviteCopyState, InviteLayout, InvitePopupProps, ReferFriendBlockProps };
156
214
  //# sourceMappingURL=invite-popup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"invite-popup.d.ts","sourceRoot":"","sources":["../../src/blocks/invite-popup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAOjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC3C,aAA6C,EAC7C,SAAS,GACV,EAAE,qBAAqB,qBAoCvB;AAED,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA;AACrE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,CAAA"}
@@ -2,12 +2,15 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
5
+ import { Badge } from "../ui/badge.js";
5
6
  import { Button } from "../ui/button.js";
6
7
  import { CheckIcon, CloseIcon, CopyIcon, InvitePersonIcon } from "./icons.js";
7
8
  import { cn } from "../lib/cloudgrid-cn.js";
8
9
  import { usePortalContainer } from "../lib/portal-container.js";
9
10
  const INVITE_DEFAULTS = {
10
- title: "Know someone who'd use CloudGrid?",
11
+ // "who would", never "who'd" (Asaf, 2026-11-22): the title is Refer a
12
+ // friend's main line, so it changed with ui#517.
13
+ title: "Know someone who would use CloudGrid?",
11
14
  description: "Send them this link to start their own grid.",
12
15
  copyLabel: "Copy",
13
16
  copiedLabel: "Copied",
@@ -15,6 +18,10 @@ const INVITE_DEFAULTS = {
15
18
  copyAriaLabel: "Copy the invite link",
16
19
  closeLabel: "Close",
17
20
  pillLabel: "Invite people",
21
+ /** The words after the count: "1 invitation left", "3 invitations left". */
22
+ invitationsLeft: (count) => (count === 1 ? "invitation left" : "invitations left"),
23
+ referTitle: "Refer a friend",
24
+ referDescription: "CloudGrid is invite-only during the launch. Send your link to someone who would use it. An invitation is used when they create an account.",
18
25
  };
19
26
  /** How long Copied shows before the label returns to Copy. `CommandField`'s. */
20
27
  const COPIED_MS = 1600;
@@ -50,13 +57,18 @@ const GRABBER_ROW_CLASS = {
50
57
  function InvitePill({ label = INVITE_DEFAULTS.pillLabel, placed = false, className, type = "button", ...props }) {
51
58
  return (_jsxs("button", { "data-slot": "invite-pill", type: type, className: cn("inline-flex h-11 shrink-0 items-center gap-2 rounded-pill border border-hairline pr-4.5 pl-3.5", "bg-popover text-ink in-data-[cg-surface=panel]:bg-panel in-data-[cg-surface=ink]:bg-code", "font-ui text-body-sm leading-none font-bold whitespace-nowrap shadow-(--cg-shadow-card-hover)", "cursor-pointer transition-[background-color,box-shadow] duration-(--cg-duration) ease-out hover:shadow-(--cg-shadow-hover) hover:bg-raised in-data-[cg-surface=panel]:hover:bg-(--cg-hover) in-data-[cg-surface=ink]:hover:bg-(--cg-hover)", FOCUS_RING, placed && "fixed right-6 bottom-6 z-50", className), ...props, children: [_jsx(InvitePersonIcon, { className: "size-4.5 text-(--cg-text-accent)" }), label] }));
52
59
  }
53
- function InvitePopup({ link, open, onOpenChange, onCopy, pill = true, layout = "auto", copyState, initialFocus = true, container, title = INVITE_DEFAULTS.title, description = INVITE_DEFAULTS.description, copyLabel = INVITE_DEFAULTS.copyLabel, copiedLabel = INVITE_DEFAULTS.copiedLabel, blockedLabel = INVITE_DEFAULTS.blockedLabel, copyAriaLabel = INVITE_DEFAULTS.copyAriaLabel, closeLabel = INVITE_DEFAULTS.closeLabel, pillLabel = INVITE_DEFAULTS.pillLabel, className, }) {
60
+ /**
61
+ * The count and its words: the `tag` badge (24 tall, radius 6, the accent on
62
+ * the page grey, flipping on a panel or ink) and the words in the line's face.
63
+ * The popup's row and the Profile block's heading row are this one element.
64
+ */
65
+ function InvitationsLeft({ count, label, slot, className, }) {
66
+ return (_jsxs("p", { "data-slot": slot, className: cn("m-0 flex items-center gap-2.5 font-body text-[length:var(--cg-body-14)] leading-body text-body", className), children: [_jsx(Badge, { variant: "tag", className: "min-w-6.5 font-medium tabular-nums", children: count }), " ", _jsx("span", { children: label(count) })] }));
67
+ }
68
+ /** The copy cycle the popup and the block share: Copy, then Copied or Blocked, then Copy. */
69
+ function useInviteCopy(link, onCopy) {
54
70
  const [ownState, setOwnState] = React.useState("idle");
55
- const state = copyState ?? ownState;
56
71
  const timer = React.useRef(undefined);
57
- const popupRef = React.useRef(null);
58
- const pillRef = React.useRef(null);
59
- const portalContainer = usePortalContainer(container);
60
72
  React.useEffect(() => () => clearTimeout(timer.current), []);
61
73
  async function copy() {
62
74
  let next;
@@ -73,6 +85,34 @@ function InvitePopup({ link, open, onOpenChange, onCopy, pill = true, layout = "
73
85
  clearTimeout(timer.current);
74
86
  timer.current = setTimeout(() => setOwnState("idle"), COPIED_MS);
75
87
  }
88
+ return { ownState, copy };
89
+ }
90
+ /**
91
+ * The link field with Copy inside its right edge: the popup's, and the Profile
92
+ * block's, so both look and behave as one. `slot` prefixes the data-slots
93
+ * (`invite-popup` gives `invite-popup-field`, `-link` and `-copy`).
94
+ */
95
+ function InviteLinkField({ slot, link, state, onCopyClick, labels, copyAriaLabel, }) {
96
+ return (_jsxs("div", { "data-slot": `${slot}-field`, className: cn("flex items-center gap-2 rounded-md border border-hairline py-1.5 pr-1.5 pl-3.5", "bg-raised in-data-[cg-surface=panel]:bg-(--cg-hover) in-data-[cg-surface=ink]:bg-(--cg-hover)"), children: [_jsx("code", { "data-slot": `${slot}-link`, title: link, className: "min-w-0 flex-1 truncate font-mono text-caption text-ink", children: link.replace(/^https?:\/\//, "") }), _jsxs(Button, { type: "button", variant: "cta", onClick: onCopyClick, "data-slot": `${slot}-copy`, "data-state": state, "aria-label": copyAriaLabel, className: cn(
97
+ // EmptyCreations' Add, the frame's same button: 40px, 16px corners,
98
+ // Manrope 600 at 15px. 12 / 14 padding round a 20px mark.
99
+ "relative h-10 min-w-27 gap-1.5 rounded-xl pr-3.5 pl-3 font-ui text-body-sm font-bold",
100
+ // The 44px hit area: 2px above and below, inside the field's padding.
101
+ // 3px from the pseudo's origin, because an absolute box is placed
102
+ // against the PADDING box and Button carries a 1px transparent
103
+ // border: 38 + 3 + 3 = 44, where -0.5 measured 42 (e2e).
104
+ "before:absolute before:inset-x-0 before:-inset-y-0.75 before:content-['']"), children: [state === "copied" ? _jsx(CheckIcon, { className: "size-5" }) : _jsx(CopyIcon, { className: "size-5" }), _jsx("span", { className: "grid", children: ["idle", "copied", "blocked"].map((s) => (_jsx("span", { "data-label": s, "aria-hidden": s === state ? undefined : true, className: cn("[grid-area:1/1]", s === state ? "visible" : "invisible"), children: labels[s] }, s))) })] })] }));
105
+ }
106
+ /** What the live region says after a copy: the label, or that the browser refused. */
107
+ function copyStatus(state, copiedLabel) {
108
+ return state === "copied" ? copiedLabel : state === "blocked" ? "The browser blocked the copy" : "";
109
+ }
110
+ function InvitePopup({ link, open, onOpenChange, onCopy, pill = true, layout = "auto", copyState, initialFocus = true, container, title = INVITE_DEFAULTS.title, description = INVITE_DEFAULTS.description, copyLabel = INVITE_DEFAULTS.copyLabel, copiedLabel = INVITE_DEFAULTS.copiedLabel, blockedLabel = INVITE_DEFAULTS.blockedLabel, copyAriaLabel = INVITE_DEFAULTS.copyAriaLabel, closeLabel = INVITE_DEFAULTS.closeLabel, pillLabel = INVITE_DEFAULTS.pillLabel, invitationsLeft, invitationsLeftLabel = INVITE_DEFAULTS.invitationsLeft, className, }) {
111
+ const { ownState, copy } = useInviteCopy(link, onCopy);
112
+ const state = copyState ?? ownState;
113
+ const popupRef = React.useRef(null);
114
+ const pillRef = React.useRef(null);
115
+ const portalContainer = usePortalContainer(container);
76
116
  const labels = {
77
117
  idle: copyLabel,
78
118
  copied: copiedLabel,
@@ -83,19 +123,19 @@ function InvitePopup({ link, open, onOpenChange, onCopy, pill = true, layout = "
83
123
  // focus returns, so it has to be the same element when it comes back.
84
124
  render: _jsx(InvitePill, { label: pillLabel, placed: true, className: open ? "hidden" : undefined }) })) : null, _jsx(DialogPrimitive.Portal, { container: portalContainer, children: _jsxs(DialogPrimitive.Popup, { ref: popupRef, "data-slot": "invite-popup", "data-layout": layout, initialFocus: initialFocus ? popupRef : false, finalFocus: pill ? pillRef : undefined, className: cn("fixed z-50 flex flex-col gap-3.5 border-hairline text-ink outline-none", "bg-popover in-data-[cg-surface=panel]:bg-panel in-data-[cg-surface=ink]:bg-code", "shadow-[var(--cg-shadow-panel),var(--cg-shadow-hover)]", "duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", LAYOUT_CLASS[layout], className), children: [_jsx("div", { "data-slot": "invite-popup-grabber", "aria-hidden": "true", className: cn("justify-center", GRABBER_ROW_CLASS[layout]), children: _jsx("span", { className: "block h-1 w-9 rounded-pill bg-control" }) }), _jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx(DialogPrimitive.Title, { "data-slot": "invite-popup-title", className: "m-0 min-w-0 flex-1 font-ui text-body-18 leading-heading font-bold text-ink", children: title }), _jsx(DialogPrimitive.Close, { "data-slot": "invite-popup-close", "aria-label": closeLabel, className: cn("relative grid size-7 shrink-0 cursor-pointer place-items-center rounded-pill text-body", "transition-colors duration-(--cg-duration) ease-out hover:bg-(--cg-hover) hover:text-ink",
85
125
  // The 44px hit area round a 28px drawing.
86
- "before:absolute before:-inset-2 before:content-['']", FOCUS_RING), children: _jsx(CloseIcon, { className: "size-4" }) })] }), _jsx(DialogPrimitive.Description, { "data-slot": "invite-popup-description", className: "m-0 font-body text-[length:var(--cg-body-14)] leading-body text-body", children: description }), _jsxs("div", { "data-slot": "invite-popup-field", className: cn("flex items-center gap-2 rounded-md border border-hairline py-1.5 pr-1.5 pl-3.5", "bg-raised in-data-[cg-surface=panel]:bg-(--cg-hover) in-data-[cg-surface=ink]:bg-(--cg-hover)"), children: [_jsx("code", { "data-slot": "invite-popup-link", title: link, className: "min-w-0 flex-1 truncate font-mono text-caption text-ink", children: link.replace(/^https?:\/\//, "") }), _jsxs(Button, { type: "button", variant: "cta", onClick: copy, "data-slot": "invite-popup-copy", "data-state": state, "aria-label": copyAriaLabel, className: cn(
87
- // EmptyCreations' Add, the frame's same button: 40px, 16px corners,
88
- // Manrope 600 at 15px. 12 / 14 padding round a 20px mark.
89
- "relative h-10 min-w-27 gap-1.5 rounded-xl pr-3.5 pl-3 font-ui text-body-sm font-bold",
90
- // The 44px hit area: 2px above and below, inside the field's padding.
91
- // 3px from the pseudo's origin, because an absolute box is placed
92
- // against the PADDING box and Button carries a 1px transparent
93
- // border: 38 + 3 + 3 = 44, where -0.5 measured 42 (e2e).
94
- "before:absolute before:inset-x-0 before:-inset-y-0.75 before:content-['']"), children: [state === "copied" ? _jsx(CheckIcon, { className: "size-5" }) : _jsx(CopyIcon, { className: "size-5" }), _jsx("span", { className: "grid", children: ["idle", "copied", "blocked"].map((s) => (_jsx("span", { "data-label": s, "aria-hidden": s === state ? undefined : true, className: cn("[grid-area:1/1]", s === state ? "visible" : "invisible"), children: labels[s] }, s))) })] })] }), _jsx("span", { "data-slot": "invite-popup-status", "aria-live": "polite", className: "sr-only", children: state === "copied"
95
- ? copiedLabel
96
- : state === "blocked"
97
- ? "The browser blocked the copy"
98
- : "" })] }) })] }));
126
+ "before:absolute before:-inset-2 before:content-['']", FOCUS_RING), children: _jsx(CloseIcon, { className: "size-4" }) })] }), _jsx(DialogPrimitive.Description, { "data-slot": "invite-popup-description", className: "m-0 font-body text-[length:var(--cg-body-14)] leading-body text-body", children: description }), invitationsLeft === undefined ? null : (_jsx(InvitationsLeft, { count: invitationsLeft, label: invitationsLeftLabel, slot: "invite-popup-left" })), _jsx(InviteLinkField, { slot: "invite-popup", link: link, state: state, onCopyClick: copy, labels: labels, copyAriaLabel: copyAriaLabel }), _jsx("span", { "data-slot": "invite-popup-status", "aria-live": "polite", className: "sr-only", children: copyStatus(state, copiedLabel) })] }) })] }));
127
+ }
128
+ /**
129
+ * The Profile page's "Refer a friend" block (ui#517, cloudgrid#6645 §3): a
130
+ * section named by its heading, the count at the heading's right, one line,
131
+ * and the popup's own link field and Copy. On a phone the count wraps under
132
+ * the heading when the two do not fit on one line.
133
+ */
134
+ function ReferFriendBlock({ link, invitationsLeft, onCopy, copyState, title = INVITE_DEFAULTS.referTitle, description = INVITE_DEFAULTS.referDescription, invitationsLeftLabel = INVITE_DEFAULTS.invitationsLeft, copyLabel = INVITE_DEFAULTS.copyLabel, copiedLabel = INVITE_DEFAULTS.copiedLabel, blockedLabel = INVITE_DEFAULTS.blockedLabel, copyAriaLabel = INVITE_DEFAULTS.copyAriaLabel, className, }) {
135
+ const { ownState, copy } = useInviteCopy(link, onCopy);
136
+ const state = copyState ?? ownState;
137
+ const titleId = React.useId();
138
+ return (_jsxs("section", { "data-slot": "refer-friend", "aria-labelledby": titleId, className: cn("flex flex-col gap-3 rounded-xl border border-hairline bg-card p-4 text-ink sm:p-6", className), children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [_jsx("h2", { id: titleId, "data-slot": "refer-friend-title", className: "m-0 font-ui text-body-18 leading-heading font-medium text-ink", children: title }), _jsx(InvitationsLeft, { count: invitationsLeft, label: invitationsLeftLabel, slot: "refer-friend-left" })] }), _jsx("p", { "data-slot": "refer-friend-description", className: "m-0 font-body text-[length:var(--cg-body-14)] leading-body text-body", children: description }), _jsx(InviteLinkField, { slot: "refer-friend", link: link, state: state, onCopyClick: copy, labels: { idle: copyLabel, copied: copiedLabel, blocked: blockedLabel }, copyAriaLabel: copyAriaLabel }), _jsx("span", { "data-slot": "refer-friend-status", "aria-live": "polite", className: "sr-only", children: copyStatus(state, copiedLabel) })] }));
99
139
  }
100
- export { InvitePill, InvitePopup, INVITE_DEFAULTS };
140
+ export { InvitePill, InvitePopup, INVITE_DEFAULTS, ReferFriendBlock };
101
141
  //# sourceMappingURL=invite-popup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invite-popup.js","sourceRoot":"","sources":["../../src/blocks/invite-popup.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CA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