@cloudgrid-io/ui 0.51.1 → 0.53.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 (88) hide show
  1. package/dist/badge/css-watermark.d.ts +3 -3
  2. package/dist/badge/css-watermark.d.ts.map +1 -1
  3. package/dist/badge/css-watermark.js +26 -20
  4. package/dist/badge/css-watermark.js.map +1 -1
  5. package/dist/badge/onboard-widget.d.ts +7 -1
  6. package/dist/badge/onboard-widget.d.ts.map +1 -1
  7. package/dist/badge/onboard-widget.js +27 -3
  8. package/dist/badge/onboard-widget.js.map +1 -1
  9. package/dist/badge/watermark.d.ts +4 -3
  10. package/dist/badge/watermark.d.ts.map +1 -1
  11. package/dist/badge/watermark.js +8 -5
  12. package/dist/badge/watermark.js.map +1 -1
  13. package/dist/blocks/agent-prompt.d.ts +6 -1
  14. package/dist/blocks/agent-prompt.d.ts.map +1 -1
  15. package/dist/blocks/agent-prompt.js +6 -1
  16. package/dist/blocks/agent-prompt.js.map +1 -1
  17. package/dist/blocks/avatar.d.ts +1 -1
  18. package/dist/blocks/avatar.d.ts.map +1 -1
  19. package/dist/blocks/avatar.js +13 -5
  20. package/dist/blocks/avatar.js.map +1 -1
  21. package/dist/blocks/cloudgrid-install.d.ts +15 -2
  22. package/dist/blocks/cloudgrid-install.d.ts.map +1 -1
  23. package/dist/blocks/cloudgrid-install.js +12 -2
  24. package/dist/blocks/cloudgrid-install.js.map +1 -1
  25. package/dist/blocks/command-field.d.ts +6 -1
  26. package/dist/blocks/command-field.d.ts.map +1 -1
  27. package/dist/blocks/command-field.js +6 -1
  28. package/dist/blocks/command-field.js.map +1 -1
  29. package/dist/blocks/filter-tabs.d.ts +17 -1
  30. package/dist/blocks/filter-tabs.d.ts.map +1 -1
  31. package/dist/blocks/filter-tabs.js +20 -4
  32. package/dist/blocks/filter-tabs.js.map +1 -1
  33. package/dist/blocks/header-menu.d.ts +9 -1
  34. package/dist/blocks/header-menu.d.ts.map +1 -1
  35. package/dist/blocks/header-menu.js +12 -2
  36. package/dist/blocks/header-menu.js.map +1 -1
  37. package/dist/blocks/install-content.d.ts +24 -3
  38. package/dist/blocks/install-content.d.ts.map +1 -1
  39. package/dist/blocks/install-content.js +5 -3
  40. package/dist/blocks/install-content.js.map +1 -1
  41. package/dist/blocks/prompt-block.d.ts +6 -1
  42. package/dist/blocks/prompt-block.d.ts.map +1 -1
  43. package/dist/blocks/prompt-block.js +6 -1
  44. package/dist/blocks/prompt-block.js.map +1 -1
  45. package/dist/blocks/ranked-list.d.ts +15 -1
  46. package/dist/blocks/ranked-list.d.ts.map +1 -1
  47. package/dist/blocks/ranked-list.js +6 -2
  48. package/dist/blocks/ranked-list.js.map +1 -1
  49. package/dist/blocks/scatter.d.ts +17 -2
  50. package/dist/blocks/scatter.d.ts.map +1 -1
  51. package/dist/blocks/scatter.js +3 -2
  52. package/dist/blocks/scatter.js.map +1 -1
  53. package/dist/blocks/side-nav.d.ts +8 -1
  54. package/dist/blocks/side-nav.d.ts.map +1 -1
  55. package/dist/blocks/side-nav.js +47 -22
  56. package/dist/blocks/side-nav.js.map +1 -1
  57. package/dist/blocks/tool-setup.d.ts +18 -1
  58. package/dist/blocks/tool-setup.d.ts.map +1 -1
  59. package/dist/blocks/tool-setup.js +9 -7
  60. package/dist/blocks/tool-setup.js.map +1 -1
  61. package/dist/console.css +12 -0
  62. package/dist/index.d.ts +2 -0
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +2 -0
  65. package/dist/index.js.map +1 -1
  66. package/dist/lib/cloudgrid-cn.d.ts +1 -1
  67. package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
  68. package/dist/lib/cloudgrid-cn.js +6 -0
  69. package/dist/lib/cloudgrid-cn.js.map +1 -1
  70. package/dist/theme.css +21 -0
  71. package/dist/tokens/base.json +60 -1
  72. package/dist/tokens/surface-ink.json +9 -0
  73. package/dist/tokens/surface-panel.json +9 -0
  74. package/dist/tokens.css +64 -1
  75. package/dist/tokens.json +9 -1
  76. package/dist/ui/count-bubble.d.ts +68 -0
  77. package/dist/ui/count-bubble.d.ts.map +1 -0
  78. package/dist/ui/count-bubble.js +89 -0
  79. package/dist/ui/count-bubble.js.map +1 -0
  80. package/dist/ui/dialog.d.ts +8 -1
  81. package/dist/ui/dialog.d.ts.map +1 -1
  82. package/dist/ui/dialog.js +2 -2
  83. package/dist/ui/dialog.js.map +1 -1
  84. package/dist/ui/kbd.d.ts +38 -0
  85. package/dist/ui/kbd.d.ts.map +1 -0
  86. package/dist/ui/kbd.js +45 -0
  87. package/dist/ui/kbd.js.map +1 -0
  88. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -32,11 +32,13 @@ export * from "./ui/carousel.js";
32
32
  export * from "./ui/checkbox.js";
33
33
  export * from "./ui/code-block.js";
34
34
  export * from "./ui/combobox.js";
35
+ export * from "./ui/count-bubble.js";
35
36
  export * from "./ui/dialog.js";
36
37
  export * from "./ui/drawer.js";
37
38
  export * from "./ui/dropdown-menu.js";
38
39
  export * from "./ui/input-group.js";
39
40
  export * from "./ui/input.js";
41
+ export * from "./ui/kbd.js";
40
42
  export * from "./ui/number-field.js";
41
43
  export * from "./ui/panel.js";
42
44
  export * from "./ui/popover.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,yEAAyE;AACzE,gFAAgF;AAChF,4EAA4E;AAC5E,EAAE;AACF,qEAAqE;AACrE,iFAAiF;AACjF,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iEAAiE;AACjE,6BAA6B;AAC7B,EAAE;AACF,kEAAkE;AAClE,8EAA8E;AAC9E,uEAAuE;AAEvE,cAAc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3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AAEjC,0EAA0E;AAC1E,cAAc,uBAAuB,CAAA;AAErC,4EAA4E;AAC5E,cAAc,yBAAyB,CAAA"}
@@ -60,7 +60,7 @@ import { type ClassValue } from "clsx";
60
60
  * to write `font-regular` rediscovers this.
61
61
  */
62
62
  export declare const BRAND_FONT_WEIGHTS: readonly ["heavy", "regular"];
63
- export declare const BRAND_FONT_SIZES: readonly ["display-3xl", "display-2xl", "display-xl", "display-48", "display-lg", "display-md", "display-sm", "title-lg", "title-36", "title-32", "title-md", "title-24", "title-sm", "heading-28", "heading-lg", "heading-md", "heading-sm", "body-xl", "body-lg", "body-18", "body-md", "body-sm", "caption", "mono", "label", "eyebrow", "stat"];
63
+ export declare const BRAND_FONT_SIZES: readonly ["display-3xl", "display-2xl", "display-xl", "display-48", "display-lg", "display-md", "display-sm", "title-lg", "title-36", "title-32", "title-md", "title-24", "title-sm", "heading-28", "heading-lg", "heading-md", "heading-sm", "body-xl", "body-lg", "body-18", "body-md", "body-sm", "caption", "mono", "label", "eyebrow", "stat", "micro"];
64
64
  /**
65
65
  * Brand radius names that are not t-shirt shaped (#376).
66
66
  *
@@ -1 +1 @@
1
- {"version":3,"file":"cloudgrid-cn.d.ts","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,+BAAgC,CAAA;AAE/D,eAAO,MAAM,gBAAgB,qVAiCnB,CAAA;AAEV;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,gCAAiC,CAAA;AAkBzD,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
1
+ {"version":3,"file":"cloudgrid-cn.d.ts","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,+BAAgC,CAAA;AAE/D,eAAO,MAAM,gBAAgB,8VAmCnB,CAAA;AAEV;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,gCAAiC,CAAA;AAsBzD,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -94,6 +94,8 @@ export const BRAND_FONT_SIZES = [
94
94
  "label",
95
95
  "eyebrow",
96
96
  "stat",
97
+ // ui#478: the count bubble's and the key cap's 10px.
98
+ "micro",
97
99
  ];
98
100
  /**
99
101
  * Brand radius names that are not t-shirt shaped (#376).
@@ -121,6 +123,10 @@ const twMerge = extendTailwindMerge({
121
123
  // one replaces an earlier one. `cn(FIELD, "focus-none")` is how the
122
124
  // input inside a group box gives up its own halo to the box.
123
125
  "cg-focus": [{ focus: ["halo", "line", "none"] }],
126
+ // The modal backdrop (theme.css): the default overlay or the light one
127
+ // (ui#485), never both, since both set the background and the stylesheet's
128
+ // order would pick the winner.
129
+ "cg-scrim": ["scrim-overlay", "scrim-overlay-light"],
124
130
  },
125
131
  },
126
132
  });
@@ -1 +1 @@
1
- {"version":3,"file":"cloudgrid-cn.js","sourceRoot":"","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QACD,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,EAAE,CAAC;YAC9C,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAAC;YAClD,wEAAwE;YACxE,oEAAoE;YACpE,6DAA6D;YAC7D,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;YACjD,uEAAuE;YACvE,2EAA2E;YAC3E,+BAA+B;YAC/B,UAAU,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;SACrD;KACF;CACF,CAAC,CAAA;AAEF,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
package/dist/theme.css CHANGED
@@ -90,6 +90,9 @@
90
90
  --color-on-primary: var(--cg-text-on-primary);
91
91
  --color-on-accent: var(--cg-text-on-accent);
92
92
  --color-on-code: var(--cg-text-on-code);
93
+ /* The word on a danger fill (ui#478): white at the root, ink on the panel and
94
+ on ink, where --cg-danger is a pale red. */
95
+ --color-on-danger: var(--cg-text-on-danger);
93
96
 
94
97
  /* ---- brand ---- */
95
98
  --color-brand: var(--cg-primary);
@@ -406,6 +409,13 @@
406
409
  --text-stat: var(--cg-stat-size);
407
410
  --text-stat--line-height: var(--cg-stat-line);
408
411
  --text-stat--font-weight: var(--cg-stat-weight);
412
+ /* The smallest rung, 10px at leading 1 (ui#478): a count in a CountBubble, a
413
+ key on a Kbd. A box role, not a reading one: the box fixes the height and
414
+ the text fits inside it, which 13px caption does not in a 16px bubble. No
415
+ weight companion: the bell's count is medium and the vault's is bold, and a
416
+ companion would force one on the other. */
417
+ --text-micro: var(--cg-micro-size);
418
+ --text-micro--line-height: var(--cg-micro-line);
409
419
 
410
420
  /* ---- weights ----
411
421
  `--font-weight-display` is unreachable and kept only for completeness. Both
@@ -574,6 +584,17 @@
574
584
  }
575
585
  }
576
586
 
587
+ /*
588
+ The light backdrop (ui#485): --cg-scrim-light, and no blur at all, for a
589
+ pop-up whose page should read clearly behind it (the Connect pop-up over a
590
+ new grid). `<DialogContent scrim="light">` draws it. It replaces
591
+ `scrim-overlay` rather than sitting beside it: both set the background, and
592
+ `cn()` keeps only the later of the two (lib/cloudgrid-cn.ts).
593
+ */
594
+ @utility scrim-overlay-light {
595
+ background-color: var(--cg-scrim-light);
596
+ }
597
+
577
598
  /*
578
599
  The focus frame (ui#441): drawn after keyboard use, never on a click or a tap.
579
600
 
@@ -790,6 +790,15 @@
790
790
  }
791
791
  }
792
792
  },
793
+ "text-on-danger": {
794
+ "$value": "{neutrals.neutral-0}",
795
+ "$description": "The word on a --cg-danger fill: a count in a danger CountBubble (ui#478).\n\nWhite at the root, as the Console drew it: 4.23:1 on #E53935, the 3:1 UI bar and\nunder 4.5:1, the same number --cg-danger's own note records and leaves to a brand\npass. It flips to ink on the panel and on ink, because --cg-danger flips to a pale red\nthere and white would vanish on it.",
796
+ "$extensions": {
797
+ "io.cloudgrid": {
798
+ "css": "--cg-text-on-danger"
799
+ }
800
+ }
801
+ },
793
802
  "text-on-code": {
794
803
  "$value": "#e7e7e7",
795
804
  "$type": "color",
@@ -1254,6 +1263,26 @@
1254
1263
  }
1255
1264
  }
1256
1265
  },
1266
+ "micro-size": {
1267
+ "$value": "10px",
1268
+ "$type": "dimension",
1269
+ "$description": "The smallest rung: a few characters in a fixed small box, never running text (ui#478).\n\nSOURCE: the Console's two counts, both hand-set at 10px before this rung existed: the\nnotifications bell's 16px bubble (NotificationsBell, medium) and the vault's 18px\npending-requests bubble (VaultGrantsBadge, bold, \"9+\"). --cg-caption, 13px, is the\nsmallest text rung and overflows a 16px bubble carrying two characters.\n\nA BOX ROLE, NOT A READING ROLE. Nothing a person reads as a sentence is set at 10px;\nthe rung exists for a count in a bubble and a key on a key cap (ui#482), where the\nbox fixes the height and the text has to fit inside it. A paragraph at this size is a\nmisuse, and caption is the floor for it.\n\nNOT in the Console preset: a count is 10px in every product.",
1270
+ "$extensions": {
1271
+ "io.cloudgrid": {
1272
+ "css": "--cg-micro-size"
1273
+ }
1274
+ }
1275
+ },
1276
+ "micro-line": {
1277
+ "$value": "1",
1278
+ "$type": "number",
1279
+ "$description": "leading-none. The text sits centred in a box a few pixels taller than itself; at\n--cg-body-line's 1.46 the line box would be 14.6px inside a 16px bubble. Spelled as a\nnumber, as --cg-stat-line is, rather than aliased onto the display leading, so a\ndisplay retune cannot move it.",
1280
+ "$extensions": {
1281
+ "io.cloudgrid": {
1282
+ "css": "--cg-micro-line"
1283
+ }
1284
+ }
1285
+ },
1257
1286
  "body-line": {
1258
1287
  "$value": "1.46",
1259
1288
  "$type": "number",
@@ -2018,6 +2047,16 @@
2018
2047
  }
2019
2048
  }
2020
2049
  },
2050
+ "scrim-light": {
2051
+ "$value": "rgba(46, 30, 172, 0.16)",
2052
+ "$type": "color",
2053
+ "$description": "The light backdrop (ui#485): a light dim with no blur, for a pop-up whose page the reader\nshould still see clearly behind it. The Connect pop-up opens over the reader's new grid,\nand the grid is the point. The same brand wash as --cg-scrim (#2E1EAC), at 16% rather\nthan 46%, so the two read as one family.\n\nApplied through the `scrim-overlay-light` utility (theme.css), which sets this wash and\nno backdrop-filter. A dialog asks for it with `<DialogContent scrim=\"light\">`; every\nother modal keeps --cg-scrim with its blur.\n\nDeclared at :root only, like --cg-scrim: it composites over whatever is beneath it.",
2054
+ "$extensions": {
2055
+ "io.cloudgrid": {
2056
+ "css": "--cg-scrim-light"
2057
+ }
2058
+ }
2059
+ },
2021
2060
  "scrim-strong": {
2022
2061
  "$value": "rgba(34, 34, 34, 0.82)",
2023
2062
  "$type": "color",
@@ -2086,7 +2125,7 @@
2086
2125
  }
2087
2126
  },
2088
2127
  "avatar": {
2089
- "$description": "The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces.",
2128
+ "$description": "The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. The two ratios after them size the Avatar's letters (ui#482); a size has no reason to flip either.",
2090
2129
  "avatar-pastel-1": {
2091
2130
  "$value": "#dce4bc",
2092
2131
  "$type": "color",
@@ -2113,6 +2152,26 @@
2113
2152
  "css": "--cg-avatar-pastel-3"
2114
2153
  }
2115
2154
  }
2155
+ },
2156
+ "avatar-initials-ratio": {
2157
+ "$value": "0.44",
2158
+ "$type": "number",
2159
+ "$description": "The Avatar's two initials as a fraction of its diameter (ui#482): 10.56px at 24, 14.08px at 32.\n\nA ratio and not a rung of the type ramp, because the letters sit in a fixed circle and\nnot in running text: the ramp bottoms out at --cg-caption, 13px, which overflows an\n18px circle carrying two letters, and a future type change must resize the letters\nwith the circle rather than break it. Named so the size is the library's: the Console\nmeasured these as hand-set sizes (10.6px at 24) because nothing named them.\n\n0.44 puts 24 where the Console's own 24px avatar sat.",
2160
+ "$extensions": {
2161
+ "io.cloudgrid": {
2162
+ "css": "--cg-avatar-initials-ratio"
2163
+ }
2164
+ }
2165
+ },
2166
+ "avatar-letter-ratio": {
2167
+ "$value": "0.46875",
2168
+ "$type": "number",
2169
+ "$description": "The grid avatar's one letter (the pastel look) as a fraction of its box (ui#482): 15/32,\nso 15px at 32, as the 2026 header frames draw it. Same reasoning as\n--cg-avatar-initials-ratio.",
2170
+ "$extensions": {
2171
+ "io.cloudgrid": {
2172
+ "css": "--cg-avatar-letter-ratio"
2173
+ }
2174
+ }
2116
2175
  }
2117
2176
  }
2118
2177
  }
@@ -44,6 +44,15 @@
44
44
  "css": "--cg-text-accent"
45
45
  }
46
46
  }
47
+ },
48
+ "text-on-danger": {
49
+ "$value": "{brand.ink}",
50
+ "$description": "Ink on this surface's pale danger fill (#FF8A80: 6.97:1). White, the root's word, would vanish on it (ui#478).",
51
+ "$extensions": {
52
+ "io.cloudgrid": {
53
+ "css": "--cg-text-on-danger"
54
+ }
55
+ }
47
56
  }
48
57
  },
49
58
  "semantic-surfaces": {
@@ -45,6 +45,15 @@
45
45
  "css": "--cg-text-accent"
46
46
  }
47
47
  }
48
+ },
49
+ "text-on-danger": {
50
+ "$value": "{brand.ink}",
51
+ "$description": "Ink on this surface's pale danger fill (#FFDAD6: 12.31:1). White, the root's word, would vanish on it (ui#478).",
52
+ "$extensions": {
53
+ "io.cloudgrid": {
54
+ "css": "--cg-text-on-danger"
55
+ }
56
+ }
48
57
  }
49
58
  },
50
59
  "semantic-lines": {
package/dist/tokens.css CHANGED
@@ -752,6 +752,14 @@
752
752
  --cg-text-inverse: var(--cg-neutral-0);
753
753
  --cg-text-on-primary: var(--cg-neutral-0);
754
754
  --cg-text-on-accent: var(--cg-ink);
755
+ /*
756
+ The word on a --cg-danger fill: a count in a danger CountBubble (ui#478).
757
+
758
+ White at the root, as the Console drew it: 4.23:1 on #E53935, the 3:1 UI bar and
759
+ under 4.5:1, the same number --cg-danger's own note records and leaves to a brand
760
+ pass. It flips to ink on the panel and on ink, because --cg-danger flips to a pale red
761
+ there and white would vanish on it. */
762
+ --cg-text-on-danger: var(--cg-neutral-0);
755
763
  --cg-text-on-code: #e7e7e7;
756
764
 
757
765
  /* ---- semantic-lines ---- */
@@ -1228,6 +1236,27 @@
1228
1236
  --cg-body-14: 14px;
1229
1237
  /* SOURCE: footer, helper */
1230
1238
  --cg-caption: 13px;
1239
+ /*
1240
+ The smallest rung: a few characters in a fixed small box, never running text (ui#478).
1241
+
1242
+ SOURCE: the Console's two counts, both hand-set at 10px before this rung existed: the
1243
+ notifications bell's 16px bubble (NotificationsBell, medium) and the vault's 18px
1244
+ pending-requests bubble (VaultGrantsBadge, bold, "9+"). --cg-caption, 13px, is the
1245
+ smallest text rung and overflows a 16px bubble carrying two characters.
1246
+
1247
+ A BOX ROLE, NOT A READING ROLE. Nothing a person reads as a sentence is set at 10px;
1248
+ the rung exists for a count in a bubble and a key on a key cap (ui#482), where the
1249
+ box fixes the height and the text has to fit inside it. A paragraph at this size is a
1250
+ misuse, and caption is the floor for it.
1251
+
1252
+ NOT in the Console preset: a count is 10px in every product. */
1253
+ --cg-micro-size: 10px;
1254
+ /*
1255
+ leading-none. The text sits centred in a box a few pixels taller than itself; at
1256
+ --cg-body-line's 1.46 the line box would be 14.6px inside a 16px bubble. Spelled as a
1257
+ number, as --cg-stat-line is, rather than aliased onto the display leading, so a
1258
+ display retune cannot move it. */
1259
+ --cg-micro-line: 1;
1231
1260
  /*
1232
1261
  SOURCE: the draft's "Body Bold" and "Small" both carry 1.46 (#197). Was 1.5.
1233
1262
 
@@ -1609,6 +1638,18 @@
1609
1638
 
1610
1639
  Declared at :root only, like --cg-scrim. */
1611
1640
  --cg-scrim-blur: 6.8px;
1641
+ /*
1642
+ The light backdrop (ui#485): a light dim with no blur, for a pop-up whose page the reader
1643
+ should still see clearly behind it. The Connect pop-up opens over the reader's new grid,
1644
+ and the grid is the point. The same brand wash as --cg-scrim (#2E1EAC), at 16% rather
1645
+ than 46%, so the two read as one family.
1646
+
1647
+ Applied through the `scrim-overlay-light` utility (theme.css), which sets this wash and
1648
+ no backdrop-filter. A dialog asks for it with `<DialogContent scrim="light">`; every
1649
+ other modal keeps --cg-scrim with its blur.
1650
+
1651
+ Declared at :root only, like --cg-scrim: it composites over whatever is beneath it. */
1652
+ --cg-scrim-light: rgba(46, 30, 172, 0.16);
1612
1653
  /*
1613
1654
  The wash under TEXT laid over a picture, e.g. the entity card's hover reveal.
1614
1655
 
@@ -1680,10 +1721,26 @@
1680
1721
  --cg-data-cyan: #0a959b;
1681
1722
 
1682
1723
  /* ---- avatar ----
1683
- The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. */
1724
+ The grid avatar grounds, raw hex in the CloudGrid-2026 frames (11323:8600, 11324:90635, 11324:90641). Letters are --cg-ink: 12.02:1, 10.74:1 and 11.43:1. An identity colour, so it does not flip on the panel or ink surfaces. The two ratios after them size the Avatar's letters (ui#482); a size has no reason to flip either. */
1684
1725
  --cg-avatar-pastel-1: #dce4bc;
1685
1726
  --cg-avatar-pastel-2: #bcd9e4;
1686
1727
  --cg-avatar-pastel-3: #bce4ca;
1728
+ /*
1729
+ The Avatar's two initials as a fraction of its diameter (ui#482): 10.56px at 24, 14.08px at 32.
1730
+
1731
+ A ratio and not a rung of the type ramp, because the letters sit in a fixed circle and
1732
+ not in running text: the ramp bottoms out at --cg-caption, 13px, which overflows an
1733
+ 18px circle carrying two letters, and a future type change must resize the letters
1734
+ with the circle rather than break it. Named so the size is the library's: the Console
1735
+ measured these as hand-set sizes (10.6px at 24) because nothing named them.
1736
+
1737
+ 0.44 puts 24 where the Console's own 24px avatar sat. */
1738
+ --cg-avatar-initials-ratio: 0.44;
1739
+ /*
1740
+ The grid avatar's one letter (the pastel look) as a fraction of its box (ui#482): 15/32,
1741
+ so 15px at 32, as the 2026 header frames draw it. Same reasoning as
1742
+ --cg-avatar-initials-ratio. */
1743
+ --cg-avatar-letter-ratio: 0.46875;
1687
1744
  }
1688
1745
 
1689
1746
  [data-cg-surface='panel'] {
@@ -1698,6 +1755,9 @@
1698
1755
  would have to move to change that, not this value. */
1699
1756
  --cg-text-muted-strong: rgba(255, 255, 255, 0.86);
1700
1757
  --cg-text-accent: #ffffff;
1758
+ /*
1759
+ Ink on this surface's pale danger fill (#FFDAD6: 12.31:1). White, the root's word, would vanish on it (ui#478). */
1760
+ --cg-text-on-danger: var(--cg-ink);
1701
1761
 
1702
1762
  /* ---- semantic-lines ---- */
1703
1763
  --cg-border-control: rgba(255, 255, 255, 0.62);
@@ -1824,6 +1884,9 @@
1824
1884
  failure. It sits between the ink scope's muted (0.56) and its secondary (0.78). */
1825
1885
  --cg-text-muted-strong: rgba(255, 255, 255, 0.68);
1826
1886
  --cg-text-accent: var(--cg-secondary);
1887
+ /*
1888
+ Ink on this surface's pale danger fill (#FF8A80: 6.97:1). White, the root's word, would vanish on it (ui#478). */
1889
+ --cg-text-on-danger: var(--cg-ink);
1827
1890
 
1828
1891
  /* ---- semantic-surfaces ---- */
1829
1892
  --cg-surface-card: rgba(255, 255, 255, 0.04);
package/dist/tokens.json CHANGED
@@ -85,6 +85,7 @@
85
85
  "--cg-text-inverse": "var(--cg-neutral-0)",
86
86
  "--cg-text-on-primary": "var(--cg-neutral-0)",
87
87
  "--cg-text-on-accent": "var(--cg-ink)",
88
+ "--cg-text-on-danger": "var(--cg-neutral-0)",
88
89
  "--cg-text-on-code": "#e7e7e7",
89
90
  "--cg-border-hairline": "var(--cg-neutral-100)",
90
91
  "--cg-border-control": "var(--cg-neutral-200)",
@@ -132,6 +133,8 @@
132
133
  "--cg-body-sm": "15px",
133
134
  "--cg-body-14": "14px",
134
135
  "--cg-caption": "13px",
136
+ "--cg-micro-size": "10px",
137
+ "--cg-micro-line": "1",
135
138
  "--cg-body-line": "1.46",
136
139
  "--cg-body-tracking": "0em",
137
140
  "--cg-mono-size": "14px",
@@ -212,6 +215,7 @@
212
215
  "--cg-live-halo": "color-mix(in srgb, var(--cg-volt) 32%, transparent)",
213
216
  "--cg-scrim": "rgba(46, 30, 172, 0.46)",
214
217
  "--cg-scrim-blur": "6.8px",
218
+ "--cg-scrim-light": "rgba(46, 30, 172, 0.16)",
215
219
  "--cg-scrim-strong": "rgba(34, 34, 34, 0.82)",
216
220
  "--cg-hover": "rgba(34, 34, 34, 0.045)",
217
221
  "--cg-kind-inspiration": "#f0f8e1",
@@ -220,7 +224,9 @@
220
224
  "--cg-data-cyan": "#0a959b",
221
225
  "--cg-avatar-pastel-1": "#dce4bc",
222
226
  "--cg-avatar-pastel-2": "#bcd9e4",
223
- "--cg-avatar-pastel-3": "#bce4ca"
227
+ "--cg-avatar-pastel-3": "#bce4ca",
228
+ "--cg-avatar-initials-ratio": "0.44",
229
+ "--cg-avatar-letter-ratio": "0.46875"
224
230
  },
225
231
  "panel": {
226
232
  "--cg-text-primary": "#ffffff",
@@ -228,6 +234,7 @@
228
234
  "--cg-text-muted": "rgba(255, 255, 255, 0.66)",
229
235
  "--cg-text-muted-strong": "rgba(255, 255, 255, 0.86)",
230
236
  "--cg-text-accent": "#ffffff",
237
+ "--cg-text-on-danger": "var(--cg-ink)",
231
238
  "--cg-border-control": "rgba(255, 255, 255, 0.62)",
232
239
  "--cg-border-hairline": "rgba(255, 255, 255, 0.24)",
233
240
  "--cg-border-strong": "#ffffff",
@@ -267,6 +274,7 @@
267
274
  "--cg-text-muted": "rgba(255, 255, 255, 0.56)",
268
275
  "--cg-text-muted-strong": "rgba(255, 255, 255, 0.68)",
269
276
  "--cg-text-accent": "var(--cg-secondary)",
277
+ "--cg-text-on-danger": "var(--cg-ink)",
270
278
  "--cg-surface-card": "rgba(255, 255, 255, 0.04)",
271
279
  "--cg-surface-page-alt": "rgba(255, 255, 255, 0.06)",
272
280
  "--cg-border-control": "rgba(255, 255, 255, 0.4)",
@@ -0,0 +1,68 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ /**
3
+ * A small count in a pill: on an icon (the notifications bell) or inline
4
+ * beside a row (pending vault grant requests). ui#478.
5
+ *
6
+ * ## What it replaces, copied as drawn
7
+ *
8
+ * The Console drew both of these itself, each with a hand-set 10px, because no
9
+ * library piece or type role could draw a count this small: `text-caption`,
10
+ * 13px, overflows a 16px bubble carrying two characters.
11
+ *
12
+ * the bell 16px tall, 16 at least wide, 4px aside, medium, the CTA teal
13
+ * with its ink word, on the glyph's top right
14
+ * the vault 18px tall, 18 at least wide, 6px aside, bold, danger with a
15
+ * white word, capped at "9+"
16
+ *
17
+ * Both are here as they were. The size is the `micro` role (`--cg-micro-size`,
18
+ * 10px at leading 1), so the number is the library's and not the caller's.
19
+ * The weight goes with the size rather than with the role, because the two
20
+ * bubbles disagree on it and each was drawn on purpose.
21
+ *
22
+ * ## The tone
23
+ *
24
+ * `cta` is the teal of the Console's New button, its default: an access request
25
+ * is somebody asking politely, and red would file it as an incident. `danger`
26
+ * is for counts that need action. Both come from tokens, and the danger word
27
+ * flips to ink on the panel and on ink, where `--cg-danger` is a pale red.
28
+ *
29
+ * ## What a screen reader hears
30
+ *
31
+ * The caller's `label`, never the bare digits: "9+" means nothing read aloud,
32
+ * and the number alone does not say what is counted. The digits are
33
+ * `aria-hidden`; the label sits beside them in an `sr-only` span. Inside a
34
+ * control that carries its own `aria-label` (the bell's trigger) that name
35
+ * wins and the bubble is silent, which is what the trigger wants.
36
+ *
37
+ * ## No count, no bubble
38
+ *
39
+ * Zero, a negative number or `NaN` renders nothing, as both Console bubbles did.
40
+ *
41
+ * ## As a button
42
+ *
43
+ * `render={<button type="button" onClick={...} />}` makes it the control (the
44
+ * vault's top-nav count). It then takes the label as its name and the library's
45
+ * Tab-only frame (`focus-line`, ui#441).
46
+ */
47
+ export declare const COUNT_BUBBLE_SIZES: readonly [16, 18];
48
+ /** 16 (the bell) or 18 (the vault's pending requests) tall. */
49
+ export type CountBubbleSize = (typeof COUNT_BUBBLE_SIZES)[number];
50
+ export type CountBubbleTone = "cta" | "danger";
51
+ /** `inline` beside text, or `corner`: on an icon's top right, inside a positioned target. */
52
+ export type CountBubblePlacement = "inline" | "corner";
53
+ declare function CountBubble({ count, label, max, size, tone, placement, className, render, ...props }: Omit<useRender.ComponentProps<"span">, "children"> & {
54
+ /** The number. Zero or less draws nothing. */
55
+ count: number;
56
+ /** What a screen reader hears instead of the digits, e.g. "3 pending vault grant requests". */
57
+ label: string;
58
+ /** Above this the bubble reads `max+`. Defaults to 9, so ten is "9+". */
59
+ max?: number;
60
+ /** 16 (the default, the bell) or 18 (the vault). */
61
+ size?: CountBubbleSize;
62
+ /** `cta` (the default, the teal) or `danger`. */
63
+ tone?: CountBubbleTone;
64
+ /** `inline` (the default) or `corner`, on an icon's top right. */
65
+ placement?: CountBubblePlacement;
66
+ }): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
67
+ export { CountBubble };
68
+ //# sourceMappingURL=count-bubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-bubble.d.ts","sourceRoot":"","sources":["../../src/ui/count-bubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAIrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,eAAO,MAAM,kBAAkB,mBAAoB,CAAA;AAEnD,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AACjE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC9C,6FAA6F;AAC7F,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAsBtD,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,GAAO,EACP,IAAS,EACT,IAAY,EACZ,SAAoB,EACpB,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACtD,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,iDAAiD;IACjD,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,kEAAkE;IAClE,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,qGAiCA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { mergeProps } from "@base-ui/react/merge-props";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { cn } from "../lib/cloudgrid-cn.js";
5
+ /**
6
+ * A small count in a pill: on an icon (the notifications bell) or inline
7
+ * beside a row (pending vault grant requests). ui#478.
8
+ *
9
+ * ## What it replaces, copied as drawn
10
+ *
11
+ * The Console drew both of these itself, each with a hand-set 10px, because no
12
+ * library piece or type role could draw a count this small: `text-caption`,
13
+ * 13px, overflows a 16px bubble carrying two characters.
14
+ *
15
+ * the bell 16px tall, 16 at least wide, 4px aside, medium, the CTA teal
16
+ * with its ink word, on the glyph's top right
17
+ * the vault 18px tall, 18 at least wide, 6px aside, bold, danger with a
18
+ * white word, capped at "9+"
19
+ *
20
+ * Both are here as they were. The size is the `micro` role (`--cg-micro-size`,
21
+ * 10px at leading 1), so the number is the library's and not the caller's.
22
+ * The weight goes with the size rather than with the role, because the two
23
+ * bubbles disagree on it and each was drawn on purpose.
24
+ *
25
+ * ## The tone
26
+ *
27
+ * `cta` is the teal of the Console's New button, its default: an access request
28
+ * is somebody asking politely, and red would file it as an incident. `danger`
29
+ * is for counts that need action. Both come from tokens, and the danger word
30
+ * flips to ink on the panel and on ink, where `--cg-danger` is a pale red.
31
+ *
32
+ * ## What a screen reader hears
33
+ *
34
+ * The caller's `label`, never the bare digits: "9+" means nothing read aloud,
35
+ * and the number alone does not say what is counted. The digits are
36
+ * `aria-hidden`; the label sits beside them in an `sr-only` span. Inside a
37
+ * control that carries its own `aria-label` (the bell's trigger) that name
38
+ * wins and the bubble is silent, which is what the trigger wants.
39
+ *
40
+ * ## No count, no bubble
41
+ *
42
+ * Zero, a negative number or `NaN` renders nothing, as both Console bubbles did.
43
+ *
44
+ * ## As a button
45
+ *
46
+ * `render={<button type="button" onClick={...} />}` makes it the control (the
47
+ * vault's top-nav count). It then takes the label as its name and the library's
48
+ * Tab-only frame (`focus-line`, ui#441).
49
+ */
50
+ export const COUNT_BUBBLE_SIZES = [16, 18];
51
+ const SIZE = {
52
+ 16: "h-4 min-w-4 px-1 font-medium",
53
+ 18: "h-4.5 min-w-4.5 px-1.5 font-bold",
54
+ };
55
+ const TONE = {
56
+ cta: "bg-cyan text-on-accent",
57
+ danger: "bg-danger text-on-danger",
58
+ };
59
+ const PLACEMENT = {
60
+ // `relative` so the sr-only label is clipped to the bubble, not to some
61
+ // ancestor further up.
62
+ inline: "relative",
63
+ // The bell's 32px target put the bubble at top 0, left 16: the target's top
64
+ // edge and its middle, which is the glyph's top right. As fractions of the
65
+ // target it stays there for any target size.
66
+ corner: "absolute top-0 left-1/2",
67
+ };
68
+ function CountBubble({ count, label, max = 9, size = 16, tone = "cta", placement = "inline", className, render, ...props }) {
69
+ const element = useRender({
70
+ defaultTagName: "span",
71
+ props: mergeProps({
72
+ className: cn("inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-full text-micro tabular-nums focus-line", SIZE[size], TONE[tone], PLACEMENT[placement], className),
73
+ children: (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", children: count > max ? `${max}+` : String(count) }), _jsx("span", { className: "sr-only", children: label })] })),
74
+ }, props),
75
+ render,
76
+ state: {
77
+ slot: "count-bubble",
78
+ size,
79
+ tone,
80
+ placement,
81
+ },
82
+ });
83
+ // After the hook, so the hook order never depends on the count.
84
+ if (!(count > 0))
85
+ return null;
86
+ return element;
87
+ }
88
+ export { CountBubble };
89
+ //# sourceMappingURL=count-bubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-bubble.js","sourceRoot":"","sources":["../../src/ui/count-bubble.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;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C,CAAC;QAAE,OAAO,IAAI,CAAA;IAC7B,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -67,8 +67,15 @@ declare function DialogOverlay({ className, forceRender, ...props }: DialogPrimi
67
67
  * conflict): `ConfirmDeleteDialog` keeps its 24 padding and 448 width,
68
68
  * `PluggedDialog` its own radius and 632 width.
69
69
  */
70
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
70
+ declare function DialogContent({ className, children, showCloseButton, scrim, ...props }: DialogPrimitive.Popup.Props & {
71
71
  showCloseButton?: boolean;
72
+ /**
73
+ * The backdrop. `default` is the Style Guide overlay, the purple wash with
74
+ * the page blurred behind it (ui#368), unchanged. `light` is a light dim with
75
+ * no blur, `--cg-scrim-light` (ui#485), for a pop-up whose page the reader
76
+ * should still see clearly: the Connect pop-up over a new grid.
77
+ */
78
+ scrim?: "default" | "light";
72
79
  }): React.JSX.Element;
73
80
  /** The title and its line. `pr-8` keeps a long title clear of the close X. */
74
81
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAiBjE,iBAAS,MAAM,CAAC,EAAE,KAAY,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,qBAMrE;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KA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,EAAE,OAAO,CAAA;CAC1B,qBAkBA;AAED,wDAAwD;AACxD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAWxE;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAWnC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
package/dist/ui/dialog.js CHANGED
@@ -92,9 +92,9 @@ function DialogOverlay({ className, forceRender = true, ...props }) {
92
92
  * conflict): `ConfirmDeleteDialog` keeps its 24 padding and 448 width,
93
93
  * `PluggedDialog` its own radius and 632 width.
94
94
  */
95
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
95
+ function DialogContent({ className, children, showCloseButton = true, scrim = "default", ...props }) {
96
96
  const modal = React.useContext(DialogModalContext);
97
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", "aria-modal": modal !== false ? true : undefined, className: cn("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100svh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-md border border-hairline bg-popover px-8 py-6 text-body-sm text-ink duration-100 outline-none sm:max-w-131.25 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 right-6.5 text-ink", size: "icon" }), children: [_jsx(CloseIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
97
+ return (_jsxs(DialogPortal, { children: [scrim === "light" ? _jsx(DialogOverlay, { className: "scrim-overlay-light", "data-scrim": "light" }) : _jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", "aria-modal": modal !== false ? true : undefined, className: cn("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100svh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-md border border-hairline bg-popover px-8 py-6 text-body-sm text-ink duration-100 outline-none sm:max-w-131.25 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 right-6.5 text-ink", size: "icon" }), children: [_jsx(CloseIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
98
98
  }
99
99
  /** The title and its line. `pr-8` keeps a long title clear of the close X. */
100
100
  function DialogHeader({ className, ...props }) {