@servicetitan/assist-ui
Version:
ServiceTitan Atlas UI Components
134 lines (114 loc) • 3.03 kB
text/less
// Import Anvil2 utilities - these are already imported globally via styles.ts
// but adding here for reference and IDE support
@import (reference) '~@servicetitan/tokens/dist/tokens.less';
.composer-wrapper {
width: 100%;
margin-inline: auto;
max-width: 40rem; // 640px
display: flex;
flex-direction: column;
flex: 1;
@media (min-width: 768px) {
max-width: 48rem; // 768px
}
}
.composer-form {
background-color: var(--background-color, #ffffff);
border: 0.0625rem solid var(--border-color, #949596);
border-radius: 0.375rem; // 6px - matching TextField
padding: @spacing-0 0.5rem; // 8px
display: grid;
grid-template-columns: auto 1fr auto;
align-items: end;
gap: 0.5rem;
transition: border-color 0.2s ease;
&:hover:not(.disabled) {
border-color: var(--border-color-hover, #606162);
}
&:focus-within:not(.disabled) {
outline: 0.125rem solid var(--focus-ring-color, #0265dc);
outline-offset: 0.125rem;
}
&.disabled {
background-color: var(--background-color-strong, #f7f7f7);
opacity: @opacity-disabled;
pointer-events: none;
}
}
.icon-button {
padding: 0.5rem;
border-radius: @border-radius-circular;
background: transparent;
border: none;
margin-bottom: 6px;
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
&:hover:not(:disabled) {
background-color: var(--background-color-strong, #f7f7f7);
}
}
.input-wrapper {
flex: 1;
display: flex;
align-items: center;
position: relative;
}
.placeholder {
position: absolute;
left: 0.4rem;
top: 50%;
transform: translateY(-50%);
color: var(--foreground-color-subdued, #737475);
pointer-events: none;
user-select: none;
font-size: 1rem;
}
.input {
flex: 1;
outline: none;
background: transparent;
color: var(--foreground-color, #141414);
font-family: var(--font-family-base, 'Nunito Sans', sans-serif);
font-size: 1rem;
line-height: @base-line-height; // 24px
max-height: 6.25rem; // 100px - maximum height
overflow-y: auto;
overflow-x: hidden;
white-space: pre-wrap;
margin-top: 12px;
padding-bottom: 12px;
overflow-wrap: break-word;
padding-left: 7px;
padding-right: 0.75rem;
&:empty::before {
content: '';
}
// Custom scrollbar styling
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: var(--border-color-subdued, #dfe0e1);
border-radius: @border-radius-1;
&:hover {
background: var(--border-color, #949596);
}
}
}
// Actions wrapper (Voice + Send buttons)
.actions-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
}
// Send button
.send-button {
padding: 0.5rem;
border-radius: @border-radius-circular;
margin-bottom: 6px;
}