@blocknote/mantine 0.30.0 → 0.30.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/blocknote-mantine.cjs.map +1 -1
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +5 -4
- package/src/BlockNoteTheme.ts +2 -2
- package/src/BlockNoteView.tsx +8 -7
- package/src/badge/Badge.tsx +4 -2
- package/src/comments/Card.tsx +2 -1
- package/src/comments/Comment.tsx +2 -1
- package/src/comments/Editor.tsx +3 -2
- package/src/mantineStyles.css +26 -21
- package/src/menu/Button.tsx +4 -2
- package/src/menu/Menu.tsx +15 -8
- package/src/panel/Panel.tsx +4 -2
- package/src/panel/PanelButton.tsx +2 -1
- package/src/popover/Popover.tsx +2 -2
- package/src/sideMenu/SideMenu.tsx +2 -1
- package/src/sideMenu/SideMenuButton.tsx +4 -2
- package/src/style.css +11 -10
- package/src/suggestionMenu/SuggestionMenu.tsx +2 -1
- package/src/suggestionMenu/SuggestionMenuItem.tsx +7 -4
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx +2 -1
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx +2 -1
- package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +3 -2
- package/src/tableHandle/ExtendButton.tsx +2 -1
- package/src/tableHandle/TableHandle.tsx +2 -1
- package/src/toolbar/Toolbar.tsx +3 -2
- package/src/toolbar/ToolbarButton.tsx +7 -4
- package/src/toolbar/ToolbarSelect.tsx +6 -3
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1747749777429,"assets":[{"name":"blocknote-mantine.cjs","size":20384},{"name":"blocknote-mantine.cjs.map","size":312332}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-mantine.cjs"],"names":["blocknote-mantine"]}],"modules":[{"name":"./src/BlockNoteTheme.ts","size":2185,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarButton.tsx","size":2674,"chunks":["ec22802"]},{"name":"./src/badge/Badge.tsx","size":1437,"chunks":["ec22802"]},{"name":"./src/comments/Card.tsx","size":1403,"chunks":["ec22802"]},{"name":"./src/comments/Comment.tsx","size":2082,"chunks":["ec22802"]},{"name":"./src/comments/Editor.tsx","size":965,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":575,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/lib/iconContext.mjs","size":251,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/lib/iconBase.mjs","size":4003,"chunks":["ec22802"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/hi/index.mjs","size":720,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":4095,"chunks":["ec22802"]},{"name":"./src/menu/Button.tsx","size":765,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1015,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":345,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":367,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":209,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":392,"chunks":["ec22802"]},{"name":"./src/popover/Popover.tsx","size":679,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":309,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":773,"chunks":["ec22802"]},{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":307,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":338,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1822,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":227,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":283,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":361,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":436,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":855,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":385,"chunks":["ec22802"]},{"name":"./src/tableHandle/ExtendButton.tsx","size":333,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":452,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":666,"chunks":["ec22802"]},{"name":"./src/toolbar/ToolbarSelect.tsx","size":1785,"chunks":["ec22802"]},{"name":"./src/components.tsx","size":1540,"chunks":["ec22802"]},{"name":"./src/BlockNoteView.tsx","size":1638,"chunks":["ec22802"]},{"name":"./src/defaultThemes.ts","size":2023,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":0,"chunks":["ec22802"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/mantine"
|
|
12
12
|
},
|
|
13
13
|
"license": "MPL-2.0",
|
|
14
|
-
"version": "0.30.
|
|
14
|
+
"version": "0.30.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -44,12 +44,13 @@
|
|
|
44
44
|
},
|
|
45
45
|
"./style.css": {
|
|
46
46
|
"import": "./dist/style.css",
|
|
47
|
-
"require": "./dist/style.css"
|
|
47
|
+
"require": "./dist/style.css",
|
|
48
|
+
"style": "./dist/style.css"
|
|
48
49
|
}
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@blocknote/core": "0.30.
|
|
52
|
-
"@blocknote/react": "0.30.
|
|
52
|
+
"@blocknote/core": "0.30.1",
|
|
53
|
+
"@blocknote/react": "0.30.1",
|
|
53
54
|
"@mantine/core": "^7.10.1",
|
|
54
55
|
"@mantine/hooks": "^7.10.1",
|
|
55
56
|
"@mantine/utils": "^6.0.21",
|
package/src/BlockNoteTheme.ts
CHANGED
|
@@ -37,7 +37,7 @@ type NestedObject = { [key: string]: number | string | NestedObject };
|
|
|
37
37
|
const cssVariablesHelper = (
|
|
38
38
|
theme: Theme,
|
|
39
39
|
editorDOM: HTMLElement,
|
|
40
|
-
unset = false
|
|
40
|
+
unset = false,
|
|
41
41
|
) => {
|
|
42
42
|
const result: string[] = [];
|
|
43
43
|
|
|
@@ -72,7 +72,7 @@ const cssVariablesHelper = (
|
|
|
72
72
|
|
|
73
73
|
export const applyBlockNoteCSSVariablesFromTheme = (
|
|
74
74
|
theme: Theme,
|
|
75
|
-
editorDOM: HTMLElement
|
|
75
|
+
editorDOM: HTMLElement,
|
|
76
76
|
) => cssVariablesHelper(theme, editorDOM);
|
|
77
77
|
|
|
78
78
|
// We don't need a theme to remove the CSS variables, but having access to a
|
package/src/BlockNoteView.tsx
CHANGED
|
@@ -29,7 +29,7 @@ const mantineTheme = {
|
|
|
29
29
|
export const BlockNoteView = <
|
|
30
30
|
BSchema extends BlockSchema,
|
|
31
31
|
ISchema extends InlineContentSchema,
|
|
32
|
-
SSchema extends StyleSchema
|
|
32
|
+
SSchema extends StyleSchema,
|
|
33
33
|
>(
|
|
34
34
|
props: Omit<BlockNoteViewProps<BSchema, ISchema, SSchema>, "theme"> & {
|
|
35
35
|
theme?:
|
|
@@ -40,7 +40,7 @@ export const BlockNoteView = <
|
|
|
40
40
|
light: Theme;
|
|
41
41
|
dark: Theme;
|
|
42
42
|
};
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
44
|
) => {
|
|
45
45
|
const { className, theme, ...rest } = props;
|
|
46
46
|
|
|
@@ -62,7 +62,7 @@ export const BlockNoteView = <
|
|
|
62
62
|
if ("light" in theme && "dark" in theme) {
|
|
63
63
|
applyBlockNoteCSSVariablesFromTheme(
|
|
64
64
|
theme[defaultColorScheme === "dark" ? "dark" : "light"],
|
|
65
|
-
node
|
|
65
|
+
node,
|
|
66
66
|
);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
@@ -71,15 +71,15 @@ export const BlockNoteView = <
|
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
[defaultColorScheme, theme]
|
|
74
|
+
[defaultColorScheme, theme],
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
const finalTheme =
|
|
78
78
|
typeof theme === "string"
|
|
79
79
|
? theme
|
|
80
80
|
: defaultColorScheme !== "no-preference"
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
? defaultColorScheme
|
|
82
|
+
: "light";
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<ComponentsContext.Provider value={components}>
|
|
@@ -92,7 +92,8 @@ export const BlockNoteView = <
|
|
|
92
92
|
// element needs to already be rendered, so we can't set it to the
|
|
93
93
|
// editor container element. Instead, we set it to `undefined` and set it
|
|
94
94
|
// manually in `BlockNoteViewRaw`.
|
|
95
|
-
getRootElement={() => undefined}
|
|
95
|
+
getRootElement={() => undefined}
|
|
96
|
+
>
|
|
96
97
|
<BlockNoteViewRaw
|
|
97
98
|
data-mantine-color-scheme={finalTheme}
|
|
98
99
|
className={mergeCSSClasses("bn-mantine", className || "")}
|
package/src/badge/Badge.tsx
CHANGED
|
@@ -46,7 +46,8 @@ export const Badge = forwardRef<
|
|
|
46
46
|
}}
|
|
47
47
|
variant={"light"}
|
|
48
48
|
icon={null}
|
|
49
|
-
ref={ref}
|
|
49
|
+
ref={ref}
|
|
50
|
+
>
|
|
50
51
|
<span>{icon}</span>
|
|
51
52
|
<span>{text}</span>
|
|
52
53
|
</MantineChip>
|
|
@@ -65,7 +66,8 @@ export const Badge = forwardRef<
|
|
|
65
66
|
mainTooltip={mainTooltip}
|
|
66
67
|
secondaryTooltip={secondaryTooltip}
|
|
67
68
|
/>
|
|
68
|
-
}
|
|
69
|
+
}
|
|
70
|
+
>
|
|
69
71
|
{badge}
|
|
70
72
|
</MantineTooltip>
|
|
71
73
|
);
|
package/src/comments/Card.tsx
CHANGED
|
@@ -41,7 +41,8 @@ export const Card = forwardRef<
|
|
|
41
41
|
onFocus={onFocus}
|
|
42
42
|
onBlur={onBlur}
|
|
43
43
|
tabIndex={tabIndex}
|
|
44
|
-
ref={mergeRefs([ref, scrollRef])}
|
|
44
|
+
ref={mergeRefs([ref, scrollRef])}
|
|
45
|
+
>
|
|
45
46
|
{headerText && (
|
|
46
47
|
<MantineText className={"bn-header-text"}>{headerText}</MantineText>
|
|
47
48
|
)}
|
package/src/comments/Comment.tsx
CHANGED
package/src/comments/Editor.tsx
CHANGED
|
@@ -30,7 +30,8 @@ export const Editor = forwardRef<
|
|
|
30
30
|
editable={editable}
|
|
31
31
|
ref={ref}
|
|
32
32
|
onFocus={onFocus}
|
|
33
|
-
onBlur={onBlur}
|
|
33
|
+
onBlur={onBlur}
|
|
34
|
+
>
|
|
34
35
|
<FormattingToolbarController
|
|
35
36
|
formattingToolbar={CustomFormattingToolbar}
|
|
36
37
|
/>
|
|
@@ -40,7 +41,7 @@ export const Editor = forwardRef<
|
|
|
40
41
|
|
|
41
42
|
const CustomFormattingToolbar = () => {
|
|
42
43
|
const items = getFormattingToolbarItems([]).filter(
|
|
43
|
-
(el) => el.key !== "nestBlockButton" && el.key !== "unnestBlockButton"
|
|
44
|
+
(el) => el.key !== "nestBlockButton" && el.key !== "unnestBlockButton",
|
|
44
45
|
);
|
|
45
46
|
return (
|
|
46
47
|
<FormattingToolbar blockTypeSelectItems={[]}>{items}</FormattingToolbar>
|
package/src/mantineStyles.css
CHANGED
|
@@ -89,50 +89,55 @@
|
|
|
89
89
|
(src: https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/global.css)
|
|
90
90
|
but with styles set on `body` and `html` instead set on `bn-container`, as
|
|
91
91
|
well as other minor changes. */
|
|
92
|
-
.bn-mantine *,
|
|
93
|
-
|
|
92
|
+
.bn-mantine *,
|
|
93
|
+
.bn-mantine :after,
|
|
94
|
+
.bn-mantine :before {
|
|
95
|
+
box-sizing: border-box;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
.bn-mantine button,
|
|
97
99
|
.bn-mantine select {
|
|
98
|
-
|
|
100
|
+
text-transform: none;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
@media screen and (max-device-width: 500px) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
.bn-mantine {
|
|
105
|
+
-webkit-text-size-adjust: 100%;
|
|
106
|
+
}
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
@media (prefers-reduced-motion: reduce) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
.bn-mantine [data-respect-reduced-motion] [data-reduce-motion] {
|
|
111
|
+
animation: none;
|
|
112
|
+
transition: none;
|
|
113
|
+
}
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
.bn-mantine [data-mantine-color-scheme=dark] .mantine-dark-hidden,
|
|
115
|
-
|
|
116
|
+
.bn-mantine [data-mantine-color-scheme="dark"] .mantine-dark-hidden,
|
|
117
|
+
.bn-mantine [data-mantine-color-scheme="light"] .mantine-light-hidden {
|
|
118
|
+
display: none;
|
|
116
119
|
}
|
|
117
120
|
|
|
118
121
|
.bn-mantine .mantine-focus-auto:focus-visible {
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
outline: calc(0.125rem * var(--mantine-scale)) solid
|
|
123
|
+
var(--mantine-primary-color-filled);
|
|
124
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
.bn-mantine .mantine-focus-always:focus {
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
outline: calc(0.125rem * var(--mantine-scale)) solid
|
|
129
|
+
var(--mantine-primary-color-filled);
|
|
130
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
.bn-mantine .mantine-focus-never:focus {
|
|
129
|
-
|
|
134
|
+
outline: none;
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
.bn-mantine .mantine-active:active {
|
|
133
|
-
|
|
138
|
+
transform: translateY(calc(0.0625rem * var(--mantine-scale)));
|
|
134
139
|
}
|
|
135
140
|
|
|
136
|
-
.bn-mantine[dir=rtl] .mantine-rotate-rtl {
|
|
137
|
-
|
|
138
|
-
}
|
|
141
|
+
.bn-mantine[dir="rtl"] .mantine-rotate-rtl {
|
|
142
|
+
transform: rotate(180deg);
|
|
143
|
+
}
|
package/src/menu/Button.tsx
CHANGED
|
@@ -38,7 +38,8 @@ export const Button = forwardRef<
|
|
|
38
38
|
onDragStart={onDragStart}
|
|
39
39
|
draggable={draggable}
|
|
40
40
|
aria-label={label}
|
|
41
|
-
{...rest}
|
|
41
|
+
{...rest}
|
|
42
|
+
>
|
|
42
43
|
{icon}
|
|
43
44
|
</MantineActionIcon>
|
|
44
45
|
);
|
|
@@ -53,7 +54,8 @@ export const Button = forwardRef<
|
|
|
53
54
|
onDragStart={onDragStart}
|
|
54
55
|
draggable={draggable}
|
|
55
56
|
aria-label={label}
|
|
56
|
-
{...rest}
|
|
57
|
+
{...rest}
|
|
58
|
+
>
|
|
57
59
|
{children}
|
|
58
60
|
</MantineButton>
|
|
59
61
|
);
|
package/src/menu/Menu.tsx
CHANGED
|
@@ -110,12 +110,14 @@ const SubMenu = forwardRef<
|
|
|
110
110
|
value={{
|
|
111
111
|
onMenuMouseOver: mouseOver,
|
|
112
112
|
onMenuMouseLeave: mouseLeave,
|
|
113
|
-
}}
|
|
113
|
+
}}
|
|
114
|
+
>
|
|
114
115
|
<MantineMenu.Item
|
|
115
116
|
className="bn-menu-item bn-mt-sub-menu-item"
|
|
116
117
|
ref={mergeRefs(ref, itemRef)}
|
|
117
118
|
onMouseOver={mouseOver}
|
|
118
|
-
onMouseLeave={mouseLeave}
|
|
119
|
+
onMouseLeave={mouseLeave}
|
|
120
|
+
>
|
|
119
121
|
<MantineMenu
|
|
120
122
|
portalProps={{
|
|
121
123
|
target: itemRef.current
|
|
@@ -126,7 +128,8 @@ const SubMenu = forwardRef<
|
|
|
126
128
|
trigger={"hover"}
|
|
127
129
|
opened={opened}
|
|
128
130
|
onChange={onOpenChange}
|
|
129
|
-
position={position}
|
|
131
|
+
position={position}
|
|
132
|
+
>
|
|
130
133
|
{children}
|
|
131
134
|
</MantineMenu>
|
|
132
135
|
</MantineMenu.Item>
|
|
@@ -148,7 +151,8 @@ export const Menu = (props: ComponentProps["Generic"]["Menu"]["Root"]) => {
|
|
|
148
151
|
withinPortal={false}
|
|
149
152
|
middlewares={{ flip: true, shift: true, inline: false, size: true }}
|
|
150
153
|
onChange={onOpenChange}
|
|
151
|
-
position={position}
|
|
154
|
+
position={position}
|
|
155
|
+
>
|
|
152
156
|
{children}
|
|
153
157
|
</MantineMenu>
|
|
154
158
|
);
|
|
@@ -173,7 +177,8 @@ export const MenuItem = forwardRef<
|
|
|
173
177
|
e.stopPropagation();
|
|
174
178
|
}}
|
|
175
179
|
ref={ref}
|
|
176
|
-
{...rest}
|
|
180
|
+
{...rest}
|
|
181
|
+
>
|
|
177
182
|
{children}
|
|
178
183
|
<HiChevronRight size={15} />
|
|
179
184
|
</div>
|
|
@@ -193,14 +198,15 @@ export const MenuItem = forwardRef<
|
|
|
193
198
|
) : null
|
|
194
199
|
}
|
|
195
200
|
onClick={onClick}
|
|
196
|
-
{...rest}
|
|
201
|
+
{...rest}
|
|
202
|
+
>
|
|
197
203
|
{children}
|
|
198
204
|
</MantineMenu.Item>
|
|
199
205
|
);
|
|
200
206
|
});
|
|
201
207
|
|
|
202
208
|
export const MenuTrigger = (
|
|
203
|
-
props: ComponentProps["Generic"]["Menu"]["Trigger"]
|
|
209
|
+
props: ComponentProps["Generic"]["Menu"]["Trigger"],
|
|
204
210
|
) => {
|
|
205
211
|
const {
|
|
206
212
|
children,
|
|
@@ -233,7 +239,8 @@ export const MenuDropdown = forwardRef<
|
|
|
233
239
|
className={className}
|
|
234
240
|
ref={ref}
|
|
235
241
|
onMouseOver={ctx?.onMenuMouseOver}
|
|
236
|
-
onMouseLeave={ctx?.onMenuMouseLeave}
|
|
242
|
+
onMouseLeave={ctx?.onMenuMouseLeave}
|
|
243
|
+
>
|
|
237
244
|
{children}
|
|
238
245
|
</MantineMenu.Dropdown>
|
|
239
246
|
);
|
package/src/panel/Panel.tsx
CHANGED
|
@@ -29,7 +29,8 @@ export const Panel = forwardRef<
|
|
|
29
29
|
<MantineTabs
|
|
30
30
|
value={openTab}
|
|
31
31
|
defaultValue={defaultOpenTab}
|
|
32
|
-
onChange={setOpenTab as any}
|
|
32
|
+
onChange={setOpenTab as any}
|
|
33
|
+
>
|
|
33
34
|
{loading && <MantineLoadingOverlay visible={loading} />}
|
|
34
35
|
|
|
35
36
|
<MantineTabs.List>
|
|
@@ -37,7 +38,8 @@ export const Panel = forwardRef<
|
|
|
37
38
|
<MantineTabs.Tab
|
|
38
39
|
data-test={`${tab.name.toLowerCase()}-tab`}
|
|
39
40
|
value={tab.name}
|
|
40
|
-
key={tab.name}
|
|
41
|
+
key={tab.name}
|
|
42
|
+
>
|
|
41
43
|
{tab.name}
|
|
42
44
|
</MantineTabs.Tab>
|
|
43
45
|
))}
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import { ComponentProps } from "@blocknote/react";
|
|
|
9
9
|
import { forwardRef } from "react";
|
|
10
10
|
|
|
11
11
|
export const Popover = (
|
|
12
|
-
props: ComponentProps["Generic"]["Popover"]["Root"]
|
|
12
|
+
props: ComponentProps["Generic"]["Popover"]["Root"],
|
|
13
13
|
) => {
|
|
14
14
|
const { opened, position, children, ...rest } = props;
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ export const Popover = (
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const PopoverTrigger = (
|
|
26
|
-
props: ComponentProps["Generic"]["Popover"]["Trigger"]
|
|
26
|
+
props: ComponentProps["Generic"]["Popover"]["Trigger"],
|
|
27
27
|
) => {
|
|
28
28
|
const { children, ...rest } = props;
|
|
29
29
|
|
|
@@ -38,7 +38,8 @@ export const SideMenuButton = forwardRef<
|
|
|
38
38
|
onDragStart={onDragStart}
|
|
39
39
|
draggable={draggable}
|
|
40
40
|
aria-label={label}
|
|
41
|
-
{...rest}
|
|
41
|
+
{...rest}
|
|
42
|
+
>
|
|
42
43
|
{icon}
|
|
43
44
|
</MantineActionIcon>
|
|
44
45
|
);
|
|
@@ -53,7 +54,8 @@ export const SideMenuButton = forwardRef<
|
|
|
53
54
|
onDragStart={onDragStart}
|
|
54
55
|
draggable={draggable}
|
|
55
56
|
aria-label={label}
|
|
56
|
-
{...rest}
|
|
57
|
+
{...rest}
|
|
58
|
+
>
|
|
57
59
|
{children}
|
|
58
60
|
</MantineButton>
|
|
59
61
|
);
|
package/src/style.css
CHANGED
|
@@ -256,7 +256,8 @@
|
|
|
256
256
|
max-height: 100%;
|
|
257
257
|
position: relative;
|
|
258
258
|
box-shadow: var(--mantine-shadow-md);
|
|
259
|
-
border: calc(0.0625rem * var(--mantine-scale)) solid
|
|
259
|
+
border: calc(0.0625rem * var(--mantine-scale)) solid
|
|
260
|
+
var(--mantine-color-gray-2);
|
|
260
261
|
border-radius: var(--mantine-radius-default);
|
|
261
262
|
padding: 4px;
|
|
262
263
|
}
|
|
@@ -576,8 +577,8 @@
|
|
|
576
577
|
}
|
|
577
578
|
|
|
578
579
|
.bn-mt-sub-menu-item
|
|
579
|
-
> .mantine-Menu-itemLabel
|
|
580
|
-
> div:not(.mantine-Menu-dropdown) {
|
|
580
|
+
> .mantine-Menu-itemLabel
|
|
581
|
+
> div:not(.mantine-Menu-dropdown) {
|
|
581
582
|
align-items: center;
|
|
582
583
|
display: flex;
|
|
583
584
|
justify-content: space-between;
|
|
@@ -714,18 +715,18 @@
|
|
|
714
715
|
}
|
|
715
716
|
|
|
716
717
|
.bn-mantine
|
|
717
|
-
.bn-badge
|
|
718
|
-
.mantine-Chip-label
|
|
719
|
-
> span:not(.mantine-Chip-iconWrapper) {
|
|
718
|
+
.bn-badge
|
|
719
|
+
.mantine-Chip-label
|
|
720
|
+
> span:not(.mantine-Chip-iconWrapper) {
|
|
720
721
|
display: inline-flex;
|
|
721
722
|
gap: 4px;
|
|
722
723
|
}
|
|
723
724
|
|
|
724
725
|
.bn-mantine
|
|
725
|
-
.bn-badge
|
|
726
|
-
.mantine-Chip-label
|
|
727
|
-
> span:not(.mantine-Chip-iconWrapper)
|
|
728
|
-
> span {
|
|
726
|
+
.bn-badge
|
|
727
|
+
.mantine-Chip-label
|
|
728
|
+
> span:not(.mantine-Chip-iconWrapper)
|
|
729
|
+
> span {
|
|
729
730
|
align-items: center;
|
|
730
731
|
display: inline-flex;
|
|
731
732
|
justify-content: center;
|
|
@@ -27,7 +27,7 @@ export const SuggestionMenuItem = forwardRef<
|
|
|
27
27
|
|
|
28
28
|
const overflow = elementOverflow(
|
|
29
29
|
itemRef.current,
|
|
30
|
-
document.querySelector(".bn-suggestion-menu")
|
|
30
|
+
document.querySelector(".bn-suggestion-menu")!,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
if (overflow === "top") {
|
|
@@ -45,11 +45,13 @@ export const SuggestionMenuItem = forwardRef<
|
|
|
45
45
|
id={id}
|
|
46
46
|
role="option"
|
|
47
47
|
onClick={onClick}
|
|
48
|
-
aria-selected={isSelected || undefined}
|
|
48
|
+
aria-selected={isSelected || undefined}
|
|
49
|
+
>
|
|
49
50
|
{item.icon && (
|
|
50
51
|
<MantineGroup
|
|
51
52
|
className="bn-mt-suggestion-menu-item-section"
|
|
52
|
-
data-position="left"
|
|
53
|
+
data-position="left"
|
|
54
|
+
>
|
|
53
55
|
{item.icon}
|
|
54
56
|
</MantineGroup>
|
|
55
57
|
)}
|
|
@@ -64,7 +66,8 @@ export const SuggestionMenuItem = forwardRef<
|
|
|
64
66
|
{item.badge && (
|
|
65
67
|
<MantineGroup
|
|
66
68
|
data-position="right"
|
|
67
|
-
className="bn-mt-suggestion-menu-item-section"
|
|
69
|
+
className="bn-mt-suggestion-menu-item-section"
|
|
70
|
+
>
|
|
68
71
|
<MantineBadge size={"xs"}>{item.badge}</MantineBadge>
|
|
69
72
|
</MantineGroup>
|
|
70
73
|
)}
|
|
@@ -16,7 +16,8 @@ export const GridSuggestionMenuEmptyItem = forwardRef<
|
|
|
16
16
|
<MantineGroup
|
|
17
17
|
className={className}
|
|
18
18
|
style={{ gridColumn: `1 / ${columns + 1}` }}
|
|
19
|
-
ref={ref}
|
|
19
|
+
ref={ref}
|
|
20
|
+
>
|
|
20
21
|
<MantineGroup className="bn-mt-suggestion-menu-item-title">
|
|
21
22
|
{children}
|
|
22
23
|
</MantineGroup>
|
|
@@ -21,7 +21,7 @@ export const GridSuggestionMenuItem = forwardRef<
|
|
|
21
21
|
|
|
22
22
|
const overflow = elementOverflow(
|
|
23
23
|
itemRef.current,
|
|
24
|
-
document.querySelector(".bn-grid-suggestion-menu")
|
|
24
|
+
document.querySelector(".bn-grid-suggestion-menu")!,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
if (overflow === "top") {
|
|
@@ -38,7 +38,8 @@ export const GridSuggestionMenuItem = forwardRef<
|
|
|
38
38
|
id={id}
|
|
39
39
|
role="option"
|
|
40
40
|
onClick={onClick}
|
|
41
|
-
aria-selected={isSelected || undefined}
|
|
41
|
+
aria-selected={isSelected || undefined}
|
|
42
|
+
>
|
|
42
43
|
{item.icon}
|
|
43
44
|
</div>
|
|
44
45
|
);
|
package/src/toolbar/Toolbar.tsx
CHANGED
|
@@ -36,9 +36,10 @@ export const Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(
|
|
|
36
36
|
// TODO: aria-label
|
|
37
37
|
onMouseEnter={onMouseEnter}
|
|
38
38
|
onMouseLeave={onMouseLeave}
|
|
39
|
-
gap={variant === "action-toolbar" ? 2 : undefined}
|
|
39
|
+
gap={variant === "action-toolbar" ? 2 : undefined}
|
|
40
|
+
>
|
|
40
41
|
{children}
|
|
41
42
|
</Flex>
|
|
42
43
|
);
|
|
43
|
-
}
|
|
44
|
+
},
|
|
44
45
|
);
|
|
@@ -83,7 +83,8 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
83
83
|
size={variant === "compact" ? "compact-xs" : "xs"}
|
|
84
84
|
disabled={isDisabled || false}
|
|
85
85
|
ref={ref}
|
|
86
|
-
{...rest}
|
|
86
|
+
{...rest}
|
|
87
|
+
>
|
|
87
88
|
{children}
|
|
88
89
|
</MantineButton>
|
|
89
90
|
) : (
|
|
@@ -118,7 +119,8 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
118
119
|
size={variant === "compact" ? 20 : 30}
|
|
119
120
|
disabled={isDisabled || false}
|
|
120
121
|
ref={ref}
|
|
121
|
-
{...rest}
|
|
122
|
+
{...rest}
|
|
123
|
+
>
|
|
122
124
|
{icon}
|
|
123
125
|
</MantineActionIcon>
|
|
124
126
|
);
|
|
@@ -136,9 +138,10 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
136
138
|
mainTooltip={mainTooltip}
|
|
137
139
|
secondaryTooltip={secondaryTooltip}
|
|
138
140
|
/>
|
|
139
|
-
}
|
|
141
|
+
}
|
|
142
|
+
>
|
|
140
143
|
{button}
|
|
141
144
|
</MantineTooltip>
|
|
142
145
|
);
|
|
143
|
-
}
|
|
146
|
+
},
|
|
144
147
|
);
|