Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ProfilePriorityDistribution: React.FC<Props> = ({ userProfile }) =>
key: "count",
label: "Count",
stackId: "bar-one",
fill: (payload) => priorityColors[payload.key as keyof typeof priorityColors],
fill: (payload: any) => priorityColors[payload.key as keyof typeof priorityColors], // TODO: fix types
textClassName: "",
showPercentage: false,
showTopBorderRadius: () => true,
Expand Down
16 changes: 4 additions & 12 deletions apps/web/core/components/project/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,8 @@ import { useTranslation } from "@plane/i18n";
import { EmojiPicker } from "@plane/propel/emoji-icon-picker";
import { Tooltip } from "@plane/propel/tooltip";
import { IProject, IWorkspace } from "@plane/types";
import {
Button,
CustomSelect,
Input,
TextArea,
TOAST_TYPE,
setToast,
CustomEmojiIconPicker,
EmojiIconPickerTypes,
} from "@plane/ui";
import { renderFormattedDate, convertHexEmojiToDecimal, getFileURL } from "@plane/utils";
import { Button, CustomSelect, Input, TextArea, TOAST_TYPE, setToast, EmojiIconPickerTypes } from "@plane/ui";
import { renderFormattedDate, getFileURL } from "@plane/utils";
// components
import { Logo } from "@/components/common/logo";
import { ImagePickerPopover } from "@/components/core/image-picker-popover";
Expand Down Expand Up @@ -212,7 +203,8 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
className="flex items-center justify-center"
buttonClassName="flex h-[52px] w-[52px] flex-shrink-0 items-center justify-center rounded-lg bg-white/10"
label={<Logo logo={value} size={28} />}
onChange={(val) => {
// TODO: fix types
onChange={(val: any) => {
let logoValue = {};

if (val?.type === "emoji")
Expand Down
3 changes: 2 additions & 1 deletion apps/web/core/components/views/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ export const ProjectViewForm: React.FC<Props> = observer((props) => {
</>
</span>
}
onChange={(val) => {
// TODO: fix types
onChange={(val: any) => {
let logoValue = {};

if (val?.type === "emoji")
Expand Down
32 changes: 16 additions & 16 deletions packages/propel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
"build-storybook": "storybook build"
},
"exports": {
"./avatar": "./src/avatar/index.ts",
"./charts/*": "./src/charts/*/index.ts",
"./dialog": "./src/dialog/index.ts",
"./menu": "./src/menu/index.ts",
"./table": "./src/table/index.ts",
"./tabs": "./src/tabs/index.ts",
"./popover": "./src/popover/index.ts",
"./command": "./src/command/index.ts",
"./combobox": "./src/combobox/index.ts",
"./tooltip": "./src/tooltip/index.ts",
"./styles/fonts": "./src/styles/fonts/index.css",
"./switch": "./src/switch/index.ts",
"./emoji-icon-picker": "./src/emoji-icon-picker/index.ts",
"./utils": "./src/utils/index.ts",
"./accordion": "./src/accordion/index.ts",
"./card": "./src/card/index.ts"
"./accordion": "./dist/accordion/index.ts",
"./avatar": "./dist/avatar/index.ts",
"./card": "./dist/card/index.ts",
"./charts/*": "./dist/charts/*/index.ts",
"./combobox": "./dist/combobox/index.ts",
"./command": "./dist/command/index.ts",
"./dialog": "./dist/dialog/index.ts",
"./emoji-icon-picker": "./dist/emoji-icon-picker/index.ts",
"./menu": "./dist/menu/index.ts",
"./popover": "./dist/popover/index.ts",
"./styles/fonts": "./dist/styles/fonts/index.css",
"./switch": "./dist/switch/index.ts",
"./table": "./dist/table/index.ts",
"./tabs": "./dist/tabs/index.ts",
"./tooltip": "./dist/tooltip/index.ts",
"./utils": "./dist/utils/index.ts"
},
"dependencies": {
"@base-ui-components/react": "^1.0.0-beta.2",
Expand Down
16 changes: 9 additions & 7 deletions packages/propel/src/emoji-icon-picker/helper.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
import { TPlacement, TSide, TAlign } from "../utils/placement";

export enum EmojiIconPickerTypes {
EMOJI = "emoji",
ICON = "icon",
}
export const EmojiIconPickerTypes = {
EMOJI: "emoji",
ICON: "icon",
} as const;

export type TChangeHandlerProps =
| {
type: EmojiIconPickerTypes.EMOJI;
type: typeof EmojiIconPickerTypes.EMOJI;
value: string;
}
| {
type: EmojiIconPickerTypes.ICON;
type: typeof EmojiIconPickerTypes.ICON;
value: {
name: string;
color: string;
};
};

export type TEmojiIconPickerTypes = typeof EmojiIconPickerTypes.EMOJI | typeof EmojiIconPickerTypes.ICON;

export type TCustomEmojiPicker = {
isOpen: boolean;
handleToggle: (value: boolean) => void;
buttonClassName?: string;
className?: string;
closeOnSelect?: boolean;
defaultIconColor?: string;
defaultOpen?: EmojiIconPickerTypes;
defaultOpen?: TEmojiIconPickerTypes;
disabled?: boolean;
dropdownClassName?: string;
label: React.ReactNode;
Expand Down
16 changes: 10 additions & 6 deletions packages/propel/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@ import { defineConfig } from "tsdown";

export default defineConfig({
entry: [
"src/accordion/index.ts",
"src/avatar/index.ts",
"src/charts/index.ts",
"src/card/index.ts",
"src/charts/*/index.ts",
"src/combobox/index.ts",
"src/command/index.ts",
"src/dialog/index.ts",
"src/emoji-icon-picker/index.ts",
"src/menu/index.ts",
"src/popover/index.ts",
"src/switch/index.ts",
"src/table/index.ts",
"src/tabs/index.ts",
"src/popover/index.ts",
"src/command/index.ts",
"src/combobox/index.ts",
"src/tooltip/index.ts",
"src/card/index.ts",
"src/switch/index.ts",
"src/utils/index.ts",
],
outDir: "dist",
format: ["esm", "cjs"],
dts: true,
copy: ["src/styles"],
});
Loading