@blocknote/mantine 0.30.0 → 0.31.0

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 (37) hide show
  1. package/dist/blocknote-mantine.cjs +1 -1
  2. package/dist/blocknote-mantine.cjs.map +1 -1
  3. package/dist/blocknote-mantine.js +120 -113
  4. package/dist/blocknote-mantine.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/webpack-stats.json +1 -1
  7. package/package.json +5 -4
  8. package/src/BlockNoteTheme.ts +2 -2
  9. package/src/BlockNoteView.tsx +8 -7
  10. package/src/badge/Badge.tsx +4 -2
  11. package/src/comments/Card.tsx +2 -1
  12. package/src/comments/Comment.tsx +2 -1
  13. package/src/comments/Editor.tsx +3 -2
  14. package/src/form/TextInput.tsx +12 -2
  15. package/src/mantineStyles.css +26 -21
  16. package/src/menu/Button.tsx +4 -2
  17. package/src/menu/Menu.tsx +15 -8
  18. package/src/panel/Panel.tsx +4 -2
  19. package/src/panel/PanelButton.tsx +2 -1
  20. package/src/popover/Popover.tsx +2 -2
  21. package/src/sideMenu/SideMenu.tsx +2 -1
  22. package/src/sideMenu/SideMenuButton.tsx +4 -2
  23. package/src/style.css +68 -10
  24. package/src/suggestionMenu/SuggestionMenu.tsx +2 -1
  25. package/src/suggestionMenu/SuggestionMenuItem.tsx +8 -4
  26. package/src/suggestionMenu/SuggestionMenuLoader.tsx +4 -6
  27. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx +2 -1
  28. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx +2 -1
  29. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +3 -2
  30. package/src/tableHandle/ExtendButton.tsx +2 -1
  31. package/src/tableHandle/TableHandle.tsx +2 -1
  32. package/src/toolbar/Toolbar.tsx +4 -4
  33. package/src/toolbar/ToolbarButton.tsx +8 -6
  34. package/src/toolbar/ToolbarSelect.tsx +6 -3
  35. package/types/src/form/TextInput.d.ts +5 -1
  36. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +1 -1
  37. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +0 -1
@@ -1 +1 @@
1
- {"builtAt":1746802467894,"assets":[{"name":"blocknote-mantine.cjs","size":20384},{"name":"blocknote-mantine.cjs.map","size":312037}],"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"]}]}
1
+ {"builtAt":1747754375389,"assets":[{"name":"blocknote-mantine.cjs","size":20586},{"name":"blocknote-mantine.cjs.map","size":312750}],"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":805,"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":1911,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":227,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":233,"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.0",
14
+ "version": "0.31.0",
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.0",
52
- "@blocknote/react": "0.30.0",
52
+ "@blocknote/core": "0.31.0",
53
+ "@blocknote/react": "0.31.0",
53
54
  "@mantine/core": "^7.10.1",
54
55
  "@mantine/hooks": "^7.10.1",
55
56
  "@mantine/utils": "^6.0.21",
@@ -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
@@ -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
- ? defaultColorScheme
82
- : "light";
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 || "")}
@@ -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
  );
@@ -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
  )}
@@ -84,7 +84,8 @@ export const Comment = forwardRef<
84
84
  right: 0,
85
85
  top: 0,
86
86
  zIndex: 10,
87
- }}>
87
+ }}
88
+ >
88
89
  {actions}
89
90
  </Group>
90
91
  ) : null}
@@ -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>
@@ -1,6 +1,6 @@
1
1
  import { TextInput as MantineTextInput } from "@mantine/core";
2
2
 
3
- import { assertEmpty } from "@blocknote/core";
3
+ import { assertEmpty, mergeCSSClasses } from "@blocknote/core";
4
4
  import { ComponentProps } from "@blocknote/react";
5
5
  import { forwardRef } from "react";
6
6
 
@@ -12,13 +12,17 @@ export const TextInput = forwardRef<
12
12
  className,
13
13
  name,
14
14
  label,
15
+ variant,
15
16
  icon,
16
17
  value,
17
18
  autoFocus,
18
19
  placeholder,
20
+ disabled,
19
21
  onKeyDown,
20
22
  onChange,
21
23
  onSubmit,
24
+ autoComplete,
25
+ rightSection,
22
26
  ...rest
23
27
  } = props;
24
28
 
@@ -27,7 +31,10 @@ export const TextInput = forwardRef<
27
31
  return (
28
32
  <MantineTextInput
29
33
  size={"xs"}
30
- className={className}
34
+ className={mergeCSSClasses(
35
+ className || "",
36
+ variant === "large" ? "bn-mt-input-large" : ""
37
+ )}
31
38
  ref={ref}
32
39
  name={name}
33
40
  label={label}
@@ -35,10 +42,13 @@ export const TextInput = forwardRef<
35
42
  value={value}
36
43
  autoFocus={autoFocus}
37
44
  data-autofocus={autoFocus ? "true" : undefined}
45
+ rightSection={rightSection}
38
46
  placeholder={placeholder}
47
+ disabled={disabled}
39
48
  onKeyDown={onKeyDown}
40
49
  onChange={onChange}
41
50
  onSubmit={onSubmit}
51
+ autoComplete={autoComplete}
42
52
  />
43
53
  );
44
54
  });
@@ -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 *, .bn-mantine :after, .bn-mantine :before {
93
- box-sizing: border-box
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
- text-transform: none
100
+ text-transform: none;
99
101
  }
100
102
 
101
103
  @media screen and (max-device-width: 500px) {
102
- .bn-mantine {
103
- -webkit-text-size-adjust: 100%
104
- }
104
+ .bn-mantine {
105
+ -webkit-text-size-adjust: 100%;
106
+ }
105
107
  }
106
108
 
107
109
  @media (prefers-reduced-motion: reduce) {
108
- .bn-mantine [data-respect-reduced-motion] [data-reduce-motion] {
109
- animation: none;
110
- transition: none
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, .bn-mantine [data-mantine-color-scheme=light] .mantine-light-hidden {
115
- display: none
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
- outline: calc(.125rem * var(--mantine-scale)) solid var(--mantine-primary-color-filled);
120
- outline-offset: calc(.125rem * var(--mantine-scale))
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
- outline: calc(.125rem * var(--mantine-scale)) solid var(--mantine-primary-color-filled);
125
- outline-offset: calc(.125rem * var(--mantine-scale))
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
- outline: none
134
+ outline: none;
130
135
  }
131
136
 
132
137
  .bn-mantine .mantine-active:active {
133
- transform: translateY(calc(.0625rem * var(--mantine-scale)))
138
+ transform: translateY(calc(0.0625rem * var(--mantine-scale)));
134
139
  }
135
140
 
136
- .bn-mantine[dir=rtl] .mantine-rotate-rtl {
137
- transform: rotate(180deg)
138
- }
141
+ .bn-mantine[dir="rtl"] .mantine-rotate-rtl {
142
+ transform: rotate(180deg);
143
+ }
@@ -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
  );
@@ -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
  ))}
@@ -19,7 +19,8 @@ export const PanelButton = forwardRef<
19
19
  className={className}
20
20
  ref={ref}
21
21
  onClick={onClick}
22
- {...rest}>
22
+ {...rest}
23
+ >
23
24
  {children}
24
25
  </MantineButton>
25
26
  );
@@ -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
 
@@ -18,7 +18,8 @@ export const SideMenu = forwardRef<
18
18
  gap={0}
19
19
  className={className}
20
20
  ref={ref}
21
- {...rest}>
21
+ {...rest}
22
+ >
22
23
  {children}
23
24
  </MantineGroup>
24
25
  );
@@ -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
@@ -118,6 +118,12 @@
118
118
  height: 32px;
119
119
  }
120
120
 
121
+ .bn-mantine .bn-mt-input-large .mantine-TextInput-input {
122
+ border: none;
123
+ font-size: 14px;
124
+ height: 52px;
125
+ }
126
+
121
127
  /* Mantine Tooltip component base styles */
122
128
  .bn-mantine .mantine-Tooltip-tooltip {
123
129
  background-color: transparent;
@@ -256,7 +262,8 @@
256
262
  max-height: 100%;
257
263
  position: relative;
258
264
  box-shadow: var(--mantine-shadow-md);
259
- border: calc(0.0625rem * var(--mantine-scale)) solid var(--mantine-color-gray-2);
265
+ border: calc(0.0625rem * var(--mantine-scale)) solid
266
+ var(--mantine-color-gray-2);
260
267
  border-radius: var(--mantine-radius-default);
261
268
  padding: 4px;
262
269
  }
@@ -323,6 +330,12 @@
323
330
  height: 52px;
324
331
  }
325
332
 
333
+ .bn-mantine .bn-suggestion-menu-item-small {
334
+ height: fit-content;
335
+ /* Made to match with labels */
336
+ padding: calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-sm);
337
+ }
338
+
326
339
  .bn-mantine .bn-suggestion-menu-item[aria-selected="true"],
327
340
  .bn-mantine .bn-suggestion-menu-item:hover {
328
341
  background-color: var(--bn-colors-hovered-background);
@@ -338,6 +351,19 @@
338
351
  padding: 8px;
339
352
  }
340
353
 
354
+ .bn-suggestion-menu-item-small
355
+ .bn-mt-suggestion-menu-item-section[data-position="left"] {
356
+ background-color: transparent;
357
+ padding: 0;
358
+ }
359
+
360
+ .bn-suggestion-menu-item-small
361
+ .bn-mt-suggestion-menu-item-section[data-position="left"]
362
+ svg {
363
+ height: 14px;
364
+ width: 14px;
365
+ }
366
+
341
367
  .bn-mt-suggestion-menu-item-body {
342
368
  align-items: stretch;
343
369
  display: flex;
@@ -356,6 +382,10 @@
356
382
  padding: 0;
357
383
  }
358
384
 
385
+ .bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-title {
386
+ font-size: 12px;
387
+ }
388
+
359
389
  .bn-mt-suggestion-menu-item-subtitle {
360
390
  color: var(--bn-colors-menu-text);
361
391
  line-height: 16px;
@@ -364,6 +394,10 @@
364
394
  padding: 0;
365
395
  }
366
396
 
397
+ .bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-subtitle {
398
+ display: none;
399
+ }
400
+
367
401
  .bn-mantine .bn-suggestion-menu-label {
368
402
  color: var(--bn-colors-hovered-text);
369
403
  }
@@ -576,8 +610,8 @@
576
610
  }
577
611
 
578
612
  .bn-mt-sub-menu-item
579
- > .mantine-Menu-itemLabel
580
- > div:not(.mantine-Menu-dropdown) {
613
+ > .mantine-Menu-itemLabel
614
+ > div:not(.mantine-Menu-dropdown) {
581
615
  align-items: center;
582
616
  display: flex;
583
617
  justify-content: space-between;
@@ -714,23 +748,47 @@
714
748
  }
715
749
 
716
750
  .bn-mantine
717
- .bn-badge
718
- .mantine-Chip-label
719
- > span:not(.mantine-Chip-iconWrapper) {
751
+ .bn-badge
752
+ .mantine-Chip-label
753
+ > span:not(.mantine-Chip-iconWrapper) {
720
754
  display: inline-flex;
721
755
  gap: 4px;
722
756
  }
723
757
 
724
758
  .bn-mantine
725
- .bn-badge
726
- .mantine-Chip-label
727
- > span:not(.mantine-Chip-iconWrapper)
728
- > span {
759
+ .bn-badge
760
+ .mantine-Chip-label
761
+ > span:not(.mantine-Chip-iconWrapper)
762
+ > span {
729
763
  align-items: center;
730
764
  display: inline-flex;
731
765
  justify-content: center;
732
766
  }
733
767
 
768
+ /* Combobox styling */
769
+ .bn-mantine .bn-combobox-input,
770
+ .bn-mantine .bn-combobox-items:not(:empty) {
771
+ background-color: var(--bn-colors-menu-background);
772
+ border: var(--bn-border);
773
+ border-radius: var(--bn-border-radius-medium);
774
+ box-shadow: var(--bn-shadow-medium);
775
+ color: var(--bn-colors-menu-text);
776
+ gap: 4px;
777
+ min-width: 145px;
778
+ padding: 2px;
779
+ }
780
+
781
+ .bn-mantine .bn-combobox-input .bn-combobox-icon,
782
+ .bn-mantine .bn-combobox-input .bn-combobox-right-section {
783
+ align-items: center;
784
+ display: flex;
785
+ justify-content: center;
786
+ }
787
+
788
+ .bn-mantine .bn-combobox-input .bn-combobox-error {
789
+ color: var(--bn-colors-highlights-red-background);
790
+ }
791
+
734
792
  /* We need to get rid of the checked icon - you can set the icon prop to an
735
793
  empty element (<></>), but even so Mantine leaves extra space for the icon, so
736
794
  we just don't display it in CSS instead. */
@@ -18,7 +18,8 @@ export const SuggestionMenu = forwardRef<
18
18
  className={className}
19
19
  ref={ref}
20
20
  id={id}
21
- role="listbox">
21
+ role="listbox"
22
+ >
22
23
  {children}
23
24
  </MantineStack>
24
25
  );