Нужно сюда в библиотечный компонент: @import '@styles'; .select-divider-container {…
- User
Нужно сюда в библиотечный компонент: @import '@styles';
.select-divider-container { display: flex; justify-content: center; }
.select-divider { margin: 4px 0; padding: 0 8px; height: 1px; width: 100%; background-color: $neutral-200; }
.select-dropdown { padding: 0 12px; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: $neutral-500;
&-part { display: flex; align-items: center; gap: 8px; button { color: $secondary-500; } } button { padding: 4px 8px; border: 1px solid $neutral-200; border-radius: 8px; box-shadow: 0 2px 4px 0 rgb(82 88 102 / 6%); background: transparent; cursor: pointer; @include P4; @include button-shadow-neutral; } svg path { fill: $neutral-400; }}
.select-option { display: flex; align-items: center; justify-content: space-between;
svg path { fill: $neutral-400; } span { @include P4; }}
.select-option-part { display: flex; align-items: center; gap: 8px;
&.multiple-option { width: 92%; overflow: hidden; }}
.select-option-suffix { display: flex; align-items: center;
svg path { fill: $blue-300; }}
.ant-select-multiple.select { .ant-select-selection-placeholder { padding: 0 9px !important; } }
.ant-select-single.select, .ant-select-multiple.select { width: 100%; border-radius: 8px; border-color: $neutral-300; box-shadow: 0 2px 4px 0 rgb(82 88 102 / 6%);
.ant-select-selector { padding: 0 36px 0 12px !important; // min-height: 40px !important; } svg path { fill: $neutral-400; } & .ant-select-selection-placeholder { color: $neutral-400; } &:not(.ant-select-disabled, .ant-select-open):hover .ant-select-selector { border-color: $neutral-300 !important; background: $neutral-100; } &.ant-select-focused.ant-select:not( .ant-select-disabled, .ant-select-customize-input, .ant-pagination-size-changer, .ant-select-status-error ) .ant-select-selector { outline: $neutral-0 solid 2px; border: 1px solid $blue-300; background: $neutral-0; box-shadow: 0 0 0 4.66px rgb(194 214 255), 0 0 0 1.33px rgb(255 255 255) !important; } &.ant-select-open { & > .ant-select-arrow { transform: rotate(180deg); svg path { fill: $neutral-900; } } } &.ant-select-open .ant-select-selection-item { color: $neutral-400; } &.ant-select-disabled { color: $neutral-300 !important; background-color: $neutral-100 !important; border: $neutral-200; box-shadow: none; & .ant-select-selection-placeholder { color: $neutral-300; } svg path { fill: $neutral-300; } }}
.ant-select-focused.ant-select-outlined.ant-select-status-error:not( .ant-select-disabled, .ant-select-customize-input, .ant-pagination-size-changer ) .ant-select-selector { box-shadow: none; border-color: $red-300 !important; }
.ant-select-outlined.ant-select-status-error:not(.ant-select-customize-input) .ant-select-selector { border-color: $red-300; }
.ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector { background: none !important; }
.ant-select-item-option { padding: 0 8px; height: 40px; display: flex; align-items: center;
&:hover { background-color: $neutral-100 !important; }}
.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state { display: none; }
.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { background: none !important;
svg path { fill: $blue-300; } &:hover { background-color: $neutral-100 !important; }}
.ant-select-dropdown .ant-select-item-option { background: none; }
.ant-select-item-option-state { display: none; }
.ant-select-multiple .ant-select-selection-overflow { padding: 4px 0; max-width: 90%; display: flex; gap: 4px; }
.ant-select-single.ant-select-show-arrow .ant-select-selection-item { display: flex; }
.ant-select-multiple.ant-select-sm { min-height: 34px; }
добавить стили: .ant-select-selection-overflow-item.ant-select-selection-overflow-item-rest { height: 24px;
.ant-select-selection-item { height: 24px; border-radius: 4px; .ant-select-selection-item-content { display: flex; align-items: center; } } } - Assistant
Ниже привела полный фрагмент со-всеми вашими стилями и добавленным блоком для «rest»-тега.
Я вставила его сразу после стилей.ant-select-multiple .ant-select-selection-overflow { … }, — так будет логичнее, потому что «rest»-тег появляется именно внутри multiple-селекта.@import '@styles'; .select-divider-container { display: flex; justify-content: center; } .select-divider { margin: 4px 0; padding: 0 8px; height: 1px; width: 100%; background-color: $neutral-200; } .select-dropdown { padding: 0 12px; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: $neutral-500; &-part { display: flex; align-items: center; gap: 8px; button { color: $secondary-500; } } button { padding: 4px 8px; border: 1px solid $neutral-200; border-radius: 8px; box-shadow: 0 2px 4px 0 rgb(82 88 102 / 6%); background: transparent; cursor: pointer; @include P4; @include button-shadow-neutral; } svg path { fill: $neutral-400; } } .select-option { display: flex; align-items: center; justify-content: space-between; svg path { fill: $neutral-400; } span { @include P4; } } .select-option-part { display: flex; align-items: center; gap: 8px; &.multiple-option { width: 92%; overflow: hidden; } } .select-option-suffix { display: flex; align-items: center; svg path { fill: $blue-300; } } /* ---------- Ant Select overrides ---------- */ .ant-select-multiple.select { .ant-select-selection-placeholder { padding: 0 9px !important; } } .ant-select-single.select, .ant-select-multiple.select { width: 100%; border-radius: 8px; border-color: $neutral-300; box-shadow: 0 2px 4px 0 rgb(82 88 102 / 6%); .ant-select-selector { padding: 0 36px 0 12px !important; // min-height: 40px !important; } svg path { fill: $neutral-400; } & .ant-select-selection-placeholder { color: $neutral-400; } &:not(.ant-select-disabled, .ant-select-open):hover .ant-select-selector { border-color: $neutral-300 !important; background: $neutral-100; } &.ant-select-focused.ant-select:not( .ant-select-disabled, .ant-select-customize-input, .ant-pagination-size-changer, .ant-select-status-error ) .ant-select-selector { outline: $neutral-0 solid 2px; border: 1px solid $blue-300; background: $neutral-0; box-shadow: 0 0 0 4.66px rgb(194 214 255), 0 0 0 1.33px rgb(255 255 255) !important; } &.ant-select-open { & > .ant-select-arrow { transform: rotate(180deg); svg path { fill: $neutral-900; } } } &.ant-select-open .ant-select-selection-item { color: $neutral-400; } &.ant-select-disabled { color: $neutral-300 !important; background-color: $neutral-100 !important; border: $neutral-200; box-shadow: none; & .ant-select-selection-placeholder { color: $neutral-300; } svg path { fill: $neutral-300; } } } .ant-select-focused.ant-select-outlined.ant-select-status-error:not( .ant-select-disabled, .ant-select-customize-input, .ant-pagination-size-changer ) .ant-select-selector { box-shadow: none; border-color: $red-300 !important; } .ant-select-outlined.ant-select-status-error:not(.ant-select-customize-input) .ant-select-selector { border-color: $red-300; } .ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector { background: none !important; } .ant-select-item-option { padding: 0 8px; height: 40px; display: flex; align-items: center; &:hover { background-color: $neutral-100 !important; } } .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state { display: none; } .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { background: none !important; svg path { fill: $blue-300; } &:hover { background-color: $neutral-100 !important; } } .ant-select-dropdown .ant-select-item-option { background: none; } .ant-select-item-option-state { display: none; } /* ------------- Multiple select chips -------------- */ .ant-select-multiple .ant-select-selection-overflow { padding: 4px 0; max-width: 90%; display: flex; gap: 4px; } /* ➕ Новый блок для “+N” (rest) тега */ .ant-select-multiple .ant-select-selection-overflow-item.ant-select-selection-overflow-item-rest { height: 24px; .ant-select-selection-item { height: 24px; border-radius: 4px; .ant-select-selection-item-content { display: flex; align-items: center; } } } .ant-select-single.ant-select-show-arrow .ant-select-selection-item { display: flex; } .ant-select-multiple.ant-select-sm { min-height: 34px; }После компиляции SCSS «rest»-тег (
+2,+3и т. д.) будет аккуратным «чипом» такой же высоты, как и остальные выбранные элементы.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.