@douglasneuroinformatics/libui 3.2.0 → 3.3.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.
@@ -1344,8 +1344,11 @@ declare const Resizable: ResizableType;
1344
1344
  declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_scroll_area.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1345
1345
 
1346
1346
  type BaseSearchBarProps = {
1347
+ [key: `data-${string}`]: unknown;
1347
1348
  /** Additional CSS classes to add to the wrapper form component, potentially overriding default styling */
1348
1349
  className?: string;
1350
+ /** The ID to pass to the HTMLFormElement */
1351
+ id?: string;
1349
1352
  /** An optional callback invoked when the user clicks the search bar */
1350
1353
  onClick?: () => void;
1351
1354
  /** Custom placeholder to use instead of the default */
@@ -1364,7 +1367,7 @@ type UncontrolledSearchBarProps = {
1364
1367
  value?: never;
1365
1368
  } & BaseSearchBarProps;
1366
1369
  type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
1367
- declare const SearchBar: ({ className, onClick, onValueChange, placeholder, readOnly, value }: SearchBarProps) => react_jsx_runtime.JSX.Element;
1370
+ declare const SearchBar: ({ className, onClick, onValueChange, placeholder, readOnly, value, ...props }: SearchBarProps) => react_jsx_runtime.JSX.Element;
1368
1371
 
1369
1372
  declare const Select: React$1.FC<SelectPrimitive.SelectProps> & {
1370
1373
  Content: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -1402,12 +1405,13 @@ declare const Spinner: ({ className, ...props }: HTMLProps<HTMLDivElement>) => r
1402
1405
  declare const SpinnerIcon: ({ className, ...props }: React$1.HTMLAttributes<SVGElement>) => react_jsx_runtime.JSX.Element;
1403
1406
 
1404
1407
  type StatisticCardProps = {
1408
+ [key: `data-${string}`]: unknown;
1405
1409
  className?: string;
1406
1410
  icon?: JSX.Element;
1407
1411
  label: string;
1408
1412
  value: number;
1409
1413
  };
1410
- declare const StatisticCard: ({ className, icon, label, value }: StatisticCardProps) => react_jsx_runtime.JSX.Element;
1414
+ declare const StatisticCard: ({ className, icon, label, value, ...props }: StatisticCardProps) => react_jsx_runtime.JSX.Element;
1411
1415
 
1412
1416
  declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1413
1417
 
@@ -3879,9 +3879,17 @@ var Resizable = Object.assign(ResizableRoot, {
3879
3879
  // src/components/SearchBar/SearchBar.tsx
3880
3880
  import { SearchIcon as SearchIcon2 } from "lucide-react";
3881
3881
  import { jsx as jsx160, jsxs as jsxs54 } from "react/jsx-runtime";
3882
- var SearchBar = ({ className, onClick, onValueChange, placeholder, readOnly, value }) => {
3882
+ var SearchBar = ({
3883
+ className,
3884
+ onClick,
3885
+ onValueChange,
3886
+ placeholder,
3887
+ readOnly,
3888
+ value,
3889
+ ...props
3890
+ }) => {
3883
3891
  const { t } = useTranslation("libui");
3884
- return /* @__PURE__ */ jsxs54("form", { className: cn("relative", className), children: [
3892
+ return /* @__PURE__ */ jsxs54("form", { className: cn("relative", className), ...props, children: [
3885
3893
  /* @__PURE__ */ jsx160(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
3886
3894
  /* @__PURE__ */ jsx160(
3887
3895
  Input,
@@ -4075,13 +4083,13 @@ var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx170(
4075
4083
  import { useEffect as useEffect10 } from "react";
4076
4084
  import { motion as motion6, useSpring, useTransform } from "framer-motion";
4077
4085
  import { jsx as jsx171, jsxs as jsxs56 } from "react/jsx-runtime";
4078
- var StatisticCard = ({ className, icon, label, value }) => {
4086
+ var StatisticCard = ({ className, icon, label, value, ...props }) => {
4079
4087
  const spring = useSpring(0, { bounce: 0 });
4080
4088
  const rounded = useTransform(spring, (latest) => Math.floor(latest));
4081
4089
  useEffect10(() => {
4082
4090
  spring.set(value);
4083
4091
  }, [spring, value]);
4084
- return /* @__PURE__ */ jsxs56(Card, { className: cn("flex w-full rounded-lg p-4", className), children: [
4092
+ return /* @__PURE__ */ jsxs56(Card, { className: cn("flex w-full rounded-lg p-4", className), ...props, children: [
4085
4093
  icon && /* @__PURE__ */ jsx171("div", { className: "mr-2 flex items-center justify-center text-4xl", children: icon }),
4086
4094
  /* @__PURE__ */ jsxs56("div", { className: "w-full text-center", children: [
4087
4095
  /* @__PURE__ */ jsx171(motion6.h3, { className: "title-font text-2xl font-semibold text-slate-900 dark:text-slate-100 sm:text-3xl", children: rounded }),