UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

510 lines (507 loc) 16.8 kB
/** * ATTENTION: This file is auto generated by using "styleFactory". * Do not change the content! * */ /* * Utilities */ /* * DrawerList component * */ /* * Utilities */ .eufemia-scope--10_104_0 .dnb-drawer-list { --drawer-list-height: 2rem; --drawer-list-padding-horizontal: 1rem; --drawer-list-focus-border-width: 0.125rem; --drawer-list-text-padding: 0.5rem; --drawer-list-height--small: 1.5rem; --drawer-list-height--medium: 2.5rem; --drawer-list-height--large: 3rem; --drawer-list-option-inner-background: var(--color-white); --drawer-list-list-background: var(--color-white); --drawer-list-list-line-height: var(--line-height-basis); --drawer-list-option-disabled-background: var(--color-white); --drawer-list-option-disabled-color: var(--color-black-20); --drawer-list-group-title-color: var(--color-black-80); --drawer-list-group-title-bg: var(--color-lavender); display: block; position: relative; width: inherit; min-width: inherit; font-size: var(--font-size-small); } .eufemia-scope--10_104_0 .dnb-drawer-list__portal { --drawer-list-width: 16rem; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal__style { position: absolute; transition: all 300ms var(--easing-default); } html[data-visual-test] .eufemia-scope--10_104_0 .dnb-drawer-list__portal__style { transition: none !important; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal__style { z-index: calc(var(--modal-z-index, 3200) + 300); } .eufemia-scope--10_104_0 .dnb-drawer-list__portal__style--fixed { position: fixed; } .eufemia-scope--10_104_0 .dnb-drawer-list__root { width: inherit; min-width: inherit; } .eufemia-scope--10_104_0 .dnb-drawer-list__root--portal { position: absolute; top: 0; left: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list__content { width: 100%; padding: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list__list { position: absolute; z-index: 3; top: 0; bottom: auto; left: 0; right: 0; width: inherit; min-width: inherit; margin: 0; padding: 0; font-size: var(--font-size-basis); line-height: var(--drawer-list-list-line-height); background-color: var(--drawer-list-list-background); transform: translateY(0); transition: transform 200ms, opacity 160ms ease-out; } .eufemia-scope--10_104_0 .dnb-spacing .dnb-drawer-list__options li.dnb-drawer-list__option { margin: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list__options { display: flex; flex-direction: column; width: 100%; margin: 0; max-height: 90vh; padding: 0; list-style: none; background-color: transparent; } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options { min-height: 2rem; max-height: 70vh; transition: max-height 300ms var(--easing-default); overflow-y: auto; overscroll-behavior: contain; } html:not([data-visual-test]) .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html:not([data-visual-test]) .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options { scroll-behavior: auto; } } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options { -webkit-overflow-scrolling: touch; -ms-overflow-style: auto; scrollbar-color: var(--scrollbar-thumb-color, #888) transparent; } @supports not (scrollbar-color: auto) { .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar:vertical { width: var(--scrollbar-track-width, 0.5rem); } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar:horizontal { height: var(--scrollbar-track-width, 0.5rem); } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar { border-radius: var(--scrollbar-thumb-width, 0.5rem); background-color: var(--scrollbar-track-color, #eee); } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb-color, #888); } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover-color, #666); } .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar-thumb { border-radius: var(--scrollbar-thumb-width, 0.5rem); } } @media (prefers-reduced-motion: reduce) { .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options { transition-duration: 0.01ms; } } html[data-visual-test] .eufemia-scope--10_104_0 .dnb-drawer-list--scroll .dnb-drawer-list__options, .eufemia-scope--10_104_0 .dnb-drawer-list--scroll.dnb-drawer-list--no-animation .dnb-drawer-list__options { transition: none !important; } .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__options { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__options { scroll-behavior: auto; } } .eufemia-scope--10_104_0 .dnb-drawer-list--no-scroll-animation .dnb-drawer-list__options { scroll-behavior: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list__group { padding: 0; margin: 0; list-style: none; } .eufemia-scope--10_104_0 .dnb-drawer-list__group-title { display: block; padding: 0.5rem 1rem; color: var(--drawer-list-group-title-color); background-color: var(--drawer-list-group-title-bg); font-weight: var(--font-weight-medium); } .eufemia-scope--10_104_0 .dnb-drawer-list__option { position: relative; cursor: pointer; margin: 0; padding: 0; color: inherit; outline: none; background-color: var(--color-white); } .eufemia-scope--10_104_0 .dnb-drawer-list__option__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; grid-template-rows: repeat(10, -webkit-min-content); grid-template-rows: repeat(10, min-content); outline: none; margin: 0; padding: 1rem; color: inherit; background-color: var(--drawer-list-option-inner-background); } .eufemia-scope--10_104_0 .dnb-drawer-list__option__inner > * { align-self: self-start; } .eufemia-scope--10_104_0 .dnb-drawer-list__option__item { display: block; text-overflow: ellipsis; grid-column: 1; } .eufemia-scope--10_104_0 .dnb-drawer-list__option__item--horizontal { display: flex; } .eufemia-scope--10_104_0 .dnb-drawer-list__option__item > .dnb-icon { vertical-align: initial; } .eufemia-scope--10_104_0 .dnb-drawer-list__option__item .dnb-anchor { display: inline-block; margin-right: 0.5rem; word-break: break-word; font-size: inherit; } @media screen and (min-width: 40.00625em) { .eufemia-scope--10_104_0 .dnb-drawer-list__option__suffix { grid-column: 2; grid-row: 1/-1; justify-self: end; align-self: center; } } .eufemia-scope--10_104_0 .dnb-drawer-list__option--ignore { cursor: default; pointer-events: none; } .eufemia-scope--10_104_0 .dnb-drawer-list__option[disabled] { --drawer-list-option-inner-background: var( --drawer-list-option-disabled-background ); color: var(--drawer-list-option-disabled-color); cursor: not-allowed; } .eufemia-scope--10_104_0 .dnb-drawer-list__triangle { position: absolute; top: calc(var(--drawer-list-focus-border-width) - var(--drawer-list-height) / 2); left: auto; right: 0; pointer-events: none; margin: 0 var(--drawer-list-padding-horizontal); width: calc(var(--drawer-list-height) / 2); height: calc(var(--drawer-list-height) / 2); z-index: -1; } .eufemia-scope--10_104_0 .dnb-drawer-list__triangle::before { content: ""; position: absolute; top: 0; left: 0; width: calc(var(--drawer-list-height) / 2); height: calc(var(--drawer-list-height) / 2); transform: translateY(60%) rotate(45deg); border: 1px solid var(--color-black-border); background-color: var(--color-white); } .eufemia-scope--10_104_0 .dnb-drawer-list--triangle-position-left .dnb-drawer-list__triangle { left: 0; right: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list--top .dnb-drawer-list__triangle { top: auto; bottom: calc(var(--drawer-list-focus-border-width) - var(--drawer-list-height) / 2 - 2px); transform: rotate(180deg); } .eufemia-scope--10_104_0 .dnb-drawer-list--top .dnb-drawer-list__triangle::before { transform: translateY(65%) rotate(45deg); } .eufemia-scope--10_104_0 .dnb-drawer-list--is-popup.dnb-drawer-list--right { position: absolute; left: auto; right: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list--is-popup.dnb-drawer-list--left .dnb-drawer-list__list { left: -0.5rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { right: -0.5rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__list { z-index: 100; display: flex; flex-direction: column; } .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__list:not(.dnb-drawer-list--opened .dnb-drawer-list__list--no-animation) { animation: drawer-list-slide-top-down 200ms ease-out 1 forwards; } html[data-visual-test] .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__list, .eufemia-scope--10_104_0 .dnb-drawer-list--opened .dnb-drawer-list__list--no-animation { animation-duration: 1ms !important; } .eufemia-scope--10_104_0 .dnb-drawer-list--hidden .dnb-drawer-list__list { display: none; } .eufemia-scope--10_104_0 .dnb-drawer-list--bottom .dnb-drawer-list__list { top: 0; bottom: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list--top .dnb-drawer-list__list { top: auto; bottom: var(--drawer-list-height); } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--bottom .dnb-drawer-list__list { top: var(--drawer-list-height); bottom: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--small .dnb-drawer-list__list { top: var(--drawer-list-height--small); } .eufemia-scope--10_104_0 .dnb-drawer-list--small.dnb-drawer-list--top .dnb-drawer-list__list { bottom: var(--drawer-list-height--small); } .eufemia-scope--10_104_0 .dnb-drawer-list--small.dnb-drawer-list--is-popup.dnb-drawer-list--left .dnb-drawer-list__list { left: -0.75rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--small.dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { right: -0.75rem; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--medium .dnb-drawer-list__list { top: var(--drawer-list-height--medium); } .eufemia-scope--10_104_0 .dnb-drawer-list--medium.dnb-drawer-list--top .dnb-drawer-list__list { bottom: var(--drawer-list-height--medium); } .eufemia-scope--10_104_0 .dnb-drawer-list--medium.dnb-drawer-list--is-popup.dnb-drawer-list--left .dnb-drawer-list__list { left: -0.25rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--medium.dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { right: -0.25rem; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--large .dnb-drawer-list__list { top: var(--drawer-list-height--large); } .eufemia-scope--10_104_0 .dnb-drawer-list--large.dnb-drawer-list--top .dnb-drawer-list__list { bottom: var(--drawer-list-height--large); } .eufemia-scope--10_104_0 .dnb-drawer-list--large .dnb-drawer-list__triangle { margin: 0 1.25rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--large.dnb-drawer-list--is-popup.dnb-drawer-list--left .dnb-drawer-list__list { left: -0.25rem; } .eufemia-scope--10_104_0 .dnb-drawer-list--large.dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { right: -0.25rem; } .eufemia-scope--10_104_0 .dnb-drawer-list { /* stylelint-disable-next-line */ } .eufemia-scope--10_104_0 .dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { left: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list__root > .dnb-drawer-list--right { position: absolute; right: 0; left: auto; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--right { right: 100%; } .eufemia-scope--10_104_0 .dnb-drawer-list__portal .dnb-drawer-list--top .dnb-drawer-list__list { top: auto; bottom: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list:not(.dnb-drawer-list--opened) .dnb-drawer-list__list:not(.dnb-drawer-list:not(.dnb-drawer-list--opened) .dnb-drawer-list__list--no-animation) { animation: drawer-list-slide-top-up 150ms ease-out 1 forwards; } html[data-visual-test] .eufemia-scope--10_104_0 .dnb-drawer-list:not(.dnb-drawer-list--opened) .dnb-drawer-list__list, .eufemia-scope--10_104_0 .dnb-drawer-list:not(.dnb-drawer-list--opened) .dnb-drawer-list__list--no-animation { animation-duration: 1ms !important; } .eufemia-scope--10_104_0 .dnb-drawer-list--action-menu .dnb-drawer-list__option__inner { flex-direction: row; justify-content: flex-start; align-items: center; } @media screen and (min-width: 40.00625em) { .eufemia-scope--10_104_0 .dnb-drawer-list--action-menu.dnb-drawer-list--is-popup.dnb-drawer-list--left .dnb-drawer-list__list { left: 0; } .eufemia-scope--10_104_0 .dnb-drawer-list--action-menu.dnb-drawer-list--is-popup.dnb-drawer-list--right .dnb-drawer-list__list { right: 0; } } @keyframes drawer-list-scale-in { from { opacity: 0; transform: scale(0.8) translateX(calc(1px - var(--drawer-list-width))); } to { opacity: 1; transform: scale(1) translateX(0); } } @keyframes drawer-list-scale-out { from { opacity: 1; transform: scale(1) translateX(0); } to { opacity: 0; transform: scale(0.8) translateX(calc(1px - var(--drawer-list-width))); } } @keyframes drawer-list-slide-top-down { from { opacity: 0; transform: translateY(calc(1px - var(--drawer-list-height))); pointer-events: none; } to { opacity: 1; transform: translateY(0); pointer-events: auto; } } @keyframes drawer-list-slide-top-up { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(calc(1px - var(--drawer-list-height))); } } @keyframes drawer-list-slide-bottom-down { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(calc(1px + var(--drawer-list-height))); } } @keyframes drawer-list-slide-bottom-up { from { opacity: 0; transform: translateY(calc(1px + var(--drawer-list-height))); pointer-events: none; } to { opacity: 1; transform: translateY(0); pointer-events: auto; } } /* * ScrollView component * */ /* * Utilities */ .eufemia-scope--10_104_0 .dnb-scroll-view { overflow-x: auto; overflow-y: auto; overscroll-behavior: contain; } html:not([data-visual-test]) .eufemia-scope--10_104_0 .dnb-scroll-view { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html:not([data-visual-test]) .eufemia-scope--10_104_0 .dnb-scroll-view { scroll-behavior: auto; } } .eufemia-scope--10_104_0 .dnb-scroll-view { -webkit-overflow-scrolling: touch; -ms-overflow-style: auto; scrollbar-color: var(--scrollbar-thumb-color, #888) transparent; } @supports not (scrollbar-color: auto) { .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar:vertical { width: var(--scrollbar-track-width, 0.5rem); } .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar:horizontal { height: var(--scrollbar-track-width, 0.5rem); } .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar { border-radius: var(--scrollbar-thumb-width, 0.5rem); background-color: var(--scrollbar-track-color, #eee); } .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb-color, #888); } .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover-color, #666); } .eufemia-scope--10_104_0 .dnb-scroll-view::-webkit-scrollbar-thumb { border-radius: var(--scrollbar-thumb-width, 0.5rem); } } .eufemia-scope--10_104_0 .dnb-scroll-view { overscroll-behavior: auto; } .eufemia-scope--10_104_0 .dnb-scroll-view[tabindex="0"]:focus { outline: none; outline: none; } html[data-whatinput=keyboard] .eufemia-scope--10_104_0 .dnb-scroll-view[tabindex="0"]:focus { --border-color: var(--focus-ring-color); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; } .eufemia-scope--10_104_0 .dnb-text-counter .dnb-icon { margin-right: 0; font-size: 0; transition: margin 200ms var(--easing-default), font-size 400ms var(--easing-default); } .eufemia-scope--10_104_0 .dnb-text-counter--exceeded .dnb-icon { margin-right: 0.5rem; font-size: var(--font-size-basis--em); }