@overmap-ai/blocks 1.0.6 → 1.0.7
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/README.md +3 -3
- package/dist/BaseMenuGroups/BaseItemGroup/BaseItemGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseItemGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseItemGroup/typings.d.ts +11 -0
- package/dist/BaseMenuGroups/BaseMenuComponents.d.ts +11 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/BaseMultiSelectGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/typings.d.ts +16 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/BaseSelectGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/typings.d.ts +16 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/BaseSubMenuGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/typings.d.ts +14 -0
- package/dist/BaseMenuGroups/index.d.ts +5 -0
- package/dist/BaseMenuGroups/typings.d.ts +37 -0
- package/dist/BaseMenuGroups/utils.d.ts +5 -0
- package/dist/Dialogs/Dialog/index.d.ts +1 -0
- package/dist/Dialogs/Dialog/utils.d.ts +7 -0
- package/dist/DropdownItemMenu/DropdownItemMenu.d.ts +9 -0
- package/dist/DropdownItemMenu/index.d.ts +2 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -17
- package/dist/DropdownMenu/DropdownMenuGroups.d.ts +18 -0
- package/dist/DropdownMenu/index.d.ts +2 -0
- package/dist/DropdownMultiSelect/DropdownMultiSelect.d.ts +6 -0
- package/dist/DropdownMultiSelect/index.d.ts +2 -0
- package/dist/DropdownSelect/DropdownSelect.d.ts +5 -57
- package/dist/DropdownSelect/index.d.ts +1 -1
- package/dist/Separator/typings.d.ts +2 -1
- package/dist/blocks.js +522 -251
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +515 -247
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/style.css +59 -59
- package/dist/utils.d.ts +12 -1
- package/package.json +102 -98
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "@radix-ui/colors";
|
|
2
2
|
export * from "@radix-ui/react-icons";
|
|
3
|
-
export { AccessibleIcon, Box, Grid, Container, Section, Heading, Blockquote, Code, Em, Kbd, Link, Quote, Strong, AspectRatio, Avatar, Callout, Card,
|
|
3
|
+
export { AccessibleIcon, Box, Grid, Container, Section, Heading, Blockquote, Code, Em, Kbd, Link, Quote, Strong, AspectRatio, Avatar, Callout, Card, HoverCard, TextField, Inset, RadioGroup, ScrollArea, Slider, Tabs, Portal, Slot, VisuallyHidden, } from "@radix-ui/themes";
|
|
4
4
|
export type { Responsive } from "@radix-ui/themes";
|
|
5
5
|
export * from "./Badge";
|
|
6
6
|
export * from "./Breadcrumb";
|
|
@@ -9,7 +9,9 @@ export * from "./ButtonGroup";
|
|
|
9
9
|
export * from "./Dialogs";
|
|
10
10
|
export * from "./Flex";
|
|
11
11
|
export * from "./DropdownMenu";
|
|
12
|
+
export * from "./DropdownItemMenu";
|
|
12
13
|
export * from "./DropdownSelect";
|
|
14
|
+
export * from "./DropdownMultiSelect";
|
|
13
15
|
export * from "./HoverUtility";
|
|
14
16
|
export * from "./Select";
|
|
15
17
|
export * from "./MultiSelect";
|
|
@@ -29,7 +31,7 @@ export * from "./Tooltip";
|
|
|
29
31
|
export * from "./Text";
|
|
30
32
|
export * from "./Theme";
|
|
31
33
|
export * from "./Separator";
|
|
32
|
-
export { useSeverityColor, useViewportSize } from "./utils";
|
|
34
|
+
export { useSeverityColor, useViewportSize, useKeyboardShortcut, useStopEventPropagation, useTextFilter, } from "./utils.ts";
|
|
33
35
|
export * from "./Checkbox";
|
|
34
36
|
export * from "./Table";
|
|
35
37
|
export * from "./Spinner";
|
package/dist/style.css
CHANGED
|
@@ -85,57 +85,34 @@
|
|
|
85
85
|
border-bottom-left-radius: 0;
|
|
86
86
|
}._separators_1f7v1_1 > *:not(:last-of-type) {
|
|
87
87
|
border-bottom: 1px solid var(--gray-a6);
|
|
88
|
-
}.
|
|
89
|
-
|
|
90
|
-
min-width: max-content;
|
|
91
|
-
margin: calc(-1 * var(--base-menu-content-padding));
|
|
92
|
-
padding: 0.2em 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
._DropdownMenuItemWrapper_hj4sz_8 {
|
|
96
|
-
padding: 0 0.2em;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
._DropdownMenuSeparatorWrapper_hj4sz_13 {
|
|
101
|
-
padding: 0.2em 0;
|
|
102
|
-
box-sizing: border-box;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
._DropdownMenuItem_hj4sz_8:not([data-disabled]) {
|
|
106
|
-
color: var(--gray-a11);
|
|
88
|
+
}._BaseMenuItem_1s610_1 {
|
|
89
|
+
font-size: var(--font-size-2);
|
|
107
90
|
}
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
background: var(--base-menu-bg);
|
|
91
|
+
._BaseMenuItem_1s610_1:after {
|
|
92
|
+
content: "";
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 0;
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
border-radius: var(--radius-2);
|
|
115
97
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
border-bottom: 1px solid var(--gray-a4);
|
|
98
|
+
._BaseMenuItem_1s610_1:hover:after {
|
|
99
|
+
background-color: var(--accent-a5);
|
|
119
100
|
}
|
|
120
101
|
|
|
121
|
-
.
|
|
122
|
-
background: transparent;
|
|
123
|
-
}
|
|
124
|
-
._DropdownSelectInputWrapper_k517z_12 > * {
|
|
102
|
+
._RemoveOutline_1s610_15 {
|
|
125
103
|
outline: none;
|
|
126
|
-
box-shadow: none;
|
|
127
|
-
background-color: transparent;
|
|
128
104
|
}
|
|
129
105
|
|
|
130
|
-
.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
106
|
+
._BaseMenuSeparator_1s610_19 {
|
|
107
|
+
margin: 0 calc(-1 * var(--base-menu-content-padding));
|
|
108
|
+
align-self: center;
|
|
109
|
+
}
|
|
110
|
+
._BaseMenuSeparator_1s610_19 > div {
|
|
111
|
+
border-bottom: 1px solid var(--gray-a4);
|
|
134
112
|
}
|
|
135
113
|
|
|
136
|
-
.
|
|
137
|
-
|
|
138
|
-
padding: 0.2em;
|
|
114
|
+
._BaseMenuInput_1s610_27 {
|
|
115
|
+
width: 100%;
|
|
139
116
|
}._fluid_7n1wr_1 {
|
|
140
117
|
flex-grow: 1;
|
|
141
118
|
width: auto;
|
|
@@ -460,23 +437,46 @@
|
|
|
460
437
|
overflow: hidden;
|
|
461
438
|
text-overflow: ellipsis;
|
|
462
439
|
display: block;
|
|
463
|
-
}/*
|
|
464
|
-
Doubling up on the radix-themes class to increase specificity over the default.
|
|
465
|
-
Note: the class name must be "radix-themes" for nested themes to work.
|
|
466
|
-
|
|
467
|
-
See documentation at https://www.radix-ui.com/themes/docs/theme/token-reference
|
|
468
|
-
*/
|
|
469
|
-
.radix-themes.radix-themes {
|
|
470
|
-
--cursor-button: pointer;
|
|
471
|
-
--cursor-menu-item: pointer;
|
|
472
|
-
--cursor-checkbox: pointer;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.rt-BaseButton {
|
|
476
|
-
/* fix the cursor token only being applied to HTML buttons */
|
|
477
|
-
cursor: var(--cursor-button);
|
|
478
|
-
}
|
|
479
|
-
|
|
440
|
+
}/*
|
|
441
|
+
Doubling up on the radix-themes class to increase specificity over the default.
|
|
442
|
+
Note: the class name must be "radix-themes" for nested themes to work.
|
|
443
|
+
|
|
444
|
+
See documentation at https://www.radix-ui.com/themes/docs/theme/token-reference
|
|
445
|
+
*/
|
|
446
|
+
.radix-themes.radix-themes {
|
|
447
|
+
--cursor-button: pointer;
|
|
448
|
+
--cursor-menu-item: pointer;
|
|
449
|
+
--cursor-checkbox: pointer;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.rt-BaseButton {
|
|
453
|
+
/* fix the cursor token only being applied to HTML buttons */
|
|
454
|
+
cursor: var(--cursor-button);
|
|
455
|
+
}
|
|
456
|
+
._light_1u8fs_1 span {
|
|
457
|
+
color: var(--gray-a3);
|
|
458
|
+
}
|
|
459
|
+
._light_1u8fs_1 [role=separator] {
|
|
460
|
+
background-color: var(--gray-a3);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
._bold_1u8fs_8 span {
|
|
464
|
+
color: var(--gray-a9);
|
|
465
|
+
}
|
|
466
|
+
._bold_1u8fs_8 [role=separator] {
|
|
467
|
+
background-color: var(--gray-a9);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
._full_1u8fs_15 span {
|
|
471
|
+
color: var(--gray-a12);
|
|
472
|
+
}
|
|
473
|
+
._full_1u8fs_15 [role=separator] {
|
|
474
|
+
background-color: var(--gray-a12);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
._Text_1u8fs_22 {
|
|
478
|
+
color: var(--gray-a6);
|
|
479
|
+
}button {
|
|
480
480
|
all: unset;
|
|
481
481
|
}
|
|
482
482
|
|
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.
|
|
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-
|
|
27
|
-
"@radix-ui/react-
|
|
28
|
-
"@radix-ui/react-
|
|
29
|
-
"@radix-ui/react-
|
|
30
|
-
"@radix-ui/react-
|
|
31
|
-
"@radix-ui/react-
|
|
32
|
-
"@radix-ui/
|
|
33
|
-
"
|
|
34
|
-
"react-
|
|
35
|
-
"
|
|
36
|
-
"@table-library/react-table-library": "^4.1.7",
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"react": "^
|
|
41
|
-
"react-
|
|
42
|
-
},
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@types
|
|
59
|
-
"@types/
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"
|
|
64
|
-
"eslint": "^
|
|
65
|
-
"eslint
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"eslint
|
|
69
|
-
"eslint-
|
|
70
|
-
"eslint-plugin-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@overmap-ai/blocks",
|
|
3
|
+
"version": "1.0.7",
|
|
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
|
+
}
|