@kwantis-id3/frontend-library 1.0.0-rc.25 → 1.0.0-rc.27

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.
@@ -34,6 +34,11 @@ export type TDropdownProps = {
34
34
  hoverColor?: string;
35
35
  /** Controls wether the dropdown should extend towards the left or the right */
36
36
  direction?: "left" | "right";
37
+ /** Controls whether the dropdown body should have absolute or fixed position
38
+ * By default, it is set to absolute, which means the dropdown will be positioned relative to its parent element.
39
+ * Use fixed if you want the body to be above the entire page, regardless of the parent element.
40
+ */
41
+ menuPosition?: "absolute" | "fixed";
37
42
  /** The mobile breakpoint, by default it's 768px */
38
43
  mobileBreakpoint?: number;
39
44
  };
@@ -13,6 +13,7 @@ export declare const DropdownBody: import("@emotion/styled").StyledComponent<{
13
13
  $direction: string;
14
14
  $isOpen: boolean;
15
15
  $bgColor: string;
16
+ $position: "absolute" | "fixed";
16
17
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
18
  export declare const DropdownItemInnerContainer: import("@emotion/styled").StyledComponent<{
18
19
  theme?: import("@emotion/react").Theme;
@@ -1,3 +1,21 @@
1
1
  import { TTreeViewItem } from "./TreeViewInterfaces";
2
+ /**
3
+ *
4
+ * @param items searchable nodes
5
+ * @returns all the root items
6
+ */
2
7
  export declare const getRootItems: (items: TTreeViewItem[]) => TTreeViewItem[];
8
+ /**
9
+ *
10
+ * @param items searchable nodes
11
+ * @param parentId the id of the parent node
12
+ * @returns all the children of the parent node
13
+ */
3
14
  export declare const getChildrenItems: (items: TTreeViewItem[], parentId: string) => TTreeViewItem[];
15
+ /**
16
+ *
17
+ * @param items searchable nodes
18
+ * @param searchTerm search term
19
+ * @returns all the matching nodes and their ancestors
20
+ */
21
+ export declare function searchWithAncestors(items: TTreeViewItem[], searchTerm: string): TTreeViewItem[];
@@ -47,6 +47,8 @@ type TTreeViewProps = TTreeItemFunctions & {
47
47
  };
48
48
  export type TUncontrolledTreeViewProps = TTreeViewProps & {
49
49
  items: TTreeViewItem[];
50
+ /** A search string used to filter the items. */
51
+ searchString?: string;
50
52
  };
51
53
  export type TControlledTreeViewProps = TTreeViewProps & {
52
54
  /** The current state of the Tree View. */
package/dist/index.d.ts CHANGED
@@ -351,6 +351,11 @@ type TDropdownProps = {
351
351
  hoverColor?: string;
352
352
  /** Controls wether the dropdown should extend towards the left or the right */
353
353
  direction?: "left" | "right";
354
+ /** Controls whether the dropdown body should have absolute or fixed position
355
+ * By default, it is set to absolute, which means the dropdown will be positioned relative to its parent element.
356
+ * Use fixed if you want the body to be above the entire page, regardless of the parent element.
357
+ */
358
+ menuPosition?: "absolute" | "fixed";
354
359
  /** The mobile breakpoint, by default it's 768px */
355
360
  mobileBreakpoint?: number;
356
361
  };
@@ -541,6 +546,8 @@ type TTreeViewProps = TTreeItemFunctions & {
541
546
  };
542
547
  type TUncontrolledTreeViewProps = TTreeViewProps & {
543
548
  items: TTreeViewItem[];
549
+ /** A search string used to filter the items. */
550
+ searchString?: string;
544
551
  };
545
552
  type TControlledTreeViewProps = TTreeViewProps & {
546
553
  /** The current state of the Tree View. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwantis-id3/frontend-library",
3
- "version": "1.0.0-rc.25",
3
+ "version": "1.0.0-rc.27",
4
4
  "description": "Kwantis frontend components collection",
5
5
  "scriptsComments": {
6
6
  "storybook": "Starts storybook in development mode",