@schemavaults/ui 0.47.0 → 0.49.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/components/ui/bar-chart/bar-chart.d.ts +105 -0
- package/dist/components/ui/bar-chart/bar-chart.js +202 -0
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -0
- package/dist/components/ui/bar-chart/index.d.ts +3 -0
- package/dist/components/ui/bar-chart/index.js +3 -0
- package/dist/components/ui/bar-chart/index.js.map +1 -0
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.js +2 -0
- package/dist/components/ui/index.js.map +1 -1
- package/dist/components/ui/theme-selector/index.d.ts +2 -0
- package/dist/components/ui/theme-selector/index.js +2 -0
- package/dist/components/ui/theme-selector/index.js.map +1 -0
- package/dist/components/ui/theme-selector/theme-selector.d.ts +31 -0
- package/dist/components/ui/theme-selector/theme-selector.js +81 -0
- package/dist/components/ui/theme-selector/theme-selector.js.map +1 -0
- package/dist/providers/brightness-theme/brightness-theme.d.ts +2 -1
- package/dist/providers/brightness-theme/brightness-theme.js.map +1 -1
- package/dist/providers/brightness-theme/index.d.ts +1 -1
- package/dist/providers/index.d.ts +2 -2
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
|
|
3
|
+
export declare const barChartSizeIds: ["sm", "md", "lg", "xl"];
|
|
4
|
+
export type BarChartSizeId = (typeof barChartSizeIds)[number];
|
|
5
|
+
export declare const barChartOrientationIds: ["vertical", "horizontal"];
|
|
6
|
+
export type BarChartOrientationId = (typeof barChartOrientationIds)[number];
|
|
7
|
+
export declare const barChartBarColorIds: ["default", "primary", "positive", "warning", "destructive", "muted"];
|
|
8
|
+
export type BarChartBarColorId = (typeof barChartBarColorIds)[number];
|
|
9
|
+
export declare const barChartVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "lg" | "xl" | "md" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export interface BarChartBar {
|
|
13
|
+
/** Stable identifier for the bar. Used as React key and click payload. */
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Bar magnitude. Bar length is `value / max`. Negative and non-finite
|
|
17
|
+
* values are treated as `0`.
|
|
18
|
+
*/
|
|
19
|
+
value: number;
|
|
20
|
+
/** Human-readable category label rendered along the axis. */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Preset color id from the chart palette. Ignored if `fill` is provided. */
|
|
23
|
+
color?: BarChartBarColorId;
|
|
24
|
+
/**
|
|
25
|
+
* Override the fill with a raw CSS color (e.g. `"#ff0080"` or
|
|
26
|
+
* `"hsl(var(--chart-1))"`). Takes precedence over `color`.
|
|
27
|
+
*/
|
|
28
|
+
fill?: string;
|
|
29
|
+
/** Extra classes applied to this bar's `<rect>`. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Fired when this bar is clicked or activated via keyboard. */
|
|
32
|
+
onClick?: (bar: BarChartBar, event: MouseEvent<SVGRectElement> | KeyboardEvent<SVGRectElement>) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface BarChartValueLabelContext {
|
|
35
|
+
bar: BarChartBar;
|
|
36
|
+
value: number;
|
|
37
|
+
/** Share of the scale max, in the range 0–1. */
|
|
38
|
+
fraction: number;
|
|
39
|
+
/** Share of the scale max, in the range 0–100. */
|
|
40
|
+
percentage: number;
|
|
41
|
+
index: number;
|
|
42
|
+
}
|
|
43
|
+
export interface BarChartProps extends Omit<HTMLAttributes<HTMLDivElement>, "onClick">, VariantProps<typeof barChartVariants> {
|
|
44
|
+
/** Bars to render, in order. */
|
|
45
|
+
bars: ReadonlyArray<BarChartBar>;
|
|
46
|
+
/** Accessible label describing what the chart represents. */
|
|
47
|
+
label: string;
|
|
48
|
+
/** Bar direction. Defaults to `"vertical"` (columns growing upward). */
|
|
49
|
+
orientation?: BarChartOrientationId;
|
|
50
|
+
/**
|
|
51
|
+
* Upper bound of the value scale. Defaults to the largest bar value (or `1`
|
|
52
|
+
* when every bar is `0`). Useful for pinning multiple charts to a shared
|
|
53
|
+
* scale.
|
|
54
|
+
*/
|
|
55
|
+
max?: number;
|
|
56
|
+
/** Override the rendered canvas width in pixels (defaults are size-aware). */
|
|
57
|
+
width?: number;
|
|
58
|
+
/** Override the rendered canvas height in pixels (defaults are size-aware). */
|
|
59
|
+
height?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Gap between bars as a fraction of each bar's slot (0–0.9). Defaults to
|
|
62
|
+
* `0.3`.
|
|
63
|
+
*/
|
|
64
|
+
barGap?: number;
|
|
65
|
+
/** Corner radius applied to the free end of every bar. Defaults to `4`. */
|
|
66
|
+
cornerRadius?: number;
|
|
67
|
+
/** Render the baseline axis line. Defaults to `true`. */
|
|
68
|
+
showAxis?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Number of evenly-spaced gridlines drawn across the value axis. `0`
|
|
71
|
+
* disables gridlines. Defaults to `0`.
|
|
72
|
+
*/
|
|
73
|
+
gridLineCount?: number;
|
|
74
|
+
/** Render each bar's category `label` along the axis. Defaults to `true`. */
|
|
75
|
+
showCategoryLabels?: boolean;
|
|
76
|
+
/** Render a value label at the free end of each bar. Defaults to `false`. */
|
|
77
|
+
showValueLabels?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Customize the value-label text. Return `null` to skip a bar. Defaults to
|
|
80
|
+
* the raw value (`String(value)`).
|
|
81
|
+
*/
|
|
82
|
+
valueLabelFormatter?: (context: BarChartValueLabelContext) => string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Fallback handler invoked for any bar that doesn't have its own `onClick`.
|
|
85
|
+
* Receives the clicked bar.
|
|
86
|
+
*/
|
|
87
|
+
onBarClick?: (bar: BarChartBar, event: MouseEvent<SVGRectElement> | KeyboardEvent<SVGRectElement>) => void;
|
|
88
|
+
/** Optional content overlaid on top of the plot area. */
|
|
89
|
+
children?: ReactNode;
|
|
90
|
+
/** Extra classes for the overlay content wrapper. */
|
|
91
|
+
overlayClassName?: string;
|
|
92
|
+
/** Extra classes applied to every value-label `<text>` element. */
|
|
93
|
+
valueLabelClassName?: string;
|
|
94
|
+
/** Extra classes applied to every category-label `<text>` element. */
|
|
95
|
+
categoryLabelClassName?: string;
|
|
96
|
+
/** Extra classes applied to the axis / gridline `<line>` elements. */
|
|
97
|
+
axisClassName?: string;
|
|
98
|
+
/** Optional ref forwarded to the wrapper element. */
|
|
99
|
+
ref?: Ref<HTMLDivElement>;
|
|
100
|
+
}
|
|
101
|
+
declare function BarChart({ bars, label, orientation, max, size, width, height, barGap, cornerRadius, showAxis, gridLineCount, showCategoryLabels, showValueLabels, valueLabelFormatter, onBarClick, children, className, overlayClassName, valueLabelClassName, categoryLabelClassName, axisClassName, ref, ...props }: BarChartProps): ReactElement;
|
|
102
|
+
declare namespace BarChart {
|
|
103
|
+
var displayName: string;
|
|
104
|
+
}
|
|
105
|
+
export { BarChart };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
export const barChartSizeIds = [
|
|
7
|
+
"sm",
|
|
8
|
+
"md",
|
|
9
|
+
"lg",
|
|
10
|
+
"xl",
|
|
11
|
+
];
|
|
12
|
+
export const barChartOrientationIds = [
|
|
13
|
+
"vertical",
|
|
14
|
+
"horizontal",
|
|
15
|
+
];
|
|
16
|
+
export const barChartBarColorIds = [
|
|
17
|
+
"default",
|
|
18
|
+
"primary",
|
|
19
|
+
"positive",
|
|
20
|
+
"warning",
|
|
21
|
+
"destructive",
|
|
22
|
+
"muted",
|
|
23
|
+
];
|
|
24
|
+
/** Default canvas dimensions per size. Either axis can be overridden via the
|
|
25
|
+
* `width` / `height` props. */
|
|
26
|
+
const SIZE_TO_CANVAS = {
|
|
27
|
+
sm: { width: 240, height: 140 },
|
|
28
|
+
md: { width: 360, height: 200 },
|
|
29
|
+
lg: { width: 480, height: 260 },
|
|
30
|
+
xl: { width: 640, height: 340 },
|
|
31
|
+
};
|
|
32
|
+
const BAR_FILL_CLASSES = {
|
|
33
|
+
default: "fill-schemavaults-brand-blue",
|
|
34
|
+
primary: "fill-primary",
|
|
35
|
+
positive: "fill-emerald-500 dark:fill-emerald-400",
|
|
36
|
+
warning: "fill-warning",
|
|
37
|
+
destructive: "fill-destructive",
|
|
38
|
+
muted: "fill-muted-foreground",
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Fallback color rotation when a bar doesn't specify its own color. Index is
|
|
42
|
+
* the bar position in the input array, modulo the palette length.
|
|
43
|
+
*/
|
|
44
|
+
const DEFAULT_COLOR_ROTATION = [
|
|
45
|
+
"default",
|
|
46
|
+
"positive",
|
|
47
|
+
"warning",
|
|
48
|
+
"destructive",
|
|
49
|
+
"primary",
|
|
50
|
+
"muted",
|
|
51
|
+
];
|
|
52
|
+
export const barChartVariants = cva("relative inline-flex shrink-0 items-center justify-center", {
|
|
53
|
+
variants: {
|
|
54
|
+
size: {
|
|
55
|
+
sm: "text-[10px]",
|
|
56
|
+
md: "text-[11px]",
|
|
57
|
+
lg: "text-xs",
|
|
58
|
+
xl: "text-sm",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
size: "md",
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
function sanitizeValue(value) {
|
|
66
|
+
if (!Number.isFinite(value) || value < 0)
|
|
67
|
+
return 0;
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
function BarChart({ bars, label, orientation = "vertical", max, size, width, height, barGap = 0.3, cornerRadius = 4, showAxis = true, gridLineCount = 0, showCategoryLabels = true, showValueLabels = false, valueLabelFormatter, onBarClick, children, className, overlayClassName, valueLabelClassName, categoryLabelClassName, axisClassName, ref, ...props }) {
|
|
71
|
+
const resolvedSize = size ?? "md";
|
|
72
|
+
const canvas = SIZE_TO_CANVAS[resolvedSize];
|
|
73
|
+
const W = width ?? canvas.width;
|
|
74
|
+
const H = height ?? canvas.height;
|
|
75
|
+
const titleId = useId();
|
|
76
|
+
const isHorizontal = orientation === "horizontal";
|
|
77
|
+
const gap = Math.max(0, Math.min(0.9, barGap));
|
|
78
|
+
// Reserve a gutter for category labels (along the axis) and a gutter for
|
|
79
|
+
// value labels (at the free end of the bars).
|
|
80
|
+
const categoryGutter = showCategoryLabels ? 24 : 6;
|
|
81
|
+
const valueGutter = showValueLabels ? 28 : 6;
|
|
82
|
+
const padTop = isHorizontal ? 6 : valueGutter;
|
|
83
|
+
const padBottom = isHorizontal ? categoryGutter : categoryGutter;
|
|
84
|
+
const padLeft = isHorizontal ? categoryGutter + 8 : 6;
|
|
85
|
+
const padRight = isHorizontal ? valueGutter : 6;
|
|
86
|
+
const plotX0 = padLeft;
|
|
87
|
+
const plotY0 = padTop;
|
|
88
|
+
const plotW = Math.max(0, W - padLeft - padRight);
|
|
89
|
+
const plotH = Math.max(0, H - padTop - padBottom);
|
|
90
|
+
const sanitized = bars.map((b) => sanitizeValue(b.value));
|
|
91
|
+
const computedMax = max ?? Math.max(0, ...sanitized);
|
|
92
|
+
const scaleMax = computedMax > 0 ? computedMax : 1;
|
|
93
|
+
const count = bars.length;
|
|
94
|
+
const resolved = (() => {
|
|
95
|
+
if (count === 0)
|
|
96
|
+
return [];
|
|
97
|
+
const axisSpan = isHorizontal ? plotH : plotW;
|
|
98
|
+
const slot = axisSpan / count;
|
|
99
|
+
const thickness = slot * (1 - gap);
|
|
100
|
+
const inset = (slot - thickness) / 2;
|
|
101
|
+
return bars.map((bar, index) => {
|
|
102
|
+
const value = sanitized[index];
|
|
103
|
+
const fraction = value / scaleMax;
|
|
104
|
+
const presetColor = bar.color ??
|
|
105
|
+
DEFAULT_COLOR_ROTATION[index % DEFAULT_COLOR_ROTATION.length];
|
|
106
|
+
const fillClass = bar.fill
|
|
107
|
+
? undefined
|
|
108
|
+
: BAR_FILL_CLASSES[presetColor];
|
|
109
|
+
if (isHorizontal) {
|
|
110
|
+
const barLength = fraction * plotW;
|
|
111
|
+
const y = plotY0 + index * slot + inset;
|
|
112
|
+
const x = plotX0;
|
|
113
|
+
return {
|
|
114
|
+
bar,
|
|
115
|
+
value,
|
|
116
|
+
x,
|
|
117
|
+
y,
|
|
118
|
+
barWidth: barLength,
|
|
119
|
+
barHeight: thickness,
|
|
120
|
+
valueX: x + barLength + 6,
|
|
121
|
+
valueY: y + thickness / 2,
|
|
122
|
+
categoryX: plotX0 - 8,
|
|
123
|
+
categoryY: y + thickness / 2,
|
|
124
|
+
fillClass,
|
|
125
|
+
fill: bar.fill,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
const barLength = fraction * plotH;
|
|
129
|
+
const x = plotX0 + index * slot + inset;
|
|
130
|
+
const y = plotY0 + plotH - barLength;
|
|
131
|
+
return {
|
|
132
|
+
bar,
|
|
133
|
+
value,
|
|
134
|
+
x,
|
|
135
|
+
y,
|
|
136
|
+
barWidth: thickness,
|
|
137
|
+
barHeight: barLength,
|
|
138
|
+
valueX: x + thickness / 2,
|
|
139
|
+
valueY: y - 6,
|
|
140
|
+
categoryX: x + thickness / 2,
|
|
141
|
+
categoryY: plotY0 + plotH + 14,
|
|
142
|
+
fillClass,
|
|
143
|
+
fill: bar.fill,
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
})();
|
|
147
|
+
const gridLines = (() => {
|
|
148
|
+
if (gridLineCount <= 0)
|
|
149
|
+
return [];
|
|
150
|
+
const lines = [];
|
|
151
|
+
for (let i = 1; i <= gridLineCount; i += 1) {
|
|
152
|
+
lines.push(i / (gridLineCount + 1));
|
|
153
|
+
}
|
|
154
|
+
return lines;
|
|
155
|
+
})();
|
|
156
|
+
return (_jsxs("div", { ref: ref, role: "img", "aria-labelledby": titleId, "data-slot": "bar-chart", "data-orientation": orientation, className: cn(barChartVariants({ size }), className), style: { width: W, height: H }, ...props, children: [_jsxs("svg", { width: W, height: H, viewBox: `0 0 ${W} ${H}`, "aria-hidden": children ? "true" : undefined, className: "h-full w-full overflow-visible", children: [_jsx("title", { id: titleId, children: label }), gridLines.length > 0 ? (_jsx("g", { "aria-hidden": "true", "data-slot": "bar-chart-gridlines", className: "pointer-events-none", children: gridLines.map((t) => {
|
|
157
|
+
if (isHorizontal) {
|
|
158
|
+
const x = plotX0 + t * plotW;
|
|
159
|
+
return (_jsx("line", { x1: x, y1: plotY0, x2: x, y2: plotY0 + plotH, strokeWidth: 1, className: cn("stroke-border/60", axisClassName) }, `grid-${t}`));
|
|
160
|
+
}
|
|
161
|
+
const y = plotY0 + plotH - t * plotH;
|
|
162
|
+
return (_jsx("line", { x1: plotX0, y1: y, x2: plotX0 + plotW, y2: y, strokeWidth: 1, className: cn("stroke-border/60", axisClassName) }, `grid-${t}`));
|
|
163
|
+
}) })) : null, showAxis ? (_jsx("line", { "data-slot": "bar-chart-axis", x1: plotX0, y1: isHorizontal ? plotY0 : plotY0 + plotH, x2: isHorizontal ? plotX0 : plotX0 + plotW, y2: plotY0 + plotH, strokeWidth: 1, className: cn("stroke-border", axisClassName) })) : null, resolved.length === 0 ? (_jsx("text", { x: W / 2, y: H / 2, textAnchor: "middle", dominantBaseline: "central", className: "fill-muted-foreground", children: "No data" })) : (resolved.map((r) => {
|
|
164
|
+
const handler = r.bar.onClick ?? onBarClick;
|
|
165
|
+
const isInteractive = typeof handler === "function";
|
|
166
|
+
return (_jsx("rect", { x: r.x, y: r.y, width: Math.max(0, r.barWidth), height: Math.max(0, r.barHeight), rx: cornerRadius, ry: cornerRadius, fill: r.fill, "data-bar-id": r.bar.id, role: isInteractive ? "button" : undefined, tabIndex: isInteractive ? 0 : undefined, "aria-label": r.bar.label
|
|
167
|
+
? `${r.bar.label}: ${r.value}`
|
|
168
|
+
: `${r.bar.id}: ${r.value}`, onClick: isInteractive
|
|
169
|
+
? (event) => {
|
|
170
|
+
handler(r.bar, event);
|
|
171
|
+
}
|
|
172
|
+
: undefined, onKeyDown: isInteractive
|
|
173
|
+
? (event) => {
|
|
174
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
handler(r.bar, event);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
: undefined, className: cn("transition-opacity", r.fillClass, isInteractive &&
|
|
180
|
+
"cursor-pointer hover:opacity-80 focus:outline-none focus-visible:opacity-80", r.bar.className) }, r.bar.id));
|
|
181
|
+
})), showCategoryLabels && resolved.length > 0 ? (_jsx("g", { "aria-hidden": "true", "data-slot": "bar-chart-category-labels", className: "pointer-events-none select-none", children: resolved.map((r) => {
|
|
182
|
+
const text = r.bar.label ?? r.bar.id;
|
|
183
|
+
return (_jsx("text", { x: r.categoryX, y: r.categoryY, textAnchor: isHorizontal ? "end" : "middle", dominantBaseline: isHorizontal ? "central" : "auto", className: cn("fill-muted-foreground", categoryLabelClassName), children: text }, `${r.bar.id}-cat`));
|
|
184
|
+
}) })) : null, showValueLabels && resolved.length > 0 ? (_jsx("g", { "aria-hidden": "true", "data-slot": "bar-chart-value-labels", className: "pointer-events-none select-none", children: resolved.map((r, index) => {
|
|
185
|
+
const fraction = r.value / scaleMax;
|
|
186
|
+
const text = valueLabelFormatter
|
|
187
|
+
? valueLabelFormatter({
|
|
188
|
+
bar: r.bar,
|
|
189
|
+
value: r.value,
|
|
190
|
+
fraction,
|
|
191
|
+
percentage: fraction * 100,
|
|
192
|
+
index,
|
|
193
|
+
})
|
|
194
|
+
: String(r.value);
|
|
195
|
+
if (text === null || text === "")
|
|
196
|
+
return null;
|
|
197
|
+
return (_jsx("text", { x: r.valueX, y: r.valueY, textAnchor: isHorizontal ? "start" : "middle", dominantBaseline: isHorizontal ? "central" : "auto", className: cn("fill-foreground font-medium", valueLabelClassName), children: text }, `${r.bar.id}-val`));
|
|
198
|
+
}) })) : null] }), children ? (_jsx("div", { className: cn("pointer-events-none absolute inset-0 flex items-center justify-center text-center", overlayClassName), children: children })) : null] }));
|
|
199
|
+
}
|
|
200
|
+
BarChart.displayName = "BarChart";
|
|
201
|
+
export { BarChart };
|
|
202
|
+
//# sourceMappingURL=bar-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bar-chart.js","sourceRoot":"","sources":["../../../../src/components/ui/bar-chart/bar-chart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AASlE,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACuB,CAAC;AAG9B,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,UAAU;IACV,YAAY;CACe,CAAC;AAG9B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS;IACT,SAAS;IACT,UAAU;IACV,SAAS;IACT,aAAa;IACb,OAAO;CACoB,CAAC;AAG9B;+BAC+B;AAC/B,MAAM,cAAc,GAGhB;IACF,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC/B,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;CAChC,CAAC;AAEF,MAAM,gBAAgB,GAAuC;IAC3D,OAAO,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QAAQ,GAAG,GAAG;oCAC1B,KAAK;iCACN,CAAC;gCACJ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;4BACpB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;gCAAE,OAAO,IAAI,CAAC;4BAC9C,OAAO,CACL,eAEE,CAAC,EAAE,CAAC,CAAC,MAAM,EACX,CAAC,EAAE,CAAC,CAAC,MAAM,EACX,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAC7C,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EACnD,SAAS,EAAE,EAAE,CACX,6BAA6B,EAC7B,mBAAmB,CACpB,YAEA,IAAI,IAVA,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAWjB,CACR,CAAC;wBACJ,CAAC,CAAC,GACA,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,QAAQ,CAAC,CAAC,CAAC,CACV,cACE,SAAS,EAAE,EAAE,CACX,mFAAmF,EACnF,gBAAgB,CACjB,YAEA,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AACD,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/bar-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -154,5 +154,9 @@ export * from "./calendar-heatmap";
|
|
|
154
154
|
export type * from "./calendar-heatmap";
|
|
155
155
|
export * from "./pie-chart";
|
|
156
156
|
export type * from "./pie-chart";
|
|
157
|
+
export * from "./bar-chart";
|
|
158
|
+
export type * from "./bar-chart";
|
|
157
159
|
export * from "./comparison-slider";
|
|
158
160
|
export type * from "./comparison-slider";
|
|
161
|
+
export * from "./theme-selector";
|
|
162
|
+
export type * from "./theme-selector";
|
|
@@ -76,5 +76,7 @@ export * from "./aspect-ratio";
|
|
|
76
76
|
export * from "./color-swatch";
|
|
77
77
|
export * from "./calendar-heatmap";
|
|
78
78
|
export * from "./pie-chart";
|
|
79
|
+
export * from "./bar-chart";
|
|
79
80
|
export * from "./comparison-slider";
|
|
81
|
+
export * from "./theme-selector";
|
|
80
82
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAG5B,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAGlC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,aAAa,CAAC;AAG5B,cAAc,kCAAkC,CAAC;AAGjD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,Y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,IAAI,OAAO,EACxB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement } from "react";
|
|
2
|
+
export declare const themeSelectorOptionIds: readonly ["light", "system", "dark"];
|
|
3
|
+
export type ThemeSelectorOptionId = (typeof themeSelectorOptionIds)[number];
|
|
4
|
+
export declare const themeSelectorSizeIds: readonly ["sm", "default", "lg"];
|
|
5
|
+
export type ThemeSelectorSizeId = (typeof themeSelectorSizeIds)[number];
|
|
6
|
+
export interface ThemeSelectorProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
7
|
+
/** Size of the underlying SegmentedControl. */
|
|
8
|
+
size?: ThemeSelectorSizeId;
|
|
9
|
+
/** Render only the icons, hiding the text labels. */
|
|
10
|
+
iconOnly?: boolean;
|
|
11
|
+
/** Disable interaction with every option. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A brightness theme switcher driven by {@link useBrightnessTheme}, built on
|
|
16
|
+
* top of the {@link SegmentedControl} component.
|
|
17
|
+
*
|
|
18
|
+
* Must be rendered inside a `<BrightnessThemeProvider />`. The theme-aware UI
|
|
19
|
+
* is wrapped in a `<Suspense>` boundary that renders an inert, unselected
|
|
20
|
+
* SegmentedControl fallback until the client has hydrated — this avoids the
|
|
21
|
+
* next-themes server/client hydration mismatch without any mounted-flag state.
|
|
22
|
+
*
|
|
23
|
+
* @see BrightnessThemeProvider
|
|
24
|
+
* @see useBrightnessTheme
|
|
25
|
+
* @see SegmentedControl
|
|
26
|
+
*/
|
|
27
|
+
export declare function ThemeSelector({ className, size, iconOnly, disabled, ...rest }: ThemeSelectorProps): ReactElement;
|
|
28
|
+
export declare namespace ThemeSelector {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export default ThemeSelector;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
4
|
+
import { Suspense, use, } from "react";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
import { SegmentedControl, SegmentedControlItem, } from "../../ui/segmented-control";
|
|
7
|
+
import { useBrightnessTheme } from "../../../providers/brightness-theme";
|
|
8
|
+
export const themeSelectorOptionIds = [
|
|
9
|
+
"light",
|
|
10
|
+
"system",
|
|
11
|
+
"dark",
|
|
12
|
+
];
|
|
13
|
+
export const themeSelectorSizeIds = [
|
|
14
|
+
"sm",
|
|
15
|
+
"default",
|
|
16
|
+
"lg",
|
|
17
|
+
];
|
|
18
|
+
const themeOptions = [
|
|
19
|
+
{ id: "light", label: "Light", icon: Sun },
|
|
20
|
+
{ id: "system", label: "System", icon: Monitor },
|
|
21
|
+
{ id: "dark", label: "Dark", icon: Moon },
|
|
22
|
+
];
|
|
23
|
+
const iconSizeBySize = {
|
|
24
|
+
sm: "h-3.5 w-3.5",
|
|
25
|
+
default: "h-4 w-4",
|
|
26
|
+
lg: "h-[1.125rem] w-[1.125rem]",
|
|
27
|
+
};
|
|
28
|
+
function renderThemeItems(size, iconOnly) {
|
|
29
|
+
return themeOptions.map((option) => {
|
|
30
|
+
const Icon = option.icon;
|
|
31
|
+
return (_jsxs(SegmentedControlItem, { value: option.id, "aria-label": option.label, children: [_jsx(Icon, { className: cn(iconSizeBySize[size]), "aria-hidden": "true" }), iconOnly ? null : _jsx("span", { children: option.label })] }, option.id));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A promise used to suspend {@link ThemeSelector} until the app has hydrated on
|
|
36
|
+
* the client. On the server it never settles, so React renders the Suspense
|
|
37
|
+
* fallback into the SSR output (and the client hydrates that same fallback,
|
|
38
|
+
* avoiding the next-themes server/client mismatch). On the client it resolves
|
|
39
|
+
* once, on the macrotask after the first render, after which the real
|
|
40
|
+
* theme-aware UI takes over. The single cached promise is shared by every
|
|
41
|
+
* instance so the gate only opens once per page.
|
|
42
|
+
*/
|
|
43
|
+
let hydrationPromise = null;
|
|
44
|
+
function getHydrationPromise() {
|
|
45
|
+
if (typeof window === "undefined") {
|
|
46
|
+
return new Promise(() => { });
|
|
47
|
+
}
|
|
48
|
+
if (!hydrationPromise) {
|
|
49
|
+
hydrationPromise = new Promise((resolve) => {
|
|
50
|
+
setTimeout(resolve);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return hydrationPromise;
|
|
54
|
+
}
|
|
55
|
+
function ThemeSelectorContent({ size, iconOnly, disabled, className, rest, }) {
|
|
56
|
+
use(getHydrationPromise());
|
|
57
|
+
const { theme, setTheme } = useBrightnessTheme();
|
|
58
|
+
return (_jsx(SegmentedControl, { value: theme ?? "", onValueChange: setTheme, variant: "outline", size: size, disabled: disabled, "aria-label": "Color theme", className: className, ...rest, children: renderThemeItems(size, iconOnly) }));
|
|
59
|
+
}
|
|
60
|
+
function ThemeSelectorFallback({ size, iconOnly, className, }) {
|
|
61
|
+
return (_jsx(SegmentedControl, { value: "", variant: "outline", size: size, disabled: true, "aria-hidden": "true", className: className, children: renderThemeItems(size, iconOnly) }));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A brightness theme switcher driven by {@link useBrightnessTheme}, built on
|
|
65
|
+
* top of the {@link SegmentedControl} component.
|
|
66
|
+
*
|
|
67
|
+
* Must be rendered inside a `<BrightnessThemeProvider />`. The theme-aware UI
|
|
68
|
+
* is wrapped in a `<Suspense>` boundary that renders an inert, unselected
|
|
69
|
+
* SegmentedControl fallback until the client has hydrated — this avoids the
|
|
70
|
+
* next-themes server/client hydration mismatch without any mounted-flag state.
|
|
71
|
+
*
|
|
72
|
+
* @see BrightnessThemeProvider
|
|
73
|
+
* @see useBrightnessTheme
|
|
74
|
+
* @see SegmentedControl
|
|
75
|
+
*/
|
|
76
|
+
export function ThemeSelector({ className, size = "default", iconOnly = false, disabled = false, ...rest }) {
|
|
77
|
+
return (_jsx(Suspense, { fallback: _jsx(ThemeSelectorFallback, { size: size, iconOnly: iconOnly, className: className }), children: _jsx(ThemeSelectorContent, { size: size, iconOnly: iconOnly, disabled: disabled, className: className, rest: rest }) }));
|
|
78
|
+
}
|
|
79
|
+
ThemeSelector.displayName = "ThemeSelector";
|
|
80
|
+
export default ThemeSelector;
|
|
81
|
+
//# sourceMappingURL=theme-selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-selector.js","sourceRoot":"","sources":["../../../../src/components/ui/theme-selector/theme-selector.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,GAAG,GAIJ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GAErB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO;IACP,QAAQ;IACR,MAAM;CAC8B,CAAC;AAGvC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI;IACJ,SAAS;IACT,IAAI;CACgD,CAAC;AASvD,MAAM,YAAY,GAAmC;IACnD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE;IAC1C,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IAChD,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;CACjC,CAAC;AAEX,MAAM,cAAc,GAA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|
+
import { ThemeProvider as NextThemesProvider, useTheme as useBrightnessTheme, type UseThemeProps as UseBrightnessThemeReturn } from "next-themes";
|
|
2
2
|
export type BrightnessThemeProviderProps = Parameters<typeof NextThemesProvider>[0];
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
@@ -9,3 +9,4 @@ export type BrightnessThemeProviderProps = Parameters<typeof NextThemesProvider>
|
|
|
9
9
|
export declare function BrightnessThemeProvider({ children, ...props }: BrightnessThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default BrightnessThemeProvider;
|
|
11
11
|
export { useBrightnessTheme };
|
|
12
|
+
export type { UseBrightnessThemeReturn };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brightness-theme.js","sourceRoot":"","sources":["../../../src/providers/brightness-theme/brightness-theme.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,aAAa,IAAI,kBAAkB,EACnC,QAAQ,IAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"brightness-theme.js","sourceRoot":"","sources":["../../../src/providers/brightness-theme/brightness-theme.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,aAAa,IAAI,kBAAkB,EACnC,QAAQ,IAAI,kBAAkB,GAE/B,MAAM,aAAa,CAAC;AAMrB;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACtC,QAAQ,EACR,GAAG,KAAK,EACqB;IAC7B,OAAO,KAAC,kBAAkB,OAAK,KAAK,YAAG,QAAQ,GAAsB,CAAC;AACxE,CAAC;AAED,eAAe,uBAAuB,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BrightnessThemeProvider, BrightnessThemeProvider as default, useBrightnessTheme, } from "./brightness-theme";
|
|
2
|
-
export type { BrightnessThemeProviderProps } from "./brightness-theme";
|
|
2
|
+
export type { BrightnessThemeProviderProps, UseBrightnessThemeReturn, } from "./brightness-theme";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { LazyFramerMotionProvider } from "./lazy_framer";
|
|
2
2
|
export type { LazyFramerMotionProviderProps } from "./lazy_framer";
|
|
3
|
-
export { BrightnessThemeProvider } from "./brightness-theme";
|
|
4
|
-
export type { BrightnessThemeProviderProps } from "./brightness-theme";
|
|
3
|
+
export { BrightnessThemeProvider, useBrightnessTheme } from "./brightness-theme";
|
|
4
|
+
export type { BrightnessThemeProviderProps, UseBrightnessThemeReturn, } from "./brightness-theme";
|
package/dist/providers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|