@overmap-ai/blocks 1.0.5-fix-problems-magnus.1 → 1.0.6-master.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.
Files changed (41) hide show
  1. package/README.md +3 -3
  2. package/dist/BaseMenuGroups/BaseItemGroup/BaseItemGroup.d.ts +3 -0
  3. package/dist/BaseMenuGroups/BaseItemGroup/index.d.ts +2 -0
  4. package/dist/BaseMenuGroups/BaseItemGroup/typings.d.ts +11 -0
  5. package/dist/BaseMenuGroups/BaseMenuComponents.d.ts +11 -0
  6. package/dist/BaseMenuGroups/BaseMultiSelectGroup/BaseMultiSelectGroup.d.ts +3 -0
  7. package/dist/BaseMenuGroups/BaseMultiSelectGroup/index.d.ts +2 -0
  8. package/dist/BaseMenuGroups/BaseMultiSelectGroup/typings.d.ts +16 -0
  9. package/dist/BaseMenuGroups/BaseSelectGroup/BaseSelectGroup.d.ts +3 -0
  10. package/dist/BaseMenuGroups/BaseSelectGroup/index.d.ts +2 -0
  11. package/dist/BaseMenuGroups/BaseSelectGroup/typings.d.ts +16 -0
  12. package/dist/BaseMenuGroups/BaseSubMenuGroup/BaseSubMenuGroup.d.ts +3 -0
  13. package/dist/BaseMenuGroups/BaseSubMenuGroup/index.d.ts +2 -0
  14. package/dist/BaseMenuGroups/BaseSubMenuGroup/typings.d.ts +14 -0
  15. package/dist/BaseMenuGroups/index.d.ts +5 -0
  16. package/dist/BaseMenuGroups/typings.d.ts +37 -0
  17. package/dist/BaseMenuGroups/utils.d.ts +5 -0
  18. package/dist/ConfirmEditInput/ConfirmEditInput.d.ts +3 -0
  19. package/dist/ConfirmEditInput/index.d.ts +2 -0
  20. package/dist/ConfirmEditInput/typings.d.ts +14 -0
  21. package/dist/Dialogs/Dialog/index.d.ts +1 -0
  22. package/dist/Dialogs/Dialog/utils.d.ts +7 -0
  23. package/dist/DropdownItemMenu/DropdownItemMenu.d.ts +9 -0
  24. package/dist/DropdownItemMenu/index.d.ts +2 -0
  25. package/dist/DropdownMenu/DropdownMenu.d.ts +5 -17
  26. package/dist/DropdownMenu/DropdownMenuGroups.d.ts +18 -0
  27. package/dist/DropdownMenu/index.d.ts +2 -0
  28. package/dist/DropdownMultiSelect/DropdownMultiSelect.d.ts +6 -0
  29. package/dist/DropdownMultiSelect/index.d.ts +2 -0
  30. package/dist/DropdownSelect/DropdownSelect.d.ts +5 -57
  31. package/dist/DropdownSelect/index.d.ts +1 -1
  32. package/dist/Input/index.d.ts +1 -1
  33. package/dist/Separator/typings.d.ts +2 -1
  34. package/dist/blocks.js +3014 -1926
  35. package/dist/blocks.js.map +1 -0
  36. package/dist/blocks.umd.cjs +3749 -10
  37. package/dist/blocks.umd.cjs.map +1 -0
  38. package/dist/index.d.ts +6 -3
  39. package/dist/style.css +655 -1
  40. package/dist/utils.d.ts +12 -1
  41. package/package.json +102 -98
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Responsive, ThemeOptions } from "@radix-ui/themes";
2
- import { ReactNode, ReactElement } from "react";
2
+ import { ReactNode, ReactElement, SetStateAction, Dispatch } from "react";
3
3
  import { Severity } from "./typings";
4
4
  /**
5
5
  * Returns an object with mapped key values or a single mapped value
@@ -33,3 +33,14 @@ export declare const useKeyboardShortcut: (shortcutKeys: string[], disable: bool
33
33
  * function acts as a type stripper to remove any children of type string or number (which if using this function, are most
34
34
  * likely unwanted children). */
35
35
  export declare const childrenToArray: (children: ReactNode) => ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
36
+ /** utility used for stopping Event propagation.
37
+ * @return stopPropagation a callback that calls stopPropagation on a general event */
38
+ export declare const useStopEventPropagation: () => (event: Event) => void;
39
+ /** custom hook use for providing filter functionality based on a text input field
40
+ * @param filterFunction make sure this is wrapped in a useCallback
41
+ * @param values items that should be filtered on (of type T) */
42
+ export declare function useTextFilter<T>(values: T[], filterFunction: (value: T, filterValue: string) => boolean): [T[], string, Dispatch<SetStateAction<string>>];
43
+ export declare const genericMemo: <T>(component: T) => T;
44
+ export type AllOrNone<T> = T | {
45
+ [K in keyof T]?: never;
46
+ };
package/package.json CHANGED
@@ -1,98 +1,102 @@
1
- {
2
- "name": "@overmap-ai/blocks",
3
- "version": "1.0.5-fix-problems-magnus.1",
4
- "description": "A collection of React components for building Overmap's UI.",
5
- "private": false,
6
- "author": "Wôrdn Inc.",
7
- "license": "UNLICENSED",
8
- "type": "module",
9
- "main": "dist/blocks.umd.cjs",
10
- "module": "dist/blocks.js",
11
- "types": "dist/index.d.ts",
12
- "scripts": {
13
- "dev": "yarn storybook",
14
- "storybook": "storybook dev -p 6006",
15
- "build": "tsc --noEmit && vite build",
16
- "lint": "eslint src .storybook stories --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
17
- "lint:fix": "yarn lint --fix",
18
- "preview": "vite preview",
19
- "prepare": "husky install",
20
- "build-storybook": "storybook build"
21
- },
22
- "dependencies": {
23
- "@emotion/react": "^11.11.1",
24
- "@radix-ui/colors": "^3.0.0",
25
- "@radix-ui/react-accordion": "^1.1.2",
26
- "@radix-ui/react-dialog": "^1.0.5",
27
- "@radix-ui/react-dismissable-layer": "^1.0.5",
28
- "@radix-ui/react-icons": "^1.3.0",
29
- "@radix-ui/react-toast": "^1.1.5",
30
- "@radix-ui/react-toggle-group": "^1.0.4",
31
- "@radix-ui/react-toolbar": "^1.0.4",
32
- "@radix-ui/themes": "^2.0.0",
33
- "re-resizable": "^6.9.11",
34
- "react-responsive": "^9.0.2",
35
- "react-transition-group": "^4.4.5",
36
- "@table-library/react-table-library": "^4.1.7",
37
- "react-device-detect": "^2.2.3"
38
- },
39
- "peerDependencies": {
40
- "react": "^18.2.0",
41
- "react-dom": "^18.2.0"
42
- },
43
- "devDependencies": {
44
- "@faker-js/faker": "^8.3.1",
45
- "@rollup/plugin-commonjs": "^25.0.4",
46
- "@storybook/addon-a11y": "^7.4.5",
47
- "@storybook/addon-essentials": "^7.4.3",
48
- "@storybook/addon-interactions": "^7.4.3",
49
- "@storybook/addon-links": "^7.4.3",
50
- "@storybook/blocks": "^7.4.3",
51
- "@storybook/react": "^7.4.3",
52
- "@storybook/react-vite": "^7.4.3",
53
- "@storybook/testing-library": "^0.2.1",
54
- "@storybook/types": "^7.4.6",
55
- "@types/node": "^20.8.10",
56
- "@types/react": "^18.2.15",
57
- "@types/react-dom": "^18.2.7",
58
- "@types/react-responsive": "^8.0.7",
59
- "@types/react-transition-group": "^4.4.8",
60
- "@typescript-eslint/eslint-plugin": "^6.0.0",
61
- "@typescript-eslint/parser": "^6.0.0",
62
- "@vitejs/plugin-react-swc": "^3.3.2",
63
- "classnames": "^2.3.2",
64
- "eslint": "^8.45.0",
65
- "eslint-config-prettier": "^9.0.0",
66
- "eslint-plugin-prettier": "^5.0.0",
67
- "eslint-plugin-react": "^7.33.2",
68
- "eslint-plugin-react-hooks": "^4.6.0",
69
- "eslint-plugin-react-refresh": "^0.4.3",
70
- "eslint-plugin-storybook": "^0.6.13",
71
- "husky": "^8.0.3",
72
- "lint-staged": "^14.0.1",
73
- "prettier": "^3.0.3",
74
- "react": "^18.2.0",
75
- "react-dom": "^18.2.0",
76
- "rollup-plugin-polyfill-node": "^0.12.0",
77
- "sass": "^1.68.0",
78
- "storybook": "^7.4.3",
79
- "typescript": "^5.0.2",
80
- "vite": "^4.4.5",
81
- "vite-plugin-dts": "^3.5.3",
82
- "vite-plugin-externalize-deps": "^0.7.0"
83
- },
84
- "lint-staged": {
85
- "*.{js,jsx,ts,tsx}": [
86
- "yarn eslint --fix"
87
- ],
88
- "*.{css,scss}": [
89
- "prettier --write"
90
- ]
91
- },
92
- "files": [
93
- "dist"
94
- ],
95
- "resolutions": {
96
- "jackspeak": "2.1.1"
97
- }
98
- }
1
+ {
2
+ "name": "@overmap-ai/blocks",
3
+ "version": "1.0.6-master.1",
4
+ "description": "A collection of React components for building Overmap's UI.",
5
+ "private": false,
6
+ "author": "Wôrdn Inc.",
7
+ "license": "UNLICENSED",
8
+ "type": "module",
9
+ "main": "dist/blocks.umd.cjs",
10
+ "module": "dist/blocks.js",
11
+ "types": "dist/index.d.ts",
12
+ "scripts": {
13
+ "dev": "yarn storybook",
14
+ "storybook": "storybook dev -p 6006",
15
+ "build": "tsc --noEmit && vite build",
16
+ "lint": "eslint src .storybook stories --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
17
+ "lint:fix": "yarn lint --fix",
18
+ "preview": "vite preview",
19
+ "prepare": "husky install",
20
+ "build-storybook": "storybook build"
21
+ },
22
+ "dependencies": {
23
+ "@emotion/react": "^11.11.1",
24
+ "@radix-ui/colors": "^3.0.0",
25
+ "@radix-ui/react-accordion": "^1.1.2",
26
+ "@radix-ui/react-context-menu": "^2.1.5",
27
+ "@radix-ui/react-dialog": "^1.0.5",
28
+ "@radix-ui/react-dismissable-layer": "^1.0.5",
29
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
30
+ "@radix-ui/react-icons": "^1.3.0",
31
+ "@radix-ui/react-menu": "^2.0.6",
32
+ "@radix-ui/react-toast": "^1.1.5",
33
+ "@radix-ui/react-toggle-group": "^1.0.4",
34
+ "@radix-ui/react-toolbar": "^1.0.4",
35
+ "@radix-ui/themes": "^2.0.0",
36
+ "@table-library/react-table-library": "^4.1.7",
37
+ "feather-icons-react": "^0.6.2",
38
+ "re-resizable": "^6.9.11",
39
+ "react-device-detect": "^2.2.3",
40
+ "react-responsive": "^9.0.2",
41
+ "react-transition-group": "^4.4.5"
42
+ },
43
+ "peerDependencies": {
44
+ "react": "^18.2.0",
45
+ "react-dom": "^18.2.0"
46
+ },
47
+ "devDependencies": {
48
+ "@faker-js/faker": "^8.3.1",
49
+ "@rollup/plugin-commonjs": "^25.0.4",
50
+ "@storybook/addon-a11y": "^7.4.5",
51
+ "@storybook/addon-essentials": "^7.4.3",
52
+ "@storybook/addon-interactions": "^7.4.3",
53
+ "@storybook/addon-links": "^7.4.3",
54
+ "@storybook/blocks": "^7.4.3",
55
+ "@storybook/react": "^7.4.3",
56
+ "@storybook/react-vite": "^7.4.3",
57
+ "@storybook/testing-library": "^0.2.1",
58
+ "@storybook/types": "^7.4.6",
59
+ "@types/node": "^20.8.10",
60
+ "@types/react": "^18.2.15",
61
+ "@types/react-dom": "^18.2.7",
62
+ "@types/react-responsive": "^8.0.7",
63
+ "@types/react-transition-group": "^4.4.8",
64
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
65
+ "@typescript-eslint/parser": "^6.0.0",
66
+ "@vitejs/plugin-react-swc": "^3.3.2",
67
+ "classnames": "^2.3.2",
68
+ "eslint": "^8.45.0",
69
+ "eslint-config-prettier": "^9.0.0",
70
+ "eslint-plugin-prettier": "^5.0.0",
71
+ "eslint-plugin-react": "^7.33.2",
72
+ "eslint-plugin-react-hooks": "^4.6.0",
73
+ "eslint-plugin-react-refresh": "^0.4.3",
74
+ "eslint-plugin-storybook": "^0.6.13",
75
+ "husky": "^8.0.3",
76
+ "lint-staged": "^14.0.1",
77
+ "prettier": "^3.0.3",
78
+ "react": "^18.2.0",
79
+ "react-dom": "^18.2.0",
80
+ "rollup-plugin-polyfill-node": "^0.12.0",
81
+ "sass": "^1.68.0",
82
+ "storybook": "^7.4.3",
83
+ "typescript": "^5.0.2",
84
+ "vite": "^4.4.5",
85
+ "vite-plugin-dts": "^3.5.3",
86
+ "vite-plugin-externalize-deps": "^0.7.0"
87
+ },
88
+ "lint-staged": {
89
+ "*.{js,jsx,ts,tsx}": [
90
+ "yarn eslint --fix"
91
+ ],
92
+ "*.{css,scss}": [
93
+ "prettier --write"
94
+ ]
95
+ },
96
+ "files": [
97
+ "dist"
98
+ ],
99
+ "resolutions": {
100
+ "jackspeak": "2.1.1"
101
+ }
102
+ }