UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

272 lines (271 loc) 8.49 kB
.x-dropdown { font: var(--td-font-body-medium); box-sizing: border-box; margin: 0; padding: 0; list-style: none; background-color: var(--td-bg-color-container); font-size: var(--td-font-size-body-medium); color: var(--td-text-color-primary); position: relative; box-shadow: var(--td-shadow-2); border: 0.5px solid var(--td-component-border); border-radius: var(--td-radius-medium); } .x-dropdown__menu { scrollbar-color: var(--td-scrollbar-color) transparent; scrollbar-width: thin; display: flex; justify-content: flex-start; flex-direction: column; border-radius: var(--td-radius-medium); padding: var(--td-pop-padding-m); gap: 2px; overflow-y: auto; overflow-x: hidden; } .x-dropdown__menu::-webkit-scrollbar { width: 8px; height: 8px; } .x-dropdown__menu::-webkit-scrollbar-thumb { border: 2px solid transparent; background-clip: content-box; background-color: var(--td-scrollbar-color); border-radius: 15px; } .x-dropdown__menu::-webkit-scrollbar-thumb:vertical:hover, .x-dropdown__menu::-webkit-scrollbar-thumb:horizontal:hover { background-color: var(--td-scrollbar-hover-color); } .x-dropdown__menu .x-divider { margin: var(--td-comp-margin-xs) var(--td-comp-margin-s) var(--td-comp-margin-xxs) var(--td-comp-margin-s); color: var(--td-brand-color-light); width: calc(100% - var(--td-comp-margin-s) * 2); } .x-dropdown__menu--right .x-dropdown__item-direction { margin: 0 0 0 var(--td-comp-margin-s); } .x-dropdown__menu--left .x-dropdown__item { justify-content: right; } .x-dropdown__menu--left .x-dropdown__item-text { text-align: right; } .x-dropdown__menu--left .x-dropdown__item-direction { margin: 0 var(--td-comp-margin-s) 0 0; } .x-dropdown__menu--overflow .x-dropdown__submenu-wrapper--right { left: calc(100% - 14px); } .x-dropdown__menu--overflow .x-dropdown__submenu-wrapper--left { right: calc(100% - 14px); } .x-dropdown__submenu { scrollbar-color: var(--td-scrollbar-color) transparent; scrollbar-width: thin; background-color: var(--td-bg-color-container); box-shadow: var(--td-shadow-2); border-radius: var(--td-radius-medium); border: 0.5px solid var(--td-component-border); z-index: 1100; position: absolute; padding: var(--td-pop-padding-m); display: none; overflow-y: auto; overflow-x: visible; } .x-dropdown__submenu::-webkit-scrollbar { width: 8px; height: 8px; } .x-dropdown__submenu::-webkit-scrollbar-thumb { border: 2px solid transparent; background-clip: content-box; background-color: var(--td-scrollbar-color); border-radius: 15px; } .x-dropdown__submenu::-webkit-scrollbar-thumb:vertical:hover, .x-dropdown__submenu::-webkit-scrollbar-thumb:horizontal:hover { background-color: var(--td-scrollbar-hover-color); } .x-dropdown__submenu ul { list-style: none; display: grid; padding-left: 0; gap: 2px; } .x-dropdown__submenu--disabled { visibility: hidden; } .x-dropdown__submenu-wrapper--right { left: calc(100% - 6px); } .x-dropdown__submenu-wrapper--right .x-dropdown__item-direction { margin: 0 0 0 var(--td-comp-margin-s); } .x-dropdown__submenu-wrapper--left { right: calc(100% - 6px); } .x-dropdown__submenu-wrapper--left .x-dropdown__item { justify-content: right; } .x-dropdown__submenu-wrapper--left .x-dropdown__item-text { text-align: right; } .x-dropdown__submenu-wrapper--left .x-dropdown__item-direction { margin: 0 var(--td-comp-margin-s) 0 0; } .x-dropdown__item { border-radius: var(--td-radius-default); font: var(--td-font-body-medium); cursor: pointer; user-select: none; outline: none; transition: background-color 0.2s cubic-bezier(0.82, 0, 1, 0.9); white-space: nowrap; display: flex; align-items: center; padding: calc(var(--td-comp-paddingTB-xs) - 1px) var(--td-comp-paddingLR-s); --ripple-color: var(--td-bg-color-container-active); } .x-dropdown__item-icon { display: flex; color: currentcolor; margin-right: var(--td-comp-margin-s); font-size: var(--td-font-size-body-large); } .x-dropdown__item:hover > div > div { display: flex; } .x-dropdown__item--disabled { cursor: not-allowed; } .x-dropdown__item-content { display: flex; flex: 1; align-items: center; justify-content: space-between; max-width: 100%; } .x-dropdown__item-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .x-dropdown__item.x-dropdown__item--suffix .x-dropdown__item-sub-icon { color: currentcolor; font-size: var(--td-font-size-body-large); flex-shrink: 0; } .x-dropdown__item--theme-default { color: var(--td-text-color-primary); } .x-dropdown__item--theme-default:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-default:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-default.x-dropdown__item--active { color: var(--td-brand-color); background-color: var(--td-brand-color-light); } .x-dropdown__item--theme-default.x-dropdown__item--active:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-default.x-dropdown__item--active:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-default.x-dropdown__item--disabled { color: var(--td-text-color-disabled); } .x-dropdown__item--theme-default.x-dropdown__item--disabled:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-default.x-dropdown__item--suffix:hover { background-color: var(--td-brand-color-light); color: var(--td-brand-color); } .x-dropdown__item--theme-success { color: var(--td-success-color); } .x-dropdown__item--theme-success:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-success:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-success.x-dropdown__item--active { background-color: var(--td-success-color-light); } .x-dropdown__item--theme-success.x-dropdown__item--active:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-success.x-dropdown__item--active:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-success.x-dropdown__item-disabled { color: var(--td-text-color-disabled); } .x-dropdown__item--theme-success.x-dropdown__item-disabled:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-success.x-dropdown__item--suffix:hover { background-color: var(--td-success-color-light); } .x-dropdown__item--theme-error { color: var(--td-error-color); } .x-dropdown__item--theme-error:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-error:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-error.x-dropdown__item--active { background-color: var(--td-error-color-light); } .x-dropdown__item--theme-error.x-dropdown__item--active:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-error.x-dropdown__item--active:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-error.x-dropdown__item--disabled { color: var(--td-text-color-disabled); } .x-dropdown__item--theme-error.x-dropdown__item--disabled:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-error.x-dropdown__item--suffix:hover { background-color: var(--td-error-color-light); } .x-dropdown__item--theme-warning { color: var(--td-warning-color); } .x-dropdown__item--theme-warning:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-warning:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-warning.x-dropdown__item--active { background-color: var(--td-warning-color-light); } .x-dropdown__item--theme-warning.x-dropdown__item--active:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-warning.x-dropdown__item--active:active { background-color: var(--td-bg-color-container-active); } .x-dropdown__item--theme-warning.x-dropdown__item--disabled { color: var(--td-text-color-disabled); } .x-dropdown__item--theme-warning.x-dropdown__item--disabled:hover { background-color: var(--td-bg-color-container-hover); } .x-dropdown__item--theme-warning.x-dropdown__item--suffix:hover { background-color: var(--td-warning-color-light); }