@customafk/lunas-ui 0.2.61 → 0.2.63

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.
@@ -0,0 +1,349 @@
1
+ //#region packages/components/features/charts/types.d.ts
2
+ /** Trend direction shared with the `Statistic` display component. */
3
+ type ChartTrend = 'up' | 'down' | 'neutral';
4
+ type TimeSeriesPoint = {
5
+ date: string | Date;
6
+ value: number; /** Same-bucket value from the comparison period (enables the comparison series). */
7
+ previousValue?: number;
8
+ };
9
+ type ChartSeries = {
10
+ key: string;
11
+ label: string;
12
+ color?: string;
13
+ };
14
+ type NamedValue = {
15
+ name: string;
16
+ value: number;
17
+ };
18
+ /** Props shared by every prebuilt chart. */
19
+ type BaseChartProps = {
20
+ className?: string; /** Enable the recharts enter animation. Disable for deterministic tests. Defaults to `true`. */
21
+ animate?: boolean; /** Fixed height in px; otherwise the container's aspect-video ratio applies. */
22
+ height?: number;
23
+ };
24
+ //#endregion
25
+ //#region packages/components/features/charts/components/conversion-funnel-chart.d.ts
26
+ type FunnelStage = NamedValue & {
27
+ /** Config key; derived from `name` when omitted. */key?: string;
28
+ color?: string;
29
+ };
30
+ type ConversionFunnelChartProps = BaseChartProps & {
31
+ /** Funnel stages ordered top (widest) to bottom. */data: FunnelStage[]; /** Appends each stage's percentage of the first stage. Defaults to `true`. */
32
+ showConversionRates?: boolean;
33
+ valueFormatter?: (value: number) => string;
34
+ };
35
+ /**
36
+ * A conversion funnel for the ecommerce purchase journey — sessions, product views, carts,
37
+ * checkouts, purchases — with per-stage conversion rates against the first stage.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * import { ConversionFunnelChart } from '@customafk/lunas-ui/features/charts';
42
+ *
43
+ * <ConversionFunnelChart
44
+ * data={[
45
+ * { name: 'Sessions', value: 50000 },
46
+ * { name: 'Product views', value: 32000 },
47
+ * { name: 'Added to cart', value: 8400 },
48
+ * { name: 'Purchased', value: 2900 },
49
+ * ]}
50
+ * />
51
+ * ```
52
+ */
53
+ declare const ConversionFunnelChart: ({
54
+ data,
55
+ showConversionRates,
56
+ valueFormatter,
57
+ className,
58
+ animate,
59
+ height
60
+ }: ConversionFunnelChartProps) => import("react").JSX.Element;
61
+ //#endregion
62
+ //#region packages/components/features/charts/components/donut-chart.d.ts
63
+ type DonutChartSegment = NamedValue & {
64
+ /** Config key; derived from `name` when omitted. */key?: string;
65
+ color?: string;
66
+ };
67
+ type DonutChartProps = BaseChartProps & {
68
+ data: DonutChartSegment[]; /** Text under the center total, e.g. `'Total sales'`. */
69
+ centerLabel?: string; /** Formats the center total. Defaults to compact notation. */
70
+ centerValueFormatter?: (total: number) => string; /** Overrides the computed segment sum shown in the center. */
71
+ totalValue?: number;
72
+ showLegend?: boolean;
73
+ showCenterTotal?: boolean;
74
+ };
75
+ /**
76
+ * A donut breakdown chart with a center total — category sales, traffic sources, payment methods.
77
+ *
78
+ * @example
79
+ * ```tsx
80
+ * import { DonutChart } from '@customafk/lunas-ui/features/charts';
81
+ *
82
+ * <DonutChart
83
+ * data={[
84
+ * { name: 'Fashion', value: 12400 },
85
+ * { name: 'Electronics', value: 8200 },
86
+ * ]}
87
+ * centerLabel="Total sales"
88
+ * />
89
+ * ```
90
+ */
91
+ declare const DonutChart: ({
92
+ data,
93
+ centerLabel,
94
+ centerValueFormatter,
95
+ totalValue,
96
+ showLegend,
97
+ showCenterTotal,
98
+ className,
99
+ animate,
100
+ height
101
+ }: DonutChartProps) => import("react").JSX.Element;
102
+ //#endregion
103
+ //#region packages/components/features/charts/components/orders-bar-chart.d.ts
104
+ type OrdersBarChartProps = BaseChartProps & {
105
+ data: Array<{
106
+ date: string | Date;
107
+ } & Record<string, unknown>>; /** Simple mode: the key holding each period's count. Defaults to `'orders'`. */
108
+ dataKey?: string; /** Series label in simple mode. Defaults to `'Orders'`. */
109
+ label?: string; /** Stacked mode: one series per order status; each `key` indexes into the data rows. */
110
+ statuses?: ChartSeries[];
111
+ color?: string;
112
+ valueFormatter?: (value: number) => string;
113
+ dateFormatter?: (date: string | Date) => string; /** Defaults to `true` when `statuses` is provided. */
114
+ showLegend?: boolean;
115
+ showGrid?: boolean;
116
+ };
117
+ /**
118
+ * A bar chart for order volume per period — a single series by default, or stacked by order
119
+ * status when `statuses` is provided.
120
+ *
121
+ * @example
122
+ * ```tsx
123
+ * import { OrdersBarChart } from '@customafk/lunas-ui/features/charts';
124
+ *
125
+ * <OrdersBarChart
126
+ * data={[{ date: '2026-06-01', completed: 32, pending: 6, cancelled: 2 }]}
127
+ * statuses={[
128
+ * { key: 'completed', label: 'Completed' },
129
+ * { key: 'pending', label: 'Pending' },
130
+ * { key: 'cancelled', label: 'Cancelled' },
131
+ * ]}
132
+ * />
133
+ * ```
134
+ */
135
+ declare const OrdersBarChart: ({
136
+ data,
137
+ dataKey,
138
+ label,
139
+ statuses,
140
+ color,
141
+ valueFormatter,
142
+ dateFormatter,
143
+ showLegend,
144
+ showGrid,
145
+ className,
146
+ animate,
147
+ height
148
+ }: OrdersBarChartProps) => import("react").JSX.Element;
149
+ //#endregion
150
+ //#region packages/components/features/charts/components/revenue-area-chart.d.ts
151
+ type RevenueAreaChartProps = BaseChartProps & {
152
+ data: TimeSeriesPoint[]; /** Series label. Defaults to `'Revenue'`. */
153
+ label?: string; /** Comparison series label. Defaults to `'Previous period'`. */
154
+ comparisonLabel?: string; /** Renders `previousValue` as a second, muted area series. */
155
+ showComparison?: boolean;
156
+ color?: string;
157
+ comparisonColor?: string; /** Formats tooltip and Y-axis values. Defaults to compact currency. */
158
+ valueFormatter?: (value: number) => string;
159
+ dateFormatter?: (date: string | Date) => string; /** Defaults to `showComparison`. */
160
+ showLegend?: boolean;
161
+ showGrid?: boolean;
162
+ };
163
+ /**
164
+ * A gradient area chart for revenue (or any currency metric) over time, with an optional
165
+ * previous-period comparison series.
166
+ *
167
+ * @example
168
+ * ```tsx
169
+ * import { RevenueAreaChart } from '@customafk/lunas-ui/features/charts';
170
+ *
171
+ * <RevenueAreaChart
172
+ * data={[
173
+ * { date: '2026-06-01', value: 4200, previousValue: 3800 },
174
+ * { date: '2026-06-02', value: 5100, previousValue: 4300 },
175
+ * ]}
176
+ * showComparison
177
+ * />
178
+ * ```
179
+ */
180
+ declare const RevenueAreaChart: ({
181
+ data,
182
+ label,
183
+ comparisonLabel,
184
+ showComparison,
185
+ color,
186
+ comparisonColor,
187
+ valueFormatter,
188
+ dateFormatter,
189
+ showLegend,
190
+ showGrid,
191
+ className,
192
+ animate,
193
+ height
194
+ }: RevenueAreaChartProps) => import("react").JSX.Element;
195
+ //#endregion
196
+ //#region packages/components/features/charts/components/revenue-orders-composed-chart.d.ts
197
+ type RevenueOrdersPoint = {
198
+ date: string | Date;
199
+ revenue: number;
200
+ orders: number;
201
+ };
202
+ type RevenueOrdersComposedChartProps = BaseChartProps & {
203
+ data: RevenueOrdersPoint[];
204
+ revenueLabel?: string;
205
+ ordersLabel?: string;
206
+ revenueColor?: string;
207
+ ordersColor?: string; /** Formats the left (revenue) axis and tooltip values. Defaults to compact currency. */
208
+ revenueFormatter?: (value: number) => string; /** Formats the right (orders) axis and tooltip values. */
209
+ ordersFormatter?: (value: number) => string;
210
+ dateFormatter?: (date: string | Date) => string;
211
+ showLegend?: boolean;
212
+ showGrid?: boolean;
213
+ };
214
+ /**
215
+ * A dual-axis chart combining revenue bars (left axis, currency) with an orders line
216
+ * (right axis, count) to correlate the two metrics per period.
217
+ *
218
+ * @example
219
+ * ```tsx
220
+ * import { RevenueOrdersComposedChart } from '@customafk/lunas-ui/features/charts';
221
+ *
222
+ * <RevenueOrdersComposedChart
223
+ * data={[{ date: '2026-06-01', revenue: 12400, orders: 87 }]}
224
+ * />
225
+ * ```
226
+ */
227
+ declare const RevenueOrdersComposedChart: ({
228
+ data,
229
+ revenueLabel,
230
+ ordersLabel,
231
+ revenueColor,
232
+ ordersColor,
233
+ revenueFormatter,
234
+ ordersFormatter,
235
+ dateFormatter,
236
+ showLegend,
237
+ showGrid,
238
+ className,
239
+ animate,
240
+ height
241
+ }: RevenueOrdersComposedChartProps) => import("react").JSX.Element;
242
+ //#endregion
243
+ //#region packages/components/features/charts/components/sales-target-radial-chart.d.ts
244
+ type SalesTargetRadialChartProps = BaseChartProps & {
245
+ /** Current progress value, e.g. revenue to date. */value: number; /** The goal the value is measured against. */
246
+ target: number; /** Text under the center figure. Defaults to `'Target'`. */
247
+ label?: string; /** Formats the center figure. Defaults to percent-of-target. */
248
+ valueFormatter?: (value: number, target: number) => string;
249
+ color?: string;
250
+ };
251
+ /**
252
+ * A radial gauge showing progress toward a sales target with the completion figure in the center.
253
+ *
254
+ * @example
255
+ * ```tsx
256
+ * import { SalesTargetRadialChart } from '@customafk/lunas-ui/features/charts';
257
+ *
258
+ * <SalesTargetRadialChart value={65_000} target={100_000} label="Monthly target" />
259
+ * ```
260
+ */
261
+ declare const SalesTargetRadialChart: ({
262
+ value,
263
+ target,
264
+ label,
265
+ valueFormatter,
266
+ color,
267
+ className,
268
+ animate,
269
+ height
270
+ }: SalesTargetRadialChartProps) => import("react").JSX.Element;
271
+ //#endregion
272
+ //#region packages/components/features/charts/components/sparkline-chart.d.ts
273
+ type SparklineChartProps = {
274
+ data: number[] | Array<{
275
+ value: number;
276
+ }>; /** Render style. Defaults to `'area'`. */
277
+ type?: 'line' | 'area'; /** Colors the series like the `Statistic` trend prop. Defaults to `'neutral'`. */
278
+ trend?: ChartTrend; /** Explicit series color; overrides `trend`. */
279
+ color?: string; /** Fixed height in px. Defaults to `40`. */
280
+ height?: number;
281
+ animate?: boolean;
282
+ className?: string;
283
+ };
284
+ /**
285
+ * A tiny, axis-less trend chart for KPI cards; pairs with the `Statistic` display component.
286
+ *
287
+ * @example
288
+ * ```tsx
289
+ * import { SparklineChart } from '@customafk/lunas-ui/features/charts';
290
+ *
291
+ * <SparklineChart data={[12, 18, 14, 26, 22, 31]} trend="up" />
292
+ * ```
293
+ */
294
+ declare const SparklineChart: ({
295
+ data,
296
+ type,
297
+ trend,
298
+ color,
299
+ height,
300
+ animate,
301
+ className
302
+ }: SparklineChartProps) => import("react").JSX.Element;
303
+ //#endregion
304
+ //#region packages/components/features/charts/components/top-products-bar-chart.d.ts
305
+ type TopProductsBarChartProps = BaseChartProps & {
306
+ data: NamedValue[]; /** Series label. Defaults to `'Sales'`. */
307
+ label?: string; /** Number of items shown after sorting descending. Defaults to `8`. */
308
+ maxItems?: number;
309
+ color?: string;
310
+ valueFormatter?: (value: number) => string; /** Value labels at the end of each bar. Defaults to `true`. */
311
+ showValueLabels?: boolean;
312
+ };
313
+ /**
314
+ * A horizontal bar ranking chart — top products, best categories, top customers.
315
+ *
316
+ * @example
317
+ * ```tsx
318
+ * import { TopProductsBarChart } from '@customafk/lunas-ui/features/charts';
319
+ *
320
+ * <TopProductsBarChart
321
+ * data={[
322
+ * { name: 'Wireless Earbuds', value: 1245 },
323
+ * { name: 'Smart Watch', value: 986 },
324
+ * ]}
325
+ * />
326
+ * ```
327
+ */
328
+ declare const TopProductsBarChart: ({
329
+ data,
330
+ label,
331
+ maxItems,
332
+ color,
333
+ valueFormatter,
334
+ showValueLabels,
335
+ className,
336
+ animate,
337
+ height
338
+ }: TopProductsBarChartProps) => import("react").JSX.Element;
339
+ //#endregion
340
+ //#region packages/components/features/charts/utils.d.ts
341
+ /** Cycles through the eight `--chart-N` theme palette variables. */
342
+ declare const getChartColor: (index: number) => string;
343
+ declare const formatCompactNumber: (value: number, locale?: string) => string;
344
+ declare const formatCurrency: (value: number, currency?: string, locale?: string) => string;
345
+ declare const formatPercent: (value: number, locale?: string) => string;
346
+ declare const toDateLabel: (date: string | Date, locale?: string) => string;
347
+ //#endregion
348
+ export { BaseChartProps, ChartSeries, ChartTrend, ConversionFunnelChart, ConversionFunnelChartProps, DonutChart, DonutChartProps, DonutChartSegment, FunnelStage, NamedValue, OrdersBarChart, OrdersBarChartProps, RevenueAreaChart, RevenueAreaChartProps, RevenueOrdersComposedChart, RevenueOrdersComposedChartProps, RevenueOrdersPoint, SalesTargetRadialChart, SalesTargetRadialChartProps, SparklineChart, SparklineChartProps, TimeSeriesPoint, TopProductsBarChart, TopProductsBarChartProps, formatCompactNumber, formatCurrency, formatPercent, getChartColor, toDateLabel };
349
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,349 @@
1
+ //#region packages/components/features/charts/types.d.ts
2
+ /** Trend direction shared with the `Statistic` display component. */
3
+ type ChartTrend = 'up' | 'down' | 'neutral';
4
+ type TimeSeriesPoint = {
5
+ date: string | Date;
6
+ value: number; /** Same-bucket value from the comparison period (enables the comparison series). */
7
+ previousValue?: number;
8
+ };
9
+ type ChartSeries = {
10
+ key: string;
11
+ label: string;
12
+ color?: string;
13
+ };
14
+ type NamedValue = {
15
+ name: string;
16
+ value: number;
17
+ };
18
+ /** Props shared by every prebuilt chart. */
19
+ type BaseChartProps = {
20
+ className?: string; /** Enable the recharts enter animation. Disable for deterministic tests. Defaults to `true`. */
21
+ animate?: boolean; /** Fixed height in px; otherwise the container's aspect-video ratio applies. */
22
+ height?: number;
23
+ };
24
+ //#endregion
25
+ //#region packages/components/features/charts/components/conversion-funnel-chart.d.ts
26
+ type FunnelStage = NamedValue & {
27
+ /** Config key; derived from `name` when omitted. */key?: string;
28
+ color?: string;
29
+ };
30
+ type ConversionFunnelChartProps = BaseChartProps & {
31
+ /** Funnel stages ordered top (widest) to bottom. */data: FunnelStage[]; /** Appends each stage's percentage of the first stage. Defaults to `true`. */
32
+ showConversionRates?: boolean;
33
+ valueFormatter?: (value: number) => string;
34
+ };
35
+ /**
36
+ * A conversion funnel for the ecommerce purchase journey — sessions, product views, carts,
37
+ * checkouts, purchases — with per-stage conversion rates against the first stage.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * import { ConversionFunnelChart } from '@customafk/lunas-ui/features/charts';
42
+ *
43
+ * <ConversionFunnelChart
44
+ * data={[
45
+ * { name: 'Sessions', value: 50000 },
46
+ * { name: 'Product views', value: 32000 },
47
+ * { name: 'Added to cart', value: 8400 },
48
+ * { name: 'Purchased', value: 2900 },
49
+ * ]}
50
+ * />
51
+ * ```
52
+ */
53
+ declare const ConversionFunnelChart: ({
54
+ data,
55
+ showConversionRates,
56
+ valueFormatter,
57
+ className,
58
+ animate,
59
+ height
60
+ }: ConversionFunnelChartProps) => import("react").JSX.Element;
61
+ //#endregion
62
+ //#region packages/components/features/charts/components/donut-chart.d.ts
63
+ type DonutChartSegment = NamedValue & {
64
+ /** Config key; derived from `name` when omitted. */key?: string;
65
+ color?: string;
66
+ };
67
+ type DonutChartProps = BaseChartProps & {
68
+ data: DonutChartSegment[]; /** Text under the center total, e.g. `'Total sales'`. */
69
+ centerLabel?: string; /** Formats the center total. Defaults to compact notation. */
70
+ centerValueFormatter?: (total: number) => string; /** Overrides the computed segment sum shown in the center. */
71
+ totalValue?: number;
72
+ showLegend?: boolean;
73
+ showCenterTotal?: boolean;
74
+ };
75
+ /**
76
+ * A donut breakdown chart with a center total — category sales, traffic sources, payment methods.
77
+ *
78
+ * @example
79
+ * ```tsx
80
+ * import { DonutChart } from '@customafk/lunas-ui/features/charts';
81
+ *
82
+ * <DonutChart
83
+ * data={[
84
+ * { name: 'Fashion', value: 12400 },
85
+ * { name: 'Electronics', value: 8200 },
86
+ * ]}
87
+ * centerLabel="Total sales"
88
+ * />
89
+ * ```
90
+ */
91
+ declare const DonutChart: ({
92
+ data,
93
+ centerLabel,
94
+ centerValueFormatter,
95
+ totalValue,
96
+ showLegend,
97
+ showCenterTotal,
98
+ className,
99
+ animate,
100
+ height
101
+ }: DonutChartProps) => import("react").JSX.Element;
102
+ //#endregion
103
+ //#region packages/components/features/charts/components/orders-bar-chart.d.ts
104
+ type OrdersBarChartProps = BaseChartProps & {
105
+ data: Array<{
106
+ date: string | Date;
107
+ } & Record<string, unknown>>; /** Simple mode: the key holding each period's count. Defaults to `'orders'`. */
108
+ dataKey?: string; /** Series label in simple mode. Defaults to `'Orders'`. */
109
+ label?: string; /** Stacked mode: one series per order status; each `key` indexes into the data rows. */
110
+ statuses?: ChartSeries[];
111
+ color?: string;
112
+ valueFormatter?: (value: number) => string;
113
+ dateFormatter?: (date: string | Date) => string; /** Defaults to `true` when `statuses` is provided. */
114
+ showLegend?: boolean;
115
+ showGrid?: boolean;
116
+ };
117
+ /**
118
+ * A bar chart for order volume per period — a single series by default, or stacked by order
119
+ * status when `statuses` is provided.
120
+ *
121
+ * @example
122
+ * ```tsx
123
+ * import { OrdersBarChart } from '@customafk/lunas-ui/features/charts';
124
+ *
125
+ * <OrdersBarChart
126
+ * data={[{ date: '2026-06-01', completed: 32, pending: 6, cancelled: 2 }]}
127
+ * statuses={[
128
+ * { key: 'completed', label: 'Completed' },
129
+ * { key: 'pending', label: 'Pending' },
130
+ * { key: 'cancelled', label: 'Cancelled' },
131
+ * ]}
132
+ * />
133
+ * ```
134
+ */
135
+ declare const OrdersBarChart: ({
136
+ data,
137
+ dataKey,
138
+ label,
139
+ statuses,
140
+ color,
141
+ valueFormatter,
142
+ dateFormatter,
143
+ showLegend,
144
+ showGrid,
145
+ className,
146
+ animate,
147
+ height
148
+ }: OrdersBarChartProps) => import("react").JSX.Element;
149
+ //#endregion
150
+ //#region packages/components/features/charts/components/revenue-area-chart.d.ts
151
+ type RevenueAreaChartProps = BaseChartProps & {
152
+ data: TimeSeriesPoint[]; /** Series label. Defaults to `'Revenue'`. */
153
+ label?: string; /** Comparison series label. Defaults to `'Previous period'`. */
154
+ comparisonLabel?: string; /** Renders `previousValue` as a second, muted area series. */
155
+ showComparison?: boolean;
156
+ color?: string;
157
+ comparisonColor?: string; /** Formats tooltip and Y-axis values. Defaults to compact currency. */
158
+ valueFormatter?: (value: number) => string;
159
+ dateFormatter?: (date: string | Date) => string; /** Defaults to `showComparison`. */
160
+ showLegend?: boolean;
161
+ showGrid?: boolean;
162
+ };
163
+ /**
164
+ * A gradient area chart for revenue (or any currency metric) over time, with an optional
165
+ * previous-period comparison series.
166
+ *
167
+ * @example
168
+ * ```tsx
169
+ * import { RevenueAreaChart } from '@customafk/lunas-ui/features/charts';
170
+ *
171
+ * <RevenueAreaChart
172
+ * data={[
173
+ * { date: '2026-06-01', value: 4200, previousValue: 3800 },
174
+ * { date: '2026-06-02', value: 5100, previousValue: 4300 },
175
+ * ]}
176
+ * showComparison
177
+ * />
178
+ * ```
179
+ */
180
+ declare const RevenueAreaChart: ({
181
+ data,
182
+ label,
183
+ comparisonLabel,
184
+ showComparison,
185
+ color,
186
+ comparisonColor,
187
+ valueFormatter,
188
+ dateFormatter,
189
+ showLegend,
190
+ showGrid,
191
+ className,
192
+ animate,
193
+ height
194
+ }: RevenueAreaChartProps) => import("react").JSX.Element;
195
+ //#endregion
196
+ //#region packages/components/features/charts/components/revenue-orders-composed-chart.d.ts
197
+ type RevenueOrdersPoint = {
198
+ date: string | Date;
199
+ revenue: number;
200
+ orders: number;
201
+ };
202
+ type RevenueOrdersComposedChartProps = BaseChartProps & {
203
+ data: RevenueOrdersPoint[];
204
+ revenueLabel?: string;
205
+ ordersLabel?: string;
206
+ revenueColor?: string;
207
+ ordersColor?: string; /** Formats the left (revenue) axis and tooltip values. Defaults to compact currency. */
208
+ revenueFormatter?: (value: number) => string; /** Formats the right (orders) axis and tooltip values. */
209
+ ordersFormatter?: (value: number) => string;
210
+ dateFormatter?: (date: string | Date) => string;
211
+ showLegend?: boolean;
212
+ showGrid?: boolean;
213
+ };
214
+ /**
215
+ * A dual-axis chart combining revenue bars (left axis, currency) with an orders line
216
+ * (right axis, count) to correlate the two metrics per period.
217
+ *
218
+ * @example
219
+ * ```tsx
220
+ * import { RevenueOrdersComposedChart } from '@customafk/lunas-ui/features/charts';
221
+ *
222
+ * <RevenueOrdersComposedChart
223
+ * data={[{ date: '2026-06-01', revenue: 12400, orders: 87 }]}
224
+ * />
225
+ * ```
226
+ */
227
+ declare const RevenueOrdersComposedChart: ({
228
+ data,
229
+ revenueLabel,
230
+ ordersLabel,
231
+ revenueColor,
232
+ ordersColor,
233
+ revenueFormatter,
234
+ ordersFormatter,
235
+ dateFormatter,
236
+ showLegend,
237
+ showGrid,
238
+ className,
239
+ animate,
240
+ height
241
+ }: RevenueOrdersComposedChartProps) => import("react").JSX.Element;
242
+ //#endregion
243
+ //#region packages/components/features/charts/components/sales-target-radial-chart.d.ts
244
+ type SalesTargetRadialChartProps = BaseChartProps & {
245
+ /** Current progress value, e.g. revenue to date. */value: number; /** The goal the value is measured against. */
246
+ target: number; /** Text under the center figure. Defaults to `'Target'`. */
247
+ label?: string; /** Formats the center figure. Defaults to percent-of-target. */
248
+ valueFormatter?: (value: number, target: number) => string;
249
+ color?: string;
250
+ };
251
+ /**
252
+ * A radial gauge showing progress toward a sales target with the completion figure in the center.
253
+ *
254
+ * @example
255
+ * ```tsx
256
+ * import { SalesTargetRadialChart } from '@customafk/lunas-ui/features/charts';
257
+ *
258
+ * <SalesTargetRadialChart value={65_000} target={100_000} label="Monthly target" />
259
+ * ```
260
+ */
261
+ declare const SalesTargetRadialChart: ({
262
+ value,
263
+ target,
264
+ label,
265
+ valueFormatter,
266
+ color,
267
+ className,
268
+ animate,
269
+ height
270
+ }: SalesTargetRadialChartProps) => import("react").JSX.Element;
271
+ //#endregion
272
+ //#region packages/components/features/charts/components/sparkline-chart.d.ts
273
+ type SparklineChartProps = {
274
+ data: number[] | Array<{
275
+ value: number;
276
+ }>; /** Render style. Defaults to `'area'`. */
277
+ type?: 'line' | 'area'; /** Colors the series like the `Statistic` trend prop. Defaults to `'neutral'`. */
278
+ trend?: ChartTrend; /** Explicit series color; overrides `trend`. */
279
+ color?: string; /** Fixed height in px. Defaults to `40`. */
280
+ height?: number;
281
+ animate?: boolean;
282
+ className?: string;
283
+ };
284
+ /**
285
+ * A tiny, axis-less trend chart for KPI cards; pairs with the `Statistic` display component.
286
+ *
287
+ * @example
288
+ * ```tsx
289
+ * import { SparklineChart } from '@customafk/lunas-ui/features/charts';
290
+ *
291
+ * <SparklineChart data={[12, 18, 14, 26, 22, 31]} trend="up" />
292
+ * ```
293
+ */
294
+ declare const SparklineChart: ({
295
+ data,
296
+ type,
297
+ trend,
298
+ color,
299
+ height,
300
+ animate,
301
+ className
302
+ }: SparklineChartProps) => import("react").JSX.Element;
303
+ //#endregion
304
+ //#region packages/components/features/charts/components/top-products-bar-chart.d.ts
305
+ type TopProductsBarChartProps = BaseChartProps & {
306
+ data: NamedValue[]; /** Series label. Defaults to `'Sales'`. */
307
+ label?: string; /** Number of items shown after sorting descending. Defaults to `8`. */
308
+ maxItems?: number;
309
+ color?: string;
310
+ valueFormatter?: (value: number) => string; /** Value labels at the end of each bar. Defaults to `true`. */
311
+ showValueLabels?: boolean;
312
+ };
313
+ /**
314
+ * A horizontal bar ranking chart — top products, best categories, top customers.
315
+ *
316
+ * @example
317
+ * ```tsx
318
+ * import { TopProductsBarChart } from '@customafk/lunas-ui/features/charts';
319
+ *
320
+ * <TopProductsBarChart
321
+ * data={[
322
+ * { name: 'Wireless Earbuds', value: 1245 },
323
+ * { name: 'Smart Watch', value: 986 },
324
+ * ]}
325
+ * />
326
+ * ```
327
+ */
328
+ declare const TopProductsBarChart: ({
329
+ data,
330
+ label,
331
+ maxItems,
332
+ color,
333
+ valueFormatter,
334
+ showValueLabels,
335
+ className,
336
+ animate,
337
+ height
338
+ }: TopProductsBarChartProps) => import("react").JSX.Element;
339
+ //#endregion
340
+ //#region packages/components/features/charts/utils.d.ts
341
+ /** Cycles through the eight `--chart-N` theme palette variables. */
342
+ declare const getChartColor: (index: number) => string;
343
+ declare const formatCompactNumber: (value: number, locale?: string) => string;
344
+ declare const formatCurrency: (value: number, currency?: string, locale?: string) => string;
345
+ declare const formatPercent: (value: number, locale?: string) => string;
346
+ declare const toDateLabel: (date: string | Date, locale?: string) => string;
347
+ //#endregion
348
+ export { BaseChartProps, ChartSeries, ChartTrend, ConversionFunnelChart, ConversionFunnelChartProps, DonutChart, DonutChartProps, DonutChartSegment, FunnelStage, NamedValue, OrdersBarChart, OrdersBarChartProps, RevenueAreaChart, RevenueAreaChartProps, RevenueOrdersComposedChart, RevenueOrdersComposedChartProps, RevenueOrdersPoint, SalesTargetRadialChart, SalesTargetRadialChartProps, SparklineChart, SparklineChartProps, TimeSeriesPoint, TopProductsBarChart, TopProductsBarChartProps, formatCompactNumber, formatCurrency, formatPercent, getChartColor, toDateLabel };
349
+ //# sourceMappingURL=index.d.mts.map