@mlw-packages/react-components 1.7.1 → 1.7.3
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.d.mts +190 -51
- package/dist/index.d.ts +190 -51
- package/dist/index.js +1293 -48
- package/dist/index.mjs +1298 -42
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
6
6
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
|
-
import { DayPicker } from 'react-day-picker';
|
|
8
|
+
import { DayPicker, DateRange } from 'react-day-picker';
|
|
9
9
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import { DialogProps } from '@radix-ui/react-dialog';
|
|
@@ -26,6 +26,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
26
26
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
27
27
|
import { Drawer } from 'vaul';
|
|
28
28
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
29
30
|
|
|
30
31
|
type ErrorMessageProps = {
|
|
31
32
|
error?: string;
|
|
@@ -150,51 +151,6 @@ interface SelectPropsWithGroupItems<T extends string> extends DefaultSelectProps
|
|
|
150
151
|
type SelectProps<T extends string> = SelectPropsWithItems<T> | SelectPropsWithGroupItems<T>;
|
|
151
152
|
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
152
153
|
|
|
153
|
-
interface ChartData {
|
|
154
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
155
|
-
}
|
|
156
|
-
interface XAxisConfig$1 {
|
|
157
|
-
dataKey: string;
|
|
158
|
-
label?: string;
|
|
159
|
-
formatter?: (value: string | number) => string;
|
|
160
|
-
autoLabel?: boolean;
|
|
161
|
-
}
|
|
162
|
-
type SeriesProp = {
|
|
163
|
-
bar?: string[];
|
|
164
|
-
line?: string[];
|
|
165
|
-
area?: string[];
|
|
166
|
-
};
|
|
167
|
-
interface ChartProps {
|
|
168
|
-
data: ChartData[];
|
|
169
|
-
series?: SeriesProp;
|
|
170
|
-
className?: string;
|
|
171
|
-
chartMargin?: Partial<{
|
|
172
|
-
top: number;
|
|
173
|
-
right: number;
|
|
174
|
-
left: number;
|
|
175
|
-
bottom: number;
|
|
176
|
-
}>;
|
|
177
|
-
height?: number;
|
|
178
|
-
width?: number | string;
|
|
179
|
-
colors?: string[];
|
|
180
|
-
gridColor?: string;
|
|
181
|
-
showGrid?: boolean;
|
|
182
|
-
showTooltip?: boolean;
|
|
183
|
-
showLegend?: boolean;
|
|
184
|
-
title?: string;
|
|
185
|
-
titlePosition?: "left" | "center" | "right";
|
|
186
|
-
showLabels?: boolean;
|
|
187
|
-
labelMap?: Record<string, string>;
|
|
188
|
-
xAxis?: XAxisConfig$1 | string;
|
|
189
|
-
enableHighlights?: boolean;
|
|
190
|
-
enableShowOnly?: boolean;
|
|
191
|
-
enablePeriodsDropdown?: boolean;
|
|
192
|
-
enableDraggableTooltips?: boolean;
|
|
193
|
-
showTooltipTotal?: boolean;
|
|
194
|
-
maxTooltips?: number;
|
|
195
|
-
}
|
|
196
|
-
declare const Chart: React__default.FC<ChartProps>;
|
|
197
|
-
|
|
198
154
|
declare const formatFieldName: (fieldName: string) => string;
|
|
199
155
|
declare const detectDataFields: (data: Record<string, unknown>[], xAxisKey: string) => string[];
|
|
200
156
|
declare const detectXAxis: (data: Record<string, unknown>[]) => string;
|
|
@@ -239,7 +195,58 @@ type LabelRendererProps = {
|
|
|
239
195
|
cx?: number | string;
|
|
240
196
|
cy?: number | string;
|
|
241
197
|
};
|
|
242
|
-
|
|
198
|
+
type valueFormatter = (props: {
|
|
199
|
+
value: number | string | undefined;
|
|
200
|
+
formattedValue: string;
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}) => string;
|
|
203
|
+
declare const renderPillLabel: (color: string, variant: Variant, valueFormatter?: valueFormatter) => (props: LabelRendererProps) => react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
205
|
+
interface ChartData {
|
|
206
|
+
[key: string]: string | number | boolean | null | undefined;
|
|
207
|
+
}
|
|
208
|
+
interface XAxisConfig$1 {
|
|
209
|
+
dataKey: string;
|
|
210
|
+
label?: string;
|
|
211
|
+
valueFormatter?: (value: string | number) => string;
|
|
212
|
+
autoLabel?: boolean;
|
|
213
|
+
}
|
|
214
|
+
type SeriesProp = {
|
|
215
|
+
bar?: string[];
|
|
216
|
+
line?: string[];
|
|
217
|
+
area?: string[];
|
|
218
|
+
};
|
|
219
|
+
interface ChartProps {
|
|
220
|
+
data: ChartData[];
|
|
221
|
+
series?: SeriesProp;
|
|
222
|
+
className?: string;
|
|
223
|
+
chartMargin?: Partial<{
|
|
224
|
+
top: number;
|
|
225
|
+
right: number;
|
|
226
|
+
left: number;
|
|
227
|
+
bottom: number;
|
|
228
|
+
}>;
|
|
229
|
+
height?: number;
|
|
230
|
+
width?: number | string;
|
|
231
|
+
colors?: string[];
|
|
232
|
+
gridColor?: string;
|
|
233
|
+
showGrid?: boolean;
|
|
234
|
+
showTooltip?: boolean;
|
|
235
|
+
showLegend?: boolean;
|
|
236
|
+
title?: string;
|
|
237
|
+
titlePosition?: "left" | "center" | "right";
|
|
238
|
+
showLabels?: boolean;
|
|
239
|
+
labelMap?: Record<string, string>;
|
|
240
|
+
valueFormatter?: valueFormatter;
|
|
241
|
+
xAxis?: XAxisConfig$1 | string;
|
|
242
|
+
enableHighlights?: boolean;
|
|
243
|
+
enableShowOnly?: boolean;
|
|
244
|
+
enablePeriodsDropdown?: boolean;
|
|
245
|
+
enableDraggableTooltips?: boolean;
|
|
246
|
+
showTooltipTotal?: boolean;
|
|
247
|
+
maxTooltips?: number;
|
|
248
|
+
}
|
|
249
|
+
declare const Chart: React__default.FC<ChartProps>;
|
|
243
250
|
|
|
244
251
|
interface BarChartData {
|
|
245
252
|
[key: string]: string | number | boolean | null | undefined;
|
|
@@ -247,13 +254,13 @@ interface BarChartData {
|
|
|
247
254
|
interface XAxisConfig {
|
|
248
255
|
dataKey: string;
|
|
249
256
|
label?: string;
|
|
250
|
-
|
|
257
|
+
valueFormatter?: (value: string | number) => string;
|
|
251
258
|
autoLabel?: boolean;
|
|
252
259
|
}
|
|
253
260
|
interface DataMapper {
|
|
254
261
|
[dataKey: string]: {
|
|
255
262
|
label?: string;
|
|
256
|
-
|
|
263
|
+
valueFormatter?: (value: string | number) => string | number;
|
|
257
264
|
color?: string;
|
|
258
265
|
type?: "number" | "string" | "auto";
|
|
259
266
|
visible?: boolean;
|
|
@@ -359,7 +366,7 @@ declare const ShowOnly: React__default.FC<Props$3>;
|
|
|
359
366
|
|
|
360
367
|
interface MapperEntry {
|
|
361
368
|
label?: string;
|
|
362
|
-
|
|
369
|
+
valueFormatter?: (value: string | number) => string | number;
|
|
363
370
|
color?: string;
|
|
364
371
|
type?: string;
|
|
365
372
|
visible?: boolean;
|
|
@@ -411,6 +418,7 @@ interface DraggableTooltipProps {
|
|
|
411
418
|
highlightedSeries?: Set<string>;
|
|
412
419
|
toggleHighlight?: (key: string) => void;
|
|
413
420
|
showOnlyHighlighted?: boolean;
|
|
421
|
+
valueFormatter?: valueFormatter;
|
|
414
422
|
}
|
|
415
423
|
declare const DraggableTooltip: React__default.NamedExoticComponent<DraggableTooltipProps>;
|
|
416
424
|
|
|
@@ -427,6 +435,7 @@ interface Props$1 {
|
|
|
427
435
|
finalColors?: Record<string, string>;
|
|
428
436
|
periodLabel?: string;
|
|
429
437
|
totalLabel?: string;
|
|
438
|
+
valueFormatter?: valueFormatter;
|
|
430
439
|
}
|
|
431
440
|
declare const RechartTooltipWithTotal: React__default.FC<Props$1>;
|
|
432
441
|
|
|
@@ -442,6 +451,7 @@ interface Props {
|
|
|
442
451
|
label?: string;
|
|
443
452
|
finalColors?: Record<string, string>;
|
|
444
453
|
periodLabel?: string;
|
|
454
|
+
valueFormatter?: valueFormatter;
|
|
445
455
|
}
|
|
446
456
|
declare const TooltipSimple: React__default.FC<Props>;
|
|
447
457
|
|
|
@@ -1085,6 +1095,135 @@ interface UniversalTooltipRendererProps {
|
|
|
1085
1095
|
}
|
|
1086
1096
|
declare const UniversalTooltipRenderer: React__default.FC<UniversalTooltipRendererProps>;
|
|
1087
1097
|
|
|
1098
|
+
interface DateTimePickerProps extends ErrorMessageProps {
|
|
1099
|
+
label?: string;
|
|
1100
|
+
date: Date | undefined;
|
|
1101
|
+
onChange: (date: Date | undefined) => void;
|
|
1102
|
+
display?: boolean;
|
|
1103
|
+
hideSeconds?: boolean;
|
|
1104
|
+
hideHour?: boolean;
|
|
1105
|
+
hideMinute?: boolean;
|
|
1106
|
+
fromDate?: Date;
|
|
1107
|
+
toDate?: Date;
|
|
1108
|
+
disabled?: boolean;
|
|
1109
|
+
className?: string;
|
|
1110
|
+
error?: string;
|
|
1111
|
+
}
|
|
1112
|
+
declare function DateTimePicker({ label, date, onChange, display, hideSeconds, hideHour, hideMinute, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1113
|
+
|
|
1114
|
+
interface RangePickerProps extends ErrorMessageProps {
|
|
1115
|
+
value?: DateRange;
|
|
1116
|
+
onChange?: (range: DateRange | undefined) => void;
|
|
1117
|
+
label?: string;
|
|
1118
|
+
minDate?: Date;
|
|
1119
|
+
maxDate?: Date;
|
|
1120
|
+
error?: string | undefined;
|
|
1121
|
+
}
|
|
1122
|
+
declare function RangePicker({ value, onChange, label, minDate, maxDate, error, }: RangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1123
|
+
declare namespace RangePicker {
|
|
1124
|
+
var displayName: string;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
interface TimePickerProps {
|
|
1128
|
+
date: Date | undefined;
|
|
1129
|
+
setDate: (date: Date | undefined) => void;
|
|
1130
|
+
hideSeconds?: boolean;
|
|
1131
|
+
enableButton?: boolean;
|
|
1132
|
+
}
|
|
1133
|
+
declare function TimePicker({ date, setDate, hideSeconds, enableButton, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* regular expression to check for valid hour format (01-23)
|
|
1137
|
+
*/
|
|
1138
|
+
declare function isValidHour(value: string): boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* regular expression to check for valid 12 hour format (01-12)
|
|
1141
|
+
*/
|
|
1142
|
+
declare function isValid12Hour(value: string): boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* regular expression to check for valid minute format (00-59)
|
|
1145
|
+
*/
|
|
1146
|
+
declare function isValidMinuteOrSecond(value: string): boolean;
|
|
1147
|
+
type GetValidNumberConfig = {
|
|
1148
|
+
max: number;
|
|
1149
|
+
min?: number;
|
|
1150
|
+
loop?: boolean;
|
|
1151
|
+
};
|
|
1152
|
+
declare function getValidNumber(value: string, { max, min, loop }: GetValidNumberConfig): string;
|
|
1153
|
+
declare function getValidHour(value: string): string;
|
|
1154
|
+
declare function getValid12Hour(value: string): string;
|
|
1155
|
+
declare function getValidMinuteOrSecond(value: string): string;
|
|
1156
|
+
type GetValidArrowNumberConfig = {
|
|
1157
|
+
min: number;
|
|
1158
|
+
max: number;
|
|
1159
|
+
step: number;
|
|
1160
|
+
};
|
|
1161
|
+
declare function getValidArrowNumber(value: string, { min, max, step }: GetValidArrowNumberConfig): string;
|
|
1162
|
+
declare function getValidArrowHour(value: string, step: number): string;
|
|
1163
|
+
declare function getValidArrow12Hour(value: string, step: number): string;
|
|
1164
|
+
declare function getValidArrowMinuteOrSecond(value: string, step: number): string;
|
|
1165
|
+
declare function setMinutes(date: Date, value: string): Date;
|
|
1166
|
+
declare function setSeconds(date: Date, value: string): Date;
|
|
1167
|
+
declare function setHours(date: Date, value: string): Date;
|
|
1168
|
+
declare function set12Hours(date: Date, value: string, period: Period): Date;
|
|
1169
|
+
type TimePickerType = "minutes" | "seconds" | "hours" | "12hours";
|
|
1170
|
+
type Period = "AM" | "PM";
|
|
1171
|
+
declare function setDateByType(date: Date, value: string, type: TimePickerType, period?: Period): Date;
|
|
1172
|
+
declare function getDateByType(date: Date, type: TimePickerType): string;
|
|
1173
|
+
declare function getArrowByType(value: string, step: number, type: TimePickerType): string;
|
|
1174
|
+
/**
|
|
1175
|
+
* handles value change of 12-hour input
|
|
1176
|
+
* 12:00 PM is 12:00
|
|
1177
|
+
* 12:00 AM is 00:00
|
|
1178
|
+
*/
|
|
1179
|
+
declare function convert12HourTo24Hour(hour: number, period: Period): number;
|
|
1180
|
+
/**
|
|
1181
|
+
* time is stored in the 24-hour form,
|
|
1182
|
+
* but needs to be displayed to the user
|
|
1183
|
+
* in its 12-hour representation
|
|
1184
|
+
*/
|
|
1185
|
+
declare function display12HourValue(hours: number): string;
|
|
1186
|
+
|
|
1187
|
+
interface TimePickerInputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
1188
|
+
picker: TimePickerType;
|
|
1189
|
+
date: Date | undefined;
|
|
1190
|
+
setDate: (date: Date | undefined) => void;
|
|
1191
|
+
period?: Period;
|
|
1192
|
+
onRightFocus?: () => void;
|
|
1193
|
+
onLeftFocus?: () => void;
|
|
1194
|
+
showArrows?: boolean;
|
|
1195
|
+
label?: string;
|
|
1196
|
+
error?: boolean;
|
|
1197
|
+
inputSize?: "sm" | "md" | "lg";
|
|
1198
|
+
enableButton?: boolean;
|
|
1199
|
+
buttonText?: string;
|
|
1200
|
+
buttonIcon?: React__default.ReactNode;
|
|
1201
|
+
}
|
|
1202
|
+
declare const TimePickerInput: React__default.ForwardRefExoticComponent<TimePickerInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1203
|
+
|
|
1204
|
+
declare function ContextMenuBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1205
|
+
declare function ContextMenuTriggerBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1206
|
+
declare function ContextMenuGroupBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1207
|
+
declare function ContextMenuPortalBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1208
|
+
declare function ContextMenuSubBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
1209
|
+
declare function ContextMenuRadioGroupBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
1210
|
+
declare function ContextMenuSubTriggerBase({ className, inset, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
1211
|
+
inset?: boolean;
|
|
1212
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1213
|
+
declare function ContextMenuSubContentBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
1214
|
+
declare function ContextMenuContentBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1215
|
+
declare function ContextMenuItemBase({ className, inset, variant, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
1216
|
+
inset?: boolean;
|
|
1217
|
+
variant?: "default" | "destructive";
|
|
1218
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1219
|
+
declare function ContextMenuCheckboxItemBase({ className, children, checked, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
1220
|
+
declare function ContextMenuRadioItemBase({ className, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
1221
|
+
declare function ContextMenuLabelBase({ className, inset, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
1222
|
+
inset?: boolean;
|
|
1223
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1224
|
+
declare function ContextMenuSeparatorBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1225
|
+
declare function ContextMenuShortcutBase({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1226
|
+
|
|
1088
1227
|
declare function useIsMobile(): boolean;
|
|
1089
1228
|
|
|
1090
1229
|
interface Position {
|
|
@@ -1104,4 +1243,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
1104
1243
|
isDragging: boolean;
|
|
1105
1244
|
};
|
|
1106
1245
|
|
|
1107
|
-
export { AddButton, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BackButton, BadgeBase, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, type CalendarProps, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPrevious, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, CopyButton, type DebouncedInputProps, DeleteButton, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, 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, EditButton, ErrorMessage, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, 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, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, badgeVariants, buttonVariantsBase, compactTick, detectDataFields, detectXAxis, formatFieldName, generateAdditionalColors, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, toast, useChartHighlights, useDrag, useIsMobile, useTheme };
|
|
1246
|
+
export { AddButton, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BackButton, BadgeBase, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, type CalendarProps, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPrevious, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, 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, type DebouncedInputProps, DeleteButton, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, 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, EditButton, ErrorMessage, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, 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, 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, SwitchBase, 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, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getArrowByType, getDateByType, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, toast, useChartHighlights, useDrag, useIsMobile, useTheme, type valueFormatter };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
6
6
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
|
-
import { DayPicker } from 'react-day-picker';
|
|
8
|
+
import { DayPicker, DateRange } from 'react-day-picker';
|
|
9
9
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import { DialogProps } from '@radix-ui/react-dialog';
|
|
@@ -26,6 +26,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
26
26
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
27
27
|
import { Drawer } from 'vaul';
|
|
28
28
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
29
30
|
|
|
30
31
|
type ErrorMessageProps = {
|
|
31
32
|
error?: string;
|
|
@@ -150,51 +151,6 @@ interface SelectPropsWithGroupItems<T extends string> extends DefaultSelectProps
|
|
|
150
151
|
type SelectProps<T extends string> = SelectPropsWithItems<T> | SelectPropsWithGroupItems<T>;
|
|
151
152
|
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
152
153
|
|
|
153
|
-
interface ChartData {
|
|
154
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
155
|
-
}
|
|
156
|
-
interface XAxisConfig$1 {
|
|
157
|
-
dataKey: string;
|
|
158
|
-
label?: string;
|
|
159
|
-
formatter?: (value: string | number) => string;
|
|
160
|
-
autoLabel?: boolean;
|
|
161
|
-
}
|
|
162
|
-
type SeriesProp = {
|
|
163
|
-
bar?: string[];
|
|
164
|
-
line?: string[];
|
|
165
|
-
area?: string[];
|
|
166
|
-
};
|
|
167
|
-
interface ChartProps {
|
|
168
|
-
data: ChartData[];
|
|
169
|
-
series?: SeriesProp;
|
|
170
|
-
className?: string;
|
|
171
|
-
chartMargin?: Partial<{
|
|
172
|
-
top: number;
|
|
173
|
-
right: number;
|
|
174
|
-
left: number;
|
|
175
|
-
bottom: number;
|
|
176
|
-
}>;
|
|
177
|
-
height?: number;
|
|
178
|
-
width?: number | string;
|
|
179
|
-
colors?: string[];
|
|
180
|
-
gridColor?: string;
|
|
181
|
-
showGrid?: boolean;
|
|
182
|
-
showTooltip?: boolean;
|
|
183
|
-
showLegend?: boolean;
|
|
184
|
-
title?: string;
|
|
185
|
-
titlePosition?: "left" | "center" | "right";
|
|
186
|
-
showLabels?: boolean;
|
|
187
|
-
labelMap?: Record<string, string>;
|
|
188
|
-
xAxis?: XAxisConfig$1 | string;
|
|
189
|
-
enableHighlights?: boolean;
|
|
190
|
-
enableShowOnly?: boolean;
|
|
191
|
-
enablePeriodsDropdown?: boolean;
|
|
192
|
-
enableDraggableTooltips?: boolean;
|
|
193
|
-
showTooltipTotal?: boolean;
|
|
194
|
-
maxTooltips?: number;
|
|
195
|
-
}
|
|
196
|
-
declare const Chart: React__default.FC<ChartProps>;
|
|
197
|
-
|
|
198
154
|
declare const formatFieldName: (fieldName: string) => string;
|
|
199
155
|
declare const detectDataFields: (data: Record<string, unknown>[], xAxisKey: string) => string[];
|
|
200
156
|
declare const detectXAxis: (data: Record<string, unknown>[]) => string;
|
|
@@ -239,7 +195,58 @@ type LabelRendererProps = {
|
|
|
239
195
|
cx?: number | string;
|
|
240
196
|
cy?: number | string;
|
|
241
197
|
};
|
|
242
|
-
|
|
198
|
+
type valueFormatter = (props: {
|
|
199
|
+
value: number | string | undefined;
|
|
200
|
+
formattedValue: string;
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}) => string;
|
|
203
|
+
declare const renderPillLabel: (color: string, variant: Variant, valueFormatter?: valueFormatter) => (props: LabelRendererProps) => react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
205
|
+
interface ChartData {
|
|
206
|
+
[key: string]: string | number | boolean | null | undefined;
|
|
207
|
+
}
|
|
208
|
+
interface XAxisConfig$1 {
|
|
209
|
+
dataKey: string;
|
|
210
|
+
label?: string;
|
|
211
|
+
valueFormatter?: (value: string | number) => string;
|
|
212
|
+
autoLabel?: boolean;
|
|
213
|
+
}
|
|
214
|
+
type SeriesProp = {
|
|
215
|
+
bar?: string[];
|
|
216
|
+
line?: string[];
|
|
217
|
+
area?: string[];
|
|
218
|
+
};
|
|
219
|
+
interface ChartProps {
|
|
220
|
+
data: ChartData[];
|
|
221
|
+
series?: SeriesProp;
|
|
222
|
+
className?: string;
|
|
223
|
+
chartMargin?: Partial<{
|
|
224
|
+
top: number;
|
|
225
|
+
right: number;
|
|
226
|
+
left: number;
|
|
227
|
+
bottom: number;
|
|
228
|
+
}>;
|
|
229
|
+
height?: number;
|
|
230
|
+
width?: number | string;
|
|
231
|
+
colors?: string[];
|
|
232
|
+
gridColor?: string;
|
|
233
|
+
showGrid?: boolean;
|
|
234
|
+
showTooltip?: boolean;
|
|
235
|
+
showLegend?: boolean;
|
|
236
|
+
title?: string;
|
|
237
|
+
titlePosition?: "left" | "center" | "right";
|
|
238
|
+
showLabels?: boolean;
|
|
239
|
+
labelMap?: Record<string, string>;
|
|
240
|
+
valueFormatter?: valueFormatter;
|
|
241
|
+
xAxis?: XAxisConfig$1 | string;
|
|
242
|
+
enableHighlights?: boolean;
|
|
243
|
+
enableShowOnly?: boolean;
|
|
244
|
+
enablePeriodsDropdown?: boolean;
|
|
245
|
+
enableDraggableTooltips?: boolean;
|
|
246
|
+
showTooltipTotal?: boolean;
|
|
247
|
+
maxTooltips?: number;
|
|
248
|
+
}
|
|
249
|
+
declare const Chart: React__default.FC<ChartProps>;
|
|
243
250
|
|
|
244
251
|
interface BarChartData {
|
|
245
252
|
[key: string]: string | number | boolean | null | undefined;
|
|
@@ -247,13 +254,13 @@ interface BarChartData {
|
|
|
247
254
|
interface XAxisConfig {
|
|
248
255
|
dataKey: string;
|
|
249
256
|
label?: string;
|
|
250
|
-
|
|
257
|
+
valueFormatter?: (value: string | number) => string;
|
|
251
258
|
autoLabel?: boolean;
|
|
252
259
|
}
|
|
253
260
|
interface DataMapper {
|
|
254
261
|
[dataKey: string]: {
|
|
255
262
|
label?: string;
|
|
256
|
-
|
|
263
|
+
valueFormatter?: (value: string | number) => string | number;
|
|
257
264
|
color?: string;
|
|
258
265
|
type?: "number" | "string" | "auto";
|
|
259
266
|
visible?: boolean;
|
|
@@ -359,7 +366,7 @@ declare const ShowOnly: React__default.FC<Props$3>;
|
|
|
359
366
|
|
|
360
367
|
interface MapperEntry {
|
|
361
368
|
label?: string;
|
|
362
|
-
|
|
369
|
+
valueFormatter?: (value: string | number) => string | number;
|
|
363
370
|
color?: string;
|
|
364
371
|
type?: string;
|
|
365
372
|
visible?: boolean;
|
|
@@ -411,6 +418,7 @@ interface DraggableTooltipProps {
|
|
|
411
418
|
highlightedSeries?: Set<string>;
|
|
412
419
|
toggleHighlight?: (key: string) => void;
|
|
413
420
|
showOnlyHighlighted?: boolean;
|
|
421
|
+
valueFormatter?: valueFormatter;
|
|
414
422
|
}
|
|
415
423
|
declare const DraggableTooltip: React__default.NamedExoticComponent<DraggableTooltipProps>;
|
|
416
424
|
|
|
@@ -427,6 +435,7 @@ interface Props$1 {
|
|
|
427
435
|
finalColors?: Record<string, string>;
|
|
428
436
|
periodLabel?: string;
|
|
429
437
|
totalLabel?: string;
|
|
438
|
+
valueFormatter?: valueFormatter;
|
|
430
439
|
}
|
|
431
440
|
declare const RechartTooltipWithTotal: React__default.FC<Props$1>;
|
|
432
441
|
|
|
@@ -442,6 +451,7 @@ interface Props {
|
|
|
442
451
|
label?: string;
|
|
443
452
|
finalColors?: Record<string, string>;
|
|
444
453
|
periodLabel?: string;
|
|
454
|
+
valueFormatter?: valueFormatter;
|
|
445
455
|
}
|
|
446
456
|
declare const TooltipSimple: React__default.FC<Props>;
|
|
447
457
|
|
|
@@ -1085,6 +1095,135 @@ interface UniversalTooltipRendererProps {
|
|
|
1085
1095
|
}
|
|
1086
1096
|
declare const UniversalTooltipRenderer: React__default.FC<UniversalTooltipRendererProps>;
|
|
1087
1097
|
|
|
1098
|
+
interface DateTimePickerProps extends ErrorMessageProps {
|
|
1099
|
+
label?: string;
|
|
1100
|
+
date: Date | undefined;
|
|
1101
|
+
onChange: (date: Date | undefined) => void;
|
|
1102
|
+
display?: boolean;
|
|
1103
|
+
hideSeconds?: boolean;
|
|
1104
|
+
hideHour?: boolean;
|
|
1105
|
+
hideMinute?: boolean;
|
|
1106
|
+
fromDate?: Date;
|
|
1107
|
+
toDate?: Date;
|
|
1108
|
+
disabled?: boolean;
|
|
1109
|
+
className?: string;
|
|
1110
|
+
error?: string;
|
|
1111
|
+
}
|
|
1112
|
+
declare function DateTimePicker({ label, date, onChange, display, hideSeconds, hideHour, hideMinute, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1113
|
+
|
|
1114
|
+
interface RangePickerProps extends ErrorMessageProps {
|
|
1115
|
+
value?: DateRange;
|
|
1116
|
+
onChange?: (range: DateRange | undefined) => void;
|
|
1117
|
+
label?: string;
|
|
1118
|
+
minDate?: Date;
|
|
1119
|
+
maxDate?: Date;
|
|
1120
|
+
error?: string | undefined;
|
|
1121
|
+
}
|
|
1122
|
+
declare function RangePicker({ value, onChange, label, minDate, maxDate, error, }: RangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1123
|
+
declare namespace RangePicker {
|
|
1124
|
+
var displayName: string;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
interface TimePickerProps {
|
|
1128
|
+
date: Date | undefined;
|
|
1129
|
+
setDate: (date: Date | undefined) => void;
|
|
1130
|
+
hideSeconds?: boolean;
|
|
1131
|
+
enableButton?: boolean;
|
|
1132
|
+
}
|
|
1133
|
+
declare function TimePicker({ date, setDate, hideSeconds, enableButton, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* regular expression to check for valid hour format (01-23)
|
|
1137
|
+
*/
|
|
1138
|
+
declare function isValidHour(value: string): boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* regular expression to check for valid 12 hour format (01-12)
|
|
1141
|
+
*/
|
|
1142
|
+
declare function isValid12Hour(value: string): boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* regular expression to check for valid minute format (00-59)
|
|
1145
|
+
*/
|
|
1146
|
+
declare function isValidMinuteOrSecond(value: string): boolean;
|
|
1147
|
+
type GetValidNumberConfig = {
|
|
1148
|
+
max: number;
|
|
1149
|
+
min?: number;
|
|
1150
|
+
loop?: boolean;
|
|
1151
|
+
};
|
|
1152
|
+
declare function getValidNumber(value: string, { max, min, loop }: GetValidNumberConfig): string;
|
|
1153
|
+
declare function getValidHour(value: string): string;
|
|
1154
|
+
declare function getValid12Hour(value: string): string;
|
|
1155
|
+
declare function getValidMinuteOrSecond(value: string): string;
|
|
1156
|
+
type GetValidArrowNumberConfig = {
|
|
1157
|
+
min: number;
|
|
1158
|
+
max: number;
|
|
1159
|
+
step: number;
|
|
1160
|
+
};
|
|
1161
|
+
declare function getValidArrowNumber(value: string, { min, max, step }: GetValidArrowNumberConfig): string;
|
|
1162
|
+
declare function getValidArrowHour(value: string, step: number): string;
|
|
1163
|
+
declare function getValidArrow12Hour(value: string, step: number): string;
|
|
1164
|
+
declare function getValidArrowMinuteOrSecond(value: string, step: number): string;
|
|
1165
|
+
declare function setMinutes(date: Date, value: string): Date;
|
|
1166
|
+
declare function setSeconds(date: Date, value: string): Date;
|
|
1167
|
+
declare function setHours(date: Date, value: string): Date;
|
|
1168
|
+
declare function set12Hours(date: Date, value: string, period: Period): Date;
|
|
1169
|
+
type TimePickerType = "minutes" | "seconds" | "hours" | "12hours";
|
|
1170
|
+
type Period = "AM" | "PM";
|
|
1171
|
+
declare function setDateByType(date: Date, value: string, type: TimePickerType, period?: Period): Date;
|
|
1172
|
+
declare function getDateByType(date: Date, type: TimePickerType): string;
|
|
1173
|
+
declare function getArrowByType(value: string, step: number, type: TimePickerType): string;
|
|
1174
|
+
/**
|
|
1175
|
+
* handles value change of 12-hour input
|
|
1176
|
+
* 12:00 PM is 12:00
|
|
1177
|
+
* 12:00 AM is 00:00
|
|
1178
|
+
*/
|
|
1179
|
+
declare function convert12HourTo24Hour(hour: number, period: Period): number;
|
|
1180
|
+
/**
|
|
1181
|
+
* time is stored in the 24-hour form,
|
|
1182
|
+
* but needs to be displayed to the user
|
|
1183
|
+
* in its 12-hour representation
|
|
1184
|
+
*/
|
|
1185
|
+
declare function display12HourValue(hours: number): string;
|
|
1186
|
+
|
|
1187
|
+
interface TimePickerInputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
1188
|
+
picker: TimePickerType;
|
|
1189
|
+
date: Date | undefined;
|
|
1190
|
+
setDate: (date: Date | undefined) => void;
|
|
1191
|
+
period?: Period;
|
|
1192
|
+
onRightFocus?: () => void;
|
|
1193
|
+
onLeftFocus?: () => void;
|
|
1194
|
+
showArrows?: boolean;
|
|
1195
|
+
label?: string;
|
|
1196
|
+
error?: boolean;
|
|
1197
|
+
inputSize?: "sm" | "md" | "lg";
|
|
1198
|
+
enableButton?: boolean;
|
|
1199
|
+
buttonText?: string;
|
|
1200
|
+
buttonIcon?: React__default.ReactNode;
|
|
1201
|
+
}
|
|
1202
|
+
declare const TimePickerInput: React__default.ForwardRefExoticComponent<TimePickerInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1203
|
+
|
|
1204
|
+
declare function ContextMenuBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1205
|
+
declare function ContextMenuTriggerBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1206
|
+
declare function ContextMenuGroupBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1207
|
+
declare function ContextMenuPortalBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1208
|
+
declare function ContextMenuSubBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
1209
|
+
declare function ContextMenuRadioGroupBase(props: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
1210
|
+
declare function ContextMenuSubTriggerBase({ className, inset, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
1211
|
+
inset?: boolean;
|
|
1212
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1213
|
+
declare function ContextMenuSubContentBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
1214
|
+
declare function ContextMenuContentBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1215
|
+
declare function ContextMenuItemBase({ className, inset, variant, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
1216
|
+
inset?: boolean;
|
|
1217
|
+
variant?: "default" | "destructive";
|
|
1218
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1219
|
+
declare function ContextMenuCheckboxItemBase({ className, children, checked, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
1220
|
+
declare function ContextMenuRadioItemBase({ className, children, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
1221
|
+
declare function ContextMenuLabelBase({ className, inset, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
1222
|
+
inset?: boolean;
|
|
1223
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1224
|
+
declare function ContextMenuSeparatorBase({ className, ...props }: React$1.ComponentProps<typeof ContextMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1225
|
+
declare function ContextMenuShortcutBase({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1226
|
+
|
|
1088
1227
|
declare function useIsMobile(): boolean;
|
|
1089
1228
|
|
|
1090
1229
|
interface Position {
|
|
@@ -1104,4 +1243,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
1104
1243
|
isDragging: boolean;
|
|
1105
1244
|
};
|
|
1106
1245
|
|
|
1107
|
-
export { AddButton, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BackButton, BadgeBase, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, type CalendarProps, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPrevious, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, CopyButton, type DebouncedInputProps, DeleteButton, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, 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, EditButton, ErrorMessage, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, 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, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, badgeVariants, buttonVariantsBase, compactTick, detectDataFields, detectXAxis, formatFieldName, generateAdditionalColors, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, toast, useChartHighlights, useDrag, useIsMobile, useTheme };
|
|
1246
|
+
export { AddButton, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BackButton, BadgeBase, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, type CalendarProps, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPrevious, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, 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, type DebouncedInputProps, DeleteButton, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, 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, EditButton, ErrorMessage, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, 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, 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, SwitchBase, 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, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getArrowByType, getDateByType, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, toast, useChartHighlights, useDrag, useIsMobile, useTheme, type valueFormatter };
|