Display: Fix dropdown styles

pull/5401/head
Angel Fernando Quiroz Campos 1 year ago
parent 82c9456ea1
commit 39a26f5cb6
  1. 106
      assets/css/scss/atoms/_dropdown.scss

@ -1,93 +1,71 @@
.p-dropdown, .p-multiselect { .p-dropdown, .p-multiselect {
@apply border border-support-3 bg-white rounded-lg transition w-full duration-200 @apply inline-flex cursor-pointer relative select-none
border border-support-3 bg-white rounded-lg transition w-full duration-200
hover:border-primary hover:text-gray-90 hover:outline-0 hover:outline-none; hover:border-primary hover:text-gray-90 hover:outline-0 hover:outline-none;
&.p-dropdown-clearable { .p-dropdown-panel, .p-autocomplete-panel, .p-multiselect-panel {
.p-dropdown-label { @apply min-w-full;
//padding-right: nth($inputPadding, 2) + $primeIconFontSize;
}
} }
.p-dropdown-label, .p-multiselect-label { &.p-invalid.p-component {
@apply bg-transparent border-none @apply border-error text-error;
focus:outline-0 focus:outline-none;
&.p-placeholder {
//color: $inputPlaceholderTextColor;
}
} }
}
.p-dropdown-trigger { .p-dropdown-clear-icon {
@apply bg-transparent rounded-r-lg w-12; @apply absolute top-1/2 -mt-2;
} }
.p-dropdown-clear-icon { .p-dropdown-trigger {
} @apply flex items-center justify-center flex-shrink-0
bg-transparent rounded-r-lg w-9;
}
&.p-invalid.p-component { .p-dropdown-label, .p-multiselect-label {
@apply border-error text-error; @apply block whitespace-nowrap overflow-hidden flex-1 w-[1%] overflow-ellipsis cursor-pointer
} bg-transparent border-none
focus:outline-0 focus:outline-none;
} }
.p-dropdown-panel, .p-autocomplete-panel, .p-multiselect-panel { .p-dropdown-label-empty {
@apply bg-white rounded-lg text-gray-90 shadow-lg; @apply overflow-hidden opacity-0;
}
.p-dropdown-header {
//padding: $inputListHeaderPadding;
//border-bottom: $inputListHeaderBorder;
//color: $inputListHeaderTextColor;
//background: $inputOverlayHeaderBg;
//margin: $inputListHeaderMargin;
//border-top-right-radius: $borderRadius;
//border-top-left-radius: $borderRadius;
.p-dropdown-filter {
//padding-right: nth($inputPadding, 2) + $primeIconFontSize;
//margin-right: -1 * (nth($inputPadding, 2) + $primeIconFontSize);
}
.p-dropdown-filter-icon { .p-dropdown-panel, .p-autocomplete-panel, .p-multiselect-panel {
//right: nth($inputPadding, 2); @apply absolute min-w-full top-2 left-0
//color: $inputIconColor; bg-white rounded-lg text-gray-90 drop-shadow-lg;
}
}
.p-dropdown-items { .p-dropdown-items {
@apply py-1.5; @apply rounded-lg
after:content-[""] after:w-full after:block after:h-3 after:sticky after:bg-white after:z-[2] after:bottom-0 after:rounded-b-lg
before:content-[""] before:w-full before:block before:h-3 before:sticky before:bg-white before:z-[2] before:top-0 before:rounded-b-lg;
.p-dropdown-item { .p-dropdown-item {
@apply px-4 py-2 transition text-body-2 outline-0 outline-none text-gray-90; @apply px-4 py-2 transition text-body-2 outline-0 outline-none text-gray-90;
&.p-highlight { &.p-highlight {
@apply bg-support-3 text-support-4; @apply bg-support-3 text-primary;
&.p-focus {
}
} }
&:not(.p-highlight):not(.p-disabled) { &.p-focus {
&.p-focus, @apply text-primary;
&:hover {
@apply bg-support-1;
}
} }
} }
}
}
.p-dropdown-item-group { .p-dropdown-items-wrapper {
//margin: $submenuHeaderMargin; @apply overflow-auto rounded-lg;
//padding: $submenuHeaderPadding; }
//color: $submenuHeaderTextColor;
//background: $submenuHeaderBg;
//font-weight: $submenuHeaderFontWeight;
}
.p-dropdown-empty-message { .p-dropdown-item {
//padding: $inputListItemPadding; @apply cursor-pointer whitespace-nowrap relative overflow-hidden flex items-center;
//color: $inputListItemTextColor;
//background: $inputListItemBg;
}
}
} }
.p-dropdown-items {
@apply m-0 p-0 list-none;
}
.p-multiselect-label-container { .p-multiselect-label-container {
@apply p-2; @apply p-2;
} }

Loading…
Cancel
Save