\n
\n {i18n.categories[categoryId]}\n
\n
\n {isCategoryVisible(categoryId) &&\n section\n .getRows()\n .map((row: GridRow) => (\n \n ))}\n
\n
\n );\n });\n }, [\n emojiLibrary,\n getRowWidth,\n i18n.categories,\n isCategoryVisible,\n onSelectEmoji,\n onMouseOver,\n settings,\n ]);\n\n const SearchList = useCallback(() => {\n return (\n
-
-
-
-
-
+
+ Color Picker
+
+
+
+
+
+
+
{color && (
-
- Clear
-
+
+
+
+
+
+ Clear
+
+
+
)}
);
diff --git a/apps/www/src/registry/default/plate-ui/colors-custom.tsx b/apps/www/src/registry/default/plate-ui/colors-custom.tsx
index 2ebd5a3c2f..4ca1f7307b 100644
--- a/apps/www/src/registry/default/plate-ui/colors-custom.tsx
+++ b/apps/www/src/registry/default/plate-ui/colors-custom.tsx
@@ -1,34 +1,42 @@
'use client';
-import React from 'react';
+import React, { type ComponentPropsWithoutRef } from 'react';
+import { cn } from '@udecode/cn';
import {
useColorsCustom,
useColorsCustomState,
} from '@udecode/plate-font/react';
-import type { TColor } from './color-dropdown-menu';
+import { Icons } from '@/components/icons';
import { buttonVariants } from './button';
-import { ColorDropdownMenuItems } from './color-dropdown-menu-items';
+import {
+ type TColor,
+ ColorDropdownMenuItems,
+} from './color-dropdown-menu-items';
import { ColorInput } from './color-input';
+
+// import { ColorInput } from './color-input';
import { DropdownMenuItem } from './dropdown-menu';
-type ColorsCustomProps = {
+type ColorCustomProps = {
colors: TColor[];
customColors: TColor[];
updateColor: (color: string) => void;
updateCustomColor: (color: string) => void;
color?: string;
-};
+} & ComponentPropsWithoutRef<'div'>;
-export function ColorsCustom({
+export function ColorCustom({
+ className,
color,
colors,
customColors,
updateColor,
updateCustomColor,
-}: ColorsCustomProps) {
+ ...props
+}: ColorCustomProps) {
const state = useColorsCustomState({
color,
colors,
@@ -38,24 +46,29 @@ export function ColorsCustom({
const { inputProps, menuItemProps } = useColorsCustom(state);
return (
-
-
-
- CUSTOM
-
-
-
+
+ >
+
+
+ Custom
+
+
+
+
);
}
diff --git a/apps/www/src/registry/default/plate-ui/emoji-picker-content.tsx b/apps/www/src/registry/default/plate-ui/emoji-picker-content.tsx
index 9598632bba..0f13a897c7 100644
--- a/apps/www/src/registry/default/plate-ui/emoji-picker-content.tsx
+++ b/apps/www/src/registry/default/plate-ui/emoji-picker-content.tsx
@@ -48,7 +48,7 @@ const Button = memo(
className="absolute inset-0 rounded-full opacity-0 group-hover:opacity-100"
aria-hidden="true"
/>
-
+
{emoji.skins[0].native}
diff --git a/apps/www/src/registry/default/plate-ui/emoji-picker-navigation.tsx b/apps/www/src/registry/default/plate-ui/emoji-picker-navigation.tsx
index 3917524ddc..2549c8ca6e 100644
--- a/apps/www/src/registry/default/plate-ui/emoji-picker-navigation.tsx
+++ b/apps/www/src/registry/default/plate-ui/emoji-picker-navigation.tsx
@@ -1,12 +1,5 @@
-'use client';
-
-import { useMemo } from 'react';
-
import type { EmojiCategoryList } from '@udecode/plate-emoji';
-import type {
- IEmojiFloatingLibrary,
- UseEmojiPickerType,
-} from '@udecode/plate-emoji/react';
+import type { UseEmojiPickerType } from '@udecode/plate-emoji/react';
import { cn } from '@udecode/cn';
@@ -25,22 +18,23 @@ export type EmojiPickerNavigationProps = {
'emojiLibrary' | 'focusedCategory' | 'i18n' | 'icons'
>;
-const getBarProperty = (
- emojiLibrary: IEmojiFloatingLibrary,
- focusedCategory?: EmojiCategoryList
-) => {
- let width = 0;
- let position = 0;
+// KEEP: This is for the animated idicator bar under the icon - Opt in if needed
+// const getBarProperty = (
+// emojiLibrary: IEmojiFloatingLibrary,
+// focusedCategory?: EmojiCategoryList
+// ) => {
+// let width = 0;
+// let position = 0;
- if (focusedCategory) {
- width = 100 / emojiLibrary.getGrid().size;
- position = focusedCategory
- ? emojiLibrary.indexOf(focusedCategory) * 100
- : 0;
- }
+// if (focusedCategory) {
+// width = 100 / emojiLibrary.getGrid().size;
+// position = focusedCategory
+// ? emojiLibrary.indexOf(focusedCategory) * 100
+// : 0;
+// }
- return { position, width };
-};
+// return { position, width };
+// };
export function EmojiPickerNavigation({
emojiLibrary,
@@ -49,10 +43,11 @@ export function EmojiPickerNavigation({
icons,
onClick,
}: EmojiPickerNavigationProps) {
- const { position, width } = useMemo(
- () => getBarProperty(emojiLibrary, focusedCategory),
- [emojiLibrary, focusedCategory]
- );
+ // KEEP: This is for the animated idicator bar under the icon - Opt in if needed
+ // const { position, width } = useMemo(
+ // () => getBarProperty(emojiLibrary, focusedCategory),
+ // [emojiLibrary, focusedCategory]
+ // );
return (
@@ -81,7 +76,7 @@ export function EmojiPickerNavigation({
aria-label={i18n.categories[id]}
type="button"
>
-
+
{icons.categories[id].outline}
@@ -91,7 +86,9 @@ export function EmojiPickerNavigation({
))}
-
+ /> */}