Files
website/components/CategoryMultiSelect.module.css
T

230 lines
3.4 KiB
CSS

.root {
position: relative;
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.field {
position: relative;
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 46px;
padding: 14px 34px 10px 14px;
border: 1px solid #eee;
border-radius: 5px;
background: #fff;
transition: border-color 0.25s ease;
}
.field:focus-within {
border-color: var(--color-black);
}
.label {
position: absolute;
top: -8px;
left: 12px;
background: #fff;
padding: 0 6px;
font-size: 12px;
font-weight: 300;
color: var(--color-body);
transition: color 0.25s ease;
}
.field:focus-within .label {
color: var(--color-black);
}
.control {
display: flex;
align-items: center;
width: 100%;
}
.control input {
border: 0;
outline: 0;
background: transparent;
font: inherit;
font-size: 16px;
font-weight: 300;
width: 100%;
color: var(--color-black);
}
.control input::placeholder {
color: #c8c8c8;
}
.caret {
position: absolute;
right: 14px;
bottom: 16px;
width: 10px;
height: 12px;
opacity: 0.5;
border: 0;
background: transparent;
padding: 0;
cursor: pointer;
}
.caret img {
width: 10px;
height: 12px;
transform: rotate(90deg);
transition: transform 0.15s ease;
}
.caretOpen img {
transform: rotate(-90deg);
}
.dropdown {
position: absolute;
z-index: 30;
top: calc(100% + 6px);
inset-inline: 0;
max-height: 280px;
overflow: auto;
border: 1px solid #eee;
border-radius: 5px;
background: #fff;
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.list {
list-style: none;
margin: 0;
padding: 6px 0;
}
.node {
margin: 0;
}
.row {
display: flex;
align-items: center;
gap: 2px;
min-height: 36px;
}
.expand,
.expandSpacer {
flex: 0 0 22px;
width: 22px;
height: 22px;
}
.expand {
display: inline-grid;
place-items: center;
border: 1px solid #e8e8e8;
border-radius: 3px;
background: #fff;
color: #989898;
font-size: 14px;
font-weight: 300;
line-height: 1;
cursor: pointer;
}
.expand:hover,
.expand:focus-visible {
border-color: var(--color-black);
color: var(--color-black);
}
.option {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px 6px 4px;
border: none;
background: transparent;
text-align: start;
font: inherit;
font-size: 14px;
font-weight: 300;
color: var(--color-muted);
cursor: pointer;
border-radius: 4px;
}
.option:hover,
.option:focus-visible {
background: #f7f7f7;
color: var(--color-black);
}
.optionActive {
color: var(--color-black);
}
.check {
flex: 0 0 14px;
width: 14px;
font-size: 11px;
line-height: 1;
color: var(--color-black);
}
.optionLabel {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.empty,
.status {
margin: 0;
padding: 16px 14px;
font-size: 13px;
font-weight: 300;
color: var(--color-body);
}
.error {
margin: 0;
font-size: 12px;
font-weight: 300;
color: #b42318;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 8px;
border: 1px solid var(--color-black);
border-radius: 4px;
padding: 5px 10px;
font-size: 12px;
font-weight: 300;
color: var(--color-white);
background: var(--color-black);
cursor: pointer;
}
.chip:hover,
.chip:focus-visible {
opacity: 0.88;
}
.chip:disabled {
opacity: 0.4;
cursor: not-allowed;
}