Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const TableCompView = React.memo((props: {
const showVerticalScrollbar = compChildren.showVerticalScrollbar.getView();
const visibleResizables = compChildren.visibleResizables.getView();
const showHRowGridBorder = compChildren.showHRowGridBorder.getView();
const showRowGridBorder = compChildren.showRowGridBorder.getView();
const columnsStyle = compChildren.columnsStyle.getView();
const summaryRowStyle = compChildren.summaryRowStyle.getView();
const changeSet = useMemo(() => compChildren.columns.getChangeSet(), [compChildren.columns]);
Expand Down Expand Up @@ -373,6 +374,7 @@ export const TableCompView = React.memo((props: {
$fixedToolbar={toolbar.fixedToolbar && toolbar.position === 'above'}
$visibleResizables={visibleResizables}
$showHRowGridBorder={showHRowGridBorder}
$showRowGridBorder={showRowGridBorder}
$isVirtual={scrollConfig.virtual}
$showHorizontalScrollbar={showHorizontalScrollbar}
$showVerticalScrollbar={showVerticalScrollbar}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const TableWrapper = styled.div.attrs<{
$fixedToolbar: boolean;
$visibleResizables: boolean;
$showHRowGridBorder?: boolean;
$showRowGridBorder?: boolean;
$isVirtual?: boolean;
$showHorizontalScrollbar?: boolean;
$showVerticalScrollbar?: boolean;
Expand Down Expand Up @@ -207,7 +208,10 @@ export const TableWrapper = styled.div.attrs<{
border-color: ${(props) => props.$headerStyle.border};
border-width: ${(props) => props.$headerStyle.borderWidth};
color: ${(props) => props.$headerStyle.headerText};
// border-inline-end: ${(props) => `${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border}`} !important;
${(props) => props.$showRowGridBorder
? `border-inline-end: ${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border} !important;`
: `border-inline-end: none !important;`
}

/* Proper styling for fixed header cells */
&.ant-table-cell-fix-left, &.ant-table-cell-fix-right {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const getStyle = (
// Implement horizontal scrollbar and vertical page number selection is not blocked
padding: 13px 12px;
position: sticky;
postion: -webkit-sticky;
position: -webkit-sticky;
left: 0px !important;
margin: ${style.margin} !important;
z-index: 999;
Expand Down Expand Up @@ -116,7 +116,7 @@ const getStyle = (
.ant-pagination-prev,
.ant-pagination-next {
path {
${style.toolbarText !== defaultTheme.textDark ? `fill: ${style.toolbarText}` : null};
${style.paginationText || style.toolbarText !== defaultTheme.textDark ? `fill: ${style.paginationText || style.toolbarText}` : null};
}

svg:hover {
Expand All @@ -127,32 +127,65 @@ const getStyle = (
}

.ant-pagination {
color: ${style.toolbarText};
color: ${style.paginationText || style.toolbarText};
}

// number items
.ant-pagination-item {
background: ${style.paginationBackground || 'transparent'};
border-color: ${style.border || 'transparent'};
a {
color: ${style.paginationText || style.toolbarText};
}
&:hover a {
color: ${theme?.primary};
}
}

.ant-pagination-item-active {
background: ${style.paginationActiveBackground || style.paginationBackground || 'transparent'};
border-color: ${style.border || theme?.primary};

a {
color: ${theme?.textDark};
color: ${style.paginationActiveText || theme?.textDark};
}
}

.ant-pagination-item:not(.ant-pagination-item-active) a {
color: ${style.toolbarText};
color: ${style.paginationText || style.toolbarText};

&:hover {
color: ${theme?.primary};
}
}

// size changer select
.ant-pagination-options {
.ant-select-selector {
background: ${style.paginationBackground || 'transparent'};
color: ${style.paginationText || style.toolbarText};
border-color: ${style.border || theme?.primary};
}
.ant-select-selection-item {
color: ${style.paginationText || style.toolbarText};
}
.ant-select-arrow {
color: ${style.paginationText || style.toolbarText};
}
}

.ant-select:not(.ant-select-disabled):hover .ant-select-selector,
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input)
.ant-select-selector,
.ant-pagination-options-quick-jumper input:hover,
.ant-pagination-options-quick-jumper input:focus {
border-color: ${style.border || theme?.primary};
}

.ant-pagination-options-quick-jumper input {
background: ${style.paginationBackground || 'transparent'};
color: ${style.paginationText || style.toolbarText};
}
`;
};

Expand Down
3 changes: 2 additions & 1 deletion client/packages/lowcoder/src/comps/controls/colorControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ type PropertyViewParam = {
// auto-generated message?
depMsg?: string;
allowGradient?: boolean;
tooltip?: React.ReactNode;
};

export class ColorControl extends ColorCodeControl {
Expand Down Expand Up @@ -134,7 +135,7 @@ function ColorItem(props: {
}, [containerRef]);

return (
<ControlPropertyViewWrapper label={param.label} labelEllipsis>
<ControlPropertyViewWrapper label={param.label} tooltip={param.tooltip} labelEllipsis>
<ColorContainer ref={containerRef}>
<ColorSelect
dispatch={controlThis.dispatch}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1903,6 +1903,7 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
depMsg:
depMsg,
allowGradient: config.name.includes('background'),
tooltip: config.tooltip || getTooltip(name),
})}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type CommonColorConfig = {
readonly name: string;
readonly label: string;
readonly platform?: SupportPlatform; // support all if undefined
readonly tooltip?: string; // Tooltip text to show on hover
};

export type SimpleColorConfig = CommonColorConfig & {
Expand Down Expand Up @@ -1767,14 +1768,45 @@ export const TableToolbarStyle = [
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: toSelf,
},
// Pagination specific styling
{
name: "paginationBackground",
label: trans("style.paginationBackground"),
tooltip: trans("style.paginationBackgroundTooltip"),
depName: "background",
depType: DEP_TYPE.SELF,
transformer: toSelf,
},
{
name: "paginationText",
label: trans("style.paginationText"),
tooltip: trans("style.paginationTextTooltip"),
depName: "paginationBackground",
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: contrastText,
},
{
name: "paginationActiveBackground",
label: trans("style.paginationActiveBackground"),
tooltip: trans("style.paginationActiveBackgroundTooltip"),
depName: "paginationBackground",
transformer: contrastBackground,
},
{
name: "paginationActiveText",
label: trans("style.paginationActiveText"),
tooltip: trans("style.paginationActiveTextTooltip"),
depName: "paginationActiveBackground",
depType: DEP_TYPE.CONTRAST_TEXT,
transformer: contrastText,
},
] as const;

export const TableHeaderStyle = [
MARGIN,
PADDING,
FONT_FAMILY,
FONT_STYLE,
TEXT,
// getStaticBackground(SURFACE_COLOR),
// getBackground("primarySurface"),
{
Expand Down
10 changes: 9 additions & 1 deletion client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,15 @@ export const en = {
"headerBackgroundImageOriginTip": "Specifies the positioning area of the header's background image. Example: padding-box, border-box, content-box.",
"footerBackgroundImageOriginTip": "Specifies the positioning area of the footer's background image. Example: padding-box, border-box, content-box.",
"rotationTip": "Specifies the rotation angle of the element. Example: 45deg, 90deg, -180deg.",
"lineHeightTip": "Sets the height of a line of text. Example: 1.5, 2, 120%."
"lineHeightTip": "Sets the height of a line of text. Example: 1.5, 2, 120%.",
"paginationBackground": "Pagination Background",
"paginationBackgroundTooltip": "Background color for pagination controls",
"paginationText": "Pagination Text",
"paginationTextTooltip": "Text color for pagination numbers and controls",
"paginationActiveBackground": "Pagination Active Background",
"paginationActiveBackgroundTooltip": "Background color for the active/selected page number",
"paginationActiveText": "Pagination Active Text",
"paginationActiveTextTooltip": "Text color for the active/selected page number",
},
"export": {
"hiddenDesc": "If true, the component is hidden",
Expand Down
Loading