Skip to content

Commit 75a3c35

Browse files
committed
chore: updated radix with lucid icons
1 parent dea9e64 commit 75a3c35

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

packages/editor/document-editor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"@plane/editor-core": "*",
3333
"@plane/editor-extensions": "*",
3434
"@plane/ui": "*",
35-
"@radix-ui/react-icons": "^1.3.0",
3635
"@tiptap/core": "^2.1.13",
3736
"@tiptap/extension-placeholder": "^2.1.13",
3837
"@tiptap/pm": "^2.1.13",
3938
"@tiptap/suggestion": "^2.1.13",
4039
"eslint-config-next": "13.2.4",
40+
"lucide-react": "^0.309.0",
4141
"react-popper": "^2.3.0",
4242
"tippy.js": "^6.3.7",
4343
"uuid": "^9.0.1"

packages/editor/document-editor/src/ui/components/links/link-edit-view.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isValidHttpUrl } from "@plane/editor-core";
2-
import { LinkBreak1Icon } from "@radix-ui/react-icons";
32
import { Node } from "@tiptap/pm/model";
3+
import { Link2Off } from "lucide-react";
44
import { useEffect, useRef, useState } from "react";
55
import { LinkViewProps } from "./link-view";
66

@@ -50,11 +50,11 @@ export const LinkEditView = ({
5050
const isValidUrl = (urlString: string) => {
5151
var urlPattern = new RegExp(
5252
"^(https?:\\/\\/)?" + // validate protocol
53-
"([\\w-]+\\.)+[\\w-]{2,}" + // validate domain name
54-
"|((\\d{1,3}\\.){3}\\d{1,3})" + // validate IP (v4) address
55-
"(\\:\\d+)?(\\/[-\\w.%]+)*" + // validate port and path
56-
"(\\?[;&\\w.%=-]*)?" + // validate query string
57-
"(\\#[-\\w]*)?$", // validate fragment locator
53+
"([\\w-]+\\.)+[\\w-]{2,}" + // validate domain name
54+
"|((\\d{1,3}\\.){3}\\d{1,3})" + // validate IP (v4) address
55+
"(\\:\\d+)?(\\/[-\\w.%]+)*" + // validate port and path
56+
"(\\?[;&\\w.%=-]*)?" + // validate query string
57+
"(\\#[-\\w]*)?$", // validate fragment locator
5858
"i"
5959
);
6060
const regexTest = urlPattern.test(urlString);
@@ -138,7 +138,7 @@ export const LinkEditView = ({
138138
/>
139139
<div className="mb-1 bg-custom-border-300 h-[1px] w-full gap-2" />
140140
<div className="flex text-sm text-custom-text-800 gap-2 items-center">
141-
<LinkBreak1Icon className="inline-block" />
141+
<Link2Off className="inline-block" />
142142
<button onClick={() => removeLink()} className="cursor-pointer">
143143
Remove Link
144144
</button>

packages/editor/document-editor/src/ui/components/links/link-preview.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CopyIcon, GlobeIcon, LinkBreak1Icon, Pencil1Icon } from "@radix-ui/react-icons";
1+
import { ClipboardCopyIcon, GlobeIcon, Link2Off, PencilIcon } from "lucide-react";
22
import { LinkViewProps } from "./link-view";
33

44
export const LinkPreview = ({
@@ -37,13 +37,13 @@ export const LinkPreview = ({
3737
<p>{url.length > 40 ? url.slice(0, 40) + "..." : url}</p>
3838
<div className="flex gap-2">
3939
<button onClick={copyLinkToClipboard} className="cursor-pointer">
40-
<CopyIcon className="inline-block" />
40+
<ClipboardCopyIcon className="inline-block" />
4141
</button>
4242
<button onClick={() => switchView("LinkEditView")} className="cursor-pointer">
43-
<Pencil1Icon className="inline-block" />
43+
<PencilIcon className="inline-block" />
4444
</button>
4545
<button onClick={removeLink} className="cursor-pointer">
46-
<LinkBreak1Icon className="inline-block" />
46+
<Link2Off className="inline-block" />
4747
</button>
4848
</div>
4949
</div>

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -6212,6 +6212,11 @@ lucide-react@^0.294.0:
62126212
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.294.0.tgz#dc406e1e7e2f722cf93218fe5b31cf3c95778817"
62136213
integrity sha512-V7o0/VECSGbLHn3/1O67FUgBwWB+hmzshrgDVRJQhMh8uj5D3HBuIvhuAmQTtlupILSplwIZg5FTc4tTKMA2SA==
62146214

6215+
lucide-react@^0.309.0:
6216+
version "0.309.0"
6217+
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.309.0.tgz#7369893cb4b074a0a0b1d3acdc6fd9a8bdb5add1"
6218+
integrity sha512-zNVPczuwFrCfksZH3zbd1UDE6/WYhYAdbe2k7CImVyPAkXLgIwbs6eXQ4loigqDnUFjyFYCI5jZ1y10Kqal0dg==
6219+
62156220
magic-string@^0.25.0, magic-string@^0.25.7:
62166221
version "0.25.9"
62176222
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c"

0 commit comments

Comments
 (0)