Skip to content

Commit 50f87fc

Browse files
committed
Mention component height issue fix, checkbox component hover background color property added along with translations of hover background text
1 parent 67d578c commit 50f87fc

File tree

6 files changed

+32
-26
lines changed

6 files changed

+32
-26
lines changed

client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,25 @@ export const getStyle = (style: CheckboxStyleType) => {
5151
border-radius: ${style.radius};
5252
}
5353
}
54-
54+
5555
.ant-checkbox-inner {
5656
border-radius: ${style.radius};
5757
background-color: ${style.uncheckedBackground};
5858
border-color: ${style.uncheckedBorder};
5959
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
6060
}
61+
62+
&:hover .ant-checkbox-inner,
63+
.ant-checkbox:hover .ant-checkbox-inner,
64+
.ant-checkbox-input + ant-checkbox-inner {
65+
background-color:${style.hoverBackground ? style.hoverBackground :'#fff'};
66+
}
67+
68+
&:hover .ant-checkbox-checked .ant-checkbox-inner,
69+
.ant-checkbox:hover .ant-checkbox-inner,
70+
.ant-checkbox-input + ant-checkbox-inner {
71+
background-color:${style.hoverBackground ? style.hoverBackground:'#ffff'};
72+
}
6173
6274
&:hover .ant-checkbox-inner,
6375
.ant-checkbox:hover .ant-checkbox-inner,
@@ -67,6 +79,8 @@ export const getStyle = (style: CheckboxStyleType) => {
6779
}
6880
}
6981
82+
83+
7084
.ant-checkbox-group-item {
7185
font-family:${style.fontFamily};
7286
font-size:${style.textSize};

client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ import { EditorContext } from "comps/editorState";
5858
const Wrapper = styled.div<{
5959
$style: InputLikeStyleType;
6060
}>`
61-
height: 100%;
61+
box-sizing:border-box;
62+
.rc-textarea {
63+
background-color:${(props) => props.$style.background};
64+
padding:${(props) => props.$style.padding};
65+
margin: 0px 3px 0px 3px !important;
66+
}
6267
6368
.ant-input-clear-icon {
6469
opacity: 0.45;
@@ -196,7 +201,7 @@ let MentionTmpComp = (function () {
196201
height: "100%",
197202
maxHeight: "100%",
198203
resize: "none",
199-
padding: props.style.padding,
204+
// padding: props.style.padding,
200205
fontStyle: props.style.fontStyle,
201206
fontFamily: props.style.fontFamily,
202207
borderWidth: props.style.borderWidth,

client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ const TEXT_WEIGHT = {
350350
textWeight: "textWeight",
351351
} as const;
352352

353+
const HOVER_BACKGROUND_COLOR = {
354+
name: "hoverBackground",
355+
label: trans("style.hoverBackground"),
356+
hoverBackground: "hoverBackground"
357+
}
358+
353359
const FONT_FAMILY = {
354360
name: "fontFamily",
355361
label: trans("style.fontFamily"),
@@ -476,7 +482,6 @@ function replaceAndMergeMultipleStyles(originalArray: any[], styleToReplace: str
476482
}
477483

478484
export const ButtonStyle = [
479-
// ...getBgBorderRadiusByBg("primary"),
480485
getBackground('primary'),
481486
...STYLING_FIELDS_SEQUENCE
482487
] as const;
@@ -735,23 +740,12 @@ export const SwitchStyle = [
735740
] as const;
736741

737742
export const SelectStyle = [
738-
// LABEL,
739743
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'border', [...getStaticBgBorderRadiusByBg(SURFACE_COLOR, "pc")]),
740-
741-
// ...getStaticBgBorderRadiusByBg(SURFACE_COLOR, "pc"),
742-
// TEXT,
743-
// MARGIN,
744-
// PADDING,
745744
...ACCENT_VALIDATE,
746745
] as const;
747746

748747
const multiSelectCommon = [
749748
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'border', [...getStaticBgBorderRadiusByBg(SURFACE_COLOR, "pc")]),
750-
// LABEL,
751-
// ...getStaticBgBorderRadiusByBg(SURFACE_COLOR, "pc"),
752-
// TEXT,
753-
// MARGIN,
754-
// PADDING,
755749
{
756750
name: "tags",
757751
label: trans("style.tags"),
@@ -844,7 +838,6 @@ function checkAndUncheck() {
844838
}
845839

846840
export const CheckboxStyle = [
847-
// LABEL,
848841
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [LABEL, STATIC_TEXT, VALIDATE]).filter((style) => style.name !== 'border'),
849842
...checkAndUncheck(),
850843
{
@@ -854,15 +847,10 @@ export const CheckboxStyle = [
854847
depType: DEP_TYPE.CONTRAST_TEXT,
855848
transformer: contrastText,
856849
},
857-
// RADIUS,
858-
// STATIC_TEXT,
859-
// VALIDATE,
860-
// MARGIN,
861-
// PADDING,
850+
HOVER_BACKGROUND_COLOR
862851
] as const;
863852

864853
export const RadioStyle = [
865-
// LABEL,
866854
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [LABEL, STATIC_TEXT, VALIDATE]).filter((style) => style.name !== 'border' && style.name !== 'radius'),
867855
...checkAndUncheck(),
868856
{
@@ -872,10 +860,6 @@ export const RadioStyle = [
872860
depType: DEP_TYPE.SELF,
873861
transformer: toSelf,
874862
},
875-
// STATIC_TEXT,
876-
// VALIDATE,
877-
// MARGIN,
878-
// PADDING,
879863
] as const;
880864

881865
export const SegmentStyle = [

client/packages/lowcoder/src/i18n/locales/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ export const de = {
324324
"tableCellText": "Zelle Text",
325325
"selectedRowBackground": "Ausgewählter Zeilenhintergrund",
326326
"hoverRowBackground": "Hover Row Hintergrund",
327+
"hoverBackground":"Hover-Hintergrund",
327328
"alternateRowBackground": "Alternativer Reihenhintergrund",
328329
"tableHeaderBackground": "Kopfzeile Hintergrund",
329330
"tableHeaderText": "Überschrift Text",

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ export const en = {
339339
"tableCellText": "Cell Text",
340340
"selectedRowBackground": "Selected Row Background",
341341
"hoverRowBackground": "Hover Row Background",
342+
"hoverBackground":"Hover Background",
342343
"alternateRowBackground": "Alternate Row Background",
343344
"tableHeaderBackground": "Header Background",
344345
"tableHeaderText": "Header Text",

client/packages/lowcoder/src/i18n/locales/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ style: {
330330
tableCellText: "单元格文本",
331331
selectedRowBackground: "选中行背景",
332332
hoverRowBackground: "悬停行背景",
333+
hoverBackground:"悬停背景",
333334
alternateRowBackground: "交替行背景",
334335
tableHeaderBackground: "表头背景",
335336
tableHeaderText: "表头文本",

0 commit comments

Comments
 (0)