Skip to content

Fix/css issues #814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1261e67
translation key added
MenaamAfzal Apr 17, 2024
b6a4318
section names updated
MenaamAfzal Apr 17, 2024
1cd164f
component styles created
MenaamAfzal Apr 17, 2024
e42c53e
field styles added to input
MenaamAfzal Apr 17, 2024
d546b25
field styles added to autocomplae
MenaamAfzal Apr 17, 2024
e5e22a0
field styles added to radio
MenaamAfzal Apr 17, 2024
cd2470c
field styles added to checkbox
MenaamAfzal Apr 17, 2024
79aeeda
field styles added to cascader
MenaamAfzal Apr 17, 2024
32fcd8e
field style added to number input
MenaamAfzal Apr 17, 2024
347d61b
field style added to passwor
MenaamAfzal Apr 17, 2024
1e15ddd
field styles added to switch
MenaamAfzal Apr 17, 2024
c04c6fb
field style added to text area
MenaamAfzal Apr 17, 2024
2139d97
field style added to tree
MenaamAfzal Apr 17, 2024
e9b5142
field style added to tree select
MenaamAfzal Apr 17, 2024
f6222cd
field style added to date
MenaamAfzal Apr 17, 2024
c7c8ed8
field added to rating
MenaamAfzal Apr 17, 2024
756ba81
field style added to signature
MenaamAfzal Apr 17, 2024
0e4bb65
field style added to range
MenaamAfzal Apr 17, 2024
5bfc98d
field style added to slider
MenaamAfzal Apr 17, 2024
0297f46
field style added to select
MenaamAfzal Apr 18, 2024
12d5ff4
field style added to multi select
MenaamAfzal Apr 18, 2024
972c633
Merge branch 'dev' into fix/css-issues
FalkWolsky Apr 18, 2024
76a28c1
refactored variable name
MenaamAfzal Apr 19, 2024
fd38a9e
Merge branch 'dev' into fix/css-issues
FalkWolsky Apr 19, 2024
f636ffb
console removeed
MenaamAfzal Apr 19, 2024
394de1d
border improved
MenaamAfzal Apr 19, 2024
63bd4e3
bg color removed
MenaamAfzal Apr 20, 2024
70cec63
date time style updated
MenaamAfzal Apr 20, 2024
ba3cd73
local styles used
MenaamAfzal Apr 21, 2024
c3f9c34
bg color updated
MenaamAfzal Apr 21, 2024
d137a8c
Merge branch 'dev' into fix/css-issues
FalkWolsky Apr 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion client/packages/lowcoder-design/src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { INPUT_DEFAULT_ONCHANGE_DEBOUNCE } from "constants/perf";

export const StyledInput = styled(AntdInput)`
width: ${(props) => (props.width ? props.width : "100%")};
background: #fdfdfd;
border: 1px solid ${BorderColor};
border-radius: ${BorderRadius};
padding-left: 12px;
Expand Down
10 changes: 10 additions & 0 deletions client/packages/lowcoder-design/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ const SearchInput = styled(Input)`
font-size: 13px;
user-select: none;
overflow: hidden;
background-color: #fdfdfd;
color: #000;
&:focus {
outline: none;
box-shadow: 0 0 0 3px #daecfc;
}
&:hover {
background-color: #fdfdfd;
color: #000;
}
&:focus-within {
background-color: #fdfdfd;
color: #000;
}
`;
const SearchDiv = styled.div<{ error?: boolean }>`
height: 32px;
Expand Down
4 changes: 3 additions & 1 deletion client/packages/lowcoder-design/src/components/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,7 @@ export const sectionNames = {
style: trans("prop.style"),
labelStyle:trans("prop.labelStyle"),
data: trans("prop.data"),
meetings : trans("prop.meetings"), // added by Falk Wolsky
meetings: trans("prop.meetings"), // added by Falk Wolsky
field: trans("prop.field"),
inputFieldStyle:trans("prop.inputFieldStyle")
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const SelectWrapper = styled.div<{ $border?: boolean }>`
height: 100%;
align-items: center;
margin-right: 8px;
background-color: #fff;

.ant-select-selection-item {
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions client/packages/lowcoder-design/src/i18n/design/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const en = {
style: "Style",
meetings: "Meeting Settings",
data: "Data",
field: 'Field',
inputFieldStyle:'Input Field Style'
},
passwordInput: {
label: "Password:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Input, Section, sectionNames } from "lowcoder-design";
import { BoolControl } from "comps/controls/boolControl";
import { styleControl } from "comps/controls/styleControl";
import {
InputFieldStyle,
InputLikeStyle,
InputLikeStyleType,
LabelStyle,
Expand Down Expand Up @@ -73,7 +74,7 @@ const childrenMap = {
...textInputChildren,
viewRef: RefControl<InputRef>,
allowClear: BoolControl.DEFAULT_TRUE,
style: styleControl(InputLikeStyle),
style: styleControl(InputFieldStyle),
labelStyle:styleControl(LabelStyle),
prefixIcon: IconControl,
suffixIcon: IconControl,
Expand All @@ -87,6 +88,7 @@ const childrenMap = {
autocompleteIconColor: dropdownControl(autocompleteIconColor, "blue"),
componentSize: dropdownControl(componentSize, "small"),
valueInItems: booleanExposingStateControl("valueInItems"),
inputFieldStyle: styleControl(InputLikeStyle),
};

const getValidate = (value: any): "" | "warning" | "error" | undefined => {
Expand Down Expand Up @@ -155,11 +157,11 @@ let AutoCompleteCompBase = (function () {
<ConfigProvider
theme={{
token: {
colorBgContainer: props.style.background,
colorBorder: props.style.border,
borderRadius: parseInt(props.style.radius),
colorText: props.style.text,
colorPrimary: props.style.accent,
colorBgContainer: props.inputFieldStyle.background,
colorBorder: props.inputFieldStyle.border,
borderRadius: parseInt(props.inputFieldStyle.radius),
colorText: props.inputFieldStyle.text,
colorPrimary: props.inputFieldStyle.accent,
controlHeight: componentSize === "small" ? 30 : 38,
},
}}
Expand Down Expand Up @@ -268,7 +270,7 @@ let AutoCompleteCompBase = (function () {
ref={props.viewRef}
placeholder={placeholder}
allowClear={props.allowClear}
$style={props.style}
$style={props.inputFieldStyle}
prefix={hasIcon(props.prefixIcon) && props.prefixIcon}
suffix={hasIcon(props.suffixIcon) && props.suffixIcon}
status={getValidate(validateState)}
Expand All @@ -279,7 +281,8 @@ let AutoCompleteCompBase = (function () {
</>
),
style: props.style,
labelStyle:props.labelStyle,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
...validateState,
});
})
Expand Down Expand Up @@ -341,6 +344,9 @@ let AutoCompleteCompBase = (function () {
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
);
})
Expand Down
19 changes: 14 additions & 5 deletions client/packages/lowcoder/src/comps/comps/dateComp/dateComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { UICompBuilder, withDefault } from "../../generators";
import { CommonNameConfig, depsConfig, withExposingConfigs } from "../../generators/withExposing";
import { formDataChildren, FormDataPropertyView } from "../formComp/formDataConstants";
import { styleControl } from "comps/controls/styleControl";
import { DateTimeStyle, DateTimeStyleType, LabelStyle } from "comps/controls/styleControlConstants";
import { DateTimeStyle, DateTimeStyleType, InputFieldStyle, LabelStyle } from "comps/controls/styleControlConstants";
import { withMethodExposing } from "../../generators/withMethodExposing";
import {
disabledPropertyView,
Expand Down Expand Up @@ -71,11 +71,12 @@ const commonChildren = {
hourStep: RangeControl.closed(1, 24, 1),
minuteStep: RangeControl.closed(1, 60, 1),
secondStep: RangeControl.closed(1, 60, 1),
style: styleControl(DateTimeStyle),
style: styleControl(InputFieldStyle),
labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)),
suffixIcon: withDefault(IconControl, "/icon:regular/calendar"),
...validationChildren,
viewRef: RefControl<CommonPickerMethods>,
inputFieldStyle:styleControl(DateTimeStyle)
};
type CommonChildrenType = RecordConstructorToComp<typeof commonChildren>;

Expand Down Expand Up @@ -166,12 +167,13 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
return props.label({
required: props.required,
style: props.style,
labelStyle:props.labelStyle,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
children: (
<DateUIView
viewRef={props.viewRef}
disabledTime={() => disabledTime(props.minTime, props.maxTime)}
$style={props.style}
$style={props.inputFieldStyle}
disabled={props.disabled}
{...datePickerProps(props)}
minDate={props.minDate}
Expand Down Expand Up @@ -253,6 +255,9 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props) => {
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
)}
</>
Expand Down Expand Up @@ -281,7 +286,7 @@ export const dateRangeControl = (function () {
const children = (
<DateRangeUIView
viewRef={props.viewRef}
$style={props.style}
$style={props.inputFieldStyle}
disabled={props.disabled}
{...datePickerProps(props)}
start={start.isValid() ? start : null}
Expand Down Expand Up @@ -319,6 +324,7 @@ export const dateRangeControl = (function () {
style: props.style,
labelStyle:props.labelStyle,
children: children,
inputFieldStyle:props.inputFieldStyle,
...(startResult.validateStatus !== "success"
? startResult
: endResult.validateStatus !== "success"
Expand Down Expand Up @@ -383,6 +389,9 @@ export const dateRangeControl = (function () {
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export const getStyle = (style: DateTimeStyleType) => {
&:not(.ant-picker-disabled) {
border-color: ${style.border};
background-color: ${style.background};
border-width: ${style.borderWidth};
border-style: ${style.borderStyle};

input {
color: ${style.text};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { formDataChildren, FormDataPropertyView } from "../formComp/formDataCons
import { withMethodExposing, refMethods } from "../../generators/withMethodExposing";
import { RefControl } from "../../controls/refControl";
import { styleControl } from "comps/controls/styleControl";
import { InputLikeStyle, InputLikeStyleType, LabelStyle, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants";
import { InputFieldStyle, InputLikeStyle, InputLikeStyleType, LabelStyle, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants";
import {
disabledPropertyView,
hiddenPropertyView,
Expand Down Expand Up @@ -257,10 +257,10 @@ const childrenMap = {
allowNull: BoolControl,
onEvent: InputEventHandlerControl,
viewRef: RefControl<HTMLInputElement>,
style: styleControl(InputLikeStyle),
style: styleControl(InputFieldStyle),
labelStyle:styleControl(LabelStyle),
prefixIcon: IconControl,

inputFieldStyle:styleControl(InputLikeStyle),
// validation
required: BoolControl,
min: UndefinedNumberControl,
Expand Down Expand Up @@ -322,7 +322,7 @@ const CustomInputNumber = (props: RecordConstructorToView<typeof childrenMap>) =
placeholder={props.placeholder}
stringMode={true}
precision={props.precision}
$style={props.style}
$style={props.inputFieldStyle}
prefix={hasIcon(props.prefixIcon) && props.prefixIcon}
onPressEnter={() => {
handleFinish();
Expand Down Expand Up @@ -381,7 +381,8 @@ let NumberInputTmpComp = (function () {
required: props.required,
children: <CustomInputNumber {...props} />,
style: props.style,
labelStyle:props.labelStyle,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
...validate(props),
});
})
Expand Down Expand Up @@ -436,6 +437,9 @@ let NumberInputTmpComp = (function () {
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const RangeSliderBasicComp = (function () {
return props.label({
style: props.style,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
children: (
<SliderWrapper
onMouseDown={(e: any) => {
Expand All @@ -28,7 +29,7 @@ const RangeSliderBasicComp = (function () {
{...props}
range={true}
value={[props.start.value, props.end.value]}
$style={props.style}
$style={props.inputFieldStyle}
style={{ margin: 0 }}
onChange={([start, end]) => {
props.start.onChange(start);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const SliderBasicComp = (function () {
return new UICompBuilder(childrenMap, (props) => {
return props.label({
style: props.style,
labelStyle:props.labelStyle,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
children: (
<SliderWrapper
onMouseDown={(e: any) => {
Expand All @@ -31,7 +32,7 @@ const SliderBasicComp = (function () {
<SliderStyled
{...props}
value={props.value.value}
$style={props.style}
$style={props.inputFieldStyle}
style={{margin: 0}}
// FALK TODO : vertical={true}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChangeEventHandlerControl } from "../../controls/eventHandlerControl";
import { Section, sectionNames } from "lowcoder-design";
import { RecordConstructorToComp } from "lowcoder-core";
import { styleControl } from "comps/controls/styleControl";
import { LabelStyle, SliderStyle, SliderStyleType } from "comps/controls/styleControlConstants";
import { InputFieldStyle, LabelStyle, SliderStyle, SliderStyleType } from "comps/controls/styleControlConstants";
import styled, { css } from "styled-components";
import { default as Slider } from "antd/es/slider";
import { darkenColor, fadeColor } from "lowcoder-design";
Expand Down Expand Up @@ -67,10 +67,11 @@ export const SliderChildren = {
label: LabelControl,
disabled: BoolCodeControl,
onEvent: ChangeEventHandlerControl,
style: styleControl(SliderStyle),
style: styleControl(InputFieldStyle),
labelStyle:styleControl(LabelStyle.filter((style)=> ['accent','validate'].includes(style.name) === false)),
prefixIcon: IconControl,
suffixIcon: IconControl,
inputFieldStyle:styleControl(SliderStyle)
};

export const SliderPropertyView = (
Expand Down Expand Up @@ -101,6 +102,9 @@ export const SliderPropertyView = (
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
)}
</>
Expand Down
11 changes: 8 additions & 3 deletions client/packages/lowcoder/src/comps/comps/ratingComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { UICompBuilder, withDefault } from "../generators";
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../generators/withExposing";
import { formDataChildren, FormDataPropertyView } from "./formComp/formDataConstants";
import { styleControl } from "comps/controls/styleControl";
import { LabelStyle, RatingStyle, RatingStyleType } from "comps/controls/styleControlConstants";
import { InputFieldStyle, LabelStyle, RatingStyle, RatingStyleType } from "comps/controls/styleControlConstants";
import { migrateOldData } from "comps/generators/simpleGenerators";
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
import { trans } from "i18n";
Expand Down Expand Up @@ -43,8 +43,9 @@ const RatingBasicComp = (function () {
allowHalf: BoolControl,
disabled: BoolCodeControl,
onEvent: eventHandlerControl(EventOptions),
style: migrateOldData(styleControl(RatingStyle), fixOldData),
style: styleControl(InputFieldStyle),
labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)),
inputFieldStyle:migrateOldData(styleControl(RatingStyle), fixOldData),
...formDataChildren,
};
return new UICompBuilder(childrenMap, (props) => {
Expand All @@ -66,6 +67,7 @@ const RatingBasicComp = (function () {
return props.label({
style: props.style,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
children: (
<RateStyled
count={props.max}
Expand All @@ -76,7 +78,7 @@ const RatingBasicComp = (function () {
}}
allowHalf={props.allowHalf}
disabled={props.disabled}
$style={props.style}
$style={props.inputFieldStyle}
/>
),
});
Expand Down Expand Up @@ -119,6 +121,9 @@ const RatingBasicComp = (function () {
<Section name={sectionNames.labelStyle}>
{children.labelStyle.getPropertyView()}
</Section>
<Section name={sectionNames.inputFieldStyle}>
{children.inputFieldStyle.getPropertyView()}
</Section>
</>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ let CascaderBasicComp = (function () {
return new UICompBuilder(childrenMap, (props) => {
return props.label({
style: props.style,
labelStyle:props.labelStyle,
labelStyle: props.labelStyle,
inputFieldStyle:props.inputFieldStyle,
children: (
<CascaderStyle
ref={props.viewRef}
Expand All @@ -32,7 +33,7 @@ let CascaderBasicComp = (function () {
allowClear={props.allowClear}
placeholder={props.placeholder}
showSearch={props.showSearch}
$style={props.style}
$style={props.inputFieldStyle}
onFocus={() => props.onEvent("focus")}
onBlur={() => props.onEvent("blur")}
onChange={(value: (string | number)[]) => {
Expand Down
Loading