2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
const theme = ({ dt }) => `
|
|
|
|
.p-terminal {
|
2024-05-09 19:36:40 +00:00
|
|
|
height: ${dt('terminal.height')};
|
2024-05-01 08:26:48 +00:00
|
|
|
overflow: auto;
|
|
|
|
background: ${dt('terminal.background')};
|
|
|
|
color: ${dt('terminal.color')};
|
|
|
|
border: 1px solid ${dt('terminal.border.color')};
|
2024-05-09 19:36:40 +00:00
|
|
|
padding: ${dt('terminal.padding')};
|
|
|
|
border-radius: ${dt('terminal.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-terminal-prompt {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-terminal-prompt-value {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
border: 0 none;
|
2024-05-24 05:50:38 +00:00
|
|
|
background: transparent;
|
2024-05-01 08:26:48 +00:00
|
|
|
color: inherit;
|
|
|
|
padding: 0;
|
|
|
|
outline: 0 none;
|
|
|
|
font-family: inherit;
|
|
|
|
font-feature-settings: inherit;
|
|
|
|
font-size: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-terminal-prompt-label {
|
2024-05-09 19:36:40 +00:00
|
|
|
margin-right: ${dt('terminal.prompt.gap')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-terminal-input::-ms-clear {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-terminal-command-response {
|
2024-05-09 19:36:40 +00:00
|
|
|
margin: ${dt('terminal.command.response.margin')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: 'p-terminal p-component',
|
2024-04-08 11:51:39 +00:00
|
|
|
welcomeMessage: 'p-terminal-welcome-message',
|
|
|
|
commandList: 'p-terminal-command-list',
|
|
|
|
command: 'p-terminal-command',
|
|
|
|
commandValue: 'p-terminal-command-value',
|
|
|
|
commandResponse: 'p-terminal-command-response',
|
2023-10-02 10:46:09 +00:00
|
|
|
prompt: 'p-terminal-prompt',
|
2024-04-08 11:51:39 +00:00
|
|
|
promptLabel: 'p-terminal-prompt-label',
|
|
|
|
promptValue: 'p-terminal-prompt-value'
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'terminal',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|