mirror of
https://github.com/penpot/penpot.git
synced 2026-09-22 11:56:15 +00:00
491 lines
10 KiB
SCSS
491 lines
10 KiB
SCSS
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
//
|
|
// Copyright (c) KALEIDOS SUBSIDIARY SL
|
|
|
|
@use "ds/typography.scss" as *;
|
|
@use "ds/_borders.scss" as *;
|
|
@use "ds/spacing.scss" as *;
|
|
@use "ds/_sizes.scss" as *;
|
|
@use "ds/_utils.scss" as *;
|
|
@use "ds/z-index.scss" as *;
|
|
|
|
.modal-overlay {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: fixed;
|
|
inset-inline-start: 0;
|
|
inset-block-start: 0;
|
|
block-size: 100%;
|
|
inline-size: 100%;
|
|
z-index: var(--z-index-set);
|
|
background-color: var(--overlay-color);
|
|
}
|
|
|
|
.modal-container {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-xxxl);
|
|
padding: var(--sp-xxxl);
|
|
border-radius: $br-8;
|
|
background-color: var(--color-background-primary);
|
|
border: $b-2 solid var(--color-background-quaternary);
|
|
min-block-size: $sz-192;
|
|
inline-size: $sz-512;
|
|
max-block-size: px2rem(800);
|
|
}
|
|
|
|
.modal-content {
|
|
flex: 1;
|
|
overflow: hidden auto;
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
gap: var(--sp-l);
|
|
margin-block-end: var(--sp-xxl);
|
|
min-block-size: px2rem(40);
|
|
}
|
|
|
|
.modal-title {
|
|
color: var(--color-foreground-primary);
|
|
}
|
|
|
|
.modal-close-btn {
|
|
position: absolute;
|
|
inset-block-start: var(--sp-s);
|
|
inset-inline-end: px2rem(6);
|
|
}
|
|
|
|
.status-message {
|
|
@include use-typography("body-small");
|
|
|
|
color: var(--color-foreground-primary);
|
|
font-style: italic;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: var(--sp-l);
|
|
}
|
|
|
|
.file-entry {
|
|
--file-entry-fg-color: var(--color-foreground-secondary);
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-m);
|
|
|
|
&.success {
|
|
--file-entry-fg-color: var(--color-accent-sucess);
|
|
}
|
|
|
|
&.error {
|
|
--file-entry-fg-color: var(--color-accent-error);
|
|
}
|
|
|
|
&.editable {
|
|
--file-entry-fg-color: var(--color-foreground-primary);
|
|
}
|
|
}
|
|
|
|
.error-message,
|
|
.progress-message {
|
|
display: flex;
|
|
align-items: center;
|
|
min-block-size: $sz-32;
|
|
color: var(--file-entry-fg-color);
|
|
}
|
|
|
|
.error-message {
|
|
align-items: flex-start;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.linked-library {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-m);
|
|
color: var(--file-entry-fg-color);
|
|
}
|
|
|
|
.linked-library-tag {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
block-size: $sz-24;
|
|
inline-size: $sz-24;
|
|
|
|
svg {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
block-size: $sz-16;
|
|
inline-size: $sz-16;
|
|
color: transparent;
|
|
fill: none;
|
|
stroke-width: 1px;
|
|
stroke: var(--file-entry-fg-color);
|
|
}
|
|
|
|
&.error {
|
|
svg {
|
|
stroke: var(--element-foreground-error);
|
|
}
|
|
}
|
|
}
|
|
|
|
.file-name {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-l);
|
|
color: var(--file-entry-fg-color);
|
|
}
|
|
|
|
.edit-entry-buttons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-xs);
|
|
}
|
|
|
|
.file-name-edit {
|
|
display: flex;
|
|
align-items: center;
|
|
block-size: $sz-32;
|
|
border: $b-1 solid var(--color-background-tertiary);
|
|
color: var(--file-entry-fg-color);
|
|
flex-grow: 1;
|
|
position: relative;
|
|
border-radius: $br-4;
|
|
background-color: var(--color-background-tertiary);
|
|
}
|
|
|
|
.file-name-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-m);
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.file-label-icon {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
block-size: $sz-16;
|
|
inline-size: $sz-16;
|
|
color: var(--file-entry-fg-color);
|
|
}
|
|
|
|
.file-name-input {
|
|
@include use-typography("body-medium");
|
|
|
|
--edit-input-background-color: var(--color-background-tertiary);
|
|
--edit-input-border-color: transparent;
|
|
|
|
block-size: $sz-32;
|
|
inline-size: 100%;
|
|
padding: px2rem(6);
|
|
margin: 0;
|
|
border-radius: $br-8;
|
|
border: $b-1 solid var(--edit-input-border-color);
|
|
color: var(--color-foreground-primary);
|
|
background-color: var(--edit-input-background-color);
|
|
|
|
&:focus-visible {
|
|
--edit-input-background-color: var(--color-background-primary);
|
|
--edit-input-border-color: var(--color-accent-primary);
|
|
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
.context-notification-error {
|
|
--context-notification-bg-color: var(--color-background-primary);
|
|
}
|
|
|
|
.file-name-notification {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.import-error-disclaimer {
|
|
color: var(--color-foreground-secondary);
|
|
}
|
|
|
|
.import-error-list {
|
|
padding: 0 var(--sp-l);
|
|
list-style: disc;
|
|
}
|
|
|
|
.import-error-list-enry {
|
|
padding: var(--sp-xs) 0;
|
|
}
|
|
|
|
.import-error-detail {
|
|
// TODO: Typography does not match any existing DS typography token.
|
|
font-family: "worksans", "vazirmatn", sans-serif;
|
|
font-size: px2rem(12);
|
|
font-weight: 400;
|
|
line-height: 1.4;
|
|
margin-block-start: var(--sp-xs);
|
|
color: var(--color-foreground-secondary);
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
// ################################
|
|
// LIBRARY RESOLUTION
|
|
// ################################
|
|
|
|
.library-resolution {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-m);
|
|
}
|
|
|
|
.library-resolution-message {
|
|
color: var(--color-foreground-secondary);
|
|
margin-block-end: var(--sp-s);
|
|
}
|
|
|
|
.library-resolution-file-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-s);
|
|
}
|
|
|
|
.library-resolution-file-icon {
|
|
color: var(--color-foreground-secondary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.library-resolution-file-name {
|
|
color: var(--color-foreground-primary);
|
|
}
|
|
|
|
.library-resolution-header {
|
|
@include use-typography("body-medium");
|
|
|
|
color: var(--color-foreground-secondary);
|
|
display: grid;
|
|
grid-template-columns: 1fr 32px 1fr;
|
|
border-block-end: $b-1 solid var(--color-foreground-secondary);
|
|
}
|
|
|
|
.library-origin-name,
|
|
.library-resolution-connection {
|
|
block-size: $sz-32;
|
|
text-align: start;
|
|
color: var(--color-foreground-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.library-resolution-item {
|
|
display: grid;
|
|
grid-template-columns: 1fr 32px 1fr;
|
|
block-size: $sz-32;
|
|
margin-block: var(--sp-s);
|
|
}
|
|
|
|
.library-resolution-icon {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-inline-end: var(--sp-s);
|
|
color: var(--color-foreground-secondary);
|
|
}
|
|
|
|
.library-resolution-arrow {
|
|
color: var(--color-foreground-secondary);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-block-size: $sz-32;
|
|
}
|
|
|
|
.library-resolution-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-s);
|
|
}
|
|
|
|
.library-resolution-item-name {
|
|
@include use-typography("body-medium");
|
|
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--sp-s);
|
|
color: var(--color-foreground-secondary);
|
|
padding-inline-start: var(--sp-s);
|
|
}
|
|
|
|
.library-resolution-no-selection {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--color-foreground-secondary);
|
|
padding: var(--sp-s);
|
|
margin-inline-start: var(--sp-xxs);
|
|
block-size: $sz-32;
|
|
}
|
|
|
|
// ################################
|
|
// Summary file card
|
|
// ################################
|
|
|
|
.summary-file {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-s);
|
|
padding: var(--sp-m);
|
|
border-radius: $br-8;
|
|
background: var(--color-background-primary);
|
|
}
|
|
|
|
.summary-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-xxs);
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
border-inline-start: $b-1 solid var(--color-background-quaternary);
|
|
}
|
|
|
|
.summary-file-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-s);
|
|
padding-block-end: var(--sp-s);
|
|
border-bottom: $b-1 solid var(--color-background-quaternary);
|
|
}
|
|
|
|
.summary-section-title {
|
|
color: var(--color-foreground-primary);
|
|
}
|
|
|
|
.summary-linked-arrow {
|
|
color: var(--color-foreground-secondary);
|
|
}
|
|
|
|
.summary-file-icon {
|
|
color: var(--color-foreground-secondary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.summary-file-name {
|
|
color: var(--color-foreground-primary);
|
|
}
|
|
|
|
// Section within a file (auto-linked or user selection)
|
|
.summary-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-xs);
|
|
padding-inline-start: var(--sp-s);
|
|
}
|
|
|
|
.summary-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: px2rem(6);
|
|
padding: var(--sp-xs) 0;
|
|
}
|
|
|
|
.summary-list-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--sp-s);
|
|
padding: var(--sp-xs) var(--sp-s);
|
|
border-radius: $br-4;
|
|
|
|
&:hover {
|
|
background: var(--color-background-secondary);
|
|
}
|
|
}
|
|
|
|
.summary-item-name {
|
|
color: var(--color-foreground-primary);
|
|
flex: 1;
|
|
min-inline-size: 0;
|
|
display: block;
|
|
max-inline-size: 99%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.summary-item-name-header {
|
|
color: var(--color-foreground-secondary);
|
|
flex: 1;
|
|
min-inline-size: 0;
|
|
display: block;
|
|
max-inline-size: 99%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
// Auto-linked badge
|
|
.summary-linked-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--sp-xs);
|
|
padding: var(--sp-xxs) var(--sp-s);
|
|
border-radius: $br-12;
|
|
background: var(--color-accent-success-bg);
|
|
color: var(--color-accent-success);
|
|
font-size: px2rem(11);
|
|
font-weight: 500;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.summary-badge-icon {
|
|
color: var(--color-accent-success);
|
|
}
|
|
|
|
// User-selected library info
|
|
.summary-linked-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-xs);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.summary-linked-name {
|
|
// TODO: Typography does not match any existing DS typography token.
|
|
font-family: "worksans", "vazirmatn", sans-serif;
|
|
font-size: px2rem(12);
|
|
line-height: 1.4;
|
|
color: var(--color-foreground-secondary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.summary-linked-project {
|
|
// TODO: Typography does not match any existing DS typography token.
|
|
font-family: "worksans", "vazirmatn", sans-serif;
|
|
font-weight: 400;
|
|
line-height: 1.4;
|
|
color: var(--color-foreground-secondary);
|
|
padding: var(--sp-xxs) var(--sp-s);
|
|
border-radius: $br-12;
|
|
background: var(--color-background-quaternary);
|
|
font-size: px2rem(11);
|
|
}
|
|
|
|
// No selection state
|
|
.summary-no-selection {
|
|
// TODO: Typography does not match any existing DS typography token.
|
|
font-family: "worksans", "vazirmatn", sans-serif;
|
|
font-size: px2rem(12);
|
|
font-weight: 400;
|
|
line-height: 1.4;
|
|
color: var(--color-foreground-secondary);
|
|
font-style: italic;
|
|
flex-shrink: 0;
|
|
}
|