| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- [data-component="select"] {
- &:disabled {
- opacity: 0.5;
- cursor: not-allowed;
- }
- &:focus {
- outline: none;
- box-shadow: 0 0 0 2px var(--color-primary);
- }
- [data-slot="section"] {
- font-size: var(--text-xs);
- line-height: var(--text-xs--line-height);
- font-weight: var(--font-weight-light);
- text-transform: uppercase;
- color: var(--text-default-text-weak);
- opacity: 0.6;
- margin-top: calc(var(--spacing) * 3);
- margin-left: calc(var(--spacing) * 2);
- &:first-child {
- margin-top: 0;
- }
- }
- [data-slot="item"] {
- position: relative;
- display: flex;
- align-items: center;
- padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2);
- border-radius: var(--radius-sm);
- font-size: var(--text-xs);
- line-height: var(--text-xs--line-height);
- color: var(--text-default-text);
- cursor: pointer;
- transition:
- background-color 0.2s ease-in-out,
- color 0.2s ease-in-out;
- outline: none;
- user-select: none;
- &[data-highlighted] {
- background-color: var(--surface-default-surface);
- }
- &[data-disabled] {
- pointer-events: none;
- opacity: 0.5;
- }
- [data-slot="item-indicator"] {
- margin-left: auto;
- }
- }
- [data-slot="trigger"] {
- [data-slot="value"] {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- [data-slot="icon"] {
- width: fit-content;
- height: fit-content;
- flex-shrink: 0;
- color: var(--text-default-text-weak);
- transition: transform 0.1s ease-in-out;
- }
- }
- }
- [data-component="select-content"] {
- min-width: 8rem;
- overflow: hidden;
- border-radius: var(--radius-md);
- border-width: 1px;
- border-style: solid;
- border-color: var(--border-default-border-weak);
- background-color: var(--surface-raised-surface-raised);
- padding: calc(var(--spacing) * 1);
- box-shadow: var(--shadow-md);
- z-index: 50;
- &[data-closed] {
- animation: select-close 0.15s ease-out;
- }
- &[data-expanded] {
- animation: select-open 0.15s ease-out;
- }
- [data-slot="list"] {
- overflow-y: auto;
- max-height: 12rem;
- white-space: nowrap;
- overflow-x: hidden;
- }
- }
- @keyframes select-open {
- from {
- opacity: 0;
- transform: scale(0.95);
- }
- to {
- opacity: 1;
- transform: scale(1);
- }
- }
- @keyframes select-close {
- from {
- opacity: 1;
- transform: scale(1);
- }
- to {
- opacity: 0;
- transform: scale(0.95);
- }
- }
|