@danxbot/ui 2.9.1 → 3.1.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/README.md +35 -19
- package/dist/index.js +3304 -3319
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +36 -6
- package/dist/types/components/Stat.d.ts +29 -6
- package/dist/types/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -3,21 +3,24 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
3
3
|
declare const stat: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
size: {
|
|
5
5
|
xs: {
|
|
6
|
-
|
|
7
|
-
hint: string;
|
|
6
|
+
box: string;
|
|
8
7
|
value: string;
|
|
9
8
|
};
|
|
10
9
|
sm: {
|
|
10
|
+
box: string;
|
|
11
11
|
value: string;
|
|
12
12
|
};
|
|
13
13
|
md: {
|
|
14
|
+
box: string;
|
|
14
15
|
value: string;
|
|
15
16
|
};
|
|
16
17
|
lg: {
|
|
18
|
+
box: string;
|
|
17
19
|
value: string;
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
}, {
|
|
23
|
+
box: string;
|
|
21
24
|
root: string;
|
|
22
25
|
label: string;
|
|
23
26
|
value: string;
|
|
@@ -27,21 +30,24 @@ declare const stat: import("tailwind-variants").TVReturnType<{
|
|
|
27
30
|
}, undefined, {
|
|
28
31
|
size: {
|
|
29
32
|
xs: {
|
|
30
|
-
|
|
31
|
-
hint: string;
|
|
33
|
+
box: string;
|
|
32
34
|
value: string;
|
|
33
35
|
};
|
|
34
36
|
sm: {
|
|
37
|
+
box: string;
|
|
35
38
|
value: string;
|
|
36
39
|
};
|
|
37
40
|
md: {
|
|
41
|
+
box: string;
|
|
38
42
|
value: string;
|
|
39
43
|
};
|
|
40
44
|
lg: {
|
|
45
|
+
box: string;
|
|
41
46
|
value: string;
|
|
42
47
|
};
|
|
43
48
|
};
|
|
44
49
|
}, {
|
|
50
|
+
box: string;
|
|
45
51
|
root: string;
|
|
46
52
|
label: string;
|
|
47
53
|
value: string;
|
|
@@ -51,21 +57,24 @@ declare const stat: import("tailwind-variants").TVReturnType<{
|
|
|
51
57
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
52
58
|
size: {
|
|
53
59
|
xs: {
|
|
54
|
-
|
|
55
|
-
hint: string;
|
|
60
|
+
box: string;
|
|
56
61
|
value: string;
|
|
57
62
|
};
|
|
58
63
|
sm: {
|
|
64
|
+
box: string;
|
|
59
65
|
value: string;
|
|
60
66
|
};
|
|
61
67
|
md: {
|
|
68
|
+
box: string;
|
|
62
69
|
value: string;
|
|
63
70
|
};
|
|
64
71
|
lg: {
|
|
72
|
+
box: string;
|
|
65
73
|
value: string;
|
|
66
74
|
};
|
|
67
75
|
};
|
|
68
76
|
}, {
|
|
77
|
+
box: string;
|
|
69
78
|
root: string;
|
|
70
79
|
label: string;
|
|
71
80
|
value: string;
|
|
@@ -73,6 +82,7 @@ declare const stat: import("tailwind-variants").TVReturnType<{
|
|
|
73
82
|
delta: string;
|
|
74
83
|
hint: string;
|
|
75
84
|
}>>;
|
|
85
|
+
export type StatSize = NonNullable<VariantProps<typeof stat>["size"]>;
|
|
76
86
|
export type StatTrend = "up" | "down" | "flat";
|
|
77
87
|
/** Whether this movement is good news, bad news, or neither. */
|
|
78
88
|
export type StatSentiment = "positive" | "negative" | "neutral";
|
|
@@ -93,6 +103,19 @@ export interface StatProps extends VariantProps<typeof stat> {
|
|
|
93
103
|
ref?: Ref<HTMLDivElement>;
|
|
94
104
|
}
|
|
95
105
|
export declare function Stat({ label, value, unit, delta, trend, sentiment, hint, visual, size, className, ref, }: StatProps): import("react").JSX.Element;
|
|
106
|
+
export interface StatRowProps {
|
|
107
|
+
/**
|
|
108
|
+
* The readout, as DATA. Every entry is the props of one `Stat`; `size` is the
|
|
109
|
+
* row's, not each stat's, so they cannot disagree.
|
|
110
|
+
*/
|
|
111
|
+
stats: readonly Omit<StatProps, "size">[];
|
|
112
|
+
size?: StatSize;
|
|
113
|
+
/** Which edge the row settles against when it has spare width. */
|
|
114
|
+
align?: "start" | "end" | "between";
|
|
115
|
+
className?: string;
|
|
116
|
+
ref?: Ref<HTMLDivElement>;
|
|
117
|
+
}
|
|
118
|
+
export declare function StatRow({ stats, size, align, className, ref }: StatRowProps): import("react").JSX.Element | null;
|
|
96
119
|
export interface SparklineProps {
|
|
97
120
|
values: number[];
|
|
98
121
|
/** Matches the stat's sentiment, so the line agrees with the delta beside it. */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Every props interface is named `<Name>Props` — the design agent reads those
|
|
9
9
|
* type names directly, and consumers get predictable imports.
|
|
10
10
|
*/
|
|
11
|
-
import "./styles/
|
|
11
|
+
import "./styles/lib.css";
|
|
12
12
|
export { Icon, type IconProps, type IconSize, type IconName } from "./components/Icon";
|
|
13
13
|
export { registerIcon, registerIcons, getIcon, hasIcon, iconNames, type IconNode, type IconNodeChild, } from "./lib/icons";
|
|
14
14
|
export { coreIcons, type CoreIconName } from "./icons/data";
|
|
@@ -49,7 +49,7 @@ export { Separator, ScrollArea, Collapsible, EmptyState, Timeline, type Separato
|
|
|
49
49
|
export { PanelGroup, Panel, PanelResizer, type PanelGroupProps, type PanelProps, type PanelResizerProps, type PanelDirection, type PanelNarrowMode, } from "./components/Panel";
|
|
50
50
|
export { Avatar, AvatarGroup, type AvatarProps, type AvatarGroupProps, type AvatarStatus, } from "./components/Avatar";
|
|
51
51
|
export { Progress, Meter, ProgressRing, type ProgressProps, type MeterProps, type ProgressRingProps, type ProgressRingValueProps, type ProgressRingSegmentsProps, type ProgressRingSegment, type ProgressTone, } from "./components/Progress";
|
|
52
|
-
export { Stat, Sparkline, type StatProps, type SparklineProps, type StatTrend, type StatSentiment, } from "./components/Stat";
|
|
52
|
+
export { Stat, StatRow, Sparkline, type StatProps, type StatRowProps, type SparklineProps, type StatSize, type StatTrend, type StatSentiment, } from "./components/Stat";
|
|
53
53
|
export { DataTable, TableEmptyState, CellStack, type DataTableProps, type TableDensity, } from "./components/Table";
|
|
54
54
|
export { CodeEditor, CodeEditorToolbar, CodeEditorCaption, CodeEditorCopyButton, CodeEditorWrapToggle, CodeEditorViewSwitch, type CodeEditorProps, type CodeEditorToolbarProps, type CodeEditorView, } from "./components/CodeEditor";
|
|
55
55
|
export { MarkdownEditor, type MarkdownEditorProps } from "./components/MarkdownEditor";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danxbot/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.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",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"gates": "npm run shoot && npm run a11y && node scripts/shoot-overlays.mjs && npm run probe",
|
|
70
70
|
"a11y": "node scripts/a11y-scan.mjs",
|
|
71
71
|
"shoot": "node scripts/shoot.mjs",
|
|
72
|
-
"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",
|
|
72
|
+
"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",
|
|
73
73
|
"sync": "node scripts/sync.mjs",
|
|
74
74
|
"visual": "node scripts/visual-docker.mjs",
|
|
75
75
|
"visual:update": "node scripts/visual-docker.mjs --update-snapshots",
|