@danxbot/ui 15.39.0 → 15.40.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.
- package/dist/index.js +6749 -6696
- package/dist/index.js.map +1 -1
- package/dist/types/components/ConcentricRing.d.ts +61 -0
- package/dist/types/components/Progress.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import { type VariantProps } from "tailwind-variants";
|
|
3
|
+
import { type ProgressTone } from "./Progress";
|
|
4
|
+
declare const ring: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
/** 28px — sits in a tab or a row beside a 14px label; a two-digit count fits the centre. */
|
|
7
|
+
sm: "size-7";
|
|
8
|
+
md: "size-10";
|
|
9
|
+
lg: "size-16";
|
|
10
|
+
};
|
|
11
|
+
}, undefined, "relative inline-grid shrink-0 place-items-center", {
|
|
12
|
+
size: {
|
|
13
|
+
/** 28px — sits in a tab or a row beside a 14px label; a two-digit count fits the centre. */
|
|
14
|
+
sm: "size-7";
|
|
15
|
+
md: "size-10";
|
|
16
|
+
lg: "size-16";
|
|
17
|
+
};
|
|
18
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
19
|
+
size: {
|
|
20
|
+
/** 28px — sits in a tab or a row beside a 14px label; a two-digit count fits the centre. */
|
|
21
|
+
sm: "size-7";
|
|
22
|
+
md: "size-10";
|
|
23
|
+
lg: "size-16";
|
|
24
|
+
};
|
|
25
|
+
}, undefined>>;
|
|
26
|
+
/** One ring: how full it is (0-100, clamped) and the tone it is drawn in. */
|
|
27
|
+
export interface ConcentricRingLevel {
|
|
28
|
+
value: number;
|
|
29
|
+
tone: ProgressTone;
|
|
30
|
+
}
|
|
31
|
+
export interface ConcentricRingProps extends VariantProps<typeof ring> {
|
|
32
|
+
/**
|
|
33
|
+
* REQUIRED, and the whole sentence — both fractions in words, with their
|
|
34
|
+
* numbers. See the banner: this is what keeps color from being the only
|
|
35
|
+
* carrier of "which ring is which".
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
38
|
+
/** The larger, first-read ring. */
|
|
39
|
+
outer: ConcentricRingLevel;
|
|
40
|
+
/** The smaller ring inside it. */
|
|
41
|
+
inner: ConcentricRingLevel;
|
|
42
|
+
/** Centred in the disc inside the inner ring, e.g. the total. Hidden from assistive tech. */
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
ref?: Ref<HTMLSpanElement>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Two nested rings, each filled by its own 0-100 value, around a centre number.
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <ConcentricRing
|
|
52
|
+
* label="Goals: 5 of 6 signed off by a person, 1 of 6 verified by an agent"
|
|
53
|
+
* outer={{ value: (5 / 6) * 100, tone: "success" }}
|
|
54
|
+
* inner={{ value: (1 / 6) * 100, tone: "brand" }}
|
|
55
|
+
* >
|
|
56
|
+
* 6
|
|
57
|
+
* </ConcentricRing>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function ConcentricRing({ label, outer, inner, size, children, className, ref }: ConcentricRingProps): import("react").JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -473,6 +473,7 @@ export type ProgressRingSegmentsProps = ProgressRingBase & ProgressRingCentre &
|
|
|
473
473
|
tone?: never;
|
|
474
474
|
};
|
|
475
475
|
export type ProgressRingProps = ProgressRingValueProps | ProgressRingSegmentsProps;
|
|
476
|
+
export declare const RING_TONE: Record<string, string>;
|
|
476
477
|
/** One arc, resolved to the two fractions an SVG dash actually needs. */
|
|
477
478
|
export interface ProgressRingArc {
|
|
478
479
|
label: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export { Separator, ScrollArea, Collapsible, CollapsibleRoot, CollapsibleTrigger
|
|
|
70
70
|
export { PanelGroup, Panel, PanelResizer, type PanelGroupProps, type PanelProps, type PanelResizerProps, type PanelDirection, type PanelNarrowMode, } from "./components/Panel";
|
|
71
71
|
export { Avatar, AvatarGroup, type AvatarProps, type AvatarGroupProps, type AvatarStatus, } from "./components/Avatar";
|
|
72
72
|
export { Progress, Meter, ProgressRing, type ProgressProps, type MeterProps, type ProgressRingProps, type ProgressRingValueProps, type ProgressRingSegmentsProps, type ProgressRingSegment, type ProgressTone, } from "./components/Progress";
|
|
73
|
+
export { ConcentricRing, type ConcentricRingProps, type ConcentricRingLevel, } from "./components/ConcentricRing";
|
|
73
74
|
export { Stat, StatRow, Sparkline, type StatProps, type StatRowProps, type SparklineProps, type StatSize, type StatTrend, type StatSentiment, } from "./components/Stat";
|
|
74
75
|
export { ShareBar, type ShareBarProps, type ShareBarSegment, } from "./components/chart/ShareBar";
|
|
75
76
|
export { BarList, type BarListProps, type BarListItem, } from "./components/chart/BarList";
|