Initial commit
This commit is contained in:
@@ -0,0 +1,249 @@
|
||||
import { ANNOTATION_COLOR, PANEL_BG, PANEL_INPUT_BG, BORDER_COLOR, HOVER_BG, TEXT_MUTED, COLOR_WHITE, BUTTON_LIGHT_TEXT, BUTTON_LIGHT_BG_HOVER, BOX_SHADOW_TOOLBAR, Z_INDEX_EDITOR_PANEL, Z_INDEX_EDITOR_MARKER } from '../../constants/theme.js';
|
||||
|
||||
export const ANNOTATION_PANEL_STYLES = `
|
||||
#selection-mode-annotation-panel {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
position: fixed;
|
||||
background: ${PANEL_BG};
|
||||
border-radius: 16px;
|
||||
border: 1px solid ${BORDER_COLOR};
|
||||
padding: 8px;
|
||||
width: 320px;
|
||||
box-shadow: ${BOX_SHADOW_TOOLBAR};
|
||||
pointer-events: all;
|
||||
box-sizing: border-box;
|
||||
font-family: DM Sans, sans-serif;
|
||||
z-index: ${Z_INDEX_EDITOR_PANEL};
|
||||
|
||||
&.active {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
#selection-mode-annotation-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
#selection-mode-annotation-count {
|
||||
flex: 1 0 0;
|
||||
min-width: 0;
|
||||
color: ${TEXT_MUTED};
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
font-weight: 400;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#selection-mode-annotation-textarea {
|
||||
width: 100%;
|
||||
min-height: 88px;
|
||||
max-height: 160px;
|
||||
background: ${PANEL_INPUT_BG};
|
||||
border: 1px solid ${BORDER_COLOR};
|
||||
border-radius: 8px;
|
||||
outline: none;
|
||||
padding: 8px 12px;
|
||||
color: ${COLOR_WHITE};
|
||||
font-size: 16px;
|
||||
font-family: inherit;
|
||||
resize: none;
|
||||
box-sizing: border-box;
|
||||
caret-color: ${COLOR_WHITE};
|
||||
line-height: 24px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#selection-mode-annotation-textarea::placeholder {
|
||||
color: ${TEXT_MUTED};
|
||||
}
|
||||
|
||||
#selection-mode-annotation-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#selection-mode-annotation-attachments {
|
||||
display: none;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
|
||||
&.active {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.selection-mode-annotation-attachment {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
max-width: 100%;
|
||||
padding: 2px 4px 2px 8px;
|
||||
border: 1px solid ${BORDER_COLOR};
|
||||
border-radius: 8px;
|
||||
background: ${PANEL_INPUT_BG};
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.selection-mode-annotation-attachment-name {
|
||||
max-width: 180px;
|
||||
color: ${COLOR_WHITE};
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.selection-mode-annotation-attachment-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
& svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: ${HOVER_BG};
|
||||
}
|
||||
}
|
||||
|
||||
#selection-mode-annotation-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
#selection-mode-discard-btn,
|
||||
#selection-mode-attach-image-btn,
|
||||
#selection-mode-delete-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#selection-mode-discard-btn:hover,
|
||||
#selection-mode-attach-image-btn:hover:not(:disabled),
|
||||
#selection-mode-delete-btn:hover {
|
||||
background: ${HOVER_BG};
|
||||
}
|
||||
|
||||
#selection-mode-attach-image-btn:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#selection-mode-attach-image-btn.is-loading:disabled {
|
||||
opacity: 1;
|
||||
cursor: wait;
|
||||
}
|
||||
|
||||
/* Mirrors horizons-frontend Spinner.vue (w-4 border-1 border-light border-t-transparent, 2s spin). */
|
||||
.selection-mode-attach-spinner {
|
||||
box-sizing: border-box;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 9999px;
|
||||
border: 1px solid ${COLOR_WHITE};
|
||||
border-top-color: transparent;
|
||||
animation: selection-mode-attach-spin 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes selection-mode-attach-spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#selection-mode-delete-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
#selection-mode-comment-btn {
|
||||
background: ${COLOR_WHITE};
|
||||
border: none;
|
||||
color: ${BUTTON_LIGHT_TEXT};
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#selection-mode-comment-btn:hover {
|
||||
background: ${BUTTON_LIGHT_BG_HOVER};
|
||||
}
|
||||
|
||||
#selection-mode-comment-btn:disabled {
|
||||
opacity: 0.2;
|
||||
cursor: not-allowed;
|
||||
background: ${COLOR_WHITE};
|
||||
}
|
||||
`;
|
||||
|
||||
export const ANNOTATION_MARKER_STYLES = `
|
||||
.selection-mode-annotation-marker > * {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.selection-mode-annotation-marker {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
background: ${ANNOTATION_COLOR};
|
||||
border: 1px solid ${COLOR_WHITE}25;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: transform 0.15s ease;
|
||||
z-index: ${Z_INDEX_EDITOR_MARKER};
|
||||
}
|
||||
|
||||
.selection-mode-annotation-marker:hover,
|
||||
.selection-mode-annotation-marker.highlighted {
|
||||
transform: translate(-50%, -50%) scale(1.1);
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user