feat: library search (#9903)
* feat(utils): add support for search input type in isWritableElement * feat(i18n): add search text * feat(cmdp+lib): add search functionality for command pallete and lib menu items * chore: fix formats, and whitespaces * fix: opt to optimal code changes * chore: fix for linting * focus input on mount * tweak placeholder * design and UX changes * tweak item hover/active/seletected states * unrelated: move publish button above delete/clear to keep it more stable * esc to clear search input / close sidebar * refactor command pallete library stuff * make library commands bigger --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,13 @@ import React, {
|
||||
useCallback,
|
||||
} from "react";
|
||||
|
||||
import { EVENT, isDevEnv, KEYS, updateObject } from "@excalidraw/common";
|
||||
import {
|
||||
CLASSES,
|
||||
EVENT,
|
||||
isDevEnv,
|
||||
KEYS,
|
||||
updateObject,
|
||||
} from "@excalidraw/common";
|
||||
|
||||
import { useUIAppState } from "../../context/ui-appState";
|
||||
import { atom, useSetAtom } from "../../editor-jotai";
|
||||
@@ -137,7 +143,11 @@ export const SidebarInner = forwardRef(
|
||||
return (
|
||||
<Island
|
||||
{...rest}
|
||||
className={clsx("sidebar", { "sidebar--docked": docked }, className)}
|
||||
className={clsx(
|
||||
CLASSES.SIDEBAR,
|
||||
{ "sidebar--docked": docked },
|
||||
className,
|
||||
)}
|
||||
ref={islandRef}
|
||||
>
|
||||
<SidebarPropsContext.Provider value={headerPropsRef.current}>
|
||||
|
||||
Reference in New Issue
Block a user