2021-05-17 20:34:14 +00:00
|
|
|
@import '../variables.less';
|
|
|
|
@import '../mixins.less';
|
|
|
|
|
|
|
|
.citizen-typeahead {
|
|
|
|
position: absolute;
|
2021-05-17 21:58:48 +00:00
|
|
|
overflow: auto;
|
2021-05-17 20:34:14 +00:00
|
|
|
width: 100%;
|
2023-01-16 22:36:45 +00:00
|
|
|
max-height: ~'calc( var( --header-card-maxheight ) - var( --height-search-bar ) )';
|
2021-05-17 20:34:14 +00:00
|
|
|
box-sizing: border-box;
|
2023-03-01 20:02:34 +00:00
|
|
|
border-radius: 0 0 var( --border-radius--medium ) var( --border-radius--medium );
|
|
|
|
border-top: 0; // Reset citizen-card style
|
|
|
|
margin: 0; // Reset <ol> styles
|
2022-12-18 06:09:42 +00:00
|
|
|
overscroll-behavior: contain;
|
2023-03-01 20:02:34 +00:00
|
|
|
.citizen-card( false );
|
2022-05-12 02:06:33 +00:00
|
|
|
.citizen-card-hide( 50% 0, Y, false );
|
2022-05-02 01:35:33 +00:00
|
|
|
// Well this won't be loaded before .citizen-animation-ready anyways
|
|
|
|
.citizen-card-transition();
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&__item {
|
2022-12-06 17:01:47 +00:00
|
|
|
.citizen-typeahead {
|
2022-12-14 04:52:54 +00:00
|
|
|
&__thumbnail {
|
|
|
|
margin-right: var( --space-sm );
|
|
|
|
|
|
|
|
&.citizen-ui-icon {
|
|
|
|
width: 100%; // reset width
|
|
|
|
}
|
2022-12-06 17:01:47 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&__text {
|
|
|
|
white-space: nowrap;
|
2022-12-06 17:01:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&--active {
|
|
|
|
background-color: var( --background-color-primary--hover );
|
2021-05-17 20:34:14 +00:00
|
|
|
}
|
2022-12-06 17:01:47 +00:00
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&--hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-12-06 19:27:08 +00:00
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&--placeholder {
|
|
|
|
.citizen-typeahead {
|
|
|
|
&__content {
|
|
|
|
flex-direction: column;
|
|
|
|
padding: var( --space-xl ) 0;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2022-12-06 17:01:47 +00:00
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&__thumbnail {
|
|
|
|
margin-bottom: var( --space-sm );
|
2022-12-06 17:01:47 +00:00
|
|
|
}
|
|
|
|
}
|
2022-12-14 04:52:54 +00:00
|
|
|
}
|
2022-12-06 18:52:14 +00:00
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&--page {
|
|
|
|
.citizen-typeahead {
|
|
|
|
&__thumbnail {
|
|
|
|
background-color: #eaecf0;
|
|
|
|
background-position: center;
|
|
|
|
background-size: cover;
|
|
|
|
|
|
|
|
&.citizen-ui-icon {
|
|
|
|
height: 60px;
|
|
|
|
background-color: var( --color-surface-3 );
|
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
&::before {
|
2022-12-14 04:52:54 +00:00
|
|
|
background-size: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-12-06 18:52:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-14 04:52:54 +00:00
|
|
|
&--tool {
|
|
|
|
.citizen-typeahead {
|
|
|
|
&__content {
|
2022-12-14 15:28:45 +00:00
|
|
|
padding: var( --space-sm ) 0;
|
2022-12-14 04:52:54 +00:00
|
|
|
border-top: 1px solid var( --border-color-base );
|
|
|
|
}
|
|
|
|
|
|
|
|
&__thumbnail {
|
|
|
|
height: var( --size-icon );
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
2022-12-14 15:28:45 +00:00
|
|
|
|
|
|
|
&__description {
|
|
|
|
color: var( --color-base );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ .citizen-typeahead__item--tool {
|
|
|
|
.citizen-typeahead__content {
|
|
|
|
border-top: 0;
|
|
|
|
}
|
2022-12-14 04:52:54 +00:00
|
|
|
}
|
2022-12-06 17:01:47 +00:00
|
|
|
}
|
2022-12-04 07:13:37 +00:00
|
|
|
}
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__content {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-12-05 20:29:17 +00:00
|
|
|
padding: var( --space-xs ) 0;
|
|
|
|
margin: 0 var( --space-sm );
|
2022-12-04 07:13:37 +00:00
|
|
|
color: var( --color-base );
|
|
|
|
}
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__thumbnail {
|
|
|
|
overflow: hidden;
|
2022-12-06 17:01:47 +00:00
|
|
|
width: 100%;
|
|
|
|
max-width: 70px;
|
2022-12-04 07:13:37 +00:00
|
|
|
height: 60px;
|
2022-12-08 18:21:07 +00:00
|
|
|
flex-shrink: 0;
|
2022-12-04 07:13:37 +00:00
|
|
|
border-radius: var( --border-radius--medium );
|
2022-12-03 19:12:01 +00:00
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
&.citizen-ui-icon::before {
|
2022-12-06 19:27:08 +00:00
|
|
|
background-size: contain;
|
2022-05-20 23:10:36 +00:00
|
|
|
}
|
2022-12-04 07:13:37 +00:00
|
|
|
}
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__text {
|
|
|
|
overflow: hidden;
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
2022-05-20 23:10:36 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
2022-12-03 19:12:01 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__title {
|
|
|
|
flex-shrink: 0;
|
|
|
|
color: var( --color-base--emphasized );
|
|
|
|
font-weight: var( --font-weight-semibold );
|
|
|
|
}
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__highlight {
|
|
|
|
color: var( --color-base--subtle );
|
|
|
|
font-weight: var( --font-weight-medium );
|
|
|
|
}
|
|
|
|
|
2022-12-13 23:25:14 +00:00
|
|
|
&__query {
|
|
|
|
color: var( --color-base--emphasized );
|
|
|
|
font-weight: var( --font-weight-semibold );
|
|
|
|
}
|
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__label {
|
|
|
|
display: flex;
|
|
|
|
margin-left: var( --space-xs );
|
|
|
|
color: var( --color-base );
|
|
|
|
font-size: 0.8125rem;
|
|
|
|
gap: var( --space-xxs );
|
2021-05-17 20:34:14 +00:00
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
.citizen-ui-icon {
|
|
|
|
width: 0.8125rem;
|
|
|
|
height: 0.8125rem;
|
|
|
|
margin-right: var( --space-xxs );
|
2021-05-17 20:34:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-04 07:13:37 +00:00
|
|
|
&__labelItem {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__description {
|
|
|
|
margin-top: 0.1rem;
|
|
|
|
color: var( --color-base--subtle );
|
|
|
|
font-size: 0.8125rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__title,
|
|
|
|
&__description {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
2022-12-06 17:01:47 +00:00
|
|
|
&__actions {
|
|
|
|
position: absolute;
|
|
|
|
right: var( --space-sm );
|
2021-05-17 20:34:14 +00:00
|
|
|
}
|
|
|
|
|
2022-12-05 20:52:36 +00:00
|
|
|
&__keyboard {
|
|
|
|
display: none;
|
|
|
|
padding: 0 8px;
|
|
|
|
border-radius: var( --border-radius--small );
|
|
|
|
background-color: var( --color-surface-1 );
|
|
|
|
}
|
|
|
|
|
2021-05-17 20:34:14 +00:00
|
|
|
&--expanded {
|
2022-05-02 02:53:41 +00:00
|
|
|
.citizen-card-show( false );
|
2021-05-17 20:34:14 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-28 21:02:15 +00:00
|
|
|
|
2022-12-05 20:52:36 +00:00
|
|
|
// HACK: This is as close as we can to detect whether there is a keyboard in CSS
|
|
|
|
@media ( hover: hover ) and ( pointer: fine ) {
|
|
|
|
.citizen-typeahead {
|
|
|
|
&__item--active {
|
|
|
|
.citizen-typeahead__keyboard {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-28 21:02:15 +00:00
|
|
|
// HACK: Hide default MW search suggestion if it somehow loaded
|
|
|
|
// This should be removed when we switch to vue search
|
|
|
|
.suggestions {
|
2022-11-08 05:25:40 +00:00
|
|
|
display: none !important;
|
2022-09-28 21:02:15 +00:00
|
|
|
}
|