Skip to content

Commit edfb4ad

Browse files
committed
refactor: Improve Tiptap and Input component styling
- Update InputHeader text color from secondary to text - Modify Mention component styling with border and hover state - Add span tag to Mention node in Tiptap constants - Update Toolbar link button styling - Enhance allowed HTML attributes for Tiptap conversion - Bump package version to 1.0.209
1 parent 33f1bda commit edfb4ad

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@programmer_network/yail",
3-
"version": "1.0.208",
3+
"version": "1.0.209",
44
"description": "Programmer Network's official UI library for React",
55
"author": "Aleksandar Grbic - (https://programmer.network)",
66
"publishConfig": {

src/Components/Inputs/Common/InputHeader/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const InputHeader: FC<InputHeaderProps> = (
2828
<Tooltip text={hint} id={name} place='right'>
2929
<Icon
3030
iconName='IconInfo'
31-
className='yl:w-4 yl:text-secondary yl:relative yl:top-[1px] yl:cursor-pointer'
31+
className='yl:w-4 yl:text-text yl:relative yl:top-[1px] yl:cursor-pointer'
3232
/>
3333
</Tooltip>
3434
)}
35-
<div className='yl:text-secondary'>
35+
<div className='yl:text-text'>
3636
{label}
3737
{required && <span className='yl:ml-1 yl:text-error'>*</span>}
3838
</div>

src/Components/Inputs/Tiptap/Components/Mention/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ const Mention: React.ForwardRefRenderFunction<MentionHandle, IMentionProps> = (
5454
}));
5555

5656
return (
57-
<ul className='yl:flex yl:max-h-60 yl:min-w-[150px] yl:flex-col yl:gap-2 yl:overflow-y-auto yl:bg-background yl:py-2 yl:pl-4 yl:text-text yl:shadow-lg'>
57+
<ul className='yl:flex yl:max-h-60 yl:min-w-[150px] yl:border yl:border-text/20 yl:rounded-xs yl:flex-col yl:gap-2 yl:overflow-y-auto yl:bg-background yl:text-text yl:shadow-lg yl:p-2'>
5858
{props.items.map((item, index) => (
5959
<li
6060
data-label={item.label}
61-
className={classNames({
62-
"yl:text-text": index === selectedIndex
61+
className={classNames("yl:p-1 yl:rounded-xs", {
62+
"yl:text-primary yl:bg-text/5": index === selectedIndex
6363
})}
6464
key={index}
6565
onClick={() => selectItem(index)}

src/Components/Inputs/Tiptap/Components/Toolbar/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export const Toolbar = ({
148148
ref={ref}
149149
>
150150
<Button
151-
outlined
152151
icon={{
153152
iconName: "IconLink",
154153
iconPosition: "right",

src/Components/Inputs/Tiptap/TiptapToHTML/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default class TiptapToHTML {
100100
"height",
101101
"loading"
102102
],
103-
span: ["data-id", "data-type"]
103+
span: ["data-id", "data-type", "yl:text-primary"]
104104
},
105105
selfClosing: ["img", "br"],
106106
allowedClasses: {

src/Components/Inputs/Tiptap/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const toolbarItemToClassName = {
128128
classes: "yl:mx-auto yl:block yl:p-2 yl:border yl:border-background"
129129
},
130130
[TIPTAP_TOOLBAR_ITEMS.MENTION]: {
131-
tagName: null,
131+
tagName: "span",
132132
classes: "yl:text-primary yl:cursor-pointer yl:font-bold"
133133
}
134134
};

0 commit comments

Comments
 (0)