diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js index 5773b0a7b8..f775c40c2a 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js @@ -321,7 +321,7 @@ describe("Table Widget V2 property pane feature validation", function() { "0", "0", "background", - "rgb(126, 34, 206) none repeat scroll 0% 0% / auto padding-box border-box", + "rgb(113, 30, 184) none repeat scroll 0% 0% / auto padding-box border-box", true, ); // Changing Cell backgroud color to PURPLE and validate using JS @@ -332,7 +332,7 @@ describe("Table Widget V2 property pane feature validation", function() { "0", "0", "background", - "rgb(128, 0, 128) none repeat scroll 0% 0% / auto padding-box border-box", + "rgb(102, 0, 102) none repeat scroll 0% 0% / auto padding-box border-box", true, ); // close property pane diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js index 048a8d1adb..5c5a4c8213 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/checkboxCell_spec.js @@ -93,7 +93,7 @@ describe("Checkbox column type funtionality test", () => { cy.get(selector + " div").should( "have.css", "background-color", - "rgb(128, 0, 128)", + "rgb(102, 0, 102)", ); }); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js index a9d99448b9..9a3b247723 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Widgets/TableV2/columnTypes/switchCell_spec.js @@ -93,7 +93,7 @@ describe("Switch column type funtionality test", () => { cy.get(selector + " div").should( "have.css", "background-color", - "rgb(128, 0, 128)", + "rgb(102, 0, 102)", ); }); }); diff --git a/app/client/src/pages/Editor/Popper.tsx b/app/client/src/pages/Editor/Popper.tsx index 0637ce9259..dea8f8f6c6 100644 --- a/app/client/src/pages/Editor/Popper.tsx +++ b/app/client/src/pages/Editor/Popper.tsx @@ -16,6 +16,7 @@ export type PopperProps = { parentElement?: Element | null; zIndex: number; isOpen: boolean; + borderRadius?: string; themeMode?: ThemeMode; targetNode?: Element; children: JSX.Element | null; @@ -31,6 +32,7 @@ export type PopperProps = { isDraggable?: boolean; disablePopperEvents?: boolean; cypressSelectorDragHandle?: string; + portalContainer?: Element; position?: { top: number; left: number; @@ -39,9 +41,12 @@ export type PopperProps = { // DraggableNode?: any; }; -const PopperWrapper = styled.div<{ zIndex: number }>` +const PopperWrapper = styled.div<{ zIndex: number; borderRadius?: string }>` z-index: ${(props) => props.zIndex}; position: absolute; + border-radius: ${(props) => props.borderRadius || "0"}; + box-shadow: 0 6px 20px 0px rgba(0, 0, 0, 0.15); + overflow: hidden; `; const DragHandleBlock = styled.div` @@ -178,10 +183,14 @@ export default (props: PopperProps) => { ]); return createPortal( props.isOpen && ( - + {props.children} ), - document.body, + props.portalContainer ? props.portalContainer : document.body, ); }; diff --git a/app/client/src/pages/common/CustomizedDropdown/StyledComponents.tsx b/app/client/src/pages/common/CustomizedDropdown/StyledComponents.tsx index 346826df79..d794341552 100644 --- a/app/client/src/pages/common/CustomizedDropdown/StyledComponents.tsx +++ b/app/client/src/pages/common/CustomizedDropdown/StyledComponents.tsx @@ -31,7 +31,10 @@ export const DropdownTrigger = styled.div<{ skin: Skin }>` } } `; -export const DropdownContent = styled.div<{ skin: Skin }>` +export const DropdownContent = styled.div<{ + skin: Skin; + borderRadius?: string; +}>` &&& * { font-size: ${(props) => props.theme.fontSizes[3]}px; } @@ -40,6 +43,7 @@ export const DropdownContent = styled.div<{ skin: Skin }>` background: ${(props) => props.theme.dropdown[props.skin].background}; max-height: 300px; overflow-y: auto; + border-radius: ${(props) => `min(0.375rem, ${props.borderRadius || "0"})`}; `; export const DropdownContentSection = styled.div<{ diff --git a/app/client/src/pages/common/CustomizedDropdown/index.tsx b/app/client/src/pages/common/CustomizedDropdown/index.tsx index a03e6145e3..9b895072f0 100644 --- a/app/client/src/pages/common/CustomizedDropdown/index.tsx +++ b/app/client/src/pages/common/CustomizedDropdown/index.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react"; -import { withTheme } from "styled-components"; +import { createGlobalStyle, withTheme } from "styled-components"; import { Popover, IconName, @@ -49,9 +49,24 @@ export type CustomizedDropdownProps = { openOnHover?: boolean; usePortal?: boolean; skin?: Skin; + borderRadius?: string; + customizedDropdownId?: string; modifiers?: IPopoverSharedProps["modifiers"]; }; +const PopoverStyles = createGlobalStyle<{ + id?: string; + borderRadius?: string; +}>` + ${({ borderRadius, id }) => ` + .${id}.${Classes.POPOVER} { + border-radius: min(${borderRadius}, 0.375rem); + box-shadow: 0 6px 20px 0px rgba(0, 0, 0, 0.15); + overflow: hidden; + } + `} +`; + export const getIcon = (icon?: string | MaybeElement, intent?: Intent) => { if (icon && typeof icon === "string") { if (MenuIcons[icon]) { @@ -133,29 +148,38 @@ export function CustomizedDropdown( )); return ( - { - if (props.onCloseDropDown) { - props.onCloseDropDown(); + <> + - {trigger} - {content} - + minimal + modifiers={props.modifiers} + onClose={() => { + if (props.onCloseDropDown) { + props.onCloseDropDown(); + } + }} + popoverClassName={props.customizedDropdownId} + position={ + getDirectionBased.POPPER_POSITION( + props.openDirection, + ) as PopoverPosition + } + > + {trigger} + + {content} + + + + ); } diff --git a/app/client/src/theme/wds.css b/app/client/src/theme/wds.css index d14364acae..aacd95f8f2 100644 --- a/app/client/src/theme/wds.css +++ b/app/client/src/theme/wds.css @@ -24,7 +24,7 @@ --wds-color-icon: #858282; --wds-color-icon-disabled: #A9A7A7; - --wds-color-hover: #4B4848; + --wds-color-icon-hover: #4B4848; --wds-color-text: #090707; --wds-color-text-danger: #D91921; diff --git a/app/client/src/widgets/IconButtonWidget/component/index.tsx b/app/client/src/widgets/IconButtonWidget/component/index.tsx index 99ce18a559..76fee55867 100644 --- a/app/client/src/widgets/IconButtonWidget/component/index.tsx +++ b/app/client/src/widgets/IconButtonWidget/component/index.tsx @@ -108,6 +108,7 @@ export interface ButtonStyleProps { buttonVariant?: ButtonVariant; dimension?: number; hasOnClickAction?: boolean; + compactMode?: string; } export const StyledButton = styled((props) => ( @@ -119,16 +120,25 @@ export const StyledButton = styled((props) => ( "boxShadow", "dimension", "hasOnClickAction", + "compactMode", ])} /> ))` background-image: none !important; height: ${({ dimension }) => (dimension ? `${dimension}px` : "auto")}; width: ${({ dimension }) => (dimension ? `${dimension}px` : "auto")}; - min-height: 32px !important; - min-width: 32px !important; + min-height: ${({ compactMode }) => + compactMode === "SHORT" ? "24px" : "30px"}; + min-width: ${({ compactMode }) => + compactMode === "SHORT" ? "24px" : "30px"}; + font-size: ${({ compactMode }) => + compactMode === "SHORT" ? "12px" : "14px"}; + line-height: ${({ compactMode }) => + compactMode === "SHORT" ? "24px" : "28px"}; - ${({ buttonColor, buttonVariant, hasOnClickAction, theme }) => ` + + + ${({ buttonColor, buttonVariant, compactMode, hasOnClickAction, theme }) => ` &:enabled { background: ${ getCustomBackgroundColor(buttonVariant, buttonColor) !== "none" @@ -177,7 +187,7 @@ export const StyledButton = styled((props) => ( : "transparent" } !important; color: var(--wds-color-text-disabled) !important; - + span { color: var(--wds-color-text-disabled) !important; } @@ -213,8 +223,10 @@ export const StyledButton = styled((props) => ( & > span > svg { height: 100%; width: 100%; - min-height: 16px; - min-width: 16px; + min-height: + ${compactMode === "SHORT" ? "14px" : "16px"}; + min-width: + ${compactMode === "SHORT" ? "14px" : "16px"}; } `} diff --git a/app/client/src/widgets/ImageWidget/component/index.tsx b/app/client/src/widgets/ImageWidget/component/index.tsx index e951577ed4..3ee75c342c 100644 --- a/app/client/src/widgets/ImageWidget/component/index.tsx +++ b/app/client/src/widgets/ImageWidget/component/index.tsx @@ -104,7 +104,7 @@ const ControlBtn = styled.a<{ background: var(--wds-color-bg-hover); svg path { - fill: var(--wds-color-hover); + fill: var(--wds-color-icon-hover); } } `; diff --git a/app/client/src/widgets/ListWidget/component/ListPagination.tsx b/app/client/src/widgets/ListWidget/component/ListPagination.tsx index 5dc947f69e..e63461f534 100644 --- a/app/client/src/widgets/ListWidget/component/ListPagination.tsx +++ b/app/client/src/widgets/ListWidget/component/ListPagination.tsx @@ -195,6 +195,10 @@ const paginatorCss = css<{ .rc-pagination-disabled:hover, .rc-pagination-disabled:focus { cursor: not-allowed; + + & > * { + pointer-events: none; + } } .rc-pagination-disabled .rc-pagination-item-link, .rc-pagination-disabled:hover .rc-pagination-item-link, @@ -322,7 +326,6 @@ const paginatorCss = css<{ box-shadow: ${({ boxShadow }) => `${boxShadow}`} !important; color: var(--wds-color-text) !important; border-color: transparent !important; - } .rc-pagination-prev .rc-pagination-item-link, .rc-pagination-next .rc-pagination-item-link { @@ -340,6 +343,10 @@ const paginatorCss = css<{ } } + .rc-pagination-disabled .rc-pagination-item-link { + color: var(--wds-color-text-disabled) !important; + } + .rc-pagination-item:hover { background-color: var(--wds-color-bg-hover) !important; diff --git a/app/client/src/widgets/TableWidget/component/TableAction.tsx b/app/client/src/widgets/TableWidget/component/TableAction.tsx index 54d4f4c443..3e5daa0b32 100644 --- a/app/client/src/widgets/TableWidget/component/TableAction.tsx +++ b/app/client/src/widgets/TableWidget/component/TableAction.tsx @@ -22,6 +22,7 @@ export const TableIconWrapper = styled.div<{ display: flex; align-items: center; justify-content: center; + background: var(--wds-color-bg); opacity: ${(props) => (props.disabled ? 0.6 : 1)}; cursor: ${(props) => !props.disabled && "pointer"}; color: ${(props) => (props.selected ? Colors.CODE_GRAY : Colors.GRAY)}; @@ -34,7 +35,7 @@ export const TableIconWrapper = styled.div<{ margin-left: 5px; padding: 0 5px; &:hover { - background: ${Colors.ATHENS_GRAY}; + background: var(--wds-color-bg-hover); } `; diff --git a/app/client/src/widgets/TableWidgetV2/component/CascadeFields.tsx b/app/client/src/widgets/TableWidgetV2/component/CascadeFields.tsx index 1a27683cee..5413a6ef93 100644 --- a/app/client/src/widgets/TableWidgetV2/component/CascadeFields.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/CascadeFields.tsx @@ -1,13 +1,11 @@ import React, { useState, useEffect, useCallback } from "react"; import styled from "styled-components"; -import { Icon, InputGroup } from "@blueprintjs/core"; +import { InputGroup } from "@blueprintjs/core"; import { debounce } from "lodash"; -import { AnyStyledComponent } from "styled-components"; import CustomizedDropdown from "pages/common/CustomizedDropdown"; import { Directions } from "utils/helpers"; import { Colors } from "constants/Colors"; -import { ControlIcons } from "icons/ControlIcons"; import { Skin } from "constants/DefaultTheme"; import AutoToolTipComponent from "./cellComponents/AutoToolTipComponent"; import { @@ -24,21 +22,13 @@ import DatePickerComponent from "widgets/DatePickerWidget2/component"; import { TimePrecision } from "widgets/DatePickerWidget2/constants"; import { ColumnTypes, ReadOnlyColumnTypes } from "../constants"; -const StyledRemoveIcon = styled( - ControlIcons.CLOSE_CIRCLE_CONTROL as AnyStyledComponent, -)` - padding: 0; - position: relative; - cursor: pointer; - &.hide-icon { - display: none; - } -`; +import CloseIcon from "remixicon-react/CloseCircleFillIcon"; +import ArrowDownIcon from "remixicon-react/ArrowDownSLineIcon"; const LabelWrapper = styled.div` width: 95px; margin-left: 10px; - color: ${Colors.BLUE_BAYOUX}; + color: var(--wds-color-text-light); font-size: 14px; font-weight: 500; `; @@ -55,18 +45,29 @@ const DropdownWrapper = styled.div<{ width: number }>` margin-left: 10px; `; -const StyledInputGroup = styled(InputGroup)` - background: ${Colors.WHITE}; - border: 1px solid #d3dee3; +const StyledInputGroup = styled(InputGroup)<{ + borderRadius?: string; +}>` + background: var(--wds-color-bg); + border: 1px solid var(--wds-color-border); box-sizing: border-box; - border-radius: 2px; - color: ${Colors.OXFORD_BLUE}; + border-radius: ${(props) => props.borderRadius || "0"}; + color: var(--wds-color-text); height: 32px; - width: 150px; + width: 120px; margin-left: 10px; + overflow: hidden; + input { box-shadow: none; } + + input:focus { + box-shadow: none; + } + &:hover { + border-color: var(--wds-color-border-hover); + } `; const DatePickerWrapper = styled.div` @@ -74,20 +75,26 @@ const DatePickerWrapper = styled.div` width: 150px; `; -const DropdownTrigger = styled.div` +const DropdownTrigger = styled.div<{ + borderRadius?: string; +}>` display: flex; align-items: center; justify-content: space-between; width: 100%; height: 32px; - background: ${Colors.WHITE}; - border: 1px solid #d3dee3; + background: var(--wds-color-bg); + border: 1px solid var(--wds-color-border); box-sizing: border-box; - border-radius: 2px; + border-radius: ${(props) => props.borderRadius || "0"}; font-size: 14px; padding: 5px 12px 7px; - color: ${Colors.OXFORD_BLUE}; + color: var(--wds-color-text); cursor: pointer; + + &:hover { + border-color: var(--wds-color-border-hover); + } &&& span { margin-right: 0; } @@ -209,6 +216,7 @@ function RenderOptions(props: { value?: string | Condition; showType?: boolean; className?: string; + borderRadius?: string; }) { const [selectedValue, selectValue] = useState(props.placeholder); const configs = { @@ -239,15 +247,20 @@ function RenderOptions(props: { openDirection: Directions.DOWN, trigger: { content: ( - - + + {selectedValue} - + ), }, skin: Skin.LIGHT, + borderRadius: props.borderRadius, + customizedDropdownId: "cascade-dropdown", }; useEffect(() => { if (props.value && props.columns) { @@ -270,6 +283,7 @@ function RenderInput(props: { value: string; onChange: (value: string) => void; className?: string; + borderRadius?: string; }) { const debouncedOnChange = useCallback(debounce(props.onChange, 400), []); const [value, setValue] = useState(props.value); @@ -283,6 +297,7 @@ function RenderInput(props: { }, [props.value]); return ( - {index === 1 ? ( )} - + ) : null} diff --git a/app/client/src/widgets/TableWidgetV2/component/Table.tsx b/app/client/src/widgets/TableWidgetV2/component/Table.tsx index 345582fecb..833671e16a 100644 --- a/app/client/src/widgets/TableWidgetV2/component/Table.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/Table.tsx @@ -30,7 +30,7 @@ import { Scrollbars } from "react-custom-scrollbars"; import { renderEmptyRows } from "./cellComponents/EmptyCell"; import { renderHeaderCheckBoxCell } from "./cellComponents/SelectionCheckboxCell"; import { HeaderCell } from "./cellComponents/HeaderCell"; -import { EditableCell } from "../constants"; +import { EditableCell, TableVariant } from "../constants"; import { TableBody } from "./TableBody"; interface TableProps { @@ -81,8 +81,11 @@ interface TableProps { accentColor: string; borderRadius: string; boxShadow?: string; + borderWidth?: number; + borderColor?: string; onBulkEditDiscard: () => void; onBulkEditSave: () => void; + variant?: TableVariant; primaryColumnId?: string; } @@ -236,13 +239,17 @@ export function Table(props: TableProps) { {isHeaderVisible && ( @@ -263,6 +270,7 @@ export function Table(props: TableProps) { backgroundColor={Colors.WHITE} serverSidePaginationEnabled={props.serverSidePaginationEnabled} tableSizes={tableSizes} + variant={props.variant} width={props.width} > ` - height: 38px; + height: calc(100% - 12px); display: flex; align-items: center; justify-content: center; + background: var(--wds-color-bg); + border-radius: ${(props) => props.borderRadius || "0"}; opacity: ${(props) => (props.disabled ? 0.6 : 1)}; cursor: ${(props) => !props.disabled && "pointer"}; color: ${(props) => (props.selected ? Colors.CODE_GRAY : Colors.GRAY)}; @@ -32,10 +36,18 @@ export const TableIconWrapper = styled.div<{ color: ${(props) => props.titleColor || Colors.GRAY}; } position: relative; - margin-left: 5px; - padding: 0 5px; + margin-left: 8px; + padding: 0 6px; &:hover { - background: ${Colors.ATHENS_GRAY}; + background: var(--wds-color-bg-hover); + } + + & > div { + width: 16px; + } + + span { + font-size: 13px; } `; @@ -59,6 +71,7 @@ function TableAction(props: TableActionProps) { return ( ` + ${({ borderRadius, id }) => ` + .${id}.${Classes.POPOVER} { + border-radius: min(${borderRadius}, 0.375rem); + box-shadow: 0 6px 20px 0px rgba(0, 0, 0, 0.15); + overflow: hidden; + } + `} +`; interface TableDataDownloadProps { data: Array>; columns: ReactTableColumnProps[]; widgetName: string; delimiter: string; + borderRadius?: string; } type FileDownloadType = "CSV" | "EXCEL"; @@ -192,37 +205,45 @@ function TableDataDownload(props: TableDataDownloadProps) { ); } return ( - - + + + + {dowloadOptions.map((item: DownloadOptionProps, index: number) => { + return ( + { + downloadFile(item.value); + }} + > + {item.label} + + ); + })} + + + - - {dowloadOptions.map((item: DownloadOptionProps, index: number) => { - return ( - { - downloadFile(item.value); - }} - > - {item.label} - - ); - })} - - + ); } diff --git a/app/client/src/widgets/TableWidgetV2/component/TableFilterPane.tsx b/app/client/src/widgets/TableWidgetV2/component/TableFilterPane.tsx index 0f0365e773..0e887b3076 100644 --- a/app/client/src/widgets/TableWidgetV2/component/TableFilterPane.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/TableFilterPane.tsx @@ -21,7 +21,7 @@ import { ReactComponent as DragHandleIcon } from "assets/icons/ads/app-icons/dra const DragBlock = styled.div` height: 40px; width: 83px; - background: ${Colors.WHITE_SNOW}; + background: var(--wds-color-bg-light); box-sizing: border-box; font-size: 12px; color: ${Colors.GREY_11}; @@ -33,7 +33,7 @@ const DragBlock = styled.div` cursor: pointer; span { padding-left: 8px; - color: ${Colors.GREY_11}; + color: var(--wds-color-text-light); } `; @@ -86,6 +86,7 @@ class TableFilterPane extends Component { return ( { onPositionChange={this.handlePositionUpdate} parentElement={boundaryParent} placement="top" + portalContainer={document.getElementById("art-board") || undefined} position={get(this.props, "metaProps.position") as PositionPropsInt} renderDragBlock={ diff --git a/app/client/src/widgets/TableWidgetV2/component/TableFilterPaneContent.tsx b/app/client/src/widgets/TableWidgetV2/component/TableFilterPaneContent.tsx index 4668d0c986..73f4de5c23 100644 --- a/app/client/src/widgets/TableWidgetV2/component/TableFilterPaneContent.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/TableFilterPaneContent.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useCallback } from "react"; -import styled, { AnyStyledComponent } from "styled-components"; +import styled from "styled-components"; import { Classes } from "@blueprintjs/core"; import { Colors } from "constants/Colors"; import { @@ -9,36 +9,27 @@ import { OperatorTypes, } from "./Constants"; import { DropdownOption } from "./TableFilters"; -import Button from "components/editorComponents/Button"; import CascadeFields from "./CascadeFields"; import { createMessage, TABLE_FILTER_COLUMN_TYPE_CALLOUT, } from "@appsmith/constants/messages"; -import { ControlIcons } from "icons/ControlIcons"; import { Icon, IconSize } from "design-system"; +import Button from "pages/AppViewer/AppViewerButton"; +import { ButtonVariantTypes } from "components/constants"; + +import AddIcon from "remixicon-react/AddLineIcon"; import { cloneDeep } from "lodash"; -const StyledPlusCircleIcon = styled( - ControlIcons.ADD_CIRCLE_CONTROL as AnyStyledComponent, -)` - padding: 0; - position: relative; - cursor: pointer; - svg { - circle { - fill: none !important; - stroke: ${Colors.GREEN}; - } - } -`; - -const TableFilterOuterWrapper = styled.div` +const TableFilterOuterWrapper = styled.div<{ + borderRadius?: string; +}>` display: flex; flex-direction: column; width: 100%; background: ${Colors.WHITE}; - box-shadow: 0px 12px 28px -8px rgba(0, 0, 0, 0.1); + box-shadow: 0 6px 20px 0px rgba(0, 0, 0, 0.15); + border-radius: ${(props) => props.borderRadius || "0"}; `; const TableFilerWrapper = styled.div` @@ -75,10 +66,10 @@ const ButtonActionsWrapper = styled.div` const ColumnTypeBindingMessage = styled.div` height: 40px; line-height: 40px; - background: ${Colors.WHITE_SNOW}; + background: var(--wds-color-bg-light); box-sizing: border-box; font-size: 12px; - color: ${Colors.GREY_11}; + color: var(--wds-color-text-light); letter-spacing: 0.04em; font-weight: 500; margin-left: 83px; @@ -180,6 +171,7 @@ function TableFilterPaneContent(props: TableFilterProps) { ); return ( { e.stopPropagation(); }} @@ -254,25 +246,29 @@ function TableFilterPaneContent(props: TableFilterProps) { {hasAnyFilters ? (