@danxbot/ui 15.36.0 → 15.38.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.
@@ -254,6 +254,14 @@ declare const ring: import("tailwind-variants").TVReturnType<{
254
254
  * clips or shrinks them automatically if you leave the number on.
255
255
  */
256
256
  xs: "size-3.5";
257
+ /**
258
+ * DX-4099 — the ring that fills exactly ONE text line (1rem, the line
259
+ * unit of a card face row, `leading-4`), with nothing around it. Built to
260
+ * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
261
+ * ring is the indicator and the icon says what it indicates. `xs` (14px)
262
+ * is a hair short of a 16px line and leaves the ring floating in it.
263
+ */
264
+ row: "size-4";
257
265
  sm: "size-10";
258
266
  md: "size-16";
259
267
  lg: "size-24";
@@ -277,6 +285,14 @@ declare const ring: import("tailwind-variants").TVReturnType<{
277
285
  * clips or shrinks them automatically if you leave the number on.
278
286
  */
279
287
  xs: "size-3.5";
288
+ /**
289
+ * DX-4099 — the ring that fills exactly ONE text line (1rem, the line
290
+ * unit of a card face row, `leading-4`), with nothing around it. Built to
291
+ * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
292
+ * ring is the indicator and the icon says what it indicates. `xs` (14px)
293
+ * is a hair short of a 16px line and leaves the ring floating in it.
294
+ */
295
+ row: "size-4";
280
296
  sm: "size-10";
281
297
  md: "size-16";
282
298
  lg: "size-24";
@@ -300,6 +316,14 @@ declare const ring: import("tailwind-variants").TVReturnType<{
300
316
  * clips or shrinks them automatically if you leave the number on.
301
317
  */
302
318
  xs: "size-3.5";
319
+ /**
320
+ * DX-4099 — the ring that fills exactly ONE text line (1rem, the line
321
+ * unit of a card face row, `leading-4`), with nothing around it. Built to
322
+ * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
323
+ * ring is the indicator and the icon says what it indicates. `xs` (14px)
324
+ * is a hair short of a 16px line and leaves the ring floating in it.
325
+ */
326
+ row: "size-4";
303
327
  sm: "size-10";
304
328
  md: "size-16";
305
329
  lg: "size-24";
@@ -334,6 +358,31 @@ export interface ProgressRingSegment {
334
358
  */
335
359
  label: string;
336
360
  }
361
+ /**
362
+ * DX-4099 — what sits in the middle of the ring, as ONE union so the number,
363
+ * the done check and a caller's own glyph never compete. `children` is only
364
+ * accepted with `showValue={false}`: a glyph drawn over the percentage would be
365
+ * two things in one 14-16px circle, and a silent "which wins" rule is exactly
366
+ * what the `segments`/`value` union below exists to avoid. The glyph is
367
+ * decoration (`aria-hidden`); the ring's role, name and description are
368
+ * unchanged and carry the meaning.
369
+ */
370
+ type ProgressRingCentre = {
371
+ /**
372
+ * Draw the number in the middle. On by default, which is the behaviour this
373
+ * component has always had.
374
+ *
375
+ * Worth turning off on a `sm` ring used as an affordance rather than a
376
+ * readout — two digits inside a 40px circle is a number nobody reads and a
377
+ * ring nobody can see past.
378
+ */
379
+ showValue?: true;
380
+ children?: never;
381
+ } | {
382
+ showValue: false;
383
+ /** A decorative glyph centred over the ring, e.g. `<Icon name="file-code" size="xs" />`. */
384
+ children?: ReactNode;
385
+ };
337
386
  interface ProgressRingBase extends VariantProps<typeof ring> {
338
387
  /**
339
388
  * REQUIRED, and a plain string.
@@ -345,15 +394,6 @@ interface ProgressRingBase extends VariantProps<typeof ring> {
345
394
  * of this component existing.
346
395
  */
347
396
  label: string;
348
- /**
349
- * Draw the number in the middle. On by default, which is the behaviour this
350
- * component has always had.
351
- *
352
- * Worth turning off on a `sm` ring used as an affordance rather than a
353
- * readout — two digits inside a 40px circle is a number nobody reads and a
354
- * ring nobody can see past.
355
- */
356
- showValue?: boolean;
357
397
  /**
358
398
  * DX-4062 — opt-in done state: at 100% or more the centre shows a green check
359
399
  * (the library's `check` icon) instead of "100%". Below 100% nothing changes.
@@ -364,13 +404,13 @@ interface ProgressRingBase extends VariantProps<typeof ring> {
364
404
  className?: string;
365
405
  }
366
406
  /** A ring showing ONE number. `null` is "working, length unknown". */
367
- export interface ProgressRingValueProps extends ProgressRingBase {
407
+ export type ProgressRingValueProps = ProgressRingBase & ProgressRingCentre & {
368
408
  value: number | null;
369
409
  tone?: ProgressTone;
370
410
  segments?: never;
371
411
  total?: never;
372
412
  remainderLabel?: never;
373
- }
413
+ };
374
414
  /**
375
415
  * A ring showing a BREAKDOWN: contiguous arcs around one circle.
376
416
  *
@@ -378,7 +418,7 @@ export interface ProgressRingValueProps extends ProgressRingBase {
378
418
  * `value` and `segments` does not type-check. There is no precedence rule to
379
419
  * learn and no silent winner.
380
420
  */
381
- export interface ProgressRingSegmentsProps extends ProgressRingBase {
421
+ export type ProgressRingSegmentsProps = ProgressRingBase & ProgressRingCentre & {
382
422
  /** Drawn in order, starting at twelve o'clock and running clockwise. */
383
423
  segments: ProgressRingSegment[];
384
424
  /**
@@ -431,7 +471,7 @@ export interface ProgressRingSegmentsProps extends ProgressRingBase {
431
471
  centerValue?: number;
432
472
  value?: never;
433
473
  tone?: never;
434
- }
474
+ };
435
475
  export type ProgressRingProps = ProgressRingValueProps | ProgressRingSegmentsProps;
436
476
  /** One arc, resolved to the two fractions an SVG dash actually needs. */
437
477
  export interface ProgressRingArc {
@@ -53,6 +53,9 @@ export interface AttachmentActionProps {
53
53
  /**
54
54
  * On a tile the buttons sit over imagery, so they need their own ground —
55
55
  * and they FADE IN on hover rather than sitting permanently over the picture.
56
+ * A device with no hover at all (`(hover: none)`, a phone or tablet) has
57
+ * nothing to fade them in with, so there they are visible at rest (DX-4039);
58
+ * keyboard focus still reveals them on a hover-capable one.
56
59
  *
57
60
  * Pass `layout === "tile"`. Getting it wrong is not a style preference: a
58
61
  * tinted control on a row is dark-on-dark, and an untinted one on a tile is
@@ -105,7 +108,7 @@ export interface AttachmentPreviewProps {
105
108
  * Video is recognised by mime type OR extension, because attachments from chat
106
109
  * integrations arrive as `application/octet-stream`.
107
110
  */
108
- export declare function AttachmentPreview({ file, onOpenChange, onDownload, renderBody, }: AttachmentPreviewProps): import("react").JSX.Element;
111
+ export declare function AttachmentPreview({ file: openFile, onOpenChange, onDownload, renderBody, }: AttachmentPreviewProps): import("react").JSX.Element;
109
112
  export interface AttachmentListProps {
110
113
  files: ChatFile[];
111
114
  layout?: AttachmentLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "15.36.0",
3
+ "version": "15.38.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "gates": "npm run shoot && npm run a11y && node scripts/shoot-overlays.mjs && npm run probe",
75
75
  "a11y": "node scripts/a11y-scan.mjs",
76
76
  "shoot": "node scripts/shoot.mjs",
77
- "probe": "node scripts/probe-scale.mjs && node scripts/probe-switch.mjs && node scripts/probe-slider.mjs && node scripts/probe-panel.mjs && node scripts/probe-popover-width.mjs && node scripts/probe-api.mjs && node scripts/probe-api-live.mjs && node scripts/probe-tabs-overflow.mjs && node scripts/probe-stat-row.mjs && node scripts/probe-packaging.mjs && node scripts/probe-containment.mjs && node scripts/probe-popover-containment.mjs && node scripts/probe-popover-panel-width.mjs && node scripts/probe-theme-menu-overflow.mjs && node scripts/probe-shell.mjs && node scripts/probe-nav-trigger-tap-target.mjs && node scripts/probe-card-header.mjs && node scripts/probe-inline-edit.mjs && node scripts/probe-read-more.mjs && node scripts/probe-section-nav.mjs",
77
+ "probe": "node scripts/probe-scale.mjs && node scripts/probe-switch.mjs && node scripts/probe-slider.mjs && node scripts/probe-panel.mjs && node scripts/probe-popover-width.mjs && node scripts/probe-api.mjs && node scripts/probe-api-live.mjs && node scripts/probe-tabs-overflow.mjs && node scripts/probe-stat-row.mjs && node scripts/probe-packaging.mjs && node scripts/probe-containment.mjs && node scripts/probe-popover-containment.mjs && node scripts/probe-popover-panel-width.mjs && node scripts/probe-theme-menu-overflow.mjs && node scripts/probe-shell.mjs && node scripts/probe-nav-trigger-tap-target.mjs && node scripts/probe-attachment-touch.mjs && node scripts/probe-card-header.mjs && node scripts/probe-inline-edit.mjs && node scripts/probe-read-more.mjs && node scripts/probe-section-nav.mjs",
78
78
  "sync": "node scripts/sync.mjs",
79
79
  "visual": "node scripts/visual-docker.mjs",
80
80
  "visual:update": "node scripts/visual-docker.mjs --update-snapshots",