@jacshuo/onyx 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { ClassValue } from 'clsx';
3
3
  import { Dispatch } from 'react';
4
4
  import { JSX } from 'react/jsx-runtime';
5
5
  import { default as React_2 } from 'react';
6
+ import { RefObject } from 'react';
6
7
  import { SetStateAction } from 'react';
7
8
  import { VariantProps } from 'class-variance-authority';
8
9
 
@@ -122,6 +123,8 @@ export { alertVariants }
122
123
  export { alertVariants as alertVariants_alias_1 }
123
124
  export { alertVariants as alertVariants_alias_2 }
124
125
 
126
+ export declare function applyOffset(base: Date, amount: number, unit: OffsetUnit, direction: OffsetDirection): Date;
127
+
125
128
  declare function Avatar({ src, alt, initials, size, shape, status, className, ...props }: AvatarProps): JSX.Element;
126
129
  export { Avatar }
127
130
  export { Avatar as Avatar_alias_1 }
@@ -330,6 +333,11 @@ export { buttonVariants }
330
333
  export { buttonVariants as buttonVariants_alias_1 }
331
334
  export { buttonVariants as buttonVariants_alias_2 }
332
335
 
336
+ export declare interface CalendarDay {
337
+ date: Date;
338
+ thisMonth: boolean;
339
+ }
340
+
333
341
  declare function Card({ intent, size, className, ...props }: CardProps): JSX.Element;
334
342
  export { Card }
335
343
  export { Card as Card_alias_1 }
@@ -562,6 +570,8 @@ export { CinePlayerSortKey }
562
570
  export { CinePlayerSortKey as CinePlayerSortKey_alias_1 }
563
571
  export { CinePlayerSortKey as CinePlayerSortKey_alias_2 }
564
572
 
573
+ export declare function clampDate(date: Date, min?: Date, max?: Date): Date;
574
+
565
575
  /** Computes a padded [min, max] range from raw data extents. */
566
576
  export declare function clampRange(min: number, max: number, padding?: number): [number, number];
567
577
 
@@ -877,6 +887,63 @@ export { DataTableProps }
877
887
  export { DataTableProps as DataTableProps_alias_1 }
878
888
  export { DataTableProps as DataTableProps_alias_2 }
879
889
 
890
+ declare type DateTimeMode = "date" | "time" | "datetime";
891
+ export { DateTimeMode }
892
+ export { DateTimeMode as DateTimeMode_alias_1 }
893
+ export { DateTimeMode as DateTimeMode_alias_2 }
894
+ export { DateTimeMode as DateTimeMode_alias_3 }
895
+
896
+ declare function DateTimePicker({ className, popupClassName, triggerClassName, disabled, placeholder, ...restProps }: DateTimePickerProps): JSX.Element;
897
+ export { DateTimePicker }
898
+ export { DateTimePicker as DateTimePicker_alias_1 }
899
+ export { DateTimePicker as DateTimePicker_alias_2 }
900
+ export { DateTimePicker as DateTimePicker_alias_3 }
901
+
902
+ declare interface DateTimePickerProps {
903
+ /** Controlled selected date/time value. */
904
+ value?: Date | null;
905
+ /** Uncontrolled initial value. */
906
+ defaultValue?: Date | null;
907
+ /** Called when the user confirms a new selection. */
908
+ onChange?: (date: Date | null) => void;
909
+ /** Picker mode: date only, time only, or full datetime. Default "datetime". */
910
+ mode?: DateTimeMode;
911
+ /** Minimum selectable date (inclusive). */
912
+ minDate?: Date;
913
+ /** Maximum selectable date (inclusive). */
914
+ maxDate?: Date;
915
+ /** Disable the trigger and prevent all interaction. */
916
+ disabled?: boolean;
917
+ /** Placeholder text in the trigger when no value is selected. */
918
+ placeholder?: string;
919
+ /**
920
+ * Display-format string.
921
+ * Tokens: YYYY YY MMMM MMM MM M DD D HH H hh h mm ss A a
922
+ * @example "YYYY-MM-DD HH:mm:ss"
923
+ */
924
+ format?: string;
925
+ /** Use 24-hour clock. false → 12-hour with AM/PM column. Default true. */
926
+ use24Hour?: boolean;
927
+ /** Show seconds column when mode includes time. Default true. */
928
+ showSeconds?: boolean;
929
+ /** BCP-47 locale tag for month/weekday names. Default "en-US". */
930
+ locale?: string;
931
+ /** Extra class applied to the root wrapper element. */
932
+ className?: string;
933
+ /** Extra class applied to the frosted-glass popup panel. */
934
+ popupClassName?: string;
935
+ /** Extra class applied to the trigger button. */
936
+ triggerClassName?: string;
937
+ /** Called when the picker popup opens. */
938
+ onOpen?: () => void;
939
+ /** Called when the picker popup closes (cancel OR confirm). */
940
+ onClose?: () => void;
941
+ }
942
+ export { DateTimePickerProps }
943
+ export { DateTimePickerProps as DateTimePickerProps_alias_1 }
944
+ export { DateTimePickerProps as DateTimePickerProps_alias_2 }
945
+ export { DateTimePickerProps as DateTimePickerProps_alias_3 }
946
+
880
947
  export declare const default_alias: {
881
948
  Primitives: {
882
949
  Button: Button;
@@ -946,6 +1013,7 @@ export declare const default_alias: {
946
1013
  TypewriterText: TypewriterText;
947
1014
  CommandPalette: CommandPalette;
948
1015
  Timeline: Timeline;
1016
+ DateTimePicker: DateTimePicker;
949
1017
  };
950
1018
  Forms: {
951
1019
  Form: Form;
@@ -1002,6 +1070,10 @@ export declare function default_alias_119(): JSX.Element;
1002
1070
 
1003
1071
  export declare function default_alias_12(): JSX.Element;
1004
1072
 
1073
+ export declare function default_alias_120(): JSX.Element;
1074
+
1075
+ export declare function default_alias_121(): JSX.Element;
1076
+
1005
1077
  export declare function default_alias_13(): JSX.Element;
1006
1078
 
1007
1079
  export declare function default_alias_14(): JSX.Element;
@@ -1496,6 +1568,7 @@ declare const Extras: {
1496
1568
  TypewriterText: typeof TypewriterText;
1497
1569
  CommandPalette: typeof CommandPalette;
1498
1570
  Timeline: typeof Timeline;
1571
+ DateTimePicker: typeof DateTimePicker;
1499
1572
  };
1500
1573
  export { Extras }
1501
1574
  export { Extras as Extras_alias_1 }
@@ -1704,6 +1777,8 @@ export { Form as Form_alias_3 }
1704
1777
  /** Formats an axis value using an optional custom formatter. */
1705
1778
  export declare function formatAxisValue(v: number | string, formatter?: (v: number | string) => string): string;
1706
1779
 
1780
+ export declare function formatDate(date: Date, format: string, locale?: string): string;
1781
+
1707
1782
  declare function FormItem({ label, layout: itemLayout, required, hint, validation, name, onValidate, className, children, }: FormItemProps): JSX.Element;
1708
1783
  export { FormItem }
1709
1784
  export { FormItem as FormItem_alias_1 }
@@ -1846,12 +1921,24 @@ declare const formVariants: (props?: ({
1846
1921
  export { formVariants }
1847
1922
  export { formVariants as formVariants_alias_1 }
1848
1923
 
1924
+ export declare function getCalendarDays(year: number, month: number): CalendarDay[];
1925
+
1926
+ export declare function getDaysInMonth(year: number, month: number): number;
1927
+
1928
+ export declare function getDefaultFormat(mode: DateTimeMode, use24Hour?: boolean, showSeconds?: boolean): string;
1929
+
1849
1930
  /** Returns an array of CSS custom property references for chart series colors. */
1850
1931
  export declare function getDefaultPalette(count: number): string[];
1851
1932
 
1933
+ export declare function getMonthNames(locale?: string, format?: "long" | "short"): string[];
1934
+
1935
+ export declare function getWeekdayNames(locale?: string, format?: "long" | "narrow" | "short"): string[];
1936
+
1852
1937
  /** Gets the y value for a series at a given category key. */
1853
1938
  export declare function getYAtCategory(series: ChartSeries, category: string): number | undefined;
1854
1939
 
1940
+ export declare function getYearRange(center: number, span?: number): number[];
1941
+
1855
1942
  declare function Header({ brand, onBrandClick, navItems, actions, linkComponent: Link, height, mobileMenu, navMenuIcon, actionsMenuIcon, className, children, }: HeaderProps): JSX.Element;
1856
1943
  export { Header }
1857
1944
  export { Header as Header_alias_1 }
@@ -2063,9 +2150,19 @@ export { inputVariants }
2063
2150
  export { inputVariants as inputVariants_alias_1 }
2064
2151
  export { inputVariants as inputVariants_alias_2 }
2065
2152
 
2153
+ export declare function isAfterDay(a: Date, b: Date): boolean;
2154
+
2155
+ export declare function isBeforeDay(a: Date, b: Date): boolean;
2156
+
2157
+ export declare function isSameDay(a: Date, b: Date): boolean;
2158
+
2066
2159
  /** Returns true if any data point in the series has a string x value. */
2067
2160
  export declare function isSeriesCategorical(series: ChartSeries[]): boolean;
2068
2161
 
2162
+ export declare function isToday(date: Date): boolean;
2163
+
2164
+ export declare const ITEM_H = 40;
2165
+
2069
2166
  declare function Label({ intent, size, className, ...props }: LabelProps): JSX.Element;
2070
2167
  export { Label }
2071
2168
  export { Label as Label_alias_1 }
@@ -2362,6 +2459,18 @@ export { navLinkVariants }
2362
2459
  export { navLinkVariants as navLinkVariants_alias_1 }
2363
2460
  export { navLinkVariants as navLinkVariants_alias_2 }
2364
2461
 
2462
+ declare type OffsetDirection = "future" | "past";
2463
+ export { OffsetDirection }
2464
+ export { OffsetDirection as OffsetDirection_alias_1 }
2465
+ export { OffsetDirection as OffsetDirection_alias_2 }
2466
+ export { OffsetDirection as OffsetDirection_alias_3 }
2467
+
2468
+ declare type OffsetUnit = "day" | "week" | "month" | "year";
2469
+ export { OffsetUnit }
2470
+ export { OffsetUnit as OffsetUnit_alias_1 }
2471
+ export { OffsetUnit as OffsetUnit_alias_2 }
2472
+ export { OffsetUnit as OffsetUnit_alias_3 }
2473
+
2365
2474
  declare const Overlay: {
2366
2475
  Dialog: typeof Dialog;
2367
2476
  Tooltip: typeof Tooltip;
@@ -2758,7 +2867,7 @@ export declare const selectVariants: (props?: ({
2758
2867
  size?: "sm" | "md" | "lg" | null | undefined;
2759
2868
  } & ClassProp) | undefined) => string;
2760
2869
 
2761
- declare function SideNav({ items, title, basePath, onItemClick, LinkComponent, collapsible, collapseMode: controlledMode, defaultCollapseMode, onCollapseModeChange, showLines, expandedKeys: controlledExpandedKeys, defaultExpandedKeys, onExpandedKeysChange, className, responsive, mobileBreakpoint, mobileTopOffset, ...props }: SideNavProps): JSX.Element;
2870
+ declare function SideNav({ items, title, basePath, onItemClick, LinkComponent, collapsible, collapseMode: controlledMode, defaultCollapseMode, onCollapseModeChange, showLines, expandedKeys: controlledExpandedKeys, defaultExpandedKeys, onExpandedKeysChange, className, responsive, mobileBreakpoint, mobileTopOffset, mobileDrawerSlot, ...props }: SideNavProps): JSX.Element;
2762
2871
  export { SideNav }
2763
2872
  export { SideNav as SideNav_alias_1 }
2764
2873
  export { SideNav as SideNav_alias_2 }
@@ -2849,6 +2958,12 @@ declare interface SideNavProps extends React_2.HTMLAttributes<HTMLElement> {
2849
2958
  * Set this to the height of your app's top bar. @default 48
2850
2959
  */
2851
2960
  mobileTopOffset?: number;
2961
+ /**
2962
+ * Optional slot rendered inside the mobile slide-in drawer, between the
2963
+ * header row and the scrollable nav body. Use it to inject a search input
2964
+ * or other controls that should appear on mobile too.
2965
+ */
2966
+ mobileDrawerSlot?: React_2.ReactNode;
2852
2967
  }
2853
2968
  export { SideNavProps }
2854
2969
  export { SideNavProps as SideNavProps_alias_1 }
@@ -2908,7 +3023,7 @@ export declare interface SliceSpec {
2908
3023
  cy: number;
2909
3024
  }
2910
3025
 
2911
- declare function Slider({ mode, value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, ...props }: SliderProps): JSX.Element;
3026
+ declare function Slider({ mode, value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, id: propId, ...props }: SliderProps): JSX.Element;
2912
3027
  export { Slider }
2913
3028
  export { Slider as Slider_alias_1 }
2914
3029
  export { Slider as Slider_alias_2 }
@@ -2936,7 +3051,7 @@ export { SliderProps }
2936
3051
  export { SliderProps as SliderProps_alias_1 }
2937
3052
  export { SliderProps as SliderProps_alias_2 }
2938
3053
 
2939
- declare function SliderRange({ value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, ...props }: SliderRangeProps): JSX.Element;
3054
+ declare function SliderRange({ value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, id: propId, ...props }: SliderRangeProps): JSX.Element;
2940
3055
  export { SliderRange }
2941
3056
  export { SliderRange as SliderRange_alias_1 }
2942
3057
  export { SliderRange as SliderRange_alias_2 }
@@ -3611,6 +3726,53 @@ export declare function useCommandPalette(commands: CommandItem[], open: boolean
3611
3726
  handleKeyDown: (e: React.KeyboardEvent) => void;
3612
3727
  };
3613
3728
 
3729
+ export declare function useDateTimePicker(props: DateTimePickerProps): {
3730
+ isOpen: boolean;
3731
+ displayValue: string;
3732
+ workingDate: Date;
3733
+ view: "drum" | "calendar";
3734
+ calYear: number;
3735
+ calMonth: number;
3736
+ offsetAmount: number;
3737
+ offsetUnit: OffsetUnit;
3738
+ offsetDirection: OffsetDirection;
3739
+ mode: DateTimeMode;
3740
+ use24Hour: boolean;
3741
+ showSeconds: boolean;
3742
+ locale: string;
3743
+ minDate: Date | undefined;
3744
+ maxDate: Date | undefined;
3745
+ openPicker: () => void;
3746
+ closePicker: () => void;
3747
+ confirm: () => void;
3748
+ clear: () => void;
3749
+ updateField: (field: "year" | "month" | "day" | "hour" | "minute" | "second", val: number) => void;
3750
+ setView: Dispatch<SetStateAction<"drum" | "calendar">>;
3751
+ setCalYear: Dispatch<SetStateAction<number>>;
3752
+ setCalMonth: Dispatch<SetStateAction<number>>;
3753
+ setOffsetAmount: Dispatch<SetStateAction<number>>;
3754
+ setOffsetUnit: Dispatch<SetStateAction<OffsetUnit>>;
3755
+ setOffsetDirection: Dispatch<SetStateAction<OffsetDirection>>;
3756
+ applyQuickOffset: () => void;
3757
+ navigateCalendar: (dir: -1 | 1) => void;
3758
+ };
3759
+
3760
+ export declare function useOutsideClick(refs: ReadonlyArray<{
3761
+ readonly current: Element | null;
3762
+ }>, callback: () => void, enabled?: boolean): void;
3763
+
3764
+ export declare function usePositioning(anchorRef: {
3765
+ readonly current: Element | null;
3766
+ }, popupRef: {
3767
+ readonly current: HTMLElement | null;
3768
+ }, isOpen: boolean): void;
3769
+
3770
+ export declare function useScrollColumn(containerRef: React.RefObject<HTMLDivElement | null>, count: number, onSelectIndex: (idx: number) => void): {
3771
+ scrollToIndex: (index: number, behavior?: "smooth" | "instant" | "auto") => void;
3772
+ handleScroll: () => void;
3773
+ isScrollingRef: RefObject<boolean>;
3774
+ };
3775
+
3614
3776
  /**
3615
3777
  * Returns a `setSpin(target, tip?)` function.
3616
3778
  * Each call returns a **close** function to dismiss that specific overlay.
@@ -3,6 +3,7 @@ import { ClassValue } from 'clsx';
3
3
  import { Dispatch } from 'react';
4
4
  import { JSX } from 'react/jsx-runtime';
5
5
  import { default as React_2 } from 'react';
6
+ import { RefObject } from 'react';
6
7
  import { SetStateAction } from 'react';
7
8
  import { VariantProps } from 'class-variance-authority';
8
9
 
@@ -122,6 +123,8 @@ export { alertVariants }
122
123
  export { alertVariants as alertVariants_alias_1 }
123
124
  export { alertVariants as alertVariants_alias_2 }
124
125
 
126
+ export declare function applyOffset(base: Date, amount: number, unit: OffsetUnit, direction: OffsetDirection): Date;
127
+
125
128
  declare function Avatar({ src, alt, initials, size, shape, status, className, ...props }: AvatarProps): JSX.Element;
126
129
  export { Avatar }
127
130
  export { Avatar as Avatar_alias_1 }
@@ -330,6 +333,11 @@ export { buttonVariants }
330
333
  export { buttonVariants as buttonVariants_alias_1 }
331
334
  export { buttonVariants as buttonVariants_alias_2 }
332
335
 
336
+ export declare interface CalendarDay {
337
+ date: Date;
338
+ thisMonth: boolean;
339
+ }
340
+
333
341
  declare function Card({ intent, size, className, ...props }: CardProps): JSX.Element;
334
342
  export { Card }
335
343
  export { Card as Card_alias_1 }
@@ -562,6 +570,8 @@ export { CinePlayerSortKey }
562
570
  export { CinePlayerSortKey as CinePlayerSortKey_alias_1 }
563
571
  export { CinePlayerSortKey as CinePlayerSortKey_alias_2 }
564
572
 
573
+ export declare function clampDate(date: Date, min?: Date, max?: Date): Date;
574
+
565
575
  /** Computes a padded [min, max] range from raw data extents. */
566
576
  export declare function clampRange(min: number, max: number, padding?: number): [number, number];
567
577
 
@@ -877,6 +887,63 @@ export { DataTableProps }
877
887
  export { DataTableProps as DataTableProps_alias_1 }
878
888
  export { DataTableProps as DataTableProps_alias_2 }
879
889
 
890
+ declare type DateTimeMode = "date" | "time" | "datetime";
891
+ export { DateTimeMode }
892
+ export { DateTimeMode as DateTimeMode_alias_1 }
893
+ export { DateTimeMode as DateTimeMode_alias_2 }
894
+ export { DateTimeMode as DateTimeMode_alias_3 }
895
+
896
+ declare function DateTimePicker({ className, popupClassName, triggerClassName, disabled, placeholder, ...restProps }: DateTimePickerProps): JSX.Element;
897
+ export { DateTimePicker }
898
+ export { DateTimePicker as DateTimePicker_alias_1 }
899
+ export { DateTimePicker as DateTimePicker_alias_2 }
900
+ export { DateTimePicker as DateTimePicker_alias_3 }
901
+
902
+ declare interface DateTimePickerProps {
903
+ /** Controlled selected date/time value. */
904
+ value?: Date | null;
905
+ /** Uncontrolled initial value. */
906
+ defaultValue?: Date | null;
907
+ /** Called when the user confirms a new selection. */
908
+ onChange?: (date: Date | null) => void;
909
+ /** Picker mode: date only, time only, or full datetime. Default "datetime". */
910
+ mode?: DateTimeMode;
911
+ /** Minimum selectable date (inclusive). */
912
+ minDate?: Date;
913
+ /** Maximum selectable date (inclusive). */
914
+ maxDate?: Date;
915
+ /** Disable the trigger and prevent all interaction. */
916
+ disabled?: boolean;
917
+ /** Placeholder text in the trigger when no value is selected. */
918
+ placeholder?: string;
919
+ /**
920
+ * Display-format string.
921
+ * Tokens: YYYY YY MMMM MMM MM M DD D HH H hh h mm ss A a
922
+ * @example "YYYY-MM-DD HH:mm:ss"
923
+ */
924
+ format?: string;
925
+ /** Use 24-hour clock. false → 12-hour with AM/PM column. Default true. */
926
+ use24Hour?: boolean;
927
+ /** Show seconds column when mode includes time. Default true. */
928
+ showSeconds?: boolean;
929
+ /** BCP-47 locale tag for month/weekday names. Default "en-US". */
930
+ locale?: string;
931
+ /** Extra class applied to the root wrapper element. */
932
+ className?: string;
933
+ /** Extra class applied to the frosted-glass popup panel. */
934
+ popupClassName?: string;
935
+ /** Extra class applied to the trigger button. */
936
+ triggerClassName?: string;
937
+ /** Called when the picker popup opens. */
938
+ onOpen?: () => void;
939
+ /** Called when the picker popup closes (cancel OR confirm). */
940
+ onClose?: () => void;
941
+ }
942
+ export { DateTimePickerProps }
943
+ export { DateTimePickerProps as DateTimePickerProps_alias_1 }
944
+ export { DateTimePickerProps as DateTimePickerProps_alias_2 }
945
+ export { DateTimePickerProps as DateTimePickerProps_alias_3 }
946
+
880
947
  export declare const default_alias: {
881
948
  Primitives: {
882
949
  Button: Button;
@@ -946,6 +1013,7 @@ export declare const default_alias: {
946
1013
  TypewriterText: TypewriterText;
947
1014
  CommandPalette: CommandPalette;
948
1015
  Timeline: Timeline;
1016
+ DateTimePicker: DateTimePicker;
949
1017
  };
950
1018
  Forms: {
951
1019
  Form: Form;
@@ -1002,6 +1070,10 @@ export declare function default_alias_119(): JSX.Element;
1002
1070
 
1003
1071
  export declare function default_alias_12(): JSX.Element;
1004
1072
 
1073
+ export declare function default_alias_120(): JSX.Element;
1074
+
1075
+ export declare function default_alias_121(): JSX.Element;
1076
+
1005
1077
  export declare function default_alias_13(): JSX.Element;
1006
1078
 
1007
1079
  export declare function default_alias_14(): JSX.Element;
@@ -1496,6 +1568,7 @@ declare const Extras: {
1496
1568
  TypewriterText: typeof TypewriterText;
1497
1569
  CommandPalette: typeof CommandPalette;
1498
1570
  Timeline: typeof Timeline;
1571
+ DateTimePicker: typeof DateTimePicker;
1499
1572
  };
1500
1573
  export { Extras }
1501
1574
  export { Extras as Extras_alias_1 }
@@ -1704,6 +1777,8 @@ export { Form as Form_alias_3 }
1704
1777
  /** Formats an axis value using an optional custom formatter. */
1705
1778
  export declare function formatAxisValue(v: number | string, formatter?: (v: number | string) => string): string;
1706
1779
 
1780
+ export declare function formatDate(date: Date, format: string, locale?: string): string;
1781
+
1707
1782
  declare function FormItem({ label, layout: itemLayout, required, hint, validation, name, onValidate, className, children, }: FormItemProps): JSX.Element;
1708
1783
  export { FormItem }
1709
1784
  export { FormItem as FormItem_alias_1 }
@@ -1846,12 +1921,24 @@ declare const formVariants: (props?: ({
1846
1921
  export { formVariants }
1847
1922
  export { formVariants as formVariants_alias_1 }
1848
1923
 
1924
+ export declare function getCalendarDays(year: number, month: number): CalendarDay[];
1925
+
1926
+ export declare function getDaysInMonth(year: number, month: number): number;
1927
+
1928
+ export declare function getDefaultFormat(mode: DateTimeMode, use24Hour?: boolean, showSeconds?: boolean): string;
1929
+
1849
1930
  /** Returns an array of CSS custom property references for chart series colors. */
1850
1931
  export declare function getDefaultPalette(count: number): string[];
1851
1932
 
1933
+ export declare function getMonthNames(locale?: string, format?: "long" | "short"): string[];
1934
+
1935
+ export declare function getWeekdayNames(locale?: string, format?: "long" | "narrow" | "short"): string[];
1936
+
1852
1937
  /** Gets the y value for a series at a given category key. */
1853
1938
  export declare function getYAtCategory(series: ChartSeries, category: string): number | undefined;
1854
1939
 
1940
+ export declare function getYearRange(center: number, span?: number): number[];
1941
+
1855
1942
  declare function Header({ brand, onBrandClick, navItems, actions, linkComponent: Link, height, mobileMenu, navMenuIcon, actionsMenuIcon, className, children, }: HeaderProps): JSX.Element;
1856
1943
  export { Header }
1857
1944
  export { Header as Header_alias_1 }
@@ -2063,9 +2150,19 @@ export { inputVariants }
2063
2150
  export { inputVariants as inputVariants_alias_1 }
2064
2151
  export { inputVariants as inputVariants_alias_2 }
2065
2152
 
2153
+ export declare function isAfterDay(a: Date, b: Date): boolean;
2154
+
2155
+ export declare function isBeforeDay(a: Date, b: Date): boolean;
2156
+
2157
+ export declare function isSameDay(a: Date, b: Date): boolean;
2158
+
2066
2159
  /** Returns true if any data point in the series has a string x value. */
2067
2160
  export declare function isSeriesCategorical(series: ChartSeries[]): boolean;
2068
2161
 
2162
+ export declare function isToday(date: Date): boolean;
2163
+
2164
+ export declare const ITEM_H = 40;
2165
+
2069
2166
  declare function Label({ intent, size, className, ...props }: LabelProps): JSX.Element;
2070
2167
  export { Label }
2071
2168
  export { Label as Label_alias_1 }
@@ -2362,6 +2459,18 @@ export { navLinkVariants }
2362
2459
  export { navLinkVariants as navLinkVariants_alias_1 }
2363
2460
  export { navLinkVariants as navLinkVariants_alias_2 }
2364
2461
 
2462
+ declare type OffsetDirection = "future" | "past";
2463
+ export { OffsetDirection }
2464
+ export { OffsetDirection as OffsetDirection_alias_1 }
2465
+ export { OffsetDirection as OffsetDirection_alias_2 }
2466
+ export { OffsetDirection as OffsetDirection_alias_3 }
2467
+
2468
+ declare type OffsetUnit = "day" | "week" | "month" | "year";
2469
+ export { OffsetUnit }
2470
+ export { OffsetUnit as OffsetUnit_alias_1 }
2471
+ export { OffsetUnit as OffsetUnit_alias_2 }
2472
+ export { OffsetUnit as OffsetUnit_alias_3 }
2473
+
2365
2474
  declare const Overlay: {
2366
2475
  Dialog: typeof Dialog;
2367
2476
  Tooltip: typeof Tooltip;
@@ -2758,7 +2867,7 @@ export declare const selectVariants: (props?: ({
2758
2867
  size?: "sm" | "md" | "lg" | null | undefined;
2759
2868
  } & ClassProp) | undefined) => string;
2760
2869
 
2761
- declare function SideNav({ items, title, basePath, onItemClick, LinkComponent, collapsible, collapseMode: controlledMode, defaultCollapseMode, onCollapseModeChange, showLines, expandedKeys: controlledExpandedKeys, defaultExpandedKeys, onExpandedKeysChange, className, responsive, mobileBreakpoint, mobileTopOffset, ...props }: SideNavProps): JSX.Element;
2870
+ declare function SideNav({ items, title, basePath, onItemClick, LinkComponent, collapsible, collapseMode: controlledMode, defaultCollapseMode, onCollapseModeChange, showLines, expandedKeys: controlledExpandedKeys, defaultExpandedKeys, onExpandedKeysChange, className, responsive, mobileBreakpoint, mobileTopOffset, mobileDrawerSlot, ...props }: SideNavProps): JSX.Element;
2762
2871
  export { SideNav }
2763
2872
  export { SideNav as SideNav_alias_1 }
2764
2873
  export { SideNav as SideNav_alias_2 }
@@ -2849,6 +2958,12 @@ declare interface SideNavProps extends React_2.HTMLAttributes<HTMLElement> {
2849
2958
  * Set this to the height of your app's top bar. @default 48
2850
2959
  */
2851
2960
  mobileTopOffset?: number;
2961
+ /**
2962
+ * Optional slot rendered inside the mobile slide-in drawer, between the
2963
+ * header row and the scrollable nav body. Use it to inject a search input
2964
+ * or other controls that should appear on mobile too.
2965
+ */
2966
+ mobileDrawerSlot?: React_2.ReactNode;
2852
2967
  }
2853
2968
  export { SideNavProps }
2854
2969
  export { SideNavProps as SideNavProps_alias_1 }
@@ -2908,7 +3023,7 @@ export declare interface SliceSpec {
2908
3023
  cy: number;
2909
3024
  }
2910
3025
 
2911
- declare function Slider({ mode, value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, ...props }: SliderProps): JSX.Element;
3026
+ declare function Slider({ mode, value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, id: propId, ...props }: SliderProps): JSX.Element;
2912
3027
  export { Slider }
2913
3028
  export { Slider as Slider_alias_1 }
2914
3029
  export { Slider as Slider_alias_2 }
@@ -2936,7 +3051,7 @@ export { SliderProps }
2936
3051
  export { SliderProps as SliderProps_alias_1 }
2937
3052
  export { SliderProps as SliderProps_alias_2 }
2938
3053
 
2939
- declare function SliderRange({ value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, ...props }: SliderRangeProps): JSX.Element;
3054
+ declare function SliderRange({ value: valueProp, defaultValue, onChange, min, max, step, intent, size, disabled, showValue, formatValue, label, className, id: propId, ...props }: SliderRangeProps): JSX.Element;
2940
3055
  export { SliderRange }
2941
3056
  export { SliderRange as SliderRange_alias_1 }
2942
3057
  export { SliderRange as SliderRange_alias_2 }
@@ -3611,6 +3726,53 @@ export declare function useCommandPalette(commands: CommandItem[], open: boolean
3611
3726
  handleKeyDown: (e: React.KeyboardEvent) => void;
3612
3727
  };
3613
3728
 
3729
+ export declare function useDateTimePicker(props: DateTimePickerProps): {
3730
+ isOpen: boolean;
3731
+ displayValue: string;
3732
+ workingDate: Date;
3733
+ view: "drum" | "calendar";
3734
+ calYear: number;
3735
+ calMonth: number;
3736
+ offsetAmount: number;
3737
+ offsetUnit: OffsetUnit;
3738
+ offsetDirection: OffsetDirection;
3739
+ mode: DateTimeMode;
3740
+ use24Hour: boolean;
3741
+ showSeconds: boolean;
3742
+ locale: string;
3743
+ minDate: Date | undefined;
3744
+ maxDate: Date | undefined;
3745
+ openPicker: () => void;
3746
+ closePicker: () => void;
3747
+ confirm: () => void;
3748
+ clear: () => void;
3749
+ updateField: (field: "year" | "month" | "day" | "hour" | "minute" | "second", val: number) => void;
3750
+ setView: Dispatch<SetStateAction<"drum" | "calendar">>;
3751
+ setCalYear: Dispatch<SetStateAction<number>>;
3752
+ setCalMonth: Dispatch<SetStateAction<number>>;
3753
+ setOffsetAmount: Dispatch<SetStateAction<number>>;
3754
+ setOffsetUnit: Dispatch<SetStateAction<OffsetUnit>>;
3755
+ setOffsetDirection: Dispatch<SetStateAction<OffsetDirection>>;
3756
+ applyQuickOffset: () => void;
3757
+ navigateCalendar: (dir: -1 | 1) => void;
3758
+ };
3759
+
3760
+ export declare function useOutsideClick(refs: ReadonlyArray<{
3761
+ readonly current: Element | null;
3762
+ }>, callback: () => void, enabled?: boolean): void;
3763
+
3764
+ export declare function usePositioning(anchorRef: {
3765
+ readonly current: Element | null;
3766
+ }, popupRef: {
3767
+ readonly current: HTMLElement | null;
3768
+ }, isOpen: boolean): void;
3769
+
3770
+ export declare function useScrollColumn(containerRef: React.RefObject<HTMLDivElement | null>, count: number, onSelectIndex: (idx: number) => void): {
3771
+ scrollToIndex: (index: number, behavior?: "smooth" | "instant" | "auto") => void;
3772
+ handleScroll: () => void;
3773
+ isScrollingRef: RefObject<boolean>;
3774
+ };
3775
+
3614
3776
  /**
3615
3777
  * Returns a `setSpin(target, tip?)` function.
3616
3778
  * Each call returns a **close** function to dismiss that specific overlay.