[WEB-4844] fix: export prople package dist (#7712)
* fix: export prople package dist * fix: code refactor
This commit is contained in:
parent
59ace4f411
commit
473535fcfa
6 changed files with 42 additions and 43 deletions
|
|
@ -44,7 +44,7 @@ export const ProfilePriorityDistribution: React.FC<Props> = ({ userProfile }) =>
|
||||||
key: "count",
|
key: "count",
|
||||||
label: "Count",
|
label: "Count",
|
||||||
stackId: "bar-one",
|
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: "",
|
textClassName: "",
|
||||||
showPercentage: false,
|
showPercentage: false,
|
||||||
showTopBorderRadius: () => true,
|
showTopBorderRadius: () => true,
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,8 @@ import { useTranslation } from "@plane/i18n";
|
||||||
import { EmojiPicker } from "@plane/propel/emoji-icon-picker";
|
import { EmojiPicker } from "@plane/propel/emoji-icon-picker";
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { IProject, IWorkspace } from "@plane/types";
|
import { IProject, IWorkspace } from "@plane/types";
|
||||||
import {
|
import { Button, CustomSelect, Input, TextArea, TOAST_TYPE, setToast, EmojiIconPickerTypes } from "@plane/ui";
|
||||||
Button,
|
import { renderFormattedDate, getFileURL } from "@plane/utils";
|
||||||
CustomSelect,
|
|
||||||
Input,
|
|
||||||
TextArea,
|
|
||||||
TOAST_TYPE,
|
|
||||||
setToast,
|
|
||||||
CustomEmojiIconPicker,
|
|
||||||
EmojiIconPickerTypes,
|
|
||||||
} from "@plane/ui";
|
|
||||||
import { renderFormattedDate, convertHexEmojiToDecimal, getFileURL } from "@plane/utils";
|
|
||||||
// components
|
// components
|
||||||
import { Logo } from "@/components/common/logo";
|
import { Logo } from "@/components/common/logo";
|
||||||
import { ImagePickerPopover } from "@/components/core/image-picker-popover";
|
import { ImagePickerPopover } from "@/components/core/image-picker-popover";
|
||||||
|
|
@ -212,7 +203,8 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {
|
||||||
className="flex items-center justify-center"
|
className="flex items-center justify-center"
|
||||||
buttonClassName="flex h-[52px] w-[52px] flex-shrink-0 items-center justify-center rounded-lg bg-white/10"
|
buttonClassName="flex h-[52px] w-[52px] flex-shrink-0 items-center justify-center rounded-lg bg-white/10"
|
||||||
label={<Logo logo={value} size={28} />}
|
label={<Logo logo={value} size={28} />}
|
||||||
onChange={(val) => {
|
// TODO: fix types
|
||||||
|
onChange={(val: any) => {
|
||||||
let logoValue = {};
|
let logoValue = {};
|
||||||
|
|
||||||
if (val?.type === "emoji")
|
if (val?.type === "emoji")
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,8 @@ export const ProjectViewForm: React.FC<Props> = observer((props) => {
|
||||||
</>
|
</>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
onChange={(val) => {
|
// TODO: fix types
|
||||||
|
onChange={(val: any) => {
|
||||||
let logoValue = {};
|
let logoValue = {};
|
||||||
|
|
||||||
if (val?.type === "emoji")
|
if (val?.type === "emoji")
|
||||||
|
|
|
||||||
|
|
@ -16,22 +16,22 @@
|
||||||
"build-storybook": "storybook build"
|
"build-storybook": "storybook build"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"./avatar": "./src/avatar/index.ts",
|
"./accordion": "./dist/accordion/index.ts",
|
||||||
"./charts/*": "./src/charts/*/index.ts",
|
"./avatar": "./dist/avatar/index.ts",
|
||||||
"./dialog": "./src/dialog/index.ts",
|
"./card": "./dist/card/index.ts",
|
||||||
"./menu": "./src/menu/index.ts",
|
"./charts/*": "./dist/charts/*/index.ts",
|
||||||
"./table": "./src/table/index.ts",
|
"./combobox": "./dist/combobox/index.ts",
|
||||||
"./tabs": "./src/tabs/index.ts",
|
"./command": "./dist/command/index.ts",
|
||||||
"./popover": "./src/popover/index.ts",
|
"./dialog": "./dist/dialog/index.ts",
|
||||||
"./command": "./src/command/index.ts",
|
"./emoji-icon-picker": "./dist/emoji-icon-picker/index.ts",
|
||||||
"./combobox": "./src/combobox/index.ts",
|
"./menu": "./dist/menu/index.ts",
|
||||||
"./tooltip": "./src/tooltip/index.ts",
|
"./popover": "./dist/popover/index.ts",
|
||||||
"./styles/fonts": "./src/styles/fonts/index.css",
|
"./styles/fonts": "./dist/styles/fonts/index.css",
|
||||||
"./switch": "./src/switch/index.ts",
|
"./switch": "./dist/switch/index.ts",
|
||||||
"./emoji-icon-picker": "./src/emoji-icon-picker/index.ts",
|
"./table": "./dist/table/index.ts",
|
||||||
"./utils": "./src/utils/index.ts",
|
"./tabs": "./dist/tabs/index.ts",
|
||||||
"./accordion": "./src/accordion/index.ts",
|
"./tooltip": "./dist/tooltip/index.ts",
|
||||||
"./card": "./src/card/index.ts"
|
"./utils": "./dist/utils/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@base-ui-components/react": "^1.0.0-beta.2",
|
"@base-ui-components/react": "^1.0.0-beta.2",
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,25 @@
|
||||||
import { TPlacement, TSide, TAlign } from "../utils/placement";
|
import { TPlacement, TSide, TAlign } from "../utils/placement";
|
||||||
|
|
||||||
export enum EmojiIconPickerTypes {
|
export const EmojiIconPickerTypes = {
|
||||||
EMOJI = "emoji",
|
EMOJI: "emoji",
|
||||||
ICON = "icon",
|
ICON: "icon",
|
||||||
}
|
} as const;
|
||||||
|
|
||||||
export type TChangeHandlerProps =
|
export type TChangeHandlerProps =
|
||||||
| {
|
| {
|
||||||
type: EmojiIconPickerTypes.EMOJI;
|
type: typeof EmojiIconPickerTypes.EMOJI;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
type: EmojiIconPickerTypes.ICON;
|
type: typeof EmojiIconPickerTypes.ICON;
|
||||||
value: {
|
value: {
|
||||||
name: string;
|
name: string;
|
||||||
color: string;
|
color: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type TEmojiIconPickerTypes = typeof EmojiIconPickerTypes.EMOJI | typeof EmojiIconPickerTypes.ICON;
|
||||||
|
|
||||||
export type TCustomEmojiPicker = {
|
export type TCustomEmojiPicker = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
handleToggle: (value: boolean) => void;
|
handleToggle: (value: boolean) => void;
|
||||||
|
|
@ -25,7 +27,7 @@ export type TCustomEmojiPicker = {
|
||||||
className?: string;
|
className?: string;
|
||||||
closeOnSelect?: boolean;
|
closeOnSelect?: boolean;
|
||||||
defaultIconColor?: string;
|
defaultIconColor?: string;
|
||||||
defaultOpen?: EmojiIconPickerTypes;
|
defaultOpen?: TEmojiIconPickerTypes;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
dropdownClassName?: string;
|
dropdownClassName?: string;
|
||||||
label: React.ReactNode;
|
label: React.ReactNode;
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,24 @@ import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
entry: [
|
entry: [
|
||||||
|
"src/accordion/index.ts",
|
||||||
"src/avatar/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/dialog/index.ts",
|
||||||
|
"src/emoji-icon-picker/index.ts",
|
||||||
"src/menu/index.ts",
|
"src/menu/index.ts",
|
||||||
|
"src/popover/index.ts",
|
||||||
|
"src/switch/index.ts",
|
||||||
"src/table/index.ts",
|
"src/table/index.ts",
|
||||||
"src/tabs/index.ts",
|
"src/tabs/index.ts",
|
||||||
"src/popover/index.ts",
|
|
||||||
"src/command/index.ts",
|
|
||||||
"src/combobox/index.ts",
|
|
||||||
"src/tooltip/index.ts",
|
"src/tooltip/index.ts",
|
||||||
"src/card/index.ts",
|
"src/utils/index.ts",
|
||||||
"src/switch/index.ts",
|
|
||||||
],
|
],
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
format: ["esm", "cjs"],
|
format: ["esm", "cjs"],
|
||||||
dts: true,
|
dts: true,
|
||||||
|
copy: ["src/styles"],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue