@douglasneuroinformatics/libui 2.0.0-beta.1 → 2.0.0-beta.10
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/components/index.d.ts +134 -18
- package/dist/components/index.js +776 -361
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.d.ts +6 -1
- package/dist/hooks/index.js +12 -11
- package/dist/hooks/index.js.map +1 -1
- package/dist/i18n.d.ts +5 -1
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.map +1 -1
- package/package.json +36 -34
- package/tailwind.config.cjs +2 -0
|
@@ -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" | "
|
|
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" | "
|
|
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?: "
|
|
638
|
+
variant?: "default" | "outline" | "secondary" | "destructive" | null | undefined;
|
|
637
639
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
638
|
-
|
|
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">, "
|
|
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" | "
|
|
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,79 @@ 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
|
+
};
|
|
873
|
+
declare const LanguageToggle: ({ align, options }?: LanguageToggleProps) => react_jsx_runtime.JSX.Element;
|
|
874
|
+
|
|
875
|
+
type LegacyDropdownOptions = {
|
|
876
|
+
[key: string]: string;
|
|
877
|
+
} | readonly string[];
|
|
878
|
+
type LegacyDropdownOptionKey<T> = T extends readonly string[] ? T[number] : T extends {
|
|
879
|
+
[key: string]: string;
|
|
880
|
+
} ? Extract<keyof T, string> : never;
|
|
881
|
+
/** @deprecated */
|
|
882
|
+
type LegacyDropdownProps<T extends LegacyDropdownOptions> = {
|
|
883
|
+
className?: string;
|
|
884
|
+
/** Callback function invoked when user clicks an option */
|
|
885
|
+
onSelection: (option: LegacyDropdownOptionKey<T>) => void;
|
|
886
|
+
/** Either a list of options for the dropdown, or an object with options mapped to custom labels */
|
|
887
|
+
options: T;
|
|
888
|
+
/** The text content for the dropdown toggle */
|
|
889
|
+
title: string;
|
|
890
|
+
};
|
|
891
|
+
/** @deprecated */
|
|
892
|
+
declare function LegacyDropdown<const T extends LegacyDropdownOptions>({ className, onSelection, options, title }: LegacyDropdownProps<T>): react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
894
|
+
/** @deprecated */
|
|
895
|
+
type LegacyModalProps = {
|
|
896
|
+
children: react__default.ReactNode;
|
|
897
|
+
onClose: () => void;
|
|
898
|
+
open: boolean;
|
|
899
|
+
showCloseButton?: boolean;
|
|
900
|
+
title: string;
|
|
901
|
+
width?: 'lg' | 'md' | 'sm' | 'xl';
|
|
902
|
+
};
|
|
903
|
+
/** @deprecated */
|
|
904
|
+
declare const LegacyModal: ({ children, onClose, open, showCloseButton, title, width }: LegacyModalProps) => react_jsx_runtime.JSX.Element;
|
|
905
|
+
|
|
906
|
+
/** @deprecated */
|
|
907
|
+
type LegacySelectOption = {
|
|
908
|
+
key: string;
|
|
909
|
+
label: string;
|
|
910
|
+
};
|
|
911
|
+
/** @deprecated */
|
|
912
|
+
type LegacySelectDropdownProps<T extends LegacySelectOption> = {
|
|
913
|
+
checkPosition?: 'left' | 'right';
|
|
914
|
+
className?: string;
|
|
915
|
+
options: T[];
|
|
916
|
+
selected: T[];
|
|
917
|
+
setSelected: (selected: T[]) => void;
|
|
918
|
+
title: string;
|
|
919
|
+
/** The button variant to use for the dropdown toggle */
|
|
920
|
+
variant?: ButtonProps['variant'];
|
|
868
921
|
};
|
|
869
|
-
|
|
922
|
+
/** @deprecated */
|
|
923
|
+
declare const LegacySelectDropdown: <T extends LegacySelectOption>({ checkPosition, className, options, selected, setSelected, title }: LegacySelectDropdownProps<T>) => react_jsx_runtime.JSX.Element;
|
|
924
|
+
|
|
925
|
+
/** @deprecated */
|
|
926
|
+
type LegacySliderProps = {
|
|
927
|
+
children: react__default.ReactNode;
|
|
928
|
+
isOpen: boolean;
|
|
929
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
930
|
+
title: react__default.ReactNode;
|
|
931
|
+
};
|
|
932
|
+
/** @deprecated */
|
|
933
|
+
declare const LegacySlider: ({ children, isOpen, setIsOpen, title }: LegacySliderProps) => react_jsx_runtime.JSX.Element;
|
|
870
934
|
|
|
935
|
+
/** @deprecated */
|
|
871
936
|
type Step = {
|
|
872
937
|
element: react__default.ReactElement;
|
|
873
938
|
icon: react__default.ReactElement;
|
|
874
939
|
label: string;
|
|
875
940
|
};
|
|
941
|
+
/** @deprecated */
|
|
876
942
|
type LegacyStepperProps = {
|
|
877
943
|
className?: string;
|
|
878
944
|
steps: Step[];
|
|
@@ -880,11 +946,52 @@ type LegacyStepperProps = {
|
|
|
880
946
|
/** @deprecated */
|
|
881
947
|
declare const LegacyStepper: ({ className, steps }: LegacyStepperProps) => react_jsx_runtime.JSX.Element;
|
|
882
948
|
|
|
949
|
+
/** @deprecated */
|
|
950
|
+
type LegacyColumnDropdownOptions<T extends LegacyTableEntry> = {
|
|
951
|
+
icon?: react__default.ComponentType<Omit<react__default.SVGProps<SVGSVGElement>, 'ref'>>;
|
|
952
|
+
label: string;
|
|
953
|
+
onSelection: (column: LegacyTableColumn<T>) => void;
|
|
954
|
+
}[];
|
|
955
|
+
|
|
956
|
+
/** @deprecated */
|
|
957
|
+
type LegacyTableEntry = {
|
|
958
|
+
[key: string]: unknown;
|
|
959
|
+
};
|
|
960
|
+
/** @deprecated */
|
|
961
|
+
type LegacyFieldFactory<T extends LegacyTableEntry = LegacyTableEntry> = (entry: T) => string;
|
|
962
|
+
/** @deprecated */
|
|
963
|
+
type LegacyTableColumn<T extends LegacyTableEntry> = {
|
|
964
|
+
/** How to determine the values for column */
|
|
965
|
+
field: LegacyFieldFactory<T> | keyof T;
|
|
966
|
+
/** Override the default formatter for this field */
|
|
967
|
+
formatter?: (value: any) => string;
|
|
968
|
+
/** The label to be displayed on the header */
|
|
969
|
+
label: string;
|
|
970
|
+
};
|
|
971
|
+
/** @deprecated */
|
|
972
|
+
type LegacyTableProps<T extends LegacyTableEntry> = {
|
|
973
|
+
className?: string;
|
|
974
|
+
columnDropdownOptions?: LegacyColumnDropdownOptions<T>;
|
|
975
|
+
columns: LegacyTableColumn<T>[];
|
|
976
|
+
data: T[];
|
|
977
|
+
minRows?: number;
|
|
978
|
+
onEntryClick?: (entry: T) => void;
|
|
979
|
+
};
|
|
980
|
+
/** @deprecated */
|
|
981
|
+
declare const LegacyTable: <T extends LegacyTableEntry>({ className, columnDropdownOptions, columns, data, minRows, onEntryClick }: LegacyTableProps<T>) => react_jsx_runtime.JSX.Element;
|
|
982
|
+
|
|
983
|
+
/** @deprecated */
|
|
984
|
+
declare const LegacyClientTable: <T extends LegacyTableEntry>({ data, ...props }: LegacyTableProps<T>) => react_jsx_runtime.JSX.Element;
|
|
985
|
+
|
|
883
986
|
/** An array of arbitrary objects with data to graph */
|
|
884
|
-
type LineGraphData = readonly
|
|
987
|
+
type LineGraphData = readonly {
|
|
988
|
+
[key: string]: any;
|
|
989
|
+
}[];
|
|
885
990
|
/** Extract string keys from items in `T` where the value of `T[K]` extends `K` */
|
|
886
991
|
type ExtractValidKeys<T extends LineGraphData, K> = Extract<ConditionalKeys<T[number], K>, string>;
|
|
887
|
-
type LineGraphLine<T extends LineGraphData =
|
|
992
|
+
type LineGraphLine<T extends LineGraphData = {
|
|
993
|
+
[key: string]: any;
|
|
994
|
+
}[]> = Pick<LineProps, 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'> & {
|
|
888
995
|
err?: ExtractValidKeys<T, number>;
|
|
889
996
|
name: string;
|
|
890
997
|
val: ExtractValidKeys<T, number>;
|
|
@@ -1010,7 +1117,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
|
|
|
1010
1117
|
"aria-colindextext"?: string | undefined;
|
|
1011
1118
|
"aria-colspan"?: number | undefined;
|
|
1012
1119
|
"aria-controls"?: string | undefined;
|
|
1013
|
-
"aria-current"?: boolean | "time" | "
|
|
1120
|
+
"aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
1014
1121
|
"aria-describedby"?: string | undefined;
|
|
1015
1122
|
"aria-description"?: string | undefined;
|
|
1016
1123
|
"aria-details"?: string | undefined;
|
|
@@ -1289,7 +1396,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
|
|
|
1289
1396
|
"aria-colindextext"?: string | undefined;
|
|
1290
1397
|
"aria-colspan"?: number | undefined;
|
|
1291
1398
|
"aria-controls"?: string | undefined;
|
|
1292
|
-
"aria-current"?: boolean | "time" | "
|
|
1399
|
+
"aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
1293
1400
|
"aria-describedby"?: string | undefined;
|
|
1294
1401
|
"aria-description"?: string | undefined;
|
|
1295
1402
|
"aria-details"?: string | undefined;
|
|
@@ -1568,7 +1675,7 @@ declare const Pagination: (({ className, ...props }: react.DetailedHTMLProps<rea
|
|
|
1568
1675
|
"aria-colindextext"?: string | undefined;
|
|
1569
1676
|
"aria-colspan"?: number | undefined;
|
|
1570
1677
|
"aria-controls"?: string | undefined;
|
|
1571
|
-
"aria-current"?: boolean | "time" | "
|
|
1678
|
+
"aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
1572
1679
|
"aria-describedby"?: string | undefined;
|
|
1573
1680
|
"aria-description"?: string | undefined;
|
|
1574
1681
|
"aria-details"?: string | undefined;
|
|
@@ -1823,17 +1930,26 @@ declare const Resizable: ResizableType;
|
|
|
1823
1930
|
|
|
1824
1931
|
declare const ScrollArea: react__default.ForwardRefExoticComponent<Omit<_radix_ui_react_scroll_area.ScrollAreaProps & react__default.RefAttributes<HTMLDivElement>, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1825
1932
|
|
|
1826
|
-
type
|
|
1933
|
+
type BaseSearchBarProps = {
|
|
1827
1934
|
/** Additional CSS classes to add to the wrapper form component, potentially overriding default styling */
|
|
1828
1935
|
className?: string;
|
|
1829
|
-
/**
|
|
1830
|
-
|
|
1936
|
+
/** An optional callback invoked when the user clicks the search bar */
|
|
1937
|
+
onClick?: () => void;
|
|
1831
1938
|
/** Custom placeholder to use instead of the default */
|
|
1832
1939
|
placeholder?: string;
|
|
1940
|
+
};
|
|
1941
|
+
type ControlledSearchBarProps = BaseSearchBarProps & {
|
|
1942
|
+
/** Event handler called when the value changes */
|
|
1943
|
+
onValueChange: (value: string) => void;
|
|
1833
1944
|
/** The controlled value of the search bar, which should be used in conjunction with onValueChange */
|
|
1834
1945
|
value: string;
|
|
1835
1946
|
};
|
|
1836
|
-
|
|
1947
|
+
type UncontrolledSearchBarProps = BaseSearchBarProps & {
|
|
1948
|
+
onValueChange?: never;
|
|
1949
|
+
value?: never;
|
|
1950
|
+
};
|
|
1951
|
+
type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
|
|
1952
|
+
declare const SearchBar: ({ className, onClick, onValueChange, placeholder, value }: SearchBarProps) => react_jsx_runtime.JSX.Element;
|
|
1837
1953
|
|
|
1838
1954
|
declare const Select: react.FC<SelectPrimitive.SelectProps> & {
|
|
1839
1955
|
Content: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1924,4 +2040,4 @@ declare const Tooltip: (({ children, delayDuration, skipDelayDuration }: Tooltip
|
|
|
1924
2040
|
Trigger: react.ForwardRefExoticComponent<TooltipTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1925
2041
|
};
|
|
1926
2042
|
|
|
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 };
|
|
2043
|
+
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 };
|