@danxbot/ui 15.35.0 → 15.37.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
|
|
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
|
|
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 {
|
|
@@ -6,6 +6,11 @@ export interface ProfilePageProps {
|
|
|
6
6
|
onSave?: (input: ProfileFormSaveInput) => Promise<void>;
|
|
7
7
|
onUploadAvatar?: (file: File) => Promise<string>;
|
|
8
8
|
onAvatarChange?: (avatarUrl: string | null) => void;
|
|
9
|
+
/** DX-4029: `false` omits the page's own title text (the `<h1>` and the
|
|
10
|
+
* team-name line) so a host layout can own the screen's one `<h1>`. The
|
|
11
|
+
* read-only avatar (content, not title) stays, and the default `true` is
|
|
12
|
+
* the unchanged render. */
|
|
13
|
+
heading?: boolean;
|
|
9
14
|
className?: string;
|
|
10
15
|
}
|
|
11
|
-
export declare function ProfilePage({ account, onSave, onUploadAvatar, onAvatarChange, className }: ProfilePageProps): import("react").JSX.Element;
|
|
16
|
+
export declare function ProfilePage({ account, onSave, onUploadAvatar, onAvatarChange, heading, className, }: ProfilePageProps): import("react").JSX.Element;
|
|
@@ -17,6 +17,8 @@ export interface RolesPermissionsPageProps {
|
|
|
17
17
|
onResetRole?: (roleId: string) => void;
|
|
18
18
|
/** The id of a role currently mid-mutation. Disables just that row's controls, not the whole page. */
|
|
19
19
|
busyRoleId?: string | null;
|
|
20
|
+
/** DX-4029: `false` omits the page's own title text (the `<h1>` and the explanatory line) so a host layout can own the screen's one `<h1>`. The "New role" button stays: it is the only create-role entry point. Default `true` is the unchanged render. */
|
|
21
|
+
heading?: boolean;
|
|
20
22
|
className?: string;
|
|
21
23
|
}
|
|
22
|
-
export declare function RolesPermissionsPage({ roles, permissions, editable, onChangePermission, onCreateRole, onRenameRole, onDeleteRole, onResetRole, busyRoleId, className, }: RolesPermissionsPageProps): import("react").JSX.Element;
|
|
24
|
+
export declare function RolesPermissionsPage({ roles, permissions, editable, onChangePermission, onCreateRole, onRenameRole, onDeleteRole, onResetRole, busyRoleId, heading, className, }: RolesPermissionsPageProps): import("react").JSX.Element;
|