/** * Copyright Aquera Inc 2026 * * This source code is licensed under the BSD-3-Clause license found in the * LICENSE file in the root directory of this source tree. */ import { css } from 'lit'; export const styles = css` :host { display: block; font-family: var(--nile-font-family-serif, var(--ng-font-family-body)); color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900)); } :host([disabled]) { pointer-events: none; } :host([disabled]) .tsb__collapsed, :host([disabled]) .tsb__expanded { background: var( --nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle) ); border-color: var( --nile-colors-neutral-500, var(--ng-colors-border-disabled-subtle) ); } :host([disabled]) .tsb__label, :host([disabled]) .tsb__value, :host([disabled]) .tsb__tz { color: var(--nile-colors-text-disabled, var(--ng-colors-text-disabled)); } .tsb { display: flex; flex-direction: column; gap: var(--nile-spacing-md, var(--ng-spacing-md)); } .tsb__label { font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm)); font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium)); line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm)); } /* Collapsed view */ .tsb__collapsed { display: flex; align-items: center; flex-wrap: wrap; gap: var(--nile-spacing-lg, var(--ng-spacing-lg)); padding: var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-xl, var(--ng-spacing-xl)); border: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-colors-gray-300, var(--ng-colors-border-primary)); border-radius: var(--nile-radius-md, var(--ng-radius-md)); background: var(--nile-colors-white, var(--ng-colors-bg-primary)); min-height: var(--nile-height-28px, var(--ng-height-28px)); } .tsb__collapsed .tsb__actions nile-button::part(base) { height: var(--nile-height-28px, var(--ng-height-28px)); padding-block: var(--nile-spacing-none, var(--ng-spacing-none)); } .tsb__display { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--nile-spacing-lg, var(--ng-spacing-lg)); flex: 1 1 var(--nile-width-208px, var(--ng-width-56)); min-width: 0; } .tsb__display--editable { cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; } .tsb__display:focus-visible { outline: var(--nile-border-width-2, var(--ng-border-width-2)) solid var(--nile-colors-border-field-focused, var(--ng-colors-border-brand)); outline-offset: var(--nile-spacing-xxs, var(--ng-spacing-xxs)); border-radius: var(--nile-radius-sm, var(--ng-radius-sm)); } .tsb__value { font-family: var(--nile-font-family-serif, var(--ng-font-family-body)); font-variant-numeric: tabular-nums; font-size: var(--nile-type-scale-4, var(--ng-font-size-text-md)); font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-medium)); letter-spacing: 0.01em; overflow-wrap: normal; } .tsb__value--empty { color: var(--nile-colors-gray-400, var(--ng-colors-text-placeholder)); font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular)); } .tsb__tz { font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm)); color: var(--nile-colors-gray-500, var(--ng-colors-text-tertiary-600)); white-space: nowrap; } .tsb__actions { display: flex; align-items: center; gap: var(--nile-spacing-md, var(--ng-spacing-md)); flex-wrap: wrap; justify-content: flex-end; margin-left: auto; flex: 0 0 auto; } /* Expanded view */ .tsb__expanded { display: flex; flex-direction: column; gap: var(--nile-spacing-lg, var(--ng-spacing-lg)); padding: var(--nile-spacing-xl, var(--ng-spacing-xl)); border: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-colors-gray-300, var(--ng-colors-border-primary)); border-radius: var(--nile-radius-md, var(--ng-radius-md)); background: var(--nile-colors-white, var(--ng-colors-bg-primary)); } .tsb__fields { display: grid; grid-template-columns: repeat( auto-fit, minmax(var(--nile-width-99px, var(--ng-width-24)), 1fr) ); gap: var(--nile-spacing-md, var(--ng-spacing-md)); } .tsb__field { display: flex; flex-direction: column; min-width: 0; width: 100%; max-width: var(--nile-width-110px, var(--ng-width-108)); } .tsb__field nile-input::part(input) { padding-inline: var(--nile-spacing-sm, var(--ng-spacing-sm)); text-align: center; } .tsb__field nile-input::part(form-control-label) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tsb__timezone { display: flex; flex-direction: column; } @media (max-width: 480px) { .tsb__collapsed, .tsb__expanded { padding: var(--nile-spacing-lg, var(--ng-spacing-lg)); } .tsb__actions { width: 100%; margin-left: 0; } [part='editor-actions'] nile-button { flex: 1 1 var(--nile-width-130px, var(--ng-width-32)); } [part='editor-actions'] nile-button::part(base) { width: 100%; } } /* Visually-hidden hidden input used for form participation / validity. */ .value-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } `;