- {label &&
{label} }
-
-
-
- {tagList.map((t, i)=>t.editing ? (
+
+
submitTag(value)}
+ onEntry={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ submitTag(e.target.value);
+ }
+ }}
+ />
+
+ {tagList.map((t, i) =>
+ t.editing ? (
setTagList((prev)=>prev.map((tag, idx)=>(idx === i ? { ...tag, draft: e.target.value } : tag)),
- )
+ onChange={(e) =>
+ setTagList((prev) =>
+ prev.map((tag, idx) => (idx === i ? { ...tag, draft: e.target.value } : tag)),
+ )
}
- onKeyDown={(e)=>{
- if(e.key === 'Enter') {
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
e.preventDefault();
submitTag(t.draft, i); // submit draft
- setTagList((prev)=>prev.map((tag, idx)=>(idx === i ? { ...tag, draft: '' } : tag)),
+ setTagList((prev) =>
+ prev.map((tag, idx) => (idx === i ? { ...tag, draft: "" } : tag)),
);
}
- if(e.key === 'Escape') {
+ if (e.key === "Escape") {
stopEditing(i);
e.target.blur();
}
@@ -164,48 +190,20 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde
autoFocus
/>
) : (
- editTag(i)}>
+ editTag(i)}>
{t.value}
{
+ type="button"
+ onClick={(e) => {
e.stopPropagation();
removeTag(i);
}}>
-
+
),
- )}
-
-
- submitTag(value)}
- onEntry={(e)=>{
- if(e.key === 'Enter') {
- console.log('submit');
- e.preventDefault();
- submitTag(e.target.value);
- }
- }}
- />
- {smallText.length !== 0 && {smallText} }
-
+ )}
+
);
};
diff --git a/client/homebrew/editor/tagInput/tagInput.less b/client/homebrew/editor/tagInput/tagInput.less
index 3165b3935..e986c6cc7 100644
--- a/client/homebrew/editor/tagInput/tagInput.less
+++ b/client/homebrew/editor/tagInput/tagInput.less
@@ -1,21 +1,30 @@
-.list input {
- border-radius: 5px;
-}
+.tags {
-.tagInput-dropdown {
- .dropdown-options {
- .item {
- &.type {
- background-color: #00800035;
- }
- &.group {
- background-color: #50505035;
- }
- &.meta {
- background-color: #00008035;
- }
- &.system {
- background-color: #80000035;
+ .tagInputWrap {
+ display:grid;
+ grid-template-columns: 200px 3fr;
+ gap:10px;
+ }
+
+ .list input {
+ border-radius: 5px;
+ }
+
+ .tagInput-dropdown {
+ .dropdown-options {
+ .item {
+ &.type {
+ background-color: #00800035;
+ }
+ &.group {
+ background-color: #50505035;
+ }
+ &.meta {
+ background-color: #00008035;
+ }
+ &.system {
+ background-color: #80000035;
+ }
}
}
}
diff --git a/package-lock.json b/package-lock.json
index db6143f52..2b3892c88 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -73,7 +73,7 @@
"globals": "^16.4.0",
"jest": "^30.2.0",
"jest-expect-message": "^1.1.3",
- "jsdom": "^28.0.0",
+ "jsdom": "^28.1.0",
"jsdom-global": "^3.0.2",
"postcss-less": "^6.0.0",
"stylelint": "^16.25.0",
@@ -3245,13 +3245,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "25.2.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.3.tgz",
- "integrity": "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ==",
+ "version": "25.3.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.0.tgz",
+ "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "undici-types": "~7.16.0"
+ "undici-types": "~7.18.0"
}
},
"node_modules/@types/stack-utils": {
@@ -4121,9 +4121,9 @@
}
},
"node_modules/asn1.js/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/assert": {
@@ -4497,9 +4497,9 @@
}
},
"node_modules/bn.js": {
- "version": "5.2.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz",
- "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.3.tgz",
+ "integrity": "sha512-EAcmnPkxpntVL+DS7bO1zhcZNvCkxqtkd0ZY53h06GNQ3DEkkGZ/gKgmDv6DdZQGj9BgfSPKtJJ7Dp1GPP8f7w==",
"license": "MIT"
},
"node_modules/body-parser": {
@@ -5511,9 +5511,9 @@
}
},
"node_modules/create-ecdh/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/create-hash": {
@@ -5960,9 +5960,9 @@
}
},
"node_modules/diffie-hellman/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/dir-glob": {
@@ -6067,9 +6067,9 @@
}
},
"node_modules/elliptic/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/emittery": {
@@ -7913,9 +7913,9 @@
}
},
"node_modules/hashery": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.4.0.tgz",
- "integrity": "sha512-Wn2i1In6XFxl8Az55kkgnFRiAlIAushzh26PTjL2AKtQcEfXrcLa7Hn5QOWGZEf3LU057P9TwwZjFyxfS1VuvQ==",
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.0.tgz",
+ "integrity": "sha512-nhQ6ExaOIqti2FDWoEMWARUqIKyjr2VcZzXShrI+A3zpeiuPWzx6iPftt44LhP74E5sW36B75N6VHbvRtpvO6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -10326,9 +10326,9 @@
}
},
"node_modules/miller-rabin/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/mime": {
@@ -10413,10 +10413,10 @@
}
},
"node_modules/minipass": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
- "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
- "license": "ISC",
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+ "license": "BlueOak-1.0.0",
"engines": {
"node": ">=16 || 14 >=14.17"
}
@@ -11911,9 +11911,9 @@
}
},
"node_modules/public-encrypt/node_modules/bn.js": {
- "version": "4.12.2",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
- "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==",
+ "version": "4.12.3",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
+ "integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
"license": "MIT"
},
"node_modules/punycode": {
@@ -14636,9 +14636,9 @@
}
},
"node_modules/undici-types": {
- "version": "7.16.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
- "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
+ "version": "7.18.2",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
+ "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"dev": true,
"license": "MIT"
},
@@ -15360,9 +15360,9 @@
}
},
"node_modules/whatwg-url": {
- "version": "16.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.0.tgz",
- "integrity": "sha512-9CcxtEKsf53UFwkSUZjG+9vydAsFO4lFHBpJUtjBcoJOCJpKnSJNwCw813zrYJHpCJ7sgfbtOe0V5Ku7Pa1XMQ==",
+ "version": "16.0.1",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz",
+ "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/shared/naturalcrit/styles/tooltip.less b/shared/naturalcrit/styles/tooltip.less
index b21439486..3150aa789 100644
--- a/shared/naturalcrit/styles/tooltip.less
+++ b/shared/naturalcrit/styles/tooltip.less
@@ -3,18 +3,23 @@
@arrowSize : 6px;
@arrowPosition : 18px;
[data-tooltip] {
+ position:relative;
.tooltip(attr(data-tooltip));
}
[data-tooltip-top] {
+ position:relative;
.tooltipTop(attr(data-tooltip-top));
}
[data-tooltip-bottom] {
+ position:relative;
.tooltipBottom(attr(data-tooltip-bottom));
}
[data-tooltip-left] {
+ position:relative;
.tooltipLeft(attr(data-tooltip-left));
}
[data-tooltip-right] {
+ position:relative;
.tooltipRight(attr(data-tooltip-right));
}
.tooltip(@content) {
@@ -30,6 +35,7 @@
&::before, &::after {
bottom : 100%;
left : 50%;
+ translate: -50% 0;
}
&:hover::after, &:hover::before, &:focus::after, &:focus::before {
.transform(translateY(-(@arrowSize + 2)));
@@ -45,6 +51,7 @@
&::before, &::after {
top : 100%;
left : 50%;
+ translate: -50% 0;
}
&:hover::after, &:hover::before, &:focus::after, &:focus::before {
.transform(translateY(@arrowSize + 2));
@@ -57,7 +64,10 @@
margin-bottom : -@arrowSize;
border-left-color : @tooltipColor;
}
- &::after { margin-bottom : -14px;}
+ &::after {
+ margin-bottom : -14px;
+ max-width : 50ch;
+ }
&::before, &::after {
right : 100%;
bottom : 50%;
@@ -73,10 +83,14 @@
margin-left : -@arrowSize * 2;
border-right-color : @tooltipColor;
}
- &::after { margin-bottom : -14px;}
+ &::after {
+ margin-bottom : -14px;
+ max-width : 50ch;
+ }
&::before, &::after {
- bottom : 50%;
+ top : 50%;
left : 100%;
+ translate:0 -50%;
}
&:hover::after, &:hover::before, &:focus::after, &:focus::before {
.transform(translateX(@arrowSize + 2));
@@ -106,9 +120,12 @@
font-size : 12px;
line-height : 12px;
color : white;
- white-space : nowrap;
content : @content;
background : @tooltipColor;
+ max-width : 60ch;
+ width :max-content;
+ word-break : break-word;
+ overflow-wrap : break-word;
}
&:hover::before, &:hover::after {
visibility : visible;