Skip to content

Commit 8284895

Browse files
Revert "refactor: Extract image panel components (#684)" (#716)
This reverts commit 600f0c5.
1 parent 600f0c5 commit 8284895

35 files changed

+148
-658
lines changed

package-lock.json

Lines changed: 0 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react/src/ariakit/ariakit.css

Lines changed: 0 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -182,128 +182,6 @@
182182
color: hsl(204 20% 100%);
183183
}
184184

185-
.input {
186-
height: 2.5rem;
187-
width: 100%;
188-
border-radius: 0.375rem;
189-
border-style: none;
190-
background-color: hsl(204 20% 94% / 0.4);
191-
padding-left: 1rem;
192-
padding-right: 1rem;
193-
font-size: 1rem;
194-
line-height: 1.5rem;
195-
color: hsl(204 4% 0%);
196-
box-shadow:
197-
inset 0 0 0 1px rgba(0 0 0 / 0.1),
198-
inset 0 2px 5px 0 rgba(0 0 0 / 0.05);
199-
}
200-
201-
.input::placeholder {
202-
color: hsl(204 4% 0% / 0.6);
203-
}
204-
205-
.input:hover {
206-
background-color: hsl(204 20% 94%);
207-
}
208-
209-
.input:focus-visible,
210-
.input[data-focus-visible] {
211-
outline: 2px solid hsl(204 100% 40%);
212-
outline-offset: -1px;
213-
}
214-
215-
:is(.dark .input) {
216-
background-color: hsl(204 4% 10%);
217-
color: hsl(204 20% 100%);
218-
box-shadow:
219-
inset 0 0 0 1px rgba(255 255 255 / 0.12),
220-
inset 0 -1px 0 0 rgba(255 255 255 / 0.05),
221-
inset 0 2px 5px 0 rgba(0 0 0 / 0.15);
222-
}
223-
224-
:is(.dark .input)::placeholder {
225-
color: hsl(204 20% 100% / 46%);
226-
}
227-
228-
:is(.dark .input:hover) {
229-
background-color: hsl(204 4% 8%);
230-
}
231-
232-
:is(.dark .bn-image-panel) {
233-
background-color: hsl(204 4% 16%);
234-
box-shadow:
235-
0 1px 3px 0 rgb(0 0 0 / 0.25),
236-
0 1px 2px -1px rgb(0 0 0 / 0.1);
237-
}
238-
239-
.tab-list {
240-
display: flex;
241-
gap: 0.5rem;
242-
}
243-
244-
.tab {
245-
display: flex;
246-
height: 2.5rem;
247-
user-select: none;
248-
align-items: center;
249-
justify-content: center;
250-
gap: 0.5rem;
251-
white-space: nowrap;
252-
border-radius: 0.25rem;
253-
border-style: none;
254-
padding-left: 1rem;
255-
padding-right: 1rem;
256-
font-size: 1rem;
257-
line-height: 1.5rem;
258-
text-decoration-line: none;
259-
outline-width: 2px;
260-
outline-offset: 2px;
261-
outline-color: hsl(204 100% 40%);
262-
}
263-
264-
.tab:hover {
265-
background-color: hsl(204 4% 0% / 7.5%);
266-
}
267-
268-
.tab[aria-disabled="true"] {
269-
opacity: 0.5;
270-
}
271-
272-
.tab[aria-selected="true"] {
273-
background-color: hsl(204 100% 40%);
274-
color: hsl(204 20% 100%);
275-
}
276-
277-
.tab:hover[aria-selected="true"] {
278-
background-color: hsl(204 100% 32%);
279-
}
280-
281-
.tab[data-focus-visible] {
282-
outline-style: solid;
283-
}
284-
285-
.tab:active,
286-
.tab[data-active] {
287-
padding-top: 0.125rem;
288-
}
289-
290-
:is(.dark .tab:hover) {
291-
background-color: hsl(204 20% 100% / 0.1);
292-
}
293-
294-
:is(.dark .tab[aria-selected="true"]) {
295-
background-color: hsl(204 100% 40%);
296-
color: hsl(204 20% 100%);
297-
}
298-
299-
:is(.dark .tab:hover[aria-selected="true"]) {
300-
background-color: hsl(204 100% 32%);
301-
}
302-
303-
.panel {
304-
padding: 0.5rem;
305-
}
306-
307185
.bn-menu {
308186
position: relative;
309187
z-index: 50;
@@ -384,16 +262,3 @@
384262
font-weight: 500;
385263
opacity: 0.5;
386264
}
387-
388-
.bn-image-panel {
389-
display: flex;
390-
flex-direction: column;
391-
gap: 0.5rem;
392-
border-radius: 0.5rem;
393-
background-color: hsl(204 20% 100%);
394-
padding: 0.5rem;
395-
box-shadow:
396-
0 1px 3px 0 rgb(0 0 0 / 0.1),
397-
0 1px 2px -1px rgb(0 0 0 / 0.1);
398-
}
399-

packages/react/src/ariakit/components.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ import { Toolbar } from "./toolbar/Toolbar";
1515
import { ToolbarButton } from "./toolbar/ToolbarButton";
1616
import { ToolbarSelect } from "./toolbar/ToolbarSelect";
1717

18-
import { Panel } from "./panel/Panel";
19-
import { PanelButton } from "./panel/PanelButton";
20-
import { PanelFileInput } from "./panel/PanelFileInput";
21-
import { PanelTab } from "./panel/PanelTab";
22-
import { PanelTextInput } from "./panel/PanelTextInput";
23-
2418
export const ariakitComponents: ComponentsContextValue = {
2519
Form,
2620
TextInput,
@@ -33,11 +27,6 @@ export const ariakitComponents: ComponentsContextValue = {
3327
MenuDivider,
3428
MenuLabel,
3529
MenuItem,
36-
Panel,
37-
PanelButton,
38-
PanelFileInput,
39-
PanelTab,
40-
PanelTextInput,
4130
Popover,
4231
PopoverContent,
4332
PopoverTrigger,

packages/react/src/ariakit/panel/Panel.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/react/src/ariakit/panel/PanelButton.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react/src/ariakit/panel/PanelFileInput.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/react/src/ariakit/panel/PanelTab.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/react/src/ariakit/panel/PanelTextInput.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/react/src/components/FormattingToolbar/DefaultButtons/ReplaceImageButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { RiImageEditFill } from "react-icons/ri";
1010
import { useComponentsContext } from "../../../editor/ComponentsContext";
1111
import { useBlockNoteEditor } from "../../../hooks/useBlockNoteEditor";
1212
import { useSelectedBlocks } from "../../../hooks/useSelectedBlocks";
13-
import { ImagePanel } from "../../ImagePanel/ImagePanel";
13+
import { ImagePanel } from "../../ImagePanel/mantine/ImagePanel";
1414

1515
export const ReplaceImageButton = () => {
1616
const components = useComponentsContext()!;

packages/react/src/components/ImagePanel/ImagePanel.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)