@newtonschool/grauity 2.0.3-beta.0 → 2.0.3-beta.1
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/index.d.ts.map +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/ui/elements/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/ui/elements/DropdownMenu/utils.d.ts +11 -0
- package/dist/ui/elements/DropdownMenu/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../../ui/elements/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../../ui/elements/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,QAAA,MAAM,YAAY,UAAW,iBAAiB,gBA2C7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { BaseItemOptionProps, BaseItemProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Filters the given array of `BaseItemProps` and returns only the items of type `BaseItemType.OPTION`.
|
|
@@ -18,4 +19,14 @@ export declare function getOptionsFromBaseDropdownItems(items: BaseItemProps[]):
|
|
|
18
19
|
* @returns An array of options that match the search value.
|
|
19
20
|
*/
|
|
20
21
|
export declare function defaultSearchMethod(searchValue: string, options: BaseItemOptionProps[]): BaseItemOptionProps[];
|
|
22
|
+
/**
|
|
23
|
+
* Calculates the position for a dropdown menu based on the position of a trigger element.
|
|
24
|
+
*
|
|
25
|
+
* @param triggerRef - A reference to the HTMLDivElement that triggers the dropdown menu.
|
|
26
|
+
* @returns An object containing the top and left positions for the dropdown menu.
|
|
27
|
+
*/
|
|
28
|
+
export declare function calculateDropdownMenuPosition(triggerRef: React.RefObject<HTMLDivElement>): {
|
|
29
|
+
top: number;
|
|
30
|
+
left: number;
|
|
31
|
+
};
|
|
21
32
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/DropdownMenu/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAgB,MAAM,SAAS,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,aAAa,EAAE,GACvB,mBAAmB,EAAE,CAIvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAC/B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,EAAE,GAC/B,mBAAmB,EAAE,CAQvB"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/DropdownMenu/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAgB,MAAM,SAAS,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC3C,KAAK,EAAE,aAAa,EAAE,GACvB,mBAAmB,EAAE,CAIvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAC/B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,EAAE,GAC/B,mBAAmB,EAAE,CAQvB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CACzC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;;;EAS9C"}
|