/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ @use 'rose/variables/sizing'; @use 'rose/variables/media'; @use 'rose/utilities/type'; @import 'rose'; @import 'notify'; .rose-layout-centered { > .rose-layout-page { width: sizing.rems(l) * 18; } @media (max-width: media.width(small)) { display: block; > .rose-layout-page { width: auto; } } } /** * This section enables scrolling within the sidebar columns separately, * rather than the whole viewport. This ensures the sidebar and application * header remain visible when scrolling. */ .rose-layout-global { max-height: 100vh; .rose-layout-global-body { max-height: 100vh; overflow: auto; main { /** This overrides the main defined within Rose. * HDS has this set to 1.5rem top/bottom 3rem left/right. HDS assumes the usage of breadcrumbs * but the DC have no breadcrumbs, so we will keep it at 3rem all around. */ padding: 3rem; flex-grow: 1; } } .rose-layout-sidebar-sidebar, .rose-layout-sidebar-body { overflow-y: auto; } } .rose-nav-sidebar { margin-top: sizing.rems(xxl); + .rose-nav-sidebar { margin-top: 0; } .rose-icon { margin-right: sizing.rems(xs); } } .rose-form { &:not(.full-width) { width: 66%; } .rose-form-input { width: 100%; .rose-form-input-field { width: 100%; } } .rose-dropdown { $icon-width: sizing.rems(m) + sizing.rems(s); $indent: $icon-width + sizing.rems(xs); .rose-form-radio-label { display: flex; .rose-icon { padding-right: sizing.rems(xxs); } } .rose-icon { margin-right: sizing.rems(xxs); margin-left: sizing.rems(xxs); } .indent-label-1 { .rose-form-radio-label, .rose-form-checkbox-label { padding-left: $indent; } } .indent-label-2 { .rose-form-radio-label, .rose-form-checkbox-label { padding-left: $indent * 1.5; } } .is-project { .rose-icon { visibility: hidden; } } } fieldset { margin-bottom: sizing.rems(m); legend { @extend .rose-form-label; } } } .rose-table { p { margin-bottom: 0; } .rose-form-checkbox { margin-bottom: 0; .rose-form-checkbox-label-text { color: var(--stark); text-decoration: underline; } } } .rose-header { -webkit-app-region: drag; min-height: sizing.rems(l) * 2; position: relative; -webkit-user-select: none; .rose-header-brand, .rose-header-nav, .rose-header-utilities .rose-dropdown, .rose-header-utilities button { -webkit-app-region: no-drag; } &.header-cushion { padding-left: sizing.rems(l) * 3; } .button-window-minimize, .button-window-fullscreen, .button-window-close { background: transparent; border: transparent; color: var(--white); margin: sizing.rems(xs); } .logotype { display: none; } .rose-dropdown { .rose-icon { transform: scale(0.7); } } &.loading { &::after { animation: gradient 1s linear infinite; background: repeating-linear-gradient( to right, var(--subtle), var(--subtle), var(--info), var(--subtle), var(--subtle) ); background-position: -100% 0; background-size: 200% auto; content: ' '; height: 3px; left: 0; position: absolute; right: 0; top: 100%; @keyframes gradient { 0% { background-position: -100% 0; } 100% { background-position: -200% 0; } } } } } .copyable { white-space: nowrap; .copyable-button { margin: 0; padding: 0 sizing.rems(xxs); top: -2px; } mark { animation: fadeBackground 0.75s linear; background-color: transparent; color: inherit; @keyframes fadeBackground { 0% { background-color: var(--action-subtler-1); } 100% { background-color: transparent; } } } } [class*='session-status-'] { color: var(--ui-gray-subtler-2); } .nowrap { white-space: nowrap; } .branded-card { border: 1px solid var(--ui-border-subtler-1); border-radius: sizing.rems(xxxs); margin: 0 auto; margin-top: sizing.rems(l) * 1.25; padding: (sizing.rems(l) * 4) (sizing.rems(l) * 3) (sizing.rems(l) * 2) (sizing.rems(l) * 3); position: relative; width: sizing.rems(l) * 26; &::before { background-color: var(--black); background-image: url('/brand-background.svg'); background-position: right; background-repeat: no-repeat; border-top-left-radius: sizing.rems(xxxs); border-top-right-radius: sizing.rems(xxxs); content: ' '; height: sizing.rems(l) * 3.25; left: 0; position: absolute; right: 0; top: 0; } &::after { background-image: url('/logo-app-full.svg'); background-position: (sizing.rems(l) * 2.5) 50%; background-repeat: no-repeat; background-size: sizing.rems(l) * 8; content: ' '; height: sizing.rems(l) * 3.25; left: 0; position: absolute; right: 0; top: 0; } .branded-card-title { margin-bottom: 0; } .branded-card-description { margin-bottom: sizing.rems(l); } } @media (width <= (media.width(medium))) { .branded-card { max-width: 100%; width: auto; } } .change-origin { @include type.type(s); color: var(--ui-border-starker-1); margin: sizing.rems(l) 0 0 0; text-align: center; } // Dialog Detail // These styles are a Work In Progress. Expect changes (lots of them) .rose-dialog, .dialog-detail { z-index: 6000; } .dialog-detail { .rose-notification { border-left: 0; border-right: 0; border-top: 0; box-shadow: none; margin-bottom: 0; } .rose-dialog-body { > :first-child { margin-top: 0; padding-top: 0; } } .rose-dialog-footer { align-items: center; div:nth-child(1) { display: flex; justify-content: flex-start; width: 50%; } div:nth-child(2) { display: flex; justify-content: flex-end; width: 50%; } } } // Overlay above everything - including notifications .rose-dialog-modal-overlay { z-index: 5500; } // Reveal component (app/components/reveal) $chevron-up: url("data:image/svg+xml;utf-8,"); $chevron-down: url("data:image/svg+xml;utf-8,"); .reveal { --trigger-color: var(--action); .reveal-trigger { background: url($chevron-down) no-repeat right center; color: var(--trigger-color); cursor: default; display: inline-block; overflow: hidden; padding-right: sizing.rems(l); white-space: nowrap; // Hide default twistie triangle // Firefox list-style-type: none; // Webkit / Chromium &::-webkit-details-marker { display: none; } &::marker { display: none; } &:hover { --trigger-color: var(--action-starker-1); } } &:not([open]) { .reveal-trigger-text-close { background: $chevron-down no-repeat right center; padding-right: sizing.rems(l); } .reveal-trigger-text-open { display: none; } } &[open] { .reveal-trigger-text-open { background: $chevron-up no-repeat right center; padding-right: sizing.rems(l); } .reveal-trigger-text-close { display: none; } pre { white-space: pre-wrap; word-break: break-all; } } } // Card component (app/components/card) .card { border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3); display: flex; flex-direction: column; margin-bottom: sizing.rems(m); .card-header { align-items: center; border-bottom: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3); display: flex; justify-content: space-between; padding: sizing.rems(s) sizing.rems(s) sizing.rems(s) sizing.rems(m); h2 { @include type.type(s, normal); color: var(--ui-gray-starker-1); margin: 0; padding: sizing.rems(xxs) + sizing.rems(xxxs) 0; } .rose-icon { margin-right: sizing.rems(xxxs); } } .card-body { padding: sizing.rems(s); } .card-footer { border-top: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3); padding: sizing.rems(s); } // Allow text wrapping for copyable content in table .rose-table .copyable { white-space: inherit; word-break: break-word; } } // Hidden secret component (app/components/hidden-secret) .hidden-secret { display: flex; align-items: center; .copyable { display: flex; width: 100%; justify-content: space-between; .copyable-content { display: flex; align-items: center; pre { white-space: pre-wrap; line-height: normal; } } .secret-mask { color: var(--ui-gray-subtler-2); } .rose-button-ghost { // Copyable button icon. color: var(--ui-gray-subtler-1); } } .rose-button-ghost { // Hide/Show secret button icon. color: var(--ui-gray); } } // Spinning animation for refresh button icon @media (prefers-reduced-motion: no-preference) { .is-loading { .rose-icon { @keyframes hds-flight-icon-animation-rotation { to { transform: rotate(360deg); } } > svg { animation: hds-flight-icon-animation-rotation 0.7s linear infinite; } } } } .session-details-info { display: flex; align-items: center; gap: 1rem; } .target-details-header { display: flex; align-items: center; > * { margin-right: 1rem; } } .details-sidebar { background-color: var(--token-color-palette-neutral-50); border-radius: 0.313rem; padding: 1.5rem 2.5rem; > :not(:last-child) { margin-bottom: 2.25rem; } .title { color: var(--token-color-palette-neutral-600); margin-bottom: 0.75rem; } .resource-type { text-transform: capitalize; } .copyable-button { background-color: var(--token-color-palette-neutral-50); } .flight-icon { flex-shrink: 0; } } .details-screen-body { .rose-layout-body-content { margin-top: 1.5rem; } /* stylelint-disable selector-class-pattern */ .hds-tabs__panel { margin-top: 1.5rem; } } // Proxy URL .proxy-url-container { display: flex; gap: 1.75rem; justify-content: flex-start; margin-bottom: 1.75rem; .hds-dropdown-toggle-button { width: 9.375rem; } .hds-copy-snippet { width: auto; } .copy-address { max-width: 70%; } .copy-ssh-command { max-width: 90%; } } // Credentials Panel .credential-panel-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 0.5rem; .title { font-weight: var(--token-typography-font-weight-bold); } .hds-form-field--layout-flag { margin-bottom: 0; } } .credential-panel-body { border: 1px solid var(--token-color-border-primary); border-radius: 5px; display: flex; margin-top: 0.75rem; .credential-header { padding: 1.5rem; width: 33%; } .credential-secret { width: 66%; margin: 0.75rem; .secret-container { margin: 0.75rem 0.5rem; border-bottom: 1px solid var(--token-color-border-primary); word-break: break-word; &:last-child { border-bottom: 0; } .secret-key { font-weight: var(--token-typography-font-weight-semibold); } .hidden-secret { margin: 0.25rem 0; } } } .rose-button-ghost { margin-bottom: 0; } } .credential-name { font-weight: var(--token-typography-font-weight-semibold); } .raw-credential-panel-body { display: block; margin-top: 0.75rem; } // Host Modal .host-list-container { border: 1px solid var(--token-color-border-primary); padding: 0.25rem; border-radius: 6px; } .host-container { button { background: unset; border: unset; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0.5rem; .host-info-container { display: flex; gap: 0.75rem; .host-info { text-align: left; } } &:hover { background-color: var(--token-color-page-faint); cursor: pointer; } } .host-arrow { color: var(--token-color-foreground-faint); } } // Search & Filtering .targets { .hds-application-state { padding-top: 3rem; } .target-search-filtering { padding-bottom: 1rem; .hds-dropdown-toggle-button__text { white-space: nowrap; } } }