2022-01-28 13:44:58 +00:00
|
|
|
import styled, { css } from "styled-components";
|
2022-02-18 13:43:21 +00:00
|
|
|
|
2022-01-28 13:44:58 +00:00
|
|
|
import Base from "@appserver/components/themes/base";
|
2019-12-14 13:16:01 +00:00
|
|
|
|
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
|
/* eslint-disable react/prop-types */
|
2022-03-23 08:18:59 +00:00
|
|
|
|
2019-12-14 13:54:12 +00:00
|
|
|
/* eslint-enable react/prop-types */
|
|
|
|
/* eslint-enable no-unused-vars */
|
|
|
|
|
2022-03-23 08:18:59 +00:00
|
|
|
const StyledSelector = styled.div`
|
2022-02-14 10:49:27 +00:00
|
|
|
display: grid;
|
2020-10-16 12:38:04 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
height: 100%;
|
|
|
|
grid-template-columns: 1fr;
|
2020-10-16 12:38:04 +00:00
|
|
|
${(props) =>
|
2022-02-14 10:49:27 +00:00
|
|
|
props.isMultiSelect && props.hasSelected
|
2020-10-16 12:38:04 +00:00
|
|
|
? css`
|
2022-02-14 10:49:27 +00:00
|
|
|
grid-template-rows: 53px 1fr 69px;
|
|
|
|
grid-template-areas: "header" "column-options" "footer";
|
2020-10-16 12:38:04 +00:00
|
|
|
`
|
|
|
|
: css`
|
2022-02-14 10:49:27 +00:00
|
|
|
grid-template-rows: 53px 1fr;
|
|
|
|
grid-template-areas: "header" "column-options";
|
|
|
|
`}
|
2020-08-17 13:45:14 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
.header {
|
2022-02-15 07:22:05 +00:00
|
|
|
grid-area: header;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
height: 53px;
|
|
|
|
min-height: 53px;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
padding: 0 16px;
|
|
|
|
margin: 0;
|
2020-08-17 13:45:14 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
box-sizing: border-box;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: start;
|
2020-01-09 13:36:57 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
.arrow-button {
|
|
|
|
margin-right: 12px;
|
|
|
|
}
|
2020-01-09 13:36:57 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
svg {
|
|
|
|
cursor: pointer;
|
2019-12-14 13:54:12 +00:00
|
|
|
}
|
|
|
|
}
|
2020-02-05 20:55:56 +00:00
|
|
|
|
2019-12-14 13:54:12 +00:00
|
|
|
.column-options {
|
|
|
|
grid-area: column-options;
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
display: grid;
|
2022-02-14 10:49:27 +00:00
|
|
|
|
|
|
|
padding: 0;
|
2019-12-27 12:46:38 +00:00
|
|
|
grid-row-gap: 2px;
|
2022-02-14 10:49:27 +00:00
|
|
|
|
2020-12-03 15:14:11 +00:00
|
|
|
overflow: hidden;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
|
|
|
grid-template-columns: 1fr;
|
2022-02-14 10:49:27 +00:00
|
|
|
grid-template-rows: 30px 1fr;
|
2022-01-28 13:44:58 +00:00
|
|
|
grid-template-areas: "header-options" "body-options";
|
2019-12-14 13:54:12 +00:00
|
|
|
|
|
|
|
.header-options {
|
|
|
|
grid-area: header-options;
|
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
padding: 0 16px;
|
|
|
|
margin-right: 0px !important;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
grid-template-rows: 30px;
|
|
|
|
|
|
|
|
grid-template-areas: "options_searcher";
|
|
|
|
|
|
|
|
.options_searcher {
|
|
|
|
grid-area: options_searcher;
|
|
|
|
}
|
2020-01-10 15:28:12 +00:00
|
|
|
|
2020-10-16 12:38:04 +00:00
|
|
|
.options_searcher {
|
|
|
|
div:first-child {
|
|
|
|
:hover {
|
2022-01-28 13:44:58 +00:00
|
|
|
border-color: ${(props) =>
|
|
|
|
props.theme.advancedSelector.searcher.hoverBorderColor};
|
2020-10-16 12:38:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
:focus,
|
|
|
|
:focus-within {
|
2022-01-28 13:44:58 +00:00
|
|
|
border-color: ${(props) =>
|
|
|
|
props.theme.advancedSelector.searcher.focusBorderColor};
|
2020-10-16 12:38:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
& > input::placeholder {
|
2022-01-28 13:44:58 +00:00
|
|
|
color: ${(props) =>
|
|
|
|
props.theme.advancedSelector.searcher.placeholderColor};
|
2020-01-13 13:27:18 +00:00
|
|
|
}
|
2020-01-10 15:28:12 +00:00
|
|
|
}
|
2020-10-16 12:38:04 +00:00
|
|
|
}
|
2019-12-14 13:16:01 +00:00
|
|
|
}
|
2019-12-14 13:54:12 +00:00
|
|
|
|
|
|
|
.body-options {
|
|
|
|
grid-area: body-options;
|
2022-02-14 10:49:27 +00:00
|
|
|
margin-top: 8px;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-03-23 08:33:48 +00:00
|
|
|
.options-list {
|
|
|
|
div:nth-child(3) {
|
|
|
|
right: 10px !important;
|
|
|
|
}
|
|
|
|
}
|
2022-05-11 08:46:45 +00:00
|
|
|
.option-loader {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2022-05-12 09:36:31 +00:00
|
|
|
margin-top: 16px;
|
2022-05-11 08:46:45 +00:00
|
|
|
}
|
2020-01-09 13:36:57 +00:00
|
|
|
.row-option {
|
|
|
|
box-sizing: border-box;
|
2022-02-14 10:49:27 +00:00
|
|
|
height: 48px;
|
2020-01-09 13:36:57 +00:00
|
|
|
cursor: pointer;
|
2019-12-14 13:54:12 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
2020-08-17 13:45:14 +00:00
|
|
|
&:hover {
|
2022-01-28 13:44:58 +00:00
|
|
|
background-color: ${(props) =>
|
|
|
|
props.theme.advancedSelector.hoverBackgroundColor};
|
2020-08-17 13:45:14 +00:00
|
|
|
}
|
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
.option-info {
|
|
|
|
width: calc(100% - 32px);
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: start;
|
2020-02-07 07:00:35 +00:00
|
|
|
}
|
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
.option-avatar {
|
|
|
|
margin-right: 12px;
|
|
|
|
min-width: 32px;
|
|
|
|
max-width: 32px;
|
2019-12-14 13:54:12 +00:00
|
|
|
}
|
2020-02-07 12:41:26 +00:00
|
|
|
|
2022-02-14 10:49:27 +00:00
|
|
|
.option-text {
|
|
|
|
max-width: 100%;
|
|
|
|
line-height: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.option-text__group {
|
|
|
|
width: auto;
|
2022-03-18 07:33:58 +00:00
|
|
|
border-bottom: ${(props) =>
|
|
|
|
props.theme.toggleContent.hoverBorderBottom};
|
2022-02-14 10:49:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.option-text__header {
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.option-checkbox {
|
|
|
|
margin-left: 8px;
|
|
|
|
margin-right: 8px;
|
|
|
|
min-width: 16px;
|
|
|
|
max-width: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.option-separator {
|
|
|
|
height: 1px;
|
2022-05-12 09:36:31 +00:00
|
|
|
background: ${(props) =>
|
|
|
|
props.theme.advancedSelector.selectedBackgroundColor};
|
2022-02-15 07:22:05 +00:00
|
|
|
margin: 8px 16px;
|
2022-02-14 10:49:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.row-header {
|
|
|
|
cursor: auto;
|
|
|
|
|
|
|
|
.option-checkbox {
|
|
|
|
margin-right: 0 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
:hover {
|
|
|
|
background: none;
|
|
|
|
}
|
2019-12-14 13:16:01 +00:00
|
|
|
}
|
|
|
|
}
|
2019-12-14 13:54:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
grid-area: footer;
|
|
|
|
}
|
|
|
|
`;
|
2019-12-14 13:16:01 +00:00
|
|
|
|
2021-12-24 11:25:35 +00:00
|
|
|
StyledSelector.defaultProps = { theme: Base };
|
|
|
|
|
2019-12-14 13:54:12 +00:00
|
|
|
export default StyledSelector;
|