@mlw-packages/react-components 1.7.13 → 1.7.15
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.css +71 -0
- package/dist/index.d.mts +172 -10
- package/dist/index.d.ts +172 -10
- package/dist/index.js +1928 -1432
- package/dist/index.mjs +1798 -1309
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -978,6 +978,9 @@ body {
|
|
|
978
978
|
.h-\[var\(--radix-select-trigger-height\)\] {
|
|
979
979
|
height: var(--radix-select-trigger-height);
|
|
980
980
|
}
|
|
981
|
+
.h-\[var\(--svg-h\)\] {
|
|
982
|
+
height: var(--svg-h);
|
|
983
|
+
}
|
|
981
984
|
.h-\[var\(--week-cells-height\)\] {
|
|
982
985
|
height: var(--week-cells-height);
|
|
983
986
|
}
|
|
@@ -1332,6 +1335,9 @@ body {
|
|
|
1332
1335
|
.max-w-\[80px\] {
|
|
1333
1336
|
max-width: 80px;
|
|
1334
1337
|
}
|
|
1338
|
+
.max-w-\[900px\] {
|
|
1339
|
+
max-width: 900px;
|
|
1340
|
+
}
|
|
1335
1341
|
.max-w-\[90vw\] {
|
|
1336
1342
|
max-width: 90vw;
|
|
1337
1343
|
}
|
|
@@ -2073,6 +2079,10 @@ body {
|
|
|
2073
2079
|
.bg-accent\/5 {
|
|
2074
2080
|
background-color: hsl(var(--accent) / 0.05);
|
|
2075
2081
|
}
|
|
2082
|
+
.bg-amber-100 {
|
|
2083
|
+
--tw-bg-opacity: 1;
|
|
2084
|
+
background-color: rgb(254 243 199 / var(--tw-bg-opacity, 1));
|
|
2085
|
+
}
|
|
2076
2086
|
.bg-amber-200\/50 {
|
|
2077
2087
|
background-color: rgb(253 230 138 / 0.5);
|
|
2078
2088
|
}
|
|
@@ -2178,6 +2188,10 @@ body {
|
|
|
2178
2188
|
.bg-foreground {
|
|
2179
2189
|
background-color: hsl(var(--foreground));
|
|
2180
2190
|
}
|
|
2191
|
+
.bg-gray-100 {
|
|
2192
|
+
--tw-bg-opacity: 1;
|
|
2193
|
+
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
2194
|
+
}
|
|
2181
2195
|
.bg-gray-200 {
|
|
2182
2196
|
--tw-bg-opacity: 1;
|
|
2183
2197
|
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
|
|
@@ -2214,6 +2228,10 @@ body {
|
|
|
2214
2228
|
--tw-bg-opacity: 1;
|
|
2215
2229
|
background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1));
|
|
2216
2230
|
}
|
|
2231
|
+
.bg-indigo-100 {
|
|
2232
|
+
--tw-bg-opacity: 1;
|
|
2233
|
+
background-color: rgb(224 231 255 / var(--tw-bg-opacity, 1));
|
|
2234
|
+
}
|
|
2217
2235
|
.bg-indigo-400\/20 {
|
|
2218
2236
|
background-color: rgb(129 140 248 / 0.2);
|
|
2219
2237
|
}
|
|
@@ -2276,6 +2294,10 @@ body {
|
|
|
2276
2294
|
--tw-bg-opacity: 1;
|
|
2277
2295
|
background-color: rgb(249 115 22 / var(--tw-bg-opacity, 1));
|
|
2278
2296
|
}
|
|
2297
|
+
.bg-pink-100 {
|
|
2298
|
+
--tw-bg-opacity: 1;
|
|
2299
|
+
background-color: rgb(252 231 243 / var(--tw-bg-opacity, 1));
|
|
2300
|
+
}
|
|
2279
2301
|
.bg-pink-500 {
|
|
2280
2302
|
--tw-bg-opacity: 1;
|
|
2281
2303
|
background-color: rgb(236 72 153 / var(--tw-bg-opacity, 1));
|
|
@@ -2366,9 +2388,17 @@ body {
|
|
|
2366
2388
|
--tw-bg-opacity: 1;
|
|
2367
2389
|
background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1));
|
|
2368
2390
|
}
|
|
2391
|
+
.bg-teal-100 {
|
|
2392
|
+
--tw-bg-opacity: 1;
|
|
2393
|
+
background-color: rgb(204 251 241 / var(--tw-bg-opacity, 1));
|
|
2394
|
+
}
|
|
2369
2395
|
.bg-transparent {
|
|
2370
2396
|
background-color: transparent;
|
|
2371
2397
|
}
|
|
2398
|
+
.bg-violet-100 {
|
|
2399
|
+
--tw-bg-opacity: 1;
|
|
2400
|
+
background-color: rgb(237 233 254 / var(--tw-bg-opacity, 1));
|
|
2401
|
+
}
|
|
2372
2402
|
.bg-violet-200\/50 {
|
|
2373
2403
|
background-color: rgb(221 214 254 / 0.5);
|
|
2374
2404
|
}
|
|
@@ -2657,6 +2687,9 @@ body {
|
|
|
2657
2687
|
.pl-8 {
|
|
2658
2688
|
padding-left: 2rem;
|
|
2659
2689
|
}
|
|
2690
|
+
.pl-\[var\(--pl\)\] {
|
|
2691
|
+
padding-left: var(--pl);
|
|
2692
|
+
}
|
|
2660
2693
|
.pr-1 {
|
|
2661
2694
|
padding-right: 0.25rem;
|
|
2662
2695
|
}
|
|
@@ -2669,6 +2702,9 @@ body {
|
|
|
2669
2702
|
.pr-2\.5 {
|
|
2670
2703
|
padding-right: 0.625rem;
|
|
2671
2704
|
}
|
|
2705
|
+
.pr-3 {
|
|
2706
|
+
padding-right: 0.75rem;
|
|
2707
|
+
}
|
|
2672
2708
|
.pr-4 {
|
|
2673
2709
|
padding-right: 1rem;
|
|
2674
2710
|
}
|
|
@@ -2856,6 +2892,10 @@ body {
|
|
|
2856
2892
|
--tw-text-opacity: 1;
|
|
2857
2893
|
color: rgb(217 119 6 / var(--tw-text-opacity, 1));
|
|
2858
2894
|
}
|
|
2895
|
+
.text-amber-700 {
|
|
2896
|
+
--tw-text-opacity: 1;
|
|
2897
|
+
color: rgb(180 83 9 / var(--tw-text-opacity, 1));
|
|
2898
|
+
}
|
|
2859
2899
|
.text-amber-950\/80 {
|
|
2860
2900
|
color: rgb(69 26 3 / 0.8);
|
|
2861
2901
|
}
|
|
@@ -2863,6 +2903,9 @@ body {
|
|
|
2863
2903
|
--tw-text-opacity: 1;
|
|
2864
2904
|
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
2865
2905
|
}
|
|
2906
|
+
.text-black\/80 {
|
|
2907
|
+
color: rgb(0 0 0 / 0.8);
|
|
2908
|
+
}
|
|
2866
2909
|
.text-blue-400 {
|
|
2867
2910
|
--tw-text-opacity: 1;
|
|
2868
2911
|
color: rgb(96 165 250 / var(--tw-text-opacity, 1));
|
|
@@ -2917,6 +2960,10 @@ body {
|
|
|
2917
2960
|
--tw-text-opacity: 1;
|
|
2918
2961
|
color: rgb(55 65 81 / var(--tw-text-opacity, 1));
|
|
2919
2962
|
}
|
|
2963
|
+
.text-gray-800 {
|
|
2964
|
+
--tw-text-opacity: 1;
|
|
2965
|
+
color: rgb(31 41 55 / var(--tw-text-opacity, 1));
|
|
2966
|
+
}
|
|
2920
2967
|
.text-green-400 {
|
|
2921
2968
|
--tw-text-opacity: 1;
|
|
2922
2969
|
color: rgb(74 222 128 / var(--tw-text-opacity, 1));
|
|
@@ -2933,6 +2980,10 @@ body {
|
|
|
2933
2980
|
--tw-text-opacity: 1;
|
|
2934
2981
|
color: rgb(21 128 61 / var(--tw-text-opacity, 1));
|
|
2935
2982
|
}
|
|
2983
|
+
.text-green-800 {
|
|
2984
|
+
--tw-text-opacity: 1;
|
|
2985
|
+
color: rgb(22 101 52 / var(--tw-text-opacity, 1));
|
|
2986
|
+
}
|
|
2936
2987
|
.text-indigo-500 {
|
|
2937
2988
|
--tw-text-opacity: 1;
|
|
2938
2989
|
color: rgb(99 102 241 / var(--tw-text-opacity, 1));
|
|
@@ -2941,6 +2992,10 @@ body {
|
|
|
2941
2992
|
--tw-text-opacity: 1;
|
|
2942
2993
|
color: rgb(79 70 229 / var(--tw-text-opacity, 1));
|
|
2943
2994
|
}
|
|
2995
|
+
.text-indigo-700 {
|
|
2996
|
+
--tw-text-opacity: 1;
|
|
2997
|
+
color: rgb(67 56 202 / var(--tw-text-opacity, 1));
|
|
2998
|
+
}
|
|
2944
2999
|
.text-muted-foreground {
|
|
2945
3000
|
color: hsl(var(--muted-foreground));
|
|
2946
3001
|
}
|
|
@@ -2990,6 +3045,10 @@ body {
|
|
|
2990
3045
|
--tw-text-opacity: 1;
|
|
2991
3046
|
color: rgb(236 72 153 / var(--tw-text-opacity, 1));
|
|
2992
3047
|
}
|
|
3048
|
+
.text-pink-700 {
|
|
3049
|
+
--tw-text-opacity: 1;
|
|
3050
|
+
color: rgb(190 24 93 / var(--tw-text-opacity, 1));
|
|
3051
|
+
}
|
|
2993
3052
|
.text-popover-foreground {
|
|
2994
3053
|
color: hsl(var(--popover-foreground));
|
|
2995
3054
|
}
|
|
@@ -3067,6 +3126,14 @@ body {
|
|
|
3067
3126
|
--tw-text-opacity: 1;
|
|
3068
3127
|
color: rgb(15 23 42 / var(--tw-text-opacity, 1));
|
|
3069
3128
|
}
|
|
3129
|
+
.text-teal-700 {
|
|
3130
|
+
--tw-text-opacity: 1;
|
|
3131
|
+
color: rgb(15 118 110 / var(--tw-text-opacity, 1));
|
|
3132
|
+
}
|
|
3133
|
+
.text-violet-700 {
|
|
3134
|
+
--tw-text-opacity: 1;
|
|
3135
|
+
color: rgb(109 40 217 / var(--tw-text-opacity, 1));
|
|
3136
|
+
}
|
|
3070
3137
|
.text-violet-950\/80 {
|
|
3071
3138
|
color: rgb(46 16 101 / 0.8);
|
|
3072
3139
|
}
|
|
@@ -3090,6 +3157,10 @@ body {
|
|
|
3090
3157
|
--tw-text-opacity: 1;
|
|
3091
3158
|
color: rgb(161 98 7 / var(--tw-text-opacity, 1));
|
|
3092
3159
|
}
|
|
3160
|
+
.text-yellow-800 {
|
|
3161
|
+
--tw-text-opacity: 1;
|
|
3162
|
+
color: rgb(133 77 14 / var(--tw-text-opacity, 1));
|
|
3163
|
+
}
|
|
3093
3164
|
.text-zinc-100 {
|
|
3094
3165
|
--tw-text-opacity: 1;
|
|
3095
3166
|
color: rgb(244 244 245 / var(--tw-text-opacity, 1));
|
package/dist/index.d.mts
CHANGED
|
@@ -97,8 +97,9 @@ interface ComboboxProps<T extends string> extends ErrorMessageProps {
|
|
|
97
97
|
label?: string;
|
|
98
98
|
labelClassname?: string;
|
|
99
99
|
testIds?: ComboboxTestIds;
|
|
100
|
+
disabled?: boolean;
|
|
100
101
|
}
|
|
101
|
-
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, empty, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
102
|
+
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, empty, disabled, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
102
103
|
|
|
103
104
|
interface MultiComboboxTestIds {
|
|
104
105
|
root?: string;
|
|
@@ -116,8 +117,9 @@ interface MultiComboboxProps<T extends string> extends Omit<ComboboxProps<T>, "s
|
|
|
116
117
|
testIds?: MultiComboboxTestIds;
|
|
117
118
|
keepOpen?: boolean;
|
|
118
119
|
showClearAll?: boolean;
|
|
120
|
+
disabled?: boolean;
|
|
119
121
|
}
|
|
120
|
-
declare function MultiCombobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, label, labelClassname, testIds, error, keepOpen, showClearAll, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
122
|
+
declare function MultiCombobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, label, labelClassname, testIds, error, disabled, keepOpen, showClearAll, empty, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
121
123
|
|
|
122
124
|
interface SelectItem<T extends string> {
|
|
123
125
|
label: string;
|
|
@@ -158,10 +160,10 @@ interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectPro
|
|
|
158
160
|
type NewSelectProps<T extends string> = SelectPropsWithItems$1<T> | SelectPropsWithGroupItems$1<T>;
|
|
159
161
|
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className, }: NewSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
160
162
|
|
|
161
|
-
interface
|
|
163
|
+
interface AvatarComboboxItem<T extends string> {
|
|
162
164
|
label: string;
|
|
163
165
|
value: T;
|
|
164
|
-
avatar?:
|
|
166
|
+
avatar?: ReactNode;
|
|
165
167
|
avatarClassName?: string;
|
|
166
168
|
}
|
|
167
169
|
interface SelectTestIds {
|
|
@@ -183,19 +185,19 @@ interface DefaultSelectProps extends ErrorMessageProps {
|
|
|
183
185
|
colors?: string[];
|
|
184
186
|
}
|
|
185
187
|
interface SelectPropsWithItems<T extends string> extends DefaultSelectProps {
|
|
186
|
-
items:
|
|
188
|
+
items: AvatarComboboxItem<T>[];
|
|
187
189
|
groupItems?: never;
|
|
188
190
|
testIds?: SelectTestIds;
|
|
189
191
|
}
|
|
190
192
|
interface SelectPropsWithGroupItems<T extends string> extends DefaultSelectProps {
|
|
191
193
|
items?: never;
|
|
192
194
|
groupItems: {
|
|
193
|
-
[key: string]:
|
|
195
|
+
[key: string]: AvatarComboboxItem<T>[];
|
|
194
196
|
};
|
|
195
197
|
testIds?: SelectTestIds;
|
|
196
198
|
}
|
|
197
|
-
type
|
|
198
|
-
declare function
|
|
199
|
+
type AvatarComboboxProps<T extends string> = SelectPropsWithItems<T> | SelectPropsWithGroupItems<T>;
|
|
200
|
+
declare function AvatarCombobox<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className, colors, }: AvatarComboboxProps<T> & {
|
|
199
201
|
selected?: T | null;
|
|
200
202
|
label?: string;
|
|
201
203
|
labelClassname?: string;
|
|
@@ -252,8 +254,26 @@ type valueFormatter = (props: {
|
|
|
252
254
|
}) => string;
|
|
253
255
|
declare const renderPillLabel: (color: string, variant: Variant, valueFormatter?: valueFormatter) => (props: LabelRendererProps) => react_jsx_runtime.JSX.Element;
|
|
254
256
|
|
|
257
|
+
declare function maxForKeys(processedData: Array<Record<string, unknown>>, keys: string[]): number;
|
|
258
|
+
declare function minForKeys(processedData: Array<Record<string, unknown>>, keys: string[]): number;
|
|
259
|
+
|
|
260
|
+
declare const TITLE_CLASSNAME = "text-xl font-semibold text-foreground mb-3";
|
|
261
|
+
declare function buildPercentFormatter(decimals?: number): (v: number | string) => string;
|
|
262
|
+
declare function createFinalValueFormatter(valueFormatter?: valueFormatter, formatBR?: boolean): valueFormatter | undefined;
|
|
263
|
+
declare function createYTickFormatter(finalValueFormatter?: valueFormatter): (v: number | string) => string;
|
|
264
|
+
|
|
265
|
+
declare function generateColors(dataKeys: string[], colors: string[], mapperConfig: Record<string, {
|
|
266
|
+
color?: string;
|
|
267
|
+
} | undefined>): Record<string, string>;
|
|
268
|
+
|
|
269
|
+
declare function adaptDataForTooltip(universalData: Record<string, unknown>, xAxisKey: string): Record<string, string | number> & {
|
|
270
|
+
name: string;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
type Primitive = string | number | boolean | null | undefined;
|
|
255
274
|
interface ChartData {
|
|
256
|
-
[key: string]:
|
|
275
|
+
[key: string]: Primitive;
|
|
276
|
+
name?: string;
|
|
257
277
|
}
|
|
258
278
|
interface XAxisConfig$1 {
|
|
259
279
|
dataKey: string;
|
|
@@ -261,14 +281,98 @@ interface XAxisConfig$1 {
|
|
|
261
281
|
valueFormatter?: (value: string | number) => string;
|
|
262
282
|
autoLabel?: boolean;
|
|
263
283
|
}
|
|
284
|
+
type ValueFormatter = (value: string | number) => string | number;
|
|
285
|
+
type FinalValueFormatter = (value: number | string | null | undefined) => string;
|
|
264
286
|
type SeriesProp = {
|
|
265
287
|
bar?: string[];
|
|
266
288
|
line?: string[];
|
|
267
289
|
area?: string[];
|
|
268
290
|
};
|
|
291
|
+
type SeriesEntry = {
|
|
292
|
+
type: "bar" | "line" | "area";
|
|
293
|
+
key: string;
|
|
294
|
+
};
|
|
295
|
+
type SeriesCounts = {
|
|
296
|
+
bar: number;
|
|
297
|
+
line: number;
|
|
298
|
+
area: number;
|
|
299
|
+
};
|
|
300
|
+
type YAxisSide = "left" | "right";
|
|
301
|
+
type YAxisMap = Record<string, YAxisSide>;
|
|
302
|
+
interface MapperConfigEntry {
|
|
303
|
+
label?: string;
|
|
304
|
+
valueFormatter?: ValueFormatter;
|
|
305
|
+
color?: string;
|
|
306
|
+
type?: "number" | "string" | "auto";
|
|
307
|
+
visible?: boolean;
|
|
308
|
+
}
|
|
309
|
+
type MapperConfig = Record<string, MapperConfigEntry>;
|
|
310
|
+
interface YAxisOptions {
|
|
311
|
+
label?: string;
|
|
312
|
+
stroke?: string;
|
|
313
|
+
width?: number;
|
|
314
|
+
percent?: boolean;
|
|
315
|
+
percentDecimals?: number;
|
|
316
|
+
}
|
|
317
|
+
type YAxes = Partial<{
|
|
318
|
+
left: YAxisOptions;
|
|
319
|
+
right: YAxisOptions;
|
|
320
|
+
}>;
|
|
321
|
+
interface TooltipItem {
|
|
322
|
+
id: string;
|
|
323
|
+
data: ChartData;
|
|
324
|
+
position: {
|
|
325
|
+
top: number;
|
|
326
|
+
left: number;
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
type TooltipAdaptedRow = Record<string, string | number> & {
|
|
330
|
+
name: string;
|
|
331
|
+
};
|
|
332
|
+
interface ChartHooksArgs {
|
|
333
|
+
width?: number | string;
|
|
334
|
+
measuredWidth?: number | null;
|
|
335
|
+
points?: number;
|
|
336
|
+
seriesCounts?: SeriesCounts;
|
|
337
|
+
niceMax?: number;
|
|
338
|
+
yAxes?: YAxes;
|
|
339
|
+
yAxisLabel?: string;
|
|
340
|
+
chartMargin?: Partial<{
|
|
341
|
+
top: number;
|
|
342
|
+
right: number;
|
|
343
|
+
left: number;
|
|
344
|
+
bottom: number;
|
|
345
|
+
}>;
|
|
346
|
+
showLabels?: boolean;
|
|
347
|
+
showLegend?: boolean;
|
|
348
|
+
xAxisLabel?: string;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare function computeSeriesOrder(series: SeriesProp | undefined, mapperConfig: Record<string, unknown>): SeriesEntry[];
|
|
352
|
+
declare function computeProcessedData(data: Array<Record<string, unknown>>, xAxisKey: string): Array<Record<string, unknown> & {
|
|
353
|
+
name: string;
|
|
354
|
+
}>;
|
|
355
|
+
declare function computeAllKeys(seriesOrder: SeriesEntry[]): string[];
|
|
356
|
+
declare function computeLeftRightKeys(allKeys: string[], yAxisMap?: YAxisMap): {
|
|
357
|
+
leftKeys: string[];
|
|
358
|
+
rightKeys: string[];
|
|
359
|
+
};
|
|
360
|
+
declare function computeNiceMax(value: number): number;
|
|
361
|
+
declare function computeChartWidth(dataLength: number, seriesCounts: SeriesCounts, niceMax: number, opts?: {
|
|
362
|
+
minWidth?: number;
|
|
363
|
+
maxWidth?: number;
|
|
364
|
+
}): number;
|
|
365
|
+
declare function computeLabelSample(keys: string[], candidates: number[], yTickFormatter: (v: number | string) => string): string;
|
|
366
|
+
declare function computeEstimatedAxisNeeded(labelSample: string, axisLabel?: string, containerPaddingLeft?: number, defaultLeftMargin?: number): number;
|
|
367
|
+
declare function computeAxisLabelWidth(label?: string): number;
|
|
368
|
+
|
|
369
|
+
declare function estimateTextWidth(text: string | number | undefined): number;
|
|
370
|
+
|
|
269
371
|
interface ChartProps {
|
|
270
372
|
data: ChartData[];
|
|
271
373
|
series?: SeriesProp;
|
|
374
|
+
yAxisMap?: YAxisMap;
|
|
375
|
+
yAxes?: YAxes;
|
|
272
376
|
className?: string;
|
|
273
377
|
chartMargin?: Partial<{
|
|
274
378
|
top: number;
|
|
@@ -299,6 +403,7 @@ interface ChartProps {
|
|
|
299
403
|
showTooltipTotal?: boolean;
|
|
300
404
|
maxTooltips?: number;
|
|
301
405
|
formatBR?: boolean;
|
|
406
|
+
periodLabel?: string;
|
|
302
407
|
}
|
|
303
408
|
declare const Chart: React__default.FC<ChartProps>;
|
|
304
409
|
|
|
@@ -492,6 +597,8 @@ interface Props$1 {
|
|
|
492
597
|
totalLabel?: string;
|
|
493
598
|
valueFormatter?: valueFormatter;
|
|
494
599
|
categoryFormatter?: (value: string | number) => string;
|
|
600
|
+
yAxisMap?: Record<string, "left" | "right">;
|
|
601
|
+
isBiaxial?: boolean;
|
|
495
602
|
}
|
|
496
603
|
declare const RechartTooltipWithTotal: React__default.FC<Props$1>;
|
|
497
604
|
|
|
@@ -509,6 +616,8 @@ interface Props {
|
|
|
509
616
|
periodLabel?: string;
|
|
510
617
|
valueFormatter?: valueFormatter;
|
|
511
618
|
categoryFormatter?: (value: string | number) => string;
|
|
619
|
+
yAxisMap?: Record<string, "left" | "right">;
|
|
620
|
+
isBiaxial?: boolean;
|
|
512
621
|
}
|
|
513
622
|
declare const TooltipSimple: React__default.FC<Props>;
|
|
514
623
|
|
|
@@ -523,6 +632,59 @@ interface UseChartHighlightsReturn {
|
|
|
523
632
|
}
|
|
524
633
|
declare const useChartHighlights: () => UseChartHighlightsReturn;
|
|
525
634
|
|
|
635
|
+
declare function useChartLayout(args: {
|
|
636
|
+
width: number | string | undefined;
|
|
637
|
+
measuredWidth: number | null;
|
|
638
|
+
points: number;
|
|
639
|
+
seriesCounts: SeriesCounts;
|
|
640
|
+
niceMax: number;
|
|
641
|
+
yAxes?: Partial<{
|
|
642
|
+
left: {
|
|
643
|
+
label?: string;
|
|
644
|
+
};
|
|
645
|
+
right: {
|
|
646
|
+
label?: string;
|
|
647
|
+
};
|
|
648
|
+
}>;
|
|
649
|
+
yAxisLabel?: string;
|
|
650
|
+
chartMargin?: Partial<{
|
|
651
|
+
top: number;
|
|
652
|
+
right: number;
|
|
653
|
+
left: number;
|
|
654
|
+
bottom: number;
|
|
655
|
+
}>;
|
|
656
|
+
showLabels?: boolean;
|
|
657
|
+
showLegend?: boolean;
|
|
658
|
+
xAxisLabel?: string | undefined;
|
|
659
|
+
leftLabelSample?: string;
|
|
660
|
+
rightLabelSample?: string;
|
|
661
|
+
}): {
|
|
662
|
+
readonly containerPaddingLeft: 16;
|
|
663
|
+
readonly computedWidth: number;
|
|
664
|
+
readonly measuredInner: number | undefined;
|
|
665
|
+
readonly effectiveChartWidth: number;
|
|
666
|
+
readonly chartInnerWidth: number;
|
|
667
|
+
readonly finalChartLeftMargin: number;
|
|
668
|
+
readonly finalChartRightMargin: number;
|
|
669
|
+
readonly finalChartTopMargin: number;
|
|
670
|
+
readonly finalChartBottomMargin: number;
|
|
671
|
+
readonly leftYAxisLabelDx: number;
|
|
672
|
+
readonly rightYAxisLabelDx: number;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
declare function useMeasureWidth<T extends HTMLElement = HTMLDivElement>(): {
|
|
676
|
+
readonly wrapperRef: React$1.RefObject<T | null>;
|
|
677
|
+
readonly measuredWidth: number | null;
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
interface NoDataProps {
|
|
681
|
+
paddingLeft?: number;
|
|
682
|
+
height?: number | string;
|
|
683
|
+
message?: string;
|
|
684
|
+
className?: string;
|
|
685
|
+
}
|
|
686
|
+
declare const NoData: React__default.FC<NoDataProps>;
|
|
687
|
+
|
|
526
688
|
declare const AvatarBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
527
689
|
declare const AvatarImageBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
528
690
|
declare const AvatarFallbackBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1564,4 +1726,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
1564
1726
|
isDragging: boolean;
|
|
1565
1727
|
};
|
|
1566
1728
|
|
|
1567
|
-
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase,
|
|
1729
|
+
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, type AvatarComboboxItem, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, type BadgeColorType, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, type CalendarEvent, type CalendarProps, type CalendarView, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, type ChartData, type ChartHooksArgs, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DebouncedInput, type DebouncedInputProps, DefaultEndHour, DefaultStartHour, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, EditButton, EndHour, ErrorMessage, EventCalendar, type EventColor, EventDialog, EventGap, EventHeight, EventItem, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, type FinalValueFormatter, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type MapperConfig, type MapperConfigEntry, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, type Primitive, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, type SeriesCounts, type SeriesEntry, type SeriesProp, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StatusIndicator, type StatusProps, SwitchBase, TITLE_CLASSNAME, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, Toaster, type TooltipAdaptedRow, TooltipBase, TooltipContentBase, type TooltipItem, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, type ValueFormatter, ViewButton, VisibilityButton, WeekCellsHeight, WeekView, type XAxisConfig$1 as XAxisConfig, type YAxes, type YAxisMap, type YAxisOptions, type YAxisSide, adaptDataForTooltip, addHoursToDate, badgeVariants, buildPercentFormatter, buttonVariantsBase, compactTick, computeAllKeys, computeAxisLabelWidth, computeChartWidth, computeEstimatedAxisNeeded, computeLabelSample, computeLeftRightKeys, computeNiceMax, computeProcessedData, computeSeriesOrder, convert12HourTo24Hour, createFinalValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, estimateTextWidth, formatFieldName, generateAdditionalColors, generateColors, getAgendaEventsForDay, getAllEventsForDay, getArrowByType, getBorderRadiusClasses, getDateByType, getEventColorClasses, getEventsForDay, getSpanningEventsForDay, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isValid12Hour, isValidHour, isValidMinuteOrSecond, maxForKeys, minForKeys, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, toast, useCalendarDnd, useChartHighlights, useChartLayout, useCurrentTimeIndicator, useDrag, useEventVisibility, useIsMobile, useMeasureWidth, useTheme, type valueFormatter };
|