@douglasneuroinformatics/libui 2.0.8 → 2.0.9

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.
Files changed (89) hide show
  1. package/dist/components/ArrowToggle/ArrowToggle.d.ts +7 -7
  2. package/dist/components/ArrowToggle/ArrowToggle.d.ts.map +1 -1
  3. package/dist/components/Breadcrumb/Breadcrumb.d.ts +4 -4
  4. package/dist/components/Breadcrumb/BreadcrumbLink.d.ts +2 -2
  5. package/dist/components/Breadcrumb/BreadcrumbLink.d.ts.map +1 -1
  6. package/dist/components/Breadcrumb/BreadcrumbRoot.d.ts +2 -2
  7. package/dist/components/Breadcrumb/BreadcrumbRoot.d.ts.map +1 -1
  8. package/dist/components/Button/Button.d.ts +4 -4
  9. package/dist/components/Button/Button.d.ts.map +1 -1
  10. package/dist/components/ContextMenu/ContextMenu.d.ts +6 -6
  11. package/dist/components/ContextMenu/ContextMenuItem.d.ts +2 -2
  12. package/dist/components/ContextMenu/ContextMenuItem.d.ts.map +1 -1
  13. package/dist/components/ContextMenu/ContextMenuLabel.d.ts +2 -2
  14. package/dist/components/ContextMenu/ContextMenuLabel.d.ts.map +1 -1
  15. package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts +2 -2
  16. package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts.map +1 -1
  17. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  18. package/dist/components/DropdownMenu/DropdownMenu.d.ts +8 -8
  19. package/dist/components/DropdownMenu/DropdownMenuContent.d.ts +4 -4
  20. package/dist/components/DropdownMenu/DropdownMenuContent.d.ts.map +1 -1
  21. package/dist/components/DropdownMenu/DropdownMenuItem.d.ts +2 -2
  22. package/dist/components/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  23. package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts +2 -2
  24. package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts.map +1 -1
  25. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +2 -2
  26. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts.map +1 -1
  27. package/dist/components/Form/BaseRadioField.d.ts +2 -2
  28. package/dist/components/Form/BaseRadioField.d.ts.map +1 -1
  29. package/dist/components/Form/DynamicField.js +1 -1
  30. package/dist/components/Form/Form.js +1 -1
  31. package/dist/components/Form/RecordArrayField.js +1 -1
  32. package/dist/components/Form/ScalarField.d.ts +2 -2
  33. package/dist/components/Form/ScalarField.d.ts.map +1 -1
  34. package/dist/components/Form/SetField/SetFieldListbox.d.ts +2 -2
  35. package/dist/components/Form/SetField/SetFieldListbox.d.ts.map +1 -1
  36. package/dist/components/Form/SetField/SetFieldSelect.d.ts +2 -2
  37. package/dist/components/Form/SetField/SetFieldSelect.d.ts.map +1 -1
  38. package/dist/components/Form/utils.js +1 -1
  39. package/dist/components/LineGraph/LineGraph.d.ts +2 -2
  40. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  41. package/dist/components/MenuBar/MenuBar.d.ts +6 -6
  42. package/dist/components/MenuBar/MenuBarItem.d.ts +2 -2
  43. package/dist/components/MenuBar/MenuBarItem.d.ts.map +1 -1
  44. package/dist/components/MenuBar/MenuBarLabel.d.ts +2 -2
  45. package/dist/components/MenuBar/MenuBarLabel.d.ts.map +1 -1
  46. package/dist/components/MenuBar/MenuBarSubTrigger.d.ts +2 -2
  47. package/dist/components/MenuBar/MenuBarSubTrigger.d.ts.map +1 -1
  48. package/dist/components/Pagination/Pagination.d.ts +3 -3
  49. package/dist/components/Pagination/PaginationLink.d.ts +2 -2
  50. package/dist/components/Pagination/PaginationLink.d.ts.map +1 -1
  51. package/dist/components/Resizable/Resizable.d.ts +2 -2
  52. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  53. package/dist/components/Resizable/ResizableHandle.d.ts +2 -2
  54. package/dist/components/Resizable/ResizableHandle.d.ts.map +1 -1
  55. package/dist/components/SearchBar/SearchBar.d.ts +4 -4
  56. package/dist/components/SearchBar/SearchBar.d.ts.map +1 -1
  57. package/dist/i18n.d.ts +2 -2
  58. package/dist/i18n.d.ts.map +1 -1
  59. package/dist/testing/mocks.d.ts +1 -1
  60. package/dist/testing/mocks.d.ts.map +1 -1
  61. package/package.json +3 -3
  62. package/src/components/ArrowToggle/ArrowToggle.tsx +2 -2
  63. package/src/components/Breadcrumb/BreadcrumbLink.tsx +2 -2
  64. package/src/components/Breadcrumb/BreadcrumbRoot.tsx +2 -2
  65. package/src/components/Button/Button.tsx +6 -6
  66. package/src/components/ContextMenu/ContextMenuItem.tsx +2 -2
  67. package/src/components/ContextMenu/ContextMenuLabel.tsx +2 -2
  68. package/src/components/ContextMenu/ContextMenuSubTrigger.tsx +2 -2
  69. package/src/components/DropdownMenu/DropdownMenuContent.tsx +2 -2
  70. package/src/components/DropdownMenu/DropdownMenuItem.tsx +2 -2
  71. package/src/components/DropdownMenu/DropdownMenuLabel.tsx +2 -2
  72. package/src/components/DropdownMenu/DropdownMenuSubTrigger.tsx +2 -2
  73. package/src/components/Form/BaseRadioField.tsx +2 -2
  74. package/src/components/Form/DynamicField.tsx +1 -1
  75. package/src/components/Form/Form.tsx +1 -1
  76. package/src/components/Form/RecordArrayField.tsx +1 -1
  77. package/src/components/Form/ScalarField.tsx +2 -2
  78. package/src/components/Form/SetField/SetFieldListbox.tsx +2 -2
  79. package/src/components/Form/SetField/SetFieldSelect.tsx +2 -2
  80. package/src/components/Form/utils.ts +1 -1
  81. package/src/components/LineGraph/LineGraph.tsx +2 -5
  82. package/src/components/MenuBar/MenuBarItem.tsx +2 -2
  83. package/src/components/MenuBar/MenuBarLabel.tsx +2 -2
  84. package/src/components/MenuBar/MenuBarSubTrigger.tsx +2 -2
  85. package/src/components/Pagination/PaginationLink.tsx +4 -4
  86. package/src/components/Resizable/Resizable.tsx +2 -2
  87. package/src/components/Resizable/ResizableHandle.tsx +2 -2
  88. package/src/components/SearchBar/SearchBar.tsx +4 -4
  89. package/src/i18n.ts +2 -2
@@ -5,6 +5,7 @@ export declare const Pagination: (({ className, ...props }: import("react").Deta
5
5
  Ellipsis: ({ className, ...props }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>) => import("react").JSX.Element;
6
6
  Item: ({ className, ...props }: import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>) => import("react").JSX.Element;
7
7
  Link: ({ children, className, isActive, size, ...props }: {
8
+ isActive?: boolean | undefined;
8
9
  size?: "md" | "icon" | "lg" | "sm" | null | undefined;
9
10
  ref?: import("react").LegacyRef<HTMLAnchorElement> | undefined;
10
11
  key?: import("react").Key | null | undefined;
@@ -281,9 +282,9 @@ export declare const Pagination: (({ className, ...props }: import("react").Deta
281
282
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLAnchorElement> | undefined;
282
283
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
283
284
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
284
- isActive?: boolean | undefined;
285
285
  }) => import("react").JSX.Element;
286
286
  Next: ({ className, ...props }: {
287
+ isActive?: boolean | undefined;
287
288
  size?: "md" | "icon" | "lg" | "sm" | null | undefined;
288
289
  ref?: import("react").LegacyRef<HTMLAnchorElement> | undefined;
289
290
  key?: import("react").Key | null | undefined;
@@ -560,9 +561,9 @@ export declare const Pagination: (({ className, ...props }: import("react").Deta
560
561
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLAnchorElement> | undefined;
561
562
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
562
563
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
563
- isActive?: boolean | undefined;
564
564
  }) => import("react").JSX.Element;
565
565
  Previous: ({ className, ...props }: {
566
+ isActive?: boolean | undefined;
566
567
  size?: "md" | "icon" | "lg" | "sm" | null | undefined;
567
568
  ref?: import("react").LegacyRef<HTMLAnchorElement> | undefined;
568
569
  key?: import("react").Key | null | undefined;
@@ -839,7 +840,6 @@ export declare const Pagination: (({ className, ...props }: import("react").Deta
839
840
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLAnchorElement> | undefined;
840
841
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
841
842
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
842
- isActive?: boolean | undefined;
843
843
  }) => import("react").JSX.Element;
844
844
  };
845
845
  //# sourceMappingURL=Pagination.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { Simplify } from 'type-fest';
3
3
  import { type ButtonProps } from '../Button/Button.js';
4
- export type PaginationLinkProps = Simplify<Pick<ButtonProps, 'size'> & React.ComponentProps<'a'> & {
4
+ export type PaginationLinkProps = Simplify<{
5
5
  isActive?: boolean;
6
- }>;
6
+ } & Pick<ButtonProps, 'size'> & React.ComponentProps<'a'>>;
7
7
  export declare const PaginationLink: ({ children, className, isActive, size, ...props }: PaginationLinkProps) => React.JSX.Element;
8
8
  //# sourceMappingURL=PaginationLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationLink.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GACvB,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACJ,CAAC;AAEF,eAAO,MAAM,cAAc,sDAAgE,mBAAmB,sBAc7G,CAAC"}
1
+ {"version":3,"file":"PaginationLink.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC;IACE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAC3B,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc,sDAAgE,mBAAmB,sBAc7G,CAAC"}
@@ -5,11 +5,11 @@ import { type ResizablePanelGroupProps } from './ResizablePanelGroup.js';
5
5
  type ResizableRootType = React.FC<{
6
6
  children: React.ReactNode;
7
7
  }>;
8
- type ResizableType = ResizableRootType & {
8
+ type ResizableType = {
9
9
  Handle: React.FC<ResizableHandleProps>;
10
10
  Panel: React.FC<PanelProps>;
11
11
  PanelGroup: React.FC<ResizablePanelGroupProps>;
12
- };
12
+ } & ResizableRootType;
13
13
  export declare const Resizable: ResizableType;
14
14
  export {};
15
15
  //# sourceMappingURL=Resizable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE9F,KAAK,iBAAiB,GAAG,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAAC;AACjE,KAAK,aAAa,GAAG,iBAAiB,GAAG;IACvC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAC5B,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC;CAChD,CAAC;AAKF,eAAO,MAAM,SAAS,EAAE,aAItB,CAAC"}
1
+ {"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE9F,KAAK,iBAAiB,GAAG,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,CAAC;AACjE,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAC5B,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC;CAChD,GAAG,iBAAiB,CAAC;AAKtB,eAAO,MAAM,SAAS,EAAE,aAItB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { PanelResizeHandle } from 'react-resizable-panels';
3
- export type ResizableHandleProps = React.ComponentProps<typeof PanelResizeHandle> & {
3
+ export type ResizableHandleProps = {
4
4
  withHandle?: boolean;
5
- };
5
+ } & React.ComponentProps<typeof PanelResizeHandle>;
6
6
  export declare const ResizableHandle: ({ className, withHandle, ...props }: ResizableHandleProps) => React.JSX.Element;
7
7
  //# sourceMappingURL=ResizableHandle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/ResizableHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,GAAG;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,sBAcxF,CAAC"}
1
+ {"version":3,"file":"ResizableHandle.d.ts","sourceRoot":"","sources":["../../../src/components/Resizable/ResizableHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEnD,eAAO,MAAM,eAAe,wCAAyC,oBAAoB,sBAcxF,CAAC"}
@@ -7,16 +7,16 @@ export type BaseSearchBarProps = {
7
7
  /** Custom placeholder to use instead of the default */
8
8
  placeholder?: string;
9
9
  };
10
- type ControlledSearchBarProps = BaseSearchBarProps & {
10
+ type ControlledSearchBarProps = {
11
11
  /** Event handler called when the value changes */
12
12
  onValueChange: (value: string) => void;
13
13
  /** The controlled value of the search bar, which should be used in conjunction with onValueChange */
14
14
  value: string;
15
- };
16
- type UncontrolledSearchBarProps = BaseSearchBarProps & {
15
+ } & BaseSearchBarProps;
16
+ type UncontrolledSearchBarProps = {
17
17
  onValueChange?: never;
18
18
  value?: never;
19
- };
19
+ } & BaseSearchBarProps;
20
20
  export type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
21
21
  export declare const SearchBar: ({ className, onClick, onValueChange, placeholder, value }: SearchBarProps) => React.JSX.Element;
22
22
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,wBAAwB,GAAG,kBAAkB,GAAG;IACnD,kDAAkD;IAClD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG,kBAAkB,GAAG;IACrD,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG,0BAA0B,CAAC;AAEnF,eAAO,MAAM,SAAS,8DAA+D,cAAc,sBAiBlG,CAAC"}
1
+ {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0GAA0G;IAC1G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,kDAAkD;IAClD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,kBAAkB,CAAC;AAEvB,KAAK,0BAA0B,GAAG;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GAAG,kBAAkB,CAAC;AAEvB,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG,0BAA0B,CAAC;AAEnF,eAAO,MAAM,SAAS,8DAA+D,cAAc,sBAiBlG,CAAC"}
package/dist/i18n.d.ts CHANGED
@@ -340,8 +340,8 @@ export declare const resources: {
340
340
  };
341
341
  }>;
342
342
  };
343
- declare const i18n: I18n & {
343
+ declare const i18n: {
344
344
  addPreInitTranslations<T extends TranslationsDef>(translations: T): void;
345
- };
345
+ } & I18n;
346
346
  export { i18n };
347
347
  //# sourceMappingURL=i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,EAAkB,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAItD,eAAO,MAAM,aAAa,uBAAwB,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,WAAW,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GACnD,CAAC,CAAC,CAAC,CAAC,SAAS;SAAG,CAAC,IAAI,QAAQ,GAAG,OAAO;KAAE,GACvC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACb,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1B,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;;EActG;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ;;KAEtG;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC;;;EAKzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAEpD,QAAA,MAAM,IAAI;oEAUwD,CAAC,GAAG,IAAI;CACzE,CAAC;AAcF,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,EAAkB,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAItD,eAAO,MAAM,aAAa,uBAAwB,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,WAAW,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GACnD,CAAC,CAAC,CAAC,CAAC,SAAS;SAAG,CAAC,IAAI,QAAQ,GAAG,OAAO;KAAE,GACvC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACb,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1B,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;;EActG;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ;;KAEtG;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC;;;EAKzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAEpD,QAAA,MAAM,IAAI;oEAUwD,CAAC,GAAG,IAAI;QAClE,CAAC;AAcT,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * @example
5
5
  * mockMatchMedia(false)
6
6
  */
7
- export declare const mockMatchMedia: (matches: boolean | ((query: string) => boolean)) => void;
7
+ export declare const mockMatchMedia: (matches: ((query: string) => boolean) | boolean) => void;
8
8
  /**
9
9
  * Mocks the Storage API
10
10
  * @param {'localStorage' | 'sessionStorage'} name - The name of the storage to mock
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/testing/mocks.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,+BAAsB,MAAM,KAAK,OAAO,MAAc,IAWhF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,SAAU,cAAc,GAAG,gBAAgB,KAAG,IAwBrE,CAAC"}
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/testing/mocks.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,YAAa,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,OAAO,KAAG,IAWhF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,SAAU,cAAc,GAAG,gBAAgB,KAAG,IAwBrE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@douglasneuroinformatics/libui",
3
3
  "type": "module",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "packageManager": "pnpm@8.15.3",
6
6
  "description": "Generic UI components for DNP projects, built using React and TailwindCSS",
7
7
  "author": {
@@ -55,8 +55,8 @@
55
55
  "react-dom": "^18.2.0"
56
56
  },
57
57
  "dependencies": {
58
- "@douglasneuroinformatics/libjs": "^0.3.0",
59
- "@douglasneuroinformatics/libui-form-types": "^0.6.3",
58
+ "@douglasneuroinformatics/libjs": "^0.3.1",
59
+ "@douglasneuroinformatics/libui-form-types": "^0.6.8",
60
60
  "@headlessui/react": "^1.7.18",
61
61
  "@headlessui/tailwindcss": "^0.2.0",
62
62
  "@heroicons/react": "^2.1.3",
@@ -7,7 +7,7 @@ import { cn } from '../../utils.js';
7
7
  import { Button, type ButtonProps } from '../Button/Button.js';
8
8
 
9
9
  export type ArrowToggleProps = Simplify<
10
- React.HTMLAttributes<HTMLButtonElement> & {
10
+ {
11
11
  /** Whether or not the arrow is currently toggled */
12
12
  isToggled?: boolean;
13
13
 
@@ -21,7 +21,7 @@ export type ArrowToggleProps = Simplify<
21
21
 
22
22
  /** The variant of button to use */
23
23
  variant?: Extract<ButtonProps['variant'], 'ghost' | 'outline'>;
24
- }
24
+ } & React.HTMLAttributes<HTMLButtonElement>
25
25
  >;
26
26
 
27
27
  export const ArrowToggle = React.forwardRef<HTMLButtonElement, ArrowToggleProps>(function ArrowToggle(
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const BreadcrumbLink = React.forwardRef<
8
8
  HTMLAnchorElement,
9
- React.ComponentPropsWithoutRef<'a'> & {
9
+ {
10
10
  asChild?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<'a'>
12
12
  >(function BreadcrumbLink({ asChild, className, ...props }, ref) {
13
13
  const Comp = asChild ? Slot : 'a';
14
14
  return <Comp className={cn('transition-colors hover:text-foreground', className)} ref={ref} {...props} />;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
 
3
3
  export const BreadcrumbRoot = React.forwardRef<
4
4
  HTMLElement,
5
- React.ComponentPropsWithoutRef<'nav'> & {
5
+ {
6
6
  separator?: React.ReactNode;
7
- }
7
+ } & React.ComponentPropsWithoutRef<'nav'>
8
8
  >(function BreadcrumbRoot({ ...props }, ref) {
9
9
  return <nav aria-label="breadcrumb" ref={ref} {...props} />;
10
10
  });
@@ -39,12 +39,12 @@ export const buttonVariants = cva(
39
39
  );
40
40
 
41
41
  export type ButtonProps = Simplify<
42
- React.ButtonHTMLAttributes<HTMLButtonElement> &
43
- VariantProps<typeof buttonVariants> & {
44
- asChild?: boolean;
45
- /** @deprecated - use children */
46
- label?: string;
47
- }
42
+ {
43
+ asChild?: boolean;
44
+ /** @deprecated - use children */
45
+ label?: string;
46
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> &
47
+ VariantProps<typeof buttonVariants>
48
48
  >;
49
49
 
50
50
  export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const ContextMenuItem = React.forwardRef<
8
8
  React.ElementRef<typeof ContextMenuPrimitive.Item>,
9
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item>
12
12
  >(function ContextMenuItem({ className, inset, ...props }, ref) {
13
13
  return (
14
14
  <ContextMenuPrimitive.Item
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const ContextMenuLabel = React.forwardRef<
8
8
  React.ElementRef<typeof ContextMenuPrimitive.Label>,
9
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label>
12
12
  >(function ContextMenuLabel({ className, inset, ...props }, ref) {
13
13
  return (
14
14
  <ContextMenuPrimitive.Label
@@ -7,9 +7,9 @@ import { cn } from '../../utils.js';
7
7
 
8
8
  export const ContextMenuSubTrigger = React.forwardRef<
9
9
  React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
10
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
10
+ {
11
11
  inset?: boolean;
12
- }
12
+ } & React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger>
13
13
  >(function ContextMenuSubTrigger({ children, className, inset, ...props }, ref) {
14
14
  return (
15
15
  <ContextMenuPrimitive.SubTrigger
@@ -4,9 +4,9 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
 
5
5
  import { cn } from '../../utils.js';
6
6
 
7
- export type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
7
+ export type DropdownMenuContentProps = {
8
8
  widthFull?: boolean;
9
- };
9
+ } & React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;
10
10
  export const DropdownMenuContent = React.forwardRef<
11
11
  React.ElementRef<typeof DropdownMenuPrimitive.Content>,
12
12
  DropdownMenuContentProps
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const DropdownMenuItem = React.forwardRef<
8
8
  React.ElementRef<typeof DropdownMenuPrimitive.Item>,
9
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>
12
12
  >(function DropdownMenuItem({ className, inset, ...props }, ref) {
13
13
  return (
14
14
  <DropdownMenuPrimitive.Item
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const DropdownMenuLabel = React.forwardRef<
8
8
  React.ElementRef<typeof DropdownMenuPrimitive.Label>,
9
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>
12
12
  >(function DropdownMenuLabel({ className, inset, ...props }, ref) {
13
13
  return (
14
14
  <DropdownMenuPrimitive.Label
@@ -7,9 +7,9 @@ import { cn } from '../../utils.js';
7
7
 
8
8
  export const DropdownMenuSubTrigger = React.forwardRef<
9
9
  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
10
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
10
+ {
11
11
  inset?: boolean;
12
- }
12
+ } & React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>
13
13
  >(function DropdownMenuSubTrigger({ children, className, inset, ...props }, ref) {
14
14
  return (
15
15
  <DropdownMenuPrimitive.SubTrigger
@@ -22,12 +22,12 @@ const baseRadioFieldVariants = cva('flex', {
22
22
  });
23
23
 
24
24
  export type BaseRadioFieldProps<T extends string> = Simplify<
25
- BaseFieldComponentProps<T> & {
25
+ {
26
26
  description?: string;
27
27
  label: string;
28
28
  options: { [K in T]: string };
29
29
  orientation?: 'horizontal' | 'vertical';
30
- }
30
+ } & BaseFieldComponentProps<T>
31
31
  >;
32
32
 
33
33
  export const BaseRadioField = <T extends string>({
@@ -26,7 +26,7 @@ export const DynamicField = <TData extends FormDataType>({
26
26
  const [dependentValues, setDependentValues] = useState(pick(values, field.deps));
27
27
 
28
28
  const staticField = useMemo(() => {
29
- return field.render(values);
29
+ return field.render.call(undefined, values);
30
30
  }, [dependentValues, field.render]);
31
31
 
32
32
  useEffect(() => {
@@ -102,7 +102,7 @@ const Form = <TSchema extends z.ZodType<FormDataType>, TData extends z.infer<TSc
102
102
  return (
103
103
  <div className="space-y-6 [&:not(:first-child)]:pt-8" key={i}>
104
104
  <div className="space-y-1">
105
- <Heading variant="h4">{fieldGroup.title}</Heading>
105
+ {fieldGroup.title && <Heading variant="h4">{fieldGroup.title}</Heading>}
106
106
  {fieldGroup.description && (
107
107
  <p className="text-sm italic leading-tight text-muted-foreground">{fieldGroup.description}</p>
108
108
  )}
@@ -54,7 +54,7 @@ export const RecordArrayField = memo(function RecordArrayField({
54
54
  <Label className="font-semibold italic">{label + ' ' + (i + 1)}</Label>
55
55
  {Object.keys(fields).map((name) => {
56
56
  const field = fieldset[name];
57
- const fieldProps = field?.kind === 'dynamic' ? field.render(fields) : field;
57
+ const fieldProps = field?.kind === 'dynamic' ? field.render.call(undefined, fields) : field;
58
58
  if (!fieldProps) {
59
59
  return null;
60
60
  }
@@ -17,9 +17,9 @@ import { StringField, type StringFieldProps } from './StringField/StringField.js
17
17
 
18
18
  import type { BaseFieldComponentProps } from './types.js';
19
19
 
20
- export type ScalarFieldProps = BaseFieldComponentProps<ScalarFieldValue> & {
20
+ export type ScalarFieldProps = {
21
21
  field: BooleanFormField | DateFormField | NumberFormField | SetFormField | StringFormField;
22
- };
22
+ } & BaseFieldComponentProps<ScalarFieldValue>;
23
23
 
24
24
  export const ScalarField = ({ field, ...props }: ScalarFieldProps) => {
25
25
  switch (field.kind) {
@@ -6,9 +6,9 @@ import { FieldGroup } from '../FieldGroup/FieldGroup.js';
6
6
 
7
7
  import type { SetFieldProps } from './SetField.js';
8
8
 
9
- export type SetFieldListboxProps<T extends string = string> = SetFieldProps<T> & {
9
+ export type SetFieldListboxProps<T extends string = string> = {
10
10
  onCheckedChange: (option: T, isChecked: boolean) => void;
11
- };
11
+ } & SetFieldProps<T>;
12
12
 
13
13
  export const SetFieldListbox = <T extends string = string>({
14
14
  description,
@@ -8,9 +8,9 @@ import { FieldGroup } from '../FieldGroup/FieldGroup.js';
8
8
 
9
9
  import type { SetFieldProps } from './SetField.js';
10
10
 
11
- export type SetFieldSelectProps<T extends string = string> = SetFieldProps<T> & {
11
+ export type SetFieldSelectProps<T extends string = string> = {
12
12
  onCheckedChange: (option: T, isChecked: boolean) => void;
13
- };
13
+ } & SetFieldProps<T>;
14
14
 
15
15
  export const SetFieldSelect = <T extends string = string>({
16
16
  description,
@@ -41,7 +41,7 @@ export function resolveStaticFormFields<T extends FormDataType>(content: FormCon
41
41
  for (const fieldName in formFields) {
42
42
  const field: UnknownFormField<T, typeof fieldName> = formFields[fieldName];
43
43
  if (field.kind === 'dynamic') {
44
- const resolvedField = field.render(data);
44
+ const resolvedField = field.render.call(undefined, data);
45
45
  if (resolvedField) {
46
46
  staticFormFields[fieldName] = resolvedField;
47
47
  }
@@ -27,14 +27,11 @@ type LineGraphData = readonly { [key: string]: any }[];
27
27
  type ExtractValidKeys<T extends LineGraphData, K> = Extract<ConditionalKeys<T[number], K>, string>;
28
28
 
29
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
- type LineGraphLine<T extends LineGraphData = { [key: string]: any }[]> = Pick<
31
- LineProps,
32
- 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'
33
- > & {
30
+ type LineGraphLine<T extends LineGraphData = { [key: string]: any }[]> = {
34
31
  err?: ExtractValidKeys<T, number>;
35
32
  name: string;
36
33
  val: ExtractValidKeys<T, number>;
37
- };
34
+ } & Pick<LineProps, 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'>;
38
35
 
39
36
  const strokeColors = {
40
37
  dark: '#cbd5e1', // slate-300
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const MenuBarItem = React.forwardRef<
8
8
  React.ElementRef<typeof Item>,
9
- React.ComponentPropsWithoutRef<typeof Item> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof Item>
12
12
  >(function MenuBarItem({ className, inset, ...props }, ref) {
13
13
  return (
14
14
  <Item
@@ -6,9 +6,9 @@ import { cn } from '../../utils.js';
6
6
 
7
7
  export const MenuBarLabel = React.forwardRef<
8
8
  React.ElementRef<typeof Label>,
9
- React.ComponentPropsWithoutRef<typeof Label> & {
9
+ {
10
10
  inset?: boolean;
11
- }
11
+ } & React.ComponentPropsWithoutRef<typeof Label>
12
12
  >(function MenuBarLabel({ className, inset, ...props }, ref) {
13
13
  return <Label className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)} ref={ref} {...props} />;
14
14
  });
@@ -7,9 +7,9 @@ import { cn } from '../../utils.js';
7
7
 
8
8
  export const MenuBarSubTrigger = React.forwardRef<
9
9
  React.ElementRef<typeof SubTrigger>,
10
- React.ComponentPropsWithoutRef<typeof SubTrigger> & {
10
+ {
11
11
  inset?: boolean;
12
- }
12
+ } & React.ComponentPropsWithoutRef<typeof SubTrigger>
13
13
  >(function MenuBarSubTrigger({ children, className, inset, ...props }, ref) {
14
14
  return (
15
15
  <SubTrigger
@@ -6,10 +6,10 @@ import { cn } from '../../utils.js';
6
6
  import { type ButtonProps, buttonVariants } from '../Button/Button.js';
7
7
 
8
8
  export type PaginationLinkProps = Simplify<
9
- Pick<ButtonProps, 'size'> &
10
- React.ComponentProps<'a'> & {
11
- isActive?: boolean;
12
- }
9
+ {
10
+ isActive?: boolean;
11
+ } & Pick<ButtonProps, 'size'> &
12
+ React.ComponentProps<'a'>
13
13
  >;
14
14
 
15
15
  export const PaginationLink = ({ children, className, isActive, size = 'icon', ...props }: PaginationLinkProps) => (
@@ -6,11 +6,11 @@ import { ResizableHandle, type ResizableHandleProps } from './ResizableHandle.js
6
6
  import { ResizablePanelGroup, type ResizablePanelGroupProps } from './ResizablePanelGroup.js';
7
7
 
8
8
  type ResizableRootType = React.FC<{ children: React.ReactNode }>;
9
- type ResizableType = ResizableRootType & {
9
+ type ResizableType = {
10
10
  Handle: React.FC<ResizableHandleProps>;
11
11
  Panel: React.FC<PanelProps>;
12
12
  PanelGroup: React.FC<ResizablePanelGroupProps>;
13
- };
13
+ } & ResizableRootType;
14
14
 
15
15
  // This is only for storybook and is unnecessary for real-world use
16
16
  const ResizableRoot: ResizableRootType = ({ children }) => <>{children}</>;
@@ -5,9 +5,9 @@ import { PanelResizeHandle } from 'react-resizable-panels';
5
5
 
6
6
  import { cn } from '../../utils.js';
7
7
 
8
- export type ResizableHandleProps = React.ComponentProps<typeof PanelResizeHandle> & {
8
+ export type ResizableHandleProps = {
9
9
  withHandle?: boolean;
10
- };
10
+ } & React.ComponentProps<typeof PanelResizeHandle>;
11
11
 
12
12
  export const ResizableHandle = ({ className, withHandle, ...props }: ResizableHandleProps) => (
13
13
  <PanelResizeHandle
@@ -15,17 +15,17 @@ export type BaseSearchBarProps = {
15
15
  placeholder?: string;
16
16
  };
17
17
 
18
- type ControlledSearchBarProps = BaseSearchBarProps & {
18
+ type ControlledSearchBarProps = {
19
19
  /** Event handler called when the value changes */
20
20
  onValueChange: (value: string) => void;
21
21
  /** The controlled value of the search bar, which should be used in conjunction with onValueChange */
22
22
  value: string;
23
- };
23
+ } & BaseSearchBarProps;
24
24
 
25
- type UncontrolledSearchBarProps = BaseSearchBarProps & {
25
+ type UncontrolledSearchBarProps = {
26
26
  onValueChange?: never;
27
27
  value?: never;
28
- };
28
+ } & BaseSearchBarProps;
29
29
 
30
30
  export type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
31
31
 
package/src/i18n.ts CHANGED
@@ -59,9 +59,9 @@ const i18n = createInstance({
59
59
  resources,
60
60
  returnObjects: true,
61
61
  supportedLngs
62
- }) as I18n & {
62
+ }) as {
63
63
  addPreInitTranslations<T extends TranslationsDef>(translations: T): void;
64
- };
64
+ } & I18n;
65
65
 
66
66
  i18n.addPreInitTranslations = function (this, translations) {
67
67
  if (!this.options.resources) {