lucent-ui 0.39.1 → 0.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.cjs +42 -42
- package/dist/index.d.ts +137 -1
- package/dist/index.js +3193 -2446
- package/dist-server/server/http.js +69 -0
- package/dist-server/server/logger.js +45 -8
- package/dist-server/server/pattern-registry.js +4 -0
- package/dist-server/src/components/charts/AreaChart/AreaChart.manifest.js +35 -0
- package/dist-server/src/components/charts/BarChart/BarChart.manifest.js +32 -0
- package/dist-server/src/components/charts/DonutChart/DonutChart.manifest.js +29 -0
- package/dist-server/src/components/charts/SparkLine/SparkLine.manifest.js +30 -0
- package/dist-server/src/manifest/patterns/activity-feed.pattern.js +82 -0
- package/dist-server/src/manifest/patterns/metrics-dashboard.pattern.js +140 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,47 @@ export declare interface AlertProps {
|
|
|
80
80
|
|
|
81
81
|
export declare type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
82
82
|
|
|
83
|
+
export declare function AreaChart({ data, series, width, height, color, gridLines, showDots, dotRadius, smooth, fillOpacity, formatValue, xLabelCount, ariaLabel, style, }: AreaChartProps): JSX_2.Element | null;
|
|
84
|
+
|
|
85
|
+
export declare interface AreaChartDataPoint {
|
|
86
|
+
label: string;
|
|
87
|
+
value: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare const AreaChartManifest: ComponentManifest;
|
|
91
|
+
|
|
92
|
+
export declare interface AreaChartProps {
|
|
93
|
+
/** Single-series shorthand. */
|
|
94
|
+
data?: AreaChartDataPoint[];
|
|
95
|
+
/** Multi-series data. */
|
|
96
|
+
series?: AreaChartSeries[];
|
|
97
|
+
width?: number | string;
|
|
98
|
+
height?: number;
|
|
99
|
+
/** Color for single-series mode. */
|
|
100
|
+
color?: ChartColorVariant | string;
|
|
101
|
+
gridLines?: boolean;
|
|
102
|
+
/** Show dots at data points. */
|
|
103
|
+
showDots?: boolean;
|
|
104
|
+
dotRadius?: number;
|
|
105
|
+
/** Use smooth curves. */
|
|
106
|
+
smooth?: boolean;
|
|
107
|
+
/** Area fill opacity (0–1). */
|
|
108
|
+
fillOpacity?: number;
|
|
109
|
+
/** Custom y-axis value formatter. */
|
|
110
|
+
formatValue?: (value: number) => string;
|
|
111
|
+
/** Max number of x-axis labels to display. */
|
|
112
|
+
xLabelCount?: number;
|
|
113
|
+
ariaLabel?: string;
|
|
114
|
+
style?: CSSProperties;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export declare interface AreaChartSeries {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
data: AreaChartDataPoint[];
|
|
121
|
+
color?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
83
124
|
/**
|
|
84
125
|
* Asserts a manifest is valid. Throws a descriptive error if not.
|
|
85
126
|
* Use in tests or at component module load time.
|
|
@@ -115,6 +156,36 @@ export declare type BadgeSize = 'sm' | 'md';
|
|
|
115
156
|
|
|
116
157
|
export declare type BadgeVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
|
|
117
158
|
|
|
159
|
+
export declare function BarChart({ data, width, height, color, gridLines, showValues, formatValue, barGap, barRadius, ariaLabel, style, }: BarChartProps): JSX_2.Element | null;
|
|
160
|
+
|
|
161
|
+
export declare interface BarChartDataPoint {
|
|
162
|
+
label: string;
|
|
163
|
+
value: number;
|
|
164
|
+
color?: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export declare const BarChartManifest: ComponentManifest;
|
|
168
|
+
|
|
169
|
+
export declare interface BarChartProps {
|
|
170
|
+
data: BarChartDataPoint[];
|
|
171
|
+
width?: number | string;
|
|
172
|
+
height?: number;
|
|
173
|
+
/** Bar color variant or CSS color. Per-point color overrides this. */
|
|
174
|
+
color?: ChartColorVariant | string;
|
|
175
|
+
/** Show horizontal grid lines. */
|
|
176
|
+
gridLines?: boolean;
|
|
177
|
+
/** Show value labels above bars. */
|
|
178
|
+
showValues?: boolean;
|
|
179
|
+
/** Custom value formatter for y-axis and value labels. */
|
|
180
|
+
formatValue?: (value: number) => string;
|
|
181
|
+
/** Gap between bars as fraction of slot width (0–1). */
|
|
182
|
+
barGap?: number;
|
|
183
|
+
/** Corner radius on bar tops. */
|
|
184
|
+
barRadius?: number;
|
|
185
|
+
ariaLabel?: string;
|
|
186
|
+
style?: CSSProperties;
|
|
187
|
+
}
|
|
188
|
+
|
|
118
189
|
/**
|
|
119
190
|
* Modern Bento — the product grid standard.
|
|
120
191
|
* Layered natural shadows, balanced roundness, consistent spacing.
|
|
@@ -323,6 +394,16 @@ export declare type CardStatus = 'success' | 'warning' | 'danger' | 'info';
|
|
|
323
394
|
|
|
324
395
|
export declare type CardVariant = 'ghost' | 'outline' | 'filled' | 'elevated' | 'combo';
|
|
325
396
|
|
|
397
|
+
declare const chartColors: {
|
|
398
|
+
readonly accent: "var(--lucent-accent-default)";
|
|
399
|
+
readonly success: "var(--lucent-success-default)";
|
|
400
|
+
readonly warning: "var(--lucent-warning-default)";
|
|
401
|
+
readonly danger: "var(--lucent-danger-default)";
|
|
402
|
+
readonly info: "var(--lucent-info-default)";
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
declare type ChartColorVariant = keyof typeof chartColors;
|
|
406
|
+
|
|
326
407
|
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
327
408
|
|
|
328
409
|
export declare const CheckboxManifest: ComponentManifest;
|
|
@@ -757,6 +838,33 @@ export declare interface DividerProps {
|
|
|
757
838
|
style?: CSSProperties;
|
|
758
839
|
}
|
|
759
840
|
|
|
841
|
+
export declare function DonutChart({ data, size, thickness, segmentGap, centerLabel, startAngle, ariaLabel, style, }: DonutChartProps): JSX_2.Element | null;
|
|
842
|
+
|
|
843
|
+
export declare const DonutChartManifest: ComponentManifest;
|
|
844
|
+
|
|
845
|
+
export declare interface DonutChartProps {
|
|
846
|
+
data: DonutChartSegment[];
|
|
847
|
+
/** Overall pixel size (square). */
|
|
848
|
+
size?: number;
|
|
849
|
+
/** Ring thickness as fraction of radius (0–1). */
|
|
850
|
+
thickness?: number;
|
|
851
|
+
/** Gap between segments in degrees. */
|
|
852
|
+
segmentGap?: number;
|
|
853
|
+
/** Content to display in the center of the ring. */
|
|
854
|
+
centerLabel?: ReactNode;
|
|
855
|
+
/** Starting angle in degrees (0 = 12 o'clock). */
|
|
856
|
+
startAngle?: number;
|
|
857
|
+
ariaLabel?: string;
|
|
858
|
+
style?: CSSProperties;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
export declare interface DonutChartSegment {
|
|
862
|
+
label: string;
|
|
863
|
+
/** Absolute value (chart computes proportions). */
|
|
864
|
+
value: number;
|
|
865
|
+
color?: string;
|
|
866
|
+
}
|
|
867
|
+
|
|
760
868
|
/**
|
|
761
869
|
* Elevated — light mode uses stronger drop shadows for clear lift.
|
|
762
870
|
* Dark mode shifts to "inset glow" — light radiating from inside
|
|
@@ -1707,6 +1815,32 @@ declare interface SpacingTokens {
|
|
|
1707
1815
|
|
|
1708
1816
|
export declare const spaciousDensity: DensityPreset;
|
|
1709
1817
|
|
|
1818
|
+
export declare function SparkLine({ data, width, height, color, filled, strokeWidth, smooth, formatTooltip, ariaLabel, style, }: SparkLineProps): JSX_2.Element | null;
|
|
1819
|
+
|
|
1820
|
+
export declare const SparkLineManifest: ComponentManifest;
|
|
1821
|
+
|
|
1822
|
+
export declare interface SparkLineProps {
|
|
1823
|
+
/** Array of numeric values representing the trend. */
|
|
1824
|
+
data: number[];
|
|
1825
|
+
/** Pixel width. Defaults to '100%'. */
|
|
1826
|
+
width?: number | string;
|
|
1827
|
+
/** Pixel height. Defaults to 32. */
|
|
1828
|
+
height?: number;
|
|
1829
|
+
/** Color of the line. Accepts a variant name or any CSS color string. */
|
|
1830
|
+
color?: ChartColorVariant | string;
|
|
1831
|
+
/** Show a translucent area fill below the line. */
|
|
1832
|
+
filled?: boolean;
|
|
1833
|
+
/** Line stroke width in SVG units. */
|
|
1834
|
+
strokeWidth?: number;
|
|
1835
|
+
/** Use smooth curves (monotone-x). Defaults to true. */
|
|
1836
|
+
smooth?: boolean;
|
|
1837
|
+
/** Custom tooltip formatter. */
|
|
1838
|
+
formatTooltip?: (value: number, index: number) => string;
|
|
1839
|
+
/** Accessible label for the chart SVG. */
|
|
1840
|
+
ariaLabel?: string;
|
|
1841
|
+
style?: CSSProperties;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1710
1844
|
export declare function Spinner({ size, label, color }: SpinnerProps): JSX_2.Element;
|
|
1711
1845
|
|
|
1712
1846
|
export declare const SpinnerManifest: ComponentManifest;
|
|
@@ -2085,7 +2219,7 @@ export declare interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputE
|
|
|
2085
2219
|
|
|
2086
2220
|
export declare type ToggleSize = 'sm' | 'md' | 'lg';
|
|
2087
2221
|
|
|
2088
|
-
export declare function Tooltip({ content, children, placement, delay }: TooltipProps): JSX_2.Element;
|
|
2222
|
+
export declare function Tooltip({ content, children, placement, delay, open }: TooltipProps): JSX_2.Element;
|
|
2089
2223
|
|
|
2090
2224
|
export declare const TooltipManifest: ComponentManifest;
|
|
2091
2225
|
|
|
@@ -2097,6 +2231,8 @@ export declare interface TooltipProps {
|
|
|
2097
2231
|
placement?: TooltipPlacement;
|
|
2098
2232
|
/** Delay in ms before the tooltip appears. Default: 300 */
|
|
2099
2233
|
delay?: number;
|
|
2234
|
+
/** Controlled visibility. When provided, overrides hover behavior. */
|
|
2235
|
+
open?: boolean;
|
|
2100
2236
|
}
|
|
2101
2237
|
|
|
2102
2238
|
declare interface TypographyTokens {
|