From de806ddb9d27cf767cf23ca9eb9d85537f97a12b Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Thu, 17 Nov 2022 21:05:57 +0200 Subject: [PATCH 1/4] update toolbox icon --- package.json | 3 ++- src/index.js | 4 ++-- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b6fe00a..dc73da5 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ }, "homepage": "https://github.com/editor-js/link#readme", "dependencies": { - "@babel/runtime": "^7.10.2" + "@babel/runtime": "^7.10.2", + "@codexteam/icons": "^0.0.4" } } diff --git a/src/index.js b/src/index.js index f380148..ad92ca2 100644 --- a/src/index.js +++ b/src/index.js @@ -21,8 +21,8 @@ import './index.css'; import 'url-polyfill'; -import ToolboxIcon from './svg/toolbox.svg'; import ajax from '@codexteam/ajax'; +import { IconLink } from '@codexteam/icons'; /** * @typedef {object} UploadResponseFormat @@ -52,7 +52,7 @@ export default class LinkTool { */ static get toolbox() { return { - icon: ToolboxIcon, + icon: IconLink, title: 'Link', }; } diff --git a/yarn.lock b/yarn.lock index 9be01f7..b2e7e29 100644 --- a/yarn.lock +++ b/yarn.lock @@ -714,6 +714,11 @@ version "4.1.0" resolved "https://registry.yarnpkg.com/@codexteam/ajax/-/ajax-4.1.0.tgz#472703b7c1e0843eec1f047b849835e0554c34a5" +"@codexteam/icons@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.0.4.tgz#8b72dcd3f3a1b0d880bdceb2abebd74b46d3ae13" + integrity sha512-V8N/TY2TGyas4wLrPIFq7bcow68b3gu8DfDt1+rrHPtXxcexadKauRJL6eQgfG7Z0LCrN4boLRawR4S9gjIh/Q== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" From 4f2f1fc19bbcfe277d8347540a02949d7f767810 Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Thu, 17 Nov 2022 21:07:38 +0200 Subject: [PATCH 2/4] Remove icon --- src/svg/toolbox.svg | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 src/svg/toolbox.svg diff --git a/src/svg/toolbox.svg b/src/svg/toolbox.svg deleted file mode 100644 index 3b1ca6b..0000000 --- a/src/svg/toolbox.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - From 01ac2d5df0f2704a08ce8fa241e93ba9bbb9b713 Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Thu, 17 Nov 2022 21:08:53 +0200 Subject: [PATCH 3/4] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc73da5..388c14e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/link", - "version": "2.4.2", + "version": "2.5.0", "keywords": [ "codex editor", "tool", From 0a5e633e257799a5347d921acf5a79f5606d9647 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 30 Nov 2022 01:13:45 +0400 Subject: [PATCH 4/4] fix bg icon --- src/index.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.css b/src/index.css index e066e10..01a0b57 100644 --- a/src/index.css +++ b/src/index.css @@ -3,9 +3,9 @@ &__input { padding-left: 38px; - background-image: url("data:image/svg+xml,%3Csvg width='13' height='14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.567 13.629c.728.464 1.581.65 2.41.558l-.873.873A3.722 3.722 0 1 1 4.84 9.794L6.694 7.94a3.722 3.722 0 0 1 5.256-.008L10.484 9.4a5.209 5.209 0 0 1-.017.016 1.625 1.625 0 0 0-2.29.009l-1.854 1.854a1.626 1.626 0 0 0 2.244 2.35zm2.766-7.358a3.722 3.722 0 0 0-2.41-.558l.873-.873a3.722 3.722 0 1 1 5.264 5.266l-1.854 1.854a3.722 3.722 0 0 1-5.256.008L9.416 10.5a5.2 5.2 0 0 1 .017-.016 1.625 1.625 0 0 0 2.29-.009l1.854-1.854a1.626 1.626 0 0 0-2.244-2.35z' fill='rgba(0, 0, 0, 0.6)' transform='translate(-3.667 -2.7)'/%3E%3C/svg%3E%0A"); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath stroke='%23707684' stroke-linecap='round' stroke-width='2' d='m7.7 12.6-.021.02a2.795 2.795 0 0 0-.044 4.005v0a2.795 2.795 0 0 0 3.936.006l1.455-1.438a3 3 0 0 0 .34-3.866l-.146-.207'/%3E%3Cpath stroke='%23707684' stroke-linecap='round' stroke-width='2' d='m16.22 11.12.136-.14c.933-.954.992-2.46.135-3.483v0a2.597 2.597 0 0 0-3.664-.32L11.39 8.386a3 3 0 0 0-.301 4.3l.031.034'/%3E%3C/svg%3E"); background-repeat: no-repeat; - background-position: 15px; + background-position: 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; @@ -15,7 +15,7 @@ &--error { ^^& { - background-image: url("data:image/svg+xml,%3Csvg width='13' height='14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.567 13.629c.728.464 1.581.65 2.41.558l-.873.873A3.722 3.722 0 1 1 4.84 9.794L6.694 7.94a3.722 3.722 0 0 1 5.256-.008L10.484 9.4a5.209 5.209 0 0 1-.017.016 1.625 1.625 0 0 0-2.29.009l-1.854 1.854a1.626 1.626 0 0 0 2.244 2.35zm2.766-7.358a3.722 3.722 0 0 0-2.41-.558l.873-.873a3.722 3.722 0 1 1 5.264 5.266l-1.854 1.854a3.722 3.722 0 0 1-5.256.008L9.416 10.5a5.2 5.2 0 0 1 .017-.016 1.625 1.625 0 0 0 2.29-.009l1.854-1.854a1.626 1.626 0 0 0-2.244-2.35z' fill='rgb(224, 147, 147)' transform='translate(-3.667 -2.7)'/%3E%3C/svg%3E%0A"); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath stroke='rgb(224, 147, 147)' stroke-linecap='round' stroke-width='2' d='m7.7 12.6-.021.02a2.795 2.795 0 0 0-.044 4.005v0a2.795 2.795 0 0 0 3.936.006l1.455-1.438a3 3 0 0 0 .34-3.866l-.146-.207'/%3E%3Cpath stroke='rgb(224, 147, 147)' stroke-linecap='round' stroke-width='2' d='m16.22 11.12.136-.14c.933-.954.992-2.46.135-3.483v0a2.597 2.597 0 0 0-3.664-.32L11.39 8.386a3 3 0 0 0-.301 4.3l.031.034'/%3E%3C/svg%3E"); background-color: #fff3f6; border-color: #f3e0e0; color: #a95a5a;