@douglasneuroinformatics/libui 2.0.0-beta.1 → 2.0.0-beta.11

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.
@@ -135,7 +135,7 @@ declare const Button: react__default.ForwardRefExoticComponent<{
135
135
  "aria-colindextext"?: string | undefined;
136
136
  "aria-colspan"?: number | undefined;
137
137
  "aria-controls"?: string | undefined;
138
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
138
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
139
139
  "aria-describedby"?: string | undefined;
140
140
  "aria-description"?: string | undefined;
141
141
  "aria-details"?: string | undefined;
@@ -352,6 +352,7 @@ type ArrowToggleProps = Simplify<react__default.HTMLAttributes<HTMLButtonElement
352
352
  position: 'down' | 'left' | 'right' | 'up';
353
353
  /** The clockwise rotation of the arrow when toggled (e.g., if the position is 'right' and rotation is 90, the arrow will point down) */
354
354
  rotation?: number;
355
+ size?: ButtonProps['size'];
355
356
  /** The variant of button to use */
356
357
  variant?: Extract<ButtonProps['variant'], 'ghost' | 'outline'>;
357
358
  }>;
@@ -417,7 +418,7 @@ declare const ArrowToggle: react__default.ForwardRefExoticComponent<{
417
418
  "aria-colindextext"?: string | undefined;
418
419
  "aria-colspan"?: number | undefined;
419
420
  "aria-controls"?: string | undefined;
420
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
421
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
421
422
  "aria-describedby"?: string | undefined;
422
423
  "aria-description"?: string | undefined;
423
424
  "aria-details"?: string | undefined;
@@ -624,6 +625,7 @@ declare const ArrowToggle: react__default.ForwardRefExoticComponent<{
624
625
  isToggled?: boolean | undefined;
625
626
  position: 'down' | 'left' | 'right' | 'up';
626
627
  rotation?: number | undefined;
628
+ size?: ButtonProps['size'];
627
629
  variant?: "ghost" | "outline" | undefined;
628
630
  } & react__default.RefAttributes<HTMLButtonElement>>;
629
631
 
@@ -633,10 +635,9 @@ declare const Avatar: react.ForwardRefExoticComponent<Omit<_radix_ui_react_avata
633
635
  };
634
636
 
635
637
  declare const badgeVariants: (props?: ({
636
- variant?: "outline" | "secondary" | "default" | "destructive" | null | undefined;
638
+ variant?: "default" | "outline" | "secondary" | "destructive" | null | undefined;
637
639
  } & class_variance_authority_types.ClassProp) | undefined) => string;
638
- interface BadgeProps extends react__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
639
- }
640
+ type BadgeProps = react__default.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
640
641
  declare const Badge: ({ className, variant, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
641
642
 
642
643
  declare const Breadcrumb: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
@@ -697,7 +698,7 @@ declare const Command: react__default.ForwardRefExoticComponent<Omit<{
697
698
  ref?: react__default.Ref<HTMLDivElement> | undefined;
698
699
  } & {
699
700
  asChild?: boolean | undefined;
700
- }, "key" | keyof react__default.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
701
+ }, "key" | keyof react__default.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
701
702
  heading?: react__default.ReactNode;
702
703
  value?: string | undefined;
703
704
  forceMount?: boolean | undefined;
@@ -706,7 +707,7 @@ declare const Command: react__default.ForwardRefExoticComponent<Omit<{
706
707
  ref?: react__default.Ref<HTMLInputElement> | undefined;
707
708
  } & {
708
709
  asChild?: boolean | undefined;
709
- }, "key" | "asChild" | keyof react__default.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
710
+ }, "key" | "asChild" | keyof react__default.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
710
711
  value?: string | undefined;
711
712
  onValueChange?: ((search: string) => void) | undefined;
712
713
  } & react__default.RefAttributes<HTMLInputElement>, "ref"> & react__default.RefAttributes<HTMLInputElement>>;
@@ -865,14 +866,80 @@ declare const Label: react__default.ForwardRefExoticComponent<Omit<LabelPrimitiv
865
866
 
866
867
  type LanguageToggleProps = {
867
868
  align?: 'center' | 'end' | 'start';
869
+ options: {
870
+ [key: string]: string;
871
+ };
872
+ variant?: ButtonProps['variant'];
873
+ };
874
+ declare const LanguageToggle: ({ align, options, variant }: LanguageToggleProps) => react_jsx_runtime.JSX.Element;
875
+
876
+ type LegacyDropdownOptions = {
877
+ [key: string]: string;
878
+ } | readonly string[];
879
+ type LegacyDropdownOptionKey<T> = T extends readonly string[] ? T[number] : T extends {
880
+ [key: string]: string;
881
+ } ? Extract<keyof T, string> : never;
882
+ /** @deprecated */
883
+ type LegacyDropdownProps<T extends LegacyDropdownOptions> = {
884
+ className?: string;
885
+ /** Callback function invoked when user clicks an option */
886
+ onSelection: (option: LegacyDropdownOptionKey<T>) => void;
887
+ /** Either a list of options for the dropdown, or an object with options mapped to custom labels */
888
+ options: T;
889
+ /** The text content for the dropdown toggle */
890
+ title: string;
891
+ };
892
+ /** @deprecated */
893
+ declare function LegacyDropdown<const T extends LegacyDropdownOptions>({ className, onSelection, options, title }: LegacyDropdownProps<T>): react_jsx_runtime.JSX.Element;
894
+
895
+ /** @deprecated */
896
+ type LegacyModalProps = {
897
+ children: react__default.ReactNode;
898
+ onClose: () => void;
899
+ open: boolean;
900
+ showCloseButton?: boolean;
901
+ title: string;
902
+ width?: 'lg' | 'md' | 'sm' | 'xl';
903
+ };
904
+ /** @deprecated */
905
+ declare const LegacyModal: ({ children, onClose, open, showCloseButton, title, width }: LegacyModalProps) => react_jsx_runtime.JSX.Element;
906
+
907
+ /** @deprecated */
908
+ type LegacySelectOption = {
909
+ key: string;
910
+ label: string;
911
+ };
912
+ /** @deprecated */
913
+ type LegacySelectDropdownProps<T extends LegacySelectOption> = {
914
+ checkPosition?: 'left' | 'right';
915
+ className?: string;
916
+ options: T[];
917
+ selected: T[];
918
+ setSelected: (selected: T[]) => void;
919
+ title: string;
920
+ /** The button variant to use for the dropdown toggle */
921
+ variant?: ButtonProps['variant'];
868
922
  };
869
- declare const LanguageToggle: ({ align }?: LanguageToggleProps) => react_jsx_runtime.JSX.Element;
923
+ /** @deprecated */
924
+ declare const LegacySelectDropdown: <T extends LegacySelectOption>({ checkPosition, className, options, selected, setSelected, title }: LegacySelectDropdownProps<T>) => react_jsx_runtime.JSX.Element;
925
+
926
+ /** @deprecated */
927
+ type LegacySliderProps = {
928
+ children: react__default.ReactNode;
929
+ isOpen: boolean;
930
+ setIsOpen: (isOpen: boolean) => void;
931
+ title: react__default.ReactNode;
932
+ };
933
+ /** @deprecated */
934
+ declare const LegacySlider: ({ children, isOpen, setIsOpen, title }: LegacySliderProps) => react_jsx_runtime.JSX.Element;
870
935
 
936
+ /** @deprecated */
871
937
  type Step = {
872
938
  element: react__default.ReactElement;
873
939
  icon: react__default.ReactElement;
874
940
  label: string;
875
941
  };
942
+ /** @deprecated */
876
943
  type LegacyStepperProps = {
877
944
  className?: string;
878
945
  steps: Step[];
@@ -880,11 +947,52 @@ type LegacyStepperProps = {
880
947
  /** @deprecated */
881
948
  declare const LegacyStepper: ({ className, steps }: LegacyStepperProps) => react_jsx_runtime.JSX.Element;
882
949
 
950
+ /** @deprecated */
951
+ type LegacyColumnDropdownOptions<T extends LegacyTableEntry> = {
952
+ icon?: react__default.ComponentType<Omit<react__default.SVGProps<SVGSVGElement>, 'ref'>>;
953
+ label: string;
954
+ onSelection: (column: LegacyTableColumn<T>) => void;
955
+ }[];
956
+
957
+ /** @deprecated */
958
+ type LegacyTableEntry = {
959
+ [key: string]: unknown;
960
+ };
961
+ /** @deprecated */
962
+ type LegacyFieldFactory<T extends LegacyTableEntry = LegacyTableEntry> = (entry: T) => string;
963
+ /** @deprecated */
964
+ type LegacyTableColumn<T extends LegacyTableEntry> = {
965
+ /** How to determine the values for column */
966
+ field: LegacyFieldFactory<T> | keyof T;
967
+ /** Override the default formatter for this field */
968
+ formatter?: (value: any) => string;
969
+ /** The label to be displayed on the header */
970
+ label: string;
971
+ };
972
+ /** @deprecated */
973
+ type LegacyTableProps<T extends LegacyTableEntry> = {
974
+ className?: string;
975
+ columnDropdownOptions?: LegacyColumnDropdownOptions<T>;
976
+ columns: LegacyTableColumn<T>[];
977
+ data: T[];
978
+ minRows?: number;
979
+ onEntryClick?: (entry: T) => void;
980
+ };
981
+ /** @deprecated */
982
+ declare const LegacyTable: <T extends LegacyTableEntry>({ className, columnDropdownOptions, columns, data, minRows, onEntryClick }: LegacyTableProps<T>) => react_jsx_runtime.JSX.Element;
983
+
984
+ /** @deprecated */
985
+ declare const LegacyClientTable: <T extends LegacyTableEntry>({ data, ...props }: LegacyTableProps<T>) => react_jsx_runtime.JSX.Element;
986
+
883
987
  /** An array of arbitrary objects with data to graph */
884
- type LineGraphData = readonly Record<string, any>[];
988
+ type LineGraphData = readonly {
989
+ [key: string]: any;
990
+ }[];
885
991
  /** Extract string keys from items in `T` where the value of `T[K]` extends `K` */
886
992
  type ExtractValidKeys<T extends LineGraphData, K> = Extract<ConditionalKeys<T[number], K>, string>;
887
- type LineGraphLine<T extends LineGraphData = Record<string, any>[]> = Pick<LineProps, 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'> & {
993
+ type LineGraphLine<T extends LineGraphData = {
994
+ [key: string]: any;
995
+ }[]> = Pick<LineProps, 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'> & {
888
996
  err?: ExtractValidKeys<T, number>;
889
997
  name: string;
890
998
  val: ExtractValidKeys<T, number>;
@@ -1010,7 +1118,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
1010
1118
  "aria-colindextext"?: string | undefined;
1011
1119
  "aria-colspan"?: number | undefined;
1012
1120
  "aria-controls"?: string | undefined;
1013
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
1121
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
1014
1122
  "aria-describedby"?: string | undefined;
1015
1123
  "aria-description"?: string | undefined;
1016
1124
  "aria-details"?: string | undefined;
@@ -1289,7 +1397,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
1289
1397
  "aria-colindextext"?: string | undefined;
1290
1398
  "aria-colspan"?: number | undefined;
1291
1399
  "aria-controls"?: string | undefined;
1292
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
1400
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
1293
1401
  "aria-describedby"?: string | undefined;
1294
1402
  "aria-description"?: string | undefined;
1295
1403
  "aria-details"?: string | undefined;
@@ -1568,7 +1676,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
1568
1676
  "aria-colindextext"?: string | undefined;
1569
1677
  "aria-colspan"?: number | undefined;
1570
1678
  "aria-controls"?: string | undefined;
1571
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
1679
+ "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
1572
1680
  "aria-describedby"?: string | undefined;
1573
1681
  "aria-description"?: string | undefined;
1574
1682
  "aria-details"?: string | undefined;
@@ -1823,17 +1931,26 @@ declare const Resizable: ResizableType;
1823
1931
 
1824
1932
  declare const ScrollArea: react__default.ForwardRefExoticComponent<Omit<_radix_ui_react_scroll_area.ScrollAreaProps & react__default.RefAttributes<HTMLDivElement>, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
1825
1933
 
1826
- type SearchBarProps = {
1934
+ type BaseSearchBarProps = {
1827
1935
  /** Additional CSS classes to add to the wrapper form component, potentially overriding default styling */
1828
1936
  className?: string;
1829
- /** Event handler called when the value changes */
1830
- onValueChange: (value: string) => void;
1937
+ /** An optional callback invoked when the user clicks the search bar */
1938
+ onClick?: () => void;
1831
1939
  /** Custom placeholder to use instead of the default */
1832
1940
  placeholder?: string;
1941
+ };
1942
+ type ControlledSearchBarProps = BaseSearchBarProps & {
1943
+ /** Event handler called when the value changes */
1944
+ onValueChange: (value: string) => void;
1833
1945
  /** The controlled value of the search bar, which should be used in conjunction with onValueChange */
1834
1946
  value: string;
1835
1947
  };
1836
- declare const SearchBar: ({ className, onValueChange, placeholder, value }: SearchBarProps) => react_jsx_runtime.JSX.Element;
1948
+ type UncontrolledSearchBarProps = BaseSearchBarProps & {
1949
+ onValueChange?: never;
1950
+ value?: never;
1951
+ };
1952
+ type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
1953
+ declare const SearchBar: ({ className, onClick, onValueChange, placeholder, value }: SearchBarProps) => react_jsx_runtime.JSX.Element;
1837
1954
 
1838
1955
  declare const Select: react.FC<SelectPrimitive.SelectProps> & {
1839
1956
  Content: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
@@ -1924,4 +2041,4 @@ declare const Tooltip: (({ children, delayDuration, skipDelayDuration }: Tooltip
1924
2041
  Trigger: react.ForwardRefExoticComponent<TooltipTriggerProps & react.RefAttributes<HTMLButtonElement>>;
1925
2042
  };
1926
2043
 
1927
- export { Accordion, AlertDialog, ArrowToggle, type ArrowToggleProps, Avatar, BUTTON_ICON_SIZE, Badge, type BadgeProps, Breadcrumb, Button, type ButtonProps, Card, Checkbox, Collapsible, Command, ContextMenu, DatePicker, type DatePickerProps, Dialog, Drawer, DropdownButton, DropdownMenu, ErrorBoundary, ErrorFallback, type ErrorFallbackProps, Form, type FormProps, Heading, type HeadingProps, HoverCard, Input, type InputProps, Label, LanguageToggle, type LanguageToggleProps, LegacyStepper, type LegacyStepperProps, LineGraph, type LineGraphData, type LineGraphLine, MenuBar, NotificationHub, type NotificationHubProps, Pagination, Popover, Progress, RadioGroup, type RadioGroupProps, Resizable, ScrollArea, SearchBar, type SearchBarProps, Select, Separator, Sheet, Slider, Spinner, SpinnerIcon, type Step, Switch, Table, Tabs, TextArea, type TextAreaProps, ThemeToggle, type ThemeToggleProps, Tooltip, badgeVariants, buttonVariants, labelVariants };
2044
+ export { Accordion, AlertDialog, ArrowToggle, type ArrowToggleProps, Avatar, BUTTON_ICON_SIZE, Badge, type BadgeProps, type BaseSearchBarProps, Breadcrumb, Button, type ButtonProps, Card, Checkbox, Collapsible, Command, ContextMenu, DatePicker, type DatePickerProps, Dialog, Drawer, DropdownButton, DropdownMenu, ErrorBoundary, ErrorFallback, type ErrorFallbackProps, Form, type FormProps, Heading, type HeadingProps, HoverCard, Input, type InputProps, Label, LanguageToggle, type LanguageToggleProps, LegacyClientTable, LegacyDropdown, type LegacyDropdownProps, type LegacyFieldFactory, LegacyModal, type LegacyModalProps, LegacySelectDropdown, type LegacySelectDropdownProps, type LegacySelectOption, LegacySlider, type LegacySliderProps, LegacyStepper, type LegacyStepperProps, LegacyTable, type LegacyTableColumn, type LegacyTableEntry, type LegacyTableProps, LineGraph, type LineGraphData, type LineGraphLine, MenuBar, NotificationHub, type NotificationHubProps, Pagination, Popover, Progress, RadioGroup, type RadioGroupProps, Resizable, ScrollArea, SearchBar, type SearchBarProps, Select, Separator, Sheet, Slider, Spinner, SpinnerIcon, type Step, Switch, Table, Tabs, TextArea, type TextAreaProps, ThemeToggle, type ThemeToggleProps, Tooltip, badgeVariants, buttonVariants, labelVariants };