@cloudgrid-io/ui 0.27.1 → 0.28.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 (56) hide show
  1. package/dist/blocks/avatar.d.ts +10 -4
  2. package/dist/blocks/avatar.d.ts.map +1 -1
  3. package/dist/blocks/avatar.js +8 -2
  4. package/dist/blocks/avatar.js.map +1 -1
  5. package/dist/blocks/icons.d.ts +1 -1
  6. package/dist/blocks/icons.d.ts.map +1 -1
  7. package/dist/blocks/icons.js +13 -1
  8. package/dist/blocks/icons.js.map +1 -1
  9. package/dist/blocks/side-nav.d.ts +49 -0
  10. package/dist/blocks/side-nav.d.ts.map +1 -0
  11. package/dist/blocks/side-nav.js +217 -0
  12. package/dist/blocks/side-nav.js.map +1 -0
  13. package/dist/blocks/stat-tile.d.ts +69 -0
  14. package/dist/blocks/stat-tile.d.ts.map +1 -0
  15. package/dist/blocks/stat-tile.js +54 -0
  16. package/dist/blocks/stat-tile.js.map +1 -0
  17. package/dist/blocks/tool-setup.d.ts +105 -4
  18. package/dist/blocks/tool-setup.d.ts.map +1 -1
  19. package/dist/blocks/tool-setup.js +238 -13
  20. package/dist/blocks/tool-setup.js.map +1 -1
  21. package/dist/fonts.css +38 -9
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +5 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/lib/cloudgrid-cn.d.ts +1 -1
  27. package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
  28. package/dist/lib/cloudgrid-cn.js +7 -0
  29. package/dist/lib/cloudgrid-cn.js.map +1 -1
  30. package/dist/theme.css +95 -0
  31. package/dist/tokens/base.json +389 -3
  32. package/dist/tokens/surface-ink.json +10 -0
  33. package/dist/tokens/surface-panel.json +10 -0
  34. package/dist/tokens.css +520 -10
  35. package/dist/tokens.json +43 -2
  36. package/dist/ui/button.d.ts +1 -1
  37. package/dist/ui/button.d.ts.map +1 -1
  38. package/dist/ui/button.js +28 -0
  39. package/dist/ui/button.js.map +1 -1
  40. package/dist/ui/dialog.d.ts +17 -1
  41. package/dist/ui/dialog.d.ts.map +1 -1
  42. package/dist/ui/dialog.js +18 -2
  43. package/dist/ui/dialog.js.map +1 -1
  44. package/dist/ui/drawer.d.ts +208 -0
  45. package/dist/ui/drawer.d.ts.map +1 -0
  46. package/dist/ui/drawer.js +265 -0
  47. package/dist/ui/drawer.js.map +1 -0
  48. package/dist/ui/popover.d.ts +83 -0
  49. package/dist/ui/popover.d.ts.map +1 -0
  50. package/dist/ui/popover.js +102 -0
  51. package/dist/ui/popover.js.map +1 -0
  52. package/dist/ui/radio-group.d.ts +21 -0
  53. package/dist/ui/radio-group.d.ts.map +1 -0
  54. package/dist/ui/radio-group.js +101 -0
  55. package/dist/ui/radio-group.js.map +1 -0
  56. package/package.json +2 -1
@@ -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,0KAcnB,CAAA;AAWV,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,kQAqBnB,CAAA;AAWV,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -62,19 +62,26 @@ import { extendTailwindMerge } from "tailwind-merge";
62
62
  */
63
63
  export const BRAND_FONT_WEIGHTS = ["heavy", "regular"];
64
64
  export const BRAND_FONT_SIZES = [
65
+ "display-3xl",
66
+ "display-2xl",
65
67
  "display-xl",
66
68
  "display-lg",
67
69
  "display-md",
68
70
  "display-sm",
71
+ "title-lg",
72
+ "title-md",
73
+ "title-sm",
69
74
  "heading-lg",
70
75
  "heading-md",
71
76
  "heading-sm",
77
+ "body-xl",
72
78
  "body-lg",
73
79
  "body-md",
74
80
  "body-sm",
75
81
  "caption",
76
82
  "mono",
77
83
  "label",
84
+ "eyebrow",
78
85
  ];
79
86
  const twMerge = extendTailwindMerge({
80
87
  extend: {
@@ -1 +1 @@
1
- {"version":3,"file":"cloudgrid-cn.js","sourceRoot":"","sources":["../../src/lib/cloudgrid-cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAA;AAE/D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,MAAM;IACN,OAAO;CACC,CAAA;AAEV,MAAM,OAAO,GAAG,mBAAmB,CAAC;IAClC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,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AAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
package/dist/theme.css CHANGED
@@ -81,6 +81,10 @@
81
81
  --color-ink: var(--cg-text-primary);
82
82
  --color-body: var(--cg-text-secondary);
83
83
  --color-faint: var(--cg-text-muted);
84
+ /* The muted rung that clears the 4.5:1 body-text floor on all four grounds
85
+ (#232). text-faint is large-text-legal only; this is what a caption a reader
86
+ has to read should use. */
87
+ --color-faint-strong: var(--cg-text-muted-strong);
84
88
  --color-placeholder: var(--cg-text-placeholder);
85
89
  --color-inverse: var(--cg-text-inverse);
86
90
  --color-on-primary: var(--cg-text-on-primary);
@@ -95,6 +99,50 @@
95
99
  --color-lime-press: var(--cg-secondary-press);
96
100
  --color-cyan: var(--cg-tertiary);
97
101
  --color-cyan-press: var(--cg-tertiary-press);
102
+
103
+ /* ---- the hue ramps (#239) ----
104
+ The rungs the canonical Figma frames spend on chips, badges, avatar strokes,
105
+ step diagrams and the enterprise button. tokens.css's `hue-ramps` note has
106
+ the provenance of each value; this block is only about the NAMES.
107
+
108
+ Violet takes numbered rungs under `brand`, because brand is already this
109
+ package's word for the hue and Tailwind ships no `brand` scale to collide
110
+ with. --color-brand stays the 900, so bg-brand and bg-brand-200 coexist.
111
+
112
+ Cyan and lime take SUFFIXED names rather than their Figma rung numbers.
113
+ --color-cyan-200 and --color-lime-700 would be legal here and would silently
114
+ repaint every bg-cyan-200 and bg-lime-700 in a consumer's own markup, since
115
+ Tailwind ships both of those scales. That is rule 4's failure pointed at
116
+ Tailwind instead of shadcn, and it is worse: shadcn's names arrive with this
117
+ package, Tailwind's were already there and the consumer never opted in.
118
+
119
+ The cool neutral family takes `steel` for the same reason twice over: Figma
120
+ calls it color/neutral/*, this package's neutral ramp is a different hue
121
+ family at those numbers, and Tailwind ships `slate`. */
122
+ --color-brand-100: var(--cg-violet-100);
123
+ --color-brand-150: var(--cg-violet-150);
124
+ --color-brand-200: var(--cg-violet-200);
125
+ --color-brand-300: var(--cg-violet-300);
126
+ --color-brand-400: var(--cg-violet-400);
127
+ --color-brand-500: var(--cg-violet-500);
128
+ --color-brand-600: var(--cg-violet-600);
129
+ --color-brand-700: var(--cg-violet-700);
130
+ --color-brand-900: var(--cg-violet-900);
131
+ --color-cyan-tint: var(--cg-cyan-200);
132
+ --color-cyan-wash: var(--cg-cyan-300);
133
+ --color-cyan-fill: var(--cg-cyan-400);
134
+ --color-lime-tint: var(--cg-lime-200);
135
+ --color-lime-wash: var(--cg-lime-600);
136
+ --color-lime-edge: var(--cg-lime-700);
137
+ /* The design's cool neutrals. `steel` is the quiet-text tone the frames put on
138
+ every footer link; `steel-strong` is the rung that actually clears 4.5:1 on a
139
+ light ground, and the one to reach for when the text is content. */
140
+ --color-steel: var(--cg-slate-500);
141
+ --color-steel-strong: var(--cg-slate-600);
142
+ --color-steel-quiet: var(--cg-slate-300);
143
+ /* Figma's "stone". A warm near-black beside --color-ink's flat #222222. Its
144
+ role in the design is not yet known; see the token's own note. */
145
+ --color-stone: var(--cg-stone-800);
98
146
  /* The fourth brand hue (#197). NOT `--color-accent`: rule 4 again — shadcn
99
147
  owns `accent` and it is a background there, which is the collision that
100
148
  once rendered a badge invisible. `azure` is the hue name, alongside brand /
@@ -205,6 +253,9 @@
205
253
  --font-sans: var(--cg-font-body);
206
254
  --font-body: var(--cg-font-body);
207
255
  --font-display: var(--cg-font-display);
256
+ /* The eyebrow-and-button face (#240). Not a fallback: the frames use Manrope
257
+ for exactly those two jobs while the body face is Space Grotesk. */
258
+ --font-ui: var(--cg-font-ui);
208
259
  --font-mono: var(--cg-font-mono);
209
260
 
210
261
  /* ---- type scale ----
@@ -229,6 +280,12 @@
229
280
  tracking or weight, so they get none: a companion that invents a value is
230
281
  worse than an absent one, since it forces a weight where a component expected
231
282
  to inherit. Closes the gap noted in notes.md after #30. */
283
+ --text-display-3xl: var(--cg-display-3xl);
284
+ --text-display-3xl--line-height: var(--cg-display-line-tight);
285
+ --text-display-3xl--letter-spacing: var(--cg-title-tracking);
286
+ --text-display-2xl: var(--cg-display-2xl);
287
+ --text-display-2xl--line-height: var(--cg-display-line-tight);
288
+ --text-display-2xl--letter-spacing: var(--cg-title-tracking);
232
289
  --text-display-xl: var(--cg-display-xl);
233
290
  --text-display-xl--line-height: var(--cg-display-line);
234
291
  --text-display-xl--letter-spacing: var(--cg-display-tracking);
@@ -241,12 +298,30 @@
241
298
  --text-display-sm: var(--cg-display-sm);
242
299
  --text-display-sm--line-height: var(--cg-display-line);
243
300
  --text-display-sm--letter-spacing: var(--cg-display-tracking);
301
+ /* The display face at card scale (#239). A separate ramp from display-*
302
+ because the two disagree everywhere they overlap; tokens.css's
303
+ `tanker-title-ramp` note has the table. --text-title-sm and
304
+ --text-heading-md are both 20px and differ in face and leading, which is
305
+ the whole reason the ramp is separate. */
306
+ --text-title-lg: var(--cg-title-lg);
307
+ --text-title-lg--line-height: var(--cg-title-line);
308
+ --text-title-lg--letter-spacing: var(--cg-title-tracking);
309
+ --text-title-md: var(--cg-title-md);
310
+ --text-title-md--line-height: var(--cg-title-line);
311
+ --text-title-md--letter-spacing: var(--cg-title-tracking);
312
+ --text-title-sm: var(--cg-title-sm);
313
+ --text-title-sm--line-height: var(--cg-title-line);
314
+ --text-title-sm--letter-spacing: var(--cg-title-tracking);
244
315
  --text-heading-lg: var(--cg-heading-lg);
245
316
  --text-heading-lg--line-height: var(--cg-heading-line);
246
317
  --text-heading-md: var(--cg-heading-md);
247
318
  --text-heading-md--line-height: var(--cg-heading-line);
248
319
  --text-heading-sm: var(--cg-heading-sm);
249
320
  --text-heading-sm--line-height: var(--cg-heading-line);
321
+ /* The lede size on all six canonical frames, and the size this ramp could not
322
+ spell: body-lg is 19 and heading-md is 20 with the wrong leading. */
323
+ --text-body-xl: var(--cg-body-xl);
324
+ --text-body-xl--line-height: var(--cg-body-line);
250
325
  --text-body-lg: var(--cg-body-lg);
251
326
  --text-body-lg--line-height: var(--cg-body-line);
252
327
  --text-body-md: var(--cg-body-md);
@@ -260,6 +335,15 @@
260
335
  --text-label: var(--cg-label-size);
261
336
  --text-label--line-height: var(--cg-body-line);
262
337
  --text-label--font-weight: var(--cg-label-weight);
338
+ /* The eyebrow, as Figma's own bound text variable declares it: 14px, 600,
339
+ 1.2, 0.1em. `uppercase` stays the caller's, the way Eyebrow's docblock
340
+ already says. Note --cg-eyebrow-weight is 600 and --cg-label-weight is 500;
341
+ they are different rungs and the one-pixel size difference is not the
342
+ point. */
343
+ --text-eyebrow: var(--cg-eyebrow-size);
344
+ --text-eyebrow--line-height: var(--cg-eyebrow-line);
345
+ --text-eyebrow--letter-spacing: var(--cg-eyebrow-tracking);
346
+ --text-eyebrow--font-weight: var(--cg-eyebrow-weight);
263
347
 
264
348
  /* ---- weights ----
265
349
  `--font-weight-display` is unreachable and kept only for completeness. Both
@@ -284,11 +368,18 @@
284
368
 
285
369
  /* ---- leading and tracking ---- */
286
370
  --leading-display: var(--cg-display-line);
371
+ /* leading-none, which is what every Tanker node in every frame actually uses.
372
+ --leading-display stays 1.06; it was tuned for a condensed face nothing
373
+ ships any more and retuning it moves text that exists today (#240). */
374
+ --leading-display-tight: var(--cg-display-line-tight);
375
+ --leading-title: var(--cg-title-line);
287
376
  --leading-heading: var(--cg-heading-line);
288
377
  --leading-body: var(--cg-body-line);
289
378
  --leading-mono: var(--cg-mono-line);
290
379
  --tracking-display: var(--cg-display-tracking);
291
380
  --tracking-body: var(--cg-body-tracking);
381
+ --tracking-title: var(--cg-title-tracking);
382
+ --tracking-eyebrow: var(--cg-eyebrow-tracking);
292
383
 
293
384
  /* ---- corners ---- */
294
385
  /* The smallest corner in the system, added for the entity card's 20px kind
@@ -299,7 +390,11 @@
299
390
  --radius-md: var(--cg-radius-md);
300
391
  --radius-lg: var(--cg-radius-lg);
301
392
  --radius-xl: var(--cg-radius-xl);
393
+ /* The container corner. In these frames 16 is what a CONTROL is rounded to and
394
+ 20 is what a CONTAINER is rounded to, consistently, on all six. */
395
+ --radius-container: var(--cg-radius-container);
302
396
  --radius-2xl: var(--cg-radius-2xl);
397
+ --radius-3xl: var(--cg-radius-3xl);
303
398
  --radius-pill: var(--cg-radius-pill);
304
399
 
305
400
  /* ---- elevation ----